[英]integrating epdq on site
I am integrating epdq payment gateway on my site and getting error: 我正在将epdq付款网关集成到我的网站上,并出现错误:
here is my code: 这是我的代码:
<?php
$amount = str_replace('£', '', appthemes_get_price( $order->get_total(), $order->get_currency() ));
//str_replace('£', '', appthemes_get_price( $order->get_total())) * 100;
$hParams = array();
$hParams['ACCEPTURL'] = 'http://www.ukflightcottage.com/book-online/online-booking-done.php';
$hParams['AMOUNT'] = round($amount) * 100;
$hParams['CANCELURL'] = 'http://www.ukflightcottage.com/book-online/';
$hParams['CURRENCY'] = 'GBP';
$hParams['DECLINEURL'] = 'http://www.ukflightcottage.com/book-online/';
$hParams['EXCEPTIONURL'] = 'http://www.ukflightcottage.com/book-online/';
$hParams['LANGUAGE'] = 'en_US';
$hParams['ORDERID'] = $order->get_id();
$hParams['PSPID'] = 'epdq1111111';
$hParams['WIN3DS'] = 'MAINW';
$aParams = array();
foreach( $hParams as $k=>$v ) {
$aParams[] = $k . '=' . $v;
}
$shain = 'Abcdefghijkl1234';
$string = implode( $shain, $aParams ) . "{$shain}";
$enc_string= ( sha1( ( $string ) ) );
//print $string;
$enc_string;
?>
<input type="hidden" name="ACCEPTURL" value="http://www.planetoftheads.com/bank-transfer-success/" />
<input type="hidden" name="AMOUNT" value="<?php echo round($amount) * 100;?>" />
<input type="hidden" name="CANCELURL" value="http://www.planetoftheads.com" />
<input type="hidden" name="CURRENCY" value="GBP" />
<input type="hidden" name="DECLINEURL" value="http://www.planetoftheads.com" />
<input type="hidden" name="EXCEPTIONURL" value="http://www.planetoftheads.com" />
<input type="hidden" name="LANGUAGE" value="en_US" />
<input type="hidden" name="ORDERID" value="<?php echo $order->get_id(); ?>" />
<input type="hidden" name="PSPID" value="epdq1234567" />
<input type="hidden" name="WIN3DS" value="MAINW" />
<input type="hidden" name="SHASIGN" value="<?php echo $enc_string; ?>" />
<input type="submit" value="Pay Now">
I its not picking Beneficiary and amount on the epdq page but when I change the amount format like if I put any wrong amount like 16.80 its picking Beneficiary but not amount and giving error in error log on epdq page. 我没有在epdq页上选择收款人和金额,但是当我更改金额格式时,例如是否输入了错误的金额(如16.80),则在epdq页上选择了收款人但没有金额并在错误日志中给出了错误。
Any suggestion please ? 有什么建议吗?
I have done it that was SHAIN problem. 我做到了那是SHAIN问题。 I generated SHA-1 but in the epdq there is SHA-256 selected. 我生成了SHA-1,但在epdq中选择了SHA-256。
Anyway Thanks, 还是谢谢你,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.