Casheer KW
  • Introduction
  • Integration Steps
  • Types of Integration
    • 1. Standard Pay
    • 2. Plugins
    • 3. SDK
  • Sample Code
    • 1. Get Payment URL
    • 2. Redirect to Payment URL
    • 3. Callback To Merchant Portal
    • 4. Compute HASH
    • 5. Refund Request
    • 6, Payment Status
  • Parameters & Description
  • Payment Methods
  • Test Cards
  • Download Plugins/SDK
  • Direct Pay
    • 1. Generate Merchant Keys
    • 2. Validate Request
    • 3. Initiate Pay
    • 4. Process Payment
  • Modules Setup Guides
    • WooCommerce
    • Drupal Commerce
    • OpenCart
    • Magento 1
    • Magento 2
    • PrestaShop
    • Joomla
    • WHMCS
Powered by GitBook
On this page
  • CallBack/ Response URL
  • Call Back Response Parameters
  • How to identify parameters that are tampered?
  1. Sample Code

3. Callback To Merchant Portal

CallBack/ Response URL

<YourCallBackURL>?trackid=xxxx&result=xxxx&refid=&errormessage=&Hash=xxxx

Call Back Response Parameters

Parameters

Data Type

Description

trackid

string

Reference ID passed in the request.

result

string

Payment result. Example: CAPTURED, NOT CAPTURED, DECLINED, REJECTED, BLOCKED.

refid

string

Payment Reference Number.

error message

string

If result is other than CAPTURED, then it gives you the actual reason.

hash

string

Use this for integrity of the data explained in response integrity section

How to identify parameters that are tampered?

If you want to check whether the parameters tamper or not, convert below parameters into a hash and compare with your hash which you got as a response in a query string.

Use the below method to identify parameter tempering.

  String outParams = $"trackid={trackid}&result={result}&refid={refid}";
  String outhashValue = GetHashValue(outParams,_key);
  if (Hash != outhashValue)
  {
  //This means it is tampered
  // Your code
  }
  else{
  }
Previous2. Redirect to Payment URLNext4. Compute HASH

Last updated 1 year ago