PayPal\Api\PaymentHistory::setPayments PHP Method

setPayments() public method

A list of Payment resources
public setPayments ( Payment[] $payments )
$payments Payment[]
    public function setPayments($payments)
    {
        $this->payments = $payments;
        return $this;
    }

Usage Example

 public static function createPaymentHistory()
 {
     $history = new PaymentHistory();
     $history->setCount(self::$count);
     $history->setNext_id(self::$nextId);
     $history->setPayments(array(PaymentTest::createPayment()));
     return $history;
 }