log functon
This commit is contained in:
@@ -8,6 +8,31 @@ class DigiCallBack extends BaseController
|
|||||||
$raw_json = file_get_contents('php://input');
|
$raw_json = file_get_contents('php://input');
|
||||||
$in = json_decode($raw_json, true);
|
$in = json_decode($raw_json, true);
|
||||||
$out =[];
|
$out =[];
|
||||||
|
//$this-> logCallback($in);
|
||||||
|
|
||||||
|
log_message('critical', "DigiCallBack:: END =============================================================================== " );
|
||||||
|
$inEvent = $in["event"];
|
||||||
|
switch($inEvent){
|
||||||
|
case 'subscription.create':
|
||||||
|
log_message('critical', "DigiCallBack::EVENT ${$inEvent}" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'charge.success':
|
||||||
|
log_message('critical', "DigiCallBack::EVENT ${$inEvent}" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// $arr = array(1, 2, 3, 4);
|
||||||
|
//foreach ($arr as &$value) {
|
||||||
|
// $value = $value * 2;
|
||||||
|
//}
|
||||||
|
|
||||||
|
return []; //json_encode( $final_out );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function logCallback($in){
|
||||||
log_message('critical', "DigiCallBack:: START =============================================================================== " );
|
log_message('critical', "DigiCallBack:: START =============================================================================== " );
|
||||||
$inKeys = array_keys($in);
|
$inKeys = array_keys($in);
|
||||||
foreach ($inKeys as $item){
|
foreach ($inKeys as $item){
|
||||||
@@ -24,14 +49,6 @@ class DigiCallBack extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log_message('critical', "DigiCallBack:: END =============================================================================== " );
|
return 0;
|
||||||
|
|
||||||
// $arr = array(1, 2, 3, 4);
|
|
||||||
//foreach ($arr as &$value) {
|
|
||||||
// $value = $value * 2;
|
|
||||||
//}
|
|
||||||
|
|
||||||
return []; //json_encode( $final_out );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user