TestRefill.php 140 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. use const mtopcard\ProvinceList;
  4. define('APP_ID', 'test');
  5. define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
  6. require_once(BASE_ROOT_PATH . '/global.php');
  7. require_once(BASE_CORE_PATH . '/lrlz.php');
  8. require_once(BASE_ROOT_PATH . '/fooder.php');
  9. require_once(BASE_CORE_PATH . '/framework/function/http.php');
  10. require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
  11. require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
  12. const LocalTest = 1;
  13. const NetTest = 2;
  14. const CurrentTest = NetTest;
  15. class TestRefill extends TestCase
  16. {
  17. private $mReqHost;
  18. private $mKey;
  19. private $mMchid;
  20. public function __construct(?string $name = null, array $data = [], $dataName = '')
  21. {
  22. parent::__construct($name, $data, $dataName);
  23. if (CurrentTest == LocalTest) {
  24. $this->mReqHost = BASE_SITE_URL;
  25. $this->mMchid = 1;
  26. $this->mKey = '1ff02223b771c0414468c8892151c602';
  27. } else {
  28. $this->mReqHost = 'https://www.xyzshops.cn';
  29. // $this->mReqHost = 'http://121.89.196.45';
  30. $this->mMchid = 1092;
  31. $this->mKey = '210fe406954220f56085997d6a4c5b80';
  32. }
  33. }
  34. public static function setUpBeforeClass(): void
  35. {
  36. Base::run_util();
  37. refill\RefillFactory::instance();
  38. }
  39. public function testMerchantPrice()
  40. {
  41. $price = new refill\merchant_price();
  42. }
  43. public function testCallBack()
  44. {
  45. $params = [
  46. "mchid" => 10193,
  47. "order_sn" => 'open1632462013152110599086',
  48. "amount" => '100.0000',//intval($refill_info['refill_amount'] + 0.05),
  49. "cardno" => 18505101761,
  50. "trade_no" => '4034130685806092699201',
  51. "idcard" => $refill_info['idcard'] ?? "",
  52. "card_name" => $refill_info['card_name'] ?? "",
  53. 'official_sn' => '110103353072109241341340249560',
  54. 'message' => '',
  55. "state" => 'SUCCESS'
  56. ];
  57. $params['sign'] = $this->md5_sign($params, '0a845c18fbefaa121f36169ab8c880f3');
  58. $notify_url = 'http://v3.biyingniao.com/web/yezi/v2/straight_url?from=equityOpen';
  59. $resp = http_request($notify_url, $params, 'POST');
  60. }
  61. public function testFactory()
  62. {
  63. $provider = refill\RefillFactory::instance();
  64. }
  65. private function make_sn()
  66. {
  67. return mt_rand(1000, 9999)
  68. . sprintf('%010d', time())
  69. . sprintf('%06d', (float)microtime() * 1000000);
  70. }
  71. public function testRandomMobile()
  72. {
  73. $no = "1" . mt_rand(1, 9999999999);
  74. Log::record("phone no={$no}", Log::DEBUG);
  75. }
  76. public function testBJBAddPhone()
  77. {
  78. $provider = new refill\bjb\RefillPhone([]);
  79. for ($i = 3; $i > 0; --$i) {
  80. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  81. $resp = $provider->add(18500608333, 4, 10, ['order_sn' => $this->make_sn()]);
  82. $resp = $provider->add(18510683168, 4, 10, ['order_sn' => $this->make_sn()]);
  83. $resp = $provider->add(18513846008, 4, 10, ['order_sn' => $this->make_sn()]);
  84. $resp = $provider->add(18518237398, 4, 10, ['order_sn' => $this->make_sn()]);
  85. }
  86. }
  87. public function testOilticket()
  88. {
  89. $provider = new refill\bjb\RefillPhone([]);
  90. }
  91. public function testBjbRet()
  92. {
  93. $resp = '0|提交成功|14936.8600';
  94. $resp = explode('|', $resp);
  95. }
  96. public function testIpWhiteList()
  97. {
  98. $x = serialize(['47.99.57.105']);
  99. $ips = unserialize('a:1:{i:0;s:12:"47.99.57.105";}');
  100. if (!empty($ips)) {
  101. $addr = '47.99.57.105';
  102. Log::record("request ip:{$addr}", Log::DEBUG);
  103. if (!in_array($addr, $ips)) {
  104. throw new Exception("请求地址不在白名单中");
  105. }
  106. }
  107. }
  108. public function testBaizePhone()
  109. {
  110. $provider = new refill\baizeyd\RefillPhone([]);
  111. // $resp = $provider->add(17801048874, 5, 10, ['order_sn' => $this->make_sn()]);
  112. $resp = $provider->query(['order_sn' => '930668700375312006']);
  113. // $str = 'amount=10.00&orderId=720668384771999671&phone=13911129867&payTime=2021-03-06+22%3A26%3A12&sign=94dfe83221f7768650e70cce08879b60&appKey=uECmTOFAY6RPCTtI&payUrl=&statusDes=%E6%94%AF%E4%BB%98%E5%A4%B1%E8%B4%A5&status=7';
  114. // $input = $this->parse_request($str);
  115. // $input['amount'] = 10.00;
  116. // $input['orderId'] = '92391614943913061206';
  117. // $input['phone'] = 17801048874;
  118. // $input['payTime'] = '2021-03-05 19:31:55';
  119. // $input['sign'] = 'bef6ae50319fb1e8cb3f21302f0abef8';
  120. // $input['appKey'] = 'uECmTOFAY6RPCTtI';
  121. // $input['payUrl'] = '';
  122. // $input['statusDes'] = '支付失败';
  123. // $input['status'] = 7;
  124. // refill\RefillFactory::instance()->notify('baizeyd',$input);
  125. }
  126. private function parse_request($squery)
  127. {
  128. if (empty($squery)) return [];
  129. $result = [];
  130. $params = preg_split('/&/', $squery);
  131. foreach ($params as $pair) {
  132. if (empty($pair)) continue;
  133. $kv = explode('=', $pair);
  134. $count = count($kv);
  135. if ($count === 1) {
  136. $key = $kv[0];
  137. $val = "";
  138. } elseif ($count === 2) {
  139. $key = $kv[0];
  140. $val = urldecode($kv[1]);
  141. } else {
  142. continue;
  143. }
  144. if (!empty($key)) {
  145. $result[$key] = $val;
  146. }
  147. }
  148. return $result;
  149. }
  150. public function testAmPhone()
  151. {
  152. // $provider = new refill\aming\RefillPhone([]);
  153. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  154. $input['result'] = 'fail';
  155. $input['msg'] = 0;
  156. $input['order'] = 'null';
  157. $input['phone_no'] = 18500608333;
  158. $input['sign'] = 'c925ad19c63c3eb36ffc52d938e24604';
  159. $input['amount'] = '10.00';
  160. $input['op_no'] = '42601615096072517841';
  161. refill\RefillFactory::instance()->notify('aming', $input);
  162. }
  163. public function testBhcPhone()
  164. {
  165. $provider = new refill\binghc\RefillPhone([]);
  166. $resp = $provider->query(['order_sn' => 250668618955902006]);
  167. // $input['result'] = 'fail';
  168. // $input['msg'] = 0;
  169. // $input['order'] = 'null';
  170. // $input['phone_no'] = 18500608333;
  171. // $input['sign'] = 'c3aa38ee07cd1b69bfd5ead56f6da8d6';
  172. // $input['amount'] = '10.00';
  173. // $input['op_no'] = '24061615096361999002';
  174. // refill\RefillFactory::instance()->notify('binghc',$input);
  175. }
  176. public function testRuishunPhone()
  177. {
  178. // $provider = new refill\ruishun\RefillPhone([]);
  179. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  180. $input['result'] = 'fail';
  181. $input['msg'] = 0;
  182. $input['order'] = null;
  183. $input['phone_no'] = 18500608333;
  184. $input['sign'] = 'e234f7d1c0458ca236f53a0008436b46';
  185. $input['amount'] = "10.00";
  186. $input['op_no'] = '76361615095403188513';
  187. refill\RefillFactory::instance()->notify('ruishun', $input);
  188. }
  189. public function testWuchenPhone()
  190. {
  191. $provider = new refill\wuchen\RefillPhone([]);
  192. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  193. $resp = $provider->query(['order_sn' => '790668630498425006']);
  194. // $input['app_id'] = '70016';
  195. // $input['message'] = 'fail';
  196. // $input['order_sn'] = '43101615277293035501';
  197. // $input['platform_order_id'] = '';
  198. // $input['sign'] = '5ea59f8ac51a518f2c622824d7db2a04';
  199. // $input['state'] = "fail";
  200. // $input['sys_sn'] = '202103091608231836913889';
  201. // $input['timestamp'] = '1615277361';
  202. // refill\RefillFactory::instance()->notify('wuchen',$input);
  203. }
  204. public function testYibaoPhone()
  205. {
  206. $provider = new refill\yibao\RefillPhone([]);
  207. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  208. $resp = $provider->query(['ch_trade_no' => '31215002972142736']);
  209. // $str = '{"amount":"30","carrierOrderNo":null,"mobile":"13699279618","orderNo":"27961615532426088043","orderStatus":3,"sign":"012BA0B093A0473D7DD1634A8356DCB1","tradeNo":"31215002972142736"}';
  210. // $data = json_decode($str,true);
  211. // refill\RefillFactory::instance()->notify('yibao',$data);
  212. }
  213. public function testAmingydPhone()
  214. {
  215. $provider = new refill\amingyd\RefillPhone([]);
  216. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  217. $resp = $provider->query(['order_sn' => '15421615627436792938']);
  218. // $str = '{"orderId":"15421615627436792938","amount":3000,"appKey":"40695059","timestamp":1615627503,"status":3,"operatorId":"508353854027968617","sign":"2A0562319ED4845AB9E3812A58F0B425"}';
  219. // $data = json_decode($str,true);
  220. // refill\RefillFactory::instance()->notify('amingyd',$data);
  221. }
  222. public function testChukaPhone()
  223. {
  224. $provider = new refill\chuka\RefillPhone([]);
  225. // $resp = $provider->add('18500608333', 5, 20, ['order_sn' => $this->make_sn()]);
  226. // $resp = $provider->query(['order_sn' => '92161616314884175179']);
  227. $params['customerId'] = '101787';
  228. $params['orderno'] = 'C1616314888506705492';
  229. $params['tmporder'] = '92161616314884175179';
  230. $params['code'] = '1';
  231. $params['number'] = '18500608333';
  232. $params['money'] = '20';
  233. $params['amount'] = '0';
  234. refill\RefillFactory::instance()->notify('chuka', $params);
  235. }
  236. public function testLegouPhone()
  237. {
  238. $provider = new refill\legou\RefillPhone([]);
  239. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '200649600557718881' , 'order_id' => 247 , 'buyer_id' => 52667]);
  240. $resp = $provider->query(['order_sn' => '200649600557718881', 'order_id' => 247]);
  241. $params['username'] = 'lzdc';
  242. $params['orderNumber'] = '690653407667699667';
  243. $params['cardNumber'] = '18500608333';
  244. $params['orderMoney'] = '30.0';
  245. $params['orderPay'] = '1.0';
  246. $params['resultCode'] = '2';
  247. $params['rechargeDesc'] = '{"rechargeStatus":600200,"rechargeDesc":"充值成功"}';
  248. $params['rechargeVoucher'] = '100407307092103291444050244599';
  249. $params['sign'] = 'c054884422a8c3749cbfda0e82b9af70';
  250. // refill\RefillFactory::instance()->notify('legou',$params);
  251. }
  252. public function testFeinimoshu()
  253. {
  254. $provider = new refill\feinimoshu\RefillOil([]);
  255. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  256. $resp = $provider->balance();
  257. }
  258. public function testFeinimoshu_hf()
  259. {
  260. $provider = new refill\feinimoshu_hf\RefillPhone([]);
  261. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  262. $resp = $provider->balance();
  263. }
  264. public function testFeiniaoPhone()
  265. {
  266. $provider = new refill\feiniao\RefillPhone([]);
  267. // $order_sn = $this->make_sn();
  268. // Log::record($order_sn, Log::DEBUG);
  269. // $resp = $provider->add('13699279618', 4, 50, ['order_sn' => $order_sn]);
  270. $resp = $provider->query(['order_sn' => '28641617178590981824']);
  271. $params['result'] = 'fail';
  272. $params['msg'] = '0';
  273. $params['order'] = 'null';
  274. $params['phone_no'] = '18500608333';
  275. $params['amount'] = '100.00';
  276. $params['op_no'] = '64591617090761169983';
  277. $params['settle'] = '0';
  278. $params['sign'] = '907d2640f96e8d78d59202d090ddb470';
  279. // refill\RefillFactory::instance()->notify('feiniao',$params);
  280. }
  281. public function testTongyPhone()
  282. {
  283. $provider = new refill\tongy\RefillPhone([]);
  284. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '690653407667699667', 'order_id' => 248, 'buyer_id' => 52667]);
  285. // $params['UserId'] = '100857';
  286. // $params['ShopId'] = '300000';
  287. // $params['SysOrderId'] = '21070215141210085700010';
  288. // $params['OrderId'] = '9241650678554051429291';
  289. // $params['State'] = '5';
  290. // $params['Timestamp'] = '1625210740472';
  291. // $params['sign'] = 'C5C4E888A3B678470071CDA6DC31719D';
  292. // $params['ParValue'] = '100.0000';
  293. // $params['VoucherType'] = '';
  294. // $params['VoucherContent'] = '';
  295. // $params['CreateTime'] = '2021-07-02 15:14:12';
  296. // $params['CompleteTime'] = '2021-07-02 15:25:40';
  297. // refill\RefillFactory::instance()->notify('tongy',$params);
  298. $resp = $provider->balance();
  299. }
  300. public function testWeiyiPhone()
  301. {
  302. $provider = new refill\weiyi\RefillPhone([]);
  303. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  304. // $resp = $provider->query(['order_sn' => '90401621489214002876']);
  305. $body = '{"userid":"1f68bb3452134a6cbaa4","ordernum":"90401621489214002876","mobile":"13699279618","timestamp":"20210520134039","state":"2","desc":"%E5%85%85%E5%80%BC%E6%88%90%E5%8A%9F","sign":"865e8d886b92e019df1d039fccf8df46"}';
  306. $params = json_decode($body, true);
  307. refill\RefillFactory::instance()->notify('weiyi', $params);
  308. }
  309. public function testWeiyimanPhone()
  310. {
  311. $provider = new refill\weiyiman\RefillPhone([]);
  312. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  313. // $resp = $provider->query(['order_sn' => '47591620898269370373']);
  314. $data = '{"userid":"46dbb0c992644da881d0","ordernum":"47591620898269370373","mobile":"18500608333","timestamp":"20210513211050","state":"2","desc":"%E5%85%85%E5%80%BC%E6%88%90%E5%8A%9F","serialno":"173313182872","sign":"e9d2ea85b43808d1587793ae329cdb0b"}';
  315. $params = json_decode($data, true);
  316. refill\RefillFactory::instance()->notify('weiyiman', $params);
  317. }
  318. public function testWeiyiWtPhone()
  319. {
  320. $provider = new refill\weiyiwt\RefillPhone([]);
  321. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  322. // $resp = $provider->query(['order_sn' => '38451621924366009924']);
  323. $body = '{"szOrderId":"38451621924366009924","fSalePrice":"47.25","szAgentId":"200016","nFlag":"2","szVerifyString":"a0b5bfc0bbf6c121a4cd74d9ecb2427d","szPhoneNum":"18074608795","szRtnMsg":"1000000083421052514441119833","nDemo":"50"}';
  324. $params = json_decode($body, true);
  325. refill\RefillFactory::instance()->notify('weiyiwt', $params);
  326. }
  327. public function testXiaochuangPhone()
  328. {
  329. $provider = new refill\xiaochuang\RefillPhone([]);
  330. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  331. // $resp = $provider->query(['order_sn' => '84891623028826872085']);
  332. // $body = '{"fail_msg":"","order_sn":"84891623028826872085","order_status":"4","p_order_sn":"2021060709203558011797441162","sign":"E842203C3CA48E924D60B1B56AB93C3B"}';
  333. // $params = json_decode($body , true);
  334. // refill\RefillFactory::instance()->notify('xiaochuang',$params);
  335. $resp = $provider->balance();
  336. }
  337. public function testYintengPhone()
  338. {
  339. $provider = new refill\yinteng\RefillPhone([]);
  340. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  341. // $resp = $provider->query(['order_sn' => '49631623737966351874']);
  342. // $data = '{"szOrderId":"49631623737966351874","fSalePrice":"47.35","szAgentId":"200009","nFlag":"2","szVerifyString":"01c5fafb1d67175f0533b69a762286e8","szPhoneNum":"18074608795","szRtnMsg":"1000000083421061514495400262","nDemo":"50"}';
  343. // $params = json_decode($data , true);
  344. // refill\RefillFactory::instance()->notify('yinteng',$params);
  345. $resp = $provider->balance();
  346. }
  347. public function testMoxjPhone()
  348. {
  349. $provider = new refill\moxj\RefillPhone([]);
  350. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  351. $resp = $provider->query(['order_sn' => '91131623906171663147']);
  352. $data = '{"result":"fail","msg":"0","order":"null","phone_no":"18500608333","amount":"50.0","op_no":"84901623900668776864","sign":"896b54914a07b814573d7f6cc403848a"}';
  353. $params = json_decode($data, true);
  354. // refill\RefillFactory::instance()->notify('moxj',$params);
  355. }
  356. public function testMoxj_fsPhone()
  357. {
  358. $provider = new refill\moxj_fs\RefillPhone([]);
  359. // $resp = $provider->add(15139608757, 4, 100, ['order_sn' => $this->make_sn()]);
  360. // $resp = $provider->query(['order_sn' => '42741624242693157165']);
  361. // $data = '{"amount":"100","charge_type":"2","code":"1","partner_id":"58","phone":"15139608757","sign":"30d193dba4101e50851ed0efabb75fb1","partner_order_no":"42741624242693157165","official_order_id":"20210621103211948830"}';
  362. // $params = json_decode($data , true);
  363. // refill\RefillFactory::instance()->notify('moxj_fs',$params);
  364. $resp = $provider->balance();
  365. }
  366. public function testZanzanquickPhone()
  367. {
  368. $provider = new refill\zanzanquick\RefillPhone([]);
  369. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  370. // $resp = $provider->query(['order_sn' => '90831623925322675223']);
  371. // $data = '{"userid":"d845a4635f7e47668f5e","ordernum":"90831623925322675223","mobile":"18500608333","timestamp":"20210617182545","state":"2","desc":"%E5%85%85%E5%80%BC%E6%88%90%E5%8A%9F","serialno":"110103307232106171824530567108","sign":"0152c723f25be19f21d723e24b2c8987"}';
  372. // $params = json_decode($data , true);
  373. // refill\RefillFactory::instance()->notify('zanzanquick',$params);
  374. $resp = $provider->balance();
  375. }
  376. public function testFengyemanPhone()
  377. {
  378. $provider = new refill\fengyeman\RefillPhone([]);
  379. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  380. // $resp = $provider->query(['order_sn' => '46221624265179185139']);
  381. // $data = '{"order_id":"46221624265179185139","mchid":"HF67a65_10008","tel":"18500608333","price":"50.00","sign":"2bb4ed5edc97ba7f60cf3848aab82cf4","out_order_id":"206877995456","status":"1"}';
  382. // $params = json_decode($data , true);
  383. // refill\RefillFactory::instance()->notify('fengyeman',$params);
  384. $resp = $provider->balance();
  385. }
  386. public function testMoxj_ydPhone()
  387. {
  388. $provider = new refill\moxj_yd\RefillPhone([]);
  389. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  390. // $resp = $provider->query(['order_sn' => '52101624413125875436']);
  391. // $data = '{"customer_order_no":"47651624412877257722","status":1,"merchant_id":"76505818","sign":"c185a0f2152b3ac3ee3f29009dec5a6b"}';
  392. // $params = json_decode($data , true);
  393. // refill\RefillFactory::instance()->notify('moxj_yd',$params);
  394. $resp = $provider->balance();
  395. }
  396. public function testXingzyPhone()
  397. {
  398. $provider = new refill\xingzy\RefillPhone([]);
  399. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  400. // $resp = $provider->query(['order_sn' => '76791624441423287373', 'ch_trade_no' => '210623174333941000']);
  401. // $data = '{"access_key":"211394702","code":3,"data":{"sellprice":26.7,"phone":"18500608333","pass":null,"official_id":null,"official_ch":null},"orderid":210623173427222000,"out_trade_no":"40441624440876653628","sign":"E1g7uHAaJI056jb1fK1DQztkpN4=","timestamp":1624441437918}';
  402. // $params = json_decode($data , true);
  403. // refill\RefillFactory::instance()->notify('xingzy',$params);
  404. $resp = $provider->balance();
  405. }
  406. public function testYuanmaiPhone()
  407. {
  408. $provider = new refill\yuanmai\RefillPhone([]);
  409. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  410. // $resp = $provider->query(['order_sn' => '24231624865882625203', 'ch_trade_no' => '210623174333941000']);
  411. // $data = '{"orderid":"24231624865882625203","status":"2","ordermoney":"50","sign":"94be5b1754ffcc7f0fe1551072146941","spsno":""}';
  412. // $params = json_decode($data, true);
  413. // refill\RefillFactory::instance()->notify('yuanmai',$params);
  414. $resp = $provider->balance();
  415. }
  416. public function testLangkePhone()
  417. {
  418. $provider = new refill\langke\RefillPhone([]);
  419. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  420. $resp = $provider->query(['order_sn' => '29461624952660047520', 'ch_trade_no' => '210623174333941000']);
  421. $data = '{"channelsort":"PHONE_BILL","channelno":"2021062922001123211428063487","onlystr":"29461624952660047520","channel":"TM","sign":"8aedceac4ce4d897f1f06977a9094371","amt":"50","notifyurl":"https:\/\/www.xyzshops.cn\/mobile\/signature.php","cardtype":"","cardno":"","orgid":"7532391600","account":"13699279618","status":"2"}';
  422. $params = json_decode($data, true);
  423. // refill\RefillFactory::instance()->notify('langke',$params);
  424. }
  425. public function testYunlingdsPhone()
  426. {
  427. $provider = new refill\yunlingds\RefillPhone([]);
  428. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  429. // $resp = $provider->query(['order_sn' => '85351624961920020593']);
  430. // $data = '{"orderid":"OWS21062918188862392","sporderid":"85351624961920020593","userid":"10002623","merchantsubmittime":"20210629181929","resultno":"1","parvalue":"30","remark1":"AW20210629181906yRAvM","payno":"AW20210629181906yRAvM","fundbalance":"-28.59","sign":"11369509ADCF2A2612B3531A15049BDD"}';
  431. // $params = json_decode($data, true);
  432. // refill\RefillFactory::instance()->notify('yunlingds',$params);
  433. $resp = $provider->balance();
  434. }
  435. public function testLingzhmanPhone()
  436. {
  437. $provider = new refill\lingzhman\RefillPhone([]);
  438. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  439. // $resp = $provider->query(['order_sn' => '29771625215707976538']);
  440. // $data = '{"orderNo":"F2107021536431562574","status":"019","consumerNo":"60191625211393862930","voucherNo":null,"mobile":"18500608333"}';
  441. // $params = json_decode($data, true);
  442. // refill\RefillFactory::instance()->notify('lingzhman',$params);
  443. $resp = $provider->balance();
  444. }
  445. public function testQijutangPhone()
  446. {
  447. $provider = new refill\qijutang\RefillPhone([]);
  448. // for ($i=1;$i<2;$i++) {
  449. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  450. // }
  451. // $resp = $provider->query(['order_sn' => '51501625218912512231']);
  452. // $data = '{"szOrderId":"51501625218912512231","fSalePrice":"28.44","szAgentId":"200010","nFlag":"3","szVerifyString":"20cf16c6bb239e2a703d0bf3e5ef2d5a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  453. // $params = json_decode($data, true);
  454. // refill\RefillFactory::instance()->notify('qijutang',$params);
  455. $resp = $provider->balance();
  456. }
  457. public function testLingzhman48Phone()
  458. {
  459. $provider = new refill\lingzhman48\RefillPhone([]);
  460. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  461. // $resp = $provider->query(['order_sn' => '49951625814151937287']);
  462. $data = '{"orderNo":"F2107091503134670764","status":"020","consumerNo":"49951625814151937287","voucherNo":null,"mobile":"18500608333"}';
  463. $params = json_decode($data, true);
  464. refill\RefillFactory::instance()->notify('lingzhman48', $params);
  465. }
  466. public function testcangbuPhone()
  467. {
  468. $provider = $this->getProvider('cangbu');
  469. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  470. $resp = $provider->query(['order_sn' => '4024880687558152076462']);
  471. // $data = '{"customerId":"112","tmporder":"35041626071052333060","orderno":"s16260710607417944801112","number":"18500608333","money":"100","amount":"94.9000","code":"1","cardno":"","voucher":"110103307042107121424210550266","sign":"de463c3d389a4afe4a2c58257972121a"}';
  472. // $params = json_decode($data, true);
  473. // refill\RefillFactory::instance()->notify('cangbu',$params);
  474. $resp = $provider->balance();
  475. }
  476. public function testCangbukami()
  477. {
  478. $provider = new refill\cangbukami\RefillPhone([]);
  479. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  480. $resp = $provider->query(['order_sn' => '23231627380108954478']);
  481. }
  482. public function testTongykamiPhone()
  483. {
  484. $provider = new refill\tongykami\RefillPhone([]);
  485. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  486. $resp = $provider->query(['order_sn' => '26961626077050756648']);
  487. $data = '{"UserId":"100903","ShopId":"300000","SysOrderId":"21071216040810090300001","OrderId":"26961626077050756648","State":"4","Timestamp":"1626077052399","sign":"536A0D93B0869FC4FFDF055AFB8083FE","ParValue":"20.0000","VoucherType":"5","VoucherContent":"982100214176457","CreateTime":"2021-07-12 16:04:08","CompleteTime":"2021-07-12 16:04:12"}';
  488. $params = json_decode($data, true);
  489. // refill\RefillFactory::instance()->notify('tongykami',$params);
  490. }
  491. public function testTongluPhone()
  492. {
  493. $provider = new refill\tonglu\RefillPhone([]);
  494. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  495. $resp = $provider->query(['order_sn' => '22961616468561936356']);
  496. // $body = '{"order_no":"22961616468561936356","order_status":"5","phone_no":"18500608333","amount":5000,"time_paid":1616468856287,"order_cert_no":"","paid":false,"order_id":"20210323966497008"}';
  497. // $sign = '9E41F52F612D60EBB654B3A5D1E2F1E5';
  498. // $params = json_decode($body , true);
  499. // $params['sign'] = $sign;
  500. // refill\RefillFactory::instance()->notify('tonglu',$params);
  501. }
  502. public function testSialan()
  503. {
  504. $provider = $this->getProvider('sialan');
  505. // $resp = $provider->balance();
  506. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  507. $resp = $provider->query(['ch_trade_no' => '21112214053736552180705']);
  508. // $body = '{"api_id":"16855","recharge":"18500608333","amount":"10","order_sn":"21112213553615606755893","query_sn":"29151637560521755792","operator_sn":"","status":"2","sign":"32867363957ed9688b8bbdd8f42c08eb"}';
  509. // $params = json_decode($body, true);
  510. // $provider = $this->getProvider('sialan', 'RefillCallBack');
  511. // $ret = $provider->verify($params);
  512. // $resp = $provider->notify($params);
  513. }
  514. public function testMoxj_new()
  515. {
  516. $provider = new refill\moxj_new\RefillPhone([]);
  517. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  518. // $resp = $provider->query(['order_sn' => '33301627887529587739', 'card_no' => 13699279618]);
  519. // $body = '{"code":"2101","official_order_no":"0","partner_no":"300459017","partner_order_no":"33301627887529587739","phone":"18500608333","amount":"30","isp":"cucc","charge_time":"0","sign":"A512D612C823DFBCA9B4BC42134CC164"}';
  520. // $params = json_decode($body, true);
  521. // refill\RefillFactory::instance()->notify('moxj_new', $params);
  522. $resp = $provider->balance();
  523. }
  524. public function testKangkai()
  525. {
  526. $provider = new refill\kangkai\RefillPhone([]);
  527. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  528. // $resp = $provider->query(['order_sn' => '25431627898461762024']);
  529. // $body = '{"TaskID":"267459","Mobile":"18500608333","Status":"5","ReportTime":"2021-08-02T18:02:01.777","ReportCode":"7:","OutTradeNo":"25431627898461762024","Price":"44.2500","ReceiptNum":"","Sign":"f0934a621fd0b076373f77a9bf8d7051"}';
  530. // $params = json_decode($body, true);
  531. // refill\RefillFactory::instance()->notify('kangkai', $params);
  532. $resp = $provider->balance();
  533. }
  534. public function testLechong()
  535. {
  536. $provider = new refill\lechong\RefillPhone([]);
  537. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  538. // $resp = $provider->query(['order_sn' => '55641627902450221838']);
  539. // $body = '{"sellerid":"55641627902450221838","agentcode":"202108021753","account":"MTg1MDA2MDgzMzM=","value":"50","payvalue":"47.8500","voucher":"","createtime":"20210802190739","endtime":"20210802191008","state":"4","remark":"","time":"20210802191008","sign":"0e2d69318d03871d887debd498cc50f2"}';
  540. // $params = json_decode($body, true);
  541. // refill\RefillFactory::instance()->notify('lechong', $params);
  542. $resp = $provider->balance();
  543. }
  544. public function testXinhengyang()
  545. {
  546. // $provider = $this->getProvider('xinhengyang');
  547. // $resp = $provider->balance();
  548. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  549. // $resp = $provider->query(['ch_trade_no' => 'f619063cc8f443e1a3ee1cc5fe868817']);
  550. $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
  551. $params = json_decode($body, true);
  552. $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
  553. $ret = $provider->verify($params);
  554. $resp = $provider->notify($params);
  555. }
  556. public function testMiaoxt()
  557. {
  558. $provider = new refill\miaoxt\RefillPhone([]);
  559. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  560. // $resp = $provider->query(['order_sn' => '85101628064401524483']);
  561. // $resp = $provider->balance();
  562. $body = '{"szOrderId":"85101628064401524483","fSalePrice":"10.2","szAgentId":"200050","nFlag":"2","szVerifyString":"7a08b9a71a297a28843d749a7bf79dbc","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"10"}';
  563. $params = json_decode($body, true);
  564. refill\RefillFactory::instance()->notify('miaoxt', $params);
  565. }
  566. public function testTianyan()
  567. {
  568. $provider = new refill\tianyan\RefillPhone([]);
  569. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  570. // $resp = $provider->query(['order_sn' => '71241628067981955316', 'card_no' => 18500608333, 'card_type' => 5]);
  571. // $resp = $provider->balance();
  572. $params['amount'] = '100.00';
  573. $params['orderNo'] = '2618380681466713437097';
  574. $params['supplierId'] = '48';
  575. $params['orderId'] = 'S20210805081833371976224648';
  576. $params['notifyTime'] = '1628122793669';
  577. $params['sign'] = '4d8f70bf451608359e256ee1e5f30de1';
  578. $params['discountAmount'] = '5.50';
  579. $params['phoneNo'] = '17696554433';
  580. $params['queryUrl'] = 'https%3A%2F%2Fupay.10010.com%2Fnpfwap%2FNpfMobCB%2FmobPayFeeCB%2FPayFeeCBFinish%3Fs%3Ds%26province%3D034%26hsnduns%3D9900%26PayRspObj%3Dg5Wzcx2XA2IKuVRxJM8XL1ku7SOw9jQ9rQ53Brvq7an002PM9u3lEFAsIL88fmZQ5E2gZuGRBFkRD3%2FOhvJ9QiYKPITME8OErhoTmu%2FOr9WdyO12eK53aaUvE557JZLZVIWyAOE47QZDnKnVs2bdpH1ApK0QIUmkdeRe%2BO%2F6qzkq%2FQv8oH6shae7uhV0vzeRAuY1q8MuTsNZ3YfvSuSFc6u1twRHAjUKJdKV6gKxQofahNr9MjCdYneuIcPWI7xNyDWcr12FEhNEJDSBGoIr78jw6XMNMrzcBFLl0eXW1iMPd%2BCAQVG%2BF7s8naJNFSALkapTORdCN%2BRbxsLugFZqVAaGs%2B1ldaATPMtd2ZWTp8JibGOfsf9uCQiyu3R3t6b5R%2BQPHCScw8Cu1eSixloFI2ZMVwA18WVbN1vb81X4IGI%2B5nxRA%2FJ1tm7snm5Oj799%2BoaS27QyGRSB618lySbprw0muawiQzdKdOmVBMcZH0ADyDM8dFvT9dKz5yRlABpHeBt7fTY1MIdNKjQ4QK5xQHG8GoTwchc36eE2CzF4kcaT9uKlmv1Wbb38szv4s%2F6HoncxQJxHOgXjWTQGBUSrolDn0qc0DdVIQ%2B25HApeloCjHhy0xTbDJhRsdezWjIONXbqiB2ZTPrheuM3qIROEBwvBRVgm0GotZYyrP3IIMLfeMtCThrirsnLRW1anCoWpDJJr6qwjRMwu%2BNAtfLyIEVkDKZeZKuA2Kk5Q9GLQHub2Nx5%2BAN3eGdRWzN6BPNiMRVlu1LpY%2BYCBg9fr9NZN3%2B7XcHGWyXM6K%2FugRPAdZUgJJQFFDAIiA4Kvc1uN2zjraiLZt7xjHMXgAP69mvEp%2FVMm2whluq6sk%2B67cdOTwMpXwzp6Aoh1d1OX4IYqw20vxfwzESPSg2RVDJUBT0%2F2NI0J2VJObHih%26ServicePlatID%3D11';
  581. $params['payType'] = 'wechat';
  582. $params['ticketNo'] = '110103353022108050819140250945';
  583. $params['company'] = 'lt';
  584. $params['status'] = '2';
  585. refill\RefillFactory::instance()->notify('tianyan', $params);
  586. }
  587. public function testYunsuoyaoman()
  588. {
  589. // $provider = $this->getProvider('yunsuoyaoman');
  590. // $resp = $provider->balance();
  591. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  592. // $resp = $provider->query(['order_sn' => '58771629702960801700']);
  593. $body = '{"orderid":"RLD21082315152651196","sporderid":"58771629702960801700","userid":"10002745","merchantsubmittime":"20210823152623","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-27.45","sign":"76A29E0101644831526138D63917C130"}';
  594. $params = json_decode($body, true);
  595. $provider = $this->getProvider('yunsuoyaoman', 'RefillCallBack');
  596. $ret = $provider->verify($params);
  597. $resp = $provider->notify($params);
  598. }
  599. public function testYouhe()
  600. {
  601. // $provider = $this->getProvider('youhe');
  602. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  603. // $resp = $provider->query(['order_sn' => '41051635145081582785']);
  604. // $resp = $provider->balance();
  605. $body = ' {"seqNo":"FE4D9D65781C0758","orderNo":"46101635142848462768","result":"Q0001","transo":"","sign":"3B02C7864154C94D8479305D27F3831C"}';
  606. $params = json_decode($body, true);
  607. $provider = $this->getProvider('youhe','RefillCallback');
  608. $ret = $provider->verify($params);
  609. $resp = $provider->notify($params);
  610. }
  611. public function testWenye()
  612. {
  613. $provider = new refill\wenye\RefillPhone([]);
  614. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  615. // $resp = $provider->query(['order_sn' => '88871628157083445809']);
  616. // $resp = $provider->balance();
  617. $body = '{"orderNo":"F2108051529062719948","status":"019","consumerNo":"95291628148539909985","voucherNo":null,"mobile":"18500608333"}';
  618. $params = json_decode($body, true);
  619. // refill\RefillFactory::instance()->notify('wenye', $params);
  620. }
  621. public function testXinyang()
  622. {
  623. $provider = new refill\xinyang\RefillPhone([]);
  624. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  625. // $resp = $provider->query(['order_sn' => '68151628157534687971']);
  626. // $resp = $provider->balance();
  627. $body = '{"UserId":"100029","ShopId":"300000","SysOrderId":"21080517590310002956698","OrderId":"68151628157534687971","State":"4","Timestamp":"1628157558204","sign":"4514B2BA75DBA02EA3A60525329B3D86","ParValue":"10.0000","VoucherType":"0","VoucherContent":"2021080522001161731405208592","CreateTime":"2021-08-05 17:59:03","CompleteTime":"2021-08-05 17:59:18"}';
  628. $params = json_decode($body, true);
  629. refill\RefillFactory::instance()->notify('xinyang', $params);
  630. }
  631. public function testGuochuang()
  632. {
  633. $provider = $this->getProvider('guochuang');
  634. $resp = $provider->add(13699279618, 4, 5, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  635. // $resp = $provider->query(['order_sn' => '82951628231038096078']);
  636. // $resp = $provider->balance();
  637. // $body = '{"account":"18074608795","evidence":"1000000083421080614310024563","evidenceType":"","id":"D2021080614235942044","inTime":"2021/08/06 14:26:22","money":"10","outerId":"82951628231038096078","status":"SUCCESS"}';
  638. // $params['ts'] = 1628231182;
  639. // $params['sign'] = '545F7024870B145915934CA36C6D341E';
  640. // $params['body'] = $body;
  641. // refill\RefillFactory::instance()->notify('guochuang', $params);
  642. // [$goods_id, $price] = $provider->goods(2, 10, 4, 1, []);
  643. }
  644. public function testXianghongrui()
  645. {
  646. $provider = new refill\xianghongrui\RefillPhone([]);
  647. // $resp = $provider->balance();
  648. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  649. // $resp = $provider->query(['order_sn' => '87691628758730981608']);
  650. $body = '{"orderid":"BAT21081216581941649","sporderid":"87691628758730981608","userid":"10002503","merchantsubmittime":"20210812165918","resultno":"1","parvalue":"50","remark1":"110103353052108121658550256634","payno":"110103353052108121658550256634","fundbalance":"-47.5","sign":"EF34F6FB6D37E4FCB92DCD8F41CC67E1"}';
  651. $params = json_decode($body, true);
  652. refill\RefillFactory::instance()->notify('xianghongrui', $params);
  653. }
  654. public function testDianchong()
  655. {
  656. $provider = $this->getProvider('dianchong');
  657. // $resp = $provider->balance();
  658. // $resp = $provider->add(18074608795, 5, 30, ['order_sn' => $this->make_sn()]);
  659. // $resp = $provider->query(['order_sn' => '26671629190230227788']);
  660. $body = '{"seqNo":"5C2D85572F8743CF","orderNo":"26671629190230227788","result":"Q0000","transo":"1000000083421081716331202254","sign":"87F3F67EA2B91709FD05468CF74210A1"}';
  661. $params = json_decode($body, true);
  662. $provider = $this->getProvider('dianchong', 'RefillCallBack');
  663. $ret = $provider->verify($params);
  664. $resp = $provider->notify($params);
  665. }
  666. public function testXunyinOil()
  667. {
  668. $provider = $this->getProvider('xunyinoil', 'RefillOil');
  669. // $resp = $provider->balance();
  670. // $resp = $provider->add(9030230005180327, 1, 50, ['order_sn' => $this->make_sn()]);
  671. $resp = $provider->query(['order_sn' => '77791629450541412891']);
  672. // $body = '{"ext":"","code":"8888","sign":"7db98f3f271013688134f2fbd503dc15","statemes":"\u6210\u529f","id":"80641629442789487318","userid":"8417","operatorid":"2421082015001888","status":"SUCCESS"}';
  673. // $params = json_decode($body, true);
  674. // $provider = $this->getProvider('xunyinoil','RefillCallBack');
  675. // $ret = $provider->verify($params);
  676. // $resp = $provider->notify($params);
  677. }
  678. public function testJumiThird()
  679. {
  680. $provider = $this->getProvider('jumithird');
  681. // $resp = $provider->balance();
  682. $resp = $provider->add(588073521, 7, 100, [
  683. 'order_sn' => $this->make_sn(),
  684. 'goods_id' => 6978,
  685. 'product_code' => 'XYZ100747'
  686. ]);
  687. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  688. // $body = '{"order_no":"59251629777055495341","channel_order_no":"C2108241152003775025","status":3,"money":"100.00","cost_money":"97.00","mch_no":210303112631,"account":"588073521","official_sn":"","sign":"7d7b3e701865b54c8cf0d9e903fdf6bf"}';
  689. // $params = json_decode($body, true);
  690. // $provider = $this->getProvider('jumithird','RefillCallBack');
  691. // $ret = $provider->verify($params);
  692. // $resp = $provider->notify($params);
  693. }
  694. public function testWangliantx()
  695. {
  696. // $provider = $this->getProvider('wangliantx');
  697. // $resp = $provider->balance();
  698. // for ($i = 1; $i<=1; $i++){
  699. // $resp = $provider->add(18074608795, 6, 50, [
  700. // 'order_sn' => $this->make_sn(),
  701. // 'regin_no' => 1
  702. // ]);
  703. // }
  704. // $resp = $provider->query(['order_sn' => '85901629801033376170']);
  705. $body = '{"userid":"10073664","sporderid":"85901629801033376170","orderid":"C5C5D4F49DB61A8773664","resultno":"1","merchantsubmittime":"20210824183109","ordermoney":"47.6","verifystring":"b6a873ecd6dc9cea3a410c6386cdab84","sign":"4a80e2a8c7b07c8aacada4feedd581bd","supnumber":"1000000083421082418345386156"}';
  706. $params = json_decode($body, true);
  707. $provider = $this->getProvider('wangliantx', 'RefillCallBack');
  708. $ret = $provider->verify($params);
  709. $resp = $provider->notify($params);
  710. }
  711. public function testZhuojian()
  712. {
  713. // $provider = $this->getProvider('zhuojian');
  714. // $resp = $provider->add(18500608333, 5, 50, [
  715. // 'order_sn' => $this->make_sn()
  716. // ]);
  717. // $resp = $provider->query(['order_sn' => '87231630026579229295']);
  718. $body = '{"money":"50.00","official_trade_no":"","out_trade_no":"87231630026579229295","status":"4","trade_no":"10000077828","sign":"0e19142c014ef6fe263601956e0be436"}';
  719. $params = json_decode($body, true);
  720. $provider = $this->getProvider('zhuojian', 'RefillCallBack');
  721. $ret = $provider->verify($params);
  722. $resp = $provider->notify($params);
  723. }
  724. public function testXianghongruifs()
  725. {
  726. // $provider = $this->getProvider('xianghongruifs');
  727. // $resp = $provider->balance();
  728. // $resp = $provider->add(15252490862, 4, 30, [
  729. // 'order_sn' => $this->make_sn()
  730. // ]);
  731. // $resp = $provider->query(['order_sn' => '70881632644084577858']);
  732. $body = '{"orderid":"AAO21092616144271467","sporderid":"70881632644084577858","userid":"10002524","merchantsubmittime":"20210926161610","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"343C28C4EB13F68E2EE251FA0F2A8262"}';
  733. $params = json_decode($body, true);
  734. $provider = $this->getProvider('xianghongruifs', 'RefillCallBack');
  735. $ret = $provider->verify($params);
  736. $resp = $provider->notify($params);
  737. }
  738. public function testYilin()
  739. {
  740. $provider = $this->getProvider('yilin');
  741. $resp = $provider->balance();
  742. // $resp = $provider->add(18500608333, 5, 30, [
  743. // 'order_sn' => $this->make_sn()
  744. // ]);
  745. // $resp = $provider->query(['order_sn' => '86981630484634157631']);
  746. // $body = '{"orderid":"NZX21090116244713140","sporderid":"86981630484634157631","userid":"10002543","merchantsubmittime":"20210901163039","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.71","sign":"53717BF9ECE83F4AD96C1EDD4BAE4E87"}';
  747. // $params = json_decode($body, true);
  748. // $provider = $this->getProvider('yilin','RefillCallBack');
  749. // $ret = $provider->verify($params);
  750. // $resp = $provider->notify($params);
  751. }
  752. public function testMiaoxt_fs()
  753. {
  754. $provider = $this->getProvider('miaoxt_fs');
  755. // $resp = $provider->balance();
  756. // $resp = $provider->add(13945846040, 4, 10, [
  757. // 'order_sn' => $this->make_sn()
  758. // ]);
  759. $resp = $provider->query(['order_sn' => '33101630577689278074']);
  760. // $body = '{"szOrderId":"33101630577689278074","fSalePrice":"9.95","szAgentId":"200055","nFlag":"2","szVerifyString":"1649fb2815926b75e4ed7e0fef3172ae","szPhoneNum":"13945846040","szRtnMsg":"","nDemo":"10"}';
  761. // $params = json_decode($body, true);
  762. // $provider = $this->getProvider('miaoxt_fs','RefillCallBack');
  763. // $ret = $provider->verify($params);
  764. // $resp = $provider->notify($params);
  765. }
  766. public function testXianzhibb()
  767. {
  768. // $provider = $this->getProvider('xianzhibb');
  769. // $resp = $provider->balance();
  770. // $resp = $provider->add(13699279618, 4, 200, [
  771. // 'order_sn' => $this->make_sn()
  772. // ]);
  773. // $resp = $provider->query(['order_sn' => '80881630650784871094']);
  774. $body = '{"code":"000","merchantorderId":"1854680684077057846998","platformorderid":"aada9b09583f66b2b83370016","orderid":"","rechargeno":"15971954673","amount":"50.00","payamount":"47.75000","rechargestate":"3","createtime":"2021-09-04 13:26:20","sign":"07b8a341c55639d3512a239f9cd07e31"}';
  775. $params = json_decode($body, true);
  776. $provider = $this->getProvider('xianzhibb', 'RefillCallBack');
  777. $ret = $provider->verify($params);
  778. $resp = $provider->notify($params);
  779. }
  780. public function testYikatong()
  781. {
  782. $provider = $this->getProvider('yikatong');
  783. // $resp = $provider->balance();
  784. // $resp = $provider->add(13699279618, 4, 50, [
  785. // 'order_sn' => $this->make_sn()
  786. // ]);
  787. $resp = $provider->query(['order_sn' => '47461635931681279436']);
  788. // $body = '{"userid":"04f46671c696436aa30d","ordernum":"20201635929812426409","mobile":"13699279618","timestamp":"20211103165659","state":"3","desc":"%E5%85%85%E5%80%BC%E5%A4%B1%E8%B4%A5%21","sign":"d1e821043c3efcf966b3e415ba175e1e"}';
  789. // $params = json_decode($body, true);
  790. // $provider = $this->getProvider('yikatong','RefillCallBack');
  791. // $ret = $provider->verify($params);
  792. // $resp = $provider->notify($params);
  793. }
  794. public function testSanti()
  795. {
  796. $provider = $this->getProvider('santi');
  797. // $resp = $provider->get_product(17801048874);
  798. // $resp = $provider->add(18500608333, 5, 1024, [
  799. // 'order_sn' => $this->make_sn(),
  800. // 'goods_id' => 7000,
  801. // 'product_code' => 'XYZ100751'
  802. // ]);
  803. $resp = $provider->query(['ch_trade_no' => '1631945759171581']);
  804. // $resp = $provider->balance();
  805. $body = '{"channelOrderNo":"49991631861285846684","extraData":"","orderNo":"1631861288127072","orderStatus":"4","providerResultCode":"3","providerResultReason":"\u5145\u503c\u6210\u529f","resultCode":"1000","resultMessage":"\u6210\u529f","sign":"472490783eaa82c76a1af8702881f04f"}';
  806. $params = json_decode($body, true);
  807. $provider = $this->getProvider('santi', 'RefillCallBack');
  808. $ret = $provider->verify($params);
  809. $resp = $provider->notify($params);
  810. }
  811. public function testSialan_tax()
  812. {
  813. // $provider = $this->getProvider('sialan_tax');
  814. // $resp = $provider->balance();
  815. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  816. // $resp = $provider->query(['ch_trade_no' => '21112214170092559557647']);
  817. $body = '{"api_id":"16856","recharge":"18500608333","amount":"10","order_sn":"21112214170092559557647","query_sn":"64801637561821444619","operator_sn":"","status":"2","sign":"900a01a1268cb14a37d6567691303ed9"}';
  818. $params = json_decode($body, true);
  819. $provider = $this->getProvider('sialan_tax', 'RefillCallBack');
  820. $ret = $provider->verify($params);
  821. $resp = $provider->notify($params);
  822. }
  823. public function testYunchonggong_yd()
  824. {
  825. $provider = $this->getProvider('yunchonggong_yd');
  826. for ($i = 1; $i <= 5; $i++) {
  827. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  828. }
  829. // $resp = $provider->query(['order_sn' => '34061631002071526340']);
  830. // $resp = $provider->balance();
  831. // $body = '{"szOrderId":"34061631002071526340","fSalePrice":"47.7","szAgentId":"200043","nFlag":"3","szVerifyString":"48a7329c13af06b5be1d2fdad706b22e","szPhoneNum":"13699279618","szRtnMsg":"","nDemo":"50"}';
  832. // $params = json_decode($body, true);
  833. // $provider = $this->getProvider('yunchonggong_yd','RefillCallBack');
  834. // $ret = $provider->verify($params);
  835. // $resp = $provider->notify($params);
  836. }
  837. public function testGuochuang_nation()
  838. {
  839. $provider = $this->getProvider('guochuang_nation');
  840. $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  841. // $resp = $provider->query(['order_sn' => '4372390688043259849812']);
  842. // $resp = $provider->balance();
  843. // $body = '{"account":"18500608333","evidence":"N/A","evidenceType":"","id":"D2021090718185107657","inTime":"2021/09/07 18:19:05","money":"1","outerId":"65261631009929751933","status":"SUCCESS"}';
  844. // $params['ts'] = 1631009945;
  845. // $params['sign'] = 'C53F921EB5573EF4D0C757C5B5D4185D';
  846. // $params['body'] = $body;
  847. // $provider = $this->getProvider('guochuang_nation','RefillCallBack');
  848. // $ret = $provider->verify($params);
  849. // $resp = $provider->notify($params);
  850. }
  851. public function testTianyanman()
  852. {
  853. $provider = $this->getProvider('tianyanman');
  854. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  855. // $resp = $provider->query(['order_sn' => '12191631078826857172', 'card_no' => 18500608333, 'card_type' => 5]);
  856. // $resp = $provider->balance();
  857. // $body = '{"amount":"30.00","orderNo":"12191631078826857172","supplierId":"48","orderId":"S20210908132721339071815348","notifyTime":"1631078841755","sign":"8a5676d4fbd1fd9a64385d71061be44a","discountAmount":"1.65","phoneNo":"18500608333","queryUrl":"","payType":"","ticketNo":"","company":"lt","status":"0"}';
  858. // $params = json_decode($body, true);
  859. // $provider = $this->getProvider('tianyanman','RefillCallBack');
  860. // $ret = $provider->verify($params);
  861. // $resp = $provider->notify($params);
  862. }
  863. public function testShimer()
  864. {
  865. $provider = $this->getProvider('shimier');
  866. // $resp = $provider->balance();
  867. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  868. // $resp = $provider->query(['order_sn' => '56391631086657239320']);
  869. // $body = '{"orderId":"210908153756535112","appId":"b3k6DRwSOw","outOrderId":"56391631086657239320","sign":"86f9e783a3374463d546bedfc6920eff","orderStatus":"3","completeTime":"20210908154810","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  870. // $params = json_decode($body, true);
  871. // $provider = $this->getProvider('shimier','RefillCallBack');
  872. // $ret = $provider->verify($params);
  873. // $resp = $provider->notify($params);
  874. }
  875. public function testZhongst_mix()
  876. {
  877. // $provider = $this->getProvider('zhongst_mix');
  878. // $resp = $provider->balance();
  879. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  880. // $resp = $provider->query(['order_sn' => '46291631503985151158']);
  881. $body = '{"szOrderId":"46291631503985151158","fSalePrice":"29.85","szAgentId":"200053","nFlag":"2","szVerifyString":"be07db2c82b63bc2610eee3eac23245b","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  882. $params = json_decode($body, true);
  883. $provider = $this->getProvider('zhongst_mix','RefillCallBack');
  884. $ret = $provider->verify($params);
  885. $resp = $provider->notify($params);
  886. }
  887. public function testHangtong()
  888. {
  889. // $provider = $this->getProvider('hangtong');
  890. // $resp = $provider->balance();
  891. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  892. // $resp = $provider->query(['order_sn' => '68221631775122967358']);
  893. $body = '{"phone":"13699279618","orderNo":"F2109161452121045530","status":"success","otherNo":"68221631775122967358","msg":"提交/充值成功","ext":"524501553021467113"}';
  894. $params = json_decode($body, true);
  895. $provider = $this->getProvider('hangtong','RefillCallBack');
  896. $ret = $provider->verify($params);
  897. $resp = $provider->notify($params);
  898. }
  899. public function testJinfeng()
  900. {
  901. // $provider = $this->getProvider('jinfeng');
  902. // $resp = $provider->balance();
  903. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  904. // $resp = $provider->query(['order_sn' => '78561631769733386091']);
  905. $body = '{"orderNo":"F2109161322374838924","status":"003","consumerNo":"78561631769733386091","voucherNo":null,"mobile":"18500608333"}';
  906. $params = json_decode($body, true);
  907. $provider = $this->getProvider('jinfeng','RefillCallBack');
  908. $ret = $provider->verify($params);
  909. $resp = $provider->notify($params);
  910. }
  911. public function testDashang()
  912. {
  913. // $provider = $this->getProvider('dashang');
  914. // $resp = $provider->balance();
  915. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  916. // $resp = $provider->query(['order_sn' => '63101631784169445345']);
  917. $body = '{"userId":"80800346","bizId":"90290050","ejId":"90916171545126","downstreamSerialno":"67971631783703671946","status":"3","voucher":"","voucherType":"0","sign":"46b13acf67f271e2f85db189ab9e1391"}';
  918. $params = json_decode($body, true);
  919. $provider = $this->getProvider('dashang','RefillCallBack');
  920. $ret = $provider->verify($params);
  921. $resp = $provider->notify($params);
  922. }
  923. public function testYuanta()
  924. {
  925. $provider = $this->getProvider('yuanta');
  926. // $resp = $provider->balance();
  927. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  928. $resp = $provider->query(['order_sn' => '61501631786913519186']);
  929. // $body = '{"szOrderId":"61501631786913519186","fSalePrice":"45.75","szAgentId":"200029","nFlag":"2","szVerifyString":"3a580a84b477efa431d78b505fd7389e","szPhoneNum":"18500608333","szRtnMsg":"110103353072109161810250286803","nDemo":"50"}';
  930. // $params = json_decode($body, true);
  931. // $provider = $this->getProvider('yuanta','RefillCallBack');
  932. // $ret = $provider->verify($params);
  933. // $resp = $provider->notify($params);
  934. }
  935. public function testDuojing()
  936. {
  937. // $provider = $this->getProvider('duojing');
  938. // $resp = $provider->balance();
  939. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  940. // $resp = $provider->query(['order_sn' => '24731632377651122245']);
  941. $body = '{"appKey":"30000419","number":"56521092314142544365","orderId":"24731632377651122245","mobile":"18500608333","reason":"","amount":"50.00","actualAmount":"49.85","createdAt":"2021-09-23 14:14:25","status":"SUCCESS","sign":"8D7A526CF3F6C1279BD1819028B7683A"}';
  942. $params = json_decode($body, true);
  943. $provider = $this->getProvider('duojing','RefillCallBack');
  944. $ret = $provider->verify($params);
  945. $resp = $provider->notify($params);
  946. }
  947. public function testMenggu()
  948. {
  949. $provider = $this->getProvider('menggu','RefillOil');
  950. // $resp = $provider->add(1000111100021211884, 2, 500, ['order_sn' => $this->make_sn()]);
  951. $resp = $provider->query(['order_sn' => '63021632301956855605']);
  952. // $body = '{"orderId":"210922171242123506","appId":"1hqLCRUja7","outOrderId":"63021632301956855605","sign":"f3f0b48657bb4e3b993aa284159c6565","orderStatus":"2","completeTime":"20210922171306","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"\u3010\u4e2d\u56fd\u77f3\u5316\u3011\u60a8\u5c3e\u53f7\u4e3a211884\u7684\u52a0\u6cb9\u5361\u4e8e09\u670822\u65e5 17\u65f612\u5206\u5145\u503c\u6210\u529f,\u91d1\u989d500\u5143,\u8ba2\u5355\u53f7:2521092217126714"}';
  953. // $params = json_decode($body, true);
  954. // $provider = $this->getProvider('menggu','RefillCallBack');
  955. // $ret = $provider->verify($params);
  956. // $resp = $provider->notify($params);
  957. }
  958. public function testMenggu_hf()
  959. {
  960. $provider = $this->getProvider('menggu_hf');
  961. // $resp = $provider->balance();
  962. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  963. // $resp = $provider->query(['order_sn' => '24481632298991701065']);
  964. // $body = '{"orderId":"210922162318123069","appId":"1hqLCRUja7","outOrderId":"24481632298991701065","sign":"73faefba3e179641af0df6f59becce8f","orderStatus":"3","completeTime":"20210922162451","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  965. // $params = json_decode($body, true);
  966. // $provider = $this->getProvider('menggu_hf','RefillCallBack');
  967. // $ret = $provider->verify($params);
  968. // $resp = $provider->notify($params);
  969. }
  970. public function testChizeng()
  971. {
  972. $provider = $this->getProvider('chizeng');
  973. // $resp = $provider->balance();
  974. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  975. $resp = $provider->query(['order_sn' => '7013163540140101017048563']);
  976. // $body = '{"orderid":"UQX21102814052855105","sporderid":"71241635401103845030","userid":"10002523","merchantsubmittime":"20211028140512","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.35","sign":"0B97DC1E16EC3BC5F139AAC3FB4C51BF"}';
  977. // $params = json_decode($body, true);
  978. // $provider = $this->getProvider('chizeng','RefillCallBack');
  979. // $ret = $provider->verify($params);
  980. // $resp = $provider->notify($params);
  981. }
  982. public function testJinxin()
  983. {
  984. // $provider = $this->getProvider('jinxin');
  985. // $resp = $provider->balance();
  986. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  987. // $resp = $provider->query(['order_sn' => '83481632465671278322']);
  988. $body = '{"orderNo":"210924140000185","requestId":"83481632465671278322","sign":"80184350EC5C60445A50C9450D6CFB28","status":1,"supplierNo":"110103353192109241442090289402","timeStamp":"2021-09-24 14:43:07"}';
  989. $params = json_decode($body, true);
  990. $provider = $this->getProvider('jinxin','RefillCallBack');
  991. $ret = $provider->verify($params);
  992. $resp = $provider->notify($params);
  993. }
  994. public function testKachong()
  995. {
  996. // $provider = $this->getProvider('kachong');
  997. // $resp = $provider->balance();
  998. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  999. // $resp = $provider->query(['order_sn' => '30691632889605245135']);
  1000. $body = '{"szAgentId":"200046","szOrderId":"30691632889605245135","szPhoneNum":"18500608333","nDemo":"20","fSalePrice":"19.82","nFlag":"2","szVerifyString":"dbac0df5e9ff2b067f74850f0cf55f3c","szRtnMsg":"982100337029603"}';
  1001. $params = json_decode($body, true);
  1002. $provider = $this->getProvider('kachong','RefillCallBack');
  1003. $ret = $provider->verify($params);
  1004. $resp = $provider->notify($params);
  1005. }
  1006. public function testXingzyNormal()
  1007. {
  1008. // $provider = $this->getProvider('xingzy_normal');
  1009. // $resp = $provider->balance();
  1010. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1011. // $resp = $provider->query(['order_sn' => '62881632898853651364']);
  1012. $body = '{"access_key":"211394711","code":3,"data":{"sellprice":28.65,"phone":"18500608333","pass":null,"official_id":null,"official_ch":null},"orderid":210929150115656000,"out_trade_no":"62881632898853651364","sign":"qIkEYEougSzg3EImlHTJKBHv4OQ=","timestamp":1632898943485}';
  1013. $params = json_decode($body, true);
  1014. $provider = $this->getProvider('xingzy_normal','RefillCallBack');
  1015. $ret = $provider->verify($params);
  1016. $resp = $provider->notify($params);
  1017. }
  1018. public function testDingxin()
  1019. {
  1020. $provider = $this->getProvider('dingxin');
  1021. $resp = $provider->balance();
  1022. }
  1023. public function testPushang()
  1024. {
  1025. $provider = $this->getProvider('pushang');
  1026. // $resp = $provider->balance();
  1027. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1028. $resp = $provider->query(['order_sn' => '23391632986567769626']);
  1029. // $body = '{"msg":"\u8d26\u52a1\u6263\u6b3e\u5931\u8d25","extOrderId":"22081632982700152800","orderId":"R2021093014240000154555","salePrice":"30.0900","sign":"b0fe238f16e516316729589d42ab97b1","state":"5","exchangeTraded":""}';
  1030. // $params = json_decode($body, true);
  1031. // $provider = $this->getProvider('pushang','RefillCallBack');
  1032. // $ret = $provider->verify($params);
  1033. // $resp = $provider->notify($params);
  1034. }
  1035. public function testDinghui()
  1036. {
  1037. // $providers = $this->getProvider('dinghui');
  1038. // $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1039. // $resp = $providers->query(['order_sn' => '84891634279500368841']);
  1040. // $body = '{"method":"order.charge.status.update.notify","format":"json","sign":"26f66f194771ca278f39fa9c9c53222f6347abbe79a8a1c8987342116c5eec9f5737e387630e82f024663ec0b82a2cfd1f2da4731aac118ecacf700c110b865166b1dd20d7225b52aee37d91ce12f534c5d480da843d0b824d165d7bba90cb63a9556d4395b59492a25ee97a3ca099d12bc3b7366f6c2d832f02306615baf5cda391b91c1c2cbe8935e2dfbc7b648c747cbfbd8d4767f0dc7582f558607fe821b12ff607dcfbbc14bbac1064f15d36fd741503287e8075fd7b7106bffaccaf2173740a51838419c24bd61bc8cde53d336972f2c8ff3d526542139271da9c7b95247db886feb22e74cefcc82ae0d2ff228343759d2fc51e986f09a61716f1833e","message":"5l8ZOxxDVYYDNBWWJ06QDGbbsMPeV5eLpb\/gmCweXM\/BR1l+I09T73OvhPsA8ujFLw4oReK7P+z\/DTU2tFn83I+6YU4QgTiLVp3tW\/kKaKmUhTB+BQZhnVk39wHZD4BBeDlTlAkmU6mskB8MCO9xG5W11vhrSn16ssG6CFEYcpkvDihF4rs\/7P8NNTa0Wfzc78MrVtylby5Lw8MIrIbtfr62lBQ9jUm2lMFeQVBUZ9GUhTB+BQZhnVk39wHZD4BBNoOYx9z9iwfCLYmU0ili4A==","msgtype":"notify_msg","version":"V2.0","app_id":"yeziapi","notify_id":"0000017c78f9c8190130d3298000000a","timestamp":"1634117208089"}';
  1041. // $params = json_decode($body, true);
  1042. $params['method'] = 'order.charge.status.update.notify';
  1043. $params['format'] = 'json';
  1044. $params['sign'] = '60d4e658cb730b9d8cc0c451414de9b51b79d14fa217261f7bbcf4a3472553b093a5c2377abba9573ed9d5e1a39a9f693830671ff1e641cc97a9782d2b2f393bed6a7bd22be0c642a13e20a7c6cf9f562c11ae65335758bd58ee55853b555cc2e511b6655c6e944a9defa6f0247263578d1554ff7709a7ced90db93911562dcb485518a4da3c21cb650ff01cacfcfa8dd9de533f5a5be2accc065e23cbd38b1b104e15feb3ce823c8cb7c7d5adf3fef0be768d8c25dc813a9112a14ec54a9e2ee517a5ba5b9ce2234dd4329b61c5456a82405aa6d2a307b4ec04be52bd1e3e5b204a2a4d7899d6fbf0fc09cd443cddc947f02bf58730142e9edc2b98eeeae086';
  1045. $params['message'] = 'GYmjEFMoy5jUfg/Ju7NRCSyaoyg2fu9EWpABAHb55xKpkvIedqXPDqRwG6Lo7iNx0A2yc6/IaU7vqwNV9YEVZOwHBDtsGXuHK1GCq5KUaW70pq1wEKr6kgjAHDITH7XdB3jmdSAQFhQYTi5hCz5EWWAzRKLYgTZeDksePKshm67QDbJzr8hpTu+rA1X1gRVkVqAL750crFPclgeWEYFG4mO4ZlmqygUrgz4si+seZ3f0pq1wEKr6kgjAHDITH7XdkFLNHratZfufbZKIZ5r+CA==';
  1046. $params['msgtype'] = 'notify_msg';
  1047. $params['version'] = 'V2.0';
  1048. $params['app_id'] = 'yeziapi';
  1049. $params['notify_id'] = '0000017c83f4786201547473800e31ee';
  1050. $params['timestamp'] = '1634301409378';
  1051. $providers = $this->getProvider('dinghui','RefillCallBack');
  1052. $ret = $providers->verify($params);
  1053. $resp = $providers->notify($params);
  1054. }
  1055. public function testHuafutong()
  1056. {
  1057. // $provider = $this->getProvider('huafutong');
  1058. // $resp = $provider->balance();
  1059. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1060. // $resp = $provider->query(['order_sn' => '48151634200413207059']);
  1061. $body = '{"PostData":"MJ88hD85bb2VPjI+q9R64jrR2TnZQSUn+4PHZCz1of27YQswyLKdNoNyyNuVEd2+98raKRC0pD+KFQf6beJn5mgOe+u9JjTtqxM5VcVYX93DQACU1ZdfJ+rSx5WRMwvi"}';
  1062. $params = json_decode($body, true);
  1063. $provider = $this->getProvider('huafutong','RefillCallBack');
  1064. $data = $provider->notify($params);
  1065. }
  1066. public function testShuoruan()
  1067. {
  1068. $provider = $this->getProvider('shuoruan');
  1069. // $resp = $provider->balance();
  1070. $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1071. // $resp = $provider->query(['order_sn' => '80261634802627091026']);
  1072. $params['Action'] = 'CX';
  1073. $params['AgentAccount'] = '18600608333';
  1074. $params['Agentbalance'] = '-9.970';
  1075. $params['Orderid'] = '80261634802627091026';
  1076. $params['Chargeid'] = '2162076796';
  1077. $params['Orderstatu_int'] = '16';
  1078. $params['Orderstatu_text'] = '缴费成功_';
  1079. $params['TransCash'] = '10.000';
  1080. $params['OrderPayment'] = '9.970';
  1081. $params['Errorcode'] = '0000';
  1082. $params['Errormsg'] = '';
  1083. $params['Sign'] = '654fbc24c3d0878247bc3be3ed699f16';
  1084. $provider = $this->getProvider('shuoruan','RefillCallBack');
  1085. // $ret = $provider->verify($params);
  1086. // $data = $provider->notify($params);
  1087. }
  1088. public function testLinzhu()
  1089. {
  1090. // $provider = $this->getProvider('linzhu');
  1091. // $resp = $provider->balance();
  1092. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1093. // $resp = $provider->query(['order_sn' => '43881634986696312260']);
  1094. $body = '{"orderNo":"F2110231858443112627","status":"019","consumerNo":"43881634986696312260","voucherNo":null,"mobile":"18500608333"}';
  1095. $params = json_decode($body, true);
  1096. $provider = $this->getProvider('linzhu','RefillCallBack');
  1097. $ret = $provider->verify($params);
  1098. $data = $provider->notify($params);
  1099. }
  1100. public function testFangxing()
  1101. {
  1102. $provider = $this->getProvider('fangxing');
  1103. // $resp = $provider->balance();
  1104. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(), 'order_id' => 111111]);
  1105. $resp = $provider->query(['order_sn' => '82581635239506988570']);
  1106. $body = '{"orderId":"O21102617115969210570","respCode":"10003","respMsg":"\u6210\u529f \u5bf9\u7aef\u6d41\u6c34\u53f7: 21102617611981771","sign":"013F54D5E415668D3E012BBDE9E4BF16","transNo":"82581635239506988570"}';
  1107. $params = json_decode($body, true);
  1108. $provider = $this->getProvider('fangxing','RefillCallBack');
  1109. $ret = $provider->verify($params);
  1110. $data = $provider->notify($params);
  1111. }
  1112. public function testHuafutongMan()
  1113. {
  1114. // $provider = $this->getProvider('huafutongman');
  1115. // $resp = $provider->balance();
  1116. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1117. // $resp = $provider->query(['order_sn' => '73721635476007331621']);
  1118. $body = '{"PostData":"1Gi96e4PzohQIdxj8W4uOH4Q5pzT8ZHyCc+ZpTl7XEEF5TPgXffD32KLy0l2fZ7X36qZTO4JJA\/4nhWJRERklMy1FQuan825KK5vy2zQ6FOxg8vXMy0e7HOVg0kx123i"}';
  1119. $params = json_decode($body, true);
  1120. $provider = $this->getProvider('huafutongman','RefillCallBack');
  1121. $data = $provider->notify($params);
  1122. }
  1123. public function testFeimingyu()
  1124. {
  1125. // $provider = $this->getProvider('feimingyu');
  1126. // $resp = $provider->balance();
  1127. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1128. // $resp = $provider->query(['order_sn' => '99741635757876781160']);
  1129. $body = '{"userid":"69876","order_id":"21110117111869876daed6b187","account":"18500608333","amount":"30","price":"28.41","state":"failed","user_order":"99741635757876781160","sign":"C82F4821547BBFC462E9758EE28287E1","voucher":""}';
  1130. $params = json_decode($body, true);
  1131. $provider = $this->getProvider('feimingyu','RefillCallBack');
  1132. $ret = $provider->verify($params);
  1133. $resp = $provider->notify($params);
  1134. }
  1135. public function testDashangnormal()
  1136. {
  1137. // $provider = $this->getProvider('dashang_normal');
  1138. // $resp = $provider->balance();
  1139. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1140. // $resp = $provider->query(['order_sn' => '34461636081408575185']);
  1141. $body = '{"userId":"80800357","bizId":"60040030","ejId":"91105110431325","downstreamSerialno":"34461636081408575185","status":"3","voucher":"","voucherType":"0","sign":"24a40c2b677820533e418d4a2b3f0806"}';
  1142. $params = json_decode($body, true);
  1143. $provider = $this->getProvider('dashang_normal','RefillCallBack');
  1144. $ret = $provider->verify($params);
  1145. $resp = $provider->notify($params);
  1146. }
  1147. public function testHuafutong_doubi()
  1148. {
  1149. $provider = $this->getProvider('huafutong_doubi');
  1150. // $resp = $provider->balance();
  1151. $resp = $provider->add(588073521, 7, 100, [
  1152. 'order_sn' => $this->make_sn(),
  1153. 'product_code' => 'XYZ100747'
  1154. ]);
  1155. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  1156. // $body = '{"order_no":"59251629777055495341","channel_order_no":"C2108241152003775025","status":3,"money":"100.00","cost_money":"97.00","mch_no":210303112631,"account":"588073521","official_sn":"","sign":"7d7b3e701865b54c8cf0d9e903fdf6bf"}';
  1157. // $params = json_decode($body, true);
  1158. // $provider = $this->getProvider('huafutong_doubi','RefillCallBack');
  1159. // $ret = $provider->verify($params);
  1160. // $resp = $provider->notify($params);
  1161. }
  1162. public function testYunchonggongfs()
  1163. {
  1164. // $provider = $this->getProvider('yunchonggongfs');
  1165. // $resp = $provider->balance();
  1166. // $resp = $provider->add(13935705732, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 4]);
  1167. // $resp = $provider->query(['order_sn' => '44721636430254462028']);
  1168. $body = '{"orderId":"211109115744298048","appId":"Z1sU5unYK7","outOrderId":"44721636430254462028","sign":"a368d3f6a8c2ec2d2dbd587f9a78a937","orderStatus":"3","completeTime":"20211109115840","orderDesc":"timeout"}';
  1169. $params = json_decode($body, true);
  1170. $provider = $this->getProvider('yunchonggongfs','RefillCallBack');
  1171. $ret = $provider->verify($params);
  1172. $resp = $provider->notify($params);
  1173. }
  1174. public function testDingchi()
  1175. {
  1176. // $provider = $this->getProvider('dingchi');
  1177. // $resp = $provider->balance();
  1178. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1179. // $resp = $provider->query(['order_sn' => '70651636508446628072']);
  1180. $body = '{"userId":"671","bizId":"200","id":"32894267","downstreamSerialno":"70651636508446628072","status":"2","statusDesc":"","extend":"100101101002111100940543157996","sign":"984c4708c14d0c2e08295c5010109ecf"}';
  1181. $params = json_decode($body, true);
  1182. $provider = $this->getProvider('dingchi','RefillCallBack');
  1183. $ret = $provider->verify($params);
  1184. $resp = $provider->notify($params);
  1185. }
  1186. public function testYanhao()
  1187. {
  1188. // $provider = $this->getProvider('yanhao');
  1189. // $resp = $provider->balance();
  1190. // $resp = $provider->add(2423503330, 5, 30, ['order_sn' => $this->make_sn()]);
  1191. // $resp = $provider->query(['order_sn' => '49571636609949577130']);
  1192. $body = '{"Account":"2423503330","ProductNumber":"PLM100020","Count":"1","UserOrderId":"49571636609949577130","OutOrderID":"211111135254371000","Status":"2","UserId":"211394995","TimesTamp":"1636610036767","Sign":"096017A3D80B998DC2AFA16779E09F9F","Extend":"{\"OfficialDes\":null,\"OfficialOrderID\":null}","ChargeMsg":""}';
  1193. $params = json_decode($body, true);
  1194. $provider = $this->getProvider('yanhao','RefillCallBack');
  1195. $ret = $provider->verify($params);
  1196. $resp = $provider->notify($params);
  1197. }
  1198. public function testYikatongfs()
  1199. {
  1200. $provider = $this->getProvider('yikatongfs');
  1201. // $resp = $provider->balance();
  1202. // $resp = $provider->add(13935705732, 5, 30, ['order_sn' => $this->make_sn()]);
  1203. $resp = $provider->query(['order_sn' => '30551636705402587123']);
  1204. // $body = '{"userid":"921416e51e434e0f94fa","ordernum":"34051636704939956177","mobile":"13935705732","timestamp":"20211112161545","state":"3","desc":"%E5%85%85%E5%80%BC%E5%A4%B1%E8%B4%A5%21","sign":"37cc198c1315c0a334f8c983f8dbec8a"}';
  1205. // $params = json_decode($body, true);
  1206. // $provider = $this->getProvider('yikatongfs','RefillCallBack');
  1207. // $ret = $provider->verify($params);
  1208. // $resp = $provider->notify($params);
  1209. }
  1210. public function testLexiang()
  1211. {
  1212. // $provider = $this->getProvider('lexianglt');
  1213. // $resp = $provider->balance();
  1214. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1215. // $resp = $provider->query(['order_sn' => '48911637136021090867']);
  1216. $body = '{"PostData":"405deLsCOS2UNQTOH\/M+3IWDDMm841EhhBwTgdasFvVqqVS3RHA6YdIzxAS2g8PIjmie1mOw+aNzXZ\/8rVR8lQTjoaeOCkE04cTc07JvDe1IDtvO2e66u+zzO+x0MUfU"}';
  1217. $params = json_decode($body, true);
  1218. $provider = $this->getProvider('lexianglt','RefillCallBack');
  1219. $ret = $provider->verify($params);
  1220. $resp = $provider->notify($params);
  1221. }
  1222. public function testXiaoniu_doubi()
  1223. {
  1224. // $provider = $this->getProvider('xiaoniu_doubi');
  1225. // $resp = $provider->balance();
  1226. // $resp = $provider->add(61841435, 7, 100, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100747']);
  1227. // $resp = $provider->query(['order_sn' => '22971637223235623767']);
  1228. $body = '{"content":"","realAmt":"92.0000","status":"1","timestamp":"20211118161507","sign":"28598a6c4674294aecb0337ef20b4e02","orderNo":"XN20211118161400122361716","mOrderNo":"22971637223235623767"}';
  1229. $params = json_decode($body, true);
  1230. $provider = $this->getProvider('xiaoniu_doubi','RefillCallBack');
  1231. $ret = $provider->verify($params);
  1232. $resp = $provider->notify($params);
  1233. }
  1234. public function testGuantu()
  1235. {
  1236. // $provider = $this->getProvider('guantu');
  1237. // $resp = $provider->balance();
  1238. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1239. // $resp = $provider->query(['order_sn' => '40161637563995487043']);
  1240. $body = '{"szOrderId":"40161637563995487043","fSalePrice":"28.53","szAgentId":"200013","nFlag":"2","szVerifyString":"ed8addb18ccbebe930807bf6f18ead1a","szPhoneNum":"18500608333","szRtnMsg":"113503308172111221453260242279","nDemo":"30"}';
  1241. $params = json_decode($body, true);
  1242. $provider = $this->getProvider('guantu','RefillCallBack');
  1243. $ret = $provider->verify($params);
  1244. $resp = $provider->notify($params);
  1245. }
  1246. public function testYiqian()
  1247. {
  1248. // $provider = $this->getProvider('yiqian');
  1249. // $resp = $provider->balance();
  1250. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1251. // $resp = $provider->query(['order_sn' => '12871637568430713782']);
  1252. $body = '{"extOrderId":"12871637568430713782","orderId":"R2021112216240026238817","salePrice":"9.9950","sign":"b42f61bfb59f9f36c26c68e4f37f5a19","state":"4","exchangeTraded":"110103308002111221607170298685"}';
  1253. $params = json_decode($body, true);
  1254. $provider = $this->getProvider('yiqian','RefillCallBack');
  1255. $ret = $provider->verify($params);
  1256. $resp = $provider->notify($params);
  1257. }
  1258. public function testYinghuochong()
  1259. {
  1260. // $provider = $this->getProvider('yinghuochong');
  1261. // $resp = $provider->balance();
  1262. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1263. // $resp = $provider->query(['order_sn' => '14911637655330156024']);
  1264. $body = '{"times":"20211123161536","orderId":"2021112316151926232932","voucher":"","customerOrderId":"14911637655330156024","qyKey":"qhsvsyvj9rsekyvadlctr1ptx135fb3t","sign":"15D3272BE7BB7B038EEC9EA344C86567","status":"2"}';
  1265. $params = json_decode($body, true);
  1266. $provider = $this->getProvider('yinghuochong','RefillCallBack');
  1267. $ret = $provider->verify($params);
  1268. $resp = $provider->notify($params);
  1269. }
  1270. public function testMeixu()
  1271. {
  1272. // $provider = $this->getProvider('meixu');
  1273. // $resp = $provider->balance();
  1274. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1275. // $resp = $provider->query(['order_sn' => '89361637662404606711']);
  1276. $body = '{"orderid":"XOJ21112318130505847","sporderid":"89361637662404606711","userid":"10003105","merchantsubmittime":"20211123181328","resultno":"9","parvalue":"10","remark1":"","payno":"","fundbalance":"-10.02","sign":"634194D21B034356F32C5A9FB045F23F"}';
  1277. $params = json_decode($body, true);
  1278. $provider = $this->getProvider('meixu','RefillCallBack');
  1279. $ret = $provider->verify($params);
  1280. $resp = $provider->notify($params);
  1281. }
  1282. public function testFuyuan()
  1283. {
  1284. // $provider = $this->getProvider('fuyuan');
  1285. // $resp = $provider->balance();
  1286. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1287. // $resp = $provider->query(['order_sn' => '60431637736327027514']);
  1288. $body = '{"agentid":"100354","mobile_num":"13699279618","charge_time":"20211124","operator":"\u79fb\u52a8","fy_order_no":"333876728","cp_order_no":"60431637736327027514","amount":"10","status":"3","sign":"3a271b104cb0c9d6d157e75e538c6b11","remark":"\u5145\u503c\u6210\u529f","flowNo":""}';
  1289. $params = json_decode($body, true);
  1290. $provider = $this->getProvider('fuyuan','RefillCallBack');
  1291. $ret = $provider->verify($params);
  1292. $resp = $provider->notify($params);
  1293. }
  1294. public function testAmingjd()
  1295. {
  1296. // $provider = new refill\amingjd\RefillPhone([]);
  1297. // $resp = $provider->add(13699279618, 5, 30, ['order_sn' => $this->make_sn()]);
  1298. // $resp = $provider->query(['order_sn' => '42301616475989518588']);
  1299. $body = '{"order_id":"83321616478215494884","mchid":"10003","tel":"13699279618","price":"30.00","sign":"01c49620c155a80bc43cecc2b1651868","status":"0","out_order_id":"0"}';
  1300. $params = json_decode($body, true);
  1301. refill\RefillFactory::instance()->notify('amingjd', $params);
  1302. }
  1303. public function testAmingjdmanPhone()
  1304. {
  1305. $provider = new refill\amingjdman\RefillPhone([]);
  1306. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1307. // $resp = $provider->query(['order_sn' => '82741619577673758623']);
  1308. $body = '{"order_id":"82741619577673758623","mchid":"10045","tel":"13699279618","price":"30.00","sign":"2fe55fb4d4b2acc2e98137adb82fa57e","status":"0","out_order_id":"0"}';
  1309. $params = json_decode($body, true);
  1310. refill\RefillFactory::instance()->notify('amingjdman', $params);
  1311. }
  1312. public function testWeishengyWtPhone()
  1313. {
  1314. $provider = new refill\weishengywt\RefillPhone([]);
  1315. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1316. // $resp = $provider->query(['order_sn' => '27681620538125370652']);
  1317. $data = '{"szOrderId":"27681620538125370652","fSalePrice":"47.5","szAgentId":"200045","nFlag":"2","szVerifyString":"92fafec121b77518d539ed9f5005fdf9","szPhoneNum":"18500608333","szRtnMsg":"110103308032105091328520502948","nDemo":"50"}';
  1318. $params = json_decode($data, true);
  1319. refill\RefillFactory::instance()->notify('weishengywt', $params);
  1320. }
  1321. public function testWeishengyJDPhone()
  1322. {
  1323. $provider = new refill\weishengyjd\RefillPhone([]);
  1324. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1325. // $resp = $provider->query(['order_sn' => '14261620887423822879']);
  1326. $data = '{"szOrderId":"14261620887423822879","fSalePrice":"44.0","szAgentId":"200050","nFlag":"3","szVerifyString":"3cceef390602058e1d2fdde2e07636a4","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  1327. $params = json_decode($data, true);
  1328. refill\RefillFactory::instance()->notify('weishengyjd', $params);
  1329. }
  1330. public function testYeziPhone()
  1331. {
  1332. $provider = new refill\yezi\RefillPhone([]);
  1333. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1334. // $resp = $provider->query(['order_sn' => '35261620988265145105']);
  1335. $data = '{"mchid":"10147","order_sn":"35261620988265145105","amount":"50.00","cardno":"18500608333","trade_no":"6363570674332280422825","idcard":"","card_name":"","official_sn":"","message":"","state":"CANCEL","sign":"b79f2ddbb5b7eef98f414585a5bd2cde"}';
  1336. $params = json_decode($data, true);
  1337. refill\RefillFactory::instance()->notify('yezi', $params);
  1338. }
  1339. public function testWeishengysixPhone()
  1340. {
  1341. $provider = new refill\weishengysix\RefillPhone([]);
  1342. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1343. // $resp = $provider->query(['order_sn' => '17171624434289348649']);
  1344. $data = '{"szOrderId":"17171624434289348649","fSalePrice":"44.5","szAgentId":"200074","nFlag":"2","szVerifyString":"fa5735090199d97e6a50e7f3083be111","szPhoneNum":"18500608333","szRtnMsg":"AW2021062315464045A27","nDemo":"50"}';
  1345. $params = json_decode($data, true);
  1346. refill\RefillFactory::instance()->notify('weishengysix', $params);
  1347. }
  1348. public function testHaohaoOil()
  1349. {
  1350. $provider = new refill\haohao\RefillOil([]);
  1351. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1352. $data['amount'] = 20000;
  1353. $data['mchId'] = 467253;
  1354. $data['mchOrderNo'] = '5514850674656058146707';
  1355. $data['mobile'] = '';
  1356. $data['sign'] = 'F282D68972A437F3CEB3516BB2FDD19A';
  1357. $data['operator'] = 4;
  1358. $data['number'] = '1000113200020348885';
  1359. $data['thirdOrderNo'] = '2317184088901537792';
  1360. $data['directStatus'] = 5;
  1361. // $input = json_decode($data, true);
  1362. refill\RefillFactory::instance()->notify('haohao',$data);
  1363. }
  1364. public function testJuzhuoOil()
  1365. {
  1366. $provider = new refill\juzhuo\RefillOil([]);
  1367. // $resp = $provider->add(1000111100021211884, 2, 200, ['order_sn' => $this->make_sn()]);
  1368. // $resp = $provider->query(['order_sn' => '20121621578185774451']);
  1369. // $data = '{"channelsort":"OIL_CARD","channelno":"185176855832","onlystr":"20121621578185774451","channel":"JD","sign":"34dce9329fef7997c134987247ac6ee1","amt":"200","notifyurl":"https:\/\/www.xyzshops.cn\/mobile\/signature.php","cardtype":"Sinoepc","cardno":"1000111100021211884","orgid":"6095171500","account":"","status":"2"}';
  1370. // $input = json_decode($data, true);
  1371. $data['channelsort'] = 'OIL_CARD';
  1372. $data['channelno'] = '';
  1373. $data['onlystr'] = '0772770675248490450497';
  1374. $data['channel'] = 'JD';
  1375. $data['sign'] = '4a9f113bfa4aa2d155de7136ca0afe2d';
  1376. $data['amt'] = '100';
  1377. $data['notifyurl'] = 'http://121.89.212.167/racc/callback/lingzh/juzhuo.php';
  1378. $data['cardtype'] = 'Sinoepc';
  1379. $data['cardno'] = '1000113200029532754';
  1380. $data['orgid'] = '6095171500';
  1381. $data['account'] = '';
  1382. $data['status'] = '3';
  1383. refill\RefillFactory::instance()->notify('juzhuo',$data);
  1384. }
  1385. public function testZeheng()
  1386. {
  1387. $provider = new refill\zeheng\RefillOil([]);
  1388. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  1389. // $resp = $provider->query(['order_sn' => '45951620814813332604']);
  1390. $data = '{"extOrderId":"45951620814813332604","orderId":"R2021051218240000192928","salePrice":"96.8000","sign":"0d6b9641eaf8d36ecba82cfefc6aa307","state":"4"}';
  1391. $input = json_decode($data, true);
  1392. refill\RefillFactory::instance()->notify('zeheng',$input);
  1393. }
  1394. public function testXiaoniu()
  1395. {
  1396. $provider = $this->getProvider('xiaoniu','RefillOil');
  1397. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 500, ['order_sn' => $this->make_sn()]);
  1398. $resp = $provider->query(['order_sn' => '15981632813532634860']);
  1399. // $data = '{"content":"\u3010\u4e2d\u56fd\u77f3\u5316\u3011\u60a8\u5c3e\u53f7\u4e3a211884\u7684\u52a0\u6cb9\u5361\u4e8e07\u670809\u65e5 16\u65f630\u5206\u5145\u503c\u6210\u529f,\u91d1\u989d500\u5143,\u8ba2\u5355\u53f7:2521070916304172","realAmt":"490.0000","status":"1","timestamp":"20210709163042","sign":"110aaae89243c9ed2d6aa4d753597224","orderNo":"XN20210709162351796707722","mOrderNo":"39911625819031601073"}';
  1400. // $input = json_decode($data, true);
  1401. // refill\RefillFactory::instance()->notify('xiaoniu',$input);
  1402. // $resp = $provider->balance();
  1403. }
  1404. public function testYingdian()
  1405. {
  1406. $provider = $this->getProvider('yingdian','RefillOil');
  1407. $resp = $provider->balance();
  1408. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 200, ['order_sn' => $this->make_sn()]);
  1409. // $resp = $provider->query(['order_sn' => '94691626688509004979']);
  1410. // $resp = $provider->query(['order_sn' => '45671626687631917892']);
  1411. // $data = '{"orderNo":"94691626688509004979","vouchers":"[\"2421071918070053\"]","orderId":"63400811-e877-11eb-a89f-00163e147a9b","spOrderNo":"052423YK241720210719175503603473","status":"SUCCESS"}';
  1412. // $input = json_decode($data, true);
  1413. // refill\RefillFactory::instance()->notify('yingdian',$input);
  1414. }
  1415. public function testZhenqi()
  1416. {
  1417. $provider = new refill\zhenqi\RefillPhone([]);
  1418. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1419. // $resp = $provider->query(['order_sn' => '42611626267945146350']);
  1420. // $data = '{"out_trade_no":"14001626266194932132","create_time":"1626266201","sp_order_no":"110103353232107142044550619272","status":"1","sign":"3C2F8ED40EEB9151D2117E2DA1FA64AA"}';
  1421. // $input = json_decode($data, true);
  1422. // refill\RefillFactory::instance()->notify('zhenqi',$input);
  1423. $resp = $provider->balance();
  1424. }
  1425. public function testYunsuoyaofs()
  1426. {
  1427. $provider = new refill\yunsuoyaofs\RefillPhone([]);
  1428. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1429. // $resp = $provider->query(['order_sn' => '85681626322286098163']);
  1430. // $data = '{"orderid":"AMU21071512111544162","sporderid":"85681626322286098163","userid":"10002671","merchantsubmittime":"20210715121132","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.7","sign":"45ECFF26E84F7DC3BFFDCFAFF3B1E561"}';
  1431. // $input = json_decode($data, true);
  1432. // refill\RefillFactory::instance()->notify('yunsuoyaofs',$input);
  1433. $resp = $provider->balance();
  1434. }
  1435. public function testZhenqi1m()
  1436. {
  1437. $provider = new refill\zhenqi1m\RefillPhone([]);
  1438. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1439. // $resp = $provider->query(['order_sn' => '45611626334593130605']);
  1440. // $data = '{"out_trade_no":"45611626334593130605","create_time":"1626334606","sp_order_no":"202107152200117311004426885635","status":"1","sign":"CF8EB902F60B76591C898C991361BB4D"}';
  1441. // $input = json_decode($data, true);
  1442. // refill\RefillFactory::instance()->notify('zhenqi1m',$input);
  1443. $resp = $provider->balance();
  1444. }
  1445. public function testHongxudayz()
  1446. {
  1447. $provider = new refill\hongxudayz\RefillPhone([]);
  1448. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1449. // $resp = $provider->query(['order_sn' => '78221626445316011524']);
  1450. $data = '{"sale_value":"29.76","supply_id":"18789504","order_status":"0","mer_oid":"78221626445316011524","phone_no":"18500608333","mer_id":"yzhfcz","sale_discount":"0.992","sign":"51696429B62E74266516326279C2C97B","cp_id":"","product_no":"HFLTBJ_****00003000","product_face":"30","cp_ctype":""}';
  1451. $input = json_decode($data, true);
  1452. refill\RefillFactory::instance()->notify('hongxudayz',$input);
  1453. }
  1454. public function testHongxudagy()
  1455. {
  1456. $provider = new refill\hongxudagy\RefillPhone([]);
  1457. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1458. // $resp = $provider->query(['order_sn' => '86521626446475240639']);
  1459. // $data = '{"sale_value":"29.76","supply_id":"18790079","order_status":"0","mer_oid":"86521626446475240639","phone_no":"18500608333","mer_id":"bjgyfl","sale_discount":"0.992","sign":"9BDA608364D4E08C653E8C6798151AC2","cp_id":"","product_no":"HFLTBJ_****00003000","product_face":"30","cp_ctype":""}';
  1460. // $input = json_decode($data, true);
  1461. // refill\RefillFactory::instance()->notify('hongxudagy',$input);
  1462. $resp = $provider->balance();
  1463. }
  1464. public function testHongxudayz996()
  1465. {
  1466. $provider = new refill\hongxudayz996\RefillPhone([]);
  1467. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1468. // $resp = $provider->query(['order_sn' => '73691626753698522472']);
  1469. $data = '{"sale_value":"29.88","supply_id":"18888477","order_status":"3","mer_oid":"73691626753698522472","phone_no":"18500608333","mer_id":"bjyz2","sale_discount":"0.996","sign":"8E98EA2B6B81D832EBA8F89611A3F9B9","cp_id":"","product_no":"HFLTBJ_****00003000","product_face":"30","cp_ctype":""}';
  1470. $input = json_decode($data, true);
  1471. refill\RefillFactory::instance()->notify('hongxudayz996',$input);
  1472. }
  1473. public function testHongxudagy996()
  1474. {
  1475. $provider = new refill\hongxudagy996\RefillPhone([]);
  1476. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1477. // $resp = $provider->query(['order_sn' => '87681626758209689412']);
  1478. $data = '{"sale_value":"29.88","supply_id":"18889758","order_status":"3","mer_oid":"87681626758209689412","phone_no":"18500608333","mer_id":"bjgy2","sale_discount":"0.996","sign":"0CBA5B8F34D40914CB86CC74BE8EF15B","cp_id":"","product_no":"HFLTBJ_****00003000","product_face":"30","cp_ctype":""}';
  1479. $input = json_decode($data, true);
  1480. refill\RefillFactory::instance()->notify('hongxudagy996',$input);
  1481. }
  1482. public function testYunchonggong()
  1483. {
  1484. $provider = $this->getProvider('yunchonggong');
  1485. // $resp = $provider->balance();
  1486. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1487. $resp = $provider->query(['order_sn' => '59901635220132734124']);
  1488. $body = '{"orderId":"211026114901000481","appId":"c4vuuOV43q","outOrderId":"59901635220132734124","sign":"4749539f129242a13f1f083dbc114f23","orderStatus":"3","completeTime":"20211026115027","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1489. $params = json_decode($body, true);
  1490. $provider = $this->getProvider('yunchonggong', 'RefillCallback');
  1491. $ret = $provider->verify($params);
  1492. $resp = $provider->notify($params);
  1493. }
  1494. public function testBingdht()
  1495. {
  1496. $provider = new refill\bingdht\RefillPhone([]);
  1497. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1498. // $resp = $provider->query(['order_sn' => '62491626761331174794']);
  1499. // $data = '{"szOrderId":"62491626761331174794","fSalePrice":"45.25","szAgentId":"200044","nFlag":"3","szVerifyString":"46745191d31b16ee7978a7f5554357d6","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  1500. // $input = json_decode($data, true);
  1501. // refill\RefillFactory::instance()->notify('bingdht',$input);
  1502. $resp = $provider->balance();
  1503. }
  1504. public function testYuecheng()
  1505. {
  1506. $provider = new refill\yuecheng\RefillPhone([]);
  1507. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1508. // $resp = $provider->query(['order_sn' => '45101626776884387650']);
  1509. $data = '{"ste":"0","cpid":"982100572516571","sign":"E0347851C8395B4FC08DA51FC650ABDA","dm":"49.6500","pid":"HFLTBJ_****00005000","oid":"45101626776884387650","sid":"200014603779","ct":"","tf":"50.0000","nb":"1","cardinfo":"","salevalue":"49.6500","pn":"18500608333","cid":"gyhf"}';
  1510. $input = json_decode($data, true);
  1511. refill\RefillFactory::instance()->notify('yuecheng',$input);
  1512. }
  1513. public function testPrice()
  1514. {
  1515. $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
  1516. $rate = 0.994;
  1517. foreach ($amounts as $amount) {
  1518. $price[] = $amount * $rate;
  1519. }
  1520. }
  1521. public function testCallbackDir()
  1522. {
  1523. $path = "/callback";
  1524. $file = "/mobile/callback/refill_call.php";
  1525. $basename = basename($file);
  1526. $tmp = "{$path}/{$basename}.php";
  1527. return file_exists($tmp);
  1528. }
  1529. public function testWeisPhone()
  1530. {
  1531. $provider = new refill\weisyd\RefillPhone([]);
  1532. $resp = $provider->add(17801048874, 4, 10, ['order_sn' => $this->make_sn()]);
  1533. }
  1534. public function testXcPhone()
  1535. {
  1536. $provider = new refill\xc\RefillPhone([]);
  1537. $resp = $provider->add(13699279618, 5, 100, ['order_sn' => $this->make_sn()]);
  1538. // $resp = $provider->query(['order_sn' => '87961616926444043617']);
  1539. $params['pay_orderid'] = '87961616926444043617';
  1540. $params['pay_iphone'] = '18500608333';
  1541. $params['pay_money'] = '100';
  1542. $params['wt_orderid'] = '202103281816121070';
  1543. $params['status'] = '1';
  1544. $params['sign'] = 'f7be2e859a5a6dc7b1a8273361617752';
  1545. // refill\RefillFactory::instance()->notify('xc',$params);
  1546. }
  1547. public function testAfandPhone()
  1548. {
  1549. $provider = new refill\afand\RefillPhone([]);
  1550. // for ($i = 3; $i > 0; --$i) {
  1551. $resp = $provider->query(['order_sn' => '540668612768904780']);
  1552. // }
  1553. }
  1554. public function testAfandengPhone()
  1555. {
  1556. $provider = new refill\afandeng\RefillPhone([]);
  1557. // for ($i = 5; $i > 0; --$i) {
  1558. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1559. // }
  1560. // $resp = $provider->query(['order_sn' => '20941616115610023539']);
  1561. // $params['usr'] = 'afandeng';
  1562. // $params['ord'] = '20941616115610023539';
  1563. // $params['state'] = '2';
  1564. // $params['bz'] = '';
  1565. // $params['sgn'] = 'BA2C9D379C3EB648A0B7AAB3A21A3F6A';
  1566. // refill\RefillFactory::instance()->notify('afandeng',$params);
  1567. }
  1568. public function testWantongPhone()
  1569. {
  1570. $provider = new refill\wantong\RefillPhone([]);
  1571. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1572. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1573. $resp = $provider->query(['order_sn' => '26061618988575301841']);
  1574. $data = '{"uid":"97396885","order_no":"26061618988575301841","mobile_order_no":"","phone_number":"13699279618","face_value":"3000","status":"9","sign":"1a019202656cf4feffe715025fab01bf"}';
  1575. $input = json_decode($data, true);
  1576. // refill\RefillFactory::instance()->notify('wantong',$input);
  1577. }
  1578. public function testXunyinPhone()
  1579. {
  1580. $provider = $this->getProvider('xunyin');
  1581. $resp = $provider->balance();
  1582. // $resp = $provider->add(17703711950, 6, 30, ['order_sn' => $this->make_sn()]);
  1583. // $resp = $provider->query(['order_sn' => '76831617176125893158']);
  1584. // $xml = '<Order><cpid>8417</cpid><orderid>40591617173295524057</orderid><order_no>14784226</order_no><msg>充值中</msg><Code>0000</Code><Cards/></Order>';
  1585. // $resp = $provider->xmlToArray($xml);
  1586. // if ($resp['Code'] === '0000') {
  1587. // return [true, $resp['order_no'], false];
  1588. // } else {
  1589. // return [false, $resp['msg'], false];
  1590. // }
  1591. // $params['ext'] = '';
  1592. // $params['code'] = '8888';
  1593. // $params['sign'] = '428ac223cf3a1f6f3d382aac754e8e17';
  1594. // $params['statemes'] = '成功';
  1595. // $params['id'] = '76831617176125893158';
  1596. // $params['userid'] = '8417';
  1597. // $params['operatorid'] = '1000000083421033115583773201';
  1598. // $params['status'] = 'SUCCESS';
  1599. // refill\RefillFactory::instance()->notify('xunyin',$params);
  1600. $resp = $provider->balance();
  1601. }
  1602. public function testFenshengPhone()
  1603. {
  1604. $file = BASE_HELPER_RAPI_PATH . "/qianqian/RefillPhone.php";
  1605. if(!file_exists($file)){
  1606. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  1607. return false;
  1608. } else {
  1609. require_once($file);
  1610. Log::record("file={$file} load success.",Log::DEBUG);
  1611. }
  1612. $provider = new refill\qianqian\RefillPhone([]);
  1613. $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1614. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  1615. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  1616. // $datas = json_decode($datas,true);
  1617. // foreach ($datas as $data) {
  1618. // refill\RefillFactory::instance()->notify('fensheng',$data);
  1619. // }
  1620. }
  1621. public function testQianqianPhone()
  1622. {
  1623. $provider = new refill\qianqian\RefillPhone([]);
  1624. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1625. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  1626. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  1627. // $datas = json_decode($datas,true);
  1628. // foreach ($datas as $data) {
  1629. // refill\RefillFactory::instance()->notify('fensheng',$data);
  1630. // }
  1631. $resp = $provider->balance();
  1632. }
  1633. public function testQianqianmanPhone()
  1634. {
  1635. $provider = new refill\qianqianman\RefillPhone([]);
  1636. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1637. // $resp = $provider->query(['order_sn' => '72011621236975003462']);
  1638. $data = '{"orderNo":"F2105171538062539442","status":"019","consumerNo":"72011621236975003462","voucherNo":null,"mobile":"13699279618"}';
  1639. $input = json_decode($data, true);
  1640. refill\RefillFactory::instance()->notify('qianqianman',$input);
  1641. }
  1642. public function testRiyingPhone()
  1643. {
  1644. $provider = new refill\riying\RefillPhone([]);
  1645. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1646. $resp = $provider->query(['ch_trade_no' => '2021041311120213187423105022']);
  1647. $data = '{"UserId":"10050","SysOrderId":"2021041311120213187423105022","OrderId":"15641618283518423567","State":"4","Timestamp":"1618283565746","VoucherType":"1","VoucherContent":"511009928000087852","Sign":"a6ec70a3ea42baae941528398c6d0a43"}';
  1648. $input = json_decode($data, true);
  1649. // refill\RefillFactory::instance()->notify('riying',$input);
  1650. }
  1651. public function testWeishengyPhone()
  1652. {
  1653. $provider = new refill\weishengy\RefillPhone([]);
  1654. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1655. // $resp = $provider->query(['order_sn' => '15551618590601301527']);
  1656. $data = '{"masId":"699270071532654592","oids":"158877719094,166090529155,158887187476","orderNo":"62411618635377880788","orderPrice":"150.00","phone":"18500608333","sign":"3EC10A32FC4CCC976048E1164D0FCBF6","status":"1","time":"1618643281063","type":"2"}';
  1657. $input = json_decode($data, true);
  1658. refill\RefillFactory::instance()->notify('weishengy',$input);
  1659. }
  1660. public function testWailingPhone()
  1661. {
  1662. $provider = new refill\wailing\RefillPhone([]);
  1663. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1664. $resp = $provider->query(['order_sn' => '73241618543784045618']);
  1665. $data = '{"order_id":"73241618543784045618","mchid":"10045","tel":"13699279618","price":"30.00","sign":"4991de3e40f14c198b8c194455ea021b","status":"0","out_order_id":"0"}';
  1666. $input = json_decode($data, true);
  1667. // refill\RefillFactory::instance()->notify('wailing',$input);
  1668. }
  1669. public function testShengyingPhone()
  1670. {
  1671. $provider = new refill\shengying\RefillPhone([]);
  1672. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1673. $resp = $provider->query(['order_sn' => '37571618805115582483']);
  1674. $data = '{"TaskID":"129636","Mobile":"13699279618","Status":"4","ReportTime":"2021-04-19T12:06:16.050","ReportCode":"1:511531522026586295","OutTradeNo":"37571618805115582483","ReceiptNum":"511531522026586295","Sign":"a7f46a988bc8483091d94130804e5078"}';
  1675. $input = json_decode($data, true);
  1676. // refill\RefillFactory::instance()->notify('shengying',$input);
  1677. }
  1678. public function testYunlingPhone()
  1679. {
  1680. $provider = new refill\yunling\RefillPhone([]);
  1681. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1682. // $resp = $provider->query(['order_sn' => '73791623147517199719']);
  1683. // $data = '{"orderid":"EAF21060818183032772","sporderid":"73791623147517199719","userid":"10002504","merchantsubmittime":"20210608181912","resultno":"1","parvalue":"30","remark1":"1000000083421060818483137636","payno":"1000000083421060818483137636","fundbalance":"-28.59","sign":"8D77517AC3905ED88BF79EE789A5FA86"}';
  1684. // $input = json_decode($data, true);
  1685. // refill\RefillFactory::instance()->notify('yunling',$input);
  1686. $resp = $provider->balance();
  1687. }
  1688. public function testZhongstPhone()
  1689. {
  1690. $provider = new refill\zhongst\RefillPhone([]);
  1691. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1692. // $resp = $provider->query(['order_sn' => '48941618981770389271']);
  1693. // $data = ' {"szOrderId":"66571619060147539784","fSalePrice":"46.5","szAgentId":"200030","nFlag":"2","szVerifyString":"c1e88701b89a4887996822d708bed5f5","szPhoneNum":"13699279618","szRtnMsg":"161122673971","nDemo":"50"}';
  1694. // $input = json_decode($data, true);
  1695. // refill\RefillFactory::instance()->notify('zhongst',$input);
  1696. $resp = $provider->balance();
  1697. }
  1698. public function testXunaoPhone()
  1699. {
  1700. $provider = new refill\xunao\RefillPhone([]);
  1701. // $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  1702. // $resp = $provider->query(['order_sn' => '40021619431386253803', 'card_no' => 18074608795, 'card_type' => 6]);
  1703. // $data = '{"amount":"10.00","orderNo":"40021619431386253803","supplierId":"10","orderId":"S20210426180311761051424910","notifyTime":"1619431456411","sign":"c4eef22091831104be7ae95a0292c703","discountAmount":"0.50","phoneNo":"18074608795","queryUrl":"https:\/\/www.189.cn\/client\/wap\/wapproject\/wapclient\/feecharge\/feecharge_result.html?sessionid=f633d8a270aa4e5892d0f7ca6f09e95e","payType":"alipay","ticketNo":"1000000083421042618356072935","company":"dx","status":"2"}';
  1704. // $input = json_decode($data, true);
  1705. // refill\RefillFactory::instance()->notify('xunao',$input);
  1706. $resp = $provider->balance();
  1707. }
  1708. public function testYonghePhone()
  1709. {
  1710. $provider = new refill\yonghe\RefillPhone([]);
  1711. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1712. // $resp = $provider->query(['order_sn' => '20461619597297972685']);
  1713. // $data = '{"szOrderId":"20461619597297972685","fSalePrice":"29.955","szAgentId":"200115","nFlag":"2","szVerifyString":"b5c292a13c5e67a9b850eb37239682ae","szPhoneNum":"13699279618","szRtnMsg":"2021042822001139701437383521","nDemo":"30"}';
  1714. // $input = json_decode($data, true);
  1715. // refill\RefillFactory::instance()->notify('yonghe',$input);
  1716. $resp = $provider->balance();
  1717. }
  1718. public function testJumiPhone()
  1719. {
  1720. $provider = new refill\jumikc\RefillPhone([]);
  1721. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1722. // $resp = $provider->query(['order_sn' => '12161619768293529384']);
  1723. // $data = '{"order_no":"12161619768293529384","channel_order_no":"C2104300338227862125","status":1,"money":"50.00","cost_money":"48.60","mch_no":210303112631,"account":"13699279618","official_sn":"","sign":"efa99b969f318ef934d8120ccfc77c3e"}';
  1724. // $input = json_decode($data, true);
  1725. // refill\RefillFactory::instance()->notify('jumi',$input);
  1726. $resp = $provider->balance();
  1727. }
  1728. public function testJumiOil()
  1729. {
  1730. $provider = new refill\jumi\RefillOil([]);
  1731. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1732. // $resp = $provider->query(['order_sn' => '29021620617872685187']);
  1733. $data = '{"order_no":"29021620617872685187","channel_order_no":"C2105101138061082025","status":1,"money":"100.00","cost_money":"98.00","mch_no":210303112631,"account":"1000111100021211884","official_sn":"","sign":"0914807052a04282aeb855f459fcc7b7"}';
  1734. $input = json_decode($data, true);
  1735. refill\RefillFactory::instance()->notify('jumi',$input);
  1736. }
  1737. public function testFengyePhone()
  1738. {
  1739. $provider = new refill\fengye\RefillPhone([]);
  1740. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  1741. // $resp = $provider->query(['order_sn' => '53511620355988978053', 'card_no' => 18074608795, 'card_type' => 6]);
  1742. $data = '{"amount":"50.00","orderNo":"53511620355988978053","supplierId":"13","orderId":"S20210507105309202749918513","notifyTime":"1620356062365","sign":"371260b007f2e64d86873ce3ede67fa3","discountAmount":"2.50","phoneNo":"18074608795","queryUrl":"https:\/\/www.189.cn\/client\/wap\/wapproject\/wapclient\/feecharge\/feecharge_result.html?sessionid=e896e66c2e134ba3b469b26df34d12d1","payType":"wechat","ticketNo":"1000000083421050710397228882","company":"dx","status":"2"}';
  1743. $input = json_decode($data, true);
  1744. refill\RefillFactory::instance()->notify('fengye',$input);
  1745. }
  1746. public function testYunsuoyaoPhone()
  1747. {
  1748. $provider = new refill\yunsuoyao\RefillPhone([]);
  1749. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1750. // $resp = $provider->query(['order_sn' => '20431621331092296201']);
  1751. // $data = '{"orderid":"RLU21051817441937847","sporderid":"20431621331092296201","userid":"10002501","merchantsubmittime":"20210518174858","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.74","sign":"426EAC103B79505BAE7AB3F16886F1A8"}';
  1752. // $input = json_decode($data, true);
  1753. // refill\RefillFactory::instance()->notify('yunsuoyao',$input);
  1754. $resp = $provider->balance();
  1755. }
  1756. public function testAfdPhone()
  1757. {
  1758. $provider = new refill\afd\RefillPhone([]);
  1759. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1760. // $resp = $provider->query(['order_sn' => '71001621233525947994']);
  1761. $data = '{"code":"000","merchantorderId":"71001621233525947994","platformorderid":"aab01693204b95c4df1268313","orderid":"经度110103308082105171438580570638","rechargeno":"18500608333","amount":"50.00","payamount":"47.40000","rechargestate":"99","createtime":"2021-05-17 14:38:29","sign":"62d9af5833e1bf489998a0425107573f"}';
  1762. $input = json_decode($data, true);
  1763. refill\RefillFactory::instance()->notify('afd',$input);
  1764. }
  1765. public function testLuqianPhone()
  1766. {
  1767. $provider = new refill\luqian\RefillPhone([]);
  1768. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1769. $resp = $provider->query(['order_sn' => '2829660672500596314764']);
  1770. $data = '{"amount":"100","charge_type":"0","code":"1","partner_id":"38","phone":"18500608333","sign":"c2c86cccc73fa991a63c369e683c91f2","partner_order_no":"34101618897099329575","official_order_id":"110103308072104201338340278420"}';
  1771. $input = json_decode($data, true);
  1772. // refill\RefillFactory::instance()->notify('luqian',$input);
  1773. }
  1774. public function testAfandfsPhone()
  1775. {
  1776. $provider = new refill\afandfs\RefillPhone([]);
  1777. // $resp = $provider->add(15139608757, 4, 30, ['order_sn' => $this->make_sn()]);
  1778. // $resp = $provider->query(['order_sn' => '65101618975926761630']);
  1779. // $data = '{"amount":"30","charge_type":"2","code":"1","partner_id":"52","phone":"15139608757","sign":"a7f54c1ac3e1af72f9fc849086cc4bec","partner_order_no":"65101618975926761630","official_order_id":"20210421113256628350"}';
  1780. // $input = json_decode($data, true);
  1781. // refill\RefillFactory::instance()->notify('afandfs',$input);
  1782. $resp = $provider->balance();
  1783. }
  1784. public function testYunlingfsPhone()
  1785. {
  1786. $provider = new refill\yunlingfs\RefillPhone([]);
  1787. // $resp = $provider->add(15139608757, 4, 50, ['order_sn' => $this->make_sn()]);
  1788. // $resp = $provider->query(['order_sn' => '79251623739433607563']);
  1789. // $data = '{"orderid":"BGC21061514434393910","sporderid":"79251623739433607563","userid":"10002543","merchantsubmittime":"20210615144434","resultno":"1","parvalue":"50","remark1":"20210615144420321813","payno":"20210615144420321813","fundbalance":"-47.65","sign":"6B9B7C15A3F9CBC773562327B6744B1E"}';
  1790. // $input = json_decode($data, true);
  1791. // refill\RefillFactory::instance()->notify('yunlingfs',$input);
  1792. $resp = $provider->balance();
  1793. }
  1794. public function testTianchengPhone()
  1795. {
  1796. $provider = new refill\tiancheng\RefillPhone([]);
  1797. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1798. // $resp = $provider->query(['order_sn' => '15301619399212504464']);
  1799. // $data = ' {"result":"fail","msg":"0","order":"null","phone_no":"13699279618","amount":"10","op_no":"84801619340283980506","settle":"0","sign":"D64039ED791920B08BDA9DD95700C0E6"}';
  1800. // $input = json_decode($data, true);
  1801. // refill\RefillFactory::instance()->notify('tiancheng',$input);
  1802. $resp = $provider->balance();
  1803. }
  1804. public function testLingzhPhone()
  1805. {
  1806. $provider = new refill\lingzh\RefillPhone([]);
  1807. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1808. // $resp = $provider->query(['order_sn' => '59911615124025101286']);
  1809. $resp = $provider->balance();
  1810. // $input['usr'] = 1;
  1811. // $input['ord'] = '52741615119546453690';
  1812. // $input['bz'] = '';
  1813. // $input['state'] = 2;
  1814. // $input['sgn'] = 'FFCBB75C307154DD306F4EC75BB69A6D';
  1815. // refill\RefillFactory::instance()->notify('lingzh',$input);
  1816. }
  1817. public function testAfandnewPhone()
  1818. {
  1819. $provider = new refill\afandnew\RefillPhone([]);
  1820. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1821. // $resp = $provider->query(['order_sn' => '45371617101073876975', 'ch_trade_no' => '33018443659736309']);
  1822. $params = '{"amount":"100","carrierOrderNo":null,"mobile":"18500608333","orderNo":"45371617101073876975","orderStatus":3,"sign":"8DE392AD6B4730AD9EE0FC2B95BBDF17","tradeNo":"33018443659736309"}';
  1823. $input = json_decode($params, true);
  1824. refill\RefillFactory::instance()->notify('afandnew', $input);
  1825. }
  1826. public function testYifaPhone()
  1827. {
  1828. $provider = new refill\yifa\RefillPhone([]);
  1829. $resp = $provider->add(15120035568, 5, 50, ['order_sn' => $this->make_sn()]);
  1830. }
  1831. public function testTianjtOil()
  1832. {
  1833. $cardno = 1000111100021211884;
  1834. $provider = new refill\tianjt\RefillOil([]);
  1835. $resp = $provider->add($cardno, 2, 500, ['order_sn' => $this->make_sn()]);
  1836. }
  1837. public function testWeitPhone()
  1838. {
  1839. $provider = new refill\weit\RefillPhone([]);
  1840. for ($i = 0; $i <= 10; $i++) {
  1841. $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1842. }
  1843. }
  1844. public function testWeitCB()
  1845. {
  1846. $params['sign'] = 'af820c33472f4b571fa0c48483dfb975';
  1847. $params['status'] = 0;
  1848. $params['price'] = 30;
  1849. $params['op_order_id'] = '';
  1850. $params['mch_order_id'] = '900664281823957221';
  1851. $params['pt_order_id'] = '2021011802434412825405218901';
  1852. $params['pay_type'] = '';
  1853. $params['tel'] = 18500608333;
  1854. $params['mchid'] = 10014;
  1855. $resp = http_request($this->mReqHost . "/mobile/refill_weit.php", $params, 'POST');
  1856. }
  1857. public function testYifaCB()
  1858. {
  1859. $body = '{"app_id":"e4a61b2acf1119c72c1ed9b61781494e","nonce_str":"OQMEBRQWJGPKOWYUXDVPTNMLEQJHXFWG","timestamp":1610275083,"order_sn":"161027325773032634","coder_order_sn":"60641610273255214687","isp_order_sn":null,"phone":"15120035568","amount":"94.000","discount":"0.9400","create_time":"2021-01-10 18:07:42","recharge_time":"","status":"fail","channel_id":3,"sign":"47278AD74EFA7F5FC8DE3A6D362C409B"}';
  1860. $input = json_decode($body, true);
  1861. refill\RefillFactory::instance()->notify('yifa', $input);
  1862. }
  1863. public function testBjbQuery()
  1864. {
  1865. $provider = new refill\bjb\RefillPhone([]);
  1866. $refill_info = ['order_sn' => 110667993758599771, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  1867. $resp = $provider->query($refill_info);
  1868. }
  1869. public function testXcQuery()
  1870. {
  1871. $provider = new refill\xc\RefillPhone([]);
  1872. $refill_info = ['order_sn' => 950663423236726632, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  1873. $resp = $provider->query($refill_info);
  1874. }
  1875. public function testTianjtQuery()
  1876. {
  1877. $provider = new refill\tianjt\RefillOil([]);
  1878. $refill_info = ['order_sn' => 680665862267622221, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  1879. $resp = $provider->query($refill_info);
  1880. }
  1881. public function testSaihuOil()
  1882. {
  1883. $provider = new refill\saihu\RefillOil([]);
  1884. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1885. }
  1886. public function testBdtOil()
  1887. {
  1888. $provider = new refill\bdt\RefillOil([]);
  1889. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => '200229600556618886']);
  1890. }
  1891. public function testGFTDOil()
  1892. {
  1893. $provider = new refill\gftd\RefillOil([]);
  1894. $resp = $provider->add(1000111100020445281, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  1895. }
  1896. public function testYichangtOil()
  1897. {
  1898. $provider = new refill\yichangt\RefillOil([]);
  1899. $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 200, ['order_sn' => $this->make_sn()]);
  1900. // $resp = $provider->query(['order_sn' => '87591620379260314044']);
  1901. $data = '{"appid":"app570259129507","order_id":"M202105077888184428723706","merchant_order_id":"82231620378877155624","status":"3","cash":"100","time":"1620378961450","nonce":"2fad56d59a9f46d896c15b0cff74bc","signature":"57a6d24ec376b58bb433cfcf8528d53cb276eac8"}';
  1902. $input = json_decode($data, true);
  1903. // refill\RefillFactory::instance()->notify('yichangt',$input);
  1904. }
  1905. public function testGFTDCB()
  1906. {
  1907. $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","storage":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
  1908. $url = "http://192.168.1.220/mobile/refill_gftd.php?" . $data;
  1909. $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
  1910. }
  1911. public function testJiecPhone()
  1912. {
  1913. $provider = new refill\jiec\RefillPhone([]);
  1914. $resp = $provider->add('18500608333', 5, 30, ['order_sn' => $this->make_sn()]);
  1915. }
  1916. public function testBxtwtCB()
  1917. {
  1918. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  1919. }
  1920. public function testTianjtJDVerify()
  1921. {
  1922. $data = 'onlystr=920661883198026632&sign=533151e3f0dff5f507786aabc37b18f7&amt=100&notifyurl=https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_tianjt.php&jdno&cardtype=Sinoepc&batchid=26106&cardno=1000111100020654226&orgid=1590993600&status=3';
  1923. $url = "http://192.168.1.220/mobile/refill_tianjt.php?" . $data;
  1924. $resp = http_request($url);
  1925. }
  1926. public function testSuhcPDD()
  1927. {
  1928. $data = 'onlystr=820663525320005221&pddno&sign=4b1e8645f7541ced34855779448d9d52&amt=100&notifyurl=https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_suhcpdd.php&cardtype=Sinoepc&batchid=3&cardno=1000111100020445281&orgid=1590993600&status=2';
  1929. $url = "https://www.xyzshops.cn/mobile/refill_suhcpdd.php?" . $data;
  1930. $resp = http_request($url);
  1931. }
  1932. public function testSuhcTMVerify()
  1933. {
  1934. $data = 'onlystr=180662473867058221&sign=5ff5f95d54a89e78dbb49923f6b20c08&amt=100&notifyurl=https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_suhctm.php&cardtype=Sinoepc&batchid=3&cardno=1000111100020445281&orgid=1590993600&status=3';
  1935. $url = "https://www.xyzshops.cn/mobile/refill_suhctm.php?" . $data;
  1936. $resp = http_request($url);
  1937. }
  1938. public function testBeixtVerify()
  1939. {
  1940. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  1941. $url = "https://www.xyzshops.cn/mobile/refill_bxtwt.php";
  1942. $headers = ['Content-Type: application/json'];
  1943. $resp = http_post_data($url, $data, $headers);
  1944. }
  1945. public function testInput()
  1946. {
  1947. $input = fopen("php://input", "rw");
  1948. file_put_contents($input, 'xxxx');
  1949. $content = file_get_contents('php://input');
  1950. }
  1951. public function testUrl()
  1952. {
  1953. $data = 'onlystr=190661874318128632&sign=9eb60765c356341fd41c9bec6526f46a&amt=1000&notifyurl=https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_suhc.php&jdno&cardtype=Sinoepc&batchid=25940&cardno=1000111100012304048&orgid=1590993600&status=2';
  1954. $params = preg_split('/&/', $data);
  1955. foreach ($params as $pair) {
  1956. $kv = explode('=', $pair);
  1957. $count = count($kv);
  1958. if ($count === 1) {
  1959. $key = $kv[0];
  1960. $val = "";
  1961. } elseif ($count === 2) {
  1962. $key = $kv[0];
  1963. $val = $kv[1];
  1964. } else {
  1965. continue;
  1966. }
  1967. Log::record("{$key}:{$val}", Log::DEBUG);
  1968. }
  1969. }
  1970. public function testAddoil()
  1971. {
  1972. $url = $this->mReqHost . "/mobile/index.php";
  1973. $notifyurl = 'http://121.89.196.45/mobile/signature.php';
  1974. $params = ['mchid' => $this->mMchid,
  1975. 'cardno' => '1000111100020445281',
  1976. 'amount' => "100",
  1977. "act" => "refill",
  1978. "op" => "add",
  1979. 'order_sn' => $this->make_sn(),
  1980. 'notifyurl' => $notifyurl];
  1981. $resp = $this->send_md5($url, $params);
  1982. Log::record($resp, Log::DEBUG);
  1983. }
  1984. public function testBalance()
  1985. {
  1986. $url = $this->mReqHost . "/mobile/index.php";
  1987. $params = ['mchid' => 1092,
  1988. "act" => "refill",
  1989. "op" => "balance"];
  1990. $resp = $this->send_md5($url, $params);
  1991. Log::record($resp, Log::DEBUG);
  1992. }
  1993. public function testNotify()
  1994. {
  1995. $params = [
  1996. "mchid" => 10202,
  1997. "order_sn" => '21090216132600003_11675',
  1998. "amount" => '30.00',//intval($refill_info['refill_amount'] + 0.05),
  1999. "cardno" => 18639492164,
  2000. "trade_no" => 8693160683914496896438,
  2001. "idcard" => "",
  2002. "card_name" => "",
  2003. 'official_sn' => "",
  2004. 'message' => "匹配不到合适的充值通道",
  2005. "state" => 'CANCEL'];
  2006. $sign = $this->md5_sign($params,'KxK9f3yaBDOXVwvuOKDozvQ9Mt1CoqRX');
  2007. $notify_url = 'https://openapi-gateway-test.bbinsure.cn/ants_charge/v1/charge/order/notify/yeziOrderNew/1140';
  2008. $resp = http_request($notify_url, $params, 'POST');
  2009. }
  2010. public function testAddPhoe()
  2011. {
  2012. $url = $this->mReqHost . "/mobile/index.php";
  2013. $params = ['mchid' => $this->mMchid,
  2014. 'cardno' => '',
  2015. 'amount' => 100,
  2016. "act" => "refill",
  2017. "op" => "add",
  2018. 'order_sn' => '',
  2019. 'notifyurl' => "https://www.baoyung.com/api/unionservice/yezicharge"];
  2020. Log::record(json_encode($params), Log::DEBUG);
  2021. // $resp = $this->send_md5($url, $params);
  2022. }
  2023. public function testProxyHelper()
  2024. {
  2025. $phone = '13911129867';
  2026. $amount = 100;
  2027. $url = $this->mReqHost . "/mobile/index.php";
  2028. $params = ['mchid' => $this->mMchid,
  2029. 'cardno' => $phone,
  2030. 'amount' => $amount,
  2031. "act" => "refill",
  2032. "op" => "add",
  2033. 'order_sn' => $this->make_sn(),
  2034. 'notifyurl' => "https://xxx"];
  2035. $proxy = new refill_proxy("xxx");
  2036. $resp = $proxy->send($url, $params);
  2037. }
  2038. public function testGoods()
  2039. {
  2040. $req_url = $this->mReqHost . '/mobile/index.php';
  2041. $params = ['mchid' => $this->mMchid,
  2042. "act" => "refill",
  2043. "op" => "goods"];
  2044. $resp = $this->send_md5($req_url, $params);
  2045. }
  2046. public function testQueryFactory()
  2047. {
  2048. refill\RefillFactory::instance()->query(295);
  2049. }
  2050. public function testQuery()
  2051. {
  2052. //$req_url = 'https://www.xyzshops.cn/mobile/index.php';
  2053. // $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  2054. $req_url = BASE_SITE_URL . '/mobile/index.php';
  2055. $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  2056. $params = ['mchid' => 1,
  2057. "act" => "refill",
  2058. "op" => "query",
  2059. 'order_sn' => "13281476"];
  2060. $resp = $this->send_md5($req_url, $params);
  2061. }
  2062. public function testRemoveSession()
  2063. {
  2064. $resp = http_request(BASE_SITE_URL . "/mobile/signature.php", [], 'POST');
  2065. }
  2066. public function testTianjtCB()
  2067. {
  2068. // $notifyurl = BASE_SITE_URL . "/mobile/refill_tianjt.php";
  2069. $notifyurl = "https://www.xyzshops.cn/mobile/refill_tianjt.php";
  2070. // $notifyurl = "https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_tianjt.php";
  2071. $params = ['onlystr' => '690665858589475818',
  2072. 'amt' => 1000,
  2073. 'jdno' => '',
  2074. 'notifyurl' => $notifyurl,
  2075. 'cardtype' => 'Sinoepc',
  2076. 'batchid' => 30589,
  2077. 'cardno' => '1000113300007993287',
  2078. 'orgid' => '1590993600',
  2079. 'status' => 3];
  2080. $sign = $this->md5_sign($params);
  2081. $params['sign'] = $sign;
  2082. $resp = http_request($notifyurl, $params, 'POST');
  2083. Log::record($resp, Log::DEBUG);
  2084. }
  2085. public function testBJBCB()
  2086. {
  2087. $params = [
  2088. 'usr' => '13699279618',
  2089. 'ord' => '710662733975412771',
  2090. 'state' => '2',
  2091. 'bz' => '',
  2092. 'sgn' => 'AC9AFD254DE682D8440A97CA68B992DA'
  2093. ];
  2094. $resp = http_request("https://www.xyzshops.cn/mobile/refill_bjb.php", $params, 'POST');
  2095. }
  2096. public function testJiecCB()
  2097. {
  2098. $params['result'] = 'fail';
  2099. $params['msg'] = '0';
  2100. $params['order'] = 'null';
  2101. $params['phone_no'] = '18500608333';
  2102. $params['amount'] = '30.00';
  2103. $params['op_no'] = '800663597981819221';
  2104. $params['sign'] = '2510046895e8e12322c8a32547905ee9';
  2105. $resp = http_request($this->mReqHost . "/mobile/refill_jiec.php", $params, 'POST');
  2106. }
  2107. public function testZFKJ()
  2108. {
  2109. //带签名参数:mchid=1090&act=refill&op=add&cardno=100112121212212133
  2110. //&amount=10&order_sn=PH2012261356569433&
  2111. //notifyurl=https%3A%2F%2Fqzcz.edusahoo.com.cn%2Findex%2Findex%2Fcallback
  2112. //&sign=4a3ac5f9706e64aa70c6cab0fc5839d3
  2113. $params = ['mchid' => 1090,
  2114. 'cardno' => '100112121212212133',
  2115. 'amount' => '10',
  2116. "act" => "refill",
  2117. "op" => "add",
  2118. 'order_sn' => 'PH2012261356569433',
  2119. 'notifyurl' => 'https://qzcz.edusahoo.com.cn/index/index/callback'];
  2120. $resp = $this->send_md5(BASE_SITE_URL . '/mobile/index.php', $params);
  2121. }
  2122. protected function check_empty($value)
  2123. {
  2124. if (!isset($value))
  2125. return true;
  2126. if ($value === null)
  2127. return true;
  2128. if (trim($value) === "")
  2129. return true;
  2130. return false;
  2131. }
  2132. public function testcreateSign()
  2133. {
  2134. $params['act'] = 'refill';
  2135. $params['amount'] = '30';
  2136. $params['cardno'] = '18111516552';
  2137. $params['mchid'] = '10179';
  2138. $params['notifyurl'] = 'http://czapi2.1jinb.net/YeZiHCCallBackOrderServlet';
  2139. $params['op'] = 'add';
  2140. $params['order_sn'] = 'JFNOR10835056877';
  2141. $sign = $this->md5_sign($params);
  2142. }
  2143. public function testCheckphone()
  2144. {
  2145. $check = function ($phone) {
  2146. $url = 'https://mobileempty.shumaidata.com/mobileempty';
  2147. $params['mobile'] = $phone;
  2148. $headers = array();
  2149. array_push($headers, "Authorization:APPCODE " . '8f92d951293f4d2ea48ff86d5a70c537');
  2150. $resp = http_request($url, $params, 'GET', false, $headers);
  2151. $resp = json_decode($resp, true);
  2152. if ($resp['success'] == true && $resp['code'] == 200) {
  2153. Log::record("data phone:{$phone} , status : {$resp['data']['status']}", Log::DEBUG);
  2154. if (in_array($resp['data']['status'], [0, 3, 4, 5])) {
  2155. return false;
  2156. }
  2157. } else {
  2158. Log::record("data phone:{$phone} , 不支持的号段", Log::DEBUG);
  2159. }
  2160. };
  2161. $check(17801048874);
  2162. }
  2163. public function testCtSign()
  2164. {
  2165. $params['act'] = 'refill';
  2166. $params['op'] = 'add';
  2167. $params['mchid'] = 10221;
  2168. $params['cardno'] = '17610802062';
  2169. $params['amount'] = 30;
  2170. $params['order_sn'] = '20210926154819606056656';
  2171. $params['notifyurl'] = 'http://117.186.248.196:88/Asyn/notifyCall/367EA7';
  2172. $sign = $this->md5_sign($params,'E019D21A1E6611ECA4FD00163E179561');
  2173. }
  2174. private function md5_sign($params,$key = '')
  2175. {
  2176. ksort($params);
  2177. $body = "";
  2178. $i = 0;
  2179. foreach ($params as $k => $v) {
  2180. if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
  2181. if ($i == 0) {
  2182. $body .= "{$k}" . "=" . urlencode($v);
  2183. } else {
  2184. $body .= "&" . "{$k}" . "=" . urlencode($v);
  2185. }
  2186. $i++;
  2187. }
  2188. }
  2189. $body .= "&key={$key}";
  2190. return md5($body);
  2191. }
  2192. public function testCallMech()
  2193. {
  2194. $logic = Logic('queue');
  2195. $logic->NotifyMerchantComplete(['order_id' => 18171, 'manual' => true]);
  2196. }
  2197. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCallMech)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  2198. private function send($url, $params)
  2199. {
  2200. $mchid = $params['mchid'];
  2201. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  2202. $key = file_get_contents($pri_key);
  2203. $pri = openssl_get_privatekey($key);
  2204. $body = $this->body($params);
  2205. openssl_sign($body, $signed, $pri);
  2206. $sign = base64_encode($signed);
  2207. $params['sign'] = $sign;
  2208. $resp = http_request($url, $params, 'POST');
  2209. Log::record("resp:{$resp}", Log::DEBUG);
  2210. }
  2211. private function send_md5($url, $params)
  2212. {
  2213. $body = $this->body($params);
  2214. $body .= "&key={$this->mKey}";
  2215. $params['sign'] = md5($body);
  2216. $resp = http_request($url, $params, 'POST');
  2217. Log::record("resp:{$resp}", Log::DEBUG);
  2218. return $resp;
  2219. }
  2220. public function testCardType()
  2221. {
  2222. $cardno = '1000111100021211884';
  2223. $ret = preg_match('/^1[0-9]{18}$/', $cardno, $matches);
  2224. }
  2225. public function testMtrand()
  2226. {
  2227. }
  2228. public function testHttpRefill()
  2229. {
  2230. $mchid = '000001';
  2231. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  2232. $key = file_get_contents($pri_key);
  2233. $pri = openssl_get_privatekey($key);
  2234. $params = ['MCHID' => $mchid, 'cardno' => '1000111100021211884', 'amt' => "100", "act" => "refill", "op" => "addoil"];
  2235. $body = $this->body($params);
  2236. openssl_sign($body, $signed, $pri);
  2237. $sign = base64_encode($signed);
  2238. $params['sign'] = $sign;
  2239. $resp = http_request(BASE_SITE_URL . "/mobile/index.php", $params, 'POST');
  2240. }
  2241. private function body($params)
  2242. {
  2243. ksort($params);
  2244. $body = "";
  2245. $i = 0;
  2246. foreach ($params as $k => $v) {
  2247. if (false === $this->checkEmpty($v) && "@" != substr($v, 0, 1)) {
  2248. if ($i == 0) {
  2249. $body .= "{$k}" . "=" . urlencode($v);
  2250. } else {
  2251. $body .= "&" . "{$k}" . "=" . urlencode($v);
  2252. }
  2253. $i++;
  2254. }
  2255. }
  2256. return $body;
  2257. }
  2258. private function checkEmpty($value)
  2259. {
  2260. if (!isset($value))
  2261. return true;
  2262. if ($value === null)
  2263. return true;
  2264. if (trim($value) === "")
  2265. return true;
  2266. return false;
  2267. }
  2268. public function testKsort()
  2269. {
  2270. $age = ["Peter" => "35", "Ben" => "37", "Joe" => "43"];
  2271. ksort($age);
  2272. foreach ($age as $x => $x_value) {
  2273. echo "Key=" . $x . ", Value=" . $x_value;
  2274. echo "<br>";
  2275. }
  2276. }
  2277. public function testip()
  2278. {
  2279. $model_merchant = Model('merchant');
  2280. $merchant_info = $model_merchant->getMerchantInfo(['mchid' => 1]);
  2281. $ipwhitelist = unserialize($merchant_info['ip_white_list']);
  2282. $res = json_encode($ipwhitelist);
  2283. }
  2284. //测试向内部店提交订单,可先屏蔽其它充值通道
  2285. public function testAddoilToInnerStore()
  2286. {
  2287. $url = $this->mReqHost . "/mobile/index.php";
  2288. $notifyurl = BASE_SITE_URL . '/mobile/signature.php';
  2289. $params = ['mchid' => 1,
  2290. 'cardno' => '1000111100020445281',
  2291. 'amount' => "1000",
  2292. "act" => "refill",
  2293. "op" => "add",
  2294. 'order_sn' => $this->make_sn(),
  2295. 'notifyurl' => $notifyurl];
  2296. $resp = $this->send_md5($url, $params);
  2297. Log::record($resp, Log::DEBUG);
  2298. }
  2299. public function testRefillInnerCB()
  2300. {
  2301. $params = ['state_type' => 'order_cancel', 'order_id' => 311, 'channel_name' => 'lx'];
  2302. $resp = http_request(BASE_SITE_URL . '/mobile/refill_inner.php', $params, 'POST');
  2303. }
  2304. public function testArgs()
  2305. {
  2306. Log::record($_SERVER['argv'], Log::DEBUG);
  2307. }
  2308. public function testCall()
  2309. {
  2310. $order_id = 14974;
  2311. QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true], 10);
  2312. }
  2313. public function testSyncconfig()
  2314. {
  2315. $name_val_cfg = function ($items) {
  2316. $result = [];
  2317. foreach ($items as $item) {
  2318. $name = $item->name();
  2319. $result[$name] = $item;
  2320. }
  2321. return $result;
  2322. };
  2323. $name_val_row = function ($items) {
  2324. $result = [];
  2325. foreach ($items as $item) {
  2326. $name = $item['name'];
  2327. $result[$name] = $item;
  2328. }
  2329. return $result;
  2330. };
  2331. $match = function ($all, $cur) {
  2332. $insert = [];
  2333. foreach ($all as $key => $value) {
  2334. if (!array_key_exists($key, $cur)) {
  2335. $insert[] = $key;
  2336. }
  2337. }
  2338. return $insert;
  2339. };
  2340. $inserter = function ($mod, $type, $names) {
  2341. foreach ($names as $name) {
  2342. $data = ['name' => $name, 'type' => $type];
  2343. $mod->insert($data);
  2344. }
  2345. };
  2346. $provider = refill\RefillFactory::instance()->providers();
  2347. $oils = $name_val_cfg($provider['oil']);
  2348. $phones = $name_val_cfg($provider['phone']);
  2349. $mod_prov = Model('refill_provider');
  2350. $oil_items = $mod_prov->getProviderList(['type' => 1]);
  2351. $oil_items = $name_val_row($oil_items);
  2352. $oil_inserts = $match($oils, $oil_items);
  2353. $phone_items = $mod_prov->getProviderList(['type' => 2]);
  2354. $phone_items = $name_val_row($phone_items);
  2355. $phone_inserts = $match($phones, $phone_items);
  2356. $inserter($mod_prov, 1, $oil_inserts);
  2357. $inserter($mod_prov, 2, $phone_inserts);
  2358. }
  2359. public function testStat()
  2360. {
  2361. $model_refill_order = Model('refill_order');
  2362. $stat = Model('')->table('refill_order,vr_order')->join('inner')
  2363. ->on('refill_order.order_id=vr_order.order_id')
  2364. ->field('sum(refill_amount) as refill_amounts , sum(channel_amount) as channel_amounts , sum(mch_amount) as mch_amounts')
  2365. ->where([])->select();
  2366. }
  2367. public function testRefillGoods()
  2368. {
  2369. $goods = refill\RefillFactory::instance()->goods();
  2370. }
  2371. private function make_mobile()
  2372. {
  2373. $no = "1" . mt_rand(3000000000, 3999999999);
  2374. return $no;
  2375. }
  2376. private function refill_info($card_no, $card_type)
  2377. {
  2378. $data = rcache($card_no, 'cardrefill-');
  2379. if (empty($data)) {
  2380. $mod_topcard = Model('topcard');
  2381. $ret = $mod_topcard->get_card($card_no);
  2382. if (empty($ret)) {
  2383. $bind_phone = $this->make_mobile();
  2384. $mod_topcard->add($card_no, $card_type, time(), $bind_phone);
  2385. $data['bind_phone'] = $bind_phone;
  2386. $data['refill_time'] = time();
  2387. $data['times'] = 0;
  2388. wcache($card_no, $data, 'cardrefill-');
  2389. } else {
  2390. $val = $ret[0];
  2391. $data['bind_phone'] = $val['bind_phone'];
  2392. $data['refill_time'] = time();
  2393. $data['times'] = 0;
  2394. }
  2395. }
  2396. return $data;
  2397. }
  2398. public function testGetMobile()
  2399. {
  2400. $card_no = '1000119000001679247';
  2401. $card_type = 1;
  2402. $info = $this->refill_info($card_no, $card_type);
  2403. }
  2404. private function check_mchorder($mchid, $mch_order)
  2405. {
  2406. if (empty($mch_order)) {
  2407. return true;
  2408. } else {
  2409. $refill_order = Model('refill_order');
  2410. $ret = $refill_order->getOrderInfo(['mchid' => $mchid, 'mch_order' => $mch_order]);
  2411. return empty($ret);
  2412. }
  2413. }
  2414. public function testCheckMchorder()
  2415. {
  2416. $ret = $this->check_mchorder(1, '13281475');
  2417. }
  2418. public function testMakemobile()
  2419. {
  2420. $mobile = refill\util::make_mobile();
  2421. $ret = refill\util::set_black('1000111100020445281');
  2422. }
  2423. public function testLoadBlack()
  2424. {
  2425. $path = BASE_DATA_PATH . "/log";
  2426. $names = ['20210119-mobile.log',
  2427. '20210120-mobile.log', '20210121-mobile.log', '20210122-mobile.log', '20210123-mobile.log',
  2428. '20210124-mobile.log', '20210125-mobile.log'];
  2429. foreach ($names as $name) {
  2430. $file_name = $path . "/" . $name;
  2431. refill\util::black_from_log($file_name);
  2432. }
  2433. }
  2434. public function testStats()
  2435. {
  2436. $date = date('Y-m-d', time());
  2437. $today = strtotime("{$date}");
  2438. $times_begin = function ($start) {
  2439. $times = [];
  2440. $begin = $start;
  2441. for ($i = 0; $i < 7; $i++) {
  2442. $times[] = $begin;
  2443. $begin -= 86400;
  2444. }
  2445. return $times;
  2446. };
  2447. $reader = function ($mchid, $time) {
  2448. $cond['mchid'] = $mchid;
  2449. $cond['inner_status'] = 0;
  2450. $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 - 1]];
  2451. $items = Model('')->table('refill_order,vr_order')->join('inner')
  2452. ->on('refill_order.order_id=vr_order.order_id')
  2453. ->field('count(*) as order_count, vr_order.order_state, sum(mch_amount) as mch_amounts')
  2454. ->group('vr_order.order_state')
  2455. ->where($cond)->select();
  2456. return $items;
  2457. };
  2458. $begins = $times_begin($today);
  2459. $mchid = 10096;
  2460. // $states = rcache($this->mchid() , 'refillstat-');
  2461. $states = unserialize($states ?? "");
  2462. if (empty($states)) $states = [];
  2463. $result = [];
  2464. $cache = [];
  2465. foreach ($begins as $begin) {
  2466. if (array_key_exists($begin, $states)) {
  2467. $item = $states[$begin];
  2468. } else {
  2469. $item = $reader($mchid, $begin);
  2470. }
  2471. $result[$begin] = $item;
  2472. //判断item 中充值中的状态是否为0,为0的情况下放进cache
  2473. $cache = $item;
  2474. }
  2475. wcache($this->mchid(), $cache, 'refillstat-');
  2476. return $result;
  2477. }
  2478. public function testNotifyx()
  2479. {
  2480. $mch_cache = rcache("merchant-notify", 'refill-');
  2481. $caches = empty($mch_cache['data']) ? [] : unserialize($mch_cache['data']);
  2482. $new_caches = [];
  2483. $merchants = Model('merchant')->getMerchantList([], '', '', 'merchant.*,member.available_predeposit', "0,1000");
  2484. foreach ($merchants as $merchant) {
  2485. $mchid = $merchant['mchid'];
  2486. $phone = $merchant['contact_phone'] ?? "";
  2487. $available_pd = intval($merchant['available_predeposit']);
  2488. $alarm_pd = intval($merchant['alarm_amount']) < 10000 ? 10000 : intval($merchant['alarm_amount']);
  2489. if (array_key_exists($mchid, $caches)) {
  2490. $mch_cache = $caches[$mchid];
  2491. } else {
  2492. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  2493. }
  2494. if (!empty($phone) && ($available_pd < $alarm_pd)) {
  2495. $counts = $mch_cache['send_count'];
  2496. if (($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
  2497. $mch_cache = ['last_time' => time(), 'send_count' => $counts + 1];
  2498. QueueClient::push('sendSMS', ['mobile' => $merchant['contact_phone'],
  2499. 'type' => 'balance_warning', 'datas' => [date("m月d日H时"), $merchant['available_predeposit']]]);
  2500. }
  2501. } else {
  2502. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  2503. }
  2504. $new_caches[$mchid] = $mch_cache;
  2505. }
  2506. wcache("merchant-notify", ['data' => serialize($new_caches)], 'refill-');
  2507. }
  2508. public function testReadChannel()
  2509. {
  2510. refill\RefillFactory::instance()->read_channel();
  2511. }
  2512. public function testAllow()
  2513. {
  2514. $allow = refill\RefillFactory::instance()->allow(10096, 1, 100);
  2515. }
  2516. public function testCheckData()
  2517. {
  2518. $str = '|2|110667993758599771-充值失败|';
  2519. // $str = '0|提交成功|-36557.7400';
  2520. // if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
  2521. // return true;
  2522. // }
  2523. // if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
  2524. // return true;
  2525. // }
  2526. // return false;
  2527. $resp = ltrim($str, '|');
  2528. $resp = explode('|', $resp);
  2529. if (count($resp) != 3) {
  2530. return [false, '返回值错误'];
  2531. }
  2532. }
  2533. public function testErrre()
  2534. {
  2535. $line = '[13 2021-01-24 16:07:03] DEBUG: type = application/json;charset=utf-8, content={"channelOrderNumber":"610664819621371793","orderNumber":"GYFL1611475621525437","message":"充值失败","signature":"6c28c15b9ce2b2243742ecebbd929ac5","status":109}';
  2536. $ret = preg_match('/[\w\W]+"channelOrderNumber":"(?P<order_sn>[^"]+)"[\w\W]+"message":"(?P<message>[\x{4e00}-\x{9fa5}]+)"[\w\W]+"status":109/u', $line, $matches);
  2537. }
  2538. public function testExpolode()
  2539. {
  2540. $x = "HTTP-504";
  2541. [$type,$code] = explode('-',$x);
  2542. }
  2543. public function testMchctl()
  2544. {
  2545. $ctl = new refill\mchctl();
  2546. }
  2547. public function testAsyncadd()
  2548. {
  2549. $x = \refill\util::async_add(['xxxx' => 1],4);
  2550. }
  2551. private function getProvider($name,$type = 'RefillPhone')
  2552. {
  2553. $file = BASE_HELPER_RAPI_PATH . "/$name/{$type}.php";
  2554. if(!file_exists($file)){
  2555. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  2556. return false;
  2557. } else {
  2558. require_once($file);
  2559. Log::record("file={$file} load success.",Log::DEBUG);
  2560. }
  2561. $class_name = "refill\\{$name}\\{$type}";
  2562. if (class_exists($class_name, false)) {
  2563. $caller = new $class_name([]);
  2564. return $caller;
  2565. } else {
  2566. $error = "Base Error: class {$class_name} isn't exists!";
  2567. Log::record($error, Log::ERR);
  2568. return false;
  2569. }
  2570. }
  2571. public function testOrderExist()
  2572. {
  2573. $refill_order = Model('refill_order');
  2574. $ret = $refill_order->exist(10116,'Yzb20210825111251415');
  2575. }
  2576. public function testRGoods()
  2577. {
  2578. $goods_list = refill\RefillFactory::instance()->goods();
  2579. }
  2580. public function testCanbu()
  2581. {
  2582. $notify = function ($resp)
  2583. {
  2584. if (empty($resp)) {
  2585. return [false, '网络错误'];
  2586. }
  2587. else
  2588. {
  2589. Log::record($resp, Log::DEBUG);
  2590. $resp = json_decode($resp, true);
  2591. if (empty($resp)) {
  2592. return [false, '网络错误'];
  2593. }
  2594. if($resp['code'] == 1)
  2595. {
  2596. $status = $resp['data']['status'];
  2597. if ($status == 'success') {
  2598. $order_state = ORDER_STATE_SUCCESS;
  2599. } elseif ($status == 'failed') {
  2600. $order_state = ORDER_STATE_CANCEL;
  2601. } elseif ($status == 'wait') {
  2602. $order_state = ORDER_STATE_SEND;
  2603. } else {
  2604. return [false, $status];
  2605. }
  2606. return [true, $order_state];
  2607. }
  2608. elseif($resp['code'] == -1 && $resp['msg'] == '订单不存在')
  2609. {
  2610. return [true, ORDER_STATE_NOEXIST];
  2611. }
  2612. else
  2613. {
  2614. return [false, $resp['msg']];
  2615. }
  2616. }
  2617. };
  2618. $resp = '{"code":1,"msg":"查询成功","data":{"systemOrderNo":"2049420687473912283808","agentOrderNo":"s16341299122819479569112","phone":"18571522718","itemName":"UNICOM","itemFacePrice":"50","status":0,"description":"待处理","amount":"47.2500","officialOrderNo":""}}';
  2619. $ret = $notify($resp);
  2620. }
  2621. }
  2622. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  2623. //docker-compose -f ./docker-compose-dev.yml run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCall)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test