Stripe Checkout not working after update from 7.x-3.0-alpha1

Created on 25 October 2018, almost 7 years ago
Updated 18 August 2025, about 1 month ago

I've had a commerce site working for a couple of years now and have been using the commerce stripe module to take payments.

The site is running Drupal 7.60 and is actually based upon commerce kickstart 7.x-2.55 and has the latest updates.

Using commerce Stripe 7.x-3.0-alpha1 and stripe-php 3.23 this has worked perfectly, when the user continues to payment after the checkout review page the iframe has popped up and payment can be taken.

I've just tried to update the module to the latest 7.x-3.0-alpha3 but when trying to continue from the review page to the payment the iframe no longer pops up and instead the screen refreshes and I get the following error.

We received the following error processing your card: Invalid card object: must be a dictionary or a non-empty string. See API docs at https://stripe.com/docs' Please enter your information again or try a different card.

The same issue occurs if I change to the latest tested version of stripe-php v5.6.0.

Choosing stripe.js or elements works as expected.

If I look at the response in the Stripe dashboard then it looks like they're receiving the request for payment but failing it because the card object is missing which is unsurprising as the user isn't given the opportunity to enter the card details as the popup never appears.

{
  "amount": "19995",
  "currency": "GBP",
  "card": "",
  "capture": "false",
  "description": "Order Number: 1234",
  "metadata": {
    "order_id": "1234",
    "order_number": "1234",
    "uid": "0",
    "email": "test@test.com"
  }
}

If it makes any difference I'm not using card on file.

The same problem occurs with the dev version and if I revert to alpha 1 then everything starts working again perfectly. I've cleared caches in between changes and have tried the original API version I was using 2015-10-16 and the latest tested one too.

Before I start delving into the code has anyone seen similar before or does anyone have any suggestions of where to look first?

πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Stripe Checkout

Created by

πŸ‡¬πŸ‡§United Kingdom Ollie222

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.

Production build 0.71.5 2024