Update to use current Stripe API

Created on 23 March 2021, over 3 years ago
Updated 8 March 2024, 9 months ago

Problem/Motivation

The code uses an API version that is more than a year old. It uses Stripe deprecated code. It uses Stripe Charges API, which is no longer enhanced.

Proposed resolution

  • Update the API version
  • Remove the configuration reference to PaymentIntent beta
  • Change from using stripe.handleCardPayment in commerce_stripe.review.js to stripe.confirmCardPayment.
  • Switch to confirming the payment intent instead of creating a charge using the older charge API, which is no longer updated.
  • Look for other deprecations and update.

Remaining tasks

TBD

User interface changes

None

API changes

No visible changes.

Data model changes

None.

πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Jeff Veit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine marchuk.vitaliy Rivne, UA

    Update will be done in this issue https://www.drupal.org/project/commerce_stripe/issues/3403745 πŸ’¬ Why is stripe-php still stuck on version 7 and Stripe API on 2019-12-03? What does it imply? Active

  • πŸ‡ΊπŸ‡ΈUnited States torgosPizza Portland, OR

    I don't think this issue should be closed. The problem is that the API Version and PHP Library are two different, independent things. The PHP Library is purely code but the "API" can be selected in the dashboard, and specified in code along with the PHP request. The request and response structures may also change between PHP versions, some of which are not backwards-comptible.

    I suggest re-opening this Issue and instead re-titling it to something like "Make module compatible with multiple API versions" which may require some refactoring of the code, so that requests and response considerations can be mapped to the relevant version to avoid exceptions or other API errors.

Production build 0.71.5 2024