ethercreative / web-payments

Web Payments for Craft Commerce
Other
5 stars 7 forks source link

Error when completing payment with Apple Pay #1

Closed peteeveleigh closed 5 years ago

peteeveleigh commented 5 years ago

Just installed this plugin to test. I've got the button appearing and the payment info appears to be populated correctly.

When I approve the payment I get a "Payment Error" notification on my phone.

The Stripe log shows the token and all the info there seems correct but no payment is taken and nothing happens on the Commerce side of things.

Is this because of a limitation when testing Apple Pay with Stripe or some other problem with my setup or the plugin?

Tam commented 5 years ago

@fantasticmachine Is there any more information in your log files?

peteeveleigh commented 5 years ago

Nothing relevant that I can see in the Craft logs. But I'm now seeing a 400 error in the Stripe logs with the following response body.

{
  "error": {
    "code": "resource_missing",
    "doc_url": "https://stripe.com/docs/error-codes/resource-missing",
    "message": "No such customer: cus_FByKheq9j8XO6A",
    "param": "customer",
    "type": "invalid_request_error"
  }
}

So I think this is because I'm using Payment Intents version of Stripe Commerce plugin (although I thought I was using the Charge version). Going to check that today.

peteeveleigh commented 5 years ago

Yep that was it. The site I was testing it on was using Payment Intents.

Tam commented 5 years ago

I've added support for Payment Intents in 1.0.2.