获取患者订单支付数据接口新增服务包订单支付数据获取。

This commit is contained in:
2024-04-11 14:43:51 +08:00
parent a1d496dd51
commit d7338c495b
4 changed files with 103 additions and 11 deletions
+9 -2
View File
@@ -28,7 +28,7 @@ class WechatPay
/**
* @param string $user_type 用户类型(1:患者端 2:专家端 3:药师端)
* @param int $order_type 订单类型(1问诊订单 2药品订单 3检测订单)
* @param int $order_type 订单类型(1:问诊订单 2:药品订单 3:检测订单 4:随访包订单 5:健康包订单
*/
public function __construct(string $user_type,int $order_type)
{
@@ -44,7 +44,7 @@ class WechatPay
throw new BusinessException("系统配置错误", HttpEnumCode::SERVER_ERROR);
}
if (!in_array($order_type,[1,2,3])){
if (!in_array($order_type,[1,2,3,4,5])){
throw new BusinessException("订单类型错误", HttpEnumCode::SERVER_ERROR);
}
@@ -69,6 +69,13 @@ class WechatPay
$this->pay_config = config("we_chat.applets.pay.1636644248");
}
if ($order_type == 4 || $order_type == 5){
$this->pay_notify_url = $this->config['service_pay_notify_url'];
$this->refund_notify_url = $this->config['service_refund_notify_url'];
$this->pay_config = config("we_chat.applets.pay.1659662936");
}
$app_env = config('app_env','dev');
if ($app_env == "prod"){
$this->domain_name = env('DOMAIN_NAME_PROD','https://prod.hospital.applets.igandanyiyuan.com/');