If customer payment is successful, the user will be returned to the address provided for the callback value. On this page, the website owner can check the status of the invoice through the request_status function and, if the payment is successful, provide services to the customer. In order to check the status of the invoice, you should POST the following information to the web service address shown below through the file_get_contents function in PHP or similar functions in other programming languages.
https://noborder.company/action/ws/request_status
api_key
String
After registering your website, this key will be automatically generated by the site and provided to you. This key is unique and is generated exclusively for each website.
order_id
String
It is a unique value that is created on your website to fulfill the order. This phrase must be the same as the phrase sent for the first step.
request_id
String
It is a unique value returned by the web service in the second step. In the second step, you should save this amount so that you can check the status of the invoice through it.
Sample PHP code to send information to the gate
$params = array(
'api_key' => 'YOUR_API_KEY',
'order_id' => '46229791',
'request_id' => '664b1882d3273'
);
$curl = curl_init('https://noborder.company/action/ws/request_status');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
var_dump($result);
If the submitted data is valid, a response similar to the following will be returned.
array('status' => 'success', 'request_id' => '664b1882d3273', 'order_id' => '46229791', 'amount_value' => '5000', 'amount_currency' => 'irt');
If the data sent is not valid or there is an error from the web service, a value similar to the following is returned.
array('status' => 'failed', 'respond' => 'An error message with details related to the invalid information that was submitted.', 'error_no' => Error number);