PayPal issue with eCheques

  • Posts: 524
  • Thank you received: 9
8 months 1 week ago #361821

-- HikaShop version -- : 5.1.0
-- Joomla version -- : 4.4.5
-- PHP version -- : 8
-- Browser(s) name and version -- : Fire fox

Hi,
I have an issue with your system when being payed via eCheque through PayPal, it changes the order status to 'Payment Recieved' when it should change it to 'created' until the payment has been released!?

This has previously cost me a lot of money when we have been unable to recover the money as the payment was declined!! I did think this was a one off but its happended again!!

I have spoken to PayPal as I thought it was thier issue but they inform me its an issue with your software?

Correct procedure should be: payed with eCheque: order goes onto created: eCheque cleared: order status Payment Recieved.

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

  • Posts: 83400
  • Thank you received: 13492
  • MODERATOR
8 months 1 week ago #361824

Hi,

That's indeed how it should be. I looked into it and I think I know what's going on.
However, I'm not able to test this as it's apparently not possible to test echecks with the sandbox PayPal provides to developers.
So I'm not sure if what I think should be done will work, nor if it's actually a configuration issue, not a code issue.
So I propose to do 2 things:
- Change the code:

if($response->result->intent == 'AUTHORIZE' && $response->result->status == 'APPROVED') {
to:
if($response->result->intent == 'AUTHORIZE' && in_array($response->result->status, array('APPROVED', 'COMPLETED'))) {
in the file plugins/hikashoppayment/paypalcheckout/paypalcheckout.php
- Turn on the "debug" setting of the payment method.
That way, if the change helps, then, it's problem solved. If it doesn't, please provide what you get in the "payment log file" of the HikaShop configuration. That should give us enough information to understand what's going on.

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

  • Posts: 524
  • Thank you received: 9
8 months 1 week ago #361843

Hi, I cannot find this line of code in the file? 5.0.4

if($response->result->intent == 'AUTHORIZE' && $response->result->status == 'APPROVED') {

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

  • Posts: 83400
  • Thank you received: 13492
  • MODERATOR
8 months 1 week ago #361848

Hi,

Oh, you're on the 5.0.4 ? Then, that changes everything. You said 5.1.0 in your first message, so I based my reasoning on this.
If you have the 5.0.4, then the first thing would be to update HikaShop to the 5.1.0. We've made major improvements to the PayPal Checkout plugin as well as many fixes with the 5.1.0. Just updating might help fix the problem. And if not, you'll be able to make the modification I was talking about.

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

  • Posts: 524
  • Thank you received: 9
8 months 1 week ago #361863

Hi, Updated so will see how it goes now.

Rgds

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

  • Posts: 524
  • Thank you received: 9
1 week 2 days ago #366005

Hi, Back to this issue.

Yesterday we have another order, paid with PayPal echeque.

This has again come through with the order status chaged to 'Payment Recieved' ??

Can you investigate please as this never used to happen??

Rgds

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

  • Posts: 83400
  • Thank you received: 13492
  • MODERATOR
1 week 1 day ago #366018

Hi,

Please follow my previous instructions in this message:
www.hikashop.com/forum/payment-methods/9...echeques.html#361824
The code modification might help, and if not, please provide the payment log file after a payment which didn't process properly so that we can look into it.

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

  • Posts: 524
  • Thank you received: 9
1 week 1 day ago #366021

Hi, As I am on 5.1.5 the mods you said you made above have obviously not worked. Echeques are a very rare payment method but, orders have been sent out due to the 'payment recieved' notification and they they were refused by PayPal meaning we lose money.

Where would I find the payment log file?

Rgds

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

  • Posts: 83400
  • Thank you received: 13492
  • MODERATOR
1 week 1 day ago #366023

Hi,

What do you mean by "As I am on 5.1.5 the mods you said you made above have obviously not worked." ?
The modification I proposed have not been added to HikaShop on our end since you didn't provide any feedback on them yet and no one else reported the issue.
So reproducing the issue after updating to 5.1.5 doesn't say anything about whether the modification is helpful or not.

The payment log file can be found in the HikaShop configuration, as I already said:
www.hikashop.com/support/documentation/5...nfig.html#main_files

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

  • Posts: 524
  • Thank you received: 9
1 week 1 day ago #366029

Hi, As the mod was made when you suggested it, after updating to 5.1.0, it either does not save on a new update of Hikashop or it did not work??

Which is it?

Rgds

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

  • Posts: 524
  • Thank you received: 9
1 week 1 day ago #366030

Log file for the order, I have x'd sensitive info.

The changes you asked me to do are still in the plugin file.



*******************
MORDERATOR
*******************

Please, next time, for the sake of readability of the forum for everyone, provide us with these
elements via a file.

Plus, we have saved on our side your log file as it contain some secrets references.

Last edit: 1 week 1 day ago by Philip.

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

  • Posts: 83400
  • Thank you received: 13492
  • MODERATOR
1 week 20 hours ago #366040

Hi,

Thanks for the log. That's exactly what I needed.
Thanks to it, I was able to dig into the issue. I found that the PayPal documentation recommends checking for another variable on top of the main status parameter, and that this other variable is not documented in their API. But with your log, I think the change I've made should allow the plugin to properly handle these situations.
I've added the patch to HikaShop on our end. Download again the install package of the latest version of HikaShop on our website and install it on your website and you'll get the patch.
With it, the plugin will change the order status to the "pending status" configured in the payment method when receiving a completed payment notification for an echeck with the capture status pending.

The following user(s) said Thank You: mohairbears

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

Time to create page: 0.051 seconds
Powered by Kunena Forum
loading