正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
@@ -417,7 +417,7 @@ class OrderController extends HomeBaseController | @@ -417,7 +417,7 @@ class OrderController extends HomeBaseController | ||
417 | $payRequestBuilder->setBody($body); | 417 | $payRequestBuilder->setBody($body); |
418 | $payRequestBuilder->setSubject($subject); | 418 | $payRequestBuilder->setSubject($subject); |
419 | $payRequestBuilder->setOutTradeNo($out_trade_no); | 419 | $payRequestBuilder->setOutTradeNo($out_trade_no); |
420 | - $payRequestBuilder->setTotalAmount($total_amount); | 420 | + $payRequestBuilder->setTotalAmount(0.01); |
421 | $payRequestBuilder->setTimeExpress($timeout_express); | 421 | $payRequestBuilder->setTimeExpress($timeout_express); |
422 | 422 | ||
423 | $payResponse = new \AlipayTradeService($config); | 423 | $payResponse = new \AlipayTradeService($config); |
@@ -427,10 +427,14 @@ class OrderController extends HomeBaseController | @@ -427,10 +427,14 @@ class OrderController extends HomeBaseController | ||
427 | } | 427 | } |
428 | } | 428 | } |
429 | 429 | ||
430 | - //支付宝回调 | 430 | + //支付宝异步回调 |
431 | public function alipayNotify() | 431 | public function alipayNotify() |
432 | { | 432 | { |
433 | - | 433 | + require EXTEND_PATH . '/alipay/config.php'; |
434 | + require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; | ||
435 | + $alipay = new \AlipayTradeService($config); | ||
436 | + Db::name('user')->where(['id'=>10])->setInc('balance', 1); | ||
437 | + $alipay->check(); | ||
434 | } | 438 | } |
435 | 439 | ||
436 | } | 440 | } |
-
请 注册 或 登录 后发表评论