1

我正在将柑橘支付网关与 CodeIgniter 站点集成,它在本地主机上工作,但不在服务器上。

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表单动作。

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

4

0 回答 0