Bläddra i källkod

修改跨境支付

kevin_zhangl 2 år sedan
förälder
incheckning
86e66bae94

+ 3 - 3
common/config/main.php

@@ -65,9 +65,9 @@ return [
             'class' => 'frontendApi\modules\v1\components\IPay88',
             'merchantCode' => 'M08669',
             'merchantKey' => 'SiYF6a0QYy',
-            'currencyCode' => 'CNY', // MYR CNY TODO: 目前暂时只能使用MYR支付 RMB
-            'responseUrl' => 'https://nc-fele-mips.elken.com:8015/#/shop/order-list', // 支付后跳转URL. 用户发起支付后会跳转到iPay88支付页面,用户支付过后会跳转到此页面。中途如果用户放弃支付或者支付失败都会请求此接口。iPay88会携带一些参数给我们,我们可以判断是否成功,给前端返回一些内容等
-            'backendUrl' => 'https://nc-fapi-mips.elken.com:8013/v1/shop/verify-approach-order',  // 支付回调地址
+            'currencyCode' => 'CNY', // 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',
             'paymentUrl' => 'https://payment.ipay88.com.my/epayment/entry.asp',
             'recurringUrlSubscription' => 'https://www.ipay88.com/recurringpayment/webservice/RecurringPayment.asmx/Subscription',

+ 4 - 4
common/config/params.php

@@ -342,9 +342,9 @@ return [
     ],
     // wst配置
     'wst' => [
-        'baseToken' => 'dnRuX2FwaV90ZXN0Ond0cmV3cjI0MzI0ZmRz',
-        'agentId' => 'elg8',
-        'userName' => 'vtn',
-        'password' => '123456',
+        'baseToken' => 'ZWxrZW5yZXN0OnNmMjM0ZmE3NHNn',  // dnRuX2FwaV90ZXN0Ond0cmV3cjI0MzI0ZmRz(test)
+        'agentId' => 'elg8',    // elg8(test)
+        'userName' => 'elken',    // vtn(test)
+        'password' => 'elken0088', // 123456(test)
     ],
 ];

+ 4 - 39
common/helpers/Logistics.php

@@ -41,41 +41,6 @@ class Logistics
 
     // 国家
     const country = 'China';
-    // 省份映射
-    const province = [
-        '340000' => 'Anhui',
-        '110000' => 'Beijing',
-        '500000' => 'Chongqing',
-        '350000' => 'Fujian',
-        '620000' => 'Gansu',
-        '440000' => 'Guangdong',
-        '450000' => 'Guangxi',
-        '520000' => 'Guizhou',
-        '460000' => 'Hainan',
-        '130000' => 'Hebei',
-        '230000' => 'Heilongjiang',
-        '410000' => 'Henan',
-        '810000' => 'Hong Kong',
-        '420000' => 'Hubei',
-        '430000' => 'Hunan',
-        '150000' => 'Inner Mongolia',
-        '320000' => 'Jiangsu',
-        '360000' => 'Jiangxi',
-        '220000' => 'Jilin',
-        '210000' => 'Liaoning',
-        '820000' => 'Macau',
-        '640000' => 'Ningxia',
-        '630000' => 'Qinghai',  // TODO: 无
-        '140000' => 'Shaanxi',
-        '370000' => 'Shandong',
-        '310000' => 'Shanghai',
-        '610000' => 'Shanxi',
-        '510000' => 'Sichuan',
-        '120000' => 'Tianjin',
-        '650000' => 'Xinjiang',
-        '530000' => 'Yunnan',
-        '330000' => 'Zhejiang',
-    ];
 
     function __construct()
     {
@@ -143,10 +108,10 @@ class Logistics
             'order_no' => $order['SN'],   // 客户系统中的订单号
             'delivery_method_id' => '133', // 快递方式ID. TODO:
             'warehouse_id' => '1',   // 仓库ID. TODO:
-            'country' => 'Malaysia',    // 收件人国家 TODO: China
-            'state' => 'Johor', // self::province[$order['PROVINCE']],   // 收件人省 Johor TODO:地名转拼音
+            'country' => 'China',    // 收件人国家 Malaysia
+            'state' => Region::getCnName($order['PROVINCE']), // ,   // 收件人省 Johor(test)
             'city' => Region::getCnName($order['CITY']) . Region::getCnName($order['COUNTY']),   // 收件市县
-            'post_code' => '14000', // $order['ZIP_CODE'],  // 收件人邮政编码 TODO: '14000'
+            'post_code' => $order['ZIP_CODE'], // 收件人邮政编码 14000(test)
             'address' => $order['ADDRESS'],    // 送货地址
             'consignee' => $order['CONSIGNEE_REAL_NAME'],  // 收货人姓名,使用订单中的收货人真实姓名
             'consignee_ic_number' => $order['CONSIGNEE_ID_NO'],
@@ -156,7 +121,7 @@ class Logistics
                 [
                     'product_no' => $order['SKU_CODE'], // 客户系统中的产品编号
                     'product_name' => $order['GOODS_TITLE'],   // 产品名称
-                    'tracking_number' => Date::today('Ymd') . $this->_random(10, 1),    // TODO:快递号 027300027302
+                    'tracking_number' => Date::today('Ymd') . $this->_random(10, 1),
                     'quantity' => $order['BUY_NUMS'],       // 产品数量
                     'total_price' => $order['PAY_AMOUNT'],    // 订单总金额,Decimal
                     'currency_code' => 'CNY',  // 产品的货币代码. 如USD(美元),MYR(马来西亚林吉特),SGD(新加坡元),CNY(人民币)

+ 1 - 1
frontendEle/src/views/shop/order-list.vue

@@ -164,7 +164,7 @@
               // })
 
 
-              this.logisticsDialog = true
+              // this.logisticsDialog = true
 
             }).catch(error => {
               console.log(error)