Fix hook data flutter result
This commit is contained in:
@@ -31,20 +31,30 @@ class WrenchHooks extends BaseController
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$raw_array = json_decode($raw_json, true);
|
||||
$in = $raw_array;
|
||||
//7f079034e166ecf52d82cbec9876e4dc8a154b0c37248f3fa1734d4eeab938d5
|
||||
log_message('critical', "WrenchHooks flutter");
|
||||
log_message('critical', "WrenchHooks ***************************** flutter");
|
||||
log_message('critical', "WrenchHooks-CALL PREPARE DATA".serialize($in) );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["event.type"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["status"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["txRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["flwRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["orderRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["amount"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["appfee"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["id"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["AccountId"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["fullName"] );
|
||||
try {
|
||||
$this->saveCache("FLUTTER_HOOK",$in,30000); // save flutter hook response to redis
|
||||
} catch (Exception $e) {
|
||||
log_message('critical', "WrenchHooks flutter fail => ".$e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
log_message('critical', "WrenchHooks flutter");
|
||||
log_message('critical', "WrenchHooks ***************************** flutter");
|
||||
log_message('critical', "WrenchHooks-CALL PREPARE DATA".serialize($in) );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["event.type"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["status"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["txRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["flwRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["orderRef"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["amount"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["appfee"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["id"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["AccountId"] );
|
||||
log_message('critical', "WrenchHooks-CALL ********** RETURN *************** DATA".$in["customer"]["fullName"] );
|
||||
} catch (Exception $e) {
|
||||
log_message('critical', "WrenchHooks flutter fail => ".$e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
$data = [
|
||||
"event_type" => $in["event.type"],
|
||||
@@ -59,13 +69,11 @@ class WrenchHooks extends BaseController
|
||||
"fullName" => $in["customer"]["fullName"],
|
||||
"action" => WRECNH_CREDIT_HOOKS_FULUTTER,
|
||||
"raw_result" => serialize($in),
|
||||
|
||||
];
|
||||
|
||||
|
||||
if ( $data["action"] !='' ){
|
||||
$wrenchboard = new \App\Models\BackendModel();
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
//$wrenchboard = new \App\Models\BackendModel(); in base controller now
|
||||
$ret = $this->wrenchboard->wrenchboard_api($data, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user