【发布时间】:2018-08-10 00:29:07
【问题描述】:
【问题讨论】:
标签: square-connect
【问题讨论】:
标签: square-connect
在测试 Square 时
这将解决上述问题。
【讨论】:
CreateCustomerCardRequest createCustomerCardRequest = new CreateCustomerCardRequest("sq0idp-HHRL8jUWmdUV7OsUhczXEw", billingAddress, "Demo Visa");
{"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Resource not found.","field":"card_nonce"}]}
您能否检查用于沙盒卡随机数创建的 App ID 是否与您用于沙盒 Charge 请求的匹配?沙盒应用 ID 应具有 sandbox- 前缀。
【讨论】:
Resource not found public 'category' => string 'INVALID_REQUEST_ERROR' (length=21) public 'code' => string 'NOT_FOUND' (length=9) public 'detail' => string 'Resource not found.' (length=19)public 'field' => string 'card_nonce' (length=10)
我认为这里的问题是card_nonce 属性。此属性必须从SqPaymentForm 生成,因为documentation 表示:
从 SqPaymentForm 生成的 nonce 代表卡 收费。向该端点提供随机数的应用程序必须是 使用 SqPaymentForm 生成随机数的同一应用程序。 否则,nonce 无效。
所以我建议使用 Square 建议的test cases,然后添加到您的平台。
【讨论】: