|
|
|
@ -99,8 +99,11 @@ class Payment extends BaseService |
|
|
|
|
// 获取结算订单信息 |
|
|
|
|
$OrderModel = new OrderModel; |
|
|
|
|
$orderInfo = $OrderModel->getUnpaidOrderDetail($this->orderId); |
|
|
|
|
//当前商户是系统自动创建的商户,自动读取商城主的支付配置 |
|
|
|
|
$model = \app\store\model\Merchant::detail($orderInfo['merchant_id']); |
|
|
|
|
$merchantId = ($model && $model->channel_id > 0) ? 0 : $orderInfo['merchant_id']; |
|
|
|
|
|
|
|
|
|
$methods = $PaymentModel->getMethodsByClient($this->client, true, $orderInfo['store_id'], $orderInfo['merchant_id']); |
|
|
|
|
$methods = $PaymentModel->getMethodsByClient($this->client, true, $orderInfo['store_id'], $merchantId); |
|
|
|
|
return [ |
|
|
|
|
'order' => $orderInfo, |
|
|
|
|
'personal' => $userInfo, |
|
|
|
@ -267,6 +270,9 @@ class Payment extends BaseService |
|
|
|
|
private function getPaymentConfig(int $merchantId = null) |
|
|
|
|
{ |
|
|
|
|
$PaymentModel = new PaymentModel; |
|
|
|
|
//当前商户是系统自动创建的商户,自动读取商城主的支付配置 |
|
|
|
|
$model = \app\store\model\Merchant::detail($merchantId); |
|
|
|
|
$merchantId = ($model && $model->channel_id > 0) ? 0 : $merchantId; |
|
|
|
|
$templateInfo = $PaymentModel->getPaymentInfo($this->method, $this->client, $this->getStoreId(), $merchantId); |
|
|
|
|
return $templateInfo['template']['config'][$this->method]; |
|
|
|
|
} |
|
|
|
|