diff --git a/app/Billing/Alternate/StripePaymentGateway.php b/app/Billing/Alternate/StripePaymentGateway.php deleted file mode 100644 index abd7f0e..0000000 --- a/app/Billing/Alternate/StripePaymentGateway.php +++ /dev/null @@ -1,24 +0,0 @@ -stripeClient = $stripeClient; - } - - public function charge($amount, $token) - { - $this->stripeClient->createCharge([ - 'amount' => $amount, - 'source' => $token, - 'currency' => 'usd', - ]); - } -} diff --git a/app/Billing/StripePaymentGateway.php b/app/Billing/StripePaymentGateway.php index f16ad5e..6f5a988 100644 --- a/app/Billing/StripePaymentGateway.php +++ b/app/Billing/StripePaymentGateway.php @@ -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', -// ] -// ]); -// } -// } diff --git a/tests/unit/Billing/MockStripePaymentGatewayTest.php b/tests/unit/Billing/MockStripePaymentGatewayTest.php deleted file mode 100644 index 1982791..0000000 --- a/tests/unit/Billing/MockStripePaymentGatewayTest.php +++ /dev/null @@ -1,21 +0,0 @@ -charge(2500, 'valid-token'); - - $stripeClient->shouldHaveReceived('createCharge')->with([ - 'amount' => 2500, - 'source' => 'valid-token', - 'currency' => 'usd', - ])->once(); - } -}