Successful payment for missing/deleted cart

Created on 10 July 2024, 9 months ago

Problem/Motivation

During the checkout process if cart was deleted (e.g. in the background by cron) and a user tries to pay, the payment is confirmed anyway by stripe payment element. So we have a successful payment on stripe side and no connected order on drupal side.

Steps to reproduce

1. Go to the checkout payment page
2. Delete cart (as admin /admin/commerce/orders/carts)
3. Try to pay
4. Check stripe transactions

Proposed resolution

Need to check the cart existence before calling stripe.confirmPayment() method in commerce_stripe.payment_element.js by calling custom route for ajax call.
And additionally we need to update the order if it exists to update the changed order property.

🐛 Bug report
Status

Active

Version

1.0

Component

Payment Element

Created by

🇬🇪Georgia maximkashuba Batumi

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

Comments & Activities

Production build 0.71.5 2024