mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
25 lines
492 B
PHP
25 lines
492 B
PHP
<?php
|
|
|
|
namespace App\Billing\Alternate;
|
|
|
|
use App\Billing\PaymentGateway;
|
|
|
|
class StripePaymentGateway implements PaymentGateway
|
|
{
|
|
private $stripeClient;
|
|
|
|
public function __construct(\Stripe\ApiClient $stripeClient)
|
|
{
|
|
$this->stripeClient = $stripeClient;
|
|
}
|
|
|
|
public function charge($amount, $token)
|
|
{
|
|
$this->stripeClient->createCharge([
|
|
'amount' => $amount,
|
|
'source' => $token,
|
|
'currency' => 'usd',
|
|
]);
|
|
}
|
|
}
|