diff --git a/wrenchboard/src/include/wrenchboard_api.h b/wrenchboard/src/include/wrenchboard_api.h index f7b4205a..95274d72 100644 --- a/wrenchboard/src/include/wrenchboard_api.h +++ b/wrenchboard/src/include/wrenchboard_api.h @@ -278,6 +278,7 @@ enum { PARTNER_STRIPE }; #define WRENCHBOARD_ACCOUNT_PAGEINTRO 11071 #define WRENCHBOARD_VIRTUAL_CARDADD 11080 +define WRENCHBOARD_VIRTUAL_FAMILY_CARD 11082 #define WRENCHBOARD_ACCOUNT_PRICE_COMBO 11171 #define WRENCHBOARD_ACCOUNT_JOBPOST_DURATION 11173 diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index 4ee32717..b8fcc6fa 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -272,6 +272,7 @@ define('WRENCHBOARD_ACCOUNT_MYPAGE', 11070); define('WRENCHBOARD_ACCOUNT_PAGEINTRO', 11071); const WRENCHBOARD_VIRTUAL_CARDADD = 11080; +const WRENCHBOARD_VIRTUAL_FAMILY_CARD = 11082; define('WRENCHBOARD_ACCOUNT_PRICE_COMBO', 11171); define('WRENCHBOARD_ACCOUNT_JOBPOST_DURATION', 11173); diff --git a/www-api/app/Config/RoutesV1.php b/www-api/app/Config/RoutesV1.php index 13ee1039..c6ae823f 100644 --- a/www-api/app/Config/RoutesV1.php +++ b/www-api/app/Config/RoutesV1.php @@ -112,6 +112,7 @@ $routes->group('/en/wrench/api/v1/', static function ($routes) { $routes->post('kidwallets', 'WrenchWallet::getKidWallet'); $routes->post('wallets/escrols', 'WrenchWallet::getEscrols'); $routes->post('wallets/card/request', 'WrenchWallet::requestVirtualCard'); + $routes->post('wallets/card/familyrequest', 'WrenchWallet::requestFamilyVirtualCard'); }); $routes->post('/en/wrench/api/v1/familywallet/redeem', 'WrenchWallet::redeemOptions'); diff --git a/www-api/app/Controllers/WrenchWallet.php b/www-api/app/Controllers/WrenchWallet.php index b1ed9c25..ae683020 100644 --- a/www-api/app/Controllers/WrenchWallet.php +++ b/www-api/app/Controllers/WrenchWallet.php @@ -74,6 +74,18 @@ class WrenchWallet extends BaseController log_message('critical', "requestVirtualCard ********* ALL ".serialize($out) ); return $this->respond( $this->summaryReturnData($in,$out), 200); } + + public function requestFamilyVirtualCard(){ + log_message('critical', "WrenchWallet::requestFamilyVirtualCard Path GATE ***"); + $raw_json = file_get_contents('php://input'); + $in = json_decode($raw_json, true); + $in["action"] = WRENCHBOARD_VIRTUAL_FAMILY_CARD; + $out=[]; + $ret = $this->wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + log_message('critical', "requestFamilyVirtualCard ********* ALL ".serialize($out) ); + return $this->respond( $this->summaryReturnData($in,$out), 200); + } public function redeemOptions(){ log_message('critical', "redeemOptions 0001"); header('Access-Control-Allow-Origin: *');