Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-paypal
Controller
Express
AbstractExpress
Start.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Paypal\Controller\Express\AbstractExpress
;
7
8
use
Magento\Paypal\Controller\Express\GetToken
;
9
13
class
Start
extends
GetToken
14
{
21
public
function
execute
()
22
{
23
try
{
24
$token
= $this->getToken();
25
if
(
$token
===
null
) {
26
return
;
27
}
28
29
$url
= $this->_checkout->getRedirectUrl();
30
if
(
$token
&&
$url
) {
31
$this->
_initToken
(
$token
);
32
$this->
getResponse
()->setRedirect(
$url
);
33
34
return
;
35
}
36
}
catch
(\
Magento
\Framework\
Exception
\
LocalizedException
$e) {
37
$this->messageManager->addExceptionMessage($e, $e->getMessage());
38
}
catch
(\
Exception
$e) {
39
$this->messageManager->addExceptionMessage(
40
$e,
41
__
(
'We can\'t start Express Checkout.'
)
42
);
43
}
44
45
$this->
_redirect
(
'checkout/cart'
);
46
}
47
}
Magento\Paypal\Controller\Express\AbstractExpress\_initToken
_initToken($setToken=null)
Definition:
AbstractExpress.php:161
Magento\Paypal\Controller\Express\AbstractExpress\Start\execute
execute()
Definition:
Start.php:21
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\App\Action\Action\_redirect
_redirect($path, $arguments=[])
Definition:
Action.php:167
$url
$url
Definition:
query_redirect.php:14
__
__()
Definition:
__.php:13
Magento\Paypal\Controller\Express\AbstractExpress\Start
Definition:
Start.php:13
$token
$token
Definition:
fake_payment_token.php:14
Magento\Framework\Webapi\Exception
Definition:
Exception.php:20
Magento
Magento\Paypal\Controller\Express\AbstractExpress
Definition:
Cancel.php:7
Magento\Paypal\Controller\Express\GetToken
Definition:
GetToken.php:23
Magento\Checkout\Controller\Express\RedirectLoginInterface\getResponse
getResponse()