CreatePayment.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <?php
  2. namespace HitPay\Request;
  3. /**
  4. * Class CreatePayment - https://staging.hit-pay.com/docs.html?shell#payment-requests
  5. *
  6. * @package HitPay\Request
  7. */
  8. class CreatePayment
  9. {
  10. /**
  11. * Amount related to the payment
  12. *
  13. * @var float
  14. */
  15. public $amount;
  16. /**
  17. * Currency related to the payment
  18. *
  19. * @var string
  20. */
  21. public $currency;
  22. /**
  23. * Choice of payment methods you want to offer the customer
  24. *
  25. * @var array
  26. */
  27. public $payment_methods;
  28. /**
  29. * Buyer’s email
  30. *
  31. * @var string
  32. */
  33. public $email;
  34. /**
  35. * Purpose of the Payment request FIFA 16
  36. *
  37. * @var
  38. */
  39. public $purpose;
  40. /**
  41. * Buyer’s name
  42. *
  43. * @var string
  44. */
  45. public $name;
  46. /**
  47. * Buyer’s phone number
  48. *
  49. * @var int
  50. */
  51. public $phone;
  52. /**
  53. * Arbitrary reference number that you can map to your internal reference number.
  54. * This value cannot be edited by the customer
  55. *
  56. * @var string
  57. */
  58. public $reference_number;
  59. /**
  60. * URL where we redirect the user after a payment.
  61. * Query arguments payment_request_id and status are sent along
  62. *
  63. * @var string
  64. */
  65. public $redirect_url;
  66. /**
  67. * URL where our server do POST request after a payment If done
  68. *
  69. * @var string
  70. */
  71. public $webhook;
  72. /**
  73. * If set is true, multiple payments can be paid on a payment request link. Default value is false
  74. *
  75. * @var bool
  76. */
  77. public $allow_repeated_payments;
  78. /**
  79. * Time after which the payment link will be expired.Applicable for repeated payments. Default is Null
  80. *
  81. * @var null
  82. */
  83. public $expiry_date;
  84. /**
  85. * @var string
  86. */
  87. public $channel;
  88. /**
  89. * @return float
  90. */
  91. public function getAmount()
  92. {
  93. return $this->amount;
  94. }
  95. /**
  96. * @return string
  97. */
  98. public function getCurrency()
  99. {
  100. return $this->currency;
  101. }
  102. /**
  103. * @return array
  104. */
  105. public function getPaymentMethods()
  106. {
  107. return $this->payment_methods;
  108. }
  109. /**
  110. * @return string
  111. */
  112. public function getEmail()
  113. {
  114. return $this->email;
  115. }
  116. /**
  117. * @return mixed
  118. */
  119. public function getPurpose()
  120. {
  121. return $this->purpose;
  122. }
  123. /**
  124. * @return string
  125. */
  126. public function getName()
  127. {
  128. return $this->name;
  129. }
  130. /**
  131. * @return int
  132. */
  133. public function getPhone()
  134. {
  135. return $this->phone;
  136. }
  137. /**
  138. * @return string
  139. */
  140. public function getReferenceNumber()
  141. {
  142. return $this->reference_number;
  143. }
  144. /**
  145. * @return string
  146. */
  147. public function getRedirectUrl()
  148. {
  149. return $this->redirect_url;
  150. }
  151. /**
  152. * @return string
  153. */
  154. public function getWebhook()
  155. {
  156. return $this->webhook;
  157. }
  158. /**
  159. * @return bool
  160. */
  161. public function isAllowRepeatedPayments()
  162. {
  163. return $this->allow_repeated_payments;
  164. }
  165. /**
  166. * @return null
  167. */
  168. public function getExpiryDate()
  169. {
  170. return $this->expiry_date;
  171. }
  172. /**
  173. * @param float $amount
  174. * @return CreatePayment
  175. */
  176. public function setAmount($amount)
  177. {
  178. $this->amount = $amount;
  179. return $this;
  180. }
  181. /**
  182. * @param string $currency
  183. * @return CreatePayment
  184. */
  185. public function setCurrency($currency)
  186. {
  187. $this->currency = $currency;
  188. return $this;
  189. }
  190. /**
  191. * @param array $payment_methods
  192. * @return CreatePayment
  193. */
  194. public function setPaymentMethods($payment_methods)
  195. {
  196. $this->payment_methods = $payment_methods;
  197. return $this;
  198. }
  199. /**
  200. * @param string $email
  201. * @return CreatePayment
  202. */
  203. public function setEmail($email)
  204. {
  205. $this->email = $email;
  206. return $this;
  207. }
  208. /**
  209. * @param mixed $purpose
  210. * @return CreatePayment
  211. */
  212. public function setPurpose($purpose)
  213. {
  214. $this->purpose = $purpose;
  215. return $this;
  216. }
  217. /**
  218. * @param string $name
  219. * @return CreatePayment
  220. */
  221. public function setName($name)
  222. {
  223. $this->name = $name;
  224. return $this;
  225. }
  226. /**
  227. * @param int $phone
  228. * @return CreatePayment
  229. */
  230. public function setPhone($phone)
  231. {
  232. $this->phone = $phone;
  233. return $this;
  234. }
  235. /**
  236. * @param string $reference_number
  237. * @return CreatePayment
  238. */
  239. public function setReferenceNumber($reference_number)
  240. {
  241. $this->reference_number = $reference_number;
  242. return $this;
  243. }
  244. /**
  245. * @param string $redirect_url
  246. * @return CreatePayment
  247. */
  248. public function setRedirectUrl($redirect_url)
  249. {
  250. $this->redirect_url = $redirect_url;
  251. return $this;
  252. }
  253. /**
  254. * @param string $webhook
  255. * @return CreatePayment
  256. */
  257. public function setWebhook($webhook)
  258. {
  259. $this->webhook = $webhook;
  260. return $this;
  261. }
  262. /**
  263. * @param bool $allow_repeated_payments
  264. * @return CreatePayment
  265. */
  266. public function setAllowRepeatedPayments($allow_repeated_payments)
  267. {
  268. $this->allow_repeated_payments = $allow_repeated_payments;
  269. return $this;
  270. }
  271. /**
  272. * @param null $expiry_date
  273. * @return CreatePayment
  274. */
  275. public function setExpiryDate($expiry_date)
  276. {
  277. $this->expiry_date = $expiry_date;
  278. return $this;
  279. }
  280. /**
  281. * @return string
  282. */
  283. public function getChannel()
  284. {
  285. return $this->channel;
  286. }
  287. /**
  288. * @param string $channel
  289. * @return CreatePayment
  290. */
  291. public function setChannel($channel)
  292. {
  293. $this->channel = $channel;
  294. return $this;
  295. }
  296. }