1

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!

Amir
  • 4,089
  • 4
  • 16
  • 28
  • Enter the developer console and disable cache. – Markus Zeller Aug 22 '20 at 09:23
  • @MarkusZeller, It goes to a loop showing "waiting for cache" in status bar. developer console shows anything. – Amir Aug 22 '20 at 09:45
  • @MarkusZeller, please read my post edit. – Amir Aug 22 '20 at 10:33
  • @MarkusZeller, please read my important edit. – Amir Aug 23 '20 at 07:53
  • Once coming from https you can not downgrade to http - as a security policy from Webkit. Just make `$site_call_back_url` also working with https and you should be good to go. – Markus Zeller Aug 23 '20 at 07:54
  • @MarkusZeller, is this a solution? https://stackoverflow.com/a/49072136/1906322 – Amir Aug 23 '20 at 08:08
  • I can not tell, because https works only when the server has an appropriate signed certificate. You need to test that. You also could try to change just http to https. Alternatively you could try to [disable Chromes certficate verification](https://stackoverflow.com/questions/26388405/chrome-disable-ssl-checking-for-sites) (which is a very very bad idea). – Markus Zeller Aug 23 '20 at 09:16
  • @MarkusZeller... I changed my site to https, but problem still exists with chrome!!! – Amir Sep 24 '20 at 13:58
  • On Windows you need to use the certmgr and import your own signed certificate into the trusted root certificates. Then restart browser and it should work. – Markus Zeller Sep 24 '20 at 14:08
  • @MarkusZeller, windows and browsers have not any problem with certificate. I did not see any message about the certificate. Also i should mention, it is just a few hours i moved to https – Amir Sep 24 '20 at 15:04
  • Btw, opening that URL ends up in an endless reload. – Markus Zeller Sep 24 '20 at 15:43
  • @MarkusZeller ...open with Firefox or IE – Amir Sep 24 '20 at 15:52
  • @MarkusZeller , Yes you right it is Irrelevant... so it seems , it was not downgrade https to http. – Amir Sep 24 '20 at 16:37

1 Answers1

0

I am getting the waiting for cache message from multiple sites, until they eventually time out.

As absurd as it is, the solution for me was to use safari until chrome randomly fixed itself.

stevec
  • 41,291
  • 27
  • 223
  • 311