WxPay.Data.php 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983
  1. <?php
  2. require_once "WxPay.Exception.php";
  3. /**
  4. *
  5. * 数据对象基础类,该类中定义数据类最基本的行为,包括:
  6. * 计算/设置/获取签名、输出xml格式的参数、从xml读取数据对象等
  7. * @author widyhu
  8. *
  9. */
  10. class WxPayDataBase
  11. {
  12. protected $values = array();
  13. public function Set($name,$val)
  14. {
  15. $this->values[$name] = $val;
  16. }
  17. /**
  18. * 设置签名,详见签名生成算法
  19. * @param string $value
  20. **/
  21. public function SetSign($is_upper = true)
  22. {
  23. $sign = $this->MakeSign($is_upper);
  24. $this->values['sign'] = $sign;
  25. return $sign;
  26. }
  27. /**
  28. * 获取签名,详见签名生成算法的值
  29. * @return 值
  30. **/
  31. public function GetSign()
  32. {
  33. return $this->values['sign'];
  34. }
  35. /**
  36. * 判断签名,详见签名生成算法是否存在
  37. * @return true 或 false
  38. **/
  39. public function IsSignSet()
  40. {
  41. return array_key_exists('sign', $this->values);
  42. }
  43. /**
  44. * 输出xml字符
  45. * @throws WxPayException
  46. **/
  47. public function ToXml()
  48. {
  49. if(!is_array($this->values)
  50. || count($this->values) <= 0)
  51. {
  52. throw new WxPayException("数组数据异常!");
  53. }
  54. $xml = "<xml>";
  55. foreach ($this->values as $key=>$val)
  56. {
  57. if (is_numeric($val)){
  58. $xml.="<".$key.">".$val."</".$key.">";
  59. }else{
  60. $xml.="<".$key."><![CDATA[".$val."]]></".$key.">";
  61. }
  62. }
  63. $xml.="</xml>";
  64. return $xml;
  65. }
  66. /**
  67. * 将xml转为array
  68. * @param string $xml
  69. * @throws WxPayException
  70. */
  71. public function FromXml($xml)
  72. {
  73. if(!$xml){
  74. throw new WxPayException("xml数据异常!");
  75. }
  76. //将XML转为array
  77. $this->values = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
  78. return $this->values;
  79. }
  80. /**
  81. * 格式化参数格式化成url参数
  82. */
  83. public function ToUrlParams()
  84. {
  85. $buff = "";
  86. foreach ($this->values as $k => $v)
  87. {
  88. if($k != "sign" && $v != "" && !is_array($v)){
  89. $buff .= $k . "=" . $v . "&";
  90. }
  91. }
  92. $buff = trim($buff, "&");
  93. return $buff;
  94. }
  95. /**
  96. * 生成签名
  97. * @return 签名,本函数不覆盖sign成员变量,如要设置签名需要调用SetSign方法赋值
  98. */
  99. public function MakeSign($is_upper = true)
  100. {
  101. //签名步骤一:按字典序排序参数
  102. ksort($this->values);
  103. $string = $this->ToUrlParams();
  104. //签名步骤二:在string后加入KEY
  105. $string = $string . "&key=".WXAPP_KEY;
  106. //签名步骤三:MD5加密
  107. $string = md5($string);
  108. //签名步骤四:所有字符转为大写
  109. if ($is_upper){
  110. $result = strtoupper($string);
  111. }else{
  112. $result = strtolower($string);
  113. }
  114. return $result;
  115. }
  116. /**
  117. * 获取设置的值
  118. */
  119. public function GetValues()
  120. {
  121. return $this->values;
  122. }
  123. }
  124. /**
  125. *
  126. * 接口调用结果类
  127. * @author widyhu
  128. *
  129. */
  130. class WxPayResults extends WxPayDataBase
  131. {
  132. /**
  133. *
  134. * 检测签名
  135. */
  136. public function CheckSign()
  137. {
  138. if(!$this->IsSignSet()){
  139. return true;
  140. }
  141. $sign = $this->MakeSign();
  142. if($this->GetSign() == $sign){
  143. return true;
  144. }
  145. throw new WxPayException("签名错误!");
  146. }
  147. /**
  148. *
  149. * 使用数组初始化
  150. * @param array $array
  151. */
  152. public function FromArray($array)
  153. {
  154. $this->values = $array;
  155. }
  156. /**
  157. *
  158. * 使用数组初始化对象
  159. * @param array $array
  160. * @param 是否检测签名 $noCheckSign
  161. */
  162. public static function InitFromArray($array, $noCheckSign = false)
  163. {
  164. $obj = new self();
  165. $obj->FromArray($array);
  166. if($noCheckSign == false){
  167. $obj->CheckSign();
  168. }
  169. return $obj;
  170. }
  171. /**
  172. *
  173. * 设置参数
  174. * @param string $key
  175. * @param string $value
  176. */
  177. public function SetData($key, $value)
  178. {
  179. $this->values[$key] = $value;
  180. }
  181. /**
  182. * 将xml转为array
  183. * @param string $xml
  184. * @throws WxPayException
  185. */
  186. public static function Init($xml)
  187. {
  188. $obj = new self();
  189. $obj->FromXml($xml);
  190. $obj->CheckSign();
  191. return $obj->GetValues();
  192. }
  193. }
  194. /**
  195. *
  196. * 回调基础类
  197. * @author widyhu
  198. *
  199. */
  200. class WxPayNotifyReply extends WxPayDataBase
  201. {
  202. /**
  203. *
  204. * 设置错误码 FAIL 或者 SUCCESS
  205. * @param string
  206. */
  207. public function SetReturn_code($return_code)
  208. {
  209. $this->values['return_code'] = $return_code;
  210. }
  211. /**
  212. *
  213. * 获取错误码 FAIL 或者 SUCCESS
  214. * @return string $return_code
  215. */
  216. public function GetReturn_code()
  217. {
  218. return $this->values['return_code'];
  219. }
  220. /**
  221. *
  222. * 设置错误信息
  223. * @param string $return_code
  224. */
  225. public function SetReturn_msg($return_msg)
  226. {
  227. $this->values['return_msg'] = $return_msg;
  228. }
  229. /**
  230. *
  231. * 获取错误信息
  232. * @return string
  233. */
  234. public function GetReturn_msg()
  235. {
  236. return $this->values['return_msg'];
  237. }
  238. /**
  239. *
  240. * 设置返回参数
  241. * @param string $key
  242. * @param string $value
  243. */
  244. public function SetData($key, $value)
  245. {
  246. $this->values[$key] = $value;
  247. }
  248. }
  249. /**
  250. *
  251. * 统一下单输入对象
  252. * @author widyhu
  253. *
  254. */
  255. class WxPayUnifiedOrder extends WxPayDataBase
  256. {
  257. /**
  258. * 设置微信分配的公众账号ID
  259. * @param string $value
  260. **/
  261. public function SetAppid($value)
  262. {
  263. $this->values['appid'] = $value;
  264. }
  265. /**
  266. * 获取微信分配的公众账号ID的值
  267. * @return 值
  268. **/
  269. public function GetAppid()
  270. {
  271. return $this->values['appid'];
  272. }
  273. /**
  274. * 判断微信分配的公众账号ID是否存在
  275. * @return true 或 false
  276. **/
  277. public function IsAppidSet()
  278. {
  279. return array_key_exists('appid', $this->values);
  280. }
  281. /**
  282. * 设置微信支付分配的商户号
  283. * @param string $value
  284. **/
  285. public function SetMch_id($value)
  286. {
  287. $this->values['mch_id'] = $value;
  288. }
  289. /**
  290. * 获取微信支付分配的商户号的值
  291. * @return 值
  292. **/
  293. public function GetMch_id()
  294. {
  295. return $this->values['mch_id'];
  296. }
  297. /**
  298. * 判断微信支付分配的商户号是否存在
  299. * @return true 或 false
  300. **/
  301. public function IsMch_idSet()
  302. {
  303. return array_key_exists('mch_id', $this->values);
  304. }
  305. /**
  306. * 设置微信支付分配的终端设备号,商户自定义
  307. * @param string $value
  308. **/
  309. public function SetDevice_info($value)
  310. {
  311. $this->values['device_info'] = $value;
  312. }
  313. /**
  314. * 获取微信支付分配的终端设备号,商户自定义的值
  315. * @return 值
  316. **/
  317. public function GetDevice_info()
  318. {
  319. return $this->values['device_info'];
  320. }
  321. /**
  322. * 判断微信支付分配的终端设备号,商户自定义是否存在
  323. * @return true 或 false
  324. **/
  325. public function IsDevice_infoSet()
  326. {
  327. return array_key_exists('device_info', $this->values);
  328. }
  329. /**
  330. * 设置随机字符串,不长于32位。推荐随机数生成算法
  331. * @param string $value
  332. **/
  333. public function SetNonce_str($value)
  334. {
  335. $this->values['nonce_str'] = $value;
  336. }
  337. /**
  338. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  339. * @return 值
  340. **/
  341. public function GetNonce_str()
  342. {
  343. return $this->values['nonce_str'];
  344. }
  345. /**
  346. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  347. * @return true 或 false
  348. **/
  349. public function IsNonce_strSet()
  350. {
  351. return array_key_exists('nonce_str', $this->values);
  352. }
  353. /**
  354. * 设置商品或支付单简要描述
  355. * @param string $value
  356. **/
  357. public function SetBody($value)
  358. {
  359. $this->values['body'] = $value;
  360. }
  361. /**
  362. * 获取商品或支付单简要描述的值
  363. * @return 值
  364. **/
  365. public function GetBody()
  366. {
  367. return $this->values['body'];
  368. }
  369. /**
  370. * 判断商品或支付单简要描述是否存在
  371. * @return true 或 false
  372. **/
  373. public function IsBodySet()
  374. {
  375. return array_key_exists('body', $this->values);
  376. }
  377. /**
  378. * 设置商品名称明细列表
  379. * @param string $value
  380. **/
  381. public function SetDetail($value)
  382. {
  383. $this->values['detail'] = $value;
  384. }
  385. /**
  386. * 获取商品名称明细列表的值
  387. * @return 值
  388. **/
  389. public function GetDetail()
  390. {
  391. return $this->values['detail'];
  392. }
  393. /**
  394. * 判断商品名称明细列表是否存在
  395. * @return true 或 false
  396. **/
  397. public function IsDetailSet()
  398. {
  399. return array_key_exists('detail', $this->values);
  400. }
  401. /**
  402. * 设置附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据
  403. * @param string $value
  404. **/
  405. public function SetAttach($value)
  406. {
  407. $this->values['attach'] = $value;
  408. }
  409. /**
  410. * 获取附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据的值
  411. * @return 值
  412. **/
  413. public function GetAttach()
  414. {
  415. return $this->values['attach'];
  416. }
  417. /**
  418. * 判断附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据是否存在
  419. * @return true 或 false
  420. **/
  421. public function IsAttachSet()
  422. {
  423. return array_key_exists('attach', $this->values);
  424. }
  425. /**
  426. * 设置商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
  427. * @param string $value
  428. **/
  429. public function SetOut_trade_no($value)
  430. {
  431. $this->values['out_trade_no'] = $value;
  432. }
  433. /**
  434. * 获取商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号的值
  435. * @return 值
  436. **/
  437. public function GetOut_trade_no()
  438. {
  439. return $this->values['out_trade_no'];
  440. }
  441. /**
  442. * 判断商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号是否存在
  443. * @return true 或 false
  444. **/
  445. public function IsOut_trade_noSet()
  446. {
  447. return array_key_exists('out_trade_no', $this->values);
  448. }
  449. /**
  450. * 设置符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
  451. * @param string $value
  452. **/
  453. public function SetFee_type($value)
  454. {
  455. $this->values['fee_type'] = $value;
  456. }
  457. /**
  458. * 获取符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型的值
  459. * @return 值
  460. **/
  461. public function GetFee_type()
  462. {
  463. return $this->values['fee_type'];
  464. }
  465. /**
  466. * 判断符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型是否存在
  467. * @return true 或 false
  468. **/
  469. public function IsFee_typeSet()
  470. {
  471. return array_key_exists('fee_type', $this->values);
  472. }
  473. /**
  474. * 设置订单总金额,只能为整数,详见支付金额
  475. * @param string $value
  476. **/
  477. public function SetTotal_fee($value)
  478. {
  479. $this->values['total_fee'] = $value;
  480. }
  481. /**
  482. * 获取订单总金额,只能为整数,详见支付金额的值
  483. * @return 值
  484. **/
  485. public function GetTotal_fee()
  486. {
  487. return $this->values['total_fee'];
  488. }
  489. /**
  490. * 判断订单总金额,只能为整数,详见支付金额是否存在
  491. * @return true 或 false
  492. **/
  493. public function IsTotal_feeSet()
  494. {
  495. return array_key_exists('total_fee', $this->values);
  496. }
  497. /**
  498. * 设置APP和网页支付提交用户端ip,Native支付填调用微信支付API的机器IP。
  499. * @param string $value
  500. **/
  501. public function SetSpbill_create_ip($value)
  502. {
  503. $this->values['spbill_create_ip'] = $value;
  504. }
  505. /**
  506. * 获取APP和网页支付提交用户端ip,Native支付填调用微信支付API的机器IP。的值
  507. * @return 值
  508. **/
  509. public function GetSpbill_create_ip()
  510. {
  511. return $this->values['spbill_create_ip'];
  512. }
  513. /**
  514. * 判断APP和网页支付提交用户端ip,Native支付填调用微信支付API的机器IP。是否存在
  515. * @return true 或 false
  516. **/
  517. public function IsSpbill_create_ipSet()
  518. {
  519. return array_key_exists('spbill_create_ip', $this->values);
  520. }
  521. /**
  522. * 设置订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则
  523. * @param string $value
  524. **/
  525. public function SetTime_start($value)
  526. {
  527. $this->values['time_start'] = $value;
  528. }
  529. /**
  530. * 获取订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则的值
  531. * @return 值
  532. **/
  533. public function GetTime_start()
  534. {
  535. return $this->values['time_start'];
  536. }
  537. /**
  538. * 判断订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则是否存在
  539. * @return true 或 false
  540. **/
  541. public function IsTime_startSet()
  542. {
  543. return array_key_exists('time_start', $this->values);
  544. }
  545. /**
  546. * 设置订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则
  547. * @param string $value
  548. **/
  549. public function SetTime_expire($value)
  550. {
  551. $this->values['time_expire'] = $value;
  552. }
  553. /**
  554. * 获取订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则的值
  555. * @return 值
  556. **/
  557. public function GetTime_expire()
  558. {
  559. return $this->values['time_expire'];
  560. }
  561. /**
  562. * 判断订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则是否存在
  563. * @return true 或 false
  564. **/
  565. public function IsTime_expireSet()
  566. {
  567. return array_key_exists('time_expire', $this->values);
  568. }
  569. /**
  570. * 设置商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠
  571. * @param string $value
  572. **/
  573. public function SetGoods_tag($value)
  574. {
  575. $this->values['goods_tag'] = $value;
  576. }
  577. /**
  578. * 获取商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠的值
  579. * @return 值
  580. **/
  581. public function GetGoods_tag()
  582. {
  583. return $this->values['goods_tag'];
  584. }
  585. /**
  586. * 判断商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠是否存在
  587. * @return true 或 false
  588. **/
  589. public function IsGoods_tagSet()
  590. {
  591. return array_key_exists('goods_tag', $this->values);
  592. }
  593. /**
  594. * 设置接收微信支付异步通知回调地址
  595. * @param string $value
  596. **/
  597. public function SetNotify_url($value)
  598. {
  599. $this->values['notify_url'] = $value;
  600. }
  601. /**
  602. * 获取接收微信支付异步通知回调地址的值
  603. * @return 值
  604. **/
  605. public function GetNotify_url()
  606. {
  607. return $this->values['notify_url'];
  608. }
  609. /**
  610. * 判断接收微信支付异步通知回调地址是否存在
  611. * @return true 或 false
  612. **/
  613. public function IsNotify_urlSet()
  614. {
  615. return array_key_exists('notify_url', $this->values);
  616. }
  617. /**
  618. * 设置取值如下:JSAPI,NATIVE,APP,详细说明见参数规定
  619. * @param string $value
  620. **/
  621. public function SetTrade_type($value)
  622. {
  623. $this->values['trade_type'] = $value;
  624. }
  625. /**
  626. * 获取取值如下:JSAPI,NATIVE,APP,详细说明见参数规定的值
  627. * @return 值
  628. **/
  629. public function GetTrade_type()
  630. {
  631. return $this->values['trade_type'];
  632. }
  633. /**
  634. * 判断取值如下:JSAPI,NATIVE,APP,详细说明见参数规定是否存在
  635. * @return true 或 false
  636. **/
  637. public function IsTrade_typeSet()
  638. {
  639. return array_key_exists('trade_type', $this->values);
  640. }
  641. /**
  642. * 设置trade_type=NATIVE,此参数必传。此id为二维码中包含的商品ID,商户自行定义。
  643. * @param string $value
  644. **/
  645. public function SetProduct_id($value)
  646. {
  647. $this->values['product_id'] = $value;
  648. }
  649. /**
  650. * 获取trade_type=NATIVE,此参数必传。此id为二维码中包含的商品ID,商户自行定义。的值
  651. * @return 值
  652. **/
  653. public function GetProduct_id()
  654. {
  655. return $this->values['product_id'];
  656. }
  657. /**
  658. * 判断trade_type=NATIVE,此参数必传。此id为二维码中包含的商品ID,商户自行定义。是否存在
  659. * @return true 或 false
  660. **/
  661. public function IsProduct_idSet()
  662. {
  663. return array_key_exists('product_id', $this->values);
  664. }
  665. /**
  666. * 设置trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识。下单前需要调用【网页授权获取用户信息】接口获取到用户的Openid。
  667. * @param string $value
  668. **/
  669. public function SetOpenid($value)
  670. {
  671. $this->values['openid'] = $value;
  672. }
  673. /**
  674. * 获取trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识。下单前需要调用【网页授权获取用户信息】接口获取到用户的Openid。 的值
  675. * @return 值
  676. **/
  677. public function GetOpenid()
  678. {
  679. return $this->values['openid'];
  680. }
  681. /**
  682. * 判断trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识。下单前需要调用【网页授权获取用户信息】接口获取到用户的Openid。 是否存在
  683. * @return true 或 false
  684. **/
  685. public function IsOpenidSet()
  686. {
  687. return array_key_exists('openid', $this->values);
  688. }
  689. }
  690. /**
  691. *
  692. * 订单查询输入对象
  693. * @author widyhu
  694. *
  695. */
  696. class WxPayOrderQuery extends WxPayDataBase
  697. {
  698. /**
  699. * 设置微信分配的公众账号ID
  700. * @param string $value
  701. **/
  702. public function SetAppid($value)
  703. {
  704. $this->values['appid'] = $value;
  705. }
  706. /**
  707. * 获取微信分配的公众账号ID的值
  708. * @return 值
  709. **/
  710. public function GetAppid()
  711. {
  712. return $this->values['appid'];
  713. }
  714. /**
  715. * 判断微信分配的公众账号ID是否存在
  716. * @return true 或 false
  717. **/
  718. public function IsAppidSet()
  719. {
  720. return array_key_exists('appid', $this->values);
  721. }
  722. /**
  723. * 设置微信支付分配的商户号
  724. * @param string $value
  725. **/
  726. public function SetMch_id($value)
  727. {
  728. $this->values['mch_id'] = $value;
  729. }
  730. /**
  731. * 获取微信支付分配的商户号的值
  732. * @return 值
  733. **/
  734. public function GetMch_id()
  735. {
  736. return $this->values['mch_id'];
  737. }
  738. /**
  739. * 判断微信支付分配的商户号是否存在
  740. * @return true 或 false
  741. **/
  742. public function IsMch_idSet()
  743. {
  744. return array_key_exists('mch_id', $this->values);
  745. }
  746. /**
  747. * 设置微信的订单号,优先使用
  748. * @param string $value
  749. **/
  750. public function SetTransaction_id($value)
  751. {
  752. $this->values['transaction_id'] = $value;
  753. }
  754. /**
  755. * 获取微信的订单号,优先使用的值
  756. * @return 值
  757. **/
  758. public function GetTransaction_id()
  759. {
  760. return $this->values['transaction_id'];
  761. }
  762. /**
  763. * 判断微信的订单号,优先使用是否存在
  764. * @return true 或 false
  765. **/
  766. public function IsTransaction_idSet()
  767. {
  768. return array_key_exists('transaction_id', $this->values);
  769. }
  770. /**
  771. * 设置商户系统内部的订单号,当没提供transaction_id时需要传这个。
  772. * @param string $value
  773. **/
  774. public function SetOut_trade_no($value)
  775. {
  776. $this->values['out_trade_no'] = $value;
  777. }
  778. /**
  779. * 获取商户系统内部的订单号,当没提供transaction_id时需要传这个。的值
  780. * @return 值
  781. **/
  782. public function GetOut_trade_no()
  783. {
  784. return $this->values['out_trade_no'];
  785. }
  786. /**
  787. * 判断商户系统内部的订单号,当没提供transaction_id时需要传这个。是否存在
  788. * @return true 或 false
  789. **/
  790. public function IsOut_trade_noSet()
  791. {
  792. return array_key_exists('out_trade_no', $this->values);
  793. }
  794. /**
  795. * 设置随机字符串,不长于32位。推荐随机数生成算法
  796. * @param string $value
  797. **/
  798. public function SetNonce_str($value)
  799. {
  800. $this->values['nonce_str'] = $value;
  801. }
  802. /**
  803. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  804. * @return 值
  805. **/
  806. public function GetNonce_str()
  807. {
  808. return $this->values['nonce_str'];
  809. }
  810. /**
  811. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  812. * @return true 或 false
  813. **/
  814. public function IsNonce_strSet()
  815. {
  816. return array_key_exists('nonce_str', $this->values);
  817. }
  818. }
  819. /**
  820. *
  821. * 关闭订单输入对象
  822. * @author widyhu
  823. *
  824. */
  825. class WxPayCloseOrder extends WxPayDataBase
  826. {
  827. /**
  828. * 设置微信分配的公众账号ID
  829. * @param string $value
  830. **/
  831. public function SetAppid($value)
  832. {
  833. $this->values['appid'] = $value;
  834. }
  835. /**
  836. * 获取微信分配的公众账号ID的值
  837. * @return 值
  838. **/
  839. public function GetAppid()
  840. {
  841. return $this->values['appid'];
  842. }
  843. /**
  844. * 判断微信分配的公众账号ID是否存在
  845. * @return true 或 false
  846. **/
  847. public function IsAppidSet()
  848. {
  849. return array_key_exists('appid', $this->values);
  850. }
  851. /**
  852. * 设置微信支付分配的商户号
  853. * @param string $value
  854. **/
  855. public function SetMch_id($value)
  856. {
  857. $this->values['mch_id'] = $value;
  858. }
  859. /**
  860. * 获取微信支付分配的商户号的值
  861. * @return 值
  862. **/
  863. public function GetMch_id()
  864. {
  865. return $this->values['mch_id'];
  866. }
  867. /**
  868. * 判断微信支付分配的商户号是否存在
  869. * @return true 或 false
  870. **/
  871. public function IsMch_idSet()
  872. {
  873. return array_key_exists('mch_id', $this->values);
  874. }
  875. /**
  876. * 设置商户系统内部的订单号
  877. * @param string $value
  878. **/
  879. public function SetOut_trade_no($value)
  880. {
  881. $this->values['out_trade_no'] = $value;
  882. }
  883. /**
  884. * 获取商户系统内部的订单号的值
  885. * @return 值
  886. **/
  887. public function GetOut_trade_no()
  888. {
  889. return $this->values['out_trade_no'];
  890. }
  891. /**
  892. * 判断商户系统内部的订单号是否存在
  893. * @return true 或 false
  894. **/
  895. public function IsOut_trade_noSet()
  896. {
  897. return array_key_exists('out_trade_no', $this->values);
  898. }
  899. /**
  900. * 设置商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
  901. * @param string $value
  902. **/
  903. public function SetNonce_str($value)
  904. {
  905. $this->values['nonce_str'] = $value;
  906. }
  907. /**
  908. * 获取商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号的值
  909. * @return 值
  910. **/
  911. public function GetNonce_str()
  912. {
  913. return $this->values['nonce_str'];
  914. }
  915. /**
  916. * 判断商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号是否存在
  917. * @return true 或 false
  918. **/
  919. public function IsNonce_strSet()
  920. {
  921. return array_key_exists('nonce_str', $this->values);
  922. }
  923. }
  924. /**
  925. *
  926. * 提交退款输入对象
  927. * @author widyhu
  928. *
  929. */
  930. class WxPayRefund extends WxPayDataBase
  931. {
  932. /**
  933. * 设置微信分配的公众账号ID
  934. * @param string $value
  935. **/
  936. public function SetAppid($value)
  937. {
  938. $this->values['appid'] = $value;
  939. }
  940. /**
  941. * 获取微信分配的公众账号ID的值
  942. * @return 值
  943. **/
  944. public function GetAppid()
  945. {
  946. return $this->values['appid'];
  947. }
  948. /**
  949. * 判断微信分配的公众账号ID是否存在
  950. * @return true 或 false
  951. **/
  952. public function IsAppidSet()
  953. {
  954. return array_key_exists('appid', $this->values);
  955. }
  956. /**
  957. * 设置微信支付分配的商户号
  958. * @param string $value
  959. **/
  960. public function SetMch_id($value)
  961. {
  962. $this->values['mch_id'] = $value;
  963. }
  964. /**
  965. * 获取微信支付分配的商户号的值
  966. * @return 值
  967. **/
  968. public function GetMch_id()
  969. {
  970. return $this->values['mch_id'];
  971. }
  972. /**
  973. * 判断微信支付分配的商户号是否存在
  974. * @return true 或 false
  975. **/
  976. public function IsMch_idSet()
  977. {
  978. return array_key_exists('mch_id', $this->values);
  979. }
  980. /**
  981. * 设置微信支付分配的终端设备号,与下单一致
  982. * @param string $value
  983. **/
  984. public function SetDevice_info($value)
  985. {
  986. $this->values['device_info'] = $value;
  987. }
  988. /**
  989. * 获取微信支付分配的终端设备号,与下单一致的值
  990. * @return 值
  991. **/
  992. public function GetDevice_info()
  993. {
  994. return $this->values['device_info'];
  995. }
  996. /**
  997. * 判断微信支付分配的终端设备号,与下单一致是否存在
  998. * @return true 或 false
  999. **/
  1000. public function IsDevice_infoSet()
  1001. {
  1002. return array_key_exists('device_info', $this->values);
  1003. }
  1004. /**
  1005. * 设置随机字符串,不长于32位。推荐随机数生成算法
  1006. * @param string $value
  1007. **/
  1008. public function SetNonce_str($value)
  1009. {
  1010. $this->values['nonce_str'] = $value;
  1011. }
  1012. /**
  1013. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  1014. * @return 值
  1015. **/
  1016. public function GetNonce_str()
  1017. {
  1018. return $this->values['nonce_str'];
  1019. }
  1020. /**
  1021. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  1022. * @return true 或 false
  1023. **/
  1024. public function IsNonce_strSet()
  1025. {
  1026. return array_key_exists('nonce_str', $this->values);
  1027. }
  1028. /**
  1029. * 设置微信订单号
  1030. * @param string $value
  1031. **/
  1032. public function SetTransaction_id($value)
  1033. {
  1034. $this->values['transaction_id'] = $value;
  1035. }
  1036. /**
  1037. * 获取微信订单号的值
  1038. * @return 值
  1039. **/
  1040. public function GetTransaction_id()
  1041. {
  1042. return $this->values['transaction_id'];
  1043. }
  1044. /**
  1045. * 判断微信订单号是否存在
  1046. * @return true 或 false
  1047. **/
  1048. public function IsTransaction_idSet()
  1049. {
  1050. return array_key_exists('transaction_id', $this->values);
  1051. }
  1052. /**
  1053. * 设置商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no
  1054. * @param string $value
  1055. **/
  1056. public function SetOut_trade_no($value)
  1057. {
  1058. $this->values['out_trade_no'] = $value;
  1059. }
  1060. /**
  1061. * 获取商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no的值
  1062. * @return 值
  1063. **/
  1064. public function GetOut_trade_no()
  1065. {
  1066. return $this->values['out_trade_no'];
  1067. }
  1068. /**
  1069. * 判断商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no是否存在
  1070. * @return true 或 false
  1071. **/
  1072. public function IsOut_trade_noSet()
  1073. {
  1074. return array_key_exists('out_trade_no', $this->values);
  1075. }
  1076. /**
  1077. * 设置商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔
  1078. * @param string $value
  1079. **/
  1080. public function SetOut_refund_no($value)
  1081. {
  1082. $this->values['out_refund_no'] = $value;
  1083. }
  1084. /**
  1085. * 获取商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔的值
  1086. * @return 值
  1087. **/
  1088. public function GetOut_refund_no()
  1089. {
  1090. return $this->values['out_refund_no'];
  1091. }
  1092. /**
  1093. * 判断商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔是否存在
  1094. * @return true 或 false
  1095. **/
  1096. public function IsOut_refund_noSet()
  1097. {
  1098. return array_key_exists('out_refund_no', $this->values);
  1099. }
  1100. /**
  1101. * 设置订单总金额,单位为分,只能为整数,详见支付金额
  1102. * @param string $value
  1103. **/
  1104. public function SetTotal_fee($value)
  1105. {
  1106. $this->values['total_fee'] = $value;
  1107. }
  1108. /**
  1109. * 获取订单总金额,单位为分,只能为整数,详见支付金额的值
  1110. * @return 值
  1111. **/
  1112. public function GetTotal_fee()
  1113. {
  1114. return $this->values['total_fee'];
  1115. }
  1116. /**
  1117. * 判断订单总金额,单位为分,只能为整数,详见支付金额是否存在
  1118. * @return true 或 false
  1119. **/
  1120. public function IsTotal_feeSet()
  1121. {
  1122. return array_key_exists('total_fee', $this->values);
  1123. }
  1124. /**
  1125. * 设置退款总金额,订单总金额,单位为分,只能为整数,详见支付金额
  1126. * @param string $value
  1127. **/
  1128. public function SetRefund_fee($value)
  1129. {
  1130. $this->values['refund_fee'] = $value;
  1131. }
  1132. /**
  1133. * 获取退款总金额,订单总金额,单位为分,只能为整数,详见支付金额的值
  1134. * @return 值
  1135. **/
  1136. public function GetRefund_fee()
  1137. {
  1138. return $this->values['refund_fee'];
  1139. }
  1140. /**
  1141. * 判断退款总金额,订单总金额,单位为分,只能为整数,详见支付金额是否存在
  1142. * @return true 或 false
  1143. **/
  1144. public function IsRefund_feeSet()
  1145. {
  1146. return array_key_exists('refund_fee', $this->values);
  1147. }
  1148. /**
  1149. * 设置货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
  1150. * @param string $value
  1151. **/
  1152. public function SetRefund_fee_type($value)
  1153. {
  1154. $this->values['refund_fee_type'] = $value;
  1155. }
  1156. /**
  1157. * 获取货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型的值
  1158. * @return 值
  1159. **/
  1160. public function GetRefund_fee_type()
  1161. {
  1162. return $this->values['refund_fee_type'];
  1163. }
  1164. /**
  1165. * 判断货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型是否存在
  1166. * @return true 或 false
  1167. **/
  1168. public function IsRefund_fee_typeSet()
  1169. {
  1170. return array_key_exists('refund_fee_type', $this->values);
  1171. }
  1172. /**
  1173. * 设置操作员帐号, 默认为商户号
  1174. * @param string $value
  1175. **/
  1176. public function SetOp_user_id($value)
  1177. {
  1178. $this->values['op_user_id'] = $value;
  1179. }
  1180. /**
  1181. * 获取操作员帐号, 默认为商户号的值
  1182. * @return 值
  1183. **/
  1184. public function GetOp_user_id()
  1185. {
  1186. return $this->values['op_user_id'];
  1187. }
  1188. /**
  1189. * 判断操作员帐号, 默认为商户号是否存在
  1190. * @return true 或 false
  1191. **/
  1192. public function IsOp_user_idSet()
  1193. {
  1194. return array_key_exists('op_user_id', $this->values);
  1195. }
  1196. }
  1197. /**
  1198. *
  1199. * 退款查询输入对象
  1200. * @author widyhu
  1201. *
  1202. */
  1203. class WxPayRefundQuery extends WxPayDataBase
  1204. {
  1205. /**
  1206. * 设置微信分配的公众账号ID
  1207. * @param string $value
  1208. **/
  1209. public function SetAppid($value)
  1210. {
  1211. $this->values['appid'] = $value;
  1212. }
  1213. /**
  1214. * 获取微信分配的公众账号ID的值
  1215. * @return 值
  1216. **/
  1217. public function GetAppid()
  1218. {
  1219. return $this->values['appid'];
  1220. }
  1221. /**
  1222. * 判断微信分配的公众账号ID是否存在
  1223. * @return true 或 false
  1224. **/
  1225. public function IsAppidSet()
  1226. {
  1227. return array_key_exists('appid', $this->values);
  1228. }
  1229. /**
  1230. * 设置微信支付分配的商户号
  1231. * @param string $value
  1232. **/
  1233. public function SetMch_id($value)
  1234. {
  1235. $this->values['mch_id'] = $value;
  1236. }
  1237. /**
  1238. * 获取微信支付分配的商户号的值
  1239. * @return 值
  1240. **/
  1241. public function GetMch_id()
  1242. {
  1243. return $this->values['mch_id'];
  1244. }
  1245. /**
  1246. * 判断微信支付分配的商户号是否存在
  1247. * @return true 或 false
  1248. **/
  1249. public function IsMch_idSet()
  1250. {
  1251. return array_key_exists('mch_id', $this->values);
  1252. }
  1253. /**
  1254. * 设置微信支付分配的终端设备号
  1255. * @param string $value
  1256. **/
  1257. public function SetDevice_info($value)
  1258. {
  1259. $this->values['device_info'] = $value;
  1260. }
  1261. /**
  1262. * 获取微信支付分配的终端设备号的值
  1263. * @return 值
  1264. **/
  1265. public function GetDevice_info()
  1266. {
  1267. return $this->values['device_info'];
  1268. }
  1269. /**
  1270. * 判断微信支付分配的终端设备号是否存在
  1271. * @return true 或 false
  1272. **/
  1273. public function IsDevice_infoSet()
  1274. {
  1275. return array_key_exists('device_info', $this->values);
  1276. }
  1277. /**
  1278. * 设置随机字符串,不长于32位。推荐随机数生成算法
  1279. * @param string $value
  1280. **/
  1281. public function SetNonce_str($value)
  1282. {
  1283. $this->values['nonce_str'] = $value;
  1284. }
  1285. /**
  1286. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  1287. * @return 值
  1288. **/
  1289. public function GetNonce_str()
  1290. {
  1291. return $this->values['nonce_str'];
  1292. }
  1293. /**
  1294. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  1295. * @return true 或 false
  1296. **/
  1297. public function IsNonce_strSet()
  1298. {
  1299. return array_key_exists('nonce_str', $this->values);
  1300. }
  1301. /**
  1302. * 设置微信订单号
  1303. * @param string $value
  1304. **/
  1305. public function SetTransaction_id($value)
  1306. {
  1307. $this->values['transaction_id'] = $value;
  1308. }
  1309. /**
  1310. * 获取微信订单号的值
  1311. * @return 值
  1312. **/
  1313. public function GetTransaction_id()
  1314. {
  1315. return $this->values['transaction_id'];
  1316. }
  1317. /**
  1318. * 判断微信订单号是否存在
  1319. * @return true 或 false
  1320. **/
  1321. public function IsTransaction_idSet()
  1322. {
  1323. return array_key_exists('transaction_id', $this->values);
  1324. }
  1325. /**
  1326. * 设置商户系统内部的订单号
  1327. * @param string $value
  1328. **/
  1329. public function SetOut_trade_no($value)
  1330. {
  1331. $this->values['out_trade_no'] = $value;
  1332. }
  1333. /**
  1334. * 获取商户系统内部的订单号的值
  1335. * @return 值
  1336. **/
  1337. public function GetOut_trade_no()
  1338. {
  1339. return $this->values['out_trade_no'];
  1340. }
  1341. /**
  1342. * 判断商户系统内部的订单号是否存在
  1343. * @return true 或 false
  1344. **/
  1345. public function IsOut_trade_noSet()
  1346. {
  1347. return array_key_exists('out_trade_no', $this->values);
  1348. }
  1349. /**
  1350. * 设置商户退款单号
  1351. * @param string $value
  1352. **/
  1353. public function SetOut_refund_no($value)
  1354. {
  1355. $this->values['out_refund_no'] = $value;
  1356. }
  1357. /**
  1358. * 获取商户退款单号的值
  1359. * @return 值
  1360. **/
  1361. public function GetOut_refund_no()
  1362. {
  1363. return $this->values['out_refund_no'];
  1364. }
  1365. /**
  1366. * 判断商户退款单号是否存在
  1367. * @return true 或 false
  1368. **/
  1369. public function IsOut_refund_noSet()
  1370. {
  1371. return array_key_exists('out_refund_no', $this->values);
  1372. }
  1373. /**
  1374. * 设置微信退款单号refund_id、out_refund_no、out_trade_no、transaction_id四个参数必填一个,如果同时存在优先级为:refund_id>out_refund_no>transaction_id>out_trade_no
  1375. * @param string $value
  1376. **/
  1377. public function SetRefund_id($value)
  1378. {
  1379. $this->values['refund_id'] = $value;
  1380. }
  1381. /**
  1382. * 获取微信退款单号refund_id、out_refund_no、out_trade_no、transaction_id四个参数必填一个,如果同时存在优先级为:refund_id>out_refund_no>transaction_id>out_trade_no的值
  1383. * @return 值
  1384. **/
  1385. public function GetRefund_id()
  1386. {
  1387. return $this->values['refund_id'];
  1388. }
  1389. /**
  1390. * 判断微信退款单号refund_id、out_refund_no、out_trade_no、transaction_id四个参数必填一个,如果同时存在优先级为:refund_id>out_refund_no>transaction_id>out_trade_no是否存在
  1391. * @return true 或 false
  1392. **/
  1393. public function IsRefund_idSet()
  1394. {
  1395. return array_key_exists('refund_id', $this->values);
  1396. }
  1397. }
  1398. /**
  1399. *
  1400. * 下载对账单输入对象
  1401. * @author widyhu
  1402. *
  1403. */
  1404. class WxPayDownloadBill extends WxPayDataBase
  1405. {
  1406. /**
  1407. * 设置微信分配的公众账号ID
  1408. * @param string $value
  1409. **/
  1410. public function SetAppid($value)
  1411. {
  1412. $this->values['appid'] = $value;
  1413. }
  1414. /**
  1415. * 获取微信分配的公众账号ID的值
  1416. * @return 值
  1417. **/
  1418. public function GetAppid()
  1419. {
  1420. return $this->values['appid'];
  1421. }
  1422. /**
  1423. * 判断微信分配的公众账号ID是否存在
  1424. * @return true 或 false
  1425. **/
  1426. public function IsAppidSet()
  1427. {
  1428. return array_key_exists('appid', $this->values);
  1429. }
  1430. /**
  1431. * 设置微信支付分配的商户号
  1432. * @param string $value
  1433. **/
  1434. public function SetMch_id($value)
  1435. {
  1436. $this->values['mch_id'] = $value;
  1437. }
  1438. /**
  1439. * 获取微信支付分配的商户号的值
  1440. * @return 值
  1441. **/
  1442. public function GetMch_id()
  1443. {
  1444. return $this->values['mch_id'];
  1445. }
  1446. /**
  1447. * 判断微信支付分配的商户号是否存在
  1448. * @return true 或 false
  1449. **/
  1450. public function IsMch_idSet()
  1451. {
  1452. return array_key_exists('mch_id', $this->values);
  1453. }
  1454. /**
  1455. * 设置微信支付分配的终端设备号,填写此字段,只下载该设备号的对账单
  1456. * @param string $value
  1457. **/
  1458. public function SetDevice_info($value)
  1459. {
  1460. $this->values['device_info'] = $value;
  1461. }
  1462. /**
  1463. * 获取微信支付分配的终端设备号,填写此字段,只下载该设备号的对账单的值
  1464. * @return 值
  1465. **/
  1466. public function GetDevice_info()
  1467. {
  1468. return $this->values['device_info'];
  1469. }
  1470. /**
  1471. * 判断微信支付分配的终端设备号,填写此字段,只下载该设备号的对账单是否存在
  1472. * @return true 或 false
  1473. **/
  1474. public function IsDevice_infoSet()
  1475. {
  1476. return array_key_exists('device_info', $this->values);
  1477. }
  1478. /**
  1479. * 设置随机字符串,不长于32位。推荐随机数生成算法
  1480. * @param string $value
  1481. **/
  1482. public function SetNonce_str($value)
  1483. {
  1484. $this->values['nonce_str'] = $value;
  1485. }
  1486. /**
  1487. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  1488. * @return 值
  1489. **/
  1490. public function GetNonce_str()
  1491. {
  1492. return $this->values['nonce_str'];
  1493. }
  1494. /**
  1495. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  1496. * @return true 或 false
  1497. **/
  1498. public function IsNonce_strSet()
  1499. {
  1500. return array_key_exists('nonce_str', $this->values);
  1501. }
  1502. /**
  1503. * 设置下载对账单的日期,格式:20140603
  1504. * @param string $value
  1505. **/
  1506. public function SetBill_date($value)
  1507. {
  1508. $this->values['bill_date'] = $value;
  1509. }
  1510. /**
  1511. * 获取下载对账单的日期,格式:20140603的值
  1512. * @return 值
  1513. **/
  1514. public function GetBill_date()
  1515. {
  1516. return $this->values['bill_date'];
  1517. }
  1518. /**
  1519. * 判断下载对账单的日期,格式:20140603是否存在
  1520. * @return true 或 false
  1521. **/
  1522. public function IsBill_dateSet()
  1523. {
  1524. return array_key_exists('bill_date', $this->values);
  1525. }
  1526. /**
  1527. * 设置ALL,返回当日所有订单信息,默认值SUCCESS,返回当日成功支付的订单REFUND,返回当日退款订单REVOKED,已撤销的订单
  1528. * @param string $value
  1529. **/
  1530. public function SetBill_type($value)
  1531. {
  1532. $this->values['bill_type'] = $value;
  1533. }
  1534. /**
  1535. * 获取ALL,返回当日所有订单信息,默认值SUCCESS,返回当日成功支付的订单REFUND,返回当日退款订单REVOKED,已撤销的订单的值
  1536. * @return 值
  1537. **/
  1538. public function GetBill_type()
  1539. {
  1540. return $this->values['bill_type'];
  1541. }
  1542. /**
  1543. * 判断ALL,返回当日所有订单信息,默认值SUCCESS,返回当日成功支付的订单REFUND,返回当日退款订单REVOKED,已撤销的订单是否存在
  1544. * @return true 或 false
  1545. **/
  1546. public function IsBill_typeSet()
  1547. {
  1548. return array_key_exists('bill_type', $this->values);
  1549. }
  1550. }
  1551. /**
  1552. *
  1553. * 测速上报输入对象
  1554. * @author widyhu
  1555. *
  1556. */
  1557. class WxPayReport extends WxPayDataBase
  1558. {
  1559. /**
  1560. * 设置微信分配的公众账号ID
  1561. * @param string $value
  1562. **/
  1563. public function SetAppid($value)
  1564. {
  1565. $this->values['appid'] = $value;
  1566. }
  1567. /**
  1568. * 获取微信分配的公众账号ID的值
  1569. * @return 值
  1570. **/
  1571. public function GetAppid()
  1572. {
  1573. return $this->values['appid'];
  1574. }
  1575. /**
  1576. * 判断微信分配的公众账号ID是否存在
  1577. * @return true 或 false
  1578. **/
  1579. public function IsAppidSet()
  1580. {
  1581. return array_key_exists('appid', $this->values);
  1582. }
  1583. /**
  1584. * 设置微信支付分配的商户号
  1585. * @param string $value
  1586. **/
  1587. public function SetMch_id($value)
  1588. {
  1589. $this->values['mch_id'] = $value;
  1590. }
  1591. /**
  1592. * 获取微信支付分配的商户号的值
  1593. * @return 值
  1594. **/
  1595. public function GetMch_id()
  1596. {
  1597. return $this->values['mch_id'];
  1598. }
  1599. /**
  1600. * 判断微信支付分配的商户号是否存在
  1601. * @return true 或 false
  1602. **/
  1603. public function IsMch_idSet()
  1604. {
  1605. return array_key_exists('mch_id', $this->values);
  1606. }
  1607. /**
  1608. * 设置微信支付分配的终端设备号,商户自定义
  1609. * @param string $value
  1610. **/
  1611. public function SetDevice_info($value)
  1612. {
  1613. $this->values['device_info'] = $value;
  1614. }
  1615. /**
  1616. * 获取微信支付分配的终端设备号,商户自定义的值
  1617. * @return 值
  1618. **/
  1619. public function GetDevice_info()
  1620. {
  1621. return $this->values['device_info'];
  1622. }
  1623. /**
  1624. * 判断微信支付分配的终端设备号,商户自定义是否存在
  1625. * @return true 或 false
  1626. **/
  1627. public function IsDevice_infoSet()
  1628. {
  1629. return array_key_exists('device_info', $this->values);
  1630. }
  1631. /**
  1632. * 设置随机字符串,不长于32位。推荐随机数生成算法
  1633. * @param string $value
  1634. **/
  1635. public function SetNonce_str($value)
  1636. {
  1637. $this->values['nonce_str'] = $value;
  1638. }
  1639. /**
  1640. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  1641. * @return 值
  1642. **/
  1643. public function GetNonce_str()
  1644. {
  1645. return $this->values['nonce_str'];
  1646. }
  1647. /**
  1648. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  1649. * @return true 或 false
  1650. **/
  1651. public function IsNonce_strSet()
  1652. {
  1653. return array_key_exists('nonce_str', $this->values);
  1654. }
  1655. /**
  1656. * 设置上报对应的接口的完整URL,类似:https://api.mch.weixin.qq.com/pay/unifiedorder对于被扫支付,为更好的和商户共同分析一次业务行为的整体耗时情况,对于两种接入模式,请都在门店侧对一次被扫行为进行一次单独的整体上报,上报URL指定为:https://api.mch.weixin.qq.com/pay/micropay/total关于两种接入模式具体可参考本文档章节:被扫支付商户接入模式其它接口调用仍然按照调用一次,上报一次来进行。
  1657. * @param string $value
  1658. **/
  1659. public function SetInterface_url($value)
  1660. {
  1661. $this->values['interface_url'] = $value;
  1662. }
  1663. /**
  1664. * 获取上报对应的接口的完整URL,类似:https://api.mch.weixin.qq.com/pay/unifiedorder对于被扫支付,为更好的和商户共同分析一次业务行为的整体耗时情况,对于两种接入模式,请都在门店侧对一次被扫行为进行一次单独的整体上报,上报URL指定为:https://api.mch.weixin.qq.com/pay/micropay/total关于两种接入模式具体可参考本文档章节:被扫支付商户接入模式其它接口调用仍然按照调用一次,上报一次来进行。的值
  1665. * @return 值
  1666. **/
  1667. public function GetInterface_url()
  1668. {
  1669. return $this->values['interface_url'];
  1670. }
  1671. /**
  1672. * 判断上报对应的接口的完整URL,类似:https://api.mch.weixin.qq.com/pay/unifiedorder对于被扫支付,为更好的和商户共同分析一次业务行为的整体耗时情况,对于两种接入模式,请都在门店侧对一次被扫行为进行一次单独的整体上报,上报URL指定为:https://api.mch.weixin.qq.com/pay/micropay/total关于两种接入模式具体可参考本文档章节:被扫支付商户接入模式其它接口调用仍然按照调用一次,上报一次来进行。是否存在
  1673. * @return true 或 false
  1674. **/
  1675. public function IsInterface_urlSet()
  1676. {
  1677. return array_key_exists('interface_url', $this->values);
  1678. }
  1679. /**
  1680. * 设置接口耗时情况,单位为毫秒
  1681. * @param string $value
  1682. **/
  1683. public function SetExecute_time_($value)
  1684. {
  1685. $this->values['execute_time_'] = $value;
  1686. }
  1687. /**
  1688. * 获取接口耗时情况,单位为毫秒的值
  1689. * @return 值
  1690. **/
  1691. public function GetExecute_time_()
  1692. {
  1693. return $this->values['execute_time_'];
  1694. }
  1695. /**
  1696. * 判断接口耗时情况,单位为毫秒是否存在
  1697. * @return true 或 false
  1698. **/
  1699. public function IsExecute_time_Set()
  1700. {
  1701. return array_key_exists('execute_time_', $this->values);
  1702. }
  1703. /**
  1704. * 设置SUCCESS/FAIL此字段是通信标识,非交易标识,交易是否成功需要查看trade_state来判断
  1705. * @param string $value
  1706. **/
  1707. public function SetReturn_code($value)
  1708. {
  1709. $this->values['return_code'] = $value;
  1710. }
  1711. /**
  1712. * 获取SUCCESS/FAIL此字段是通信标识,非交易标识,交易是否成功需要查看trade_state来判断的值
  1713. * @return 值
  1714. **/
  1715. public function GetReturn_code()
  1716. {
  1717. return $this->values['return_code'];
  1718. }
  1719. /**
  1720. * 判断SUCCESS/FAIL此字段是通信标识,非交易标识,交易是否成功需要查看trade_state来判断是否存在
  1721. * @return true 或 false
  1722. **/
  1723. public function IsReturn_codeSet()
  1724. {
  1725. return array_key_exists('return_code', $this->values);
  1726. }
  1727. /**
  1728. * 设置返回信息,如非空,为错误原因签名失败参数格式校验错误
  1729. * @param string $value
  1730. **/
  1731. public function SetReturn_msg($value)
  1732. {
  1733. $this->values['return_msg'] = $value;
  1734. }
  1735. /**
  1736. * 获取返回信息,如非空,为错误原因签名失败参数格式校验错误的值
  1737. * @return 值
  1738. **/
  1739. public function GetReturn_msg()
  1740. {
  1741. return $this->values['return_msg'];
  1742. }
  1743. /**
  1744. * 判断返回信息,如非空,为错误原因签名失败参数格式校验错误是否存在
  1745. * @return true 或 false
  1746. **/
  1747. public function IsReturn_msgSet()
  1748. {
  1749. return array_key_exists('return_msg', $this->values);
  1750. }
  1751. /**
  1752. * 设置SUCCESS/FAIL
  1753. * @param string $value
  1754. **/
  1755. public function SetResult_code($value)
  1756. {
  1757. $this->values['result_code'] = $value;
  1758. }
  1759. /**
  1760. * 获取SUCCESS/FAIL的值
  1761. * @return 值
  1762. **/
  1763. public function GetResult_code()
  1764. {
  1765. return $this->values['result_code'];
  1766. }
  1767. /**
  1768. * 判断SUCCESS/FAIL是否存在
  1769. * @return true 或 false
  1770. **/
  1771. public function IsResult_codeSet()
  1772. {
  1773. return array_key_exists('result_code', $this->values);
  1774. }
  1775. /**
  1776. * 设置ORDERNOTEXIST—订单不存在SYSTEMERROR—系统错误
  1777. * @param string $value
  1778. **/
  1779. public function SetErr_code($value)
  1780. {
  1781. $this->values['err_code'] = $value;
  1782. }
  1783. /**
  1784. * 获取ORDERNOTEXIST—订单不存在SYSTEMERROR—系统错误的值
  1785. * @return 值
  1786. **/
  1787. public function GetErr_code()
  1788. {
  1789. return $this->values['err_code'];
  1790. }
  1791. /**
  1792. * 判断ORDERNOTEXIST—订单不存在SYSTEMERROR—系统错误是否存在
  1793. * @return true 或 false
  1794. **/
  1795. public function IsErr_codeSet()
  1796. {
  1797. return array_key_exists('err_code', $this->values);
  1798. }
  1799. /**
  1800. * 设置结果信息描述
  1801. * @param string $value
  1802. **/
  1803. public function SetErr_code_des($value)
  1804. {
  1805. $this->values['err_code_des'] = $value;
  1806. }
  1807. /**
  1808. * 获取结果信息描述的值
  1809. * @return 值
  1810. **/
  1811. public function GetErr_code_des()
  1812. {
  1813. return $this->values['err_code_des'];
  1814. }
  1815. /**
  1816. * 判断结果信息描述是否存在
  1817. * @return true 或 false
  1818. **/
  1819. public function IsErr_code_desSet()
  1820. {
  1821. return array_key_exists('err_code_des', $this->values);
  1822. }
  1823. /**
  1824. * 设置商户系统内部的订单号,商户可以在上报时提供相关商户订单号方便微信支付更好的提高服务质量。
  1825. * @param string $value
  1826. **/
  1827. public function SetOut_trade_no($value)
  1828. {
  1829. $this->values['out_trade_no'] = $value;
  1830. }
  1831. /**
  1832. * 获取商户系统内部的订单号,商户可以在上报时提供相关商户订单号方便微信支付更好的提高服务质量。 的值
  1833. * @return 值
  1834. **/
  1835. public function GetOut_trade_no()
  1836. {
  1837. return $this->values['out_trade_no'];
  1838. }
  1839. /**
  1840. * 判断商户系统内部的订单号,商户可以在上报时提供相关商户订单号方便微信支付更好的提高服务质量。 是否存在
  1841. * @return true 或 false
  1842. **/
  1843. public function IsOut_trade_noSet()
  1844. {
  1845. return array_key_exists('out_trade_no', $this->values);
  1846. }
  1847. /**
  1848. * 设置发起接口调用时的机器IP
  1849. * @param string $value
  1850. **/
  1851. public function SetUser_ip($value)
  1852. {
  1853. $this->values['user_ip'] = $value;
  1854. }
  1855. /**
  1856. * 获取发起接口调用时的机器IP 的值
  1857. * @return 值
  1858. **/
  1859. public function GetUser_ip()
  1860. {
  1861. return $this->values['user_ip'];
  1862. }
  1863. /**
  1864. * 判断发起接口调用时的机器IP 是否存在
  1865. * @return true 或 false
  1866. **/
  1867. public function IsUser_ipSet()
  1868. {
  1869. return array_key_exists('user_ip', $this->values);
  1870. }
  1871. /**
  1872. * 设置系统时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则
  1873. * @param string $value
  1874. **/
  1875. public function SetTime($value)
  1876. {
  1877. $this->values['time'] = $value;
  1878. }
  1879. /**
  1880. * 获取系统时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则的值
  1881. * @return 值
  1882. **/
  1883. public function GetTime()
  1884. {
  1885. return $this->values['time'];
  1886. }
  1887. /**
  1888. * 判断系统时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则是否存在
  1889. * @return true 或 false
  1890. **/
  1891. public function IsTimeSet()
  1892. {
  1893. return array_key_exists('time', $this->values);
  1894. }
  1895. }
  1896. /**
  1897. *
  1898. * 短链转换输入对象
  1899. * @author widyhu
  1900. *
  1901. */
  1902. class WxPayShortUrl extends WxPayDataBase
  1903. {
  1904. /**
  1905. * 设置微信分配的公众账号ID
  1906. * @param string $value
  1907. **/
  1908. public function SetAppid($value)
  1909. {
  1910. $this->values['appid'] = $value;
  1911. }
  1912. /**
  1913. * 获取微信分配的公众账号ID的值
  1914. * @return 值
  1915. **/
  1916. public function GetAppid()
  1917. {
  1918. return $this->values['appid'];
  1919. }
  1920. /**
  1921. * 判断微信分配的公众账号ID是否存在
  1922. * @return true 或 false
  1923. **/
  1924. public function IsAppidSet()
  1925. {
  1926. return array_key_exists('appid', $this->values);
  1927. }
  1928. /**
  1929. * 设置微信支付分配的商户号
  1930. * @param string $value
  1931. **/
  1932. public function SetMch_id($value)
  1933. {
  1934. $this->values['mch_id'] = $value;
  1935. }
  1936. /**
  1937. * 获取微信支付分配的商户号的值
  1938. * @return 值
  1939. **/
  1940. public function GetMch_id()
  1941. {
  1942. return $this->values['mch_id'];
  1943. }
  1944. /**
  1945. * 判断微信支付分配的商户号是否存在
  1946. * @return true 或 false
  1947. **/
  1948. public function IsMch_idSet()
  1949. {
  1950. return array_key_exists('mch_id', $this->values);
  1951. }
  1952. /**
  1953. * 设置需要转换的URL,签名用原串,传输需URL encode
  1954. * @param string $value
  1955. **/
  1956. public function SetLong_url($value)
  1957. {
  1958. $this->values['long_url'] = $value;
  1959. }
  1960. /**
  1961. * 获取需要转换的URL,签名用原串,传输需URL encode的值
  1962. * @return 值
  1963. **/
  1964. public function GetLong_url()
  1965. {
  1966. return $this->values['long_url'];
  1967. }
  1968. /**
  1969. * 判断需要转换的URL,签名用原串,传输需URL encode是否存在
  1970. * @return true 或 false
  1971. **/
  1972. public function IsLong_urlSet()
  1973. {
  1974. return array_key_exists('long_url', $this->values);
  1975. }
  1976. /**
  1977. * 设置随机字符串,不长于32位。推荐随机数生成算法
  1978. * @param string $value
  1979. **/
  1980. public function SetNonce_str($value)
  1981. {
  1982. $this->values['nonce_str'] = $value;
  1983. }
  1984. /**
  1985. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  1986. * @return 值
  1987. **/
  1988. public function GetNonce_str()
  1989. {
  1990. return $this->values['nonce_str'];
  1991. }
  1992. /**
  1993. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  1994. * @return true 或 false
  1995. **/
  1996. public function IsNonce_strSet()
  1997. {
  1998. return array_key_exists('nonce_str', $this->values);
  1999. }
  2000. }
  2001. /**
  2002. *
  2003. * 提交被扫输入对象
  2004. * @author widyhu
  2005. *
  2006. */
  2007. class WxPayMicroPay extends WxPayDataBase
  2008. {
  2009. /**
  2010. * 设置微信分配的公众账号ID
  2011. * @param string $value
  2012. **/
  2013. public function SetAppid($value)
  2014. {
  2015. $this->values['appid'] = $value;
  2016. }
  2017. /**
  2018. * 获取微信分配的公众账号ID的值
  2019. * @return 值
  2020. **/
  2021. public function GetAppid()
  2022. {
  2023. return $this->values['appid'];
  2024. }
  2025. /**
  2026. * 判断微信分配的公众账号ID是否存在
  2027. * @return true 或 false
  2028. **/
  2029. public function IsAppidSet()
  2030. {
  2031. return array_key_exists('appid', $this->values);
  2032. }
  2033. /**
  2034. * 设置微信支付分配的商户号
  2035. * @param string $value
  2036. **/
  2037. public function SetMch_id($value)
  2038. {
  2039. $this->values['mch_id'] = $value;
  2040. }
  2041. /**
  2042. * 获取微信支付分配的商户号的值
  2043. * @return 值
  2044. **/
  2045. public function GetMch_id()
  2046. {
  2047. return $this->values['mch_id'];
  2048. }
  2049. /**
  2050. * 判断微信支付分配的商户号是否存在
  2051. * @return true 或 false
  2052. **/
  2053. public function IsMch_idSet()
  2054. {
  2055. return array_key_exists('mch_id', $this->values);
  2056. }
  2057. /**
  2058. * 设置终端设备号(商户自定义,如门店编号)
  2059. * @param string $value
  2060. **/
  2061. public function SetDevice_info($value)
  2062. {
  2063. $this->values['device_info'] = $value;
  2064. }
  2065. /**
  2066. * 获取终端设备号(商户自定义,如门店编号)的值
  2067. * @return 值
  2068. **/
  2069. public function GetDevice_info()
  2070. {
  2071. return $this->values['device_info'];
  2072. }
  2073. /**
  2074. * 判断终端设备号(商户自定义,如门店编号)是否存在
  2075. * @return true 或 false
  2076. **/
  2077. public function IsDevice_infoSet()
  2078. {
  2079. return array_key_exists('device_info', $this->values);
  2080. }
  2081. /**
  2082. * 设置随机字符串,不长于32位。推荐随机数生成算法
  2083. * @param string $value
  2084. **/
  2085. public function SetNonce_str($value)
  2086. {
  2087. $this->values['nonce_str'] = $value;
  2088. }
  2089. /**
  2090. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  2091. * @return 值
  2092. **/
  2093. public function GetNonce_str()
  2094. {
  2095. return $this->values['nonce_str'];
  2096. }
  2097. /**
  2098. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  2099. * @return true 或 false
  2100. **/
  2101. public function IsNonce_strSet()
  2102. {
  2103. return array_key_exists('nonce_str', $this->values);
  2104. }
  2105. /**
  2106. * 设置商品或支付单简要描述
  2107. * @param string $value
  2108. **/
  2109. public function SetBody($value)
  2110. {
  2111. $this->values['body'] = $value;
  2112. }
  2113. /**
  2114. * 获取商品或支付单简要描述的值
  2115. * @return 值
  2116. **/
  2117. public function GetBody()
  2118. {
  2119. return $this->values['body'];
  2120. }
  2121. /**
  2122. * 判断商品或支付单简要描述是否存在
  2123. * @return true 或 false
  2124. **/
  2125. public function IsBodySet()
  2126. {
  2127. return array_key_exists('body', $this->values);
  2128. }
  2129. /**
  2130. * 设置商品名称明细列表
  2131. * @param string $value
  2132. **/
  2133. public function SetDetail($value)
  2134. {
  2135. $this->values['detail'] = $value;
  2136. }
  2137. /**
  2138. * 获取商品名称明细列表的值
  2139. * @return 值
  2140. **/
  2141. public function GetDetail()
  2142. {
  2143. return $this->values['detail'];
  2144. }
  2145. /**
  2146. * 判断商品名称明细列表是否存在
  2147. * @return true 或 false
  2148. **/
  2149. public function IsDetailSet()
  2150. {
  2151. return array_key_exists('detail', $this->values);
  2152. }
  2153. /**
  2154. * 设置附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据
  2155. * @param string $value
  2156. **/
  2157. public function SetAttach($value)
  2158. {
  2159. $this->values['attach'] = $value;
  2160. }
  2161. /**
  2162. * 获取附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据的值
  2163. * @return 值
  2164. **/
  2165. public function GetAttach()
  2166. {
  2167. return $this->values['attach'];
  2168. }
  2169. /**
  2170. * 判断附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据是否存在
  2171. * @return true 或 false
  2172. **/
  2173. public function IsAttachSet()
  2174. {
  2175. return array_key_exists('attach', $this->values);
  2176. }
  2177. /**
  2178. * 设置商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
  2179. * @param string $value
  2180. **/
  2181. public function SetOut_trade_no($value)
  2182. {
  2183. $this->values['out_trade_no'] = $value;
  2184. }
  2185. /**
  2186. * 获取商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号的值
  2187. * @return 值
  2188. **/
  2189. public function GetOut_trade_no()
  2190. {
  2191. return $this->values['out_trade_no'];
  2192. }
  2193. /**
  2194. * 判断商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号是否存在
  2195. * @return true 或 false
  2196. **/
  2197. public function IsOut_trade_noSet()
  2198. {
  2199. return array_key_exists('out_trade_no', $this->values);
  2200. }
  2201. /**
  2202. * 设置订单总金额,单位为分,只能为整数,详见支付金额
  2203. * @param string $value
  2204. **/
  2205. public function SetTotal_fee($value)
  2206. {
  2207. $this->values['total_fee'] = $value;
  2208. }
  2209. /**
  2210. * 获取订单总金额,单位为分,只能为整数,详见支付金额的值
  2211. * @return 值
  2212. **/
  2213. public function GetTotal_fee()
  2214. {
  2215. return $this->values['total_fee'];
  2216. }
  2217. /**
  2218. * 判断订单总金额,单位为分,只能为整数,详见支付金额是否存在
  2219. * @return true 或 false
  2220. **/
  2221. public function IsTotal_feeSet()
  2222. {
  2223. return array_key_exists('total_fee', $this->values);
  2224. }
  2225. /**
  2226. * 设置符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
  2227. * @param string $value
  2228. **/
  2229. public function SetFee_type($value)
  2230. {
  2231. $this->values['fee_type'] = $value;
  2232. }
  2233. /**
  2234. * 获取符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型的值
  2235. * @return 值
  2236. **/
  2237. public function GetFee_type()
  2238. {
  2239. return $this->values['fee_type'];
  2240. }
  2241. /**
  2242. * 判断符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型是否存在
  2243. * @return true 或 false
  2244. **/
  2245. public function IsFee_typeSet()
  2246. {
  2247. return array_key_exists('fee_type', $this->values);
  2248. }
  2249. /**
  2250. * 设置调用微信支付API的机器IP
  2251. * @param string $value
  2252. **/
  2253. public function SetSpbill_create_ip($value)
  2254. {
  2255. $this->values['spbill_create_ip'] = $value;
  2256. }
  2257. /**
  2258. * 获取调用微信支付API的机器IP 的值
  2259. * @return 值
  2260. **/
  2261. public function GetSpbill_create_ip()
  2262. {
  2263. return $this->values['spbill_create_ip'];
  2264. }
  2265. /**
  2266. * 判断调用微信支付API的机器IP 是否存在
  2267. * @return true 或 false
  2268. **/
  2269. public function IsSpbill_create_ipSet()
  2270. {
  2271. return array_key_exists('spbill_create_ip', $this->values);
  2272. }
  2273. /**
  2274. * 设置订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。详见时间规则
  2275. * @param string $value
  2276. **/
  2277. public function SetTime_start($value)
  2278. {
  2279. $this->values['time_start'] = $value;
  2280. }
  2281. /**
  2282. * 获取订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。详见时间规则的值
  2283. * @return 值
  2284. **/
  2285. public function GetTime_start()
  2286. {
  2287. return $this->values['time_start'];
  2288. }
  2289. /**
  2290. * 判断订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。详见时间规则是否存在
  2291. * @return true 或 false
  2292. **/
  2293. public function IsTime_startSet()
  2294. {
  2295. return array_key_exists('time_start', $this->values);
  2296. }
  2297. /**
  2298. * 设置订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。详见时间规则
  2299. * @param string $value
  2300. **/
  2301. public function SetTime_expire($value)
  2302. {
  2303. $this->values['time_expire'] = $value;
  2304. }
  2305. /**
  2306. * 获取订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。详见时间规则的值
  2307. * @return 值
  2308. **/
  2309. public function GetTime_expire()
  2310. {
  2311. return $this->values['time_expire'];
  2312. }
  2313. /**
  2314. * 判断订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。详见时间规则是否存在
  2315. * @return true 或 false
  2316. **/
  2317. public function IsTime_expireSet()
  2318. {
  2319. return array_key_exists('time_expire', $this->values);
  2320. }
  2321. /**
  2322. * 设置商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠
  2323. * @param string $value
  2324. **/
  2325. public function SetGoods_tag($value)
  2326. {
  2327. $this->values['goods_tag'] = $value;
  2328. }
  2329. /**
  2330. * 获取商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠的值
  2331. * @return 值
  2332. **/
  2333. public function GetGoods_tag()
  2334. {
  2335. return $this->values['goods_tag'];
  2336. }
  2337. /**
  2338. * 判断商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠是否存在
  2339. * @return true 或 false
  2340. **/
  2341. public function IsGoods_tagSet()
  2342. {
  2343. return array_key_exists('goods_tag', $this->values);
  2344. }
  2345. /**
  2346. * 设置扫码支付授权码,设备读取用户微信中的条码或者二维码信息
  2347. * @param string $value
  2348. **/
  2349. public function SetAuth_code($value)
  2350. {
  2351. $this->values['auth_code'] = $value;
  2352. }
  2353. /**
  2354. * 获取扫码支付授权码,设备读取用户微信中的条码或者二维码信息的值
  2355. * @return 值
  2356. **/
  2357. public function GetAuth_code()
  2358. {
  2359. return $this->values['auth_code'];
  2360. }
  2361. /**
  2362. * 判断扫码支付授权码,设备读取用户微信中的条码或者二维码信息是否存在
  2363. * @return true 或 false
  2364. **/
  2365. public function IsAuth_codeSet()
  2366. {
  2367. return array_key_exists('auth_code', $this->values);
  2368. }
  2369. }
  2370. /**
  2371. *
  2372. * 撤销输入对象
  2373. * @author widyhu
  2374. *
  2375. */
  2376. class WxPayReverse extends WxPayDataBase
  2377. {
  2378. /**
  2379. * 设置微信分配的公众账号ID
  2380. * @param string $value
  2381. **/
  2382. public function SetAppid($value)
  2383. {
  2384. $this->values['appid'] = $value;
  2385. }
  2386. /**
  2387. * 获取微信分配的公众账号ID的值
  2388. * @return 值
  2389. **/
  2390. public function GetAppid()
  2391. {
  2392. return $this->values['appid'];
  2393. }
  2394. /**
  2395. * 判断微信分配的公众账号ID是否存在
  2396. * @return true 或 false
  2397. **/
  2398. public function IsAppidSet()
  2399. {
  2400. return array_key_exists('appid', $this->values);
  2401. }
  2402. /**
  2403. * 设置微信支付分配的商户号
  2404. * @param string $value
  2405. **/
  2406. public function SetMch_id($value)
  2407. {
  2408. $this->values['mch_id'] = $value;
  2409. }
  2410. /**
  2411. * 获取微信支付分配的商户号的值
  2412. * @return 值
  2413. **/
  2414. public function GetMch_id()
  2415. {
  2416. return $this->values['mch_id'];
  2417. }
  2418. /**
  2419. * 判断微信支付分配的商户号是否存在
  2420. * @return true 或 false
  2421. **/
  2422. public function IsMch_idSet()
  2423. {
  2424. return array_key_exists('mch_id', $this->values);
  2425. }
  2426. /**
  2427. * 设置微信的订单号,优先使用
  2428. * @param string $value
  2429. **/
  2430. public function SetTransaction_id($value)
  2431. {
  2432. $this->values['transaction_id'] = $value;
  2433. }
  2434. /**
  2435. * 获取微信的订单号,优先使用的值
  2436. * @return 值
  2437. **/
  2438. public function GetTransaction_id()
  2439. {
  2440. return $this->values['transaction_id'];
  2441. }
  2442. /**
  2443. * 判断微信的订单号,优先使用是否存在
  2444. * @return true 或 false
  2445. **/
  2446. public function IsTransaction_idSet()
  2447. {
  2448. return array_key_exists('transaction_id', $this->values);
  2449. }
  2450. /**
  2451. * 设置商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no
  2452. * @param string $value
  2453. **/
  2454. public function SetOut_trade_no($value)
  2455. {
  2456. $this->values['out_trade_no'] = $value;
  2457. }
  2458. /**
  2459. * 获取商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no的值
  2460. * @return 值
  2461. **/
  2462. public function GetOut_trade_no()
  2463. {
  2464. return $this->values['out_trade_no'];
  2465. }
  2466. /**
  2467. * 判断商户系统内部的订单号,transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no是否存在
  2468. * @return true 或 false
  2469. **/
  2470. public function IsOut_trade_noSet()
  2471. {
  2472. return array_key_exists('out_trade_no', $this->values);
  2473. }
  2474. /**
  2475. * 设置随机字符串,不长于32位。推荐随机数生成算法
  2476. * @param string $value
  2477. **/
  2478. public function SetNonce_str($value)
  2479. {
  2480. $this->values['nonce_str'] = $value;
  2481. }
  2482. /**
  2483. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  2484. * @return 值
  2485. **/
  2486. public function GetNonce_str()
  2487. {
  2488. return $this->values['nonce_str'];
  2489. }
  2490. /**
  2491. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  2492. * @return true 或 false
  2493. **/
  2494. public function IsNonce_strSet()
  2495. {
  2496. return array_key_exists('nonce_str', $this->values);
  2497. }
  2498. }
  2499. /**
  2500. *
  2501. * 提交JSAPI输入对象
  2502. * @author widyhu
  2503. *
  2504. */
  2505. class WxPayJsApiPay extends WxPayDataBase
  2506. {
  2507. /**
  2508. * 设置微信分配的公众账号ID
  2509. * @param string $value
  2510. **/
  2511. public function SetAppid($value)
  2512. {
  2513. $this->values['appId'] = $value;
  2514. }
  2515. /**
  2516. * 获取微信分配的公众账号ID的值
  2517. * @return 值
  2518. **/
  2519. public function GetAppid()
  2520. {
  2521. return $this->values['appId'];
  2522. }
  2523. /**
  2524. * 判断微信分配的公众账号ID是否存在
  2525. * @return true 或 false
  2526. **/
  2527. public function IsAppidSet()
  2528. {
  2529. return array_key_exists('appId', $this->values);
  2530. }
  2531. /**
  2532. * 设置支付时间戳
  2533. * @param string $value
  2534. **/
  2535. public function SetTimeStamp($value)
  2536. {
  2537. $this->values['timeStamp'] = $value;
  2538. }
  2539. /**
  2540. * 获取支付时间戳的值
  2541. * @return 值
  2542. **/
  2543. public function GetTimeStamp()
  2544. {
  2545. return $this->values['timeStamp'];
  2546. }
  2547. /**
  2548. * 判断支付时间戳是否存在
  2549. * @return true 或 false
  2550. **/
  2551. public function IsTimeStampSet()
  2552. {
  2553. return array_key_exists('timeStamp', $this->values);
  2554. }
  2555. /**
  2556. * 随机字符串
  2557. * @param string $value
  2558. **/
  2559. public function SetNonceStr($value)
  2560. {
  2561. $this->values['nonceStr'] = $value;
  2562. }
  2563. /**
  2564. * 获取notify随机字符串值
  2565. * @return 值
  2566. **/
  2567. public function GetReturn_code()
  2568. {
  2569. return $this->values['nonceStr'];
  2570. }
  2571. /**
  2572. * 判断随机字符串是否存在
  2573. * @return true 或 false
  2574. **/
  2575. public function IsReturn_codeSet()
  2576. {
  2577. return array_key_exists('nonceStr', $this->values);
  2578. }
  2579. /**
  2580. * 设置订单详情扩展字符串
  2581. * @param string $value
  2582. **/
  2583. public function SetPackage($value)
  2584. {
  2585. $this->values['package'] = $value;
  2586. }
  2587. /**
  2588. * 获取订单详情扩展字符串的值
  2589. * @return 值
  2590. **/
  2591. public function GetPackage()
  2592. {
  2593. return $this->values['package'];
  2594. }
  2595. /**
  2596. * 判断订单详情扩展字符串是否存在
  2597. * @return true 或 false
  2598. **/
  2599. public function IsPackageSet()
  2600. {
  2601. return array_key_exists('package', $this->values);
  2602. }
  2603. /**
  2604. * 设置签名方式
  2605. * @param string $value
  2606. **/
  2607. public function SetSignType($value)
  2608. {
  2609. $this->values['signType'] = $value;
  2610. }
  2611. /**
  2612. * 获取签名方式
  2613. * @return 值
  2614. **/
  2615. public function GetSignType()
  2616. {
  2617. return $this->values['signType'];
  2618. }
  2619. /**
  2620. * 判断签名方式是否存在
  2621. * @return true 或 false
  2622. **/
  2623. public function IsSignTypeSet()
  2624. {
  2625. return array_key_exists('signType', $this->values);
  2626. }
  2627. /**
  2628. * 设置签名方式
  2629. * @param string $value
  2630. **/
  2631. public function SetPaySign($value)
  2632. {
  2633. $this->values['paySign'] = $value;
  2634. }
  2635. /**
  2636. * 获取签名方式
  2637. * @return 值
  2638. **/
  2639. public function GetPaySign()
  2640. {
  2641. return $this->values['paySign'];
  2642. }
  2643. /**
  2644. * 判断签名方式是否存在
  2645. * @return true 或 false
  2646. **/
  2647. public function IsPaySignSet()
  2648. {
  2649. return array_key_exists('paySign', $this->values);
  2650. }
  2651. }
  2652. /**
  2653. *
  2654. * 扫码支付模式一生成二维码参数
  2655. * @author widyhu
  2656. *
  2657. */
  2658. class WxPayBizPayUrl extends WxPayDataBase
  2659. {
  2660. /**
  2661. * 设置微信分配的公众账号ID
  2662. * @param string $value
  2663. **/
  2664. public function SetAppid($value)
  2665. {
  2666. $this->values['appid'] = $value;
  2667. }
  2668. /**
  2669. * 获取微信分配的公众账号ID的值
  2670. * @return 值
  2671. **/
  2672. public function GetAppid()
  2673. {
  2674. return $this->values['appid'];
  2675. }
  2676. /**
  2677. * 判断微信分配的公众账号ID是否存在
  2678. * @return true 或 false
  2679. **/
  2680. public function IsAppidSet()
  2681. {
  2682. return array_key_exists('appid', $this->values);
  2683. }
  2684. /**
  2685. * 设置微信支付分配的商户号
  2686. * @param string $value
  2687. **/
  2688. public function SetMch_id($value)
  2689. {
  2690. $this->values['mch_id'] = $value;
  2691. }
  2692. /**
  2693. * 获取微信支付分配的商户号的值
  2694. * @return 值
  2695. **/
  2696. public function GetMch_id()
  2697. {
  2698. return $this->values['mch_id'];
  2699. }
  2700. /**
  2701. * 判断微信支付分配的商户号是否存在
  2702. * @return true 或 false
  2703. **/
  2704. public function IsMch_idSet()
  2705. {
  2706. return array_key_exists('mch_id', $this->values);
  2707. }
  2708. /**
  2709. * 设置支付时间戳
  2710. * @param string $value
  2711. **/
  2712. public function SetTime_stamp($value)
  2713. {
  2714. $this->values['time_stamp'] = $value;
  2715. }
  2716. /**
  2717. * 获取支付时间戳的值
  2718. * @return 值
  2719. **/
  2720. public function GetTime_stamp()
  2721. {
  2722. return $this->values['time_stamp'];
  2723. }
  2724. /**
  2725. * 判断支付时间戳是否存在
  2726. * @return true 或 false
  2727. **/
  2728. public function IsTime_stampSet()
  2729. {
  2730. return array_key_exists('time_stamp', $this->values);
  2731. }
  2732. /**
  2733. * 设置随机字符串
  2734. * @param string $value
  2735. **/
  2736. public function SetNonce_str($value)
  2737. {
  2738. $this->values['nonce_str'] = $value;
  2739. }
  2740. /**
  2741. * 获取随机字符串的值
  2742. * @return 值
  2743. **/
  2744. public function GetNonce_str()
  2745. {
  2746. return $this->values['nonce_str'];
  2747. }
  2748. /**
  2749. * 判断随机字符串是否存在
  2750. * @return true 或 false
  2751. **/
  2752. public function IsNonce_strSet()
  2753. {
  2754. return array_key_exists('nonce_str', $this->values);
  2755. }
  2756. /**
  2757. * 设置商品ID
  2758. * @param string $value
  2759. **/
  2760. public function SetProduct_id($value)
  2761. {
  2762. $this->values['product_id'] = $value;
  2763. }
  2764. /**
  2765. * 获取商品ID的值
  2766. * @return 值
  2767. **/
  2768. public function GetProduct_id()
  2769. {
  2770. return $this->values['product_id'];
  2771. }
  2772. /**
  2773. * 判断商品ID是否存在
  2774. * @return true 或 false
  2775. **/
  2776. public function IsProduct_idSet()
  2777. {
  2778. return array_key_exists('product_id', $this->values);
  2779. }
  2780. }