首页 \ 问答 \ Nodejs SOAP Payex提供Errorcode ValidationError_HashNotValid(Nodejs SOAP Payex giving Errorcode ValidationError_HashNotValid)

Nodejs SOAP Payex提供Errorcode ValidationError_HashNotValid(Nodejs SOAP Payex giving Errorcode ValidationError_HashNotValid)

感谢您的时间! 我正在尝试与NodeJS建立SOAP连接以使用Payex验证卡。 连接有效,但Payex返回:

Initialize8Result: '<?xml version="1.0" encoding="utf-8" ?>
  <payex>
    <header name="Payex Header v1.0">
      <id>7e6eb2d7317c4ca5ae3bec074ed9f4c4</id>
      <date>2016-12-18 01:45:13</date>
    </header>
    <status>
      <code>ValidationError_HashNotValid</code>
      <errorCode>ValidationError_HashNotValid</errorCode>
      <description>Admin.ValidateMerchantLogon:Invalid hash</description>
      <paramName /><thirdPartyError />
    </status>
  </payex>'

我无法为我的生活找出原因。 正如我按照这里的文档 。 当前连接如下所示:

const soap = require('soap');
const crypto = require('crypto')

module.exports = (req, res) => {
    const wsdlUrl = 'https://external.externaltest.payex.com/pxorder/pxorder.asmx?WSDL';
    const encryptionKey = 'encryptionkey';

    const sendData = {
        AccountNumber: 1111111,
        purchaseOperation: 'AUTHORIZATION',
        price: 100,
        priceArgList: '',
        currency: 'NOK',
        vat: 0,
        orderID: 'test',
        productNumber: '1',
        description: 'test description',
        clientIPAddress: '127.0.0.1',
        clientIdentifier: 'USERAGENT=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
        additionalValues: 'RESPONSIVE=1',
        externalID: '',
        returnUrl: 'http://google.com',
        view: 'CREDITCARD',
        agreementRef: '',
        cancelUrl: 'http://google.com',
        clientLanguage: 'nb-NO',
    };

    const encryptString = Object.keys(sendData).map(key => sendData[key]).join('') + encryptionKey;
    const hash = crypto.createHash('md5').update(encryptString).digest('hex');

    sendData['hash'] = hash;

    soap.createClient(wsdlUrl, (err, soapClient) => {
        if (err) {
            return res.status(500).json(err);
        }
        soapClient.Initialize8(sendData, (err, res) => {
            if (err) {
                return res.status(500).json(err);
            }
            console.log(res);
        });
    });
};

我希望你们中的一个人看到我哪里出错了! 谢谢<3


thank you for your time! I'm trying to setup a SOAP connection with NodeJS to validate cards with Payex. The connection works, however Payex returns:

Initialize8Result: '<?xml version="1.0" encoding="utf-8" ?>
  <payex>
    <header name="Payex Header v1.0">
      <id>7e6eb2d7317c4ca5ae3bec074ed9f4c4</id>
      <date>2016-12-18 01:45:13</date>
    </header>
    <status>
      <code>ValidationError_HashNotValid</code>
      <errorCode>ValidationError_HashNotValid</errorCode>
      <description>Admin.ValidateMerchantLogon:Invalid hash</description>
      <paramName /><thirdPartyError />
    </status>
  </payex>'

And I can't for the life of me figure out why. As I've followed the documentation located here. Current connection looks like this:

const soap = require('soap');
const crypto = require('crypto')

module.exports = (req, res) => {
    const wsdlUrl = 'https://external.externaltest.payex.com/pxorder/pxorder.asmx?WSDL';
    const encryptionKey = 'encryptionkey';

    const sendData = {
        AccountNumber: 1111111,
        purchaseOperation: 'AUTHORIZATION',
        price: 100,
        priceArgList: '',
        currency: 'NOK',
        vat: 0,
        orderID: 'test',
        productNumber: '1',
        description: 'test description',
        clientIPAddress: '127.0.0.1',
        clientIdentifier: 'USERAGENT=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
        additionalValues: 'RESPONSIVE=1',
        externalID: '',
        returnUrl: 'http://google.com',
        view: 'CREDITCARD',
        agreementRef: '',
        cancelUrl: 'http://google.com',
        clientLanguage: 'nb-NO',
    };

    const encryptString = Object.keys(sendData).map(key => sendData[key]).join('') + encryptionKey;
    const hash = crypto.createHash('md5').update(encryptString).digest('hex');

    sendData['hash'] = hash;

    soap.createClient(wsdlUrl, (err, soapClient) => {
        if (err) {
            return res.status(500).json(err);
        }
        soapClient.Initialize8(sendData, (err, res) => {
            if (err) {
                return res.status(500).json(err);
            }
            console.log(res);
        });
    });
};

I hope one of you see where I go wrong! Thanks <3


原文:https://stackoverflow.com/questions/41205056
更新时间:2022-06-10 16:06

最满意答案

使用以下选择器之一

img[src$='small.gif'] - 仅显示src small.gif 结尾的图像

要么

img[src*='small'] - 仅显示其src 包含单词small的图像。

