这是我收到错误的 strip 代码
The provided key does not have access to account in stripe
\Stripe\Stripe::setApiKey('sk_test_...');
$fees=($request->amount*10)/100;
$fees=$fees*100;
$withfee = \Stripe\Charge::create(
array(
"amount" => 10000,//1000, //$amount amount in cents
"currency" => "usd",
"source" => "tok_1BGovzDnnXvdHsSaayDkULRU",//'tok_18L6hjL6useUrEYbtObKz15s',
//$token
"description" => "Example charge",//"Example charge", //$title
"application_fee" => 1000 // amount in cents //$fees
),
array("stripe_account" => "cus_Be21HSwLO1XMhF" ) // $acc_token
);
最佳答案
您正在 "cus_..."
中传递客户 ID ( stripe_account
) field 。
当processing a charge with Connect ,您需要提供代表您处理费用的帐户的 ID ( "acct_..."
)。 Customers是支付来源(即提供资金),而 accounts是付款目的地(即他们收到资金)。
关于stripe-payments - 提供的 key 无权访问 strip 中的帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46946415/