我正在使用https://github.com/jforrest/Chargify-PHP-Client中描述的 php chargify 连接器,我想更新订阅的 next_billing_at 参数。我试着这样做:
$requestArr = array('customer_id'=>"$thisCustomerID",'next_billing_at' => '2013-04-20T02:52:17-04:00');
try {
$connector->requestUpdateSubscription($thisSubscriptionID, json_encode($requestArr), $format = 'JSON');
} catch (ChargifyValidationException $cve) {
//process error handling code here.
echo $cve->getMessage();
}
但是,虽然没有验证例外,但当我随后检查下一个评估日期时,它没有改变:
$subscriptionUpdated = $connector->getSubscriptionsByID($thisSubscriptionID);
$newBillingDate = $subscriptionUpdated->next_assessment_at;
echo "new next billing date is $newBillingDate<br>";
我尝试将日期传递为“2013-04-20”,但这也不起作用。是否可以使用 API 更新 chargify 中的计费日期?