简体   繁体   English

Braintree为ApplePay返回“ 91569 paymentMethodNonce不包含有效的付款方式类型”的原因-为什么?

[英]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. 在此过程中,我的设置发生了一些变化,并且Braintree出现了付款问题。

I have an iOS client that accepts PayPal, Credit Card, and ApplePay and connects to my server via PHP as needed. 我有一个iOS客户端,可以接受PayPal,信用卡和ApplePay,并根据需要通过PHP连接到我的服务器。 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. 现在,PayPal和信用卡在生产中仍然可以正常工作,但是ApplePay不再起作用。

When I pass a nonce up to the payments.php with payment_method_nonce= when using ApplePay, I am getting the following error returned: 当我在使用ApplePay时使用Payment_method_nonce =将现时数传递给payments.php时,返回以下错误:

[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. 我知道一个事实,问题不在iOS代码中,因为它已经存在了很长时间,并且运行良好。 I'm using a valid real credit card in Apple Wallet on a normal production iPhone device. 我在正常生产的iPhone设备上的Apple Wallet中使用了有效的真实信用卡。 I have noticed since the server migration I've gotten zero ApplePay sales because of this issue. 自从服务器迁移以来,我已经注意到由于这个问题,ApplePay的销售额为零。

This error started happening when I migrated the server and so there must be some configuration error on the PHP side in some way. 当我迁移服务器时,此错误开始发生,因此PHP端必须以某种方式出现一些配置错误。 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. 我已经使用composer.phar完成了安装,并且只是从其他服务器上复制了我的payments.php页面,因此我可以说的任何内容都没有变化。

Ideas? 有想法吗? Why wouldn't an ApplePay payment nonce "not contain a valid payment instrument type"? 为什么ApplePay付款随机数不会“不包含有效的付款方式类型”? Obviously any ApplePay transaction would include a valid payment type (such as Visa)... so what is going on? 显然,任何ApplePay交易都将包含有效的付款类型(例如Visa)...那么怎么回事?

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. 两台服务器之间的一个主要变化是旧服务器是PHP 5.4,新服务器是5.6。 I also have all the web files (including payments.php) on a D: drive rather than a C: drive now. 我现在还将所有Web文件(包括payments.php)放在D:驱动器上,而不是C:驱动器上。

Full disclosure: I work at Braintree. 全面披露:我在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. 还可能需要调查您的客户端从Braintree收到的随机数是否与您的服务器从您的客户端收到的随机数相同-如果您的服务器收到的是nil或默认随机数,则可能说明无效的随机数错误。

Lastly, double check that Apple Pay is still enabled in your gateway . 最后,仔细检查您的网关中是否仍启用 Apple Pay。 There is a certification process associated with AP functionality, which a server migration may or may not interrupt. 有与AP功能相关的认证过程,服务器迁移可能会中断也可能不会中断。

As this is an issue in production, I would absolutely recommend reaching out to Braintree support regardless of the outcome of your troubleshooting. 由于这是生产中的问题,因此无论您进行故障排除的结果如何,我都绝对建议与Braintree取得联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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