簡體   English   中英

在現場集成epdq

[英]integrating epdq on site

我正在將epdq付款網關集成到我的網站上,並出現錯誤:

這是我的代碼:

<?php
$amount = str_replace('&pound;', '', 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">

我沒有在epdq頁上選擇收款人和金額,但是當我更改金額格式時,例如是否輸入了錯誤的金額(如16.80),則在epdq頁上選擇了收款人但沒有金額並在錯誤日志中給出了錯誤。

有什么建議嗎?

我做到了那是SHAIN問題。 我生成了SHA-1,但在epdq中選擇了SHA-256。

還是謝謝你,

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM