Skip to content

Commit b19ebfc

Browse files
MC-32546: Website Payments Pro Hosted Solution redirect to home page
1 parent fe33c4a commit b19ebfc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/code/Magento/Paypal/Controller/Hostedpro/ReturnAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\Paypal\Controller\Hostedpro;
99

1010
use Magento\Framework\App\Action\Action;
11+
use Magento\Framework\App\Action\HttpGetActionInterface;
1112
use Magento\Framework\App\Action\HttpPostActionInterface;
1213
use Magento\Framework\App\CsrfAwareActionInterface;
1314
use Magento\Framework\App\Request\InvalidRequestException;
@@ -16,7 +17,7 @@
1617
/**
1718
* PayPal Hostedpro return controller.
1819
*/
19-
class ReturnAction extends Action implements CsrfAwareActionInterface, HttpPostActionInterface
20+
class ReturnAction extends Action implements CsrfAwareActionInterface, HttpPostActionInterface, HttpGetActionInterface
2021
{
2122
/**
2223
* When a customer return to website from gateway.

app/code/Magento/Paypal/Model/Ipn.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Exception;
1010
use Magento\Framework\Exception\LocalizedException;
11+
use Magento\Sales\Model\Order;
1112
use Magento\Sales\Model\Order\Email\Sender\CreditmemoSender;
1213
use Magento\Sales\Model\Order\Email\Sender\OrderSender;
1314

@@ -301,6 +302,9 @@ protected function _registerPaymentCapture($skipFraudDetection = false)
301302
$payment->setParentTransactionId($parentTransactionId);
302303
$payment->setShouldCloseParentTransaction('Completed' === $this->getRequestData('auth_status'));
303304
$payment->setIsTransactionClosed(0);
305+
if ($this->_order->getState() === Order::STATE_PENDING_PAYMENT) {
306+
$this->_order->setState(Order::STATE_PROCESSING);
307+
}
304308
$payment->registerCaptureNotification(
305309
$this->getRequestData('mc_gross'),
306310
$skipFraudDetection && $parentTransactionId

0 commit comments

Comments
 (0)