简体   繁体   中英

Braintree returning “91569 paymentMethodNonce does not contain a valid payment instrument type” for ApplePay - Why?

I recently migrated my server and all of it's files to a new machine. In the process, something has changed with my setup and I'm having some payment issues with Braintree.

I have an iOS client that accepts PayPal, Credit Card, and ApplePay and connects to my server via PHP as needed. It's been working perfectly fine before server the migration. Now, PayPal and Credit Card still works fine in production, but ApplePay no longer works.

When I pass a nonce up to the payments.php with payment_method_nonce= when using ApplePay, I am getting the following error returned:

[0] => Braintree\Error\Validation Object
        (
            [_attribute:Braintree\Error\Validation:private] => paymentMethodNonce
            [_code:Braintree\Error\Validation:private] => 91569
            [_message:Braintree\Error\Validation:private] => paymentMethodNonce does not contain a valid payment instrument type.
        )

I know for a fact the issue isn't in the iOS code, because it's been live for quite a while now and has been working just fine. I'm using a valid real credit card in Apple Wallet on a normal production iPhone device. I have noticed since the server migration I've gotten zero ApplePay sales because of this issue.

This error started happening when I migrated the server and so there must be some configuration error on the PHP side in some way. I've done the install with composer.phar and just copied over my payments.php page from my other server, so there are no changes to anything that I can tell.

Ideas? Why wouldn't an ApplePay payment nonce "not contain a valid payment instrument type"? Obviously any ApplePay transaction would include a valid payment type (such as Visa)... so what is going on?

The one major change between the two servers was the old one was on PHP 5.4 and the new one is on 5.6. I also have all the web files (including payments.php) on a D: drive rather than a C: drive now.

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support .

Do you have a sandbox environment configured? If so, and if your sandbox has the same issue, you might try short circuting your server to execute transactions against a fake-apple-pay-visa-nonce rather than the nonce you receive from your client to help isolate the issue to client-server interaction rather than the server-Braintree interaction.

It might also be worth investigating whether the nonce your client receives from Braintree is the same as the nonce your server receives from your client - if your server is receiving a nil or default nonce, that might explain an invalid nonce error.

Lastly, double check that Apple Pay is still enabled in your gateway . There is a certification process associated with AP functionality, which a server migration may or may not interrupt.

As this is an issue in production, I would absolutely recommend reaching out to Braintree support regardless of the outcome of your troubleshooting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM