SagePay 表单 - 经典 ASP - 使用 rijndael.asp 缺少货币字段 [英] SagePay Form - Classic ASP - Currency Field is missing using rijndael.asp

查看:16
本文介绍了SagePay 表单 - 经典 ASP - 使用 rijndael.asp 缺少货币字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Classic ASP 中添加 Form Intergration SagePay 支付网关.我有一个来自 SO 的工作 PHP 版本.我已经将它翻译成 VBSCRIPT,一切似乎都工作正常,但加密.

我使用与 PHP 脚本相同的所有输入,因此 Cryptstring 与加密之前的 PHP Cryptstring 完全相同.

我已经下载并使用了 Rijndael.asp &include.asp 文件在这里找到:使用经典加密加密字段用于 SagePay 表单集成的 ASP

但我继续收到以下错误:

<上一页>状态:畸形状态详细信息: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 文件="classes/includes.asp" --><!-- #include file="classes/sagepay.asp" --><% 设置 objSagePay=new SagePay %><%objSagePay.setCurrency("GBP") %><%objSagePay.setAmount(200) %><% objSagePay.setDescription("Lorem ipsum") %><% objSagePay.setBillingSurname("Mustermann") %><% objSagePay.setBillingFirstnames("Max") %><% objSagePay.setBillingCity("科隆") %><%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() %><%= 地穴 %><div id="内容"><form method="POST" id="SagePayForm" action="https://test.sagepay.com/gateway/service/vspform-register.vsp"><输入类型=隐藏"名称=VPSProtocol"值=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="继续SagePay"></表格>

<小时>

任何指导将不胜感激.

解决方案

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

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

strEncryptionPassword="mcAX65PTadrrsKQ3"

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

I am trying to add the Form Intergration SagePay payment gateway in Classic ASP. I have a working PHP version that I sourced from SO. I have translated it into VBSCRIPT, everything seems to be working fine but the encryption.

I am using all the same inputs as the PHP script so that the Cryptstring is exactly the same as the PHP Cryptstring before it is encrypted.

I've downloaded and using the Rijndael.asp & includes.asp files found here: Encrypting Crypt field using Classic ASP for SagePay Form Integration

But I continue to receive the following error:

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=

I've tried manually adding certain fields into the crypt string, I've tried GET to anther page without the encryption to view the full output.

My encryption password is correct, I've double and triple checked it. Its entered in the includes.php file.


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>


Any guidance would be appreciated.

解决方案

I'm in the same boat. I can encrypt and decrypt perfectly with exactly the same results but when it is passed to Sagepay I get the error - Currency field is missing.

Update: I have managed to solve this error. Make sure in the 'includes.asp' that you change the existing line:

strEncryptionPassword="mcAX65PTadrrsKQ3"

to include the password that is in your original Sagepay 'includes.asp' file. Do not use the default password that comes with the download link in your post.

这篇关于SagePay 表单 - 经典 ASP - 使用 rijndael.asp 缺少货币字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