gpt4 book ai didi

php - Stripe Payouts 作为托管模拟

转载 作者:行者123 更新时间:2023-12-02 01:07:16 25 4
gpt4 key购买 nike

我正在尝试使用 Stripe Payouts 模拟托管系统。实际上,Stripe 现在没有托管,但在 this Q/A article我收到了在这种情况下使用 Payouts 的建议。
官方文档涵盖的支付不太好。我发现的最好的是 here .
这个想法是将付款发送到用户的卡上。
我正在使用 Angular 4 和 Symfony Framework 3.2 构建 Web 应用程序。这部分是服务端执行的,所以PHP代码如下:

public function payToCardAction()
{
$apiKey = $this->getParameter('stripe_secret');
Stripe::setApiKey($apiKey);

try{
Payout::create(
array(
'amount' => 400,
'currency' => 'gbp',
'description' => 'Example payment',
'source_type' => 'card',
'destination' => preg_replace('/\s+/', '','4242 4242 4242 4242')
)
);
}
catch (Card $e){
return new JsonResponse(
array(
'status' => 400,
'message'=> 'Bad request'
)
);
}
return new JsonResponse(
array(
'status' => 200,
'message' => 'Success'
)
);
}

我使用测试卡 (4242 4242 4242 4242) 向那里发送一些测试钱,但收到以下错误:
No such external account: 4242424242424242

文档中的错误引用对我没有帮助。我该如何解决这个问题?

最佳答案

您需要使用 Stripe Connect代表第三方接受付款并将付款发送到他们的银行账户(或借记卡,在美国)。

我建议您通过 https://support.stripe.com/email 联系 Stripe 的支持人员。解释您的商业模式和所需的资金流向。他们将帮助您确保您的模型得到支持,并就您应该使用哪些 API 提出建议。

关于php - Stripe Payouts 作为托管模拟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47006971/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com