Omnipay\PayPal\Message\ExpressAuthorizeResponse::getRedirectUrl PHP Метод

getRedirectUrl() публичный Метод

public getRedirectUrl ( )
    public function getRedirectUrl()
    {
        return $this->getCheckoutEndpoint() . '?' . http_build_query($this->getRedirectQueryParameters(), '', '&');
    }

Usage Example

 public function testExpressPurchaseSuccess()
 {
     $httpResponse = $this->getMockHttpResponse('ExpressPurchaseSuccess.txt');
     $request = $this->getMockRequest();
     $request->shouldReceive('getTestMode')->once()->andReturn(true);
     $response = new ExpressAuthorizeResponse($request, $httpResponse->getBody());
     $this->assertFalse($response->isSuccessful());
     $this->assertSame('EC-42721413K79637829', $response->getTransactionReference());
     $this->assertNull($response->getMessage());
     $this->assertNull($response->getRedirectData());
     $this->assertSame('https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=EC-42721413K79637829', $response->getRedirectUrl());
     $this->assertSame('GET', $response->getRedirectMethod());
 }