使用react-paypal-js托管字段发送帐单地址
有没有人曾经使用react-paypal-js托管字段的submit()功能发送过帐单地址?我正在这样做:
hostedFields
.submit({
// The full name as shown in the card and billing address
cardHolderName: cardHolderName,
billingAddress: billingAddress
})
问题是我实际上不确定它是否有效。没有真正的方法来验证帐单地址是否确实发送到贝宝,这导致我遇到如下处理错误:
"processor_response": {
"avs_code": "N",
"cvv_code": "M",
"response_code": "9500"
}
我在官方文档中找不到有关在字段提交期间发送帐单地址的任何内容。如果有人知道这件事请告诉我。如果不可能,我将不得不切换到原始 SDK。
Has anyone ever sent a billing address using the submit() functionality of the react-paypal-js hosted fields? I'm doing this:
hostedFields
.submit({
// The full name as shown in the card and billing address
cardHolderName: cardHolderName,
billingAddress: billingAddress
})
The problem is that I'm not actually sure that it's working. There's no real way to verify if the billing address is actually being sent to paypal, and its resulting in me getting processing errors such as this one:
"processor_response": {
"avs_code": "N",
"cvv_code": "M",
"response_code": "9500"
}
I couldn't find anything in the official docs about sending billing addresses during the field submission. If anyone knows anything about this let me know. If it's not possible, I will have to switch to the raw sdk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了进行故障排除,您应该将对象分配给一个变量,然后记录它:
该控制台输出是您应该在问题中包含的内容作为示例(实际数据是检查正确性的重要内容,而不是您的代码和变量名称用于创建对象)
这是一个有效的 HTML/JS(“原始 sdk”)示例,您可以使用它来检查相同的拒绝和 AVS:N 是否独立于
react-paypal-js
发生。尝试这样做将帮助您确定是否是该模块/其使用的问题,还是您的真实账户及其处理的问题。For troubleshooting purposes you should assign the object to a variable and then log it:
The console output of that is what you should include in your question as an example (the actual data is what's important to check for correctness, not your code and variable names used to create the object)
Here is a working HTML/JS ('raw sdk') sample you can use to check whether the same decline and AVS:N happens independently of
react-paypal-js
. Trying with this will help you isolate whether it's an issue with that module/its use, vs. with your live account and its processing.