active_merchant icon indicating copy to clipboard operation
active_merchant copied to clipboard

Stripe Payment Intents with decrypted Apple Pay token data

Open rbonestell opened this issue 7 months ago • 1 comments

I am unable to confirm that using activemerchant v1.136.0 properly supports transacting with Stripe Payment Intents when utilizing decrypted Apple Pay payment data as the payment method.

Using the request constructed in conjunction with new_apple_google_pay_flow in stripe_payment_intents.rb results in a Bad Request response from Stripe's payment_intents endpoint.

Running the test test_successful_purchase_with_apple_pay from the file remote_stripe_payment_intents_test.rb results in a Stripe error for a missing parameter: image

Adding the missing parameter to the request does not resolve the error, instead Stripe simply returns a new error: Received unknown parameter: payment_method_data[card][network_token]. Did you mean networks?

I even took the raw request data from activemerchant and constructed a Postman request to confirm, this was the response:

{
    "error": {
        "code": "parameter_unknown",
        "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
        "message": "Received unknown parameter: payment_method_data[card][network_token]. Did you mean networks?",
        "param": "payment_method_data[card][network_token]",
        "request_log_url": "https://dashboard.stripe.com/test/logs/req_cQhsEh2jPqFN1D?t=1720104889",
        "type": "invalid_request_error"
    }
}

Has anyone successfully conducted an Apple Pay payment intent request with Stripe using activemerchant recently? Any advice or guidance is much appreciated!

rbonestell avatar Jul 04 '24 18:07 rbonestell