How recurring plugins work

  • Posts: 412
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 months 2 weeks ago #363665

-- HikaShop version -- : 5.1.0
-- HikaSerial version -- : 5.0.0
-- Joomla version -- : 5.1.4
-- PHP version -- : 8.1.x

Hi,
I have the hikasubscription made a plan and product for it. Put the product on create and renewal after 1 day. Als rewrote mollie plugin for recurring payments, but nothing happens and i only can renew manualy via customer subscription page. Also i missing tutorial for one part in your documentation.


Can you help me how to set the renewal correctly on recurring?

Yours,
Mark

Attachments:

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
2 months 2 weeks ago #363678

Hello,

In the "Paypal recurring" plugin, you will find three functions : "init", "activateAutoRenew" and "cancelAutoRenew".
The "init" allows to check if HikaSerial is installed or not.
The two other functions are there to mark the subscription as handled by a recurring plugin.

Regarding the "upgrade mode" setting ; it is a feature request to be able to have different ways to process the expiration time during "upgrades".
CF : www.hikashop.com/forum/14-hikaserial/904...question.html#343170


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 412
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 months 2 weeks ago #363691

Hi,
Thanks for the directions to make the mollie plugin recurring, but in the subscription options i see: SUBSCRIPTION_UPGRADE-MODE-DIFF and SUBSCRIPTION_UPGRADE-MODE_EXTEND what does it mean? i think it is a language string failure.

Regards,
Mark

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
2 months 2 weeks ago #363699

Hello,

Yes, the translations are missing ; I will check these.
The "mode diff" is a "differential mode", where the the end date become the maximum between the current expiration date and the "current date + upgrade duration".
The "mode extend" is the "extension mode", where the end date is being increment by the "upgrade duration".

An example.
You have an upgrade with a duration of "1 year".
If a customer A buy the upgrade and its subscription ends in one month.
- In diff mode : the new expiration date will be in one year.
- In extend mode : the new expiration date will be in one year and one month.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 412
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 months 2 weeks ago #363714

Thanks for telling what the the upgrade mode does. Super..
As you know i am busy rewriting the mollie plugin for recurring payments, as far as i see in mollie webhook and mandates are going correctly, however, after coding the activateAutoRenew" and "cancelAutoRenew" and init, as you explained earlier in my code, the subscription will not renew, can you help or guide me where i go wrong?
Here my code as far i completed it.
Hope you can help :)
Regards,
Mark

Last edit: 2 months 2 weeks ago by Jerome. Reason: removing plugin code

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
2 months 2 weeks ago #363719

Hello,

Please do not share full content of plugin files.
I cleaned your post for this time...

Copying the function is the first part ; you also need to call these function to activate the auto renew and cancel it..
Please look further in the Paypal recurring plugin to see where and when these functions are called.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 412
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 months 2 weeks ago #363727

Sorrie for the whole code, won't happen again, i was not aware of that..
Look like i found the trigger for the recurring.. thanks for guiding where to look..
Hopefully i have managed to implemnet it correctly.. Keep you posted.

Regards,
Mark

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
2 months 2 weeks ago #363730

Hello,

Happy to know that you have the triggers working !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 412
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 months 3 hours ago #363999

Hi Jerome,
Just a little question, When recurring is set, is the original order of the subscription then renewed? or does it work like the manual setting to extend the subscription. Manualy i see that the system is making a new order for the subscription.
Like to know this so i can fine tune the plugin with the recurring option.

Hope you understand my question and love to hear from you how it is set.

Regards,
Mark

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
1 month 4 weeks ago #364012

Hello,

A renewal is a payment of the sum for the subscription.
The original order is used as the reference and a new order is created with the recurring content.
Regarding HikaShop side, the payment plugin need to know during the notification (or hook/etc) if it's to confirm the original order or if it's related to a renewal ; then it needs to know if i calls "createRecurringSuborder" to get a new order_id for the final call on "modifyOrder".

Please check the Paypal recurring code for example.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.085 seconds
Powered by Kunena Forum