Start topup

This commit is contained in:
Olu Amey
2023-05-02 12:20:18 -04:00
parent a984bfc49d
commit d681b90fb2
5 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -195,7 +195,8 @@ define('WRENCHBOARD_USER_SENDMONEY', 11051);
define('WRENCHBOARD_USER_SENDJOBINT', 11052);
define('WRENCHBOARD_ACCOUNT_WALLETS', 11060);
define('WRENCHBOARD_ACCOUNT_PREPARE_TOPUP', 11062);
define('WRENCHBOARD_ACCOUNT_COMPLETE_TOPUP', 11063);
define('WRENCHBOARD_ACCOUNT_REFFERHX', 11064 );
+3
View File
@@ -69,6 +69,9 @@ $routes->post('/en/wrench/api/v1/paymenthx', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/purchasehx', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/starttopup', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/jobmanagerlist', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/recipients', 'WrenchApi::apigate');
+4
View File
@@ -80,12 +80,16 @@ class WrenchApi extends BaseController
'accounttypes' => ['POST'],
'jobmanagerlist' => ['POST'],
'profilepasschange' => ['POST'],
'starttopup' => ['POST'],
];
return $endpoints;
}
private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){
switch ($endpoint) {
case 'starttopup':
$in["action"] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP;
break;
case 'profilepasschange':
$in["action"] = WRENCHBOARD_PROFILE_RESETPASS;
break;
+2
View File
@@ -102,6 +102,8 @@ define('WRENCHBOARD_USER_SENDMONEY', 11051);
define('WRENCHBOARD_USER_SENDJOBINT', 11052);
define('WRENCHBOARD_ACCOUNT_WALLETS', 11060);
define('WRENCHBOARD_ACCOUNT_PREPARE_TOPUP', 11062);
define('WRENCHBOARD_ACCOUNT_COMPLETE_TOPUP', 11063);
define('WRENCHBOARD_ACCOUNT_REFFERHX', 11064 );
+4
View File
@@ -59,6 +59,7 @@ $endpoints = array(
'accounttypes' => array('POST'),
'jobmanagerlist' => array('POST'),
'profilepasschange' => array('POST'),
'starttopup' => array('POST'),
);
$call_backend = true; // sometimes we need to overwite the call to the extenstion API
@@ -121,6 +122,9 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
}
$in["loc"] = $_SERVER["REMOTE_ADDR"];
switch ($endpoint) {
case 'starttopup':
$in["action"] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP;
break;
case 'profilepasschange':
$in["action"] = WRENCHBOARD_PROFILE_RESETPASS;
break;