【发布时间】:2017-05-05 08:30:48
【问题描述】:
我想了解有关 Stripe 的一些说明和帮助。
基本上,我有以下几点:
//get the card token from the stripe request
$customerTok = request('stripeToken');
//create the customer with this token
$customer = \Stripe\Customer::create(array(
"email" => \Auth::user()->email,
"source" => $customerTok,
));
customerTok 是 Stripe.js 传递的银行令牌(输入他们的卡号、cvc 和 exp 日期),我正在我的 Stripe Dashboard 中创建客户。
$cardTok = \Stripe\Token::create(array(
"card"=>$customer->sources->retrieve(default_source),
));`
然后我为他们的卡片拿一个代币? (我认为这是错误的,但这是原则?)
我现在需要将它们变成一个连接管理帐户(我需要用户能够相互支付,例如 eBay)
$account = \Stripe\Account::create(
array(
"country" => "GB",
"managed" => true,
"external_account"=>$customer->id,
));
显然,这不是生产就绪代码,我只是想了解流程,如果我理解正确的话.. 谁能解释为什么现在这不起作用以及我哪里出错了?
谢谢,
【问题讨论】:
标签: php laravel stripe-payments stripe-connect