【问题标题】:omnipay payment wall integration -Erroromn​​ipay 支付墙集成 - 错误
【发布时间】:2017-05-12 08:29:29
【问题描述】:

我尝试使用omnipay库实现paymentwall支付网关与Laravel的集成。设置setApiTypesetPublicKeysetPrivateKey并尝试调用API ,它从支付墙网关得到响应“Public key is missing or invalid”。 实际上,这个错误是由于将参数公钥传递为public_Key 而不是来自omnipay 库的public_key

以下是回复

[request:protected] => Omnipay\PaymentWall\Message\PurchaseRequest Object
        (
            [endPoint:protected] => https://api.paymentwall.com/api
            [parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
                (
  [parameters:protected] => Array
                        (
                            [apiType] => 0
                            [publicKey] => hjghjghsdfsc5464564564e56456
                            [privateKey] => gfh4567686786787hfjfhgfgfgh
                            [amount] => 10.00
                            [currency] => USD
                            [accountId] => 
                            [description] => test Pay
                            [email] => test@gmail.com
                            [clientIp] => 112.133.236.158
                            [browserDomain] => test.com
                            [card] => Omnipay\Common\CreditCard Object



[response:protected] => Omnipay\PaymentWall\Message\Response Object
 *RECURSION*
            [zeroAmountAllowed:protected] => 1
            [negativeAmountAllowed:protected] => 
        )

    [data:protected] => Array
        (
            [type] => Error
            [object] => Error
            [error] => Public key is missed or invalid
            [code] => 2111
            [log] => 
        )

)

公钥丢失或无效

【问题讨论】:

    标签: omnipay


    【解决方案1】:

    正如我在您在 github 上提出的问题中评论的那样:

    • 这适用于其他所有人。你确定你的钥匙真的没有问题吗?您能否检查提供给图书馆的密钥中是否没有虚假的换行符等?
    • Omnipay 中公钥参数的正确名称是 publicKey。支付墙库中的正确名称是 public_key。检查代码似乎表明参数命名是正确的。 Omnipay publicKey 参数作为 public_key 正确传递到支付墙库。

    【讨论】:

      猜你喜欢
      • 2015-01-21
      • 2019-06-27
      • 2014-07-06
      • 2015-05-06
      • 2015-12-19
      • 2018-05-26
      • 2013-07-07
      • 2017-04-09
      • 1970-01-01
      相关资源
      最近更新 更多