Created on 25 July 2024, 4 months ago
Updated 29 July 2024, 4 months ago

Problem/Motivation

I don't know whether this is related to https://www.drupal.org/project/commerce_stripe/issues/3132809 πŸ› Stripe sometimes causes commerce_payment to error although it accepts payment Needs work , or indeed whether this is an issue in Commerce Stripe or in Commerce itself.

The payment gateway is configured with the Stripe Card Element. It is not really possible to reproduce the issue, most transactions are fine, but we have a case where 1 successful payment has triggered 3 orders to be produced, identical except for order number. Each of the orders shows this as the checkout steps:

Tue, 07/23/2024 - 15:22
Order moved from Draft to Completed by the Place order transition.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Customer completed checkout for this order.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Order moved from Draft to Completed by the Place order transition.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Customer completed checkout for this order.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Order moved from Draft to Completed by the Place order transition.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Payment captured via Stripe for Β£354.99 using Mastercard ending in 7313.
Transaction ID: pi_3PfjaOHjo7D0Eiav0GUtNcdS.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Customer completed checkout for this order.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Payment captured via Stripe for Β£354.99 using Mastercard ending in 7313.
Transaction ID: pi_3PfjaOHjo7D0Eiav0GUtNcdS.

Anonymous (not verified)
Tue, 07/23/2024 - 15:22
Payment captured via Stripe for Β£354.99 using Mastercard ending in 7313.
Transaction ID: pi_3PfjaOHjo7D0Eiav0GUtNcdS.

In the php logs we can see prior to this at 15:21 the following errors:

[Tue Jul 23 15:21:04.849959 2024] [proxy_fcgi:error] [pid 3032433:tid 140362871920384] [remote 2a09:bac2:377e:d2::15:362:41934] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\commerce_payment\\Exception\\InvalidRequestException: "Invalid parameters were supplied to Stripe's API." at /var/www/intarsia_platform/web/modules/contrib/commerce/modules/payment/src/Exception/PaymentGatewayException.php line 36',

[Tue Jul 23 15:21:04.867984 2024] [proxy_fcgi:error] [pid 3032433:tid 140359950636800] [remote 2a09:bac2:377e:d2::15:362:41934] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\commerce_payment\\Exception\\InvalidRequestException: "Invalid parameters were supplied to Stripe's API." at /var/www/intarsia_platform/web/modules/contrib/commerce/modules/payment/src/Exception/PaymentGatewayException.php line 36'

It is not possible to see whether these actually relate to the purchase which has created the duplicate orders but it seems likely - there were no other orders on the site around that time.

Is it an issue with the Commerce Stripe module or the main Commerce module that multiple orders can be created containing identical remote payment ids?

πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Card Element

Created by

πŸ‡¬πŸ‡§United Kingdom GillMead

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

Comments & Activities

  • Issue created by @GillMead
  • Status changed to Postponed: needs info 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    HI @GillMead,

    It is highly unlikely commerce core or the commerce_stripe module would create a new order.

    A payment created on the return would be applied to the customer's current cart.

    If an error occurred when attempting to create and apply the payment to the order, the order would not be completed.

    Do you possibly have any custom code, responding to a Stripe webhook that creates orders?

Production build 0.71.5 2024