Commit abc1e732 by 王召彬

根据mchId获取对应的支付配置

parent ffce4514
...@@ -20,7 +20,7 @@ class CfgCenter ...@@ -20,7 +20,7 @@ class CfgCenter
const PAY_YUNMAI = 'pay_yunmai'; //云脉的支付平台配置 const PAY_YUNMAI = 'pay_yunmai'; //云脉的支付平台配置
const PAY_YUNMAI_ISP = 'pay_yunmai_isp'; //云脉的支付服务商配置,用于托管子商户 const PAY_YUNMAI_ISP = 'pay_yunmai_isp'; //云脉的支付服务商配置,用于托管子商户
const PAY_ZHIMEI = 'pay_zhimei'; //致美的支付配置 const PAY_ZHIMEI = 'pay_zhimei'; //致美的支付配置
const SELLER_DISTRIBUTION = 'seller_distribution'; //卖家分配置 const SELLER_DISTRIBUTION = 'seller_distribution'; //卖家分配置
/** /**
* 读取指定的配置项 - 返回数组格式 * 读取指定的配置项 - 返回数组格式
...@@ -80,6 +80,20 @@ class CfgCenter ...@@ -80,6 +80,20 @@ class CfgCenter
} }
/** /**
* 根据mchId获取对应的支付配置
*
* @param string $mchId
* @return mixed
*/
public static function getByMchId(int $mchId)
{
$dbConn = self::dbConnect();//连接配置库
$result = $dbConn->get("config", ['value'], ['mchId' => $mchId]);
$resArr = json_decode($result['value'], true);
return is_array($resArr) ? $resArr : $result['value'];
}
/**
* 根据店铺id获取支付证书 * 根据店铺id获取支付证书
* *
* @param integer $storeId * @param integer $storeId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment