成功订阅 Stripe 后获取信用卡的最后 4 位数字
Get last 4 digits of credit card after successful Stripe subscription
出于合规性原因,我在客户端生成令牌并将这些详细信息发送到条带。我想在我的确认页面
上显示最后四位数字和卡片类型
我正在创建客户
// Create a Customer:
$customer = \Stripe\Customer::create([
'source' => $token,
'email' => $current_user->user_email,
]);
比将它们添加到订阅
//create the subscription for the customer
$subscription = \Stripe\Subscription::create(array(
'customer' => $customer->id,
"items" => array(
array(
"plan" => "dpc-standard",
),
)
));
订阅 returns https://stripe.com/docs/api#subscription_object
大量数据,包括为订阅生成的 invoice_id 但不 return 任何 CC 详细信息
出于合规性原因,我在客户端生成令牌并将这些详细信息发送到条带。我想在我的确认页面
上显示最后四位数字和卡片类型我正在创建客户
// Create a Customer:
$customer = \Stripe\Customer::create([
'source' => $token,
'email' => $current_user->user_email,
]);
比将它们添加到订阅
//create the subscription for the customer
$subscription = \Stripe\Subscription::create(array(
'customer' => $customer->id,
"items" => array(
array(
"plan" => "dpc-standard",
),
)
));
订阅 returns https://stripe.com/docs/api#subscription_object 大量数据,包括为订阅生成的 invoice_id 但不 return 任何 CC 详细信息