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

public purchase ( array $parameters = [] ) : AopTradePreCreateRequest
$parameters array
Результат Omnipay\Alipay\Requests\AopTradePreCreateRequest
Пример #1
0
 public function testPurchase()
 {
     /**
      * @var AopTradePreCreateResponse $response
      */
     $response = $this->gateway->purchase(['biz_content' => ['out_trade_no' => date('YmdHis') . mt_rand(1000, 9999), 'subject' => 'test', 'total_amount' => '0.01']])->send();
     $this->assertArrayHasKey('alipay_trade_precreate_response', $response->getData());
     $this->assertFalse($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
 }