Invalid parameters were supplied to Stripe's API when using stored information

Created on 15 March 2024, 8 months ago
Updated 18 June 2024, 5 months ago

Problem/Motivation

The users can't complete the purchase due to an error.

This only happens when the user tries to pay using the Stripe information stored on the website.

The following is the PHP error I see in the Drupal logs related to the users having this problem:

Location: https://sitename.com/checkout/1234/review
Referrer: https://sitename.com/checkout/1234/order_information
Message: Drupal\commerce_payment\Exception\InvalidRequestException: Invalid parameters were supplied to Stripe's API. in Drupal\commerce_stripe\ErrorHelper::handleException() (line 52 of /var/www/sitename.com/web/modules/contrib/commerce_stripe/src/ErrorHelper.php).

Steps to reproduce

Have a user make a payment using Stripe.
Have the same user try to make a second payment using the payment method saved by Stripe.
The second payment fails with an error: "website experienced an unexpected error."

What does work?

Some users have logged out and paid using PayPal. It appears that the problem is only related to stored information.

Other users are making payments via Stripe

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA

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

Comments & Activities

  • Issue created by @jcmartinez
  • πŸ‡ΊπŸ‡ΈUnited States Cayenne

    I am having the same issue and am needing to tell customers to log out. But that's pretty ugly as solutions go.

  • πŸ‡«πŸ‡·France kumkum29

    Hi,

    I get the same error, when I want to use a registered card from my account. I try to logout and re-login without sucess. I get a white page and the same error: "Invalid parameters were supplied to Stripe's API."

    Do I need to modify a setting on the Payment test gateway?

    Thanks for your replies.

  • πŸ‡ΊπŸ‡ΈUnited States gscerb

    Same problem!

  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    Hi all! Thanks for the report.

    1. Looks like you are reporting this against v1.1. Can you confirm? Upgrading to 1.2 is recommended, as it has many features and fixes. Please advise if you still encounter this issue with 1.2.

    2. Please advise if you are using the "Stripe Card Element" or "Stripe Payment Element" gateway. They do differ, so it would be helpful in troubleshooting knowing which gateway you are experiencing issues with.

  • πŸ‡ΊπŸ‡ΈUnited States gscerb

    The problem continues.

    Commerce Stripe v 1.2
    Stripe Card Element

Production build 0.71.5 2024