|
|
@@ -89,20 +89,22 @@ class LaveRepository
|
|
|
*/
|
|
|
public static function wxpaySign($cid, $orderId,$plan_record, $field = "order_id")
|
|
|
{
|
|
|
- if (is_string($orderId))
|
|
|
- $orderInfo = LaveMonthModel::where($field, $orderId)->find();
|
|
|
- else
|
|
|
- $orderInfo = $orderId;
|
|
|
- if (!$orderInfo || !isset($orderInfo['paid'])) exception('支付订单不存在!');
|
|
|
- if ($orderInfo['paid']) exception('支付已支付!');
|
|
|
- if ($orderInfo['amount'] <= 0) exception('该支付无需支付!');
|
|
|
+
|
|
|
$openid = UserRelation::userIdToOpenId($plan_record['uid']);
|
|
|
- if ($orderInfo['user_id']==6779||$orderInfo['user_id']==12125){
|
|
|
- // ($openid, $out_trade_no, $total_fee, $attach, $body, $contract_code, $plan_id, $spbill_create_ip ,$detail = '', $trade_type = 'JSAPI', $options = [], $cid = 0,$contract_display_account='')
|
|
|
- $rs = WechatService::signedOrder($openid, $orderInfo['order_id'], $orderInfo['amount'], "lave", $orderInfo['order_name'], $plan_record['contract_code'],$plan_record['plan_id'],$plan_record['spbill_create_ip'],'', 'JSAPI', [], $cid,$plan_record['contract_display_account']);
|
|
|
+ if ($plan_record['uid']==6779||$plan_record['uid']==12125){
|
|
|
+
|
|
|
+ $rs = WechatService::signedOrder($plan_record['contract_code'],$plan_record['plan_id'],$cid,$plan_record['contract_display_account']);
|
|
|
@file_put_contents("quanju3.txt", json_encode($rs) . "-签约返回结果测试2\r\n", 8);
|
|
|
return $rs;
|
|
|
}else{
|
|
|
+ if (is_string($orderId))
|
|
|
+ $orderInfo = LaveMonthModel::where($field, $orderId)->find();
|
|
|
+ else
|
|
|
+ $orderInfo = $orderId;
|
|
|
+
|
|
|
+ if (!$orderInfo || !isset($orderInfo['paid'])) exception('支付订单不存在!');
|
|
|
+ if ($orderInfo['paid']) exception('支付已支付!');
|
|
|
+ if ($orderInfo['amount'] <= 0) exception('该支付无需支付!');
|
|
|
// ($openid, $out_trade_no, $total_fee, $attach, $body, $contract_code, $plan_id, $spbill_create_ip ,$detail = '', $trade_type = 'JSAPI', $options = [], $cid = 0,$contract_display_account='')
|
|
|
$rs = WechatService::paysignedOrder($openid, $orderInfo['order_id'], $orderInfo['amount'], "lave", $orderInfo['order_name'], $plan_record['contract_code'],$plan_record['plan_id'],$plan_record['spbill_create_ip'],'', 'JSAPI', [], $cid,$plan_record['contract_display_account']);
|
|
|
|