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