omn​​ipay支付墙集成-Error

时间:2016-12-28 04:54:44

标签: omnipay

我尝试使用omnipay库实现与 Laravel 的支付墙支付网关集成。设置setApiTypesetPublicKeysetPrivateKey后尝试调用 API ,获取响应" 公钥错过或无效"从支付墙网关。 实际上,由于将参数公钥作为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] => 
        )

)

公钥错过或无效

1 个答案:

答案 0 :(得分:0)

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

  • 这适用于其他所有人。您确定钥匙没有问题吗?您是否可以检查提供给库的密钥中是否存在伪造的新行等?
  • Omnipay中公钥参数的正确名称是publicKey。 paymentwall库中的正确名称是public_key。检查代码似乎表明参数命名是正确的。 Omnipay publicKey参数以public_key正确传递到paymentwall库。