Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 999 Bytes

README.md

File metadata and controls

57 lines (41 loc) · 999 Bytes

payu-php-ipn-server

By this Class you can check and process payu ipn messages

Usage :

<?php 

  require 'PayuIpnServer.php';
  $payuIpnServer = new PayuIpnServer;
  $response = $payuIpnServer->init();


  if($response['status']==true)
    echo $response['result'];
  else
    echo $response['error'];

?>

Success Response :

<EPAYMENT>20161222231812|c23d802af0b21c88fe7f86c6a38a42b5</EPAYMENT>

Secret Key Definition

PayuIpnServer.php on line 14
private static $secret = 'XXXXXXXXXXXX';

Customizing for request data and live order data equality

PayuIpnServer.php on line 67
$resultHash = self::hmac($pass, $return);
$returnArr['result'] = "<EPAYMENT>" . $dateReturn . "|" . $resultHash . "</EPAYMENT>";

/*
 * Here check equality with your order data. 
 * if not equal,  set $returnArr['error'] wtih your custom error msg and 
 * not set $returnArr['status'] = true;
 * 
 * */

$returnArr['status'] = true;
return $returnArr;