mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
fix: Stripe payment not working
This commit is contained in:
parent
0ca47622a5
commit
4250032318
@ -110,8 +110,10 @@ class StripeAlipay {
|
|||||||
|
|
||||||
private function exchange($from, $to)
|
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);
|
$result = json_decode($result, true);
|
||||||
return $result['rates'][$to];
|
return $result[$to];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,8 +132,10 @@ class StripeCheckout {
|
|||||||
|
|
||||||
private function exchange($from, $to)
|
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);
|
$result = json_decode($result, true);
|
||||||
return $result['rates'][$to];
|
return $result[$to];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,8 +117,10 @@ class StripeCredit {
|
|||||||
|
|
||||||
private function exchange($from, $to)
|
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);
|
$result = json_decode($result, true);
|
||||||
return $result['rates'][$to];
|
return $result[$to];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,8 +110,10 @@ class StripeWepay {
|
|||||||
|
|
||||||
private function exchange($from, $to)
|
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);
|
$result = json_decode($result, true);
|
||||||
return $result['rates'][$to];
|
return $result[$to];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user