llp пре 1 дан
родитељ
комит
c71af3486d
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      packages/Longyi/Pay/Afterpay/src/Payment/Afterpay.php

+ 4 - 1
packages/Longyi/Pay/Afterpay/src/Payment/Afterpay.php

@@ -345,8 +345,11 @@ class Afterpay extends Payment
             if (! in_array($billingCountry, $allowedCountries)) {
                 return false;
             }
+            $currency = $info->order_currency_code ?? $info->cart_currency_code ?? false;
+            if ($currency != 'CAD' && $currency != 'USD') {
+                return false;
+            }
         }
-
         // 检查订单金额是否在限额范围内
 //        if ($info) {
 //            $grandTotal = $info->grand_total ?? $info->sub_total ?? 0;