How to: Override URL used for PayPal IPN?

  • Posts: 12
  • Thank you received: 0
12 years 1 month ago #66651

Hello,

I am using the PayPal payment plugin and I need to override the URL sent by Hika to PayPal for Instant Payment Notifications.

Currently Hika is sending: myDomain.com/index.php?option=com_hikash...pl=component&lang=en

What I need it to be is: myDomain.com/myIpnProcessor

The reason being is: I have a number of automated back office processes that need to run once a PayPal payment has been confirmed by PayPal.

Where would I go about overriding that Payment Notification URL in Hika?

Thanks,
-Michael

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

  • Posts: 13201
  • Thank you received: 2322
12 years 1 month ago #66654

Hi Michael,

In HikaShop > Payment method, edit the paypal payment method, and fill the field "return url".
This will override the Payment Notification URL.

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

  • Posts: 12
  • Thank you received: 0
12 years 1 month ago #66699

Hi Xavier,

I thought setting the 'Return URL' in the PayPal Standard plugin would do it but it does not.

Here is what I have done:
1. In Hika: See PayPal plugin settings on HikaPPSettings.png
2. In PayPal (sandbox) on Seller acount: Enabled Instant Payment Notifications and entered the same URL as I did in the Hika PayPal plugin - see ipnPPSettings.png
3. White-listed all of the IP addresses listed in the Hika PayPal plugin
4. Submit a purchase, I am in fact returned to the Return URL that I entered in the PayPal plug in, however I do not see any of the URL parameters passed - the location I am being returned to is my own servlet that reads parameters passed to it and writes them to a log - I can confirm nothing was passed by the absence of PayPal IPN data in the logs I write to
5. Also, I can tell PayPal is using a different URL for IPN notifications, see ipnHistory.png, the Notification URL is the Hika Store, rather than the URL I entered in the PayPal plugin and in the PayPal IPN settings

So, what I'm looking for is to override the Notification URL as see in ipnHistory.png with my URL. Is this a mod to one or more .php file? If so, what would that mod look like?

Thanks,
-Mike

Attachments:
Last edit: 12 years 1 month ago by mkj101us.

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

  • Posts: 12
  • Thank you received: 0
12 years 1 month ago #66743

No need to reply, I found where to make the mod, in the aptly named: paypal.php, change this line:

$notify_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypal&tmpl=component&lang='.$locale.$url_itemid;

to something like:

$notify_url = HIKASHOP_LIVE.'yourIpnProcessorUrl';

easy....

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

  • Posts: 31
  • Thank you received: 1
12 years 1 month ago #66746

I guess I don't understand why you are not just using Hika's front end -- URL -- setting. Isn't that where your code is grabbing from anyway?

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

Time to create page: 0.083 seconds
Powered by Kunena Forum