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-signifyd
Model
SignifydGateway
Request
CardBuilder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Signifyd\Model\SignifydGateway\Request
;
7
8
use
Magento\Sales\Model\Order
;
9
13
class
CardBuilder
14
{
18
private
$addressBuilder;
19
23
public
function
__construct
(
24
AddressBuilder
$addressBuilder
25
) {
26
$this->addressBuilder = $addressBuilder;
27
}
28
35
public
function
build
(
Order
$order
)
36
{
37
$result
= [];
38
$address
=
$order
->getBillingAddress();
39
if
(
$address
===
null
) {
40
return
$result
;
41
}
42
43
$payment
=
$order
->getPayment();
44
$result
= [
45
'card'
=> [
46
'cardHolderName'
=>
$address
->getFirstname() .
' '
.
$address
->getLastname(),
47
'last4'
=>
$payment
->getCcLast4(),
48
'expiryMonth'
=>
$payment
->getCcExpMonth(),
49
'expiryYear'
=>
$payment
->getCcExpYear(),
50
'billingAddress'
=> $this->addressBuilder->build(
$address
)
51
]
52
];
53
54
return
$result
;
55
}
56
}
Magento\Sales\Model\Order
Definition:
Order.php:54
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Signifyd\Model\SignifydGateway\Request\CardBuilder\build
build(Order $order)
Definition:
CardBuilder.php:35
Magento\Sales\Model\Order
$order
$order
Definition:
order.php:55
Magento\Signifyd\Model\SignifydGateway\Request\CardBuilder
Definition:
CardBuilder.php:13
$address
$address
Definition:
customer.php:38
$payment
$payment
Definition:
order.php:17
Magento\Signifyd\Model\SignifydGateway\Request\AddressBuilder
Definition:
AddressBuilder.php:13
Magento\Signifyd\Model\SignifydGateway\Request\CardBuilder\__construct
__construct(AddressBuilder $addressBuilder)
Definition:
CardBuilder.php:23
Magento\Signifyd\Model\SignifydGateway\Request
Definition:
CreateCaseBuilderTest.php:6