【问题标题】:SagePay Form - Classic ASP - Currency Field is missing using rijndael.aspSagePay 表单 - 经典 ASP - 使用 rijndael.asp 缺少货币字段
【发布时间】: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


【解决方案1】:

我在同一条船上。我可以用完全相同的结果完美地加密和解密,但是当它传递给 Sagepay 时,我收到错误 - 货币字段丢失。

更新:我已经设法解决了这个错误。确保在“includes.asp”中更改现有行:

strEncryptionPassword="mcAX65PTadrrsKQ3"

包含原始 Sagepay 'includes.asp' 文件中的密码。不要使用帖子中下载链接附带的默认密码。

【讨论】:

    猜你喜欢
    • 2013-11-08
    • 1970-01-01
    • 1970-01-01
    • 2014-07-10
    • 1970-01-01
    • 1970-01-01
    • 2014-11-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多