瀏覽代碼

支付发起使用小程序信息

shish 6 年之前
父節點
當前提交
eb007c9dc8
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      app/mall/controllers/BaseController.php
  2. 2 1
      app/mall/controllers/OrderController.php

+ 1 - 1
app/mall/controllers/BaseController.php

@@ -45,7 +45,7 @@ class BaseController extends PublicController
 		$this->shopId = $shopId;
 		$this->shopId = $shopId;
 		$this->merchantExtend = MerchantExtendService::getByMerchantId($merchantId);
 		$this->merchantExtend = MerchantExtendService::getByMerchantId($merchantId);
 		$this->isWx = util::isWx();
 		$this->isWx = util::isWx();
-		
+
 		//收集访问量
 		//收集访问量
 		StatVisitService::gatherVisit($merchantId);
 		StatVisitService::gatherVisit($merchantId);
 		
 		

+ 2 - 1
app/mall/controllers/OrderController.php

@@ -323,6 +323,7 @@ class OrderController extends BaseController
 			if (httpUtil::isMiniProgram()) {
 			if (httpUtil::isMiniProgram()) {
 				$merchantExtend['wxAppId'] = $merchantExtend['miniAppId'];
 				$merchantExtend['wxAppId'] = $merchantExtend['miniAppId'];
 			}
 			}
+			Yii::log('支付发起使用小程序信息' . json_encode($merchantExtend));
 			$wxOrder = \WxPayApi::unifiedOrder($input, 6, $merchantExtend);
 			$wxOrder = \WxPayApi::unifiedOrder($input, 6, $merchantExtend);
 			$tools = new \JsApiPay();
 			$tools = new \JsApiPay();
 			$jsApiParameters = $tools->GetJsApiParameters($wxOrder, $merchantExtend);
 			$jsApiParameters = $tools->GetJsApiParameters($wxOrder, $merchantExtend);
@@ -350,7 +351,7 @@ class OrderController extends BaseController
 				//支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
 				//支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
 				'alipay_public_key' => $extend['alipayPublicKey'],
 				'alipay_public_key' => $extend['alipayPublicKey'],
 			];
 			];
-
+			
 			$alipayWap = Yii::getAlias("@vendor/alipayWap");
 			$alipayWap = Yii::getAlias("@vendor/alipayWap");
 			require_once($alipayWap . '/wappay/service/AlipayTradeService.php');
 			require_once($alipayWap . '/wappay/service/AlipayTradeService.php');
 			require_once($alipayWap . '/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php');
 			require_once($alipayWap . '/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php');