Skip to content

Commit

Permalink
fix can not checkout when Airwallex is not configed
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-zhang-awx committed Dec 17, 2024
1 parent 2fec059 commit 2180278
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Model/Client/AbstractClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function send()
if ($statusCode === 404) {
throw new RequestException(self::NOT_FOUND);
}
throw new RequestException($response->message);
// throw new RequestException($response->message);
}

return $this->parseResponse($request);
Expand Down
4 changes: 4 additions & 0 deletions Model/Client/Request/GetCurrencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ protected function parseResponse(ResponseInterface $response): array
$response = $this->parseJson($response);

$result = [];
if (empty($response->items)) return [
'has_more' => false,
'items' => $result,
];
foreach ($response->items as $item) {
if ($item->type !== 'currency_switcher') continue;
if (empty($item->currencies)) continue;
Expand Down

0 comments on commit 2180278

Please sign in to comment.