【发布时间】:2017-08-29 13:14:16
【问题描述】:
我正在使用 Stripe 构建一个相对简单的基于订阅的应用。
我目前唯一真正的挂断是订阅需要初始设置费,我真的很难接受。
示例:
新用户注册 Subscription-A;订阅 A 的每月间隔价格为 10 美元。注册后,新用户将被收取 1 美元和 10 美元的一次性订阅费用,然后接下来的几个月只收取 10 美元。
目前我的代码是:
// Stripe New customer
$customer = \Stripe\Customer::create(array(
"email" => $customer_email,
"source" => $token,
),
array("stripe_account" => $connected_account)
);
// Stripe Subscription
$sub = \Stripe\Subscription::create(array(
"customer" => $customer['id'],
"items" => array(
array(
"plan" => $plan_id,
),
),
),
array("stripe_account" => $connected_account)
);
有什么想法吗?谢谢
【问题讨论】:
-
您使用的是什么版本的条带?我不认识
array("stripe_account" => $connected_account)参数 -
@Wee 最后一个条纹版本
标签: php stripe-payments stripe-connect