← All changes
|
app/Modules/PaymentMethods/StripeGateway/Webhook/IPN.php
+2
-2
1.6.4
→
1.6.5
View file →
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | |
| 54 | 54 | if (empty($refunds)) { |
| 55 | 55 | $chargeId = Arr::get($charge, 'id', ''); |
| 56 | 56 | if ($chargeId) { |
| 57 | - $refundsResponse = (new API())->getStripeObject('charges/' . $chargeId . '/refunds'); | |
| 57 | + $refundsResponse = (new API())->getStripeObject('charges/' . $chargeId . '/refunds', [], StripeHelper::modeFromLivemode(isset($event->livemode) ? (bool)$event->livemode : null)); | |
| 58 | 58 | if (!is_wp_error($refundsResponse)) { |
| 59 | 59 | $refunds = Arr::get($refundsResponse, 'data', []); |
| 60 | 60 | } |
| 61 | 61 | } |
| @@ -406,9 +406,9 @@ | ||
| 406 | 406 | $event = Arr::get($data, 'event'); |
| 407 | 407 | $order = Arr::get($data, 'order'); |
| 408 | 408 | $invoice = $event->data->object; |
| 409 | 409 | |
| 410 | - $invoice = (new API())->getStripeObject('invoices/' . $invoice->id); | |
| 410 | + $invoice = (new API())->getStripeObject('invoices/' . $invoice->id, [], StripeHelper::modeFromLivemode(isset($event->livemode) ? (bool)$event->livemode : null)); | |
| 411 | 411 | |
| 412 | 412 | $vendorSubscriptionId = Arr::get($invoice, 'subscription', null) |
| 413 | 413 | ?: Arr::get($invoice, 'parent.subscription_details.subscription', null); |
| 414 | 414 | |