I am working on a project and need to pass HTTP request header for token Generation and use the token to pass other parameters for other endpoints. Each endpoint call is a combination of header and parameter call as indicated below. I am a new to this and running out of time and struggling figure it out. Any one who will like to work with me on this and also support in future snippets for a cost.
Below required.....
1. Call API to Generate Token
Request URL
localhost/payment_apis/index.php/pay/token
Request Headers
2. Call API to receive payment:
localhost/payment_apis/index.php/pay/receive
Below required.....
1. Call API to Generate Token
Request URL
localhost/payment_apis/index.php/pay/token
Request Headers
B4X:
headers:
Content-Type: application/json
parameters:
{
"pos_id":"1001"
}
2. Call API to receive payment:
localhost/payment_apis/index.php/pay/receive
B4X:
headers:
Content-Type: application/json
api_key: token from token api
parameters:
{
"CustomerName": "Andrew Mark",
"CustomerMsisdn": "0556786372",
"CustomerEmail": "[email protected]",
"Channel": "mtn-gh",
"Amount": 0.8,
"Description": "T Shirt",
"ClientReference": "",
"Token": "123445"
}