Omnipay\PayPal\RestGateway::listPurchase PHP Метод

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

Use this call to get a list of payments in any state (created, approved, failed, etc.). The payments returned are the payments made to the merchant making the call.
public listPurchase ( array $parameters = [] ) : Omnipay\PayPal\Message\RestListPurchaseRequest
$parameters array
Результат Omnipay\PayPal\Message\RestListPurchaseRequest
    public function listPurchase(array $parameters = array())
    {
        return $this->createRequest('\\Omnipay\\PayPal\\Message\\RestListPurchaseRequest', $parameters);
    }

Usage Example

Пример #1
0
 public function testListPurchase()
 {
     $request = $this->gateway->listPurchase(array('count' => 15, 'startId' => 'PAY123', 'startIndex' => 1, 'startTime' => '2015-09-07T00:00:00Z', 'endTime' => '2015-09-08T00:00:00Z'));
     $this->assertInstanceOf('\\Omnipay\\PayPal\\Message\\RestListPurchaseRequest', $request);
     $this->assertSame(15, $request->getCount());
     $this->assertSame('PAY123', $request->getStartId());
     $this->assertSame(1, $request->getStartIndex());
     $this->assertSame('2015-09-07T00:00:00Z', $request->getStartTime());
     $this->assertSame('2015-09-08T00:00:00Z', $request->getEndTime());
     $endPoint = $request->getEndpoint();
     $this->assertSame('https://api.paypal.com/v1/payments/payment', $endPoint);
     $data = $request->getData();
     $this->assertNotEmpty($data);
 }