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-payment
Gateway
Http
TransferBuilder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Gateway\Http
;
7
13
class
TransferBuilder
14
{
18
private
$clientConfig = [];
19
23
private
$headers = [];
24
28
private
$method;
29
33
private
$body = [];
34
38
private
$uri =
''
;
39
43
private
$encode =
false
;
44
48
private
$auth = [
Transfer::AUTH_USERNAME
=>
null
,
Transfer::AUTH_PASSWORD
=>
null
];
49
54
public
function
setClientConfig
(array $clientConfig)
55
{
56
$this->clientConfig = $clientConfig;
57
58
return
$this;
59
}
60
65
public
function
setHeaders
(array $headers)
66
{
67
$this->headers = $headers;
68
69
return
$this;
70
}
71
76
public
function
setBody
($body)
77
{
78
$this->body = $body;
79
80
return
$this;
81
}
82
87
public
function
setAuthUsername
($username)
88
{
89
$this->auth[
Transfer::AUTH_USERNAME
] = $username;
90
91
return
$this;
92
}
93
98
public
function
setAuthPassword
($password)
99
{
100
$this->auth[
Transfer::AUTH_PASSWORD
] = $password;
101
102
return
$this;
103
}
104
109
public
function
setMethod
($method)
110
{
111
$this->method = $method;
112
113
return
$this;
114
}
115
120
public
function
setUri
($uri)
121
{
122
$this->uri = $uri;
123
124
return
$this;
125
}
126
131
public
function
shouldEncode
($encode)
132
{
133
$this->encode = $encode;
134
135
return
$this;
136
}
137
141
public
function
build
()
142
{
143
return
new
Transfer
(
144
$this->clientConfig,
145
$this->headers,
146
$this->body,
147
$this->auth,
148
$this->method,
149
$this->uri,
150
$this->encode
151
);
152
}
153
}
Magento\Payment\Gateway\Http
Magento\Payment\Gateway\Http\TransferBuilder\setMethod
setMethod($method)
Definition:
TransferBuilder.php:109
Magento\Payment\Gateway\Http\TransferBuilder\setHeaders
setHeaders(array $headers)
Definition:
TransferBuilder.php:65
Magento\Payment\Gateway\Http\TransferBuilder\setAuthPassword
setAuthPassword($password)
Definition:
TransferBuilder.php:98
Magento\Payment\Gateway\Http\TransferBuilder
Definition:
TransferBuilder.php:13
Magento\Payment\Gateway\Http\TransferBuilder\shouldEncode
shouldEncode($encode)
Definition:
TransferBuilder.php:131
Magento\Payment\Gateway\Http\TransferBuilder\setClientConfig
setClientConfig(array $clientConfig)
Definition:
TransferBuilder.php:54
Magento\Payment\Gateway\Http\Transfer
Definition:
Transfer.php:11
Magento\Payment\Gateway\Http\TransferBuilder\build
build()
Definition:
TransferBuilder.php:141
Magento\Payment\Gateway\Http\TransferBuilder\setAuthUsername
setAuthUsername($username)
Definition:
TransferBuilder.php:87
Magento\Payment\Gateway\Http\TransferBuilder\setBody
setBody($body)
Definition:
TransferBuilder.php:76
Magento\Payment\Gateway\Http\Transfer\AUTH_PASSWORD
const AUTH_PASSWORD
Definition:
Transfer.php:21
Magento\Payment\Gateway\Http\Transfer\AUTH_USERNAME
const AUTH_USERNAME
Definition:
Transfer.php:16
Magento\Payment\Gateway\Http\TransferBuilder\setUri
setUri($uri)
Definition:
TransferBuilder.php:120