我尝试使用omnipay库实现与 Laravel 的支付墙支付网关集成。设置setApiType
,setPublicKey
和setPrivateKey
后尝试调用 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] =>
)
)
公钥错过或无效
答案 0 :(得分:0)
正如我在你在github上提出的问题所评论的那样: