[FW][FIX] pos_stripe: consistency on Stripe API calls #192465
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit:
pos_stripe doesn't specify a Stripe version when doing its requests. Because of this, Stripe defaults to the API version defined on the Stripe account. This varies from customer to customer, as it is automatically configured to use the latest API version available when the first API request is received. Stripe regularly makes breaking changes to their API:
https://docs.stripe.com/changelog?breaking=true
for example removing the
charges
attribute:https://docs.stripe.com/changelog/2022-11-15/removes-charges-attribute-paymentintent
which we use in pos_stripe.
After this commit:
We rely on payment_stripe._stripe_make_request which hardcode the API version number. Such change was already started in
pos_stripe.stripe_capture_payment
opw-4375876
Forward-Port-Of: #192008