0

我正在尝试在我的网店中设置 Adyen 通知。
https://docs.adyen.com/development-resources/notifications/understand-notifications

当我使用 Adyen 测试页面测试 HTTP 帖子时,我收到 301 响应,但是当我使用自定义表单测试 HTTP 帖子时,路由可以正常工作。

web.php中的路由:
Route::name('shop.checkout.adyen-notification')->post('/adyen-notification', 'Shop\CheckoutController@adyenNotification');

VerifyCsrfToken.php 中的设置:
protected $except = ['*/adyen-notification?*'];

自定义表格:

<form method="post" action="https://example.com/adyen-notification?originalReference=&reason=&merchantAccountCode=Test&eventCode=NOTIFICATIONTEST&operations=&success=true&paymentMethod=bankTransfer_BE&currency=EUR&pspReference=test_NOTIFICATIONTEST_1&merchantReference=testMerchantRef1&value=11099">
    <input type="submit" value="SUBMIT">
</form>

我不知道为什么它会给我一个 301 响应。

4

1 回答 1

0

您的表单操作中有错字,缺少右引号:

<form method="post" action="https://example.com/adyen-notification?originalReference=&reason=&merchantAccountCode=Test&eventCode=NOTIFICATIONTEST&operations=&success=true&paymentMethod=bankTransfer_BE&currency=EUR&pspReference=test_NOTIFICATIONTEST_1&merchantReference=testMerchantRef1&value=11099>
    <input type="submit" value="SUBMIT">
</form>

应该:

<form method="post" action="https://example.com/adyen-notification?originalReference=&reason=&merchantAccountCode=Test&eventCode=NOTIFICATIONTEST&operations=&success=true&paymentMethod=bankTransfer_BE&currency=EUR&pspReference=test_NOTIFICATIONTEST_1&merchantReference=testMerchantRef1&value=11099">
    <input type="submit" value="SUBMIT">
</form>

于 2020-03-11T15:38:25.430 回答