kevin_zhangl 2 жил өмнө
parent
commit
1ab8727fc0

+ 1 - 1
common/config/main.php

@@ -65,7 +65,7 @@ return [
             'class' => 'frontendApi\modules\v1\components\IPay88',
             'merchantCode' => 'M08669', // 'M08669_S0002',  // M08669(prod)
             'merchantKey' => 'SiYF6a0QYy', // '5Mb154IrY8',   // SiYF6a0QYy(prod)
-            'currencyCode' => 'CNY', //'CNY', // MYR(马来币) CNY(人民币)
+            'currencyCode' => 'MYR', //'CNY', // MYR(马来币) CNY(人民币)
             'responseUrl' => 'https://www.ncshop2023.com/#/shop/order-list', //'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://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',

+ 1 - 1
common/models/Config.php

@@ -83,7 +83,7 @@ class Config extends \common\components\ActiveRecord
      * @return array|mixed|\yii\db\ActiveRecord[]
      */
     public static function getFromCache(){
-//        Yii::$app->cache->delete(Cache::SYSTEM_CONFIG_KEY);
+        Yii::$app->cache->delete(Cache::SYSTEM_CONFIG_KEY);
         $config = Yii::$app->cache->get(Cache::SYSTEM_CONFIG_KEY);
         if(!$config){
             // 获取配置

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

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