Source file for the order confirmation page

  • Posts: 4
  • Thank you received: 0
11 years 6 months ago #100220

Hello,
I'm intergrating a new payment method inside Hikashop. The currently available method is Paypal.
I noticed that after the payment is done on Paypal, somehow ( maybe a POST? ) there is a callback on the site that confirms and updates the order status and sends an e-mail to the user.
I need to find this file or the call method, so my payment method will use it the same way to confirm an order.
Which file is it?

Thank you.

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

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

Hi,
It's the "onPaymentNotification" method which is called through your notify URL that you'll have to send to your payment gateway when you send your payment request.
Hope this will help you a little.

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

  • Posts: 4
  • Thank you received: 0
11 years 6 months ago #100281

Currently I'm trying to figure out how the paypal gateway works to do it the same way.
If there is a similar method for paypal, where is it defined and then sent to the paypal gateway?

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

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

I didn't really understood your question but I'll try to explain it to you :
1. REQUEST : In the onAfterOrderConfirm method, you'll have to gather all required information, and send them to the payment gateway (through the _end.php file).
2. RESPONSE : In the onPaymentNotification method, you'll have to check the response of the payment gateway and then send an email/change your order status regarding the response.

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

  • Posts: 4
  • Thank you received: 0
11 years 6 months ago #100337

Right. And my question is, where can I find the file that handles the response from the payment gateway?
In the case of paypal, when you pay the amount and charge your account, what is happening? Which file is called and how the order status is changed to "Confirmed"?

Thank you for your help so far.

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

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

1. You'll find this file through your payment plugin directory, for example for paypal the file is paypal.php.

2. In the case of paypal, when you pay the amount and charge your account the file which is called is your paypal.php file, and your order status is changed to "Comfirmed" through the onPaymentNotification method after that you checked the paypal response.

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

  • Posts: 4
  • Thank you received: 0
11 years 6 months ago #100408

The file paypal.php is exactly what I was looking for, thank you!

If there is anything else related to this, I'll let you know.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum