Yspay.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. <?php namespace Pay\Lib;
  2. use Dever;
  3. class Yspay extends Core
  4. {
  5. public function __construct($config)
  6. {
  7. $project = Dever::project('pay');
  8. # 通知接口
  9. $config['notify'] = $this->url($config['type'], $config['id']);
  10. $set = explode('|', $config['mchid']);
  11. $config['mid'] = $set[0];
  12. $config['tid'] = $set[1];
  13. if (isset($set[2])) {
  14. $config['prefix'] = $set[2];
  15. }
  16. $set = explode('|', $config['key']);
  17. $config['sub_appid'] = $set[0];
  18. $config['sub_appsecret'] = $set[1];
  19. if (isset($set[2])) {
  20. $config['key'] = $set[2];
  21. }
  22. $this->config = $config;
  23. }
  24. /**
  25. * 通知
  26. */
  27. public function notify()
  28. {
  29. $input = file_get_contents("php://input");
  30. if ($input) {
  31. parse_str($input, $input);
  32. } else {
  33. $input = Dever::input();
  34. }
  35. $test = Dever::input('test');
  36. if ($test == 1) {
  37. $input = json_decode('{"msgType":"wx.notify","payTime":"2021-12-29 18:24:42","buyerCashPayAmt":"1","connectSys":"UNIONPAY","sign":"E82978003E0121B320D3520B1930FB4C2072B639126F3427351631F1D0A998CF","merName":"中食民安(北京)科技有限公司","mid":"89810007372106N","invoiceAmount":"1","settleDate":"2021-12-29","billFunds":"现金:1","buyerId":"otdJ_uD-zTNmDn7-u13oActXu8lA","mchntUuid":"2d9081bd7db8ad75017dbbe68981314f","tid":"DM098308","instMid":"MINIDEFAULT","receiptAmount":"1","couponAmount":"0","targetOrderId":"4200001344202112290882463274","signType":"SHA256","billFundsDesc":"现金支付0.01元。","subBuyerId":"oGlMn5e_vdYK8uAaCgyexarFKBrY","orderDesc":"中食民安(北京)科技有限公司","seqId":"25267273719N","merOrderId":"138K_G202112297347788956443487","targetSys":"WXPay","bankInfo":"OTHERS","totalAmount":"1","createTime":"2021-12-29 18:24:38","buyerPayAmount":"1","iB":"KRHn","notifyId":"d4122965-b772-4f8f-b5c4-f3d483da0962","subInst":"100000","status":"TRADE_SUCCESS"}', true);
  38. $input = json_decode('{"bankInfo":"OTHERS","billDate":"2022-01-06","billDesc":"中食民安(北京)科技有限公司","billNo":"138KG202201064666839470673943","billPayment":"{\"payTime\":\"2022-01-06 13:24:56\",\"buyerCashPayAmt\":1,\"paySeqId\":\"25394941600N\",\"invoiceAmount\":1,\"settleDate\":\"2022-01-06\",\"buyerId\":\"otdJ_uHh75dIaI6EKu-6usw0hjD4\",\"receiptAmount\":1,\"totalAmount\":1,\"couponAmount\":0,\"billBizType\":\"bills\",\"buyerPayAmount\":1,\"targetOrderId\":\"4200001348202201065614123115\",\"payDetail\":\"现金支付0.01元。\",\"merOrderId\":\"138KG2022010646668394706739430\",\"status\":\"TRADE_SUCCESS\",\"targetSys\":\"WXPay\"}","billQRCode":"https:\/\/qr.95516.com\/48020000\/138K2201066502428138291294","billStatus":"PAID","createTime":"2022-01-06 13:24:28","instMid":"QRPAYDEFAULT","mchntUuid":"2d9081bd7db8ad75017dbbe68981314f","merName":"中食民安(北京)科技有限公司","mid":"89810007372106N","notifyId":"49a83755-b476-47c3-a0b6-629dc7a43742","qrCodeId":"138K2201066502428138291294","qrCodeType":"BILLPAY","receiptAmount":"1","seqId":"25394941600N","signType":"SHA256","subInst":"100000","tid":"DM098308","totalAmount":"1","vE":"Bclv","sign":"1D048E292E17225A4EEF4AB438630601A19E50CDA71DF9E7A4304AABBD134A38","e_sign":"1D048E292E17225A4EEF4AB438630601A19E50CDA71DF9E7A4304AABBD134A38"}', true);
  39. }
  40. $sign = $input['sign'];
  41. unset($input['sign']);
  42. if (isset($input['e_sign'])) {
  43. unset($input['e_sign']);
  44. }
  45. ksort($input);
  46. $string = array();
  47. foreach ($input as $k => $v) {
  48. if (strstr($v, '&') || strstr($v, '@')) {
  49. $v = urlencode($v);
  50. }
  51. $string[] = $k . '=' . $v;
  52. }
  53. $string = implode('&', $string);
  54. $string .= $this->config['key'];
  55. if ($input['signType'] == 'SHA256') {
  56. $string = hash("sha256", $string);
  57. } else {
  58. $string = md5($string);
  59. }
  60. $string = strtoupper($string);
  61. $input['sign'] = $sign;
  62. $input['e_sign'] = $string;
  63. $this->log('支付回调-初始化', $input);
  64. if ($sign == $string) {
  65. if (isset($input['billNo']) && $input['billNo']) {
  66. $key = 'billNo';
  67. } else {
  68. $key = 'merOrderId';
  69. }
  70. if (isset($this->config['prefix']) && $this->config['prefix']) {
  71. $input[$key] = str_replace($this->config['prefix'], '', $input[$key]);
  72. }
  73. if (isset($input['billPayment'])) {
  74. $input['billPayment'] = json_decode($input['billPayment'], true);
  75. if (isset($input['billPayment']['status'])) {
  76. $input['status'] = $input['billPayment']['status'];
  77. }
  78. }
  79. if (!isset($input['status'])) {
  80. echo 'FAILED';die;
  81. }
  82. $desc = '';
  83. if ($input['status'] == 'TRADE_SUCCESS') {
  84. # 成功
  85. } elseif ($input['status'] == 'TRADE_REFUND') {
  86. # 退款
  87. echo 'SUCCESS';die;
  88. } elseif ($input['status'] == 'TRADE_CLOSED') {
  89. $desc = '交易关闭';
  90. } elseif ($input['status'] == 'UNKNOWN') {
  91. $desc = '不明确的交易状态';
  92. } else {
  93. echo 'FAILED';die;
  94. }
  95. $this->updateOrder($input[$key], $input['totalAmount']);
  96. echo 'SUCCESS';die;
  97. } else {
  98. echo 'FAILED';die;
  99. }
  100. }
  101. private function getType($type)
  102. {
  103. switch ($type) {
  104. case 1:
  105. //小程序支付
  106. $type = 'MINI';
  107. break;
  108. case 2://扫码支付
  109. $type = 'APP';
  110. break;
  111. case 3://APP支付
  112. $type = 'APP';
  113. break;
  114. case 4://页面拉起支付
  115. $type = 'YUEDAN';
  116. break;
  117. }
  118. return $type;
  119. }
  120. /**
  121. * 获取统一下单的基本信息
  122. */
  123. public function order($account_id, $project_id, $uid, $username, $product_id, $name, $cash, $openid = false, $type = 1, $order_id = false, $other = false, $refer = false)
  124. {
  125. $trade_type = $this->getType($type);
  126. $order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $this->config['type'], $order_id);
  127. if (isset($this->config['prefix']) && $this->config['prefix']) {
  128. $request['merOrderId'] = $this->config['prefix'] . $order_id;
  129. } else {
  130. $request['merOrderId'] = $order_id;
  131. }
  132. $request['mid'] = $this->config['mid'];
  133. $request['tid'] = $this->config['tid'];
  134. $request['instMid'] = $trade_type . 'DEFAULT';
  135. $request['totalAmount'] = round($cash * 100, 2);
  136. //$request['totalAmount'] = 100;
  137. $request['subAppId'] = $this->config['sub_appid'];
  138. $request['requestTimestamp'] = date("Y-m-d H:i:s");
  139. $request['expireTime'] = date("Y-m-d H:i:s", time() + $this->config['timeout']);
  140. $request['notifyUrl'] = $this->config['notify'];
  141. $request['tradeType'] = $trade_type;
  142. if ($other) {
  143. $request['originalAmount'] = round($other['oprice'] * 100, 2);
  144. $request['divisionFlag'] = true;
  145. # 平台分账金额
  146. $other['per'] = $other['per'] && $other['per'] >= 0 ? $other['per'] : 0;
  147. $other['per'] = $other['per']/100;
  148. $request['platformAmount'] = round($request['totalAmount'] * $other['per'], 2);
  149. $request['subOrders'] = array();
  150. $request['subOrders']['mid'] = $other['mid'];
  151. if (isset($this->config['prefix']) && $this->config['prefix']) {
  152. $request['subOrders']['merOrderId'] = $this->config['prefix'] . $other['order_id'];
  153. } else {
  154. $request['subOrders']['merOrderId'] = $other['order_id'];
  155. }
  156. $request['subOrders']['totalAmount'] = round($request['totalAmount'] - $request['platformAmount'], 2);
  157. $request['subOrders'] = array($request['subOrders']);
  158. }
  159. if (!$openid) {
  160. # 测试的openid
  161. $request['subOpenId'] = 'ofBUV0RUoy_8C4VctZjrSDGzhUfY';
  162. } else {
  163. $request['subOpenId'] = $openid;
  164. }
  165. if ($type == 2) {
  166. # 二维码支付
  167. $request['instMid'] = 'QRPAYDEFAULT';
  168. $request['billNo'] = $request['merOrderId'];
  169. unset($request['merOrderId']);
  170. $result = Base::get_pay_code($request, $this->config);
  171. if (isset($result['billQRCode'])) {
  172. $result['request'] = $request;
  173. $result['payMsg'] = $result['billQRCode'];
  174. if ($other) {
  175. $result['other'] = $other;
  176. }
  177. $this->updateOrderParam($order_id, $result);
  178. return $result['payMsg'];
  179. }
  180. } elseif ($type == 1) {
  181. # 小程序支付
  182. $result = Base::pay($request, $this->config);
  183. if (isset($result['miniPayRequest'])) {
  184. $result['request'] = $request;
  185. $result['payMsg'] = $result['miniPayRequest'];
  186. unset($result['miniPayRequest']);
  187. if ($other) {
  188. $result['other'] = $other;
  189. }
  190. $this->updateOrderParam($order_id, $result);
  191. return $result['payMsg'];
  192. }
  193. } elseif ($type == 4) {
  194. if ($refer) {
  195. $request['returnUrl'] = $refer;
  196. }
  197. $result = Base::h5_pay($request, $this->config);
  198. return $result;
  199. }
  200. return false;
  201. }
  202. # 退款
  203. public function refund($order_id, $cash, $order, $refund_order_id = false)
  204. {
  205. if (isset($this->config['prefix']) && $this->config['prefix']) {
  206. $request['merOrderId'] = $this->config['prefix'] . $order_id;
  207. if ($refund_order_id) {
  208. $request['refundOrderId'] = $this->config['prefix'] . $refund_order_id;
  209. }
  210. } else {
  211. $request['merOrderId'] = $order_id;
  212. if ($refund_order_id) {
  213. $request['refundOrderId'] = $refund_order_id;
  214. }
  215. }
  216. $request['mid'] = $this->config['mid'];
  217. $request['tid'] = $this->config['tid'];
  218. $request['instMid'] = 'MINIDEFAULT';
  219. if (isset($order['param']['targetOrderId'])) {
  220. $request['targetOrderId'] = $order['param']['targetOrderId'];
  221. }
  222. $request['subAppId'] = $this->config['appid'];
  223. $request['requestTimestamp'] = date("Y-m-d H:i:s");
  224. $request['refundAmount'] = round($cash * 100, 2);
  225. if (isset($order['param']['other']) && $order['param']['other']) {
  226. $other = $order['param']['other'];
  227. $other['per'] = $other['per'] && $other['per'] >= 0 ? $other['per'] : 0;
  228. $other['per'] = $other['per']/100;
  229. $request['platformAmount'] = round($request['refundAmount'] * $other['per'], 2);
  230. $request['subOrders'] = array();
  231. $request['subOrders']['mid'] = $other['mid'];
  232. if (isset($this->config['prefix']) && $this->config['prefix']) {
  233. $request['subOrders']['merOrderId'] = $this->config['prefix'] . $other['order_id'];
  234. if ($refund_order_id) {
  235. $request['subOrders']['refundOrderId'] = $this->config['prefix'] . $refund_order_id;
  236. }
  237. } else {
  238. $request['subOrders']['merOrderId'] = $other['order_id'];
  239. if ($refund_order_id) {
  240. $request['subOrders']['refundOrderId'] = $refund_order_id;
  241. }
  242. }
  243. $request['subOrders']['totalAmount'] = round($request['refundAmount'] - $request['platformAmount'], 2);
  244. $request['subOrders'] = array($request['subOrders']);
  245. }
  246. $account = Dever::db('pay/account')->find($order['account_id']);
  247. $method = 'refund';
  248. if ($account && $account['system_source'] == 4) {
  249. $method = 'code_refund';
  250. $request['billNo'] = $request['merOrderId'];
  251. $request['instMid'] = 'QRPAYDEFAULT';
  252. $request['billDate'] = date('Y-m-d');
  253. }
  254. $result = Base::$method($request, $this->config);
  255. if (isset($result['refundStatus']) && $result['refundStatus'] == 'SUCCESS') {
  256. return true;
  257. }
  258. return false;
  259. }
  260. # 查询
  261. public function query($order_id)
  262. {
  263. $request['merOrderId'] = $order_id;
  264. $request['mid'] = $this->config['mchid'];
  265. $request['tid'] = $this->config['key'];
  266. $request['instMid'] = 'MINIDEFAULT';
  267. $request['requestTimestamp'] = date("Y-m-d H:i:s");
  268. $result = Base::refund($request, $this->config);
  269. return $result;
  270. }
  271. # 关闭订单
  272. public function close($order_id)
  273. {
  274. $request['merOrderId'] = $order_id;
  275. $request['mid'] = $this->config['mchid'];
  276. $request['tid'] = $this->config['key'];
  277. $request['instMid'] = 'MINIDEFAULT';
  278. $request['requestTimestamp'] = date("Y-m-d H:i:s");
  279. $result = Base::close($request, $this->config);
  280. return $result;
  281. }
  282. /**
  283. * 获取二维码支付
  284. */
  285. public function qrcode($order, $refer)
  286. {
  287. $result['type'] = 'qrcode';
  288. $result['url'] = $order;
  289. return $result;
  290. }
  291. /**
  292. * 获取小程序支付
  293. */
  294. public function applet($order)
  295. {
  296. $result = array();
  297. if (isset($order['package'])) {
  298. $prepay_id = str_replace('prepay_id=', '', $order['package']);
  299. $result['time'] = $order['timeStamp'];
  300. $result['nonce_str'] = $order['nonceStr'];
  301. $result['prepay_id'] = $prepay_id;
  302. $result['sign_type'] = $order['signType'];
  303. $result['sign'] = $order['paySign'];
  304. $result['type'] = 'applet';
  305. }
  306. return $result;
  307. }
  308. /**
  309. * 获取页面支付 去收银台
  310. */
  311. public function page($order, $refer)
  312. {
  313. return $order;
  314. }
  315. }
  316. class Base
  317. {
  318. static $test_host = 'https://test-api-open.chinaums.com/';
  319. static $host = 'https://api-mop.chinaums.com/';
  320. static $signMethod = 'SHA256'; //签名方式
  321. # 获取token
  322. static $token_url = 'v1/token/access';
  323. # 微信下单支付
  324. static $pay_wechat_url = 'v1/netpay/wx/unified-order';
  325. # 支付宝下单支付
  326. static $pay_alipay_url = 'v1/netpay/trade/create';
  327. # 云闪付下单支付
  328. static $pay_uac_url = 'v1/netpay/uac/mini-order';
  329. # 交易查询
  330. static $query_url = 'v1/netpay/query';
  331. # 退款
  332. static $refund_url = 'v1/netpay/refund';
  333. # 退款查询
  334. static $refund_query_url = 'v1/netpay/refund-query';
  335. # 订单关闭
  336. static $close_url = 'v1/netpay/close';
  337. # 二维码支付
  338. static $qrcode_url = 'v1/netpay/bills/get-qrcode';
  339. # 二维码支付退款
  340. static $qrcode_refund_url = 'v1/netpay/bills/refund';
  341. # h5支付
  342. static $h5_url = 'v1/netpay/webpay/pay';
  343. # h5支付退款
  344. static $h5_refund_url = 'v1/netpay/wx/app-pre-order';
  345. //===================== 支付相关 ==============================
  346. /**
  347. * 支付交易
  348. */
  349. static public function pay($param, $config)
  350. {
  351. $url = self::$pay_wechat_url;
  352. $result = self::get($url, $param, $config);
  353. return $result;
  354. }
  355. /**
  356. * h5支付
  357. */
  358. static public function h5_pay($param, $config)
  359. {
  360. $url = self::$h5_url;
  361. $result = self::get($url, $param, $config);
  362. return $result;
  363. }
  364. /**
  365. * 获取支付二维码
  366. */
  367. static public function get_pay_code($param, $config)
  368. {
  369. $url = self::$qrcode_url;
  370. $result = self::get($url, $param, $config);
  371. return $result;
  372. }
  373. /**
  374. * 二维码交易退款
  375. */
  376. static public function code_refund($param, $config)
  377. {
  378. $url = self::$qrcode_refund_url;
  379. $result = self::get($url, $param, $config);
  380. return $result;
  381. }
  382. /**
  383. * 支付撤销
  384. */
  385. static public function close()
  386. {
  387. $url = self::$close_url;
  388. $result = self::get($url, $param, $config);
  389. return $result;
  390. }
  391. /**
  392. * 交易退款
  393. */
  394. static public function refund($param, $config)
  395. {
  396. $url = self::$refund_url;
  397. $result = self::get($url, $param, $config, false);
  398. return $result;
  399. }
  400. /**
  401. * 交易查询
  402. */
  403. static public function query()
  404. {
  405. $url = self::$query_url;
  406. $result = self::get($url, $param, $config);
  407. return $result;
  408. }
  409. /**
  410. * 交易退款查询
  411. */
  412. static public function refundQuery()
  413. {
  414. $url = self::$refund_query_url;
  415. $result = self::get($url, $param, $config);
  416. return $result;
  417. }
  418. //====================== 获取调用凭证===========================
  419. /**
  420. * 通用调用凭证获取
  421. * 默认使用token方式,使用签名方式需要传入参数
  422. */
  423. static public function getAuth($type = 'token', $param, $config)
  424. {
  425. if ($type === 'token') {
  426. return self::getAccessTokenByToken($config);
  427. } elseif ($type === 'form') {
  428. return self::getAccessTokenByForm($param, $config);
  429. }
  430. return self::getAccessTokenBySig($param, $config);
  431. }
  432. /**
  433. * 方式一,OPEN-ACCESS-TOKEN方式
  434. */
  435. static function getAccessTokenByToken($config)
  436. {
  437. $param = [
  438. 'appId' => $config['appid'],
  439. 'timestamp' => date('YmdHis'),
  440. 'nonce' => md5(uniqid(microtime(true),true)),
  441. 'signMethod' => self::$signMethod,
  442. ];
  443. $param['signature'] = self::signature($param, $config['appsecret']);
  444. $result = self::get(self::$token_url, $param, $config);
  445. if (isset($result['errCode']) && isset($result['accessToken'])) {
  446. return 'OPEN-ACCESS-TOKEN AccessToken='.$result['accessToken'];
  447. }
  448. return '';
  449. }
  450. /**
  451. * 方式二,OPEN-BODY-SIG方式
  452. */
  453. static function getAccessTokenBySig($data, $config)
  454. {
  455. $param = [
  456. 'AppId' => $config['appid'],
  457. 'Timestamp' => date('YmdHis'),
  458. 'Nonce' => md5(uniqid(microtime(true),true))
  459. ];
  460. return 'OPEN-BODY-SIG AppId="'.$param['AppId'].'", Timestamp="'.$param['Timestamp'].'", Nonce="'.$param['Nonce'].'", Signature="'.self::signature2($data, $param, $config['appsecret']).'"';
  461. }
  462. /**
  463. * 方式三,OPEN-FORM-PARAM方式
  464. */
  465. static function getAccessTokenByForm($data, $config)
  466. {
  467. $content = Dever::json_encode($data);
  468. $param = [
  469. 'appId' => $config['appid'],
  470. 'timestamp' => date('YmdHis'),
  471. 'nonce' => md5(uniqid(microtime(true),true)),
  472. 'authorization' => 'OPEN-FORM-PARAM',
  473. 'content' => $content,
  474. ];
  475. $param['signature'] = urlencode(self::signature3($param, $config['appsecret']));
  476. $param['content'] = urlencode($param['content']);
  477. return $param;
  478. }
  479. /**
  480. * 计算签名,方式一
  481. */
  482. static function signature($param, $appsecret)
  483. {
  484. return bin2hex(hash(self::$signMethod, $param['appId'].$param['timestamp'].$param['nonce'].$appsecret, true));
  485. }
  486. /**
  487. * 计算签名,方式二
  488. */
  489. static function signature2($data, $param, $appsecret)
  490. {
  491. $str = bin2hex(hash('sha256', Dever::json_encode($data), true));
  492. return base64_encode(hash_hmac('sha256', $param['AppId'].$param['Timestamp'].$param['Nonce'].$str, $appsecret, true));
  493. }
  494. /**
  495. * 计算签名,方式三
  496. */
  497. static function signature3($param, $appsecret)
  498. {
  499. $str = bin2hex(hash('sha256', $param['content'], true));
  500. return base64_encode(hash_hmac('sha256', $param['appId'].$param['timestamp'].$param['nonce'].$str, $appsecret, true));
  501. }
  502. /**
  503. * 获取信息
  504. */
  505. static function get($url, $param, $config, $state = true)
  506. {
  507. $url = $config['box'] == 1 ? self::$host . $url : self::$test_host . $url;
  508. if (strstr($url, 'webpay')) {
  509. $url .= '?';
  510. $param = self::getAuth('form', $param, $config);
  511. foreach ($param as $k => $v) {
  512. $url .= '&' . $k . '=' . $v;
  513. }
  514. $url = str_replace('?&', '?', $url);
  515. return $url;
  516. } else {
  517. $header = array();
  518. $header['Authorization'] = self::getAuth('sig', $param, $config);
  519. $result = Dever::curl($url, $param, 'post', true, $header);
  520. }
  521. if (strstr($result, '<html><head>')) {
  522. Dever::alert('系统错误');
  523. }
  524. $result = Dever::json_decode($result);
  525. if (isset($result['errCode'])) {
  526. if (!$state) {
  527. return $result;
  528. }
  529. if ($result['errCode'] == '0000' || $result['errCode'] == 'SUCCESS') {
  530. return $result;
  531. } elseif (isset($result['errInfo'])) {
  532. Dever::alert('操作失败,请联系管理员');
  533. Dever::alert($result['errInfo']);
  534. } elseif (isset($result['errMsg'])) {
  535. Dever::alert('操作失败,请联系管理员');
  536. Dever::alert($result['errMsg']);
  537. }
  538. } else {
  539. Dever::alert('系统错误');
  540. }
  541. return $result;
  542. }
  543. }