-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15.x] Stripe API and SDK update #1615
Conversation
$parameters = array_merge([ | ||
'automatic_tax' => $this->automaticTaxPayload(), | ||
'customer' => $this->stripe_id, | ||
'currency' => $stripeCustomer->currency ?? config('cashier.currency'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There cannot be multiple currencies anymore on invoices so we'll use the one from the customer or fallback to the Cashier default.
if (isset($parameters['subscription'])) { | ||
unset($parameters['currency']); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currency
cannot be combined with subscription
so we allow subscription
to take precedence.
if ($options['confirm'] ?? false) { | ||
$options['return_url'] ??= route('home'); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a payment intent is being confirmed, we'll always need to supply a return url.
This updates the Stripe API to the most recent one
2023-10-16
as well as update the SDK version to v13 which is compatible with it.I also decided to drop support for older SDK versions because v13 is the one that's compatible with this API version.
Closes #1556