Squareup 账户未启用卡处理异常

Squareup Account is not enabled for card processing exception

我有一个 squareup 开发者帐户,用于将 squareup 与我们的项目集成。当我尝试使用他们的付款表格处理费用时(我使用了他们 github 中托管的示例项目),我遇到了这个异常。

com.squareup.connect.ApiException: {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"CARD_PROCESSING_NOT_ENABLED","detail":"Account is not enabled for card processing, visit www.squareup.com/activate"}]}

我正在使用正方形 test cards

我可以使用除充电以外的所有API。既然我用的是开发者账号和测试卡,为什么还需要开通卡处理?而且我也没有找到启用它的方法。 Square 会为此收费吗? (该激活页面将我引导至包含美国相关字段(如社会安全号码)但我是亚洲人的注册表)

您必须在 Square 仪表板中通过 Square 的身份验证流程才能启用信用卡处理,然后才能通过 Square API 在生产中处理交易。如果您居住在美国、加拿大、澳大利亚、英国或日本以外的国家/地区,您将无法通过 Square 处理付款。

但是,您可以使用您的沙盒凭据通过 test cards using your sandbox credentials. You can find your sandbox credentials in your Developer Dashboard. The way to view sandbox transactions is to call the ListTransactions 端点测试支付以获得沙盒交易报告。