2

In my project I am using payment gateway and Omnipay want to know if its redirecting from "back to webiste button" or by clicking on cancel button.

Its redirecting to a page called complete even when its redirected.

I have checked the code and there I see:

$payerId = Request::query('PayerID');
$token = Request::query('token');

So now I want to get all query value like payerID,etc. to check if something indicating weather its redirect or successfully completed.

I know how to make payment by this gateway but any how in this project i am getting some trouble.

Thanks.

Code Star
  • 55
  • 1
  • 2
  • 9
  • When your on the page of your website that you've been redirected back to can you actually see these values as part of the query string so ?PayerID in the URL? – Mark Davidson Jan 14 '16 at 15:21

3 Answers3

7

Personally i used this:

public function foo(Request $request)
    {
        $all = $request->all(); // there you have an array with all input submitted
        //do something with input
        return redirect()->action('HomeController@index');
    }
wolfy
  • 152
  • 6
0

Probably you had to use

$input = Request::all();

At list in official documentation for laravel 5.0 this method works fine

https://laravel.com/docs/5.0/requests#retrieving-input

KLin
  • 479
  • 2
  • 10
0

I assume that from context you are using one of the omnipay paypal gateways. There are 2 urls that you provide to these gateways. The return url is for when the transaction is a success, the cancel url for when it is cancelled.

In addition, after the return url you need to call completePurchase and check out the result from that. The transaction could be declined at that point.

There are examples in the gateway docblocks.

delatbabel
  • 3,601
  • 24
  • 29