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-instant-purchase
Model
InstantPurchaseOptionFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\InstantPurchase\Model
;
7
8
use
Magento\Customer\Model\Address
;
9
use
Magento\Framework\ObjectManagerInterface
;
10
use
Magento\Quote\Api\Data\ShippingMethodInterface
;
11
use
Magento\Vault\Api\Data\PaymentTokenInterface
;
12
19
class
InstantPurchaseOptionFactory
20
{
24
private
$objectManager;
25
30
public
function
__construct
(
ObjectManagerInterface
$objectManager)
31
{
32
$this->objectManager =
$objectManager
;
33
}
34
45
public
function
create
(
46
PaymentTokenInterface
$paymentToken
=
null
,
47
Address
$shippingAddress
=
null
,
48
Address
$billingAddress
=
null
,
49
ShippingMethodInterface
$shippingMethod
=
null
50
):
InstantPurchaseOption
{
51
return
$this->objectManager->create(InstantPurchaseOption::class, [
52
'paymentToken'
=>
$paymentToken
,
53
'shippingAddress'
=>
$shippingAddress
,
54
'billingAddress'
=>
$billingAddress
,
55
'shippingMethod'
=>
$shippingMethod
,
56
]);
57
}
58
65
public
function
createDisabledOption
():
InstantPurchaseOption
66
{
67
return
$this->
create
(
null
,
null
,
null
,
null
);
68
}
69
}
$billingAddress
$billingAddress
Definition:
order.php:25
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Customer\Model\Address
Definition:
AbstractAddress.php:7
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\InstantPurchase\Model\InstantPurchaseOptionFactory\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
InstantPurchaseOptionFactory.php:30
$shippingAddress
$shippingAddress
Definition:
order.php:40
Magento\InstantPurchase\Model\InstantPurchaseOptionFactory\createDisabledOption
createDisabledOption()
Definition:
InstantPurchaseOptionFactory.php:65
$paymentToken
$paymentToken
Definition:
paypal_vault_token.php:27
Magento\Quote\Api\Data\ShippingMethodInterface
Definition:
ShippingMethodInterface.php:13
Magento\InstantPurchase\Model\InstantPurchaseOption
Definition:
InstantPurchaseOption.php:21
Magento\Customer\Model\Address
Definition:
Address.php:23
Magento\InstantPurchase\Model
Definition:
InstantPurchaseTest.php:6
Magento\InstantPurchase\Model\InstantPurchaseOptionFactory\create
create(PaymentTokenInterface $paymentToken=null, Address $shippingAddress=null, Address $billingAddress=null, ShippingMethodInterface $shippingMethod=null)
Definition:
InstantPurchaseOptionFactory.php:45
Magento\Vault\Api\Data\PaymentTokenInterface
Definition:
PaymentTokenInterface.php:14
$shippingMethod
$shippingMethod
Definition:
popup.phtml:12
Magento\InstantPurchase\Model\InstantPurchaseOptionFactory
Definition:
InstantPurchaseOptionFactory.php:19