Omnipay\Alipay\LegacyExpressGateway::purchase PHP Method

purchase() public method

public purchase ( array $parameters = [] ) : AbstractRequest
$parameters array
return Omnipay\Common\Message\AbstractRequest
    public function purchase(array $parameters = [])
    {
        return $this->createRequest(LegacyExpressPurchaseRequest::class, $parameters);
    }

Usage Example

 public function testPurchase()
 {
     /**
      * @var LegacyExpressPurchaseResponse $response
      */
     $response = $this->gateway->purchase($this->options)->send();
     $this->assertTrue($response->isSuccessful());
     $this->assertTrue($response->isRedirect());
     $this->assertNotEmpty($response->getRedirectUrl());
 }
LegacyExpressGateway