Explorar o código

支付申请方式

shish %!s(int64=6) %!d(string=hai) anos
pai
achega
8179ba2034

+ 2 - 2
app/client/controllers/OrderController.php

@@ -203,7 +203,7 @@ class OrderController extends BaseController
 		
 		//花卉宝代为申请的微信支付
 		$merchantExtend = $this->merchantExtend;
-		if ($merchantExtend['generalMerchant'] == 1) {
+		if ($merchantExtend['wxPayApply'] == 1) {
 			$input->SetSub_openid($openId);
 		} else {
 			$input->SetOpenid($openId);
@@ -303,7 +303,7 @@ class OrderController extends BaseController
 			
 			//花卉宝代为申请的微信支付
 			$merchantExtend = $this->merchantExtend;
-			if ($merchantExtend['generalMerchant'] == 1) {
+			if ($merchantExtend['wxPayApply'] == 1) {
 				$input->SetSub_openid($openId);
 			} else {
 				$input->SetOpenid($openId);

+ 1 - 1
app/client/controllers/PayController.php

@@ -263,7 +263,7 @@ class PayController extends BaseController
 			
 			
 			//服务商 代设置微信支付,要添加的参数设置
-			if ($this->merchantExtend['generalMerchant'] == 1) {
+			if ($this->merchantExtend['wxPayApply'] == 1) {
 				//$input->SetOpenid($openId);
 				$input->SetSub_openid($openId);
 				//自设置 微信支付

+ 1 - 1
app/client/controllers/RechargeController.php

@@ -74,7 +74,7 @@ class RechargeController extends BaseController
 		$input->SetTrade_type("JSAPI");
 		
 		//服务商 代设置微信支付,要添加的参数设置
-		if ($extend['generalMerchant'] == 1) {
+		if ($extend['wxPayApply'] == 1) {
 			//$input->SetOpenid($openId);
 			$input->SetSub_openid($openId);
 			//自设置 微信支付

+ 1 - 1
app/www/controllers/PayController.php

@@ -92,7 +92,7 @@ class PayController extends OpenendController
     	
     	
     	//服务商 代设置微信支付,要添加的参数设置
-    	if($this->merchantExtend['generalMerchant'] == 1){
+    	if($this->merchantExtend['wxPayApply'] == 1){
     	    //$input->SetOpenid($openId);
     	    $input->SetSub_openid($openId);
     	    //自设置 微信支付

+ 1 - 1
app/www/controllers/RenewController.php

@@ -79,7 +79,7 @@ class RenewController extends BaseController
 		
 		//花卉宝代为申请的微信支付
 		$merchantExtend = MerchantExtendService::getByMerchantId($this->merchantId);
-		if ($merchantExtend['generalMerchant'] == 1) {
+		if ($merchantExtend['wxPayApply'] == 1) {
 			$input->SetSub_openid($openId);
 		} else {
 			$input->SetOpenid($openId);

+ 5 - 0
console/controllers/UpgradeController.php

@@ -1223,6 +1223,11 @@ ALTER TABLE xhMerchant MODIFY `logo` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '
 		$sql = "ALTER TABLE `xhMerchant` CHANGE `wxQrcodeUrl` `wxQrCodeUrl` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '公众号二维码';";
 		Yii::$app->db->createCommand($sql)->execute($sql);
 		
+		$sql = "ALTER TABLE `xhMerchantExtend` DROP COLUMN `mergeGatheringQrcodeUrl`;
+ALTER TABLE `xhMerchantExtend` DROP COLUMN `mergeGatheringQrcodeUrlAlipay`;
+ALTER TABLE `xhMerchantExtend` CHANGE `generalMerchant` wxPayApply TINYINT NOT NULL DEFAULT 0 COMMENT '0自己申请 1平台代为申请' AFTER `wxPayKey`;";
+		Yii::$app->db->createCommand($sql)->execute($sql);
+
 	}
 	
 	//数据迁移 shish 2020.1.12

+ 1 - 1
vendor/weixin/example/WxPay.JsApiPay.php

@@ -89,7 +89,7 @@ class JsApiPay
 
 		//$key = $WxPayConfig->KEY;
         //服务商 代设置微信支付,签名设置
-        if($merchantExtend['generalMerchant'] == 1){
+        if($merchantExtend['wxPayApply'] == 1){
             $key = 'v3e29zx1i2xvc16m0x2v1bmca32svdvg';
         //自设置 微信支付签名设置
         }else{

+ 1 - 1
vendor/weixin/lib/WxPay.Api.php

@@ -60,7 +60,7 @@ class WxPayApi
 		}
 
         //服务商代为发起微信支付
-		if($merchantExtend['generalMerchant'] == 1){
+		if($merchantExtend['wxPayApply'] == 1){
             $inputObj->SetAppid('wx66dd83ff8744f7a8');//花卉宝 公众账号ID
             $inputObj->SetMch_id('1447921102');//花卉宝 服务商 商户号 -- 1447921102
             $signKey = 'v3e29zx1i2xvc16m0x2v1bmca32svdvg';//花卉宝 服务商的key