Sample Code
Most banks approve Merchant accounts for 3-Party processing rather than 2-Party processing but Paystation supports both.
Download the appropriate sample code below. This code shows how to initiate a payment with Paystation, and how to interpret our response. We assume that you have sufficient clue to store orders and customer details in a database before initiating the payment request, and are able to tie our response back to that request.
One last thing - be sure to generate a unique MS (Merchant Session) value for each payment attempt. The usual situation where this catches people out is when a payment attempt returns with an error and another attempt is made to pay for the same order - in our view this is a new and different payment and requires a new MS value.
3-Party Sample Code
- PHP 3-Party Updated 20090108
- ASP 3-Party Updated 20081111
- C# 3-Party Updated 20081129
- 3-Party API Document - Updated 20090907
- Quick Lookup API - Useful for looking up responses for transactions that don't return. Updated 20081128
2-Party Sample Code
- PHP 2-Party Updated 20081020
- ASP 2-Party Updated 20081020
- C# 2-Party Updated 20091201
- 2-Party API Document Updated 20090907
Contact Paystation with your return url which we enter into your Paystation account. Some examples of return urls are:
- Zencart: [site/shop]/index.php eg: www.paystation.co.nz/shop/index.php
- osCommerce: [site/shop]/checkout_process.php eg: http://nbnz.shop.paystation.co.nz/checkout_process.php