From 2d4ce1dc9ea4db554f0cff3312cb72da17ce9826 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 30 Dec 2016 15:18:39 -0500 Subject: [PATCH] (remove Stripe mocking examples) --- .../Alternate/StripePaymentGateway.php | 24 ------------------- app/Billing/StripePaymentGateway.php | 24 ------------------- .../Billing/MockStripePaymentGatewayTest.php | 21 ---------------- 3 files changed, 69 deletions(-) delete mode 100644 app/Billing/Alternate/StripePaymentGateway.php delete mode 100644 tests/unit/Billing/MockStripePaymentGatewayTest.php 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(); - } -}