浏览代码

修改海外商品支付币种

kevin_zhangl 2 年之前
父节点
当前提交
501df2c870
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      common/config/main.php
  2. 2 2
      frontendApi/modules/v1/controllers/ShopController.php

+ 1 - 1
common/config/main.php

@@ -65,7 +65,7 @@ return [
             'class' => 'frontendApi\modules\v1\components\IPay88',
             'merchantCode' => 'M08669',
             'merchantKey' => 'SiYF6a0QYy',
-            'currencyCode' => 'CNY', // MYR(马来币) CNY(人民币)
+            'currencyCode' => 'MYR', // MYR(马来币) CNY(人民币)
             'responseUrl' => 'https://www.ncshop2023.com/#/shop/order-list', // TODO: https://nc-fele-mips.elken.com:8015/#/shop/order-list(test)
             'backendUrl' => 'https://fapi.ekhkad.com/v1/shop/verify-approach-order',  // https://nc-fapi-mips.elken.com:8013/v1/shop/verify-approach-order(test)
             'requeryUrl' => 'https://payment.ipay88.com.my/epayment/enquiry.asp',

+ 2 - 2
frontendApi/modules/v1/controllers/ShopController.php

@@ -422,11 +422,11 @@ class ShopController extends BaseController {
         // 马来币汇率
         $exchangeRateMYR = floatval(Cache::getSystemConfig()['exchangeRateMYR']['VALUE'] ?? 0);
         // 计算马来币
-        $amount = number_format($money * $exchangeRateMYR, 2, '.', '');
+        $amount = number_format($money * $exchangeRateMYR, 0, '.', '');
 //        $amount = number_format(1, 2, '.', ''); // TODO: 测试
         $paymentParams['Amount'] = str_replace('.', '', $amount);
         // (Optional) (int)
-        $paymentParams['PaymentId'] = '';   // TODO: 2=MYR
+        $paymentParams['PaymentId'] = '2';   // TODO: 2=MYR
         // Product description. (length 100)
         $paymentParams['ProdDesc'] = 'Pay for sales';
         // Customer name. (length 100)