在Magento 2.3.1上使用Authorized.Tet作为付款方式下订单时 出现此错误
“无法验证网关响应的真实性”
有人可以启发我这个错误的全部含义,并帮助我解决此错误吗?
V1/guest-carts/fYSiT09cTjrNy2T14YzaXPXDlDMjMUUL/payment-information 400 (bad request)
{message: "The authenticity of the gateway response could not be verified.",…}
message: "The authenticity of the gateway response could not be verified."
trace: "#0 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\GuestPaymentInformationManagement->savePaymentInformationAndPlaceOrder('fYSiT09cTjrNy2T...', 'roeland@alwayso...', Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address))
#1 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)
#2 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}('fYSiT09cTjrNy2T...', 'roeland@alwayso...', Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address))
#3 /home/eaglesc3/public_html/generated/code/Magento/Checkout/Model/GuestPaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#4 [internal function]: Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder('fYSiT09cTjrNy2T...', 'roeland@alwayso...', Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address))
#5 /home/eaglesc3/public_html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#6 /home/eaglesc3/public_html/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#7 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#9 /home/eaglesc3/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#10 /home/eaglesc3/public_html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#11 /home/eaglesc3/public_html/vendor/magento/framework/App/Http.php(136): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /home/eaglesc3/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#13 /home/eaglesc3/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#14 /home/eaglesc3/public_html/index.php(92): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#15 {main}"
答案 0 :(得分:2)
在2.3.3上解决了同一问题。在使用authorize.net的沙箱为我们的开发服务器生成新密钥之后,我遇到了它。以为我可能以错误的顺序生成了密钥(根据glsAdmin的回答),但是生成时间却排列正确。我调试了事务响应,并在其中找到了必要的数据(已填充transHashSha2
)。那么,怎么了?
对于我来说,它是通过重新生成密钥并在生成新密钥时选中“立即禁用旧交易密钥” 和“立即禁用旧签名密钥” 来解决的在Authorize.net上输入密钥。
答案 1 :(得分:1)
看source code,此错误似乎集中在用于验证响应的散列周围。 transactionResponse->transHashSha2
和transactionResponse->transHash
似乎都是空的或哈希本身无效。
Your version of Magento seems to support this change并指出解决此问题所需执行的操作。由于您使用的Magento版本支持此更改,因此您可能必须对Authorize.Net帐户进行更改。确保您:
答案 2 :(得分:0)
从Magento1迁移到Magento2.3.1完全是相同的问题,专门用于authorize.net转换。
在创建新的交易密钥之前,我犯了一个错误,那就是去authorize.net并创建一个新的签名。
大量阅读(并得到https://www.solvature.us/的帮助)后,我们发现创建的顺序与密钥的新创建同样重要。
首先创建一个新的事务密钥(请记住,这可能会影响活动的集成,因此请小心)。其次,创建新的签名。
希望这会有所帮助。