【发布时间】:2015-04-07 14:48:21
【问题描述】:
我正在尝试在 Classic ASP 中添加 Form Intergration SagePay 支付网关。我有一个来自 SO 的工作 PHP 版本。我已经将它翻译成 VBSCRIPT,一切似乎都工作正常,但加密。
我使用与 PHP 脚本相同的所有输入,因此 Cryptstring 与加密之前的 PHP Cryptstring 完全相同。
我已经下载并使用了 Rijndael.asp 和 includes.asp 文件:Encrypting Crypt field using Classic ASP for SagePay Form Integration
但我继续收到以下错误:
状态:畸形 状态详细信息:3045:缺少货币字段。 加密字符串: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=班霍夫大街。 1&BillingAddress2=&BillingCity=科隆&BillingPostCode=50650 &BillingCountry=DE&BillingState=&BillingPhone=&DeliverySurname=Mustermann &DeliveryFirstnames=Max&DeliveryAddress1=Bahnhofstr. 1&DeliveryAddress2= &DeliveryCity=科隆&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
标签: encryption vbscript asp-classic opayo rijndael