WxPay.Data.php 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704
  1. <?php
  2. class WxPayDataBase
  3. {
  4. protected $values = array();
  5. public function SetSign()
  6. {
  7. $sign = $this->MakeSign();
  8. $this->values['sign'] = $sign;
  9. return $sign;
  10. }
  11. public function GetSign()
  12. {
  13. return $this->values['sign'];
  14. }
  15. public function IsSignSet()
  16. {
  17. return array_key_exists('sign', $this->values);
  18. }
  19. public function ToXml()
  20. {
  21. if (!is_array($this->values) || count($this->values) <= 0) {
  22. throw new WxPayException("Array data exception!");
  23. }
  24. $xml = "<xml>";
  25. foreach ($this->values as $key => $val) {
  26. if (is_numeric($val)) {
  27. $xml .= "<" . $key . ">" . $val . "</" . $key . ">";
  28. } else {
  29. $xml .= "<" . $key . "><![CDATA[" . $val . "]]></" . $key . ">";
  30. }
  31. }
  32. $xml .= "</xml>";
  33. return $xml;
  34. }
  35. public function FromXml($xml)
  36. {
  37. if (!$xml) {
  38. throw new WxPayException("XML data exception!");
  39. }
  40. libxml_disable_entity_loader(true);
  41. $this->values = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
  42. return $this->values;
  43. }
  44. public function ToUrlParams()
  45. {
  46. $buff = "";
  47. foreach ($this->values as $k => $v) {
  48. if ($k != "sign" && $v != "" && !is_array($v)) {
  49. $buff .= $k . "=" . $v . "&";
  50. }
  51. }
  52. $buff = trim($buff, "&");
  53. return $buff;
  54. }
  55. public function MakeSign()
  56. {
  57. ksort($this->values);
  58. $string = $this->ToUrlParams();
  59. $string = $string . "&key=" . WxPayConfig::KEY;
  60. $string = md5($string);
  61. $result = strtoupper($string);
  62. return $result;
  63. }
  64. public function GetValues()
  65. {
  66. return $this->values;
  67. }
  68. }
  69. class WxPayResults extends WxPayDataBase
  70. {
  71. public function CheckSign()
  72. {
  73. if (!$this->IsSignSet()) {
  74. throw new WxPayException("Signature error!");
  75. }
  76. $sign = $this->MakeSign();
  77. if ($this->GetSign() == $sign) {
  78. return true;
  79. }
  80. throw new WxPayException("Signature error!");
  81. }
  82. public function FromArray($array)
  83. {
  84. $this->values = $array;
  85. }
  86. public static function InitFromArray($array, $noCheckSign = false)
  87. {
  88. $obj = new self();
  89. $obj->FromArray($array);
  90. if ($noCheckSign == false) {
  91. $obj->CheckSign();
  92. }
  93. return $obj;
  94. }
  95. public function SetData($key, $value)
  96. {
  97. $this->values[$key] = $value;
  98. }
  99. public static function Init($xml)
  100. {
  101. $obj = new self();
  102. $obj->FromXml($xml);
  103. if ($obj->values['return_code'] != 'SUCCESS') {
  104. return $obj->GetValues();
  105. }
  106. $obj->CheckSign();
  107. return $obj->GetValues();
  108. }
  109. }
  110. class WxPayNotifyReply extends WxPayDataBase
  111. {
  112. public function SetReturn_code($return_code)
  113. {
  114. $this->values['return_code'] = $return_code;
  115. }
  116. public function GetReturn_code()
  117. {
  118. return $this->values['return_code'];
  119. }
  120. public function SetReturn_msg($return_msg)
  121. {
  122. $this->values['return_msg'] = $return_msg;
  123. }
  124. public function GetReturn_msg()
  125. {
  126. return $this->values['return_msg'];
  127. }
  128. public function SetData($key, $value)
  129. {
  130. $this->values[$key] = $value;
  131. }
  132. }
  133. class WxPayUnifiedOrder extends WxPayDataBase
  134. {
  135. public function SetAppid($value)
  136. {
  137. $this->values['appid'] = $value;
  138. }
  139. public function GetAppid()
  140. {
  141. return $this->values['appid'];
  142. }
  143. public function IsAppidSet()
  144. {
  145. return array_key_exists('appid', $this->values);
  146. }
  147. public function SetMch_id($value)
  148. {
  149. $this->values['mch_id'] = $value;
  150. }
  151. public function GetMch_id()
  152. {
  153. return $this->values['mch_id'];
  154. }
  155. public function IsMch_idSet()
  156. {
  157. return array_key_exists('mch_id', $this->values);
  158. }
  159. public function SetDevice_info($value)
  160. {
  161. $this->values['device_info'] = $value;
  162. }
  163. public function GetDevice_info()
  164. {
  165. return $this->values['device_info'];
  166. }
  167. public function IsDevice_infoSet()
  168. {
  169. return array_key_exists('device_info', $this->values);
  170. }
  171. public function SetNonce_str($value)
  172. {
  173. $this->values['nonce_str'] = $value;
  174. }
  175. public function GetNonce_str()
  176. {
  177. return $this->values['nonce_str'];
  178. }
  179. public function IsNonce_strSet()
  180. {
  181. return array_key_exists('nonce_str', $this->values);
  182. }
  183. public function SetBody($value)
  184. {
  185. $this->values['body'] = $value;
  186. }
  187. public function GetBody()
  188. {
  189. return $this->values['body'];
  190. }
  191. public function IsBodySet()
  192. {
  193. return array_key_exists('body', $this->values);
  194. }
  195. public function SetDetail($value)
  196. {
  197. $this->values['detail'] = $value;
  198. }
  199. public function GetDetail()
  200. {
  201. return $this->values['detail'];
  202. }
  203. public function IsDetailSet()
  204. {
  205. return array_key_exists('detail', $this->values);
  206. }
  207. public function SetAttach($value)
  208. {
  209. $this->values['attach'] = $value;
  210. }
  211. public function GetAttach()
  212. {
  213. return $this->values['attach'];
  214. }
  215. public function IsAttachSet()
  216. {
  217. return array_key_exists('attach', $this->values);
  218. }
  219. public function SetOut_trade_no($value)
  220. {
  221. $this->values['out_trade_no'] = $value;
  222. }
  223. public function GetOut_trade_no()
  224. {
  225. return $this->values['out_trade_no'];
  226. }
  227. public function IsOut_trade_noSet()
  228. {
  229. return array_key_exists('out_trade_no', $this->values);
  230. }
  231. public function SetFee_type($value)
  232. {
  233. $this->values['fee_type'] = $value;
  234. }
  235. public function GetFee_type()
  236. {
  237. return $this->values['fee_type'];
  238. }
  239. public function IsFee_typeSet()
  240. {
  241. return array_key_exists('fee_type', $this->values);
  242. }
  243. public function SetTotal_fee($value)
  244. {
  245. $this->values['total_fee'] = $value;
  246. }
  247. public function GetTotal_fee()
  248. {
  249. return $this->values['total_fee'];
  250. }
  251. public function IsTotal_feeSet()
  252. {
  253. return array_key_exists('total_fee', $this->values);
  254. }
  255. public function SetSpbill_create_ip($value)
  256. {
  257. $this->values['spbill_create_ip'] = $value;
  258. }
  259. public function GetSpbill_create_ip()
  260. {
  261. return $this->values['spbill_create_ip'];
  262. }
  263. public function IsSpbill_create_ipSet()
  264. {
  265. return array_key_exists('spbill_create_ip', $this->values);
  266. }
  267. public function SetTime_start($value)
  268. {
  269. $this->values['time_start'] = $value;
  270. }
  271. public function GetTime_start()
  272. {
  273. return $this->values['time_start'];
  274. }
  275. public function IsTime_startSet()
  276. {
  277. return array_key_exists('time_start', $this->values);
  278. }
  279. public function SetTime_expire($value)
  280. {
  281. $this->values['time_expire'] = $value;
  282. }
  283. public function GetTime_expire()
  284. {
  285. return $this->values['time_expire'];
  286. }
  287. public function IsTime_expireSet()
  288. {
  289. return array_key_exists('time_expire', $this->values);
  290. }
  291. public function SetGoods_tag($value)
  292. {
  293. $this->values['goods_tag'] = $value;
  294. }
  295. public function GetGoods_tag()
  296. {
  297. return $this->values['goods_tag'];
  298. }
  299. public function IsGoods_tagSet()
  300. {
  301. return array_key_exists('goods_tag', $this->values);
  302. }
  303. public function SetNotify_url($value)
  304. {
  305. $this->values['notify_url'] = $value;
  306. }
  307. public function GetNotify_url()
  308. {
  309. return $this->values['notify_url'];
  310. }
  311. public function IsNotify_urlSet()
  312. {
  313. return array_key_exists('notify_url', $this->values);
  314. }
  315. public function SetTrade_type($value)
  316. {
  317. $this->values['trade_type'] = $value;
  318. }
  319. public function GetTrade_type()
  320. {
  321. return $this->values['trade_type'];
  322. }
  323. public function IsTrade_typeSet()
  324. {
  325. return array_key_exists('trade_type', $this->values);
  326. }
  327. public function SetProduct_id($value)
  328. {
  329. $this->values['product_id'] = $value;
  330. }
  331. public function GetProduct_id()
  332. {
  333. return $this->values['product_id'];
  334. }
  335. public function IsProduct_idSet()
  336. {
  337. return array_key_exists('product_id', $this->values);
  338. }
  339. public function SetOpenid($value)
  340. {
  341. $this->values['openid'] = $value;
  342. }
  343. public function GetOpenid()
  344. {
  345. return $this->values['openid'];
  346. }
  347. public function IsOpenidSet()
  348. {
  349. return array_key_exists('openid', $this->values);
  350. }
  351. }
  352. class WxPayOrderQuery extends WxPayDataBase
  353. {
  354. public function SetAppid($value)
  355. {
  356. $this->values['appid'] = $value;
  357. }
  358. public function GetAppid()
  359. {
  360. return $this->values['appid'];
  361. }
  362. public function IsAppidSet()
  363. {
  364. return array_key_exists('appid', $this->values);
  365. }
  366. public function SetMch_id($value)
  367. {
  368. $this->values['mch_id'] = $value;
  369. }
  370. public function GetMch_id()
  371. {
  372. return $this->values['mch_id'];
  373. }
  374. public function IsMch_idSet()
  375. {
  376. return array_key_exists('mch_id', $this->values);
  377. }
  378. public function SetTransaction_id($value)
  379. {
  380. $this->values['transaction_id'] = $value;
  381. }
  382. public function GetTransaction_id()
  383. {
  384. return $this->values['transaction_id'];
  385. }
  386. public function IsTransaction_idSet()
  387. {
  388. return array_key_exists('transaction_id', $this->values);
  389. }
  390. public function SetOut_trade_no($value)
  391. {
  392. $this->values['out_trade_no'] = $value;
  393. }
  394. public function GetOut_trade_no()
  395. {
  396. return $this->values['out_trade_no'];
  397. }
  398. public function IsOut_trade_noSet()
  399. {
  400. return array_key_exists('out_trade_no', $this->values);
  401. }
  402. public function SetNonce_str($value)
  403. {
  404. $this->values['nonce_str'] = $value;
  405. }
  406. public function GetNonce_str()
  407. {
  408. return $this->values['nonce_str'];
  409. }
  410. public function IsNonce_strSet()
  411. {
  412. return array_key_exists('nonce_str', $this->values);
  413. }
  414. }
  415. class WxPayCloseOrder extends WxPayDataBase
  416. {
  417. public function SetAppid($value)
  418. {
  419. $this->values['appid'] = $value;
  420. }
  421. public function GetAppid()
  422. {
  423. return $this->values['appid'];
  424. }
  425. public function IsAppidSet()
  426. {
  427. return array_key_exists('appid', $this->values);
  428. }
  429. public function SetMch_id($value)
  430. {
  431. $this->values['mch_id'] = $value;
  432. }
  433. public function GetMch_id()
  434. {
  435. return $this->values['mch_id'];
  436. }
  437. public function IsMch_idSet()
  438. {
  439. return array_key_exists('mch_id', $this->values);
  440. }
  441. public function SetOut_trade_no($value)
  442. {
  443. $this->values['out_trade_no'] = $value;
  444. }
  445. public function GetOut_trade_no()
  446. {
  447. return $this->values['out_trade_no'];
  448. }
  449. public function IsOut_trade_noSet()
  450. {
  451. return array_key_exists('out_trade_no', $this->values);
  452. }
  453. public function SetNonce_str($value)
  454. {
  455. $this->values['nonce_str'] = $value;
  456. }
  457. public function GetNonce_str()
  458. {
  459. return $this->values['nonce_str'];
  460. }
  461. public function IsNonce_strSet()
  462. {
  463. return array_key_exists('nonce_str', $this->values);
  464. }
  465. }
  466. class WxPayRefund extends WxPayDataBase
  467. {
  468. public function SetAppid($value)
  469. {
  470. $this->values['appid'] = $value;
  471. }
  472. public function GetAppid()
  473. {
  474. return $this->values['appid'];
  475. }
  476. public function IsAppidSet()
  477. {
  478. return array_key_exists('appid', $this->values);
  479. }
  480. public function SetMch_id($value)
  481. {
  482. $this->values['mch_id'] = $value;
  483. }
  484. public function GetMch_id()
  485. {
  486. return $this->values['mch_id'];
  487. }
  488. public function IsMch_idSet()
  489. {
  490. return array_key_exists('mch_id', $this->values);
  491. }
  492. public function SetDevice_info($value)
  493. {
  494. $this->values['device_info'] = $value;
  495. }
  496. public function GetDevice_info()
  497. {
  498. return $this->values['device_info'];
  499. }
  500. public function IsDevice_infoSet()
  501. {
  502. return array_key_exists('device_info', $this->values);
  503. }
  504. public function SetNonce_str($value)
  505. {
  506. $this->values['nonce_str'] = $value;
  507. }
  508. public function GetNonce_str()
  509. {
  510. return $this->values['nonce_str'];
  511. }
  512. public function IsNonce_strSet()
  513. {
  514. return array_key_exists('nonce_str', $this->values);
  515. }
  516. public function SetTransaction_id($value)
  517. {
  518. $this->values['transaction_id'] = $value;
  519. }
  520. public function GetTransaction_id()
  521. {
  522. return $this->values['transaction_id'];
  523. }
  524. public function IsTransaction_idSet()
  525. {
  526. return array_key_exists('transaction_id', $this->values);
  527. }
  528. public function SetOut_trade_no($value)
  529. {
  530. $this->values['out_trade_no'] = $value;
  531. }
  532. public function GetOut_trade_no()
  533. {
  534. return $this->values['out_trade_no'];
  535. }
  536. public function IsOut_trade_noSet()
  537. {
  538. return array_key_exists('out_trade_no', $this->values);
  539. }
  540. public function SetOut_refund_no($value)
  541. {
  542. $this->values['out_refund_no'] = $value;
  543. }
  544. public function GetOut_refund_no()
  545. {
  546. return $this->values['out_refund_no'];
  547. }
  548. public function IsOut_refund_noSet()
  549. {
  550. return array_key_exists('out_refund_no', $this->values);
  551. }
  552. public function SetTotal_fee($value)
  553. {
  554. $this->values['total_fee'] = $value;
  555. }
  556. public function GetTotal_fee()
  557. {
  558. return $this->values['total_fee'];
  559. }
  560. public function IsTotal_feeSet()
  561. {
  562. return array_key_exists('total_fee', $this->values);
  563. }
  564. public function SetRefund_fee($value)
  565. {
  566. $this->values['refund_fee'] = $value;
  567. }
  568. public function GetRefund_fee()
  569. {
  570. return $this->values['refund_fee'];
  571. }
  572. public function IsRefund_feeSet()
  573. {
  574. return array_key_exists('refund_fee', $this->values);
  575. }
  576. public function SetRefund_fee_type($value)
  577. {
  578. $this->values['refund_fee_type'] = $value;
  579. }
  580. public function GetRefund_fee_type()
  581. {
  582. return $this->values['refund_fee_type'];
  583. }
  584. public function IsRefund_fee_typeSet()
  585. {
  586. return array_key_exists('refund_fee_type', $this->values);
  587. }
  588. public function SetOp_user_id($value)
  589. {
  590. $this->values['op_user_id'] = $value;
  591. }
  592. public function GetOp_user_id()
  593. {
  594. return $this->values['op_user_id'];
  595. }
  596. public function IsOp_user_idSet()
  597. {
  598. return array_key_exists('op_user_id', $this->values);
  599. }
  600. }
  601. class WxPayRefundQuery extends WxPayDataBase
  602. {
  603. public function SetAppid($value)
  604. {
  605. $this->values['appid'] = $value;
  606. }
  607. public function GetAppid()
  608. {
  609. return $this->values['appid'];
  610. }
  611. public function IsAppidSet()
  612. {
  613. return array_key_exists('appid', $this->values);
  614. }
  615. public function SetMch_id($value)
  616. {
  617. $this->values['mch_id'] = $value;
  618. }
  619. public function GetMch_id()
  620. {
  621. return $this->values['mch_id'];
  622. }
  623. public function IsMch_idSet()
  624. {
  625. return array_key_exists('mch_id', $this->values);
  626. }
  627. public function SetDevice_info($value)
  628. {
  629. $this->values['device_info'] = $value;
  630. }
  631. public function GetDevice_info()
  632. {
  633. return $this->values['device_info'];
  634. }
  635. public function IsDevice_infoSet()
  636. {
  637. return array_key_exists('device_info', $this->values);
  638. }
  639. public function SetNonce_str($value)
  640. {
  641. $this->values['nonce_str'] = $value;
  642. }
  643. public function GetNonce_str()
  644. {
  645. return $this->values['nonce_str'];
  646. }
  647. public function IsNonce_strSet()
  648. {
  649. return array_key_exists('nonce_str', $this->values);
  650. }
  651. public function SetTransaction_id($value)
  652. {
  653. $this->values['transaction_id'] = $value;
  654. }
  655. public function GetTransaction_id()
  656. {
  657. return $this->values['transaction_id'];
  658. }
  659. public function IsTransaction_idSet()
  660. {
  661. return array_key_exists('transaction_id', $this->values);
  662. }
  663. public function SetOut_trade_no($value)
  664. {
  665. $this->values['out_trade_no'] = $value;
  666. }
  667. public function GetOut_trade_no()
  668. {
  669. return $this->values['out_trade_no'];
  670. }
  671. public function IsOut_trade_noSet()
  672. {
  673. return array_key_exists('out_trade_no', $this->values);
  674. }
  675. public function SetOut_refund_no($value)
  676. {
  677. $this->values['out_refund_no'] = $value;
  678. }
  679. public function GetOut_refund_no()
  680. {
  681. return $this->values['out_refund_no'];
  682. }
  683. public function IsOut_refund_noSet()
  684. {
  685. return array_key_exists('out_refund_no', $this->values);
  686. }
  687. public function SetRefund_id($value)
  688. {
  689. $this->values['refund_id'] = $value;
  690. }
  691. public function GetRefund_id()
  692. {
  693. return $this->values['refund_id'];
  694. }
  695. public function IsRefund_idSet()
  696. {
  697. return array_key_exists('refund_id', $this->values);
  698. }
  699. }
  700. class WxPayDownloadBill extends WxPayDataBase
  701. {
  702. public function SetAppid($value)
  703. {
  704. $this->values['appid'] = $value;
  705. }
  706. public function GetAppid()
  707. {
  708. return $this->values['appid'];
  709. }
  710. public function IsAppidSet()
  711. {
  712. return array_key_exists('appid', $this->values);
  713. }
  714. public function SetMch_id($value)
  715. {
  716. $this->values['mch_id'] = $value;
  717. }
  718. public function GetMch_id()
  719. {
  720. return $this->values['mch_id'];
  721. }
  722. public function IsMch_idSet()
  723. {
  724. return array_key_exists('mch_id', $this->values);
  725. }
  726. public function SetDevice_info($value)
  727. {
  728. $this->values['device_info'] = $value;
  729. }
  730. public function GetDevice_info()
  731. {
  732. return $this->values['device_info'];
  733. }
  734. public function IsDevice_infoSet()
  735. {
  736. return array_key_exists('device_info', $this->values);
  737. }
  738. public function SetNonce_str($value)
  739. {
  740. $this->values['nonce_str'] = $value;
  741. }
  742. public function GetNonce_str()
  743. {
  744. return $this->values['nonce_str'];
  745. }
  746. public function IsNonce_strSet()
  747. {
  748. return array_key_exists('nonce_str', $this->values);
  749. }
  750. public function SetBill_date($value)
  751. {
  752. $this->values['bill_date'] = $value;
  753. }
  754. public function GetBill_date()
  755. {
  756. return $this->values['bill_date'];
  757. }
  758. public function IsBill_dateSet()
  759. {
  760. return array_key_exists('bill_date', $this->values);
  761. }
  762. public function SetBill_type($value)
  763. {
  764. $this->values['bill_type'] = $value;
  765. }
  766. public function GetBill_type()
  767. {
  768. return $this->values['bill_type'];
  769. }
  770. public function IsBill_typeSet()
  771. {
  772. return array_key_exists('bill_type', $this->values);
  773. }
  774. }
  775. class WxPayReport extends WxPayDataBase
  776. {
  777. public function SetAppid($value)
  778. {
  779. $this->values['appid'] = $value;
  780. }
  781. public function GetAppid()
  782. {
  783. return $this->values['appid'];
  784. }
  785. public function IsAppidSet()
  786. {
  787. return array_key_exists('appid', $this->values);
  788. }
  789. public function SetMch_id($value)
  790. {
  791. $this->values['mch_id'] = $value;
  792. }
  793. public function GetMch_id()
  794. {
  795. return $this->values['mch_id'];
  796. }
  797. public function IsMch_idSet()
  798. {
  799. return array_key_exists('mch_id', $this->values);
  800. }
  801. public function SetDevice_info($value)
  802. {
  803. $this->values['device_info'] = $value;
  804. }
  805. public function GetDevice_info()
  806. {
  807. return $this->values['device_info'];
  808. }
  809. public function IsDevice_infoSet()
  810. {
  811. return array_key_exists('device_info', $this->values);
  812. }
  813. public function SetNonce_str($value)
  814. {
  815. $this->values['nonce_str'] = $value;
  816. }
  817. public function GetNonce_str()
  818. {
  819. return $this->values['nonce_str'];
  820. }
  821. public function IsNonce_strSet()
  822. {
  823. return array_key_exists('nonce_str', $this->values);
  824. }
  825. public function SetInterface_url($value)
  826. {
  827. $this->values['interface_url'] = $value;
  828. }
  829. public function GetInterface_url()
  830. {
  831. return $this->values['interface_url'];
  832. }
  833. public function IsInterface_urlSet()
  834. {
  835. return array_key_exists('interface_url', $this->values);
  836. }
  837. public function SetExecute_time_($value)
  838. {
  839. $this->values['execute_time_'] = $value;
  840. }
  841. public function GetExecute_time_()
  842. {
  843. return $this->values['execute_time_'];
  844. }
  845. public function IsExecute_time_Set()
  846. {
  847. return array_key_exists('execute_time_', $this->values);
  848. }
  849. public function SetReturn_code($value)
  850. {
  851. $this->values['return_code'] = $value;
  852. }
  853. public function GetReturn_code()
  854. {
  855. return $this->values['return_code'];
  856. }
  857. public function IsReturn_codeSet()
  858. {
  859. return array_key_exists('return_code', $this->values);
  860. }
  861. public function SetReturn_msg($value)
  862. {
  863. $this->values['return_msg'] = $value;
  864. }
  865. public function GetReturn_msg()
  866. {
  867. return $this->values['return_msg'];
  868. }
  869. public function IsReturn_msgSet()
  870. {
  871. return array_key_exists('return_msg', $this->values);
  872. }
  873. public function SetResult_code($value)
  874. {
  875. $this->values['result_code'] = $value;
  876. }
  877. public function GetResult_code()
  878. {
  879. return $this->values['result_code'];
  880. }
  881. public function IsResult_codeSet()
  882. {
  883. return array_key_exists('result_code', $this->values);
  884. }
  885. public function SetErr_code($value)
  886. {
  887. $this->values['err_code'] = $value;
  888. }
  889. public function GetErr_code()
  890. {
  891. return $this->values['err_code'];
  892. }
  893. public function IsErr_codeSet()
  894. {
  895. return array_key_exists('err_code', $this->values);
  896. }
  897. public function SetErr_code_des($value)
  898. {
  899. $this->values['err_code_des'] = $value;
  900. }
  901. public function GetErr_code_des()
  902. {
  903. return $this->values['err_code_des'];
  904. }
  905. public function IsErr_code_desSet()
  906. {
  907. return array_key_exists('err_code_des', $this->values);
  908. }
  909. public function SetOut_trade_no($value)
  910. {
  911. $this->values['out_trade_no'] = $value;
  912. }
  913. public function GetOut_trade_no()
  914. {
  915. return $this->values['out_trade_no'];
  916. }
  917. public function IsOut_trade_noSet()
  918. {
  919. return array_key_exists('out_trade_no', $this->values);
  920. }
  921. public function SetUser_ip($value)
  922. {
  923. $this->values['user_ip'] = $value;
  924. }
  925. public function GetUser_ip()
  926. {
  927. return $this->values['user_ip'];
  928. }
  929. public function IsUser_ipSet()
  930. {
  931. return array_key_exists('user_ip', $this->values);
  932. }
  933. public function SetTime($value)
  934. {
  935. $this->values['time'] = $value;
  936. }
  937. public function GetTime()
  938. {
  939. return $this->values['time'];
  940. }
  941. public function IsTimeSet()
  942. {
  943. return array_key_exists('time', $this->values);
  944. }
  945. }
  946. class WxPayShortUrl extends WxPayDataBase
  947. {
  948. public function SetAppid($value)
  949. {
  950. $this->values['appid'] = $value;
  951. }
  952. public function GetAppid()
  953. {
  954. return $this->values['appid'];
  955. }
  956. public function IsAppidSet()
  957. {
  958. return array_key_exists('appid', $this->values);
  959. }
  960. public function SetMch_id($value)
  961. {
  962. $this->values['mch_id'] = $value;
  963. }
  964. public function GetMch_id()
  965. {
  966. return $this->values['mch_id'];
  967. }
  968. public function IsMch_idSet()
  969. {
  970. return array_key_exists('mch_id', $this->values);
  971. }
  972. public function SetLong_url($value)
  973. {
  974. $this->values['long_url'] = $value;
  975. }
  976. public function GetLong_url()
  977. {
  978. return $this->values['long_url'];
  979. }
  980. public function IsLong_urlSet()
  981. {
  982. return array_key_exists('long_url', $this->values);
  983. }
  984. public function SetNonce_str($value)
  985. {
  986. $this->values['nonce_str'] = $value;
  987. }
  988. public function GetNonce_str()
  989. {
  990. return $this->values['nonce_str'];
  991. }
  992. public function IsNonce_strSet()
  993. {
  994. return array_key_exists('nonce_str', $this->values);
  995. }
  996. }
  997. class WxPayMicroPay extends WxPayDataBase
  998. {
  999. public function SetAppid($value)
  1000. {
  1001. $this->values['appid'] = $value;
  1002. }
  1003. public function GetAppid()
  1004. {
  1005. return $this->values['appid'];
  1006. }
  1007. public function IsAppidSet()
  1008. {
  1009. return array_key_exists('appid', $this->values);
  1010. }
  1011. public function SetMch_id($value)
  1012. {
  1013. $this->values['mch_id'] = $value;
  1014. }
  1015. public function GetMch_id()
  1016. {
  1017. return $this->values['mch_id'];
  1018. }
  1019. public function IsMch_idSet()
  1020. {
  1021. return array_key_exists('mch_id', $this->values);
  1022. }
  1023. public function SetDevice_info($value)
  1024. {
  1025. $this->values['device_info'] = $value;
  1026. }
  1027. public function GetDevice_info()
  1028. {
  1029. return $this->values['device_info'];
  1030. }
  1031. public function IsDevice_infoSet()
  1032. {
  1033. return array_key_exists('device_info', $this->values);
  1034. }
  1035. public function SetNonce_str($value)
  1036. {
  1037. $this->values['nonce_str'] = $value;
  1038. }
  1039. public function GetNonce_str()
  1040. {
  1041. return $this->values['nonce_str'];
  1042. }
  1043. public function IsNonce_strSet()
  1044. {
  1045. return array_key_exists('nonce_str', $this->values);
  1046. }
  1047. public function SetBody($value)
  1048. {
  1049. $this->values['body'] = $value;
  1050. }
  1051. public function GetBody()
  1052. {
  1053. return $this->values['body'];
  1054. }
  1055. public function IsBodySet()
  1056. {
  1057. return array_key_exists('body', $this->values);
  1058. }
  1059. public function SetDetail($value)
  1060. {
  1061. $this->values['detail'] = $value;
  1062. }
  1063. public function GetDetail()
  1064. {
  1065. return $this->values['detail'];
  1066. }
  1067. public function IsDetailSet()
  1068. {
  1069. return array_key_exists('detail', $this->values);
  1070. }
  1071. public function SetAttach($value)
  1072. {
  1073. $this->values['attach'] = $value;
  1074. }
  1075. public function GetAttach()
  1076. {
  1077. return $this->values['attach'];
  1078. }
  1079. public function IsAttachSet()
  1080. {
  1081. return array_key_exists('attach', $this->values);
  1082. }
  1083. public function SetOut_trade_no($value)
  1084. {
  1085. $this->values['out_trade_no'] = $value;
  1086. }
  1087. public function GetOut_trade_no()
  1088. {
  1089. return $this->values['out_trade_no'];
  1090. }
  1091. public function IsOut_trade_noSet()
  1092. {
  1093. return array_key_exists('out_trade_no', $this->values);
  1094. }
  1095. public function SetTotal_fee($value)
  1096. {
  1097. $this->values['total_fee'] = $value;
  1098. }
  1099. public function GetTotal_fee()
  1100. {
  1101. return $this->values['total_fee'];
  1102. }
  1103. public function IsTotal_feeSet()
  1104. {
  1105. return array_key_exists('total_fee', $this->values);
  1106. }
  1107. public function SetFee_type($value)
  1108. {
  1109. $this->values['fee_type'] = $value;
  1110. }
  1111. public function GetFee_type()
  1112. {
  1113. return $this->values['fee_type'];
  1114. }
  1115. public function IsFee_typeSet()
  1116. {
  1117. return array_key_exists('fee_type', $this->values);
  1118. }
  1119. public function SetSpbill_create_ip($value)
  1120. {
  1121. $this->values['spbill_create_ip'] = $value;
  1122. }
  1123. public function GetSpbill_create_ip()
  1124. {
  1125. return $this->values['spbill_create_ip'];
  1126. }
  1127. public function IsSpbill_create_ipSet()
  1128. {
  1129. return array_key_exists('spbill_create_ip', $this->values);
  1130. }
  1131. public function SetTime_start($value)
  1132. {
  1133. $this->values['time_start'] = $value;
  1134. }
  1135. public function GetTime_start()
  1136. {
  1137. return $this->values['time_start'];
  1138. }
  1139. public function IsTime_startSet()
  1140. {
  1141. return array_key_exists('time_start', $this->values);
  1142. }
  1143. public function SetTime_expire($value)
  1144. {
  1145. $this->values['time_expire'] = $value;
  1146. }
  1147. public function GetTime_expire()
  1148. {
  1149. return $this->values['time_expire'];
  1150. }
  1151. public function IsTime_expireSet()
  1152. {
  1153. return array_key_exists('time_expire', $this->values);
  1154. }
  1155. public function SetGoods_tag($value)
  1156. {
  1157. $this->values['goods_tag'] = $value;
  1158. }
  1159. public function GetGoods_tag()
  1160. {
  1161. return $this->values['goods_tag'];
  1162. }
  1163. public function IsGoods_tagSet()
  1164. {
  1165. return array_key_exists('goods_tag', $this->values);
  1166. }
  1167. public function SetAuth_code($value)
  1168. {
  1169. $this->values['auth_code'] = $value;
  1170. }
  1171. public function GetAuth_code()
  1172. {
  1173. return $this->values['auth_code'];
  1174. }
  1175. public function IsAuth_codeSet()
  1176. {
  1177. return array_key_exists('auth_code', $this->values);
  1178. }
  1179. }
  1180. class WxPayReverse extends WxPayDataBase
  1181. {
  1182. public function SetAppid($value)
  1183. {
  1184. $this->values['appid'] = $value;
  1185. }
  1186. public function GetAppid()
  1187. {
  1188. return $this->values['appid'];
  1189. }
  1190. public function IsAppidSet()
  1191. {
  1192. return array_key_exists('appid', $this->values);
  1193. }
  1194. public function SetMch_id($value)
  1195. {
  1196. $this->values['mch_id'] = $value;
  1197. }
  1198. public function GetMch_id()
  1199. {
  1200. return $this->values['mch_id'];
  1201. }
  1202. public function IsMch_idSet()
  1203. {
  1204. return array_key_exists('mch_id', $this->values);
  1205. }
  1206. public function SetTransaction_id($value)
  1207. {
  1208. $this->values['transaction_id'] = $value;
  1209. }
  1210. public function GetTransaction_id()
  1211. {
  1212. return $this->values['transaction_id'];
  1213. }
  1214. public function IsTransaction_idSet()
  1215. {
  1216. return array_key_exists('transaction_id', $this->values);
  1217. }
  1218. public function SetOut_trade_no($value)
  1219. {
  1220. $this->values['out_trade_no'] = $value;
  1221. }
  1222. public function GetOut_trade_no()
  1223. {
  1224. return $this->values['out_trade_no'];
  1225. }
  1226. public function IsOut_trade_noSet()
  1227. {
  1228. return array_key_exists('out_trade_no', $this->values);
  1229. }
  1230. public function SetNonce_str($value)
  1231. {
  1232. $this->values['nonce_str'] = $value;
  1233. }
  1234. public function GetNonce_str()
  1235. {
  1236. return $this->values['nonce_str'];
  1237. }
  1238. public function IsNonce_strSet()
  1239. {
  1240. return array_key_exists('nonce_str', $this->values);
  1241. }
  1242. }
  1243. class WxPayJsApiPay extends WxPayDataBase
  1244. {
  1245. public function SetAppid($value)
  1246. {
  1247. $this->values['appId'] = $value;
  1248. }
  1249. public function GetAppid()
  1250. {
  1251. return $this->values['appId'];
  1252. }
  1253. public function IsAppidSet()
  1254. {
  1255. return array_key_exists('appId', $this->values);
  1256. }
  1257. public function SetTimeStamp($value)
  1258. {
  1259. $this->values['timeStamp'] = $value;
  1260. }
  1261. public function GetTimeStamp()
  1262. {
  1263. return $this->values['timeStamp'];
  1264. }
  1265. public function IsTimeStampSet()
  1266. {
  1267. return array_key_exists('timeStamp', $this->values);
  1268. }
  1269. public function SetNonceStr($value)
  1270. {
  1271. $this->values['nonceStr'] = $value;
  1272. }
  1273. public function GetReturn_code()
  1274. {
  1275. return $this->values['nonceStr'];
  1276. }
  1277. public function IsReturn_codeSet()
  1278. {
  1279. return array_key_exists('nonceStr', $this->values);
  1280. }
  1281. public function SetPackage($value)
  1282. {
  1283. $this->values['package'] = $value;
  1284. }
  1285. public function GetPackage()
  1286. {
  1287. return $this->values['package'];
  1288. }
  1289. public function IsPackageSet()
  1290. {
  1291. return array_key_exists('package', $this->values);
  1292. }
  1293. public function SetSignType($value)
  1294. {
  1295. $this->values['signType'] = $value;
  1296. }
  1297. public function GetSignType()
  1298. {
  1299. return $this->values['signType'];
  1300. }
  1301. public function IsSignTypeSet()
  1302. {
  1303. return array_key_exists('signType', $this->values);
  1304. }
  1305. public function SetPaySign($value)
  1306. {
  1307. $this->values['paySign'] = $value;
  1308. }
  1309. public function GetPaySign()
  1310. {
  1311. return $this->values['paySign'];
  1312. }
  1313. public function IsPaySignSet()
  1314. {
  1315. return array_key_exists('paySign', $this->values);
  1316. }
  1317. }
  1318. class WxPayBizPayUrl extends WxPayDataBase
  1319. {
  1320. public function SetAppid($value)
  1321. {
  1322. $this->values['appid'] = $value;
  1323. }
  1324. public function GetAppid()
  1325. {
  1326. return $this->values['appid'];
  1327. }
  1328. public function IsAppidSet()
  1329. {
  1330. return array_key_exists('appid', $this->values);
  1331. }
  1332. public function SetMch_id($value)
  1333. {
  1334. $this->values['mch_id'] = $value;
  1335. }
  1336. public function GetMch_id()
  1337. {
  1338. return $this->values['mch_id'];
  1339. }
  1340. public function IsMch_idSet()
  1341. {
  1342. return array_key_exists('mch_id', $this->values);
  1343. }
  1344. public function SetTime_stamp($value)
  1345. {
  1346. $this->values['time_stamp'] = $value;
  1347. }
  1348. public function GetTime_stamp()
  1349. {
  1350. return $this->values['time_stamp'];
  1351. }
  1352. public function IsTime_stampSet()
  1353. {
  1354. return array_key_exists('time_stamp', $this->values);
  1355. }
  1356. public function SetNonce_str($value)
  1357. {
  1358. $this->values['nonce_str'] = $value;
  1359. }
  1360. public function GetNonce_str()
  1361. {
  1362. return $this->values['nonce_str'];
  1363. }
  1364. public function IsNonce_strSet()
  1365. {
  1366. return array_key_exists('nonce_str', $this->values);
  1367. }
  1368. public function SetProduct_id($value)
  1369. {
  1370. $this->values['product_id'] = $value;
  1371. }
  1372. public function GetProduct_id()
  1373. {
  1374. return $this->values['product_id'];
  1375. }
  1376. public function IsProduct_idSet()
  1377. {
  1378. return array_key_exists('product_id', $this->values);
  1379. }
  1380. }
  1381. ?>