API Docs – Credit Card Processing (Redirect Solution)
API DOCS
Paywiser Integration Guide
Credit Card Processing
(Redirect Solution)
Payment
To process a transaction using TxHandler, post a form via HTTP POST to https://merchant.paywiser.com/secure/txHandler.php. After the transaction, the user will be redirected to the redirect url and the result of the transaction will be sent to postbackurl
Payment Parameters
Name | Required (Yes or No) | Description |
---|---|---|
sid | YES | Site id (unique identifier for the web site) |
tid | NO | Tracking id (must be unique for each transaction) |
postback_url | YES | The URL of the page used to recieve the TxHandler postback. The response can be read from $_POST array. |
redirect_url | YES | The URL of the page TxHandler will redirect to after processing. The response can be read as GET parameters. |
hash | YES | md5 hash of sid+timestamp+amounttotal+currency+rcode ie: md5(’22’.’1234568995265421′.’17.00′.’CNY’.’222b6c’) REMARK : amounttotal = (item_amount_unit[] * item_quantity ) + amount_shipping + amount_tax – amount_coupon |
timestamp | YES | Format : hhmmss |
card_type | YES | • amex • visa • mastercard • jcb • upi |
firstname | YES | Frist name of the customer |
lastname | YES | Last name of the customer |
phone | YES | 10 to 14 numeric digits |
YES | ||
mobile | NO | Mobile number |
address | NO | Customer address |
suburb_city | NO | Customer suburb or city |
state | NO | Customer state, 2 digit code for US/Canada |
postcode | NO | Customer postcode/zipcode |
country | NO | Customer country, ISO 3166 2 digit code |
currency | YES | Transaction currency[currency in which the gateway is setup], ISO 3 letter code ie : USD |
amount_shipping | YES | Transaction shipping amount. 0.00 if nothing |
amount_coupon | YES | Coupon amount. 0.00 if nothing |
amount_tax | YES | Transaction shipping amount. 0.00 if nothing |
item_quantity[] | YES | Quantity of each cart item |
item_name[] | YES | Article names for each cart item |
item_no[] | YES | Descriptions for each cart item |
item_desc[] | YES | Descriptions for each cart item |
item_amount_unit[] | YES | Price per unit for each cart item in two decimal place |
ref1 | NO | Merchant reference field |
ref2 | NO | Merchant reference field |
ref2 | NO | Merchant reference field |
ref3 | NO | Merchant reference field |
ref4 | NO | Merchant reference field |
tx_action | NO | Value : “PAYMENT” or “PREAUTH” |
Response
There will be two responses one with tx_action =PREAUTH and another with tx_action = SETTLEMENT. The transaction is completed when you receive the response with tx_action=SETTLEMENT The response will be sent to both redirect_url and the postback_url given in the post.
Name | Required (Yes or No) | Description |
---|---|---|
sid | String | Has the sid where transaction was processed |
status | String | Has the value “OK” for a successful transaction, or “EXC” for a failed transaction. |
parent_txid | String | Parent transaction id |
txid | String | The transaction ID |
tx_action | String | The state change txaction, e.g. “PREAUTH” or “SETTLEMENT” |
amount | String | The amount processed. |
currency | String | The currency in which the transaction was processed |
comment | String | Response from the gateway |
descriptor | String | Gateway descriptor name |
tid | String | From the original transaction |
ref1 | String | From the original transaction |
ref2 | String | From the original transaction |
ref3 | String | From the original transaction |
ref4 | String | From the original transaction |
vrfy | String | This is a sha 256 hash so the data can be verified. To generate hash with sha256 the string of sid;rcode;txid;status;amount;currency;tx_action |
error | If an error has occurred, then the status value will equal “EXC” and these parameters will be sent as well. Detailed error will be present only if we receive it from the processing gateway. | |
error_type | String | error_type |
error_sys | String | The system that caused the error (client or server) |
error_msg | String | The error message |
error_info | String | Error information that contains the bank message and bank code |
error_code | String | error_code |
Sample Code
form action=”https://merchant.paywiser.com/secure/txHandler.php” method=”post”
sid: input type=”text” name=”sid” value=””
postback_url: input type=”text” name=”postback_url” value=””
redirect_url: input type=”text” name=”redirect_url” value=””
timestamp: input type=”text” name=”timestamp” value=””
hash: input type=”text” name=”hash” value=””
firstname: input type=”text” name=”firstname” value=””
lastname: input type=”text” name=”lastname” value=””
phone: input type=”text” name=”phone” value=””
email: input type=”text” name=”email” value=””
address: input type=”text” name=”address” value=””
suburb_city: input type=”text” name=”suburb_city” value=””
state:input type=”text” name=”state” value=””
postcode: input type=”text” name=”postcode” value=””
country: input type=”text” name=”country” value=””
currency_code: input type=”text” name=”currency” value=””
amount_shipping: input type=”text” name=”amount_shipping” value=”0.00″
amount_tax: input type=”text” name=”amount_tax” value=”0.00″
amount_coupon: input type=”text” name=”amount_coupon” value=”0.00″
card_type: input type=”text” name=”card_type” value=”allcard”
ref1: input type=”text” name=”ref1″ value=””
ref2: input type=”text” name=”ref2″ value=””
ref3: input type=”text” name=”ref3″ value=””
ref4: input type=”text” name=”ref4″ value=””
table tr td
item_quantity: input type=”text” name=”item_quantity[]” value=””
item_name: input type=”text” name=”item_name[]” value=””
item_no: input type=”text” name=”item_no[]” value=””
item_desc: input type=”text” name=”item_desc[]” value=””
item_amount_unit: input type=”text” name=”item_amount_unit[]” value=”0.00″
/td /tr /table
input type=”submit” value=”Submit” /form