...
|
...
|
@@ -181,12 +181,12 @@ class Store extends Api |
|
|
'openid' => Db::name('third')->where('user_id',$this->auth->id)->value('openid'),
|
|
|
];
|
|
|
$order = new Order($attributes);
|
|
|
$order_result = $payment->pay($order);
|
|
|
$order_result = $payment->prepare($order);
|
|
|
if($order_result['return_code'] == 'SUCCESS' && $order_result['result_code'] == 'SUCCESS') {
|
|
|
$prepayId = $order_result->prepay_id;
|
|
|
$pay_data = $payment->configForJSSDKPayment($prepayId);
|
|
|
} else {
|
|
|
$this->error($order_result['return_msg'],[$order_result,$order,ConfigService::load()]);
|
|
|
$this->error($order_result['return_msg']);
|
|
|
}
|
|
|
Db::startTrans();
|
|
|
$result = false;
|
...
|
...
|
@@ -210,7 +210,7 @@ class Store extends Api |
|
|
if(!$result || !$result_invite) {
|
|
|
$this->error('申请提交失败');
|
|
|
}
|
|
|
$this->success('申请提交成功',['id'=>$id,'status'=>$param['status'],'pay_data'=>$pay_data]);
|
|
|
$this->success('申请提交成功',['id'=>$id,'pay_data'=>$pay_data]);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -470,7 +470,7 @@ class Store extends Api |
|
|
'openid' => Db::name('third')->where('user_id',$this->auth->id)->value('openid'),
|
|
|
];
|
|
|
$order = new Order($attributes);
|
|
|
$order_result = $payment->pay($order);
|
|
|
$order_result = $payment->prepare($order);
|
|
|
if($order_result['return_code'] == 'SUCCESS' && $order_result['result_code'] == 'SUCCESS') {
|
|
|
$prepayId = $order_result->prepay_id;
|
|
|
$pay_data = $payment->configForJSSDKPayment($prepayId);
|
...
|
...
|
@@ -497,7 +497,7 @@ class Store extends Api |
|
|
if(!$result || !$result_invite) {
|
|
|
$this->error('提交失败');
|
|
|
}
|
|
|
$this->success('提交成功',['id'=>$id,'status'=>$param['status'],'pay_data'=>$pay_data]);
|
|
|
$this->success('提交成功',['id'=>$id,'pay_data'=>$pay_data]);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|