顧客プロファイル API を使用して、試用期間付きの月額サブスクリプション プランに authorize.net を使用しています。参考:https ://developer.authorize.net/api/reference/#recurring-billing-create-a-subscription-from-customer-profile サブスクリプションのお試し期間の間隔を設定したい。api で、試用期間の間隔に関する情報を取得できませんでした。シナリオ: 2019 年 1 月 1 日にサブスクライブすると、ユーザーは 7 日間の最初の試用期間を取得します。したがって、トライアルの終了日は 2019 年 8 月 1 日で、金額は 0 である必要があります。実際のサブスクリプションの終了日は 2019 年 8 月 2 日 (試用期間後の 1 か月間) で、サブスクリプションの金額は 100 である必要があります。
$subscription = new AnetAPI\ARBSubscriptionType();
$subscription->setName("Sample Subscription");
$interval = new AnetAPI\PaymentScheduleType\IntervalAType();
$interval->setLength('30');
$interval->setUnit("days");
$paymentSchedule = new AnetAPI\PaymentScheduleType();
$paymentSchedule->setInterval($interval);
$paymentSchedule->setStartDate(new DateTime('2019-01-01'));
$paymentSchedule->setTotalOccurrences("9999");
$paymentSchedule->setTrialOccurrences("1");
$subscription->setPaymentSchedule($paymentSchedule);
$subscription->setAmount(100);
$subscription->setTrialAmount("0.00");
authorize.net で試行間隔を渡すには、どのパラメーターを使用しますか? これで私を助けてください。前もって感謝します。