WxPay.Data.php 77 KB

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