2014-12-02 48 views
0

我整合epdq支付網關在我的網站,並收到錯誤:整合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頁面。

有什麼建議嗎?

回答

0

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

不管怎樣謝謝,