首先,我从这个URL开始工作 https://docs.stripe.com/payments/save-and-reuse 我看了页面上的视频.在视频中,点击设置按钮后.Stripe UI出现.我从来没有得到这个屏幕,我已经try 了不同的浏览器. 客户创建.事件日志(log)显示.
A new SetupIntent seti_1Ol4kvGznLM7Qekn5jObbbLm was created
日志(log)屏幕显示200 OK POST/v1/Checkout/SESSIONS.但用户界面从来没有出现过.我遗漏了什么?
require_once "vendor/autoload.php";
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
$stripe = new \Stripe\StripeClient('sk_test_51J5VXM');
$customer = $stripe->customers->create([
'description' => 'HealthScribe Client',
'email' => 'longmare@abc.com',
'name' => 'Jenny Rosen2',
]);
$stripe->checkout->sessions->create([
'mode' => 'setup',
'payment_method_types' => ['card'],
'success_url' => 'https://api.affordablecustomehr.com/stripe/success/?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => 'https://api.affordablecustomehr.com/stripe/cancel',
'customer' => $customer['id']
]);