I installed a PHP script in cron that binds Braintree through an API to see the status of each subscription we have in the file. Then we update our local records based on customer subscription status. Since I can manually unsubscribe from the Braintree dashboard, I was able to verify that my script can detect canceled subscriptions.
However, I cannot find a way to check past status, except to wait for the billing cycle to begin. Since the minimum billing cycle length in Braintree is one month, it makes it very difficult to debug my script.
I know that in theory I should just see a different line for the subscription status, but I'm looking for a reproducible way to mimic the past status, as well as the positive balance and value for daysPastDue.
Can anyone help?
$BT_subscription = Braintree_Subscription::find($BT_subscription_id); if ($BT_subscription && $BT_subscription instanceof Braintree_Subscription) { if ($BT_subscription->status == 'Past Due' && $BT_subscription->balance > 0) {
source share