mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-13 13:35:52 +00:00
Create CheckoutSessions.php
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Bitinflow\Accounts\Traits\BitinflowPaymentsWallet;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class CheckoutSessions
|
||||
{
|
||||
public function __construct(protected User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function createCheckoutSession(array $payload)
|
||||
{
|
||||
return $this->user->asPaymentsUser('POST', 'checkout-sessions', $payload);
|
||||
}
|
||||
|
||||
public function getCheckoutSession(string $id)
|
||||
{
|
||||
return $this->user->asPaymentsUser('GET', sprintf('checkout-sessions/%s', $id));
|
||||
}
|
||||
|
||||
public function checkoutCheckoutSession(string $id)
|
||||
{
|
||||
return $this->user->asPaymentsUser('PUT', sprintf('checkout-sessions/%s/checkout', $id));
|
||||
}
|
||||
|
||||
public function revokeCheckoutSession(string $id)
|
||||
{
|
||||
return $this->user->asPaymentsUser('PUT', sprintf('checkout-sessions/%s/revoke', $id));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user