Skip to content

Commit

Permalink
new liqpay (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
demid-vicky-9 committed Aug 21, 2023
1 parent 1ae9ad7 commit cf4ecdd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/Payments/Handlers/Liqpay/GetPaymentInfoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ private function getStatus(string $status): StatusEnum
}

/**
* @param string $status
* @param string $currency
* @return CurrencyEnum
*/
private function getCurrency(string $status): CurrencyEnum
private function getCurrency(string $currency): CurrencyEnum
{
return match ($status) {
return match ($currency) {
'USD' => CurrencyEnum::USD,
default => CurrencyEnum::EUR,
};
Expand Down
3 changes: 0 additions & 3 deletions src/Payments/Handlers/Liqpay/Liqpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*
* @author Liqpay <support@liqpay.ua>
*/

class Liqpay
{
private $_api_url = 'https://www.liqpay.ua/api/';
Expand Down Expand Up @@ -145,7 +144,6 @@ public function cnb_form($params)
$data = $this->encode_params($params);
$signature = $this->cnb_signature($params);


return sprintf(
'
<form method="POST" action="%s" accept-charset="utf-8">
Expand Down Expand Up @@ -235,7 +233,6 @@ protected function cnb_params($params)
throw new InvalidArgumentException('description is null');
}


return $params;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Payments/Handlers/Paypal/GetPaymentInfoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ private function getStatus(string $status): StatusEnum
}

/**
* @param string $status
* @param string $currency
* @return CurrencyEnum
*/
private function getCurrency(string $status): CurrencyEnum
private function getCurrency(string $currency): CurrencyEnum
{
return match ($status) {
return match ($currency) {
'USD' => CurrencyEnum::USD,
default => CurrencyEnum::EUR,
};
Expand Down
6 changes: 3 additions & 3 deletions src/Payments/Handlers/Stripe/GetPaymentInfoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ private function getStatus(string $status): StatusEnum
}

/**
* @param string $status
* @param string $currency
* @return CurrencyEnum
*/
private function getCurrency(string $status): CurrencyEnum
private function getCurrency(string $currency): CurrencyEnum
{
return match ($status) {
return match ($currency) {
'usd' => CurrencyEnum::USD,
default => CurrencyEnum::EUR,
};
Expand Down

0 comments on commit cf4ecdd

Please sign in to comment.