我想知道当订阅的某个下拉选项是免费计划时,是否有可能无法获取信用卡信息。条纹订阅
所以基本上我有两个计划。首先是基本计划,并且是免费的。第二个是保费计划,花费20美元。当有人选择保费计划时,我们会记录他们的信用卡信息。
现在,如果有人选择了免费计划,是有可能隐藏信用卡输入字段时,有人选择了基础?条纹会执行吗?条纹上有这样的选项吗?
谢谢,
我想知道当订阅的某个下拉选项是免费计划时,是否有可能无法获取信用卡信息。条纹订阅
所以基本上我有两个计划。首先是基本计划,并且是免费的。第二个是保费计划,花费20美元。当有人选择保费计划时,我们会记录他们的信用卡信息。
现在,如果有人选择了免费计划,是有可能隐藏信用卡输入字段时,有人选择了基础?条纹会执行吗?条纹上有这样的选项吗?
谢谢,
条纹免费订阅不需要卡。您的应用程序需要识别其免费计划并且不需要信用卡
是的,如果这是免费的订阅,您可以隐藏信用卡选项。
如果您正在使用stripe.js那么你可以简单地dissable根据您的订阅计划的形式。
是您可以根据您的订阅计划去做。 您可以创建免费和专业计划(付费),并将其纳入您的下拉列表。 当用户选择自由的计划隐藏您的付款信息捕捉部位和走得更远。
耶这是可能的, 尝试使用此示例:
1:首先创建计划(在平面图我们可以通过量0为自由订阅)
2:创建客户
3 :创建订阅
public function createPlan($data)
{
$plan=\Stripe\Plan::create(array(
"amount" => $data['Amount'],
"interval" => $data['Interval'],
"name" => $data['planName'],
"currency" => "usd",
"id" => $data['planName'])
);
}
/*
* createcustomer function used to create customer for implementing recurring transactions rather asking again and again card details
*/
public function createCustomer($data,$token=null)
{
$customer=\Stripe\Customer::create(array(
"email"=>$data['email'],
"description" => $data['name'],
"source" => $token // obtained with Stripe.js
));
$this->subscribe($customer,$data);
}
public function subscribe($customer,$data)
{
$subsc=\Stripe\Subscription::create(array(
"customer" => $customer->id,
"plan" => $data['planName']
));
\Stripe\Subscription::create(array(
"customer" => customer['id'],
"plan" => "home-delivery",
));
}