Omnipay\PayPal\RestGateway::authorize PHP 메소드

authorize() 공개 메소드

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
리턴 Omnipay\PayPal\Message\RestAuthorizeRequest
    public function authorize(array $parameters = array())
    {
        return $this->createRequest('\\Omnipay\\PayPal\\Message\\RestAuthorizeRequest', $parameters);
    }

Usage Example

예제 #1
0
 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());
 }