Refund Order Request
End Point URL | /refund.do?api_token=MjdfMTEyMl8yMDE4MDcyNTE0NDc1OA== &transaction_id=20170928115044&amount=95.50 |
Method | GET |
Function | Requests data from a resource by get method |
Remark | 3 mandatory parameters only |
Parameter | Description |
---|---|
transaction_id (required) | Transaction ID,an integer and you will use it to login to the merchant dashboard. You will find it at the "Transactions List" page. You may find merchant login by following View All Transaction → Transaction Id. |
api_token (required) | Website API Token is a string value. You can find it by following My Website → Website API Token |
amount (required) | This is Order Amount and currency format is set to be in decimal (10,2) |
Refund Order Request
//<!--Transaction Status by get method-->
$url=
"/validate.do?transaction_id=20170928115044&api_token=MjZfMTEyMF8yMDE4MDcyNzEyMjgyNQ"
;
$ch =
curl_init()
;
curl_setopt($ch,CURLOPT_URL, $url)
;
curl_setopt($ch,CURLOPT_POST,0)
;
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1)
;
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false)
;
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, false)
;
$response =
curl_exec($ch)
;
curl_close($ch)
;
$json_response =
json_decode($response,true)
;
echo $json_response[
'status_nm'
]
;
echo $json_response[
'status'
]
;
echo $json_response[
'amount'
]
;
echo $json_response[
'transaction_id'
]
;
echo $json_response[
'descriptor'
]
;
echo $json_response[
'tdate'
]
;
echo $json_response[
'curr'
]
;
echo $json_response[
'reason'
]
;
echo $json_response[
'id_order'
]
;
//<!--Transaction Status for data you will get below response:-->
|
{
"status_nm"
:
"1"
,
"status"
:
"Success"
,
"amount"
:
"30.00"
,
"transaction_id"
:
"20170928115044"
,
"descriptor"
:
"PayCly"
,
"tdate"
:
"2017-09-28 11:50:44"
,
"curr"
:
"USD"
,
"reason"
:
"Success"
,
"id_order"
:
""
,
}
|
Example of Transaction Status
{
"status":
Success | Failed | Pending | Test
}
|