数据响应发送到ipay88不是我想要的结果

时间:2019-05-02 11:16:42

标签: php laravel

对于ipay88,应包含一个BackendURL,需要返回该响应代码,响应代码为“ 200”,响应数据为“ RECEIVEOK” /“ OK”,以确认已接收到付款状态。

预期结果是

enter image description here

但是我发送的结果是

enter image description here

这是我的backendURL代码

public function backendResponse()
{
    $expected_sign = $_POST['Signature'];
    $merchantcode = $this->merchantcode;
    $merchantkey = $this->merchantkey;
    $check_sign = '';
    //$ipaySignature = '';
    $str = '';
    $HashAmount = '';
    $orderID = $_POST['RefNo'];
    $paymentID = $_POST['PaymentId'];
    $paymentStatus = $_POST['Status'];
    $amountPaid = $_POST['Amount'];
    $transID = $_POST['TransId'];
    $remark = $_POST['Remark'];
    $errDesc = $_POST['ErrDesc'];

    $amount = preg_replace("/[^0-9]/", "", $amountPaid);
    $string = $this->iPay88_signature($merchantkey . $merchantcode .
        $paymentID . $orderID . $amount . $_POST['Currency'] .
        $paymentStatus);

    if ($paymentStatus == "1" && $string == $expected_sign) {
        echo 'RECEIVEOK';
    }
}

有人可以帮忙吗?我只想发送响应数据,仅发送RECEIVEOK,不发送HTML DATA TAG。非常感谢,非常感谢。

0 个答案:

没有答案