I am using the Stripe gateway plugin for Commerce 2.

I have done the following:

  • Entered the stripe API keys correctly.
  • Set the Webhook URL up correctly in Stripe.
  • Correctly disabled CSRF protection for the webhook url.
  • Used the example templates with the stripe.js token submitting correctly.
  • Since I am using 3dSecure, I am getting redirect offsite correctly.
  • After returning from offsite, I see the completed order successfully.

In the control panel the order is completed, but it is unpaid.

The last transaction has the status 'processing'.

Any ideas why the order isn't paid?

up vote 3 down vote accepted

The processing transaction status is used when a gateway returns from offsite correctly (the user has done everything they can to make payment on the order) but since we didn't get a definitive answer from the gateway that the card has been charged, we put the transaction into a 'processing' status.

This status means we complete the order as there is nothing more for the customer to do.

We later get a response from the gateway (outside of the user checkout flow) to the webhook URL to let us know the payment charge on the card has been made. We then update the order with a successful payment transaction.

It sounds like the webhook isn't being hit with that update information.

After looking at your logs and config, I see that after the webhook request from stripe comes in, the system raises an error.

The error is caused by the fact that you have set the isSystemOn config to false in production. This means the webhook request from stripe is failing, since only logged-in admins can access the system with that config setting set to false.

My guess is you made the payment with the example templates while admin :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.