Paypal recurring payment Fails

  • Posts: 58
  • Thank you received: 0
4 years 2 months ago #315640

-- HikaShop version -- : 4.2.2
-- HikaSerial version -- : 3.0.1
-- Joomla version -- : 3.9.15
-- Browser(s) name and version -- : 7.2.26

Hi,
I have setup hikaserial plan and hikashop product with subscription option. Under paypal recurring payment setting i have setup sandbox mode. When you purchase a product without renewal or normal product the plugin redirects to paypal checkout but when you purchase a product with auto renewal it redirects to paypal but throws error message "We're sorry, things don't appear to be working right now. Please try again later." on paypal page and if you inspect the page there is console error saying " Failed to load resource: the server responded with a status of 400 (Bad Request)"
on "/webapps/billing/api/billagmt/createBA". Any help please.

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 2 months ago #315684

Hi,

The Paypal recurring plugin is acting the same way than the HikaShop classical paypal plugin, but it will use some extra parameter and a different "cmd" for the subscription.
Regarding the URL, it's always : sandbox.paypal.com/cgi-bin/webscr
So I suppose that the browser is redirected to other pages and one of them generates the problem.
Now, when the plugin is configured with the "debug" mode, you do have debug data in the HikaShop payment log file.
There you will have some raw data of the content which is submitted to the Paypal platform, it allows to understand what is send and see if there is an issue. It always useful when you talk with the Paypal support team so you can tell them what is the data.

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: 58
  • Thank you received: 0
4 years 2 months ago #315691

Hi
By looking at paypal api developer.paypal.com/docs/api/subscriptions/v1/
it looks like payal recuring plugin should create billing plans and subscription for the order. And the log file that you suggested earlier does not show blling code or any other info related to billing. Am I missing something or this is the way it should be. I am happy to share cpanel access and backadmin access if you want to look at the settings or other info that might help you to solve the situation that i am facing.

Thank you

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 2 months ago #315721

Hello,

I'm sorry but the Payment recurring plugin is not using that API.
It uses the same API than the HikaShop Paypal plugin, but with the recurring parameters than the HikaShop plugin do not handle.

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: 58
  • Thank you received: 0
4 years 1 month ago #316025

Hi,
I looked at the log file and communicated with paypal. And the request plugin is passing has these values

[a3] => 20.00
[p3] => 0
[t3] => D
[src] => 1
[sra] => 0

According to paypal the p3 value must not be 0 as it is "Regular billing cycle. This is the length of the billing cycle. The number is modified by the regular billing cycle units (t3, below)".

I tried different subscription option on the product but still the value is 0. Any help!!!.

Thank you

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 1 month ago #316028

Hello,

If "p3" is 0, it means that your subscription has no duration. if "t3" is "D" it means that the configuration is "0 day(s)".
How did you configured your product ?

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: 58
  • Thank you received: 0
4 years 1 month ago #316064

The duration is set on the product on subscriptions option. Please review the attached image.

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 1 month ago #316087

Hello,

Thanks for the setting.
In the paypal recurring plugin, please replace :

$vars['p3'] = (int)$order->cart->paymentOptions['recurring']['duration'];
By
$vars['p3'] = (int)$recurring_data['duration'];
It should fix your issue.

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: 10
  • Thank you received: 0
  • Hikaserial Subscription Hikashop Business
3 years 11 months ago #319260

I have the same issue and it did not fix the issue.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
3 years 11 months ago #319264

Hello,

We need some details in order to understand your issue and be sure that you do have the exact same problem.
What HikaSubscription version number are you using ?
What is the content of your HikaShop payment log regarding the variables sent to Paypal ?

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.083 seconds
Powered by Kunena Forum