我只是想知道爲什麼我得到這個錯誤:InvalidRequest在ApiRequestor.php行108:沒有這樣的客戶:cus_9JHigF9SGUuVJQ
InvalidRequest in ApiRequestor.php line 108:
No such customer: cus_9JHigF9SGUuVJQ
在我的控制器
,這是我的代碼:
use Laravel\Cashier\Billable;
use Stripe\Stripe;
...
class BillingController extends Controller
{
use Billable;
public function postPayCharges(Request $request)
{
$account = \App\Account::find(Auth::user()->account->account_id);
$plan = \App\Plan::find($account->plan_id);
$ccToken = $request->input('stripeToken');
$user = \App\User::find(Auth::user()->user_id);
$user->newSubscription($plan->name, $plan->plan_id)->create($ccToken, [
'email' => $user->email,
]);
我確保我使用的條帶公鑰和祕密密鑰是有效的。 有什麼想法?
如果Stripe的API報告客戶ID未知,那麼您的API密鑰配置存在_some_問題。您應直接聯繫Stripe支持:https://support.stripe.com/email。 – Ywain