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
Model
IpnFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Paypal\Model
;
7
8
class
IpnFactory
9
{
15
protected
$_objectManager
=
null
;
16
20
protected
$mapping
= [];
21
28
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
, array
$mapping
= [])
29
{
30
$this->_objectManager =
$objectManager
;
31
$this->mapping =
$mapping
;
32
}
33
40
public
function
create
(array
$data
= [])
41
{
42
$type
= isset(
$data
[
'data'
][
'txn_type'
]) ?
$data
[
'data'
][
'txn_type'
] :
''
;
43
$instanceType = isset($this->mapping[
$type
]) ? $this->mapping[
$type
] : \Magento\Paypal\Model\Ipn::class;
44
return
$this->_objectManager->create($instanceType,
$data
);
45
}
46
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Paypal\Model
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$type
$type
Definition:
item.phtml:13
Magento\Paypal\Model\IpnFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, array $mapping=[])
Definition:
IpnFactory.php:28
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Paypal\Model\IpnFactory
Definition:
IpnFactory.php:8
Magento\Paypal\Model\IpnFactory\$mapping
$mapping
Definition:
IpnFactory.php:20
Magento
Magento\Paypal\Model\IpnFactory\$_objectManager
$_objectManager
Definition:
IpnFactory.php:15
Magento\Paypal\Model\IpnFactory\create
create(array $data=[])
Definition:
IpnFactory.php:40