【问题标题】:How can we apply future recurring payment in stripe payment gateway in php我们如何在 php 中的条带支付网关中应用未来的定期支付
【发布时间】:2018-06-09 11:48:49
【问题描述】:

我正在订阅,我想从将来的日期开始订阅,我为此做了代码,但我不确定它是否正确,这里我添加了我的代码,任何人都可以看看这个代码和告诉我我是否正确,或者您也可以对此发表看法,这是我的订阅代码。

$customer = \Stripe\Customer::create(array(
    'source' => $token,
    'description'=> 'Test Customer',
    'email' => 'NIKULTAKA@GMAIL.com',
    'plan' => $plan_id,
));
// Charge the order:
$dateTime = new DateTime('2018-07-10');
$date_timestamp = $dateTime->format('U');
$charge = \Stripe\Subscription::create(array(
    'customer' => $customer->id,
    "items" => array(
        array(
            "plan" => $plan_id,
        ),
    ),
    "billing_cycle_anchor"=> $date_timestamp
));

【问题讨论】:

    标签: php stripe-payments payment-gateway stripe-connect


    【解决方案1】:

    我不确定你的代码,但我可以给你一些提示。

    实施定期付款可能比您预期的更难。

    您可以使用其他支付网关,recurly 可以让您的生活更轻松。在这里你可以看到client api in PHP for recurly

    【讨论】:

      猜你喜欢
      • 2016-06-16
      • 2015-12-26
      • 2012-09-05
      • 2015-05-24
      • 2016-06-13
      • 2020-02-01
      • 2013-03-16
      • 1970-01-01
      • 2015-01-21
      相关资源
      最近更新 更多