支付网关与CodeIgniter的集成

时间:2015-06-17 09:39:18

标签: php codeigniter payment-gateway citrus-pay

我正在将柑橘的支付网关与CodeIgniter网站集成,它正在使用localhost但不在服务器上。

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,'.','');

在表单操作中使用$action

我犯了什么错误,我该如何解决?

0 个答案:

没有答案