2015-05-08 31 views
0

我被要求協助將SagePay定製支付實施從協議v2.22升級到協議v3.0。SagePay升級2.22至3.0無密鑰字段

我試圖按照此頁面上的說明: https://www.sagepay.co.uk/support/12/36/upgrading-from-2-22-to-3-00-a-brief-overview

的第一個問題我已經是無處在現有的代碼是有一個「地穴」字段。事實上, '數據' 是使用curl發送的SSL與這些線(及其他):

// Set the URL 
curl_setopt ($curlSession, CURLOPT_URL, $url); 
// No headers, please 
curl_setopt ($curlSession, CURLOPT_HEADER, 0); 
// It's a POST request 
curl_setopt ($curlSession, CURLOPT_POST, 1); 
// Set the fields for the POST 
curl_setopt ($curlSession, CURLOPT_POSTFIELDS, $data); 
// Return it direct, don't print it out 
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1); 
// This connection will timeout in 60 seconds 
curl_setopt($curlSession, CURLOPT_TIMEOUT,60); 
//The next two lines must be present for the kit to work with newer version of cURL 
//You should remove them if you have any problems in earluer version of cURL 
curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, FALSE); 
curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 1); 

難道我也許只是需要改變這樣的:

$ProtocolVersion = "2.22"; 

要這樣:

$ProtocolVersion = "3.0"; 

並添加新的必填字段。工作完成了嗎?

謝謝!

回答

0

如果現有代碼中沒有隱藏字段,則可能根本沒有使用表單協議,因此將編碼從XOR更改爲AES加密不是您的煩惱。

2.22到3.00比2.23 - 3.00大一點,所以在從2.22遷移到3.00時需要做的主要改變是將地址字段拆分爲BillingAddress1,BillingAddress2等。還有一些額外的功能可以獲得通過提交一些非必填字段,但這將取決於你。

還要注意的是賢者收費返回一些額外的東西在迴應,所以這將是值得確保你能處理(或利用它!)

裏克

+0

謝謝。我會玩一些測試付款,看看事情是如何平息的。我會報告結果。 – Claud