AlipayAcquirePrecreateRequest.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <?php
  2. /**
  3. * ALIPAY API: alipay.acquire.precreate request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019-03-08 15:29:11
  7. */
  8. class AlipayAcquirePrecreateRequest
  9. {
  10. /**
  11. * 对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body
  12. **/
  13. private $body;
  14. /**
  15. * 描述多渠道收单的渠道明细信息,json格式
  16. **/
  17. private $channelParameters;
  18. /**
  19. * 订单金额币种。目前只支持传入156(人民币)。
  20. 如果为空,则默认设置为156
  21. **/
  22. private $currency;
  23. /**
  24. * 公用业务扩展信息。用于商户的特定业务信息的传递,只有商户与支付宝约定了传递此参数且约定了参数含义,此参数才有效。
  25. 比如可传递二维码支付场景下的门店ID等信息,以json格式传输。
  26. **/
  27. private $extendParams;
  28. /**
  29. * 描述商品明细信息,json格式。
  30. **/
  31. private $goodsDetail;
  32. /**
  33. * 订单支付超时时间。设置未付款交易的超时时间,一旦超时,该笔交易就会自动被关闭。
  34. 取值范围:1m~15d。
  35. m-分钟,h-小时,d-天,1c-当天(无论交易何时创建,都在0点关闭)。
  36. 该参数数值不接受小数点,如1.5h,可转换为90m。
  37. 该功能需要联系支付宝配置关闭时间。
  38. **/
  39. private $itBPay;
  40. /**
  41. * 操作员的类型:
  42. 0:支付宝操作员
  43. 1:商户的操作员
  44. 如果传入其它值或者为空,则默认设置为1
  45. **/
  46. private $operatorCode;
  47. /**
  48. * 卖家的操作员ID
  49. **/
  50. private $operatorId;
  51. /**
  52. * 支付宝合作商户网站唯一订单号
  53. **/
  54. private $outTradeNo;
  55. /**
  56. * 订单中商品的单价。
  57. 如果请求时传入本参数,则必须满足total_fee=price×quantity的条件
  58. **/
  59. private $price;
  60. /**
  61. * 订单中商品的数量。
  62. 如果请求时传入本参数,则必须满足total_fee=price×quantity的条件
  63. **/
  64. private $quantity;
  65. /**
  66. * 分账信息。
  67. 描述分账明细信息,json格式
  68. **/
  69. private $royaltyParameters;
  70. /**
  71. * 分账类型。卖家的分账类型,目前只支持传入ROYALTY(普通分账类型)
  72. **/
  73. private $royaltyType;
  74. /**
  75. * 卖家支付宝账号,可以为email或者手机号。如果seller_id不为空,则以seller_id的值作为卖家账号,忽略本参数
  76. **/
  77. private $sellerEmail;
  78. /**
  79. * 卖家支付宝账号对应的支付宝唯一用户号,以2088开头的纯16位数字。如果和seller_email同时为空,则本参数默认填充partner的值
  80. **/
  81. private $sellerId;
  82. /**
  83. * 收银台页面上,商品展示的超链接
  84. **/
  85. private $showUrl;
  86. /**
  87. * 商品购买
  88. **/
  89. private $subject;
  90. /**
  91. * 订单金额。该笔订单的资金总额,取值范围[0.01,100000000],精确到小数点后2位。
  92. **/
  93. private $totalFee;
  94. private $apiParas = array();
  95. private $terminalType;
  96. private $terminalInfo;
  97. private $prodCode;
  98. private $apiVersion="1.0";
  99. private $notifyUrl;
  100. private $returnUrl;
  101. private $needEncrypt=false;
  102. public function setBody($body)
  103. {
  104. $this->body = $body;
  105. $this->apiParas["body"] = $body;
  106. }
  107. public function getBody()
  108. {
  109. return $this->body;
  110. }
  111. public function setChannelParameters($channelParameters)
  112. {
  113. $this->channelParameters = $channelParameters;
  114. $this->apiParas["channel_parameters"] = $channelParameters;
  115. }
  116. public function getChannelParameters()
  117. {
  118. return $this->channelParameters;
  119. }
  120. public function setCurrency($currency)
  121. {
  122. $this->currency = $currency;
  123. $this->apiParas["currency"] = $currency;
  124. }
  125. public function getCurrency()
  126. {
  127. return $this->currency;
  128. }
  129. public function setExtendParams($extendParams)
  130. {
  131. $this->extendParams = $extendParams;
  132. $this->apiParas["extend_params"] = $extendParams;
  133. }
  134. public function getExtendParams()
  135. {
  136. return $this->extendParams;
  137. }
  138. public function setGoodsDetail($goodsDetail)
  139. {
  140. $this->goodsDetail = $goodsDetail;
  141. $this->apiParas["goods_detail"] = $goodsDetail;
  142. }
  143. public function getGoodsDetail()
  144. {
  145. return $this->goodsDetail;
  146. }
  147. public function setItBPay($itBPay)
  148. {
  149. $this->itBPay = $itBPay;
  150. $this->apiParas["it_b_pay"] = $itBPay;
  151. }
  152. public function getItBPay()
  153. {
  154. return $this->itBPay;
  155. }
  156. public function setOperatorCode($operatorCode)
  157. {
  158. $this->operatorCode = $operatorCode;
  159. $this->apiParas["operator_code"] = $operatorCode;
  160. }
  161. public function getOperatorCode()
  162. {
  163. return $this->operatorCode;
  164. }
  165. public function setOperatorId($operatorId)
  166. {
  167. $this->operatorId = $operatorId;
  168. $this->apiParas["operator_id"] = $operatorId;
  169. }
  170. public function getOperatorId()
  171. {
  172. return $this->operatorId;
  173. }
  174. public function setOutTradeNo($outTradeNo)
  175. {
  176. $this->outTradeNo = $outTradeNo;
  177. $this->apiParas["out_trade_no"] = $outTradeNo;
  178. }
  179. public function getOutTradeNo()
  180. {
  181. return $this->outTradeNo;
  182. }
  183. public function setPrice($price)
  184. {
  185. $this->price = $price;
  186. $this->apiParas["price"] = $price;
  187. }
  188. public function getPrice()
  189. {
  190. return $this->price;
  191. }
  192. public function setQuantity($quantity)
  193. {
  194. $this->quantity = $quantity;
  195. $this->apiParas["quantity"] = $quantity;
  196. }
  197. public function getQuantity()
  198. {
  199. return $this->quantity;
  200. }
  201. public function setRoyaltyParameters($royaltyParameters)
  202. {
  203. $this->royaltyParameters = $royaltyParameters;
  204. $this->apiParas["royalty_parameters"] = $royaltyParameters;
  205. }
  206. public function getRoyaltyParameters()
  207. {
  208. return $this->royaltyParameters;
  209. }
  210. public function setRoyaltyType($royaltyType)
  211. {
  212. $this->royaltyType = $royaltyType;
  213. $this->apiParas["royalty_type"] = $royaltyType;
  214. }
  215. public function getRoyaltyType()
  216. {
  217. return $this->royaltyType;
  218. }
  219. public function setSellerEmail($sellerEmail)
  220. {
  221. $this->sellerEmail = $sellerEmail;
  222. $this->apiParas["seller_email"] = $sellerEmail;
  223. }
  224. public function getSellerEmail()
  225. {
  226. return $this->sellerEmail;
  227. }
  228. public function setSellerId($sellerId)
  229. {
  230. $this->sellerId = $sellerId;
  231. $this->apiParas["seller_id"] = $sellerId;
  232. }
  233. public function getSellerId()
  234. {
  235. return $this->sellerId;
  236. }
  237. public function setShowUrl($showUrl)
  238. {
  239. $this->showUrl = $showUrl;
  240. $this->apiParas["show_url"] = $showUrl;
  241. }
  242. public function getShowUrl()
  243. {
  244. return $this->showUrl;
  245. }
  246. public function setSubject($subject)
  247. {
  248. $this->subject = $subject;
  249. $this->apiParas["subject"] = $subject;
  250. }
  251. public function getSubject()
  252. {
  253. return $this->subject;
  254. }
  255. public function setTotalFee($totalFee)
  256. {
  257. $this->totalFee = $totalFee;
  258. $this->apiParas["total_fee"] = $totalFee;
  259. }
  260. public function getTotalFee()
  261. {
  262. return $this->totalFee;
  263. }
  264. public function getApiMethodName()
  265. {
  266. return "alipay.acquire.precreate";
  267. }
  268. public function setNotifyUrl($notifyUrl)
  269. {
  270. $this->notifyUrl=$notifyUrl;
  271. }
  272. public function getNotifyUrl()
  273. {
  274. return $this->notifyUrl;
  275. }
  276. public function setReturnUrl($returnUrl)
  277. {
  278. $this->returnUrl=$returnUrl;
  279. }
  280. public function getReturnUrl()
  281. {
  282. return $this->returnUrl;
  283. }
  284. public function getApiParas()
  285. {
  286. return $this->apiParas;
  287. }
  288. public function getTerminalType()
  289. {
  290. return $this->terminalType;
  291. }
  292. public function setTerminalType($terminalType)
  293. {
  294. $this->terminalType = $terminalType;
  295. }
  296. public function getTerminalInfo()
  297. {
  298. return $this->terminalInfo;
  299. }
  300. public function setTerminalInfo($terminalInfo)
  301. {
  302. $this->terminalInfo = $terminalInfo;
  303. }
  304. public function getProdCode()
  305. {
  306. return $this->prodCode;
  307. }
  308. public function setProdCode($prodCode)
  309. {
  310. $this->prodCode = $prodCode;
  311. }
  312. public function setApiVersion($apiVersion)
  313. {
  314. $this->apiVersion=$apiVersion;
  315. }
  316. public function getApiVersion()
  317. {
  318. return $this->apiVersion;
  319. }
  320. public function setNeedEncrypt($needEncrypt)
  321. {
  322. $this->needEncrypt=$needEncrypt;
  323. }
  324. public function getNeedEncrypt()
  325. {
  326. return $this->needEncrypt;
  327. }
  328. }