dtpxi88884 2018-03-17 08:10
浏览 158

从laravel的第三方网站重定向回我的网站

I need help here. I'm trying to integrate a Payment gateway(VoguePay) in my app. Now the sandbox testing tested good on payment but the problem is getting the "success_url" to work. How do I go about this!

<form method="POST" action="https://voguepay.com/pay/">
<input type="hidden" name="v_merchant_id" value="demo"/>
<input type='hidden' name='notify_url' value="{{url('notification')}}" />
<input type='hidden' name='success_url' value="{{url('transaction/successful')}}" />
<input type='hidden' name='fail_url' value="{{url('transaction/fail')}}" />
<input type='submit'  value='Buy now' />
</form>

This what laravel is saying when Voguepay is getting a hand on 'success_url' "Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message"

Thank you in advance

Edited

web.php

Route::post('notification','VoguepayController@notify')->name('notification'); Route::get('transaction/successful','VoguepayController@success')->name('success'); Route::get('transaction/fail', 'VoguepayController@fail')->name('fail');

  • 写回答

1条回答 默认 最新

  • dongluo3331 2018-03-17 12:23
    关注

    You must add csrf protection when use form laravel.

    You can read documentation laravel or you can read example in laravel 5.1 https://laravel.com/docs/5.1/routing#csrf-protection

    评论

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示