I am using a bank payment gateway for my user payments in my website.
It is based on PHP and SOAP.
Recently, at the latest update of chrome(84.x) and in call back function, it shows "waiting for cache" repeatedly in status bar.
There is no problem with FF and IE and previous versions of chrome.
If i remove browsing cache and cookies, it solves chrome problem for one payment. But the problem starts again for the second payment.
It is totally annoying problem.
Here is a simplified code:
function call() {
ini_set ( "soap.wsdl_cache_enabled", "0" );
$PIN = '1111';
$wsdl_url = "https://URL/NewIPGServices/Sale/SaleService.asmx?WSDL";
$site_call_back_url = "http://URL1/confirm.php";
$amount = $_POST['Amount'] ? $_POST['Amount'] : "1000" ;
$order_id = $_POST['OrderId'] ? $_POST['OrderId'] : "500";
$params = array (
"LoginAccount" => $PIN,
"Amount" => $amount,
"OrderId" => $order_id,
"CallBackUrl" => $site_call_back_url
);
$client = new SoapClient ( $wsdl_url );
try {
$result = $client->SalePaymentRequest ( array (
"requestData" => $params
) );
if ($result->SalePaymentRequestResult->Token && $result->SalePaymentRequestResult->Status === 0) {
header ( "Location: https://URL/NewIPG/?Token=" . $result->SalePaymentRequestResult->Token ); /* Redirect browser */
exit ();
}
elseif ( $result->SalePaymentRequestResult->Status != '0') {
$err_msg = "(<strong> error : " . $result->SalePaymentRequestResult->Status . "</strong>) " .
$result->SalePaymentRequestResult->Message ;
}
} catch ( Exception $ex ) {
$err_msg = $ex->getMessage() ;
}
}
function callback() {
$PIN = '1111';
$wsdl_url = "https://URL/NewIPGServices/Confirm/ConfirmService.asmx?WSDL";
$Token = $_REQUEST ["Token"];
$status = $_REQUEST ["status"];
$OrderId = $_REQUEST ["OrderId"];
$TerminalNo = $_REQUEST ["TerminalNo"];
$Amount = $_REQUEST ["Amount"];
if ( $status == 0) {
$params = array (
"LoginAccount" => $PIN,
"Token" => $Token
);
$client = new SoapClient ( $wsdl_url );
try {
$result = $client->ConfirmPayment ( array (
"requestData" => $params
) );
if ($result->ConfirmPaymentResult->Status != '0') {
$err_msg = "(<strong> error : " . $result->ConfirmPaymentResult->Status . "</strong>) " .
$result->ConfirmPaymentResult->Message ;
}
} catch ( Exception $ex ) {
$err_msg = $ex->getMessage() ;
}
}elseif($status) {
$err_msg = "status " . $status;
}else {
$err_msg = "no response " ; echo $err_msg;
}
}
EDIT: I noticed that after completing payment chrome goes to last else
and shows "no response", but all other browsers successfully return.
IMPORTANT EDIT: It is because of transfer from 'https' protocol from bank URL to 'http' protocol of my website. It seems, it is a bug in new chrome update or they want to force websites to use SSL. I have checked with bank a few minutes ago and there are many websites have this problem. I don't know if there is a solution or we should wait for next chrome version or we have to use SSL
EDIT: I changed my site to https protocol but problem still exist with chrome!