AlipayAcquireCreateRequest.php 9.1 KB

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