Commit 9c20d48b authored by Antonio.Suerte's avatar Antonio.Suerte

Remittance API Misleading Status Code Fix

parent 8fad5972
......@@ -174,6 +174,11 @@ class MoneyRequest extends System {
$sha = hash("sha256", $checkSignature);
if($this -> signature != $sha){
$this -> result["combination"] = [
"real_raw" => $checkSignature,
"real_signature" => $sha
];
$this -> result[PARAM_RESULT] = sprintf("%02d", VAL_INT_90);
$this -> result[PARAM_STATUS] = "REJECTED";
}else{
......@@ -189,7 +194,7 @@ class MoneyRequest extends System {
}else{
$format = sprintf("%02d", $this -> ctransfer[PARAM_RESULT]);
$this -> result[PARAM_RESULT] = sprintf("%02d", $this -> result[PARAM_RESULT]);
$this -> result[PARAM_RESULT] = $format;
$this -> result[PARAM_STATUS] = "ERROR(CODE:{$format})";
}
}
......@@ -279,6 +284,10 @@ class MoneyRequest extends System {
$this -> referer,
'[REMITTANCE_CALLBACK_RESULT]'.json_encode($this -> result)
]);
if(isset($this -> result["combination"])){
unset($this -> result["combination"]);
}
echo json_encode($this -> result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment