什么放在Laravel Stripe API CreditCardToken中

时间:2016-05-04 17:42:55

标签: laravel stripe-payments laravel-5.2

I have an error in my code can someone tell me what to put inside the creditcardtoken in stripe? This is my code dont know what to put inside $creditCardToken Variable. 


Route::get('/sandbox', function () {
    $user = new \App\User;
    $user = $user::find(1);
    $user->newSubscription('main', 'monthly')->create($creditCardToken);
});

接收错误是这个。

RequestOptions.php第77行中的Api: Stripe API方法调用的第二个参数是可选的每请求apiKey,它必须是字符串或每个请求选项,它们必须是数组。 (提示:您可以通过“Stripe :: setApiKey()”设置全局apiKey。

0 个答案:

没有答案