新增ca认证对接、新增银行卡、身份证验证、修正消息通知

This commit is contained in:
2023-03-16 15:32:36 +08:00
parent dcb2e801ce
commit 398bbf3a8c
15 changed files with 379 additions and 70 deletions
+21 -7
View File
@@ -18,7 +18,9 @@ use App\Model\ProductPlatformAmount;
use App\Model\UserDoctor;
use App\Model\UserShipAddress;
use App\Utils\Log;
use Extend\Prescription\Prescription;
use Extend\Wechat\WechatPay;
use GuzzleHttp\Exception\GuzzleException;
use Hyperf\Amqp\Producer;
use Hyperf\DbConnection\Db;
use Hyperf\Snowflake\IdGeneratorInterface;
@@ -705,14 +707,12 @@ class PatientOrderService extends BaseService
return success($result);
}
// 模拟支付成功-金额为0时使用
/**
*
*模拟支付成功-金额为0时使用
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws \GuzzleHttp\Exception\GuzzleException
* @throws GuzzleException
*/
public function addPatientOrderPay(): array
{
@@ -788,7 +788,7 @@ class PatientOrderService extends BaseService
}
// 发送消息
$ImService->sendTextMessage($user_doctor['user_id'],$order_inquiry['user_id'],"等待医生接诊",$order_inquiry['order_inquiry_id'],$order_inquiry['inquiry_type']);
$ImService->sendMessage($user_doctor['user_id'],$order_inquiry['user_id'],"等待医生接诊",$order_inquiry['order_inquiry_id'],$order_inquiry['inquiry_type']);
}
@@ -884,7 +884,14 @@ class PatientOrderService extends BaseService
}
// 获取运费金额
$logistics_fee = 0;
$Prescription = new Prescription();
$result = $Prescription->getLogisticsFee();
if ($amount_total >= $result['drugCost']){
$logistics_fee = 0;
}else{
$logistics_fee = $result['freight'];
}
// 实际支付金额
$payment_amount_total = $amount_total + $logistics_fee;
@@ -1134,7 +1141,6 @@ class PatientOrderService extends BaseService
$amount_total = 0;
$coupon_amount_total = 0;
$logistics_fee = 0; // 运费金额
foreach ($order_prescription_product as &$item) {
$params = array();
$params['product_id'] = $item['product_id'];
@@ -1158,6 +1164,14 @@ class PatientOrderService extends BaseService
}
// 获取运费金额
$Prescription = new Prescription();
$result = $Prescription->getLogisticsFee();
if ($amount_total >= $result['drugCost']){
$logistics_fee = 0;
}else{
$logistics_fee = $result['freight'];
}
// 实际支付金额
$payment_amount_total = $amount_total + $logistics_fee;