While setting up Westpac – Payway Net osCommerce module on a new online store, I encountered following error while testing it:
Notice: Error getting token: java.lang.SecurityException: Invalid IP address in /home/user/public_html/includes/functions/payway_utility.php on line 271
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/includes/functions/payway_utility.php:271) in /home/user/public_html/includes/functions/general.php on line 33
First of all, let me confirm that Payway’s osCommerce 2.2 module works. There are no issues, and it’s reasonably easy to set up in osCommerce.
Now assuming you have already setup Payway administration panel configurations and “Setup Net” for shopping cart, the most important part is to add IP address on the “Security Information” page inside the Payway Panel from which IP address the token request will be made.
If you see the above error, most likely it’s the missing or wrong IP address in the Payway panel. Most probably your hosting server has a different main IP address of the server and/or different eth1 interface(public interface) IP of the server.
Either ask your host the public IP address of the server or contact Payway Support using information from this page https://www.payway.com.au/core/ContactHelpdeskView, Provide your account credentials and they will know from which IP address the Token request is coming from.
Also on the Payway Notifications page, in the “Browser Return” section, for “Browser Return URL Pre Payment” field, add this url https://www.your-domain.com/checkout_payment.php and for “Browser Return URL”, add https://www.your-domain.com/checkout_success.php.
Hope that helps!
Cheers.