PayNotifyController.php 653 B

123456789101112131415161718192021222324252627282930313233
  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. }