使用Barclaycard付款epdq创建别名-未知订单/ 1 / s /

 建哥2502897913 发布于 2023-01-01 19:51

下面是用于创建无法使用并引发错误“未知订单/ 1 / s /”的别名的代码。如果删除Alias的代码,则相同的代码可用于付款。不知道我在想什么?我可以登录到epdq barclaycard帐户,看到错误为“ unknown order / 1 / s /”。我也可以通过epdq帐户手动创建Alias,但无法无错误地进入orderstandard.asp页(使用别名隐藏字段和代码时)。

如果有人可以帮助我,我会很高兴。


... using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; //for Encoding using System.Security.Cryptography; //for SHA1 public partial class _DefaultAliasTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //-- Set Values (these would be pulled from DB or a previous page). -- // bool isAlias = true; //- Customer/Order Details - // string strUserTitle = "Mr"; // Customer details string strUserFirstname = "Edward"; string strUserSurname = "Shopper"; string strBillHouseNumber = "123"; // Address Details string strAd1 = "Penny Lane"; string strAd2 = "Central Areas"; string strBillTown = "Middlehampton"; // Bill Town string strBillCountry = "England"; // Bill Country string strPcde = "NN4 7SG"; // Postcode string strContactTel = "01604 567 890"; // Contact Telephone number string strShopperEmail = "test@test.com"; // shopper Email string strShopperLocale = "en_GB"; // shopper locale string strCurrencyCode = "GBP"; // CurrecncyCode string strAddressline1n2 = strBillHouseNumber + " " + strAd1 + ", " + strAd2; // Concatenated Address eg 123 Penny Lane Central Areas string strCustomerName = strUserTitle + " " + strUserFirstname + " " + strUserSurname; // Concatenated Customer Name eg Mr Edward Shopper string strPaymentAmount = "100"; // This is 1 pound (100p) string strOrderDataRaw = "HDTV - AVTV3000"; // Order description string strOrderID = "ORD1234556Y"; // Order Id - **needs to be unique** //- integration user details - // string strPW = "xxxxxx!?"; // Update with the details you entered into back office string strPSPID = "epdqxxxxxxx"; // update with the details of the PSPID you were supplied with //- payment design options - '// string strTXTCOLOR = "#005588"; // Page Text Colour string strTBLTXTCOLOR = "#005588"; // Table Text Colour string strFONTTYPE = "Helvetica, Arial"; // fonttype string strBUTTONTXTCOLOR = "#005588"; // Button Text Colour string strBGCOLOR = "#d1ecf3"; // Page Background Colour string strTBLBGCOLOR = "#ffffff"; // Table BG Colour string strBUTTONBGCOLOR = "#cccccc"; // Button Colour string strTITLE = "Testing - Secure Payment Page"; // Title string strLOGO = "https://www.site.com/logo.png"; // logo location string strPMLISTTYPE = "1"; // Payment Method List type string strALIAS = System.Guid.NewGuid().ToString(); string strALIASUSAGE = "usage"; // ALIAS USAGE string strALIASOPERATION = "BYMERCHANT"; // ALIAS Operation //= create string to hash (digest) using values of options/details above. MUST be in field alphabetical order! string plainDigest = "AMOUNT=" + strPaymentAmount + strPW + "BGCOLOR=" + strBGCOLOR + strPW + "BUTTONBGCOLOR=" + strBUTTONBGCOLOR + strPW + "BUTTONTXTCOLOR=" + strBUTTONTXTCOLOR + strPW + "CN=" + strCustomerName + strPW + "COM=" + strOrderDataRaw + strPW + "CURRENCY=" + strCurrencyCode + strPW + "EMAIL=" + strShopperEmail + strPW + "FONTTYPE=" + strFONTTYPE + strPW + "LANGUAGE=" + strShopperLocale + strPW + "LOGO=" + strLOGO + strPW + "ORDERID=" + strOrderID + strPW + "OWNERADDRESS=" + strAddressline1n2 + strPW + "OWNERCTY=" + strBillCountry + strPW + "OWNERTELNO=" + strContactTel + strPW + "OWNERTOWN=" + strBillTown + strPW + "OWNERZIP=" + strPcde + strPW + "PMLISTTYPE=" + strPMLISTTYPE + strPW + "PSPID=" + strPSPID + strPW + "TBLBGCOLOR=" + strTBLBGCOLOR + strPW + "TBLTXTCOLOR=" + strTBLTXTCOLOR + strPW + "TITLE=" + strTITLE + strPW + "TXTCOLOR=" + strTXTCOLOR + strPW + ""; if (isAlias) { plainDigest = plainDigest + "ALIAS=" + strALIAS + strPW + "ALIASUSAGE=" + strALIASUSAGE + strPW + "ALIASOPERATION=" + strALIASOPERATION + strPW + ""; } //Payment //-- insert payment details into hidden fields -- // AMOUNT.Value = strPaymentAmount; // PaymentAmmount : (100 pence) CN.Value = strCustomerName; // Customer Name COM.Value = strOrderDataRaw; // OrderDataRaw (order description) CURRENCY.Value = strCurrencyCode; // CurrecncyCode EMAIL.Value = strShopperEmail; // shopper Email FONTTYPE.Value = strFONTTYPE; // fonttype LANGUAGE.Value = strShopperLocale; // shopper locale LOGO.Value = strLOGO; // logo location ORDERID.Value = strOrderID; // *this ORDER ID* OWNERADDRESS.Value = strAddressline1n2; // AddressLine2 OWNERCTY.Value = strBillCountry; // Bill Country OWNERTELNO.Value = strContactTel; // Contact Telephone number OWNERTOWN.Value = strBillTown; // Bill Town OWNERZIP.Value = strPcde; // Postcode PMLISTTYPE.Value = strPMLISTTYPE; // Payment Method List type PSPID.Value = strPSPID; // *Your PSPID* BGCOLOR.Value = strBGCOLOR; // Page Background Colour BUTTONBGCOLOR.Value = strBUTTONBGCOLOR; // Button Colour BUTTONTXTCOLOR.Value = strBUTTONTXTCOLOR; // Button Text Colour TBLBGCOLOR.Value = strTBLBGCOLOR; // Table BG Colour TBLTXTCOLOR.Value = strTBLTXTCOLOR; // Table Text Colour TITLE.Value = strTITLE; // Title TXTCOLOR.Value = strTXTCOLOR; // Page Text Colour if (isAlias) { ALIAS.Value = strALIAS; ALIASUSAGE.Value = strALIASUSAGE; ALIASOPERATION.Value = strALIASOPERATION; } SHASign.Value = SHA1HashData(plainDigest); // Hashed String of plain digest put into sha sign using SHA1HashData function } }