使用CSS

.small_images img[src$='small.gif']{
    display: block;
}
/* or */

.small_images img[src*='small']{
    display: block;
}

使用jQuery

$('.small_images img[src$="small.gif"]').show();
/* or */
$('.small_images img[src$="small.gif"]').css('display','block');

/* or */

$('.small_images img[src*="small"]').show();
/* or */
$('.small_images img[src*="small"]').css('display','block');

附加信息:(根据您对问题的更改)

添加.small_images将确保display仅设置为具有class='small_images'的元素下的img标记。


Use one of the below selectors

img[src$='small.gif'] - to display only images whose src ends with small.gif

or

img[src*='small'] - to display only images which contain the word small in its src.

Using CSS

.small_images img[src$='small.gif']{
    display: block;
}
/* or */

.small_images img[src*='small']{
    display: block;
}

Using jQuery

$('.small_images img[src$="small.gif"]').show();
/* or */
$('.small_images img[src$="small.gif"]').css('display','block');

/* or */

$('.small_images img[src*="small"]').show();
/* or */
$('.small_images img[src*="small"]').css('display','block');

Additional Info: (based on your change to the question)

Adding .small_images would make sure that the display is set to only those img tags that are present under the element with class='small_images'.

相关问答

更多
  • 分支以.git目录中的文件存储。 单个分支是一个包含散列到分支指向的提交对象的单个文件。 所以,正如你猜测的那样,当创建一个分支foo/bar这将对应一个带有文件的目录。 所以Git会创建一个文件夹foo ,然后指向提交。 这意味着当你添加另一个分支foo/baz它会创建一个文件baz并将其添加到文件夹中。 现在分支名称对于不区分大小写的文件系统是不区分大小写的。 这意味着FOO/bar和foo/bar是相同的。 但实际的内部名称取自原始文件夹和文件名。 因此,当您的bugfix分支类别的文件夹以大写字母书 ...
  • 你对旧的IDE是正确的 作为一名DBA,尝试使用SQL Server企业管理器(SQL Server 2000和7.0)修复权限,它试图查看权限是一个完整的bug。 如果您有ufn或usp或vw,由于GUI呈现数据的方式,将事情组合在一起变得更容易。 说,如果你有SELECT * FROM Thing ,那是什么? 一个视图或一张桌子? 它可能适合作为开发人员使用,但部署时会崩溃,因为您不授予对表本身的权限:仅视图或特效。 vwThing肯定会让你的血压降下来......? 如果你使用模式,它就变得无关紧要 ...
  • 您的名为src变量目前尚未定义。 我相信你想做这样的事情。 小提琴 。 $(document).ready(function () { $("img").each(function () { var src = $(this).attr('src'); var cacheId = Math.floor(Math.random() * 10000) + 1; $(this).attr('src', src + "?r=" + cacheId); ...
  • @ElenaDBA,你能回答我以下问题吗? ords的版本? 您是在迁移Apex还是全新安装? 它是prod还是开发安装? 您的数据库是否是PDB? 我会根据你的答案提供解决方案吗? 以下是不使用SQL Developer的步骤? 安装java 7+和TOMCAT 设置JAVA_HOME 通过运行没有ords.war的tomcat服务器,确保正确配置了tomcat。 为ORDS用户创建用户 ALTER USER APEX_PUBLIC_USER identified by password123 ACCOU ...
  • 尝试将每张幻灯片的可见项目数设置为4,并相应地设置您的列。 但似乎已经做的伎俩是调整CSS。 我有它的工作检查出来: https://www.codeply.com/go/tRCLIBR462 Try setting the number of visible items per slide to 4 and set up your columns accordingly. But what seems to have done the trick is tweaking the css. I got it ...
  • 您可以检查文件名是否以“GR”开头,例如: for (int i = 0; i < listFile.length; i++) { String fileName = listFile[i].getName(); if (fileName.startsWith("GR")) f.add(listFile[i].getAbsolutePath()); } 与for-each相同 for (File file : listFile ...
  • 好吧,你确实需要一个命名空间。 像这样的东西本身是无效的,因为acp不映射到任何名称空间,这是前缀应该做的事情。 您需要做的是在要为type元素调用CreateElement时添加要添加的元素。 public class StackOverflow_10807173 { public static void Test() { XmlDocument doc = new XmlDocument(); XmlElement RootEleme ...
  • 我现在正在关闭它,似乎没有智能感知器来实现这一目标。 I'm closing this now, there seems to be no switch for IntelliSense to achieve this.
  • 使用以下选择器之一 img[src$='small.gif'] - 仅显示src 以 small.gif 结尾的图像 要么 img[src*='small'] - 仅显示其src 包含单词small的图像。 使用CSS .small_images img[src$='small.gif']{ display: block; } /* or */ .small_images img[src*='small']{ display: block; } 使用jQuery $('.small_im ...
  • 您可以将isDevMode与ngClass 一起使用。 假设你有css如下 .bg-dev { background: url("/assets/map.jpg"); } .bg-prod { background: url("/static/assets/map.jpg"); } 使用ngClass在这两个类之间切换。 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)