PayNotifyController.php 751 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Services\PayService;
  4. use Illuminate\Support\Facades\Log;
  5. use Yansongda\Pay\Pay;
  6. class PayNotifyController extends Controller
  7. {
  8. /**
  9. * 微信支付回调
  10. */
  11. public function wx_notify(){
  12. $wxpay = Pay::wechat(PayService::wx_config());
  13. $data = $wxpay->verify();
  14. Log::info($data);
  15. return $wxpay->success();
  16. }
  17. /**
  18. * 支付宝支付回调
  19. */
  20. public function ali_notify(){
  21. $alipay = Pay::alipay(PayService::ali_config());
  22. $data = $alipay->verify();
  23. Log::info($data);
  24. return $alipay->success();
  25. }
  26. /**
  27. * 支付回调业务处理
  28. */
  29. public function order_do_sth($order){
  30. }
  31. }