mirror of
https://github.com/v2board/v2board.git
synced 2025-03-12 21:54:42 +08:00
Merge 4250032318a12fddf20321f566102cc8b0aa61c5 into 0ca47622a50116d0ddd7ffb316b157afb57d25e8
This commit is contained in:
commit
70e654270c
@ -110,8 +110,10 @@ class StripeAlipay {
|
||||
|
||||
private function exchange($from, $to)
|
||||
{
|
||||
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from);
|
||||
$from = strtolower($from);
|
||||
$to = strtolower($to);
|
||||
$result = file_get_contents("https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/" . $from . "/" . $to . ".json");
|
||||
$result = json_decode($result, true);
|
||||
return $result['rates'][$to];
|
||||
return $result[$to];
|
||||
}
|
||||
}
|
||||
|
@ -132,8 +132,10 @@ class StripeCheckout {
|
||||
|
||||
private function exchange($from, $to)
|
||||
{
|
||||
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from);
|
||||
$from = strtolower($from);
|
||||
$to = strtolower($to);
|
||||
$result = file_get_contents("https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/" . $from . "/" . $to . ".json");
|
||||
$result = json_decode($result, true);
|
||||
return $result['rates'][$to];
|
||||
return $result[$to];
|
||||
}
|
||||
}
|
||||
|
@ -117,8 +117,10 @@ class StripeCredit {
|
||||
|
||||
private function exchange($from, $to)
|
||||
{
|
||||
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from);
|
||||
$from = strtolower($from);
|
||||
$to = strtolower($to);
|
||||
$result = file_get_contents("https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/" . $from . "/" . $to . ".json");
|
||||
$result = json_decode($result, true);
|
||||
return $result['rates'][$to];
|
||||
return $result[$to];
|
||||
}
|
||||
}
|
||||
|
@ -110,8 +110,10 @@ class StripeWepay {
|
||||
|
||||
private function exchange($from, $to)
|
||||
{
|
||||
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from);
|
||||
$from = strtolower($from);
|
||||
$to = strtolower($to);
|
||||
$result = file_get_contents("https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/" . $from . "/" . $to . ".json");
|
||||
$result = json_decode($result, true);
|
||||
return $result['rates'][$to];
|
||||
return $result[$to];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user