diff --git a/www-api/app/Config/Routes.php b/www-api/app/Config/Routes.php index 4ce3f2ec..bf59284a 100644 --- a/www-api/app/Config/Routes.php +++ b/www-api/app/Config/Routes.php @@ -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'); diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 8a02c9ef..114e3ada 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -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; diff --git a/www-api/public/svs/user/userve.php b/www-api/public/svs/user/userve.php index fa8fc024..7e35eb9c 100755 --- a/www-api/public/svs/user/userve.php +++ b/www-api/public/svs/user/userve.php @@ -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;