Omnipay\PayPal\RestGateway::authorize PHP Method

authorize() public method

To collect payment at a later time, first authorize a payment using the /payment resource. You can then capture the payment to complete the sale and collect payment.
public authorize ( array $parameters = [] ) : RestAuthorizeRequest
$parameters array
return Omnipay\PayPal\Message\RestAuthorizeRequest
    public function authorize(array $parameters = array())
    {
        return $this->createRequest('\\Omnipay\\PayPal\\Message\\RestAuthorizeRequest', $parameters);
    }

Usage Example

コード例 #1
0
ファイル: RestGatewayTest.php プロジェクト: omnipay/paypal
 public function testAuthorize()
 {
     $this->setMockHttpResponse('RestPurchaseSuccess.txt');
     $response = $this->gateway->authorize($this->options)->send();
     $this->assertTrue($response->isSuccessful());
     $this->assertEquals('44E89981F8714392Y', $response->getTransactionReference());
     $this->assertNull($response->getMessage());
 }