Payment Intent not updated

Created on 10 December 2024, about 2 months ago

Problem/Motivation

Sometimes Stripe payment intent is not updated when user updates their cart.

Steps to reproduce

  • Add several items to the cart
  • Visit checkout page with stripe review pane on it (this will create payment intent), but don't enter credit card info
  • Go back to cart and remove/add a few items to change the order price
  • Proceed with checkout process normally

Amount charged by stripe will be the initial cart price, not the changed one

Proposed resolution

Payment intent is set to be updated in Drupal\commerce_stripe\EventSubscriberOrderPaymentIntentSubscriber::onOrderUpdate but after some debugging, I noticed payment gateway might be empty at some point which stops the update.

As a possible solution, we could store the updated price in temporary storage until the gateway is set and an update can be done.

πŸ› Bug report
Status

Active

Component

Stripe Checkout

Created by

πŸ‡ΊπŸ‡¦Ukraine leonid_fishchuk

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

Comments & Activities

Production build 0.71.5 2024