【发布时间】:2021-09-08 12:57:56
【问题描述】:
我正在尝试在我的 Laravel 项目中实现 IPN,感谢“csrf”,来自我网站的发布请求正在运行,
我尝试像这里写的那样实现它:
https://developer.paypal.com/docs/api-basics/notifications/ipn/ht-ipn/
在我的路线/web.php 中:
Route::post('i', [IController::class, 'y'])->name('i');
在 IController 里面写了什么:
public function y()
{
error_log('function y called');
// STEP 1: read POST data
// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST.
// Instead, read raw POST data from the input stream.
$raw_post_data = file_get_contents('php://input');............
error_log 不显示,表示该函数从未进入过。
问题:如何强制 Laravel 排除来自 Paypal 的 POSTS?
【问题讨论】:
标签: php laravel post paypal paypal-ipn