Skip to content

Commit

Permalink
Vipps Publication 2.3.6 (#66)
Browse files Browse the repository at this point in the history
* Fixed issue with multi-shipping checkout
  • Loading branch information
ed007m authored Jun 9, 2020
1 parent 489853d commit c3d8647
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Observer/CheckoutSubmitAllAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Api\Data\OrderPaymentInterface;
use Magento\Sales\Api\OrderManagementInterface;
use Magento\Sales\Model\Order;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -73,7 +74,16 @@ public function execute(Observer $observer)
{
/** @var OrderInterface $order */
$order = $observer->getData('order');
if ('vipps' == $order->getPayment()->getMethod()) {
if (!$order || !($order instanceof OrderInterface)) {
return;
}

$payment = $order->getPayment();
if (!$payment || !($payment instanceof OrderPaymentInterface)) {
return;
}

if ('vipps' == $payment->getMethod()) {
try {
// updated vipps quote
$vippsQuote = $this->quoteRepository->loadByOrderId($order->getIncrementId());
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "magento2-module",
"description": "Vipps Payment Method",
"license": "proprietary",
"version": "2.3.5",
"version": "2.3.6",
"require": {
"magento/framework": "102.0.*",
"magento/module-sales": "102.0.*",
Expand Down

0 comments on commit c3d8647

Please sign in to comment.