无法使用Braintree Payment Nonce创建订阅(Cannot create subscription using Braintree Payment Nonce)

编程入门 行业动态 更新时间:2024-10-27 10:23:00
无法使用Braintree Payment Nonce创建订阅(Cannot create subscription using Braintree Payment Nonce)

我正在使用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.

更多推荐

本文发布于:2023-07-26 18:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1279324.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Payment   Braintree   Nonce   subscription   create

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!