modified airtel and tnm request and response parameters
This commit is contained in:
@@ -184,7 +184,7 @@ class DisbursementController extends Controller {
|
||||
$timeout = 30;
|
||||
$logger = new Logger();
|
||||
$url = $_ENV['AIRTEL_MONEY_DISBURSEMENT_URL'];
|
||||
|
||||
/*
|
||||
$payload = [
|
||||
"payee" => [
|
||||
"msisdn" => $params['msisdn']
|
||||
@@ -196,7 +196,14 @@ class DisbursementController extends Controller {
|
||||
"id" => $params['transactionId']
|
||||
]
|
||||
];
|
||||
|
||||
*/
|
||||
$payload = [
|
||||
"country" => "MW",
|
||||
"currency" => "MWK",
|
||||
"msisdn" => $params['msisdn'],
|
||||
"amount" => $params['amount'],
|
||||
"transactionID" => $params['transactionId']
|
||||
];
|
||||
|
||||
$log_data = json_encode($payload);
|
||||
$logger->info("Disbursement Requests to Airtel MW : " . $log_data );
|
||||
@@ -350,12 +357,12 @@ class DisbursementController extends Controller {
|
||||
public function mpambaDisbursement($params){
|
||||
$logger = new Logger();
|
||||
$url = $_ENV['MPAMBA_BASE_URL'] . "/payments";
|
||||
|
||||
|
||||
$payload = array(
|
||||
"msisdn" => $params['msisdn'],
|
||||
"amount" => (int)$params['amount'],
|
||||
"transaction_id" => $params['transaction_id'],
|
||||
"narration" => $params['narration']
|
||||
"transactionId" => $params['transaction_id'],
|
||||
"description" => $params['narration']
|
||||
);
|
||||
$logger->info("Mpamba Disbursement Requests : " . json_encode($payload));
|
||||
$ch = curl_init($url);
|
||||
|
||||
@@ -12,3 +12,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
34
info.md
34
info.md
@@ -21,3 +21,37 @@ You will work on disbursement confirmation endpoint
|
||||
|
||||
|
||||
Would you like to see how to define a global constant for this base URL so you can easily link to images and CSS from your templates?
|
||||
|
||||
|
||||
AIRTEL MONEY DISBURSEMENT
|
||||
REQUEST:
|
||||
|
||||
{"country":"MW",
|
||||
"currency":"MWK",
|
||||
"msisdn":"996139030",
|
||||
"amount":50,
|
||||
"transactionID":"mse-6a4e490eec25e"}
|
||||
|
||||
RESPONSE:
|
||||
|
||||
{"data":{"transaction":{"reference_id":"BD260708.1456.651361","airtel_money_id":"disburse-8SE3NN3VM8-mse-6a4e490eec25e","id":"mse-6a4e490eec25e","status":"TS"}},
|
||||
"status":{"response_code":"DP00900001001","code":"200","success":true,"result_code":"ESB000010","message":"Business Disbursement Partner transaction of MK 50 has been successfully completed between the sender: 999904070 and receiver: 996139030. Txn ID: BD260708.1456.651361"}}
|
||||
|
||||
|
||||
MPAMBA DISBURSEMENT
|
||||
REQUEST:
|
||||
|
||||
{
|
||||
"transactionId": "TXN202607101022jy3",
|
||||
"amount": 50,
|
||||
"msisdn": "265881161942",
|
||||
"description": "CEDAR PAY"
|
||||
}
|
||||
|
||||
RESPONSE:
|
||||
|
||||
{"message":"Completed
|
||||
successfully","errors":[],"trace":[],"data":{"transaction_id":"TXN202607101022jy3","receipt_number":"DGA3321MW1H"}}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user