Skip to content

Commit f4dfe4c

Browse files
authored
Fix invoice() exception handling (#1795)
* Fix invoice() exception handling * Update ManagesInvoices.php
1 parent cccb826 commit f4dfe4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/ManagesInvoices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function invoice(array $options = []): Invoice
152152
return $invoice->chargesAutomatically() ? $invoice->pay($payOptions) : $invoice->send();
153153
} catch (StripeCardException $exception) {
154154
// Get the latest payment from the invoice payments...
155-
$stripeInvoice = $invoice->asStripeInvoice()->refresh(['expand' => ['payments']]);
155+
$stripeInvoice = $invoice->refresh(['payments'])->asStripeInvoice();
156156

157157
$invoicePayments = $stripeInvoice->payments->data;
158158

0 commit comments

Comments
 (0)