Skip to content

Commit

Permalink
Merge pull request #65 from virtua-wkogut/feature/SP-302
Browse files Browse the repository at this point in the history
SP-302 Fix checkout issue
  • Loading branch information
p-maguire authored Nov 4, 2022
2 parents 4a3586b + daeb8a3 commit 6b22a22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Model/BPRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Magento\Framework\UrlInterface;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Framework\App\ResponseFactory;
use Magento\Framework\View\Result\Page;

class BPRedirect
{
Expand Down Expand Up @@ -67,14 +68,14 @@ public function __construct(
$this->logger = $logger;
}

public function execute()
public function execute(Page $page)
{
$orderId = $this->checkoutSession->getData('last_order_id');
$order = $this->orderInterface->load($orderId);
$incrementId = $order->getIncrementId();
$baseUrl = $this->config->getBaseUrl();
if ($order->getPayment()->getMethodInstance()->getCode() !== Config::BITPAY_PAYMENT_METHOD_NAME) {
return;
return $page;
}

try {
Expand Down
2 changes: 1 addition & 1 deletion Plugin/Onepage/SuccessPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function afterExecute(
\Magento\Checkout\Controller\Onepage\Success $subject,
\Magento\Framework\View\Result\Page $page
) {
$this->bpRedirect->execute();
return $this->bpRedirect->execute($page);
}
}

0 comments on commit 6b22a22

Please sign in to comment.