有什么方法可以立即在测试模式下向Stripe帐户添加余额以进行API集成测试?
答案 0 :(得分:1)
条带允许向“余额”收费以紧急测试帐户,以便开发人员可以测试条带集成
$stripe = new \Stripe\StripeClient('Your_Test_SK');
$stripe->charges->create([
'amount' => 2000,
'currency' => 'usd',
'source' => 'tok_bypassPending',
'description' => 'My First Test Charge (created for API docs)',
]);
紧急使用tok_bypassPending
作为source
费用测试帐户余额的值
API文档: https://stripe.com/docs/api/charges/create
测试令牌文档: https://stripe.com/docs/testing?lang=php#cards-responses
移至“令牌”标签,首先是该令牌
令牌文档截屏: https://i.stack.imgur.com/55otJ.png