Pay with paypal by link in confirmation email

  • Posts: 217
  • Thank you received: 4
9 years 2 months ago #215261

-- HikaShop version -- : 2.5.0

Hello Guys,

When I click on button 'Pay Now' (PayPal button) in 'order creation notification email' it will redirect me to my website and I need to log in before continuing. But it is not possible, because I made order as a guest.

Is possible to redirect user straight to PayPal gateway from email?


Thank you
Filip

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 2 months ago #215271

Hi,

Change the line:
$order = $class->loadFullOrder($order_id,true);
to:
$order = $class->loadFullOrder($order_id,true,false);
in the "pay" function of the file components/com_hikashop/controllers/order.php and the link will work for guests too.
I don't recommend that though as it means that anyone could pay guest orders (the big concern for security here is that anyone can see the content of the order and the data of the customer on the payment gateway's payment page).

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

  • Posts: 217
  • Thank you received: 4
8 years 5 months ago #243239

Hi,

is there any way how to secure link, some hashing for example?


Filip

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 5 months ago #243259

Hi,

Yes. Create a custom HikaShop plugin to generate a hash code in the order data in the hikashop_order table when the order is created, then, modify the order creation email notification to add that hash code in the pay link, and finally, modify the code in components/com_hikashop/controllers/order.php in order to check that the hash in the link matches with the one in the database.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum