Mage2 :传递给 Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\S

Posted

技术标签:

【中文标题】Mage2 :传递给 Magento\\Paypal\\Model\\Adminhtml\\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\\Sales\\Model\\Order\\Payment 的实例【英文标题】:Mage2 : Arg 1 passed to Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() must be an instance of Magento\Sales\Model\Order\PaymentMage2 :传递给 Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\Sales\Model\Order\Payment 的实例 【发布时间】:2019-01-28 17:55:43 【问题描述】:

在 Magento 2.2.5 中,查看任何订单时出现此错误。

致命错误:未捕获的 TypeError:传递给 Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\Sales\Model\Order\Payment 的实例,给定 null,在 F:\ 中调用xampp\htdocs\magento_five\vendor\magento\module-paypal\Plugin\OrderCanInvoice.php 在第 41 行并在 F:\xampp\htdocs\magento_five\vendor\magento\module-paypal\Model\Adminhtml\Express.php 中定义: 170 堆栈跟踪:#0 F:\xampp\htdocs\magento_five\vendor\magento\module-paypal\Plugin\OrderCanInvoice.php(41): Magento\Paypal\Model\Adminhtml\Express->isOrderAuthorizationAllowed(NULL) #1 F :\xampp\htdocs\magento_five\vendor\magento\framework\Interception\Interceptor.php(146): Magento\Paypal\Plugin\OrderCanInvoice->afterCanInvoice(Object(Magento\Sales\Model\Order\Interceptor), false) # 2 F:\xampp\htdocs\magento_five\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interceptionclosure() #3 F: \xampp\htdocs\magento_five\genera ted\code\Magento\Sales\Model\Order\Inte in F:\xampp\htdocs\magento_five\vendor\magento\module-paypal\Model\Adminhtml\Express.php 在第 169 行

谁能帮我解决这个问题。

谢谢

【问题讨论】:

任何人都可以帮我解决这个问题。 【参考方案1】:

将您的 Magento 版本更新到 2.2.5。 Magento 在 2.2.5 版本上解决上述问题。

【讨论】:

以上是关于Mage2 :传递给 Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\S的主要内容,如果未能解决你的问题,请参考以下文章

Magento - PayPal IPN 配置

magento paypal 'PayPal 响应没有必填字段。

Magento + Paypal - 订单状态停留在“付款审查”

沙盒模式下的 Magento + Paypal Express 结帐

Magento 2.2 Paypal 付款方式选项未显示在结帐中

Magento paypal 快递评论页面和协议