收到 API 条来自 Stripe 的资金不足响应
Catching API response for insufficient funds from Stripe
如果我通过 Stripe API 创建一个 Charge 对象并且卡有效,但扣款被拒绝,这会导致什么错误?看起来不可能在测试沙箱中模拟此错误,我希望能够捕获它(并在测试中模拟它),但文档在这一点上并不清楚。
这将触发拒绝扣款,即 card_error
并且可以使用此卡号触发:4000000000000002: Charge will be declined with a card_declined code.
如果我通过 Stripe API 创建一个 Charge 对象并且卡有效,但扣款被拒绝,这会导致什么错误?看起来不可能在测试沙箱中模拟此错误,我希望能够捕获它(并在测试中模拟它),但文档在这一点上并不清楚。
这将触发拒绝扣款,即 card_error
并且可以使用此卡号触发:4000000000000002: Charge will be declined with a card_declined code.