我正在使用 authorize.net 进行月度订阅计划,试用期使用客户资料 API。参考: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 中传递试用间隔?请帮我解决这个问题。提前致谢。