ALERTPAY payment module.
- Getting orders to show in payment screen
- Adjusting layout of payment method display
- Using IPN with alertpay to track orders
I read many links on this forum to come up with this generalised solution.
I now have this module fully working on Zen Cart 1.3.8a
The follwing instructions assume you BACK THINGS UP before you mess with stuff.
1) Install the addon (simply copy the folders via ftp into your current zen cart folder structure on your webserver)
2) Upload the gif from the addon folder to [wherever]includes/modules/payment
3) Amend the code in [wherever]includes/modules/payment/alertpay.php as shown here (it's about half way down the file)
//---- begin code ----
function selection() {
$img_alertpay = DIR_WS_MODULES .'payment/alertpay.gif';
$logo_list = zen_image($img_alertpay,' AlertPay ','','','align="absmiddle"');
return array('id' => $this->code,
'module' => $this->title . '' .$logo_list);
}
//---- end code ----
If you want to add extra text on the payment page do it like this
(code elided...)
'module' => $this->title . ' EXTRA TEXT FOR PAGE ' .$logo_list);
(...code elided)
Ok, that's "Adjusting layout of payment method display" complete...
Now to get the orders tracking in the Admin page you need to setup your IPN with alertpay.
First go to: admin > Modules > Payment and click on PayPal IPN.
Copy the IPN address on the right, looks like:
http://YOUR-WEBSITE-NAME.com/ipn_main_handler.php
Next: Go here to setup your stuff with Alertpay
https://www.alertpay.com/ManageIPN.aspx
once you get past security set the IPN options to
IPN Status: Enabled
Allow Encrypted Payment Details (EPD): Disabled
Alert URL: http://YOUR-WEBSITE-NAME.com/ipn_main_handler.php
(we copied this from our paypal IPN settings in admin > Modules > Payment, so it would contain the correct name for your store )
Now, Copy the IPN security code provided ( Eg. RNpE7osbVvx7mXmX)
You can turn on test mode, if you like while you test, at this point.
This will allow transactions to go through for 'zero money' at the Alertpay end, even if the transaction actually has a value associated with it... handy.
Now return to admin > Modules > Payment > Paypal IPN
Enter the code ( Eg. RNpE7osbVvx7mXmX) in the PDT Token (Payment Data Transfer).
Here is a complete listing of the setting (and YES the Mode for PayPal web services doesnt matter, just ignore it)
Requirements:
*PayPal Account (click to signup)
**Port 80 is used for bidirectional communication with the gateway, so must be open on your host's router/firewall
*PHP allow_url_fopen must be enabled
*Settings must be configured as described above.
Enable PayPal Module
False
Business ID
[email protected]
PDT Token (Payment Data Transfer)
****************
Transaction Currency
Only GBP (or w/e you want)
Payment Zone
--none--
Set Pending Notification Status
Pending [1]
Set Order Status
Processing [2]
Set Refund Order Status
Pending [1]
Sort order of display.
0
Page Style
Primary
Mode for PayPal web services
Default:
www.paypal.com/cgi-bin/webscr
or
www.paypal.com/us/cgi-bin/webscr
or for the UK,
www.paypal.com/uk/cgi-bin/webscr
www.paypal.com/cgi-bin/webscr
Debug Mode
Off
So, now go complete one order from end to end.
after you hae confirmed it has appeared in your orders, try updating the order status etc... you should be good to go.
I really, really, hope that this prevents someone else spending as long as i did getting this sorted out.
Have a nice night instead, and think of me.
Bookmarks