Home » Java » Payu payment gateway Check Status API live mode issue

Payu payment gateway Check Status API live mode issue

Posted by: admin October 26, 2017 Leave a comment

Questions:

I’m try to integrate payu payment gateway Check Status API live mode with this https://documentation.payubiz.in/check-status-apis/

Live mode : https://secure.payu.in/merchant/postservice.php?form=1 not working

    $key = '*****';
    $salt = '****';
    $command = 'verify_payment';
    $var1 = '167514228';
    $hash = hash('sha256',$key.'|'.$command.'|'.$var1.'|'.$salt); 
    $r = array('key' =>$key , 'hash' =>$hash , 'var1' =>$var1, 'command' 
    =>$command);   
    $wsUrl = "https://info.payu.in/merchant/postservice.php?form=1";
    $qs= http_build_query($r);

    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, $wsUrl);
    curl_setopt($c, CURLOPT_POST, 1);
    curl_setopt($c, CURLOPT_POSTFIELDS, $qs);
    curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
    $o = curl_exec($c);
    print_r($o);
    print_r($c);
Answers: