mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
(remove Stripe mocking examples)
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<?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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -22,27 +22,3 @@ class StripePaymentGateway implements PaymentGateway
|
||||
], ['api_key' => $this->apiKey]);
|
||||
}
|
||||
}
|
||||
|
||||
// class StripePaymentGateway implements PaymentGateway
|
||||
// {
|
||||
// private $apiKey;
|
||||
|
||||
// public function __construct($apiKey)
|
||||
// {
|
||||
// $this->apiKey = $apiKey;
|
||||
// }
|
||||
|
||||
// public function charge($amount, $token)
|
||||
// {
|
||||
// (new \GuzzleHttp\Client)->post('https://api.stripe.com/v1/charges', [
|
||||
// 'headers' => [
|
||||
// 'Authorization' => "Bearer {$this->apiKey}",
|
||||
// ],
|
||||
// 'form_params' => [
|
||||
// 'amount' => $amount,
|
||||
// 'token' => $token,
|
||||
// 'currency' => 'usd',
|
||||
// ]
|
||||
// ]);
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user