AlipayAcquireCreateandpayRequest.php 11 KB

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