PayPal Advanced charges $0.00

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267996

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5

Hi,
I am setting up Hikashop based online store and have strange problem with PayPal Advanced plugin. It transfers customer name and address to the payment gateway, but the amount is always $0.00 (see attached image). I tried to activate debug, but the report file is not created. Payment log file location is set to media/com_hikashop/upload/safe/logs/report_526840422.log Both safe and logs folders are writable (777).
I am also using regular PayPal plugin for PayPal Express method and it works correctly.

Has anyone experienced this behavior ? What could be the problem ?

Thanks.
Best regards,
B.G.

Attachments:

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

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267997

Since debugger does not work, I temporarily added file_put_contents command to paypaladvanced.php file and saved the value of $postdata into a log file. I found that AMT in POST message is 0, that's why PayPal shows order amount 0.
Further debugging revealed that the value of $order->cart->order_full_price is empty string, which is the reason the following line returns 0
'AMT' => @ round($order->cart->order_full_price, (int)$this->currency->currency_locale),
The value of (int)$this->currency->currency_locale) in my case is 2.

Now the question is why $order->cart->order_full_price is empty?

Thanks.

Last edit: 7 years 7 months ago by lmcbmai.

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

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #268020

Found and fixed the bug. Instead of
'AMT' => @ round($order->cart->order_full_price, (int)$this->currency->currency_locale)
it should be
'AMT' => @ round($order->order_full_price, (int)$this->currency->currency_locale)

It is working correctly now :)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 7 months ago #268032

Hi,

Thank you for your feedback.

The problem follows HikaShop 3. The variable was provided by HikaShop 2.x but PayPal Advanced was the only payment plugin to use it. So no other payment plugin was affected, and it was only affected with the "checkout legacy" setting turned off.
I've added the patch on our end.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum