AlipayAcquireRefundRequest.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?php
  2. /**
  3. * ALIPAY API: alipay.acquire.refund request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019-03-08 15:29:11
  7. */
  8. class AlipayAcquireRefundRequest
  9. {
  10. /**
  11. * 卖家的操作员ID。
  12. **/
  13. private $operatorId;
  14. /**
  15. * 操作员的类型:
  16. 0:支付宝操作员
  17. 1:商户的操作员
  18. 如果传入其它值或者为空,则默认设置为1。
  19. **/
  20. private $operatorType;
  21. /**
  22. * 商户退款请求单号,用以标识本次交易的退款请求。
  23. 如果不传入本参数,则以out_trade_no填充本参数的值。同时,认为本次请求为全额退款,要求退款金额和交易支付金额一致。
  24. **/
  25. private $outRequestNo;
  26. /**
  27. * 商户网站唯一订单号
  28. **/
  29. private $outTradeNo;
  30. /**
  31. * 业务关联ID集合,用于放置商户的退款单号、退款流水号等信息,json格式
  32. **/
  33. private $refIds;
  34. /**
  35. * 退款金额;退款金额不能大于订单金额,全额退款必须与订单金额一致。
  36. **/
  37. private $refundAmount;
  38. /**
  39. * 退款原因说明。
  40. **/
  41. private $refundReason;
  42. /**
  43. * 该交易在支付宝系统中的交易流水号。
  44. 最短16位,最长64位。
  45. 如果同时传了out_trade_no和trade_no,则以trade_no为准
  46. **/
  47. private $tradeNo;
  48. private $apiParas = array();
  49. private $terminalType;
  50. private $terminalInfo;
  51. private $prodCode;
  52. private $apiVersion="1.0";
  53. private $notifyUrl;
  54. private $returnUrl;
  55. private $needEncrypt=false;
  56. public function setOperatorId($operatorId)
  57. {
  58. $this->operatorId = $operatorId;
  59. $this->apiParas["operator_id"] = $operatorId;
  60. }
  61. public function getOperatorId()
  62. {
  63. return $this->operatorId;
  64. }
  65. public function setOperatorType($operatorType)
  66. {
  67. $this->operatorType = $operatorType;
  68. $this->apiParas["operator_type"] = $operatorType;
  69. }
  70. public function getOperatorType()
  71. {
  72. return $this->operatorType;
  73. }
  74. public function setOutRequestNo($outRequestNo)
  75. {
  76. $this->outRequestNo = $outRequestNo;
  77. $this->apiParas["out_request_no"] = $outRequestNo;
  78. }
  79. public function getOutRequestNo()
  80. {
  81. return $this->outRequestNo;
  82. }
  83. public function setOutTradeNo($outTradeNo)
  84. {
  85. $this->outTradeNo = $outTradeNo;
  86. $this->apiParas["out_trade_no"] = $outTradeNo;
  87. }
  88. public function getOutTradeNo()
  89. {
  90. return $this->outTradeNo;
  91. }
  92. public function setRefIds($refIds)
  93. {
  94. $this->refIds = $refIds;
  95. $this->apiParas["ref_ids"] = $refIds;
  96. }
  97. public function getRefIds()
  98. {
  99. return $this->refIds;
  100. }
  101. public function setRefundAmount($refundAmount)
  102. {
  103. $this->refundAmount = $refundAmount;
  104. $this->apiParas["refund_amount"] = $refundAmount;
  105. }
  106. public function getRefundAmount()
  107. {
  108. return $this->refundAmount;
  109. }
  110. public function setRefundReason($refundReason)
  111. {
  112. $this->refundReason = $refundReason;
  113. $this->apiParas["refund_reason"] = $refundReason;
  114. }
  115. public function getRefundReason()
  116. {
  117. return $this->refundReason;
  118. }
  119. public function setTradeNo($tradeNo)
  120. {
  121. $this->tradeNo = $tradeNo;
  122. $this->apiParas["trade_no"] = $tradeNo;
  123. }
  124. public function getTradeNo()
  125. {
  126. return $this->tradeNo;
  127. }
  128. public function getApiMethodName()
  129. {
  130. return "alipay.acquire.refund";
  131. }
  132. public function setNotifyUrl($notifyUrl)
  133. {
  134. $this->notifyUrl=$notifyUrl;
  135. }
  136. public function getNotifyUrl()
  137. {
  138. return $this->notifyUrl;
  139. }
  140. public function setReturnUrl($returnUrl)
  141. {
  142. $this->returnUrl=$returnUrl;
  143. }
  144. public function getReturnUrl()
  145. {
  146. return $this->returnUrl;
  147. }
  148. public function getApiParas()
  149. {
  150. return $this->apiParas;
  151. }
  152. public function getTerminalType()
  153. {
  154. return $this->terminalType;
  155. }
  156. public function setTerminalType($terminalType)
  157. {
  158. $this->terminalType = $terminalType;
  159. }
  160. public function getTerminalInfo()
  161. {
  162. return $this->terminalInfo;
  163. }
  164. public function setTerminalInfo($terminalInfo)
  165. {
  166. $this->terminalInfo = $terminalInfo;
  167. }
  168. public function getProdCode()
  169. {
  170. return $this->prodCode;
  171. }
  172. public function setProdCode($prodCode)
  173. {
  174. $this->prodCode = $prodCode;
  175. }
  176. public function setApiVersion($apiVersion)
  177. {
  178. $this->apiVersion=$apiVersion;
  179. }
  180. public function getApiVersion()
  181. {
  182. return $this->apiVersion;
  183. }
  184. public function setNeedEncrypt($needEncrypt)
  185. {
  186. $this->needEncrypt=$needEncrypt;
  187. }
  188. public function getNeedEncrypt()
  189. {
  190. return $this->needEncrypt;
  191. }
  192. }