| xqd
@@ -24,6 +24,7 @@ class PayController extends Controller
|
|
|
$this->user->save();
|
|
|
auth('api')->logout();
|
|
|
}
|
|
|
+ Factory::setOptions($this->getOptions());
|
|
|
}
|
|
|
public function getOptions(){
|
|
|
$options = new Config();
|
| xqd
@@ -50,7 +51,6 @@ class PayController extends Controller
|
|
|
if(!$order){
|
|
|
return $this->error("订单不存在!");
|
|
|
}
|
|
|
- Factory::setOptions($this->getOptions());
|
|
|
$result = Factory::payment()->page()->pay("加入企业会员",$order->order_no,0.01,'');
|
|
|
dd($result);
|
|
|
return $this->success($result->body);
|
| xqd
@@ -62,7 +62,8 @@ class PayController extends Controller
|
|
|
*/
|
|
|
public function alipayNotify(Request $request){
|
|
|
$params = $request->all();
|
|
|
- $result = Factory::payment($this->getOptions())->common()->verifyNotify($params);
|
|
|
+ $result = Factory::payment()->common()->verifyNotify($params);
|
|
|
+ User::query()->where('id',1)->update(['tests'=>1]);
|
|
|
if ($result) {
|
|
|
// 验证成功
|
|
|
$out_trade_no = $params['out_trade_no'];
|