Skip to content

Commit 7f7dc97

Browse files
committed
Refactor CheckoutSession
1 parent 73a70e8 commit 7f7dc97

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/Api/Payments/CheckoutSession.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ protected function handleResponse(Request $request, ResponseInterface $response)
163163
protected function getBasicHeaders()
164164
{
165165
$headers = parent::getBasicHeaders();
166-
if (mb_strtolower($this->getHttpMethod()) === 'post') {
167-
$headers['Content-Type'] = 'application/x-www-form-urlencoded';
168-
}
166+
$headers['Content-Type'] = 'application/x-www-form-urlencoded';
169167

170168
return $headers;
171169
}
@@ -179,14 +177,7 @@ protected function getBasicHeaders()
179177
*/
180178
protected function getUrl(array $options)
181179
{
182-
183-
$url = 'checkoutSession';
184-
if (mb_strtolower($this->getHttpMethod()) === 'get') {
185-
$query = $this->buildUrl($options);
186-
$url = sprintf('%s/?%s', $url, $query);
187-
}
188-
189-
return $url;
180+
return 'checkoutSession';
190181
}
191182

192183
/**

0 commit comments

Comments
 (0)