2016-12-28 47 views
0

我试图实现与paymentwall支付网关集成Laravel使用omnipay library.After设置setApiTypesetPublicKeysetPrivateKey并试图调用API ,其得到响应“公钥错过或无效“从支付墙网关。 其实这个错误发生是由于从omnipay库传递参数公钥为public_Key而不是public_keyomnipay支付墙整合 - 错误

以下是响应

[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] => [email protected] 
          [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] => 
     ) 

) 

公共密钥丢失或无效

回答

0

正如我在这个问题评论说,你提到GitHub上:

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