我想在經典ASP中添加表格集成SagePay支付網關。我有一個有效的PHP版本,我從SO購買。我已經將它翻譯成VBSCRIPT,似乎一切正常,但加密。SagePay表單 - 經典ASP - 貨幣字段缺少使用rijndael.asp
我使用的所有輸入都與PHP腳本相同,因此Cryptstring與加密前的PHP Cryptstring完全相同。
我已經下載並使用在這裏找到了Rijndael.asp & includes.asp文件:Encrypting Crypt field using Classic ASP for SagePay Form Integration
但我繼續收到以下錯誤:
Status: MALFORMED Status Detail: 3045 : The Currency field is missing. Cryptstring: VendorTxCode=542534345&ReferrerID=&Amount=200.00&Currency=GBP &Description=Lorem ipsum&SuccessURL=http://www.testserver.co.uk/sagepaytest/success.php &FailureURL=https://www.yoururl.org/fail.php&CustomerName=&CustomerEMail=&VendorEMail= &SendEMail=&eMailMessage=&BillingSurname=Mustermann&BillingFirstnames=Max &BillingAddress1=Bahnhofstr. 1&BillingAddress2=&BillingCity=Cologne&BillingPostCode=50650 &BillingCountry=DE&BillingState=&BillingPhone=&DeliverySurname=Mustermann &DeliveryFirstnames=Max&DeliveryAddress1=Bahnhofstr. 1&DeliveryAddress2= &DeliveryCity=Cologne&DeliveryPostCode=50650&DeliveryCountry=DE&DeliveryState= &DeliveryPhone=&Basket=&AllowGiftAid=&ApplyAVSCV2=&Apply3DSecure=&BillingAgreement= &BasketXML=&CustomerXML=&SurchargeXML=&VendorData=&ReferrerID=&Language=&Website=
我手動嘗試添加一定字段放入crypt字符串中,我嘗試了GET,以便在沒有加密的情況下查看完整輸出。
我的加密密碼是正確的,我有雙倍和三倍檢查它。它在includes.php文件中輸入。
的index.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include file="classes/includes.asp" -->
<!-- #include file="classes/sagepay.asp" -->
<% Set objSagePay=new SagePay %>
<% objSagePay.setCurrency("GBP") %>
<% objSagePay.setAmount(200) %>
<% objSagePay.setDescription("Lorem ipsum") %>
<% objSagePay.setBillingSurname("Mustermann") %>
<% objSagePay.setBillingFirstnames("Max") %>
<% objSagePay.setBillingCity("Cologne") %>
<% objSagePay.setBillingPostCode("50650") %>
<% objSagePay.setBillingAddress1("Bahnhofstr. 1") %>
<% objSagePay.setBillingCountry("de") %>
<% objSagePay.setDeliverySameAsBilling() %>
<% objSagePay.setSuccessURL("http://www.testserver.co.uk/sagepaytest/success.php") %>
<% objSagePay.setFailureURL("https://www.yoururl.org/fail.php") %>
<% Crypt=objSagePay.getCrypt() %>
<%= Crypt %>
<div id="content">
<form method="POST" id="SagePayForm" action="https://test.sagepay.com/gateway/service/vspform-register.vsp">
<input type="hidden" name="VPSProtocol" value= "3.00">
<input type="hidden" name="TxType" value= "PAYMENT">
<input type="hidden" name="Vendor" value= "vendorname">
<input type="hidden" name="Crypt" value= "<%= objSagePay.getCrypt() %>">
<input type="submit" value="continue to SagePay">
</form>
任何指導,將不勝感激。
我也嘗試過使用相同數據和密碼的SagePay crypt示例,它帶來了一個完全不同的CryptString。我沒有足夠的經驗去嘗試和剖析rijndael.asp – 2015-02-07 14:32:00