payment gateway integration with CodeIgniter

1.8k views Asked by At

I am integrating payment gateway of citrus with CodeIgniter site, it is working on localhost but not on the server.

set_include_path('./assets/citrus_lib'.PATH_SEPARATOR.get_include_path());
require_once('./assets/citrus_lib/CitrusPay.php');
require_once('./assets/citrus_lib/Zend/Crypt/Hmac.php');
function generateHmacKey($data, $apiKey=null)
{
    $hmackey = Zend_Crypt_Hmac::compute($apiKey, "sha1", $data);
    return $hmackey;
}
CitrusPay::setApiKey("............",'...............');
$vanityUrl = "................";
$currency = "INR";
$reference = sha1(md5(time()));
$merchantTxnId = $reference;
$returnUrl = 'user_controller/redirect_from_gateway';
$flag = "post";
$orderAmount=$row->amount;
$data = "$vanityUrl$orderAmount$merchantTxnId$currency";
$secSignature = generateHmacKey($data,CitrusPay::getApiKey());
$action = CitrusPay::getCPBase()."$vanityUrl";
$time = time()*1000;
$time = number_format($time,0,'.','');

And used $action in form action.

What is the mistake I made, and how can I fix this ?

0

There are 0 answers