Samurai Jack.. 6

我通过Barclaycard epdq的客户服务找到了问题的答案。我希望这对其他人有帮助。对我来说,答案是下面以粗体显示的问题

请查看以下有关如何纠正错误“未知订单/ 1 / s /”的详细信息:

此错误表明,当您将客户从网站重定向到ePDQ托管付款页面时,ePDQ无法解密与客户发送的SHASIGN HTML Form值。

此错误的典型原因是:

•在ePDQ后台中配置的SHA-IN密码短语值与您用于加密用于创建SHASIGN参数的交易数据的值不匹配(请确保您将交易发送到正确的ePDQ环境-TEST或PRODUCTION)

•在服务器端代码中计算SHASIGN时,您尚未按字母顺序排列参数

•您没有正确声明某些参数–所有参数和值均区分大小写(所有参数名称必须为大写)

•您设置的HASH ALGORITHM值与服务器端脚本中使用的SHA方法不同(例如,您在ePDQ后台技术信息设置中配置了SHA-256,但在您的服务器中使用SHA-1方法)加密过程)。

•您已经在HTML表单中传递了未包含在SHA-IN计算中的其他参数/​​值对

有关更多信息,请参阅位于ePDQ后台的“支持”->“集成和用户手册”下的“基本和高级电子商务集成指南”。

1 个回答
  • 我通过Barclaycard epdq的客户服务找到了问题的答案。我希望这对其他人有帮助。对我来说,答案是下面以粗体显示的问题

    请查看以下有关如何纠正错误“未知订单/ 1 / s /”的详细信息:

    此错误表明,当您将客户从网站重定向到ePDQ托管付款页面时,ePDQ无法解密与客户发送的SHASIGN HTML Form值。

    此错误的典型原因是:

    •在ePDQ后台中配置的SHA-IN密码短语值与您用于加密用于创建SHASIGN参数的交易数据的值不匹配(请确保您将交易发送到正确的ePDQ环境-TEST或PRODUCTION)

    •在服务器端代码中计算SHASIGN时,您尚未按字母顺序排列参数

    •您没有正确声明某些参数–所有参数和值均区分大小写(所有参数名称必须为大写)

    •您设置的HASH ALGORITHM值与服务器端脚本中使用的SHA方法不同(例如,您在ePDQ后台技术信息设置中配置了SHA-256,但在您的服务器中使用SHA-1方法)加密过程)。

    •您已经在HTML表单中传递了未包含在SHA-IN计算中的其他参数/​​值对

    有关更多信息,请参阅位于ePDQ后台的“支持”->“集成和用户手册”下的“基本和高级电子商务集成指南”。

    2023-01-01 19:52 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有