Can refunds automatically change the order status?

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279245

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.5.38

Hi,

When a Paypal refund is processed, I get the email:

"Hello,
A Paypal notification was received with the status Refunded. The order status was not changed"


Is there anyway of making the order status change to "refunded"?

Thank you.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 6 months ago #279246

Hi,

In your payment mehtod, you can change the "Invalid status" setting to "refunded" and that should do it.

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

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279319

Hi Nicolas,

Thanks for your reply. I changed the "invalid status" to "refunded". I still get the same email:

"Hello,
A Paypal notification was received with the status Refunded. The order status was not changed

Check the documentation concerning this issue at www.hikashop.com/index.php?option=com_up...-paypal-error#status "

The order status within Hikashop is still unchanged.

Is there something else?

Thank you.

Last edit: 6 years 6 months ago by joshualdouglas.

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

  • Posts: 12953
  • Thank you received: 1778
6 years 6 months ago #279325

Hello,

Can you also check that you have correctly set the "Allow payment notifications from PayPal" option of your PayPal configuration page to Yes ?

Thank you.

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

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279431

Hi Mohamed,

Yes, "Allow payment notifications from PayPal" is set to Yes.

Thanks,
Josh.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 6 months ago #279602

Hi,

Sorry, I checked the code and I was wrong. The status won't change when a refund notification is received. It has to be done manually.
Allowing that woul require the modification of the PayPal plugin file plugins/hikashoppayment/paypal/paypal.php, replacing the code:

$this->modifyOrder($action, null, $history, $email);
by such code:
if(preg_match('#Refunded#i', $vars['payment_status'])) $this->modifyOrder($order_id, 'refunded', $history, $email);
else $this->modifyOrder($action, null, $history, $email);

The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279673

Hi Nicolas,

Thanks for this! I will try this on my dev server later this week.

Is this problem amended with the latest version of Hikashop?

Thanks,
Josh.

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

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279701

Hello,

Thank you! I have this working. Where can I locate the email

Hello,
A Paypal notification was received with the status Refunded. The order status was not changed


I would like to change

The order status was not changed


Thanks,
Josh.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 6 months ago #279680

Hi,

1. No. It's not a problem. It's done on purpose so as to not automatically cancel orders on your website, giving you the time to check that the payment notification is legit and you want to really change the status.

2. You can use a translation override in order to change that text:
www.hikashop.com/download/languages.html#modify

Last edit: 6 years 6 months ago by nicolas.
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
6 years 6 months ago #279801

Thank you very much! This is now working :)

Regards,
Josh.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum