protected function getPaymentFromRequest(HTTPRequest $request, $gateway = null)
    {
        $identifier = $request->param('Identifier');
        $results = $this->extend('updatePaymentFromRequest', $request, $gateway);

        // Look to see if our extension return a payment,
        // if so, return it.
        foreach ($results as $result) {
            if ($result instanceof Payment) {
                return $result;
            }
        }

        return Payment::get()
                ->filter('Identifier', $identifier)
                ->filter('Identifier:not', '')
                ->first();
    }
protected function getPaymentFromRequest(HTTPRequest $request, $gateway = null)
    {
        $identifier = $request->param('Identifier');
        $results = $this->extend('updatePaymentFromRequest', $request, $gateway);

        // Look to see if our extension return a payment,
        // if so, return it.
        foreach ($results as $result) {
            if ($result instanceof Payment) {
                return $result;
            }
        }

        return Payment::get()
                ->filter('Identifier', $identifier)
                ->filter('Identifier:not', '')
                ->first();
    }
protected function getPaymentFromRequest ( HTTPRequest $ request , $ gateway = null ) { $ identifier = $ request -> param ( 'Identifier' ) ; $ results = $ this -> extend ( 'updatePaymentFromRequest' , $ request , $ gateway ) ; // Look to see if our extension return a payment, // if so, return it. foreach ( $ results as $ result ) { if ( $ result instanceof Payment ) { return $ result ; } } return Payment :: get ( ) -> filter ( 'Identifier' , $ identifier ) -> filter ( 'Identifier:not' , '' ) -> first ( ) ; }
Get the the payment according to the identifier given in the url

@param HTTPRequest $request The current request
@param string $gateway the gateway name
@return Payment the payment
Get the the payment according to the identifier given in the url