PaymentStatus.php 983 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace HitPay\Response;
  3. /**
  4. * Class PaymentStatus - https://staging.hit-pay.com/docs.html?shell#get-payment-status
  5. *
  6. * @package HitPay\Response
  7. */
  8. class PaymentStatus extends CreatePayment
  9. {
  10. /**
  11. * array of payments made to this request ID. Will contain more than one if its a repeating payment link
  12. *
  13. * @var array
  14. */
  15. public $payments;
  16. /**
  17. * PaymentStatus constructor.
  18. * @param \stdClass $response
  19. */
  20. public function __construct(\stdClass $response)
  21. {
  22. parent::__construct($response);
  23. if (isset($response->payments)) {
  24. $this->setPayments($response->payments);
  25. }
  26. }
  27. /**
  28. * @return mixed
  29. */
  30. public function getPayments()
  31. {
  32. return $this->payments;
  33. }
  34. /**
  35. * @param mixed $payments
  36. * @return PaymentStatus
  37. */
  38. public function setPayments($payments)
  39. {
  40. $this->payments = $payments;
  41. return $this;
  42. }
  43. }