Offset Actual Recurr Subscription Start > End Date

  • PhoenixUK
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 1 month ago #95206 by PhoenixUK
Tuan,

I've run in to a little issue, whereby when a subscription is made and for e.g. my payment method is GoCardless Direct Debit (My preferred one for various reasons) then it takes 5 working days for GoCardless to call the payment from the client and this I need to factor for.

Therefore, I'm wondering if there is any way to in effect, offset the subscription record in it's current structure, by adding 5 days on to them.

This is because a client is likely going to complain / feel that they're losing out on 5 days of paid for service, when we cannot actually provision their service, until we have waited the 5 days for their payment to fully clear through the system. However, currently their subscription record 'From' date begins from the moment they first submit their subscription sign-up and not to my knowledge, from the date that payment marks the account as 'Active'.

I look forward to your thoughts, as always.

Regards,

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #95218 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Offset Actual Recurr Subscription Start > End Date
Hello Rob

That's the job of the custom payment plugin. Your developer will have to modify the code to change subscription end date and subscription to date when subscription is active

We actually handle it when subscription is approved by admin for offline payment. Tell your dev to look at the code of the file administrator/components/com_osmembership/mode/subscription.php, the code below show the logic we handle it:
Code:
if ($row->payment_method == 'os_offline' && $published == 0 && !$isNew) { // Need to re-calculate the start date and end date of this record $createdDate = JFactory::getDate($row->created_date); $fromDate = JFactory::getDate($row->from_date); $toDate = JFactory::getDate($row->to_date); $todayDate = JFactory::getDate('now'); $diff = $createdDate->diff($todayDate); $fromDate->add($diff); $toDate->add($diff); $row->from_date = $fromDate->toSql(); $row->to_date = $toDate->toSql(); $row->store(); }

Hope this give you alitle help

Tuan

Please Log in or Create an account to join the conversation.

  • PhoenixUK
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 1 month ago #95224 by PhoenixUK
Tuan,

Thanks for that clarification and when I finally find a suitable and trustworthy one (Still hasn't happened and I'm losing all hope to be fair) I will mention this and get them to make the tweaks as required, to end up with the subscription start date beginning from when the payment is cleared - this, will then mean the client see's that they are getting the full period of their service, not interrupted by X days whilst we wait for payment to clear etc.

Regards,

Please Log in or Create an account to join the conversation.