@@ -40,9 +40,9 @@ |
||
40 | 40 | |
41 | 41 | try { |
42 | 42 | $invoice = $sub->latest_invoice; |
43 | - $invoice->pay([ 'expand' => [ 'payment_intent' ] ]); |
|
43 | + $invoice->pay(['expand' => ['payment_intent']]); |
|
44 | 44 | } catch (\Stripe\Exception\CardException $e) { |
45 | - $invoice = $subscription->api->client->invoices->retrieve($sub->latest_invoice, ['expand' => [ 'payment_intent'] ]); |
|
45 | + $invoice = $subscription->api->client->invoices->retrieve($sub->latest_invoice, ['expand' => ['payment_intent']]); |
|
46 | 46 | } |
47 | 47 | } else { |
48 | 48 | $invoice = $sub->latest_invoice; |
@@ -3,7 +3,7 @@ |
||
3 | 3 | namespace MySociety\TheyWorkForYou; |
4 | 4 | |
5 | 5 | class TestStripe extends Stripe { |
6 | - public function getSubscription($id, $args=[]) { |
|
6 | + public function getSubscription($id, $args = []) { |
|
7 | 7 | if ($id == 'sub_123') { |
8 | 8 | return \Stripe\Util\Util::convertToStripeObject([ |
9 | 9 | 'id' => 'sub_123', |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | class Stripe { |
6 | 6 | private static $instance; |
7 | 7 | |
8 | - public function __construct($stripeSecretKey="") { |
|
8 | + public function __construct($stripeSecretKey = "") { |
|
9 | 9 | if (self::$instance) { |
10 | 10 | throw new \RuntimeException('Stripe could not be instantiate more than once. Check PHP implementation : https://github.com/stripe/stripe-php'); |
11 | 11 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | - public function getSubscription($id, $args=[]) { |
|
23 | + public function getSubscription($id, $args = []) { |
|
24 | 24 | return $this->client->subscriptions->retrieve($id, $args); |
25 | 25 | } |
26 | 26 |