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
magento2-base
dev
tests
integration
testsuite
Magento
Paypal
_files
order_payflowpro.php
Go to the documentation of this file.
1
<?php
7
$addressData
= include
__DIR__
.
'/address_data.php'
;
8
$billingAddress
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->create(
9
\
Magento
\Sales\Model\Order\Address::class,
10
[
'data'
=>
$addressData
]
11
);
12
$billingAddress
->setAddressType(
'billing'
);
13
14
$shippingAddress
= clone
$billingAddress
;
15
$shippingAddress
->setId(
null
)->setAddressType(
'shipping'
);
16
17
$payment
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->create(
18
\
Magento
\Sales\Model\Order\Payment::class
19
);
20
$payment
->setMethod(\
Magento
\Paypal\Model\Config::METHOD_PAYFLOWPRO);
21
22
$order
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->create(\
Magento
\Sales\Model\Order::class);
23
$order
->setCustomerEmail(
'
[email protected]
'
)
24
->setIncrementId(
'100000001'
)
25
->setSubtotal(100)
26
->setBaseSubtotal(100)
27
->setBaseGrandTotal(100)
28
->setBaseCurrencyCode(
'USD'
)
29
->setCustomerIsGuest(
true
)
30
->setBillingAddress(
$billingAddress
)
31
->setShippingAddress(
$shippingAddress
)
32
->setPayment(
$payment
);
33
$order
->save();
$billingAddress
$billingAddress
Definition:
order_payflowpro.php:8
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
$payment
$payment
Definition:
order_payflowpro.php:17
$shippingAddress
$shippingAddress
Definition:
order_payflowpro.php:14
$order
$order
Definition:
order_payflowpro.php:22
Magento
$addressData
$addressData
Definition:
order_payflowpro.php:7
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125