我正在使用Braintree Payment Nonce创建定期订阅请求。 下面的代码是我必须创建一个订阅。 我正在使用从客户收到的付款随机数。 但订阅请求失败,并显示消息“Payment method nonce is invalid。”。
任何帮助/指针将不胜感激。
SubscriptionRequest request = new SubscriptionRequest() .paymentMethodNonce(customer.getPaymentNonce()) .planId(customer.getPlan().getBraintreePlanId()); Result<Subscription> result = getGateway().subscription().create(request);I am using a Braintree Payment Nonce to create a recurring subscription request. The below code is what I have to create a subscription. I'm using Payment Nonce which is received from Client. But the subscription request fails with a message "Payment method nonce is invalid."
Any help/pointers would be much appreciated.
SubscriptionRequest request = new SubscriptionRequest() .paymentMethodNonce(customer.getPaymentNonce()) .planId(customer.getPlan().getBraintreePlanId()); Result<Subscription> result = getGateway().subscription().create(request);最满意答案
我在布伦特里工作。 如果您有更多问题,我建议您联系我们的支持团队 。
不幸的是, "Payment method nonce is invalid"验证错误目前没有记录; 应该尽快解决。
此错误意味着无法找到临时数,因为它不存在,被锁定,已被使用,未指向拱形卡等。在您的示例中, customer.getPaymentNonce()可能未返回有效支付方法随机数。 确保它是用一个客户ID创建的,并且是拱形的,并且你不会尝试多次使用同一个随机数。
I work at Braintree. I'd suggest you reach out to our support team if you have more questions.
Unfortunately the "Payment method nonce is invalid" validation error is currently undocumented; that should be fixed soon.
This error means that the nonce couldn't be found, due it not existing, being locked, being already used, not pointing to a vaulted card, etc. In your example, customer.getPaymentNonce() likely isn't returning a valid payment method nonce. Make sure it was created with a customer ID and vaulted, and that you're not trying to use the same nonce more than once.
更多推荐
发布评论