File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
namespace Magento \Paypal \Controller \Hostedpro ;
9
9
10
10
use Magento \Framework \App \Action \Action ;
11
+ use Magento \Framework \App \Action \HttpGetActionInterface ;
11
12
use Magento \Framework \App \Action \HttpPostActionInterface ;
12
13
use Magento \Framework \App \CsrfAwareActionInterface ;
13
14
use Magento \Framework \App \Request \InvalidRequestException ;
16
17
/**
17
18
* PayPal Hostedpro return controller.
18
19
*/
19
- class ReturnAction extends Action implements CsrfAwareActionInterface, HttpPostActionInterface
20
+ class ReturnAction extends Action implements CsrfAwareActionInterface, HttpPostActionInterface, HttpGetActionInterface
20
21
{
21
22
/**
22
23
* When a customer return to website from gateway.
Original file line number Diff line number Diff line change 8
8
9
9
use Exception ;
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Sales \Model \Order ;
11
12
use Magento \Sales \Model \Order \Email \Sender \CreditmemoSender ;
12
13
use Magento \Sales \Model \Order \Email \Sender \OrderSender ;
13
14
@@ -301,6 +302,9 @@ protected function _registerPaymentCapture($skipFraudDetection = false)
301
302
$ payment ->setParentTransactionId ($ parentTransactionId );
302
303
$ payment ->setShouldCloseParentTransaction ('Completed ' === $ this ->getRequestData ('auth_status ' ));
303
304
$ payment ->setIsTransactionClosed (0 );
305
+ if ($ this ->_order ->getState () === Order::STATE_PENDING_PAYMENT ) {
306
+ $ this ->_order ->setState (Order::STATE_PROCESSING );
307
+ }
304
308
$ payment ->registerCaptureNotification (
305
309
$ this ->getRequestData ('mc_gross ' ),
306
310
$ skipFraudDetection && $ parentTransactionId
You can’t perform that action at this time.
0 commit comments