Welcome Guest, Not a member yet? Register   Sign In
Response API asynchronous notification
#1

(This post was last modified: 06-11-2024, 01:33 AM by Anharr.)

Masters, I need your help for my API Integration.

This is details step by step of my Web App :
- I will sending all of parameters (like amount billing, code bank, username, email etc) for payment to the API
This is the sample request : 
$params = [              
  'merchantCode' => $merchantCode,              
  'orderType' => $orderType,              
  'orderNum' => $orderNum,              
  'pay' => $pay,              
  'name' => $name,              
  'email' => $email,              
  'phone' => $phone,              
  'notif' => $notifyUrl,              
  'date' => $dateTime,              
  'expired' => $expiryPeriod,              
  'sign' => $sign        
];

- API will sending asynchronous response with detail is it my request is Success or not.

This is the sample of response from API : 

RespCode :SUCCESS RespMessage :Request Transaction Success OrderNum :QWOIJDDJ orderNum :2024061123981 payMoney :10000 platSign :HayKQWNzo2vlKcEZ

- After receiving asynchronous notification, I need to respond to SUCCES the string to check is it my customer already paid the billing or not.

This is the sample of code : 

$res = json_decode(file_get_contents('php://input'), true);$platSign = $res['platSign'];unset($res['platSign']);
Because I need to check my customers already paid the billing or not. So, My question is :
 
How to sending all of API response before, using json_decode(file_get_contents('php://input), true);
I'm so sorry if my English is bad, if you confused with my question please let me know.
Reply


Messages In This Thread
Response API asynchronous notification - by Anharr - 06-11-2024, 01:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB