我正在使用TEST marketplace为信用卡添加一个新帐户。即使每次为我的信用卡生成一个新的uri,我用它来创建新帐户,我得到这个错误…
Account creation Request failed with response code 409. Reason: {
"status": "Conflict",
"category_code": "card-already-funding-src",
"additional": null,
"status_code": 409,
"category_type": "logical",
"extras": {},
"request_id": "OHMaae31e38b88d11e2b762026ba7d31e6f",
"description": "Card has already been associated with an account. Your request id is OHMaae31e38b88d11e2b762026ba7d31e
6f."
}
我还可以在仪表板上看到,尽管出现了错误,但在我的测试市场中已经创建了一个新帐户。另一个问题也提到了同样的错误,但给定的解决方案并不适用于我的情况。删除卡片或重新分配给新帐户
经过多次试验,我找到了问题所在。平衡处理教程中"创建帐户"下给出的以下示例请求由于某些原因不起作用,至少它在TEST市场中不起作用。
curl https://api.balancedpayments.com/v1/marketplaces/TEST-MPiuxfzhprKGoIc4yZ0OuNQ/accounts
-u 099e55e07f7311e2b923026ba7c1aba6:
-d "card_uri=/v1/marketplaces/TEST-MPiuxfzhprKGoIc4yZ0OuNQ/cards/CC4R7KXv0jiDTxo5W6Gg5PnM"
解决方案:如果你跳过"card_uri",它可以工作。创建帐户后,您必须在单独的PUT请求中将帐户与卡片关联起来。
根据你的跟进,我可以告诉你发生了什么:
您从文档中复制并粘贴了一个示例,并且该示例已经运行过。第二次运行它会得到409,因为该卡已经关联到该帐户。
您需要做的是再次标记卡片,然后将为卡片生成的新uri添加到您的帐户。
。
curl https://api.balancedpayments.com/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ/cards
-u da3da6de7c9311e288c9026ba7f8ec28:
-d "expiration_month=12"
-d "security_code=123"
-d "card_number=5105105105105100"
-d "expiration_year=2020"
然后获取创建的uri并执行
curl https://api.balancedpayments.com/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ/accounts
-u da3da6de7c9311e288c9026ba7f8ec28:
-d card_uri="URI_OF_NEW_CARD"
用实际的新URI替换URI_OF_NEW_CARD