我正在将柑橘的支付网关与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
。
我犯了什么错误,我该如何解决?