payment cards

This commit is contained in:
CHIEFSOFT\ameye
2023-06-17 22:36:58 -04:00
parent 92c4cec841
commit 12ebcee037
3 changed files with 38 additions and 0 deletions
+5
View File
@@ -141,6 +141,11 @@ $routes->post('/en/wrench/api/v1/marketinterest', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/activejobstatus', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/activetaskstatus', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/payprevcard', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/paynewcard', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/paylistcard', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/payremcard', 'WrenchApi::apigate');
//$routes->post('/en/wrench/api/v1/blogdata', 'WrenchBlog::apigate');
//$routes->post('/en/wrench/api/v1/blogitem', 'WrenchBlog::apigate');
+17
View File
@@ -108,12 +108,29 @@ class WrenchApi extends BaseController
'activetaskstatus'=> ['POST'],
'offersinterestlist' => ['POST'],
'offersinterestproc' => ['POST'],
'payprevcard' => ['POST'],
'paynewcard' => ['POST'],
'paylistcard' => ['POST'],
'payremcard' => ['POST'],
];
return $endpoints;
}
private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){
switch ($endpoint) {
case 'payprevcard':
$in["action"] = WRENCHBOARD_USER_USESAVEDCC;
break;
case 'paynewcard':
$in["action"] = WRENCHBOARD_USER_ADNEWCC;
break;
case 'paylistcard':
// not ye
break;
case 'payremcard':
// pending
break;
case 'offersinterestproc':
$in = $this->procOfferInterest($in);
break;
+16
View File
@@ -89,6 +89,10 @@ $endpoints = array(
'offersinterestlist' => array('POST'),
'faq' => array('POST'),
'offersinterestproc' => array('POST'),
'payprevcard' => array('POST'),
'paynewcard' => array('POST'),
'paylistcard' => array('POST'),
'payremcard' => array('POST'),
);
$call_backend = true; // sometimes we need to overwite the call to the extenstion API
@@ -180,6 +184,18 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
}
$in["loc"] = $_SERVER["REMOTE_ADDR"];
switch ($endpoint) {
case 'payprevcard':
$in["action"] = WRENCHBOARD_USER_USESAVEDCC;
break;
case 'paynewcard':
$in["action"] = WRENCHBOARD_USER_ADNEWCC;
break;
case 'paylistcard':
// not ye
break;
case 'payremcard':
// pending
break;
case 'offersinterestproc':
$in= procOfferInterest($in);
break;