PayController.php 714 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace api\modules\v1\controllers;
  3. use common\library\Pay\lib\CLogFileHandler;
  4. use common\library\Pay\lib\Log;
  5. use common\library\Pay\lib\PayNotifyCallBack;
  6. use yii\web\Controller;
  7. use yii;
  8. /**
  9. * 支付回调,处理订单
  10. */
  11. class PayController extends Controller
  12. {
  13. public $enableCsrfValidation = false;
  14. /**
  15. * 微信支付成功,回调方法
  16. * @return string
  17. */
  18. public function actionWechatnotify()
  19. {
  20. $logHandler= new CLogFileHandler(\Yii::getAlias('@log')."/".date('Y-m-d').'.log');
  21. $log = Log::Init($logHandler, 15);
  22. Log::DEBUG("begin notify");
  23. $notify = new PayNotifyCallBack();
  24. $result = $notify->Handle(false);
  25. }
  26. }