0

I want to integrate payumoney with laravel 5.1. I have kept the form in blade . Upon submitting the form I get this error:

method not found

then I tried to put the whole form for payment gateway (payu) in controller. It is still not working. Actually laravel unable to submit form to this url - test.payu.in.

I also used this:

 $request = \Illuminate\Http\Request::create('http://localhost/mypro/payu/', 'POST', ['param1' => 'value1', 'param2' => 'value2']);

not working

Please help me solving this.

Andrea
  • 11,801
  • 17
  • 65
  • 72
Omsun Kumar
  • 147
  • 1
  • 3
  • 9

1 Answers1

0

You might like to use a package for PayU Money. Here is a link it is pretty easy to use.

PayU Package.

Here you don't have to do anything. Just register 2 route one for request and one for response. Then you have to do the following.

// Frirst:
return Payment::make($data, function($then) {
  $then->redirectTo('your/response/url');
});

// Second:

$payment = Payment::capture();
// And you have the payment here.

It is that simple. Hope it helps.

TipuZaynSultan
  • 783
  • 4
  • 16
  • I tried integrating the package you mentioned, but i don't understand how to register two to route for request and response?? Can you please show me or tell me what I have to do? – Rock Jan 31 '17 at 06:33
  • You might want to update the package. see `https://tzsk.github.io/payu` for full documentation. – TipuZaynSultan Feb 08 '17 at 09:51