@@ -121,7 +121,7 @@ |
||
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | - if ($old_price >= $new_price) { |
|
124 | + if ($old_price >= $new_price) { |
|
125 | 125 | if ($this->stripe->schedule) { |
126 | 126 | \Stripe\SubscriptionSchedule::release($this->stripe->schedule); |
127 | 127 | } |
@@ -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 = \Stripe\Invoice::retrieve($sub->latest_invoice, ['expand' => [ 'payment_intent'] ]); |
|
45 | + $invoice = \Stripe\Invoice::retrieve($sub->latest_invoice, ['expand' => ['payment_intent']]); |
|
46 | 46 | } |
47 | 47 | } else { |
48 | 48 | $invoice = $sub->latest_invoice; |
@@ -57,10 +57,10 @@ |
||
57 | 57 | # Update the invoice's PaymentIntent and Charge to say it came from TWFY (for CSV export) |
58 | 58 | # Both are shown in the Stripe admin, annoyingly |
59 | 59 | if ($obj->payment_intent) { |
60 | - \Stripe\PaymentIntent::update($obj->payment_intent, [ 'description' => 'TheyWorkForYou' ]); |
|
60 | + \Stripe\PaymentIntent::update($obj->payment_intent, ['description' => 'TheyWorkForYou']); |
|
61 | 61 | } |
62 | 62 | if ($obj->charge) { |
63 | - \Stripe\Charge::update($obj->charge, [ 'description' => 'TheyWorkForYou' ]); |
|
63 | + \Stripe\Charge::update($obj->charge, ['description' => 'TheyWorkForYou']); |
|
64 | 64 | } |
65 | 65 | } catch (\Stripe\Exception\ApiErrorException $e) { |
66 | 66 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | if ($_SERVER['REQUEST_METHOD'] === 'GET') { |
15 | 15 | $setup_intent = \Stripe\SetupIntent::create([ |
16 | - 'automatic_payment_methods' => ["enabled" => True, "allow_redirects" => "never"], |
|
16 | + 'automatic_payment_methods' => ["enabled" => true, "allow_redirects" => "never"], |
|
17 | 17 | ]); |
18 | 18 | header('Content-Type: application/json'); |
19 | 19 | print json_encode([ |