TestRefill.php 172 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657
  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 = $this->getProvider('lingzhman');
  438. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  439. // $resp = $provider->query(['order_sn' => '91641644558361512676']);
  440. // $resp = $provider->balance();
  441. $body = '{"orderNo":"F2202111346304162782","status":"001","consumerNo":"91641644558361512676","voucherNo":null,"mobile":"18500608333"}';
  442. $params = json_decode($body, true);
  443. $provider = $this->getProvider('lingzhman', 'RefillCallback');
  444. $resp = $provider->notify($params);
  445. }
  446. public function testQijutangPhone()
  447. {
  448. $provider = new refill\qijutang\RefillPhone([]);
  449. // for ($i=1;$i<2;$i++) {
  450. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  451. // }
  452. // $resp = $provider->query(['order_sn' => '51501625218912512231']);
  453. // $data = '{"szOrderId":"51501625218912512231","fSalePrice":"28.44","szAgentId":"200010","nFlag":"3","szVerifyString":"20cf16c6bb239e2a703d0bf3e5ef2d5a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  454. // $params = json_decode($data, true);
  455. // refill\RefillFactory::instance()->notify('qijutang',$params);
  456. $resp = $provider->balance();
  457. }
  458. public function testLingzhman48Phone()
  459. {
  460. $provider = new refill\lingzhman48\RefillPhone([]);
  461. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  462. // $resp = $provider->query(['order_sn' => '49951625814151937287']);
  463. $data = '{"orderNo":"F2107091503134670764","status":"020","consumerNo":"49951625814151937287","voucherNo":null,"mobile":"18500608333"}';
  464. $params = json_decode($data, true);
  465. refill\RefillFactory::instance()->notify('lingzhman48', $params);
  466. }
  467. public function testcangbuPhone()
  468. {
  469. $provider = $this->getProvider('cangbu');
  470. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  471. $resp = $provider->query(['order_sn' => '4024880687558152076462']);
  472. // $data = '{"customerId":"112","tmporder":"35041626071052333060","orderno":"s16260710607417944801112","number":"18500608333","money":"100","amount":"94.9000","code":"1","cardno":"","voucher":"110103307042107121424210550266","sign":"de463c3d389a4afe4a2c58257972121a"}';
  473. // $params = json_decode($data, true);
  474. // refill\RefillFactory::instance()->notify('cangbu',$params);
  475. $resp = $provider->balance();
  476. }
  477. public function testCangbukami()
  478. {
  479. $provider = new refill\cangbukami\RefillPhone([]);
  480. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  481. $resp = $provider->query(['order_sn' => '23231627380108954478']);
  482. }
  483. public function testTongykamiPhone()
  484. {
  485. $provider = new refill\tongykami\RefillPhone([]);
  486. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  487. $resp = $provider->query(['order_sn' => '26961626077050756648']);
  488. $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"}';
  489. $params = json_decode($data, true);
  490. // refill\RefillFactory::instance()->notify('tongykami',$params);
  491. }
  492. public function testTongluPhone()
  493. {
  494. $provider = new refill\tonglu\RefillPhone([]);
  495. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  496. $resp = $provider->query(['order_sn' => '22961616468561936356']);
  497. // $body = '{"order_no":"22961616468561936356","order_status":"5","phone_no":"18500608333","amount":5000,"time_paid":1616468856287,"order_cert_no":"","paid":false,"order_id":"20210323966497008"}';
  498. // $sign = '9E41F52F612D60EBB654B3A5D1E2F1E5';
  499. // $params = json_decode($body , true);
  500. // $params['sign'] = $sign;
  501. // refill\RefillFactory::instance()->notify('tonglu',$params);
  502. }
  503. public function testSialan()
  504. {
  505. $provider = $this->getProvider('sialan');
  506. // $resp = $provider->balance();
  507. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  508. $resp = $provider->query(['ch_trade_no' => '21112214053736552180705']);
  509. // $body = '{"api_id":"16855","recharge":"18500608333","amount":"10","order_sn":"21112213553615606755893","query_sn":"29151637560521755792","operator_sn":"","status":"2","sign":"32867363957ed9688b8bbdd8f42c08eb"}';
  510. // $params = json_decode($body, true);
  511. // $provider = $this->getProvider('sialan', 'RefillCallBack');
  512. // $ret = $provider->verify($params);
  513. // $resp = $provider->notify($params);
  514. }
  515. public function testMoxj_new()
  516. {
  517. $provider = new refill\moxj_new\RefillPhone([]);
  518. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  519. // $resp = $provider->query(['order_sn' => '33301627887529587739', 'card_no' => 13699279618]);
  520. // $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"}';
  521. // $params = json_decode($body, true);
  522. // refill\RefillFactory::instance()->notify('moxj_new', $params);
  523. $resp = $provider->balance();
  524. }
  525. public function testKangkai()
  526. {
  527. $provider = new refill\kangkai\RefillPhone([]);
  528. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  529. // $resp = $provider->query(['order_sn' => '25431627898461762024']);
  530. // $body = '{"TaskID":"267459","Mobile":"18500608333","Status":"5","ReportTime":"2021-08-02T18:02:01.777","ReportCode":"7:","OutTradeNo":"25431627898461762024","Price":"44.2500","ReceiptNum":"","Sign":"f0934a621fd0b076373f77a9bf8d7051"}';
  531. // $params = json_decode($body, true);
  532. // refill\RefillFactory::instance()->notify('kangkai', $params);
  533. $resp = $provider->balance();
  534. }
  535. public function testLechong()
  536. {
  537. $provider = new refill\lechong\RefillPhone([]);
  538. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  539. // $resp = $provider->query(['order_sn' => '55641627902450221838']);
  540. // $body = '{"sellerid":"55641627902450221838","agentcode":"202108021753","account":"MTg1MDA2MDgzMzM=","value":"50","payvalue":"47.8500","voucher":"","createtime":"20210802190739","endtime":"20210802191008","state":"4","remark":"","time":"20210802191008","sign":"0e2d69318d03871d887debd498cc50f2"}';
  541. // $params = json_decode($body, true);
  542. // refill\RefillFactory::instance()->notify('lechong', $params);
  543. $resp = $provider->balance();
  544. }
  545. public function testXinhengyang()
  546. {
  547. $provider = $this->getProvider('xinhengyang');
  548. // $resp = $provider->balance();
  549. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  550. $resp = $provider->query(['order_sn' => '6966570691155594416360']);
  551. // $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
  552. // $params = json_decode($body, true);
  553. // $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
  554. // $ret = $provider->verify($params);
  555. // $resp = $provider->notify($params);
  556. }
  557. public function testMiaoxt()
  558. {
  559. $provider = new refill\miaoxt\RefillPhone([]);
  560. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  561. // $resp = $provider->query(['order_sn' => '85101628064401524483']);
  562. // $resp = $provider->balance();
  563. $body = '{"szOrderId":"85101628064401524483","fSalePrice":"10.2","szAgentId":"200050","nFlag":"2","szVerifyString":"7a08b9a71a297a28843d749a7bf79dbc","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"10"}';
  564. $params = json_decode($body, true);
  565. refill\RefillFactory::instance()->notify('miaoxt', $params);
  566. }
  567. public function testTianyan()
  568. {
  569. $provider = new refill\tianyan\RefillPhone([]);
  570. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  571. // $resp = $provider->query(['order_sn' => '71241628067981955316', 'card_no' => 18500608333, 'card_type' => 5]);
  572. // $resp = $provider->balance();
  573. $params['amount'] = '100.00';
  574. $params['orderNo'] = '2618380681466713437097';
  575. $params['supplierId'] = '48';
  576. $params['orderId'] = 'S20210805081833371976224648';
  577. $params['notifyTime'] = '1628122793669';
  578. $params['sign'] = '4d8f70bf451608359e256ee1e5f30de1';
  579. $params['discountAmount'] = '5.50';
  580. $params['phoneNo'] = '17696554433';
  581. $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';
  582. $params['payType'] = 'wechat';
  583. $params['ticketNo'] = '110103353022108050819140250945';
  584. $params['company'] = 'lt';
  585. $params['status'] = '2';
  586. refill\RefillFactory::instance()->notify('tianyan', $params);
  587. }
  588. public function testYunsuoyaoman()
  589. {
  590. // $provider = $this->getProvider('yunsuoyaoman');
  591. // $resp = $provider->balance();
  592. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  593. // $resp = $provider->query(['order_sn' => '58771629702960801700']);
  594. $body = '{"orderid":"RLD21082315152651196","sporderid":"58771629702960801700","userid":"10002745","merchantsubmittime":"20210823152623","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-27.45","sign":"76A29E0101644831526138D63917C130"}';
  595. $params = json_decode($body, true);
  596. $provider = $this->getProvider('yunsuoyaoman', 'RefillCallBack');
  597. $ret = $provider->verify($params);
  598. $resp = $provider->notify($params);
  599. }
  600. public function testYouhe()
  601. {
  602. // $provider = $this->getProvider('youhe');
  603. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  604. // $resp = $provider->query(['order_sn' => '41051635145081582785']);
  605. // $resp = $provider->balance();
  606. $body = ' {"seqNo":"FE4D9D65781C0758","orderNo":"46101635142848462768","result":"Q0001","transo":"","sign":"3B02C7864154C94D8479305D27F3831C"}';
  607. $params = json_decode($body, true);
  608. $provider = $this->getProvider('youhe', 'RefillCallback');
  609. $ret = $provider->verify($params);
  610. $resp = $provider->notify($params);
  611. }
  612. public function testWenye()
  613. {
  614. $provider = new refill\wenye\RefillPhone([]);
  615. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  616. // $resp = $provider->query(['order_sn' => '88871628157083445809']);
  617. // $resp = $provider->balance();
  618. $body = '{"orderNo":"F2108051529062719948","status":"019","consumerNo":"95291628148539909985","voucherNo":null,"mobile":"18500608333"}';
  619. $params = json_decode($body, true);
  620. // refill\RefillFactory::instance()->notify('wenye', $params);
  621. }
  622. public function testXinyang()
  623. {
  624. $provider = new refill\xinyang\RefillPhone([]);
  625. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  626. // $resp = $provider->query(['order_sn' => '68151628157534687971']);
  627. // $resp = $provider->balance();
  628. $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"}';
  629. $params = json_decode($body, true);
  630. refill\RefillFactory::instance()->notify('xinyang', $params);
  631. }
  632. public function testGuochuang()
  633. {
  634. $provider = $this->getProvider('guochuang');
  635. $resp = $provider->add(13699279618, 4, 5, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  636. // $resp = $provider->query(['order_sn' => '82951628231038096078']);
  637. // $resp = $provider->balance();
  638. // $body = '{"account":"18074608795","evidence":"1000000083421080614310024563","evidenceType":"","id":"D2021080614235942044","inTime":"2021/08/06 14:26:22","money":"10","outerId":"82951628231038096078","status":"SUCCESS"}';
  639. // $params['ts'] = 1628231182;
  640. // $params['sign'] = '545F7024870B145915934CA36C6D341E';
  641. // $params['body'] = $body;
  642. // refill\RefillFactory::instance()->notify('guochuang', $params);
  643. // [$goods_id, $price] = $provider->goods(2, 10, 4, 1, []);
  644. }
  645. public function testXianghongrui()
  646. {
  647. $provider = new refill\xianghongrui\RefillPhone([]);
  648. // $resp = $provider->balance();
  649. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  650. // $resp = $provider->query(['order_sn' => '87691628758730981608']);
  651. $body = '{"orderid":"BAT21081216581941649","sporderid":"87691628758730981608","userid":"10002503","merchantsubmittime":"20210812165918","resultno":"1","parvalue":"50","remark1":"110103353052108121658550256634","payno":"110103353052108121658550256634","fundbalance":"-47.5","sign":"EF34F6FB6D37E4FCB92DCD8F41CC67E1"}';
  652. $params = json_decode($body, true);
  653. refill\RefillFactory::instance()->notify('xianghongrui', $params);
  654. }
  655. public function testDianchong()
  656. {
  657. $provider = $this->getProvider('dianchong');
  658. // $resp = $provider->balance();
  659. // $resp = $provider->add(18074608795, 5, 30, ['order_sn' => $this->make_sn()]);
  660. // $resp = $provider->query(['order_sn' => '26671629190230227788']);
  661. $body = '{"seqNo":"5C2D85572F8743CF","orderNo":"26671629190230227788","result":"Q0000","transo":"1000000083421081716331202254","sign":"87F3F67EA2B91709FD05468CF74210A1"}';
  662. $params = json_decode($body, true);
  663. $provider = $this->getProvider('dianchong', 'RefillCallBack');
  664. $ret = $provider->verify($params);
  665. $resp = $provider->notify($params);
  666. }
  667. public function testXunyinOil()
  668. {
  669. $provider = $this->getProvider('xunyinoil', 'RefillOil');
  670. // $resp = $provider->balance();
  671. // $resp = $provider->add(9030230005180327, 1, 50, ['order_sn' => $this->make_sn()]);
  672. $resp = $provider->query(['order_sn' => '77791629450541412891']);
  673. // $body = '{"ext":"","code":"8888","sign":"7db98f3f271013688134f2fbd503dc15","statemes":"\u6210\u529f","id":"80641629442789487318","userid":"8417","operatorid":"2421082015001888","status":"SUCCESS"}';
  674. // $params = json_decode($body, true);
  675. // $provider = $this->getProvider('xunyinoil','RefillCallBack');
  676. // $ret = $provider->verify($params);
  677. // $resp = $provider->notify($params);
  678. }
  679. public function testJumiThird()
  680. {
  681. $provider = $this->getProvider('jumithird');
  682. // $resp = $provider->balance();
  683. $resp = $provider->add(588073521, 7, 100, [
  684. 'order_sn' => $this->make_sn(),
  685. 'goods_id' => 6978,
  686. 'product_code' => 'XYZ100747'
  687. ]);
  688. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  689. // $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"}';
  690. // $params = json_decode($body, true);
  691. // $provider = $this->getProvider('jumithird','RefillCallBack');
  692. // $ret = $provider->verify($params);
  693. // $resp = $provider->notify($params);
  694. }
  695. public function testWangliantx()
  696. {
  697. // $provider = $this->getProvider('wangliantx');
  698. // $resp = $provider->balance();
  699. // for ($i = 1; $i<=1; $i++){
  700. // $resp = $provider->add(18074608795, 6, 50, [
  701. // 'order_sn' => $this->make_sn(),
  702. // 'regin_no' => 1
  703. // ]);
  704. // }
  705. // $resp = $provider->query(['order_sn' => '85901629801033376170']);
  706. $body = '{"userid":"10073664","sporderid":"85901629801033376170","orderid":"C5C5D4F49DB61A8773664","resultno":"1","merchantsubmittime":"20210824183109","ordermoney":"47.6","verifystring":"b6a873ecd6dc9cea3a410c6386cdab84","sign":"4a80e2a8c7b07c8aacada4feedd581bd","supnumber":"1000000083421082418345386156"}';
  707. $params = json_decode($body, true);
  708. $provider = $this->getProvider('wangliantx', 'RefillCallBack');
  709. $ret = $provider->verify($params);
  710. $resp = $provider->notify($params);
  711. }
  712. public function testZhuojian()
  713. {
  714. // $provider = $this->getProvider('zhuojian');
  715. // $resp = $provider->add(18500608333, 5, 50, [
  716. // 'order_sn' => $this->make_sn()
  717. // ]);
  718. // $resp = $provider->query(['order_sn' => '87231630026579229295']);
  719. $body = '{"money":"50.00","official_trade_no":"","out_trade_no":"87231630026579229295","status":"4","trade_no":"10000077828","sign":"0e19142c014ef6fe263601956e0be436"}';
  720. $params = json_decode($body, true);
  721. $provider = $this->getProvider('zhuojian', 'RefillCallBack');
  722. $ret = $provider->verify($params);
  723. $resp = $provider->notify($params);
  724. }
  725. public function testXianghongruifs()
  726. {
  727. // $provider = $this->getProvider('xianghongruifs');
  728. // $resp = $provider->balance();
  729. // $resp = $provider->add(15252490862, 4, 30, [
  730. // 'order_sn' => $this->make_sn()
  731. // ]);
  732. // $resp = $provider->query(['order_sn' => '70881632644084577858']);
  733. $body = '{"orderid":"AAO21092616144271467","sporderid":"70881632644084577858","userid":"10002524","merchantsubmittime":"20210926161610","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"343C28C4EB13F68E2EE251FA0F2A8262"}';
  734. $params = json_decode($body, true);
  735. $provider = $this->getProvider('xianghongruifs', 'RefillCallBack');
  736. $ret = $provider->verify($params);
  737. $resp = $provider->notify($params);
  738. }
  739. public function testYilin()
  740. {
  741. $provider = $this->getProvider('yilin');
  742. $resp = $provider->balance();
  743. // $resp = $provider->add(18500608333, 5, 30, [
  744. // 'order_sn' => $this->make_sn()
  745. // ]);
  746. // $resp = $provider->query(['order_sn' => '86981630484634157631']);
  747. // $body = '{"orderid":"NZX21090116244713140","sporderid":"86981630484634157631","userid":"10002543","merchantsubmittime":"20210901163039","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.71","sign":"53717BF9ECE83F4AD96C1EDD4BAE4E87"}';
  748. // $params = json_decode($body, true);
  749. // $provider = $this->getProvider('yilin','RefillCallBack');
  750. // $ret = $provider->verify($params);
  751. // $resp = $provider->notify($params);
  752. }
  753. public function testMiaoxt_fs()
  754. {
  755. $provider = $this->getProvider('miaoxt_fs');
  756. // $resp = $provider->balance();
  757. // $resp = $provider->add(13945846040, 4, 10, [
  758. // 'order_sn' => $this->make_sn()
  759. // ]);
  760. $resp = $provider->query(['order_sn' => '33101630577689278074']);
  761. // $body = '{"szOrderId":"33101630577689278074","fSalePrice":"9.95","szAgentId":"200055","nFlag":"2","szVerifyString":"1649fb2815926b75e4ed7e0fef3172ae","szPhoneNum":"13945846040","szRtnMsg":"","nDemo":"10"}';
  762. // $params = json_decode($body, true);
  763. // $provider = $this->getProvider('miaoxt_fs','RefillCallBack');
  764. // $ret = $provider->verify($params);
  765. // $resp = $provider->notify($params);
  766. }
  767. public function testXianzhibb()
  768. {
  769. // $provider = $this->getProvider('xianzhibb');
  770. // $resp = $provider->balance();
  771. // $resp = $provider->add(13699279618, 4, 200, [
  772. // 'order_sn' => $this->make_sn()
  773. // ]);
  774. // $resp = $provider->query(['order_sn' => '80881630650784871094']);
  775. $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"}';
  776. $params = json_decode($body, true);
  777. $provider = $this->getProvider('xianzhibb', 'RefillCallBack');
  778. $ret = $provider->verify($params);
  779. $resp = $provider->notify($params);
  780. }
  781. public function testYikatong()
  782. {
  783. // $provider = $this->getProvider('yikatong');
  784. // $resp = $provider->balance();
  785. // $resp = $provider->add(18500608333, 5, 30, [
  786. // 'order_sn' => $this->make_sn()
  787. // ]);
  788. // $resp = $provider->query(['order_sn' => '54641640157747514762']);
  789. $body = '{"msg":"","code":"1","productId":"2000030","orderId":"54641640157747514762","systemOrderId":"1042390009","faceValue":"30","price":"28.35","appId":"200005","mobile":"18500608333","sign":"caafec8ef1abcf6db5517245dbeceb9c"}';
  790. $params = json_decode($body, true);
  791. $provider = $this->getProvider('yikatong', 'RefillCallBack');
  792. $ret = $provider->verify($params);
  793. $resp = $provider->notify($params);
  794. }
  795. public function testSanti()
  796. {
  797. $provider = $this->getProvider('santi');
  798. // $resp = $provider->get_product(17801048874);
  799. // $resp = $provider->add(18500608333, 5, 1024, [
  800. // 'order_sn' => $this->make_sn(),
  801. // 'goods_id' => 7000,
  802. // 'product_code' => 'XYZ100751'
  803. // ]);
  804. $resp = $provider->query(['ch_trade_no' => '1631945759171581']);
  805. // $resp = $provider->balance();
  806. $body = '{"channelOrderNo":"49991631861285846684","extraData":"","orderNo":"1631861288127072","orderStatus":"4","providerResultCode":"3","providerResultReason":"\u5145\u503c\u6210\u529f","resultCode":"1000","resultMessage":"\u6210\u529f","sign":"472490783eaa82c76a1af8702881f04f"}';
  807. $params = json_decode($body, true);
  808. $provider = $this->getProvider('santi', 'RefillCallBack');
  809. $ret = $provider->verify($params);
  810. $resp = $provider->notify($params);
  811. }
  812. public function testSialan_tax()
  813. {
  814. // $provider = $this->getProvider('sialan_tax');
  815. // $resp = $provider->balance();
  816. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  817. // $resp = $provider->query(['ch_trade_no' => '21112214170092559557647']);
  818. $body = '{"api_id":"16856","recharge":"18500608333","amount":"10","order_sn":"21112214170092559557647","query_sn":"64801637561821444619","operator_sn":"","status":"2","sign":"900a01a1268cb14a37d6567691303ed9"}';
  819. $params = json_decode($body, true);
  820. $provider = $this->getProvider('sialan_tax', 'RefillCallBack');
  821. $ret = $provider->verify($params);
  822. $resp = $provider->notify($params);
  823. }
  824. public function testYunchonggong_yd()
  825. {
  826. $provider = $this->getProvider('yunchonggong_yd');
  827. for ($i = 1; $i <= 5; $i++) {
  828. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  829. }
  830. // $resp = $provider->query(['order_sn' => '34061631002071526340']);
  831. // $resp = $provider->balance();
  832. // $body = '{"szOrderId":"34061631002071526340","fSalePrice":"47.7","szAgentId":"200043","nFlag":"3","szVerifyString":"48a7329c13af06b5be1d2fdad706b22e","szPhoneNum":"13699279618","szRtnMsg":"","nDemo":"50"}';
  833. // $params = json_decode($body, true);
  834. // $provider = $this->getProvider('yunchonggong_yd','RefillCallBack');
  835. // $ret = $provider->verify($params);
  836. // $resp = $provider->notify($params);
  837. }
  838. public function testGuochuang_nation()
  839. {
  840. $provider = $this->getProvider('guochuang_nation');
  841. $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  842. // $resp = $provider->query(['order_sn' => '4372390688043259849812']);
  843. // $resp = $provider->balance();
  844. // $body = '{"account":"18500608333","evidence":"N/A","evidenceType":"","id":"D2021090718185107657","inTime":"2021/09/07 18:19:05","money":"1","outerId":"65261631009929751933","status":"SUCCESS"}';
  845. // $params['ts'] = 1631009945;
  846. // $params['sign'] = 'C53F921EB5573EF4D0C757C5B5D4185D';
  847. // $params['body'] = $body;
  848. // $provider = $this->getProvider('guochuang_nation','RefillCallBack');
  849. // $ret = $provider->verify($params);
  850. // $resp = $provider->notify($params);
  851. }
  852. public function testTianyanman()
  853. {
  854. $provider = $this->getProvider('tianyanman');
  855. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  856. // $resp = $provider->query(['order_sn' => '12191631078826857172', 'card_no' => 18500608333, 'card_type' => 5]);
  857. // $resp = $provider->balance();
  858. // $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"}';
  859. // $params = json_decode($body, true);
  860. // $provider = $this->getProvider('tianyanman','RefillCallBack');
  861. // $ret = $provider->verify($params);
  862. // $resp = $provider->notify($params);
  863. }
  864. public function testShimer()
  865. {
  866. $provider = $this->getProvider('shimier');
  867. // $resp = $provider->balance();
  868. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  869. // $resp = $provider->query(['order_sn' => '56391631086657239320']);
  870. // $body = '{"orderId":"210908153756535112","appId":"b3k6DRwSOw","outOrderId":"56391631086657239320","sign":"86f9e783a3374463d546bedfc6920eff","orderStatus":"3","completeTime":"20210908154810","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  871. // $params = json_decode($body, true);
  872. // $provider = $this->getProvider('shimier','RefillCallBack');
  873. // $ret = $provider->verify($params);
  874. // $resp = $provider->notify($params);
  875. }
  876. public function testZhongst_mix()
  877. {
  878. // $provider = $this->getProvider('zhongst_mix');
  879. // $resp = $provider->balance();
  880. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  881. // $resp = $provider->query(['order_sn' => '46291631503985151158']);
  882. $body = '{"szOrderId":"46291631503985151158","fSalePrice":"29.85","szAgentId":"200053","nFlag":"2","szVerifyString":"be07db2c82b63bc2610eee3eac23245b","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  883. $params = json_decode($body, true);
  884. $provider = $this->getProvider('zhongst_mix', 'RefillCallBack');
  885. $ret = $provider->verify($params);
  886. $resp = $provider->notify($params);
  887. }
  888. public function testHangtong()
  889. {
  890. // $provider = $this->getProvider('hangtong');
  891. // $resp = $provider->balance();
  892. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  893. // $resp = $provider->query(['order_sn' => '68221631775122967358']);
  894. $body = '{"phone":"13699279618","orderNo":"F2109161452121045530","status":"success","otherNo":"68221631775122967358","msg":"提交/充值成功","ext":"524501553021467113"}';
  895. $params = json_decode($body, true);
  896. $provider = $this->getProvider('hangtong', 'RefillCallBack');
  897. $ret = $provider->verify($params);
  898. $resp = $provider->notify($params);
  899. }
  900. public function testJinfeng()
  901. {
  902. // $provider = $this->getProvider('jinfeng');
  903. // $resp = $provider->balance();
  904. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  905. // $resp = $provider->query(['order_sn' => '78561631769733386091']);
  906. $body = '{"orderNo":"F2109161322374838924","status":"003","consumerNo":"78561631769733386091","voucherNo":null,"mobile":"18500608333"}';
  907. $params = json_decode($body, true);
  908. $provider = $this->getProvider('jinfeng', 'RefillCallBack');
  909. $ret = $provider->verify($params);
  910. $resp = $provider->notify($params);
  911. }
  912. public function testDashang()
  913. {
  914. // $provider = $this->getProvider('dashang');
  915. // $resp = $provider->balance();
  916. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  917. // $resp = $provider->query(['order_sn' => '63101631784169445345']);
  918. $body = '{"userId":"80800346","bizId":"90290050","ejId":"90916171545126","downstreamSerialno":"67971631783703671946","status":"3","voucher":"","voucherType":"0","sign":"46b13acf67f271e2f85db189ab9e1391"}';
  919. $params = json_decode($body, true);
  920. $provider = $this->getProvider('dashang', 'RefillCallBack');
  921. $ret = $provider->verify($params);
  922. $resp = $provider->notify($params);
  923. }
  924. public function testYuanta()
  925. {
  926. // $provider = $this->getProvider('yuanta');
  927. // $resp = $provider->balance();
  928. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  929. // $resp = $provider->query(['order_sn' => '96081645088688480739']);
  930. $body = '{"orderId":"220217170449505863","appId":"Uar9JIo4Zz","outOrderId":"96081645088688480739","sign":"1483916dbdc2f3b6024894442af816aa","orderStatus":"2","completeTime":"20220217175606","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  931. $params = json_decode($body, true);
  932. $provider = $this->getProvider('yuanta', 'RefillCallBack');
  933. $ret = $provider->verify($params);
  934. $resp = $provider->notify($params);
  935. }
  936. public function testDuojing()
  937. {
  938. // $provider = $this->getProvider('duojing');
  939. // $resp = $provider->balance();
  940. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  941. // $resp = $provider->query(['order_sn' => '51421642755293155833']);
  942. // $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"}';
  943. // $params = json_decode($body, true);
  944. // $provider = $this->getProvider('duojing','RefillCallBack');
  945. // $ret = $provider->verify($params);
  946. // $resp = $provider->notify($params);
  947. }
  948. public function testMenggu()
  949. {
  950. $provider = $this->getProvider('menggu', 'RefillOil');
  951. // $resp = $provider->add(1000111100021211884, 2, 500, ['order_sn' => $this->make_sn()]);
  952. $resp = $provider->query(['order_sn' => '63021632301956855605']);
  953. // $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"}';
  954. // $params = json_decode($body, true);
  955. // $provider = $this->getProvider('menggu','RefillCallBack');
  956. // $ret = $provider->verify($params);
  957. // $resp = $provider->notify($params);
  958. }
  959. public function testMenggu_hf()
  960. {
  961. $provider = $this->getProvider('menggu_hf');
  962. // $resp = $provider->balance();
  963. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  964. // $resp = $provider->query(['order_sn' => '24481632298991701065']);
  965. // $body = '{"orderId":"210922162318123069","appId":"1hqLCRUja7","outOrderId":"24481632298991701065","sign":"73faefba3e179641af0df6f59becce8f","orderStatus":"3","completeTime":"20210922162451","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  966. // $params = json_decode($body, true);
  967. // $provider = $this->getProvider('menggu_hf','RefillCallBack');
  968. // $ret = $provider->verify($params);
  969. // $resp = $provider->notify($params);
  970. }
  971. public function testChizeng()
  972. {
  973. $provider = $this->getProvider('chizeng');
  974. // $resp = $provider->balance();
  975. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  976. $resp = $provider->query(['order_sn' => '7013163540140101017048563']);
  977. // $body = '{"orderid":"UQX21102814052855105","sporderid":"71241635401103845030","userid":"10002523","merchantsubmittime":"20211028140512","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.35","sign":"0B97DC1E16EC3BC5F139AAC3FB4C51BF"}';
  978. // $params = json_decode($body, true);
  979. // $provider = $this->getProvider('chizeng','RefillCallBack');
  980. // $ret = $provider->verify($params);
  981. // $resp = $provider->notify($params);
  982. }
  983. public function testJinxin()
  984. {
  985. // $provider = $this->getProvider('jinxin');
  986. // $resp = $provider->balance();
  987. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  988. // $resp = $provider->query(['order_sn' => '83481632465671278322']);
  989. $body = '{"orderNo":"210924140000185","requestId":"83481632465671278322","sign":"80184350EC5C60445A50C9450D6CFB28","status":1,"supplierNo":"110103353192109241442090289402","timeStamp":"2021-09-24 14:43:07"}';
  990. $params = json_decode($body, true);
  991. $provider = $this->getProvider('jinxin', 'RefillCallBack');
  992. $ret = $provider->verify($params);
  993. $resp = $provider->notify($params);
  994. }
  995. public function testKachong()
  996. {
  997. // $provider = $this->getProvider('kachong');
  998. // $resp = $provider->balance();
  999. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  1000. // $resp = $provider->query(['order_sn' => '30691632889605245135']);
  1001. $body = '{"szAgentId":"200046","szOrderId":"30691632889605245135","szPhoneNum":"18500608333","nDemo":"20","fSalePrice":"19.82","nFlag":"2","szVerifyString":"dbac0df5e9ff2b067f74850f0cf55f3c","szRtnMsg":"982100337029603"}';
  1002. $params = json_decode($body, true);
  1003. $provider = $this->getProvider('kachong', 'RefillCallBack');
  1004. $ret = $provider->verify($params);
  1005. $resp = $provider->notify($params);
  1006. }
  1007. public function testXingzyNormal()
  1008. {
  1009. // $provider = $this->getProvider('xingzy_normal');
  1010. // $resp = $provider->balance();
  1011. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1012. // $resp = $provider->query(['order_sn' => '62881632898853651364']);
  1013. $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}';
  1014. $params = json_decode($body, true);
  1015. $provider = $this->getProvider('xingzy_normal', 'RefillCallBack');
  1016. $ret = $provider->verify($params);
  1017. $resp = $provider->notify($params);
  1018. }
  1019. public function testDingxin()
  1020. {
  1021. $provider = $this->getProvider('dingxin');
  1022. $resp = $provider->balance();
  1023. }
  1024. public function testPushang()
  1025. {
  1026. $provider = $this->getProvider('pushang');
  1027. // $resp = $provider->balance();
  1028. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1029. $resp = $provider->query(['order_sn' => '23391632986567769626']);
  1030. // $body = '{"msg":"\u8d26\u52a1\u6263\u6b3e\u5931\u8d25","extOrderId":"22081632982700152800","orderId":"R2021093014240000154555","salePrice":"30.0900","sign":"b0fe238f16e516316729589d42ab97b1","state":"5","exchangeTraded":""}';
  1031. // $params = json_decode($body, true);
  1032. // $provider = $this->getProvider('pushang','RefillCallBack');
  1033. // $ret = $provider->verify($params);
  1034. // $resp = $provider->notify($params);
  1035. }
  1036. public function testDinghui()
  1037. {
  1038. // $providers = $this->getProvider('dinghui');
  1039. // $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1040. // $resp = $providers->query(['order_sn' => '84891634279500368841']);
  1041. // $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"}';
  1042. // $params = json_decode($body, true);
  1043. $params['method'] = 'order.charge.status.update.notify';
  1044. $params['format'] = 'json';
  1045. $params['sign'] = '60d4e658cb730b9d8cc0c451414de9b51b79d14fa217261f7bbcf4a3472553b093a5c2377abba9573ed9d5e1a39a9f693830671ff1e641cc97a9782d2b2f393bed6a7bd22be0c642a13e20a7c6cf9f562c11ae65335758bd58ee55853b555cc2e511b6655c6e944a9defa6f0247263578d1554ff7709a7ced90db93911562dcb485518a4da3c21cb650ff01cacfcfa8dd9de533f5a5be2accc065e23cbd38b1b104e15feb3ce823c8cb7c7d5adf3fef0be768d8c25dc813a9112a14ec54a9e2ee517a5ba5b9ce2234dd4329b61c5456a82405aa6d2a307b4ec04be52bd1e3e5b204a2a4d7899d6fbf0fc09cd443cddc947f02bf58730142e9edc2b98eeeae086';
  1046. $params['message'] = 'GYmjEFMoy5jUfg/Ju7NRCSyaoyg2fu9EWpABAHb55xKpkvIedqXPDqRwG6Lo7iNx0A2yc6/IaU7vqwNV9YEVZOwHBDtsGXuHK1GCq5KUaW70pq1wEKr6kgjAHDITH7XdB3jmdSAQFhQYTi5hCz5EWWAzRKLYgTZeDksePKshm67QDbJzr8hpTu+rA1X1gRVkVqAL750crFPclgeWEYFG4mO4ZlmqygUrgz4si+seZ3f0pq1wEKr6kgjAHDITH7XdkFLNHratZfufbZKIZ5r+CA==';
  1047. $params['msgtype'] = 'notify_msg';
  1048. $params['version'] = 'V2.0';
  1049. $params['app_id'] = 'yeziapi';
  1050. $params['notify_id'] = '0000017c83f4786201547473800e31ee';
  1051. $params['timestamp'] = '1634301409378';
  1052. $providers = $this->getProvider('dinghui', 'RefillCallBack');
  1053. $ret = $providers->verify($params);
  1054. $resp = $providers->notify($params);
  1055. }
  1056. public function testHuafutong()
  1057. {
  1058. // $provider = $this->getProvider('huafutong');
  1059. // $resp = $provider->balance();
  1060. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1061. // $resp = $provider->query(['order_sn' => '48151634200413207059']);
  1062. $body = '{"PostData":"MJ88hD85bb2VPjI+q9R64jrR2TnZQSUn+4PHZCz1of27YQswyLKdNoNyyNuVEd2+98raKRC0pD+KFQf6beJn5mgOe+u9JjTtqxM5VcVYX93DQACU1ZdfJ+rSx5WRMwvi"}';
  1063. $params = json_decode($body, true);
  1064. $provider = $this->getProvider('huafutong', 'RefillCallBack');
  1065. $data = $provider->notify($params);
  1066. }
  1067. public function testShuoruan()
  1068. {
  1069. $provider = $this->getProvider('shuoruan');
  1070. // $resp = $provider->balance();
  1071. $resp = $provider->add(13911129867, 5, 10, ['order_sn' => $this->make_sn()]);
  1072. // $resp = $provider->query(['order_sn' => '80261634802627091026']);
  1073. $params['Action'] = 'CX';
  1074. $params['AgentAccount'] = '18600608333';
  1075. $params['Agentbalance'] = '-9.970';
  1076. $params['Orderid'] = '80261634802627091026';
  1077. $params['Chargeid'] = '2162076796';
  1078. $params['Orderstatu_int'] = '16';
  1079. $params['Orderstatu_text'] = '缴费成功_';
  1080. $params['TransCash'] = '10.000';
  1081. $params['OrderPayment'] = '9.970';
  1082. $params['Errorcode'] = '0000';
  1083. $params['Errormsg'] = '';
  1084. $params['Sign'] = '654fbc24c3d0878247bc3be3ed699f16';
  1085. $provider = $this->getProvider('shuoruan', 'RefillCallBack');
  1086. // $ret = $provider->verify($params);
  1087. // $data = $provider->notify($params);
  1088. }
  1089. public function testLinzhu()
  1090. {
  1091. // $provider = $this->getProvider('linzhu');
  1092. // $resp = $provider->balance();
  1093. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1094. // $resp = $provider->query(['order_sn' => '43881634986696312260']);
  1095. $body = '{"orderNo":"F2110231858443112627","status":"019","consumerNo":"43881634986696312260","voucherNo":null,"mobile":"18500608333"}';
  1096. $params = json_decode($body, true);
  1097. $provider = $this->getProvider('linzhu', 'RefillCallBack');
  1098. $ret = $provider->verify($params);
  1099. $data = $provider->notify($params);
  1100. }
  1101. public function testFangxing()
  1102. {
  1103. $provider = $this->getProvider('fangxing');
  1104. // $resp = $provider->balance();
  1105. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(), 'order_id' => 111111]);
  1106. $resp = $provider->query(['order_sn' => '82581635239506988570']);
  1107. $body = '{"orderId":"O21102617115969210570","respCode":"10003","respMsg":"\u6210\u529f \u5bf9\u7aef\u6d41\u6c34\u53f7: 21102617611981771","sign":"013F54D5E415668D3E012BBDE9E4BF16","transNo":"82581635239506988570"}';
  1108. $params = json_decode($body, true);
  1109. $provider = $this->getProvider('fangxing', 'RefillCallBack');
  1110. $ret = $provider->verify($params);
  1111. $data = $provider->notify($params);
  1112. }
  1113. public function testHuafutongMan()
  1114. {
  1115. // $provider = $this->getProvider('huafutongman');
  1116. // $resp = $provider->balance();
  1117. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1118. // $resp = $provider->query(['order_sn' => '73721635476007331621']);
  1119. $body = '{"PostData":"1Gi96e4PzohQIdxj8W4uOH4Q5pzT8ZHyCc+ZpTl7XEEF5TPgXffD32KLy0l2fZ7X36qZTO4JJA\/4nhWJRERklMy1FQuan825KK5vy2zQ6FOxg8vXMy0e7HOVg0kx123i"}';
  1120. $params = json_decode($body, true);
  1121. $provider = $this->getProvider('huafutongman', 'RefillCallBack');
  1122. $data = $provider->notify($params);
  1123. }
  1124. public function testFeimingyu()
  1125. {
  1126. // $provider = $this->getProvider('feimingyu');
  1127. // $resp = $provider->balance();
  1128. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1129. // $resp = $provider->query(['order_sn' => '99741635757876781160']);
  1130. $body = '{"userid":"69876","order_id":"21110117111869876daed6b187","account":"18500608333","amount":"30","price":"28.41","state":"failed","user_order":"99741635757876781160","sign":"C82F4821547BBFC462E9758EE28287E1","voucher":""}';
  1131. $params = json_decode($body, true);
  1132. $provider = $this->getProvider('feimingyu', 'RefillCallBack');
  1133. $ret = $provider->verify($params);
  1134. $resp = $provider->notify($params);
  1135. }
  1136. public function testDashangnormal()
  1137. {
  1138. // $provider = $this->getProvider('dashang_normal');
  1139. // $resp = $provider->balance();
  1140. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1141. // $resp = $provider->query(['order_sn' => '34461636081408575185']);
  1142. $body = '{"userId":"80800357","bizId":"60040030","ejId":"91105110431325","downstreamSerialno":"34461636081408575185","status":"3","voucher":"","voucherType":"0","sign":"24a40c2b677820533e418d4a2b3f0806"}';
  1143. $params = json_decode($body, true);
  1144. $provider = $this->getProvider('dashang_normal', 'RefillCallBack');
  1145. $ret = $provider->verify($params);
  1146. $resp = $provider->notify($params);
  1147. }
  1148. public function testHuafutong_doubi()
  1149. {
  1150. $provider = $this->getProvider('huafutong_doubi');
  1151. // $resp = $provider->balance();
  1152. $resp = $provider->add(588073521, 7, 100, [
  1153. 'order_sn' => $this->make_sn(),
  1154. 'product_code' => 'XYZ100747'
  1155. ]);
  1156. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  1157. // $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"}';
  1158. // $params = json_decode($body, true);
  1159. // $provider = $this->getProvider('huafutong_doubi','RefillCallBack');
  1160. // $ret = $provider->verify($params);
  1161. // $resp = $provider->notify($params);
  1162. }
  1163. public function testYunchonggongfs()
  1164. {
  1165. // $provider = $this->getProvider('yunchonggongfs');
  1166. // $resp = $provider->balance();
  1167. // $resp = $provider->add(13935705732, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 4]);
  1168. // $resp = $provider->query(['order_sn' => '44721636430254462028']);
  1169. $body = '{"orderId":"211109115744298048","appId":"Z1sU5unYK7","outOrderId":"44721636430254462028","sign":"a368d3f6a8c2ec2d2dbd587f9a78a937","orderStatus":"3","completeTime":"20211109115840","orderDesc":"timeout"}';
  1170. $params = json_decode($body, true);
  1171. $provider = $this->getProvider('yunchonggongfs', 'RefillCallBack');
  1172. $ret = $provider->verify($params);
  1173. $resp = $provider->notify($params);
  1174. }
  1175. public function testDingchi()
  1176. {
  1177. // $provider = $this->getProvider('dingchi');
  1178. // $resp = $provider->balance();
  1179. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1180. // $resp = $provider->query(['order_sn' => '70651636508446628072']);
  1181. $body = '{"userId":"671","bizId":"200","id":"32894267","downstreamSerialno":"70651636508446628072","status":"2","statusDesc":"","extend":"100101101002111100940543157996","sign":"984c4708c14d0c2e08295c5010109ecf"}';
  1182. $params = json_decode($body, true);
  1183. $provider = $this->getProvider('dingchi', 'RefillCallBack');
  1184. $ret = $provider->verify($params);
  1185. $resp = $provider->notify($params);
  1186. }
  1187. public function testYanhao()
  1188. {
  1189. // $provider = $this->getProvider('yanhao');
  1190. // $resp = $provider->balance();
  1191. // $resp = $provider->add(2423503330, 5, 30, ['order_sn' => $this->make_sn()]);
  1192. // $resp = $provider->query(['order_sn' => '49571636609949577130']);
  1193. $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":""}';
  1194. $params = json_decode($body, true);
  1195. $provider = $this->getProvider('yanhao', 'RefillCallBack');
  1196. $ret = $provider->verify($params);
  1197. $resp = $provider->notify($params);
  1198. }
  1199. public function testYikatongfs()
  1200. {
  1201. $provider = $this->getProvider('yikatongfs');
  1202. // $resp = $provider->balance();
  1203. // $resp = $provider->add(13935705732, 5, 30, ['order_sn' => $this->make_sn()]);
  1204. $resp = $provider->query(['order_sn' => '30551636705402587123']);
  1205. // $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"}';
  1206. // $params = json_decode($body, true);
  1207. // $provider = $this->getProvider('yikatongfs','RefillCallBack');
  1208. // $ret = $provider->verify($params);
  1209. // $resp = $provider->notify($params);
  1210. }
  1211. public function testLexiangLt()
  1212. {
  1213. // $provider = $this->getProvider('lexianglt');
  1214. // $resp = $provider->balance();
  1215. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1216. // $resp = $provider->query(['order_sn' => '48911637136021090867']);
  1217. $body = '{"PostData":"405deLsCOS2UNQTOH\/M+3IWDDMm841EhhBwTgdasFvVqqVS3RHA6YdIzxAS2g8PIjmie1mOw+aNzXZ\/8rVR8lQTjoaeOCkE04cTc07JvDe1IDtvO2e66u+zzO+x0MUfU"}';
  1218. $params = json_decode($body, true);
  1219. $provider = $this->getProvider('lexianglt', 'RefillCallBack');
  1220. $ret = $provider->verify($params);
  1221. $resp = $provider->notify($params);
  1222. }
  1223. public function testXiaoniu_doubi()
  1224. {
  1225. // $provider = $this->getProvider('xiaoniu_doubi');
  1226. // $resp = $provider->balance();
  1227. // $resp = $provider->add(61841435, 7, 100, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100747']);
  1228. // $resp = $provider->query(['order_sn' => '22971637223235623767']);
  1229. $body = '{"content":"","realAmt":"92.0000","status":"1","timestamp":"20211118161507","sign":"28598a6c4674294aecb0337ef20b4e02","orderNo":"XN20211118161400122361716","mOrderNo":"22971637223235623767"}';
  1230. $params = json_decode($body, true);
  1231. $provider = $this->getProvider('xiaoniu_doubi', 'RefillCallBack');
  1232. $ret = $provider->verify($params);
  1233. $resp = $provider->notify($params);
  1234. }
  1235. public function testGuantu()
  1236. {
  1237. $provider = $this->getProvider('guantu');
  1238. // $resp = $provider->balance();
  1239. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1240. $resp = $provider->query(['order_sn' => '82321639620607197216']);
  1241. // $body = '{"orderId":"211207110843025294","appId":"sprTIuIsst","outOrderId":"86151638846512034929","sign":"a94dc11a88831c4cc9cf79cd2dc4b60c","orderStatus":"3","completeTime":"20211207110903","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1242. // $params = json_decode($body, true);
  1243. // $provider = $this->getProvider('guantu','RefillCallBack');
  1244. // $ret = $provider->verify($params);
  1245. // $resp = $provider->notify($params);
  1246. }
  1247. public function testYiqian()
  1248. {
  1249. $provider = $this->getProvider('yiqian');
  1250. // $resp = $provider->balance();
  1251. // $resp = $provider->add(185001234561608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1252. $resp = $provider->query(['order_sn' => '58661639626089905328']);
  1253. // $body = '{"extOrderId":"12871637568430713782","orderId":"R2021112216240026238817","salePrice":"9.9950","sign":"b42f61bfb59f9f36c26c68e4f37f5a19","state":"4","exchangeTraded":"110103308002111221607170298685"}';
  1254. // $params = json_decode($body, true);
  1255. // $provider = $this->getProvider('yiqian','RefillCallBack');
  1256. // $ret = $provider->verify($params);
  1257. // $resp = $provider->notify($params);
  1258. }
  1259. public function testYinghuochong()
  1260. {
  1261. // $provider = $this->getProvider('yinghuochong');
  1262. // $resp = $provider->balance();
  1263. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1264. // $resp = $provider->query(['order_sn' => '14911637655330156024']);
  1265. $body = '{"times":"20211123161536","orderId":"2021112316151926232932","voucher":"","customerOrderId":"14911637655330156024","qyKey":"qhsvsyvj9rsekyvadlctr1ptx135fb3t","sign":"15D3272BE7BB7B038EEC9EA344C86567","status":"2"}';
  1266. $params = json_decode($body, true);
  1267. $provider = $this->getProvider('yinghuochong', 'RefillCallBack');
  1268. $ret = $provider->verify($params);
  1269. $resp = $provider->notify($params);
  1270. }
  1271. public function testMeixu()
  1272. {
  1273. // $provider = $this->getProvider('meixu');
  1274. // $resp = $provider->balance();
  1275. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1276. // $resp = $provider->query(['order_sn' => '89361637662404606711']);
  1277. $body = '{"orderid":"XOJ21112318130505847","sporderid":"89361637662404606711","userid":"10003105","merchantsubmittime":"20211123181328","resultno":"9","parvalue":"10","remark1":"","payno":"","fundbalance":"-10.02","sign":"634194D21B034356F32C5A9FB045F23F"}';
  1278. $params = json_decode($body, true);
  1279. $provider = $this->getProvider('meixu', 'RefillCallBack');
  1280. $ret = $provider->verify($params);
  1281. $resp = $provider->notify($params);
  1282. }
  1283. public function testFuyuan()
  1284. {
  1285. // $provider = $this->getProvider('fuyuan');
  1286. // $resp = $provider->balance();
  1287. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1288. // $resp = $provider->query(['order_sn' => '60431637736327027514']);
  1289. $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":""}';
  1290. $params = json_decode($body, true);
  1291. $provider = $this->getProvider('fuyuan', 'RefillCallBack');
  1292. $ret = $provider->verify($params);
  1293. $resp = $provider->notify($params);
  1294. }
  1295. public function testDongye()
  1296. {
  1297. $provider = $this->getProvider('dongye');
  1298. // $resp = $provider->balance();
  1299. $resp = $provider->add(15139608757, 4, 10, ['order_sn' => $this->make_sn()]);
  1300. // $resp = $provider->query(['order_sn' => '94031638352288398624']);
  1301. // $body = '{"orderid":"NYG21113016502782946","sporderid":"33391638262247818098","userid":"10003105","merchantsubmittime":"20211130165104","resultno":"1","parvalue":"30","remark1":"100101101012111301651024042626","payno":"100101101012111301651024042626","fundbalance":"-30.075","sign":"4075B5A1D2639B19B91AC2FF45B5CFFE"}';
  1302. // $params = json_decode($body, true);
  1303. // $provider = $this->getProvider('dongye','RefillCallBack');
  1304. // $ret = $provider->verify($params);
  1305. // $resp = $provider->notify($params);
  1306. }
  1307. public function testDongyefs()
  1308. {
  1309. $provider = $this->getProvider('dongyefs');
  1310. // $resp = $provider->balance();
  1311. // [$goods_id, $price] = $provider->goods(1, 10, 4, 6, []);
  1312. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(),'regin_no' => 6]);
  1313. $resp = $provider->query(['order_sn' => '24461638757715661527']);
  1314. }
  1315. public function testBaixuan()
  1316. {
  1317. // $provider = $this->getProvider('baixuan');
  1318. // $resp = $provider->balance();
  1319. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1320. // $resp = $provider->query(['order_sn' => '22241638773647636323']);
  1321. $body = '{"orderId":"211206145422241449","appId":"Hs2pvfcPTK","outOrderId":"22241638773647636323","sign":"acdd4cdbf6c9ad8d1eec12070caef9c7","orderStatus":"3","completeTime":"20211206145422","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1322. $params = json_decode($body, true);
  1323. $provider = $this->getProvider('baixuan', 'RefillCallBack');
  1324. $ret = $provider->verify($params);
  1325. $resp = $provider->notify($params);
  1326. }
  1327. public function testBaixuan_normal()
  1328. {
  1329. // $provider = $this->getProvider('baixuan_normal');
  1330. // $resp = $provider->balance();
  1331. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1332. // $resp = $provider->query(['order_sn' => '79931638775980503797']);
  1333. $body = '{"orderId":"211206153306269670","appId":"ntzRlj2kNV","outOrderId":"79931638775980503797","sign":"f67939b937f818e97c551e76b4b4e5ea","orderStatus":"3","completeTime":"20211206153309","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1334. $params = json_decode($body, true);
  1335. $provider = $this->getProvider('baixuan_normal', 'RefillCallBack');
  1336. $ret = $provider->verify($params);
  1337. $resp = $provider->notify($params);
  1338. }
  1339. public function testCangbuYd()
  1340. {
  1341. // $provider = $this->getProvider('cangbuyd');
  1342. // $resp = $provider->balance();
  1343. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1344. // $resp = $provider->query(['order_sn' => '12441638778449837197']);
  1345. $body = '{"customerId":"220","tmporder":"12441638778449837197","orderno":"s16387784558073061114220","number":"13699279618","money":"50","amount":"47.9500","code":"-1","cardno":"","voucher":"","sign":"6623dbe8e392b61ddc843e16804e9eed"}';
  1346. $params = json_decode($body, true);
  1347. $provider = $this->getProvider('cangbuyd', 'RefillCallBack');
  1348. $ret = $provider->verify($params);
  1349. $resp = $provider->notify($params);
  1350. }
  1351. public function testShangtou()
  1352. {
  1353. // $provider = $this->getProvider('shangtou');
  1354. // $resp = $provider->balance();
  1355. // $resp = $provider->add(1004638637, 4, 100, ['order_sn' => $this->make_sn()]);
  1356. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1357. $body = '{"order_id":"88791638870099595473","out_order_id":"EZZbg23f4K487498","orderBillNo":"","mchid":"20126","account":"1004638637","price":"100","status":"1","sign":"87c3fc2beaabb107ef80c06dd186742f"}';
  1358. $params = json_decode($body, true);
  1359. $provider = $this->getProvider('shangtou', 'RefillCallBack');
  1360. $ret = $provider->verify($params);
  1361. $resp = $provider->notify($params);
  1362. }
  1363. public function testGuantufs()
  1364. {
  1365. $provider = $this->getProvider('guantufs');
  1366. // $resp = $provider->balance();
  1367. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1368. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1369. }
  1370. public function testRuixunda()
  1371. {
  1372. // $provider = $this->getProvider('ruixunda');
  1373. // $resp = $provider->balance();
  1374. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1375. // $resp = $provider->query(['order_sn' => '35541639548211758246']);
  1376. $body = '{"orderId":"211215140335739778","appId":"kU6tn6YMjx","outOrderId":"35541639548211758246","sign":"524851b131c90398626e0e8798b73579","orderStatus":"3","completeTime":"20211215140440","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1377. $params = json_decode($body, true);
  1378. $provider = $this->getProvider('ruixunda', 'RefillCallBack');
  1379. $ret = $provider->verify($params);
  1380. $resp = $provider->notify($params);
  1381. }
  1382. public function testDashang_kami()
  1383. {
  1384. $provider = $this->getProvider('dashang_kami');
  1385. $resp = $provider->balance();
  1386. }
  1387. public function testWenye_oil()
  1388. {
  1389. $provider = $this->getProvider('wenye_oil', 'RefillOil');
  1390. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1391. }
  1392. public function testYunlingdf()
  1393. {
  1394. // $provider = $this->getProvider('yunlingdf');
  1395. // $resp = $provider->add(1004638637, 4, 50, ['order_sn' => $this->make_sn(), 'province' => 1]);
  1396. // $resp = $provider->query(['order_sn' => '52311640682774916978']);
  1397. $body = '{"orderid":"RCE21122817138556500","sporderid":"52311640682774916978","userid":"10002623","merchantsubmittime":"20211228182932","resultno":"1","parvalue":"50","remark1":"50.00","payno":"50.00","fundbalance":"-46.5","sign":"B40807706460BAF9CBE150166633F20A"}';
  1398. $params = json_decode($body, true);
  1399. $provider = $this->getProvider('yunlingdf', 'RefillCallBack');
  1400. $ret = $provider->verify($params);
  1401. $resp = $provider->notify($params);
  1402. }
  1403. public function testYamiao_high()
  1404. {
  1405. $provider = $this->getProvider('yamiao_high');
  1406. $resp = $provider->balance();
  1407. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1408. // $resp = $provider->query(['order_sn' => '63301640162626708212']);
  1409. // $body = '{"orderId":"211222164353000006","appId":"piFzrSOCIy","outOrderId":"63301640162626708212","sign":"558e9992d99fb5e9dd47b1f5a7677b01","orderStatus":"3","completeTime":"20211222164445","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1410. // $params = json_decode($body, true);
  1411. // $provider = $this->getProvider('yamiao_high','RefillCallBack');
  1412. // $ret = $provider->verify($params);
  1413. // $resp = $provider->notify($params);
  1414. }
  1415. public function testYamiao_normal()
  1416. {
  1417. $provider = $this->getProvider('yamiao_normal');
  1418. $resp = $provider->balance();
  1419. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1420. // $resp = $provider->query(['order_sn' => '95951640223816352024']);
  1421. // $body = '{"orderId":"211223094402000046","appId":"1pjrA9YErq","outOrderId":"95951640223816352024","sign":"5bd7135f5ef35c8f111eddfc06593941","orderStatus":"3","completeTime":"20211223094512","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1422. // $params = json_decode($body, true);
  1423. // $provider = $this->getProvider('yamiao_normal','RefillCallBack');
  1424. // $ret = $provider->verify($params);
  1425. // $resp = $provider->notify($params);
  1426. }
  1427. public function testJiyemei_doubi()
  1428. {
  1429. $provider = $this->getProvider('jiyemei_doubi');
  1430. // $resp = $provider->balance();
  1431. $resp = $provider->add(588073521, mtopcard\ThirdRefillCard, 50, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100753']);
  1432. // $resp = $provider->query(['order_sn' => '87081640849391308752']);
  1433. // $body ='{"userid":"da5fe7253b97460fb84d","ordernum":"87081640849391308752","mobile":"588073521","timestamp":"20211230153015","state":"2","desc":"%E5%85%85%E5%80%BC%E6%88%90%E5%8A%9F","serialno":"10000017047394231199159327","sign":"0feea71ea06c91bf67c6d866c050ca88"}';
  1434. // $params = json_decode($body, true);
  1435. // $provider = $this->getProvider('jiyemei_doubi','RefillCallBack');
  1436. // $ret = $provider->verify($params);
  1437. // $resp = $provider->notify($params);
  1438. }
  1439. public function testJiyemei()
  1440. {
  1441. // $provider = $this->getProvider('jiyemei');
  1442. // $resp = $provider->balance();
  1443. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1444. // $resp = $provider->query(['order_sn' => '22041640934793168827']);
  1445. $body = '{"userid":"80dfaeabbb7240268ac8","ordernum":"22041640934793168827","mobile":"13699279618","timestamp":"20211231151434","state":"3","desc":"%E5%85%85%E5%80%BC%E5%A4%B1%E8%B4%A5%21","sign":"4415ebb690da66aa8c0cf58a7130f1a5"}';
  1446. $params = json_decode($body, true);
  1447. $provider = $this->getProvider('jiyemei', 'RefillCallBack');
  1448. $ret = $provider->verify($params);
  1449. $resp = $provider->notify($params);
  1450. }
  1451. public function testCangxin()
  1452. {
  1453. $provider = $this->getProvider('cangxin');
  1454. // $resp = $provider->balance();
  1455. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 100, ['order_sn' => $this->make_sn()]);
  1456. $resp = $provider->query(['order_sn' => '7388320697632252006499']);
  1457. // $body = '{"sysOrderNo":"R16409227448286K55VRJ","clientId":"10025","verifyString":"557363563501c97e9aa2f5cecc0b3679","clientOrderNo":"66891640922736203952","status":"3"}';
  1458. // $params = json_decode($body, true);
  1459. // $provider = $this->getProvider('cangxin','RefillCallBack');
  1460. // $ret = $provider->verify($params);
  1461. // $resp = $provider->notify($params);
  1462. }
  1463. public function testBaixuannew_high()
  1464. {
  1465. // $provider = $this->getProvider('baixuannew_high');
  1466. // $resp = $provider->balance();
  1467. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1468. // $resp = $provider->query(['order_sn' => '24051641457089799916']);
  1469. $body = '{"orderid":"PLN22010616189234154","sporderid":"24051641457089799916","userid":"10002504","merchantsubmittime":"20220106162023","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.1","sign":"0279426E9CCEF5366B422D44DB5976C1"}';
  1470. $params = json_decode($body, true);
  1471. $provider = $this->getProvider('baixuannew_high', 'RefillCallBack');
  1472. $ret = $provider->verify($params);
  1473. $resp = $provider->notify($params);
  1474. }
  1475. public function testYouhenew()
  1476. {
  1477. // $provider = $this->getProvider('youhenew');
  1478. // $resp = $provider->balance();
  1479. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1480. // $resp = $provider->query(['order_sn' => '77201646366493835757']);
  1481. $body = '{"szOrderId":"77201646366493835757","fSalePrice":"28.59","szAgentId":"200038","nFlag":"3","szVerifyString":"bdaa73499a506839654d4b9c36c6831a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  1482. $params = json_decode($body, true);
  1483. $provider = $this->getProvider('youhenew', 'RefillCallBack');
  1484. $ret = $provider->verify($params);
  1485. $resp = $provider->notify($params);
  1486. }
  1487. public function testHuoshenguo()
  1488. {
  1489. // $provider = $this->getProvider('huoshenguo');
  1490. // $resp = $provider->balance();
  1491. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1492. // $resp = $provider->query(['order_sn' => '90691642049771400349']);
  1493. $body = '{"orderId":"220113125625000016","appId":"xaPOF8SAEG","outOrderId":"90691642049771400349","sign":"b00285a7eabef29b0a0ad400ce8a3ea0","orderStatus":"3","completeTime":"20220113125843","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1494. $params = json_decode($body, true);
  1495. $provider = $this->getProvider('huoshenguo', 'RefillCallBack');
  1496. $ret = $provider->verify($params);
  1497. $resp = $provider->notify($params);
  1498. }
  1499. public function testXinhengyangnew()
  1500. {
  1501. // $provider = $this->getProvider('xinhengyangnew');
  1502. // $resp = $provider->balance();
  1503. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 30, ['order_sn' => $this->make_sn()]);
  1504. // $resp = $provider->query(['order_sn' => '90991642572014786398']);
  1505. $body = '{"mchid":"200050","msg":"充值失败","oid":"1000325764014","orderid":"90991642572014786398","price":28.62,"sign":"56db7e6a4748a74bd1fac1a1ad5e8d6d","status":2,"voucher":""}';
  1506. $params = json_decode($body, true);
  1507. $provider = $this->getProvider('xinhengyangnew', 'RefillCallBack');
  1508. $ret = $provider->verify($params);
  1509. $resp = $provider->notify($params);
  1510. }
  1511. public function testTianchen()
  1512. {
  1513. // $provider = $this->getProvider('tianchen');
  1514. // $resp = $provider->balance();
  1515. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 500, ['order_sn' => $this->make_sn()]);
  1516. // $resp = $provider->query(['order_sn' => '60701644202744810497']);
  1517. $body = '{"mchid":"100125","msg":"充值失败","oid":"1000061410881","orderid":"60701644202744810497","price":"501.000","sign":"5dc1f9e466f30f02f2756c886ad36020","status":"2","voucher":""}';
  1518. $params = json_decode($body, true);
  1519. $provider = $this->getProvider('tianchen', 'RefillCallBack');
  1520. $ret = $provider->verify($params);
  1521. $resp = $provider->notify($params);
  1522. }
  1523. public function testYunchonggong_lt()
  1524. {
  1525. // $provider = $this->getProvider('yunchonggong_lt');
  1526. // $resp = $provider->balance();
  1527. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 50, ['order_sn' => $this->make_sn()]);
  1528. // $resp = $provider->query(['order_sn' => '97971642992760355090']);
  1529. $body = '{"orderId":"220124105256190713","appId":"nOlXoN2jRJ","outOrderId":"97971642992760355090","sign":"81a579f8c935da72fe94ca0960d0a71f","orderStatus":"3","completeTime":"20220124105547","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1530. $params = json_decode($body, true);
  1531. $provider = $this->getProvider('yunchonggong_lt', 'RefillCallBack');
  1532. $ret = $provider->verify($params);
  1533. $resp = $provider->notify($params);
  1534. }
  1535. public function testYiqianfs()
  1536. {
  1537. // $provider = $this->getProvider('yiqianfs');
  1538. // $resp = $provider->balance();
  1539. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1540. // $resp = $provider->query(['order_sn' => '68971644218662333282']);
  1541. $body = '{"extOrderId":"68971644218662333282","orderId":"R2022020715240046789583","salePrice":"10.0000","sign":"cf59a3d76377cac096ac07c590657af0","state":"5"}';
  1542. $params = json_decode($body, true);
  1543. $provider = $this->getProvider('yiqianfs','RefillCallBack');
  1544. $ret = $provider->verify($params);
  1545. $resp = $provider->notify($params);
  1546. }
  1547. public function testZhutian()
  1548. {
  1549. $provider = $this->getProvider('zhutian');
  1550. // $resp = $provider->add(1004638637, 4, 50, ['order_sn' => $this->make_sn(), 'province' => 1]);
  1551. $resp = $provider->query(['order_sn' => '20661644895674724153']);
  1552. }
  1553. public function testRuizhi()
  1554. {
  1555. // $provider = $this->getProvider('ruizhi');
  1556. // $resp = $provider->balance();
  1557. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  1558. // $resp = $provider->query(['order_sn' => '66031645157064675953']);
  1559. $body = '{"userid":"65920","order_id":"22021812045065920f2b95cef2","account":"13699279618","amount":"100","price":"100.05","state":"success","user_order":"66031645157064675953","sign":"642AAB4C5A9CC56248AE80113878DB19","voucher":"220218-097370786582375"}';
  1560. $params = json_decode($body, true);
  1561. $provider = $this->getProvider('ruizhi','RefillCallBack');
  1562. $ret = $provider->verify($params);
  1563. $resp = $provider->notify($params);
  1564. }
  1565. public function testRuierxun()
  1566. {
  1567. // $provider = $this->getProvider('ruierxun');
  1568. // $resp = $provider->balance();
  1569. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1570. // $resp = $provider->query(['order_sn' => '48011645165293970916']);
  1571. $body = '{"orderId":"220218142143123894","appId":"LaEORKdrnZ","outOrderId":"48011645165293970916","sign":"28f30e616d06e7936d612995bb086d39","orderStatus":"3","completeTime":"20220218142205","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1572. $params = json_decode($body, true);
  1573. $provider = $this->getProvider('ruierxun','RefillCallBack');
  1574. $ret = $provider->verify($params);
  1575. $resp = $provider->notify($params);
  1576. }
  1577. public function testNingying()
  1578. {
  1579. // $provider = $this->getProvider('ningying');
  1580. // $resp = $provider->balance();
  1581. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1582. // $resp = $provider->query(['order_sn' => '59481645434420716297']);
  1583. $body = '{"orderId":"220221170704698128","appId":"O8y6eOzWY1","outOrderId":"59481645434420716297","sign":"7476bd7d6cb51a5b25a183145d4a0ada","orderStatus":"3","completeTime":"20220221171148","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1584. $params = json_decode($body, true);
  1585. $provider = $this->getProvider('ningying','RefillCallBack');
  1586. $ret = $provider->verify($params);
  1587. $resp = $provider->notify($params);
  1588. }
  1589. public function testCangxin_yi()
  1590. {
  1591. // $provider = $this->getProvider('cangxin_yi');
  1592. // $resp = $provider->balance();
  1593. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  1594. // $resp = $provider->query(['order_sn' => '98761645683605613490']);
  1595. $body = '{"sysOrderNo":"R1645683614014oToK4ua","officialOrderNo":"","clientId":"10043","verifyString":"4040530613390299cf5d432a59dad348","clientOrderNo":"98761645683605613490","status":"4"}';
  1596. $params = json_decode($body, true);
  1597. $provider = $this->getProvider('cangxin_yi','RefillCallBack');
  1598. $ret = $provider->verify($params);
  1599. $resp = $provider->notify($params);
  1600. }
  1601. public function testZhenghe()
  1602. {
  1603. // $provider = $this->getProvider('zhenghe');
  1604. // $resp = $provider->balance();
  1605. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  1606. // $resp = $provider->query(['order_sn' => '20411645686498504519']);
  1607. $body = '{"szOrderId":"20411645686498504519","fSalePrice":"30.15","szAgentId":"200032","nFlag":"2","szVerifyString":"af368366f759289054328390f419d062","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  1608. $params = json_decode($body, true);
  1609. $provider = $this->getProvider('zhenghe','RefillCallBack');
  1610. $ret = $provider->verify($params);
  1611. $resp = $provider->notify($params);
  1612. }
  1613. public function testLexiang()
  1614. {
  1615. // $provider = $this->getProvider('lexiang');
  1616. // $resp = $provider->balance();
  1617. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1618. // $resp = $provider->query(['order_sn' => '36181645780442291806', 'commit_time' => 1645780259]);
  1619. $body = '{"mchId":"20","mchOrderNo":"36181645780442291806","sysOrderNo":"S202202251714039EusUAV0yO","account":"18074608795","money":"30.0000","status":"2","sign":"c55977367aa083850456c5ec7c14ed87","certificate":"1000000083422022517369130925"}';
  1620. $params = json_decode($body, true);
  1621. $provider = $this->getProvider('lexiang','RefillCallBack');
  1622. $ret = $provider->verify($params);
  1623. $resp = $provider->notify($params);
  1624. }
  1625. public function testKuaikuai()
  1626. {
  1627. // $provider = $this->getProvider('kuaikuai');
  1628. // $resp = $provider->balance();
  1629. // $resp = $provider->add(185006083, 5, 30, ['order_sn' => $this->make_sn()]);
  1630. // $resp = $provider->query(['order_sn' => '48821646219340197679']);
  1631. $body = '{"msg":"100101101012202281653493036477","orderId":"37691646038424123424","createTime":1646038427,"sign":"35df4f13ee4dcaed2d582d709ff66073","orderNum":"2c922ab97f2683b5017f3f89246d1e4a","status":2}';
  1632. $params = json_decode($body, true);
  1633. $provider = $this->getProvider('kuaikuai','RefillCallBack');
  1634. $ret = $provider->verify($params);
  1635. $resp = $provider->notify($params);
  1636. }
  1637. public function testJianjiao()
  1638. {
  1639. $provider = $this->getProvider('jianjiao');
  1640. // $resp = $provider->balance();
  1641. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1642. // $resp = $provider->query(['order_sn' => '14481646204704630736']);
  1643. // $body = '{"order_id":"22030215052639807","out_order_id":"14481646204704630736","status":3,"mobile":"13699279618","amount":50,"app_key":"3l6kd2yqsvcwftij","official_sn":"","timestamp":1646205722,"sign":"db77f48b8964b74e9c5e44fa9b3dcf49"}';
  1644. // $params = json_decode($body, true);
  1645. // $provider = $this->getProvider('jianjiao','RefillCallBack');
  1646. // $ret = $provider->verify($params);
  1647. // $resp = $provider->notify($params);
  1648. }
  1649. public function testHuoli()
  1650. {
  1651. // $provider = $this->getProvider('huoli');
  1652. // $resp = $provider->balance();
  1653. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1654. // $resp = $provider->query(['order_sn' => '89741646294399883574']);
  1655. $body = '{"app_key":"expzye","out_trade_no":"89741646294399883574","sign":"24adfe57f5ada22db154d4ed4b4b8e5f","status":2}';
  1656. $params = json_decode($body, true);
  1657. $provider = $this->getProvider('huoli','RefillCallBack');
  1658. $ret = $provider->verify($params);
  1659. $resp = $provider->notify($params);
  1660. }
  1661. public function testNingying_normal()
  1662. {
  1663. // $provider = $this->getProvider('ningying_normal');
  1664. // $resp = $provider->balance();
  1665. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1666. // $resp = $provider->query(['order_sn' => '20731646376051289638']);
  1667. $body = '{"orderId":"220304144055089955","appId":"wxhhe5zZhM","outOrderId":"20731646376051289638","sign":"c1f3622f9320c127ded0470246370bc9","orderStatus":"3","completeTime":"20220304144328","orderDesc":"\u5904\u7406\u8d85\u65f6"}';
  1668. $params = json_decode($body, true);
  1669. $provider = $this->getProvider('ningying_normal','RefillCallBack');
  1670. $ret = $provider->verify($params);
  1671. $resp = $provider->notify($params);
  1672. }
  1673. public function testYuanrun()
  1674. {
  1675. // $provider = $this->getProvider('yuanrun');
  1676. // $resp = $provider->balance();
  1677. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1678. // $resp = $provider->query(['order_sn' => '25801646616116681917', 'card_no' => 18500608333, 'commit_time' => 1646616131]);
  1679. $body = '{"cpid":"49449","order_no":"22030709220549449952471675","mobile":"18500608333","amount":"30","status":"success","sz_order_no":"100101101042203070922143047338","ret_para":"25801646616116681917","sign":"2fd2661ce353e4cb554d7d3ca3f09f4d"}';
  1680. $params = json_decode($body, true);
  1681. $provider = $this->getProvider('yuanrun','RefillCallBack');
  1682. $ret = $provider->verify($params);
  1683. $resp = $provider->notify($params);
  1684. }
  1685. public function testFeimingyunew()
  1686. {
  1687. $provider = $this->getProvider('feimingyunew');
  1688. // $resp = $provider->balance();
  1689. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1690. // $resp = $provider->query(['order_sn' => '24001646631354076583']);
  1691. // $body = '{"orderid":"AUH22030713352134241","sporderid":"24001646631354076583","userid":"10002506","merchantsubmittime":"20220307133712","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.26","sign":"0C4A264A6692C68EB8CC000BEC5C0E53"}';
  1692. // $params = json_decode($body, true);
  1693. // $provider = $this->getProvider('feimingyunew','RefillCallBack');
  1694. // $ret = $provider->verify($params);
  1695. // $resp = $provider->notify($params);
  1696. }
  1697. public function testBailian()
  1698. {
  1699. $provider = $this->getProvider('bailian', 'RefillOil');
  1700. $resp = $provider->balance();
  1701. }
  1702. public function testHangtongyj()
  1703. {
  1704. $provider = $this->getProvider('hangtongyj');
  1705. // $resp = $provider->balance();
  1706. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1707. $resp = $provider->query(['order_sn' => '13791646729519910878']);
  1708. // $body = '{"phone":"13699279618","orderNo":"F2203081623054678137","status":"fail","otherNo":"23351646727780199005","msg":"产品不存在","ext":null}';
  1709. // $params = json_decode($body, true);
  1710. // $provider = $this->getProvider('hangtongyj','RefillCallBack');
  1711. // $ret = $provider->verify($params);
  1712. // $resp = $provider->notify($params);
  1713. }
  1714. public function testRuixundaman()
  1715. {
  1716. // $provider = $this->getProvider('ruixundaman');
  1717. // $resp = $provider->balance();
  1718. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1719. // $resp = $provider->query(['order_sn' => '98441646796808890306']);
  1720. $body = '{"orderId":"220309113357355093","appId":"8tYeow0MYZ","outOrderId":"98441646796808890306","sign":"ec2619a26a11e3320fcdc71fccc7b310","orderStatus":"2","completeTime":"20220309193655","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"2022233820220309193635"}';
  1721. $params = json_decode($body, true);
  1722. $provider = $this->getProvider('ruixundaman','RefillCallBack');
  1723. $ret = $provider->verify($params);
  1724. $resp = $provider->notify($params);
  1725. }
  1726. public function testRuizhi_tax()
  1727. {
  1728. // $provider = $this->getProvider('ruizhi_tax');
  1729. // $resp = $provider->balance();
  1730. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1731. // $resp = $provider->query(['order_sn' => '36411646882603857635']);
  1732. $body = '{"userid":"10713","order_id":"22031011232910713e1bc01a6b","account":"13699279618","amount":"50","price":"52.15","state":"success","user_order":"36411646882603857635","sign":"3CEDF5DF4F8A178471FA24B07C8D9BBB","voucher":"2022031027610736554488548137"}';
  1733. $params = json_decode($body, true);
  1734. $provider = $this->getProvider('ruizhi_tax','RefillCallBack');
  1735. $ret = $provider->verify($params);
  1736. $resp = $provider->notify($params);
  1737. }
  1738. public function testPengxinda()
  1739. {
  1740. $provider = $this->getProvider('pengxinda');
  1741. // $resp = $provider->balance();
  1742. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1743. // $resp = $provider->query(['order_sn' => '29131646900654146357']);
  1744. // $body = '{"api_userid":"beijingyz","order_no":"29131646900654146357","retcode":"1","errcode":"100101101042203101624383157550"}';
  1745. // $params = json_decode($body, true);
  1746. // $provider = $this->getProvider('pengxinda','RefillCallBack');
  1747. // $ret = $provider->verify($params);
  1748. // $resp = $provider->notify($params);
  1749. }
  1750. public function testHuazhong()
  1751. {
  1752. $provider = $this->getProvider('huazhong');
  1753. // $resp = $provider->balance();
  1754. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1755. $resp = $provider->query(['order_sn' => '58581646984524382528']);
  1756. // $body = ' {"orderid":"GCN22031115279906665","sporderid":"54011646983613476599","userid":"10002763","merchantsubmittime":"20220311153014","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.65","sign":"198392B102B9B9FB60D52EF93EF2BDCC"}';
  1757. // $params = json_decode($body, true);
  1758. // $provider = $this->getProvider('huazhong','RefillCallBack');
  1759. // $ret = $provider->verify($params);
  1760. // $resp = $provider->notify($params);
  1761. }
  1762. public function testYamiaoman()
  1763. {
  1764. // $provider = $this->getProvider('yamiaoman');
  1765. // $resp = $provider->balance();
  1766. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1767. // $resp = $provider->query(['order_sn' => '53351647242979116742']);
  1768. $body = '{"orderId":"220314152954756093","appId":"zIODZmzSCk","outOrderId":"53351647242979116742","sign":"41ad7d4b4b26559377c6443d2b0d6c68","orderStatus":"3","completeTime":"20220314172722","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1769. $params = json_decode($body, true);
  1770. $provider = $this->getProvider('yamiaoman','RefillCallBack');
  1771. $ret = $provider->verify($params);
  1772. $resp = $provider->notify($params);
  1773. }
  1774. public function testKailinyu()
  1775. {
  1776. // $provider = $this->getProvider('kailinyu');
  1777. // $resp = $provider->balance();
  1778. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1779. // $resp = $provider->query(['order_sn' => '96401647327929264712']);
  1780. $body = '{"orderid":"AFO22031515056588604","sporderid":"96401647327929264712","userid":"10002963","merchantsubmittime":"20220315150727","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.59","sign":"597D9581047FD47B4117870FD49D9D10"}';
  1781. $params = json_decode($body, true);
  1782. $provider = $this->getProvider('kailinyu','RefillCallBack');
  1783. $ret = $provider->verify($params);
  1784. $resp = $provider->notify($params);
  1785. }
  1786. public function testKuaikuaifs()
  1787. {
  1788. $provider = $this->getProvider('kuaikuaifs');
  1789. // $resp = $provider->balance();
  1790. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1791. // $resp = $provider->query(['order_sn' => '96401647327929264712']);
  1792. }
  1793. public function testYouheman()
  1794. {
  1795. // $provider = $this->getProvider('youheman');
  1796. // $resp = $provider->balance();
  1797. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1798. // $resp = $provider->query(['order_sn' => '65891648444382784227']);
  1799. $body = '{"szOrderId":"65891648444382784227","fSalePrice":"91.5","szAgentId":"200040","nFlag":"2","szVerifyString":"899758ef408c86164529a3724806d52b","szPhoneNum":"18500608333","szRtnMsg":"OM1508468825220870144","nDemo":"100"}';
  1800. $params = json_decode($body, true);
  1801. $provider = $this->getProvider('youheman','RefillCallBack');
  1802. $ret = $provider->verify($params);
  1803. $resp = $provider->notify($params);
  1804. }
  1805. public function testHuoshenguoman()
  1806. {
  1807. // $provider = $this->getProvider('huoshenguoman');
  1808. // $resp = $provider->balance();
  1809. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1810. // $resp = $provider->query(['order_sn' => '89261649309598653504']);
  1811. $body = '{"orderId":"220407133327635878","appId":"tME7rcK07P","outOrderId":"89261649309598653504","sign":"e46a90c064177aa34cac3a3951410df9","orderStatus":"3","completeTime":"20220407140654","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1812. $params = json_decode($body, true);
  1813. $provider = $this->getProvider('huoshenguoman','RefillCallBack');
  1814. $ret = $provider->verify($params);
  1815. $resp = $provider->notify($params);
  1816. }
  1817. public function testAmingjd()
  1818. {
  1819. // $provider = new refill\amingjd\RefillPhone([]);
  1820. // $resp = $provider->add(13699279618, 5, 30, ['order_sn' => $this->make_sn()]);
  1821. // $resp = $provider->query(['order_sn' => '42301616475989518588']);
  1822. $body = '{"order_id":"83321616478215494884","mchid":"10003","tel":"13699279618","price":"30.00","sign":"01c49620c155a80bc43cecc2b1651868","status":"0","out_order_id":"0"}';
  1823. $params = json_decode($body, true);
  1824. refill\RefillFactory::instance()->notify('amingjd', $params);
  1825. }
  1826. public function testAmingjdmanPhone()
  1827. {
  1828. $provider = new refill\amingjdman\RefillPhone([]);
  1829. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1830. // $resp = $provider->query(['order_sn' => '82741619577673758623']);
  1831. $body = '{"order_id":"82741619577673758623","mchid":"10045","tel":"13699279618","price":"30.00","sign":"2fe55fb4d4b2acc2e98137adb82fa57e","status":"0","out_order_id":"0"}';
  1832. $params = json_decode($body, true);
  1833. refill\RefillFactory::instance()->notify('amingjdman', $params);
  1834. }
  1835. public function testWeishengyWtPhone()
  1836. {
  1837. $provider = new refill\weishengywt\RefillPhone([]);
  1838. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1839. // $resp = $provider->query(['order_sn' => '27681620538125370652']);
  1840. $data = '{"szOrderId":"27681620538125370652","fSalePrice":"47.5","szAgentId":"200045","nFlag":"2","szVerifyString":"92fafec121b77518d539ed9f5005fdf9","szPhoneNum":"18500608333","szRtnMsg":"110103308032105091328520502948","nDemo":"50"}';
  1841. $params = json_decode($data, true);
  1842. refill\RefillFactory::instance()->notify('weishengywt', $params);
  1843. }
  1844. public function testWeishengyJDPhone()
  1845. {
  1846. $provider = new refill\weishengyjd\RefillPhone([]);
  1847. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1848. // $resp = $provider->query(['order_sn' => '14261620887423822879']);
  1849. $data = '{"szOrderId":"14261620887423822879","fSalePrice":"44.0","szAgentId":"200050","nFlag":"3","szVerifyString":"3cceef390602058e1d2fdde2e07636a4","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  1850. $params = json_decode($data, true);
  1851. refill\RefillFactory::instance()->notify('weishengyjd', $params);
  1852. }
  1853. public function testYeziPhone()
  1854. {
  1855. $provider = new refill\yezi\RefillPhone([]);
  1856. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1857. // $resp = $provider->query(['order_sn' => '35261620988265145105']);
  1858. $data = '{"mchid":"10147","order_sn":"35261620988265145105","amount":"50.00","cardno":"18500608333","trade_no":"6363570674332280422825","idcard":"","card_name":"","official_sn":"","message":"","state":"CANCEL","sign":"b79f2ddbb5b7eef98f414585a5bd2cde"}';
  1859. $params = json_decode($data, true);
  1860. refill\RefillFactory::instance()->notify('yezi', $params);
  1861. }
  1862. public function testWeishengysixPhone()
  1863. {
  1864. $provider = new refill\weishengysix\RefillPhone([]);
  1865. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1866. // $resp = $provider->query(['order_sn' => '17171624434289348649']);
  1867. $data = '{"szOrderId":"17171624434289348649","fSalePrice":"44.5","szAgentId":"200074","nFlag":"2","szVerifyString":"fa5735090199d97e6a50e7f3083be111","szPhoneNum":"18500608333","szRtnMsg":"AW2021062315464045A27","nDemo":"50"}';
  1868. $params = json_decode($data, true);
  1869. refill\RefillFactory::instance()->notify('weishengysix', $params);
  1870. }
  1871. public function testHaohaoOil()
  1872. {
  1873. $provider = new refill\haohao\RefillOil([]);
  1874. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1875. $data['amount'] = 20000;
  1876. $data['mchId'] = 467253;
  1877. $data['mchOrderNo'] = '5514850674656058146707';
  1878. $data['mobile'] = '';
  1879. $data['sign'] = 'F282D68972A437F3CEB3516BB2FDD19A';
  1880. $data['operator'] = 4;
  1881. $data['number'] = '1000113200020348885';
  1882. $data['thirdOrderNo'] = '2317184088901537792';
  1883. $data['directStatus'] = 5;
  1884. // $input = json_decode($data, true);
  1885. refill\RefillFactory::instance()->notify('haohao',$data);
  1886. }
  1887. public function testJuzhuoOil()
  1888. {
  1889. $provider = new refill\juzhuo\RefillOil([]);
  1890. // $resp = $provider->add(1000111100021211884, 2, 200, ['order_sn' => $this->make_sn()]);
  1891. // $resp = $provider->query(['order_sn' => '20121621578185774451']);
  1892. // $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"}';
  1893. // $input = json_decode($data, true);
  1894. $data['channelsort'] = 'OIL_CARD';
  1895. $data['channelno'] = '';
  1896. $data['onlystr'] = '0772770675248490450497';
  1897. $data['channel'] = 'JD';
  1898. $data['sign'] = '4a9f113bfa4aa2d155de7136ca0afe2d';
  1899. $data['amt'] = '100';
  1900. $data['notifyurl'] = 'http://121.89.212.167/racc/callback/lingzh/juzhuo.php';
  1901. $data['cardtype'] = 'Sinoepc';
  1902. $data['cardno'] = '1000113200029532754';
  1903. $data['orgid'] = '6095171500';
  1904. $data['account'] = '';
  1905. $data['status'] = '3';
  1906. refill\RefillFactory::instance()->notify('juzhuo',$data);
  1907. }
  1908. public function testZeheng()
  1909. {
  1910. $provider = new refill\zeheng\RefillOil([]);
  1911. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  1912. // $resp = $provider->query(['order_sn' => '45951620814813332604']);
  1913. $data = '{"extOrderId":"45951620814813332604","orderId":"R2021051218240000192928","salePrice":"96.8000","sign":"0d6b9641eaf8d36ecba82cfefc6aa307","state":"4"}';
  1914. $input = json_decode($data, true);
  1915. refill\RefillFactory::instance()->notify('zeheng',$input);
  1916. }
  1917. public function testXiaoniu()
  1918. {
  1919. $provider = $this->getProvider('xiaoniu','RefillOil');
  1920. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 500, ['order_sn' => $this->make_sn()]);
  1921. $resp = $provider->query(['order_sn' => '15981632813532634860']);
  1922. // $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"}';
  1923. // $input = json_decode($data, true);
  1924. // refill\RefillFactory::instance()->notify('xiaoniu',$input);
  1925. // $resp = $provider->balance();
  1926. }
  1927. public function testYingdian()
  1928. {
  1929. $provider = $this->getProvider('yingdian','RefillOil');
  1930. $resp = $provider->balance();
  1931. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 200, ['order_sn' => $this->make_sn()]);
  1932. // $resp = $provider->query(['order_sn' => '94691626688509004979']);
  1933. // $resp = $provider->query(['order_sn' => '45671626687631917892']);
  1934. // $data = '{"orderNo":"94691626688509004979","vouchers":"[\"2421071918070053\"]","orderId":"63400811-e877-11eb-a89f-00163e147a9b","spOrderNo":"052423YK241720210719175503603473","status":"SUCCESS"}';
  1935. // $input = json_decode($data, true);
  1936. // refill\RefillFactory::instance()->notify('yingdian',$input);
  1937. }
  1938. public function testZhenqi()
  1939. {
  1940. $provider = new refill\zhenqi\RefillPhone([]);
  1941. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1942. // $resp = $provider->query(['order_sn' => '42611626267945146350']);
  1943. // $data = '{"out_trade_no":"14001626266194932132","create_time":"1626266201","sp_order_no":"110103353232107142044550619272","status":"1","sign":"3C2F8ED40EEB9151D2117E2DA1FA64AA"}';
  1944. // $input = json_decode($data, true);
  1945. // refill\RefillFactory::instance()->notify('zhenqi',$input);
  1946. $resp = $provider->balance();
  1947. }
  1948. public function testYunsuoyaofs()
  1949. {
  1950. $provider = new refill\yunsuoyaofs\RefillPhone([]);
  1951. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1952. // $resp = $provider->query(['order_sn' => '85681626322286098163']);
  1953. // $data = '{"orderid":"AMU21071512111544162","sporderid":"85681626322286098163","userid":"10002671","merchantsubmittime":"20210715121132","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.7","sign":"45ECFF26E84F7DC3BFFDCFAFF3B1E561"}';
  1954. // $input = json_decode($data, true);
  1955. // refill\RefillFactory::instance()->notify('yunsuoyaofs',$input);
  1956. $resp = $provider->balance();
  1957. }
  1958. public function testZhenqi1m()
  1959. {
  1960. $provider = new refill\zhenqi1m\RefillPhone([]);
  1961. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1962. // $resp = $provider->query(['order_sn' => '45611626334593130605']);
  1963. // $data = '{"out_trade_no":"45611626334593130605","create_time":"1626334606","sp_order_no":"202107152200117311004426885635","status":"1","sign":"CF8EB902F60B76591C898C991361BB4D"}';
  1964. // $input = json_decode($data, true);
  1965. // refill\RefillFactory::instance()->notify('zhenqi1m',$input);
  1966. $resp = $provider->balance();
  1967. }
  1968. public function testHongxudayz()
  1969. {
  1970. $provider = new refill\hongxudayz\RefillPhone([]);
  1971. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1972. // $resp = $provider->query(['order_sn' => '78221626445316011524']);
  1973. $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":""}';
  1974. $input = json_decode($data, true);
  1975. refill\RefillFactory::instance()->notify('hongxudayz',$input);
  1976. }
  1977. public function testHongxudagy()
  1978. {
  1979. $provider = new refill\hongxudagy\RefillPhone([]);
  1980. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1981. // $resp = $provider->query(['order_sn' => '86521626446475240639']);
  1982. // $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":""}';
  1983. // $input = json_decode($data, true);
  1984. // refill\RefillFactory::instance()->notify('hongxudagy',$input);
  1985. $resp = $provider->balance();
  1986. }
  1987. public function testHongxudayz996()
  1988. {
  1989. $provider = new refill\hongxudayz996\RefillPhone([]);
  1990. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1991. // $resp = $provider->query(['order_sn' => '73691626753698522472']);
  1992. $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":""}';
  1993. $input = json_decode($data, true);
  1994. refill\RefillFactory::instance()->notify('hongxudayz996',$input);
  1995. }
  1996. public function testHongxudagy996()
  1997. {
  1998. $provider = new refill\hongxudagy996\RefillPhone([]);
  1999. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2000. // $resp = $provider->query(['order_sn' => '87681626758209689412']);
  2001. $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":""}';
  2002. $input = json_decode($data, true);
  2003. refill\RefillFactory::instance()->notify('hongxudagy996',$input);
  2004. }
  2005. public function testYunchonggong()
  2006. {
  2007. $provider = $this->getProvider('yunchonggong');
  2008. // $resp = $provider->balance();
  2009. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2010. $resp = $provider->query(['order_sn' => '59901635220132734124']);
  2011. $body = '{"orderId":"211026114901000481","appId":"c4vuuOV43q","outOrderId":"59901635220132734124","sign":"4749539f129242a13f1f083dbc114f23","orderStatus":"3","completeTime":"20211026115027","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2012. $params = json_decode($body, true);
  2013. $provider = $this->getProvider('yunchonggong', 'RefillCallback');
  2014. $ret = $provider->verify($params);
  2015. $resp = $provider->notify($params);
  2016. }
  2017. public function testBingdht()
  2018. {
  2019. $provider = new refill\bingdht\RefillPhone([]);
  2020. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2021. // $resp = $provider->query(['order_sn' => '62491626761331174794']);
  2022. // $data = '{"szOrderId":"62491626761331174794","fSalePrice":"45.25","szAgentId":"200044","nFlag":"3","szVerifyString":"46745191d31b16ee7978a7f5554357d6","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  2023. // $input = json_decode($data, true);
  2024. // refill\RefillFactory::instance()->notify('bingdht',$input);
  2025. $resp = $provider->balance();
  2026. }
  2027. public function testYuecheng()
  2028. {
  2029. $provider = new refill\yuecheng\RefillPhone([]);
  2030. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2031. // $resp = $provider->query(['order_sn' => '45101626776884387650']);
  2032. $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"}';
  2033. $input = json_decode($data, true);
  2034. refill\RefillFactory::instance()->notify('yuecheng',$input);
  2035. }
  2036. public function testPrice()
  2037. {
  2038. $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
  2039. $rate = 0.994;
  2040. foreach ($amounts as $amount) {
  2041. $price[] = $amount * $rate;
  2042. }
  2043. }
  2044. public function testCallbackDir()
  2045. {
  2046. $path = "/callback";
  2047. $file = "/mobile/callback/refill_call.php";
  2048. $basename = basename($file);
  2049. $tmp = "{$path}/{$basename}.php";
  2050. return file_exists($tmp);
  2051. }
  2052. public function testWeisPhone()
  2053. {
  2054. $provider = new refill\weisyd\RefillPhone([]);
  2055. $resp = $provider->add(17801048874, 4, 10, ['order_sn' => $this->make_sn()]);
  2056. }
  2057. public function testXcPhone()
  2058. {
  2059. $provider = new refill\xc\RefillPhone([]);
  2060. $resp = $provider->add(13699279618, 5, 100, ['order_sn' => $this->make_sn()]);
  2061. // $resp = $provider->query(['order_sn' => '87961616926444043617']);
  2062. $params['pay_orderid'] = '87961616926444043617';
  2063. $params['pay_iphone'] = '18500608333';
  2064. $params['pay_money'] = '100';
  2065. $params['wt_orderid'] = '202103281816121070';
  2066. $params['status'] = '1';
  2067. $params['sign'] = 'f7be2e859a5a6dc7b1a8273361617752';
  2068. // refill\RefillFactory::instance()->notify('xc',$params);
  2069. }
  2070. public function testAfandPhone()
  2071. {
  2072. $provider = new refill\afand\RefillPhone([]);
  2073. // for ($i = 3; $i > 0; --$i) {
  2074. $resp = $provider->query(['order_sn' => '540668612768904780']);
  2075. // }
  2076. }
  2077. public function testAfandengPhone()
  2078. {
  2079. $provider = new refill\afandeng\RefillPhone([]);
  2080. // for ($i = 5; $i > 0; --$i) {
  2081. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2082. // }
  2083. // $resp = $provider->query(['order_sn' => '20941616115610023539']);
  2084. // $params['usr'] = 'afandeng';
  2085. // $params['ord'] = '20941616115610023539';
  2086. // $params['state'] = '2';
  2087. // $params['bz'] = '';
  2088. // $params['sgn'] = 'BA2C9D379C3EB648A0B7AAB3A21A3F6A';
  2089. // refill\RefillFactory::instance()->notify('afandeng',$params);
  2090. }
  2091. public function testWantongPhone()
  2092. {
  2093. $provider = new refill\wantong\RefillPhone([]);
  2094. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2095. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2096. $resp = $provider->query(['order_sn' => '26061618988575301841']);
  2097. $data = '{"uid":"97396885","order_no":"26061618988575301841","mobile_order_no":"","phone_number":"13699279618","face_value":"3000","status":"9","sign":"1a019202656cf4feffe715025fab01bf"}';
  2098. $input = json_decode($data, true);
  2099. // refill\RefillFactory::instance()->notify('wantong',$input);
  2100. }
  2101. public function testXunyinPhone()
  2102. {
  2103. $provider = $this->getProvider('xunyin');
  2104. $resp = $provider->balance();
  2105. // $resp = $provider->add(17703711950, 6, 30, ['order_sn' => $this->make_sn()]);
  2106. // $resp = $provider->query(['order_sn' => '76831617176125893158']);
  2107. // $xml = '<Order><cpid>8417</cpid><orderid>40591617173295524057</orderid><order_no>14784226</order_no><msg>充值中</msg><Code>0000</Code><Cards/></Order>';
  2108. // $resp = $provider->xmlToArray($xml);
  2109. // if ($resp['Code'] === '0000') {
  2110. // return [true, $resp['order_no'], false];
  2111. // } else {
  2112. // return [false, $resp['msg'], false];
  2113. // }
  2114. // $params['ext'] = '';
  2115. // $params['code'] = '8888';
  2116. // $params['sign'] = '428ac223cf3a1f6f3d382aac754e8e17';
  2117. // $params['statemes'] = '成功';
  2118. // $params['id'] = '76831617176125893158';
  2119. // $params['userid'] = '8417';
  2120. // $params['operatorid'] = '1000000083421033115583773201';
  2121. // $params['status'] = 'SUCCESS';
  2122. // refill\RefillFactory::instance()->notify('xunyin',$params);
  2123. $resp = $provider->balance();
  2124. }
  2125. public function testFenshengPhone()
  2126. {
  2127. $file = BASE_HELPER_RAPI_PATH . "/qianqian/RefillPhone.php";
  2128. if(!file_exists($file)){
  2129. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  2130. return false;
  2131. } else {
  2132. require_once($file);
  2133. Log::record("file={$file} load success.",Log::DEBUG);
  2134. }
  2135. $provider = new refill\qianqian\RefillPhone([]);
  2136. $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2137. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  2138. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  2139. // $datas = json_decode($datas,true);
  2140. // foreach ($datas as $data) {
  2141. // refill\RefillFactory::instance()->notify('fensheng',$data);
  2142. // }
  2143. }
  2144. public function testQianqianPhone()
  2145. {
  2146. $provider = new refill\qianqian\RefillPhone([]);
  2147. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2148. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  2149. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  2150. // $datas = json_decode($datas,true);
  2151. // foreach ($datas as $data) {
  2152. // refill\RefillFactory::instance()->notify('fensheng',$data);
  2153. // }
  2154. $resp = $provider->balance();
  2155. }
  2156. public function testQianqianmanPhone()
  2157. {
  2158. $provider = new refill\qianqianman\RefillPhone([]);
  2159. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2160. // $resp = $provider->query(['order_sn' => '72011621236975003462']);
  2161. $data = '{"orderNo":"F2105171538062539442","status":"019","consumerNo":"72011621236975003462","voucherNo":null,"mobile":"13699279618"}';
  2162. $input = json_decode($data, true);
  2163. refill\RefillFactory::instance()->notify('qianqianman',$input);
  2164. }
  2165. public function testRiyingPhone()
  2166. {
  2167. $provider = new refill\riying\RefillPhone([]);
  2168. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2169. $resp = $provider->query(['ch_trade_no' => '2021041311120213187423105022']);
  2170. $data = '{"UserId":"10050","SysOrderId":"2021041311120213187423105022","OrderId":"15641618283518423567","State":"4","Timestamp":"1618283565746","VoucherType":"1","VoucherContent":"511009928000087852","Sign":"a6ec70a3ea42baae941528398c6d0a43"}';
  2171. $input = json_decode($data, true);
  2172. // refill\RefillFactory::instance()->notify('riying',$input);
  2173. }
  2174. public function testWeishengyPhone()
  2175. {
  2176. $provider = new refill\weishengy\RefillPhone([]);
  2177. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2178. // $resp = $provider->query(['order_sn' => '15551618590601301527']);
  2179. $data = '{"masId":"699270071532654592","oids":"158877719094,166090529155,158887187476","orderNo":"62411618635377880788","orderPrice":"150.00","phone":"18500608333","sign":"3EC10A32FC4CCC976048E1164D0FCBF6","status":"1","time":"1618643281063","type":"2"}';
  2180. $input = json_decode($data, true);
  2181. refill\RefillFactory::instance()->notify('weishengy',$input);
  2182. }
  2183. public function testWailingPhone()
  2184. {
  2185. $provider = new refill\wailing\RefillPhone([]);
  2186. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2187. $resp = $provider->query(['order_sn' => '73241618543784045618']);
  2188. $data = '{"order_id":"73241618543784045618","mchid":"10045","tel":"13699279618","price":"30.00","sign":"4991de3e40f14c198b8c194455ea021b","status":"0","out_order_id":"0"}';
  2189. $input = json_decode($data, true);
  2190. // refill\RefillFactory::instance()->notify('wailing',$input);
  2191. }
  2192. public function testShengyingPhone()
  2193. {
  2194. $provider = new refill\shengying\RefillPhone([]);
  2195. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2196. $resp = $provider->query(['order_sn' => '37571618805115582483']);
  2197. $data = '{"TaskID":"129636","Mobile":"13699279618","Status":"4","ReportTime":"2021-04-19T12:06:16.050","ReportCode":"1:511531522026586295","OutTradeNo":"37571618805115582483","ReceiptNum":"511531522026586295","Sign":"a7f46a988bc8483091d94130804e5078"}';
  2198. $input = json_decode($data, true);
  2199. // refill\RefillFactory::instance()->notify('shengying',$input);
  2200. }
  2201. public function testYunlingPhone()
  2202. {
  2203. $provider = new refill\yunling\RefillPhone([]);
  2204. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2205. // $resp = $provider->query(['order_sn' => '73791623147517199719']);
  2206. // $data = '{"orderid":"EAF21060818183032772","sporderid":"73791623147517199719","userid":"10002504","merchantsubmittime":"20210608181912","resultno":"1","parvalue":"30","remark1":"1000000083421060818483137636","payno":"1000000083421060818483137636","fundbalance":"-28.59","sign":"8D77517AC3905ED88BF79EE789A5FA86"}';
  2207. // $input = json_decode($data, true);
  2208. // refill\RefillFactory::instance()->notify('yunling',$input);
  2209. $resp = $provider->balance();
  2210. }
  2211. public function testZhongstPhone()
  2212. {
  2213. // $provider = $this->getProvider('zhongst');
  2214. // $resp = $provider->balance();
  2215. // $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn()]);
  2216. // $resp = $provider->query(['order_sn' => '14941642477572151012']);
  2217. $body = '{"orderId":"220118114638207211","appId":"Jab1HfumVk","outOrderId":"14941642477572151012","sign":"4e594f9c541667ea5f07c509993932fb","orderStatus":"2","completeTime":"20220118115013","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"110103308212201181148550490052"}';
  2218. $params = json_decode($body, true);
  2219. $provider = $this->getProvider('zhongst','RefillCallBack');
  2220. $ret = $provider->verify($params);
  2221. $resp = $provider->notify($params);
  2222. }
  2223. public function testXunaoPhone()
  2224. {
  2225. $provider = new refill\xunao\RefillPhone([]);
  2226. // $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  2227. // $resp = $provider->query(['order_sn' => '40021619431386253803', 'card_no' => 18074608795, 'card_type' => 6]);
  2228. // $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"}';
  2229. // $input = json_decode($data, true);
  2230. // refill\RefillFactory::instance()->notify('xunao',$input);
  2231. $resp = $provider->balance();
  2232. }
  2233. public function testYonghePhone()
  2234. {
  2235. $provider = new refill\yonghe\RefillPhone([]);
  2236. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2237. // $resp = $provider->query(['order_sn' => '20461619597297972685']);
  2238. // $data = '{"szOrderId":"20461619597297972685","fSalePrice":"29.955","szAgentId":"200115","nFlag":"2","szVerifyString":"b5c292a13c5e67a9b850eb37239682ae","szPhoneNum":"13699279618","szRtnMsg":"2021042822001139701437383521","nDemo":"30"}';
  2239. // $input = json_decode($data, true);
  2240. // refill\RefillFactory::instance()->notify('yonghe',$input);
  2241. $resp = $provider->balance();
  2242. }
  2243. public function testJumiPhone()
  2244. {
  2245. $provider = new refill\jumikc\RefillPhone([]);
  2246. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2247. // $resp = $provider->query(['order_sn' => '12161619768293529384']);
  2248. // $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"}';
  2249. // $input = json_decode($data, true);
  2250. // refill\RefillFactory::instance()->notify('jumi',$input);
  2251. $resp = $provider->balance();
  2252. }
  2253. public function testJumiOil()
  2254. {
  2255. $provider = new refill\jumi\RefillOil([]);
  2256. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  2257. // $resp = $provider->query(['order_sn' => '29021620617872685187']);
  2258. $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"}';
  2259. $input = json_decode($data, true);
  2260. refill\RefillFactory::instance()->notify('jumi',$input);
  2261. }
  2262. public function testFengyePhone()
  2263. {
  2264. $provider = new refill\fengye\RefillPhone([]);
  2265. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  2266. // $resp = $provider->query(['order_sn' => '53511620355988978053', 'card_no' => 18074608795, 'card_type' => 6]);
  2267. $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"}';
  2268. $input = json_decode($data, true);
  2269. refill\RefillFactory::instance()->notify('fengye',$input);
  2270. }
  2271. public function testYunsuoyaoPhone()
  2272. {
  2273. $provider = new refill\yunsuoyao\RefillPhone([]);
  2274. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2275. // $resp = $provider->query(['order_sn' => '20431621331092296201']);
  2276. // $data = '{"orderid":"RLU21051817441937847","sporderid":"20431621331092296201","userid":"10002501","merchantsubmittime":"20210518174858","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.74","sign":"426EAC103B79505BAE7AB3F16886F1A8"}';
  2277. // $input = json_decode($data, true);
  2278. // refill\RefillFactory::instance()->notify('yunsuoyao',$input);
  2279. $resp = $provider->balance();
  2280. }
  2281. public function testAfdPhone()
  2282. {
  2283. $provider = new refill\afd\RefillPhone([]);
  2284. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2285. // $resp = $provider->query(['order_sn' => '71001621233525947994']);
  2286. $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"}';
  2287. $input = json_decode($data, true);
  2288. refill\RefillFactory::instance()->notify('afd',$input);
  2289. }
  2290. public function testLuqianPhone()
  2291. {
  2292. $provider = new refill\luqian\RefillPhone([]);
  2293. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  2294. $resp = $provider->query(['order_sn' => '2829660672500596314764']);
  2295. $data = '{"amount":"100","charge_type":"0","code":"1","partner_id":"38","phone":"18500608333","sign":"c2c86cccc73fa991a63c369e683c91f2","partner_order_no":"34101618897099329575","official_order_id":"110103308072104201338340278420"}';
  2296. $input = json_decode($data, true);
  2297. // refill\RefillFactory::instance()->notify('luqian',$input);
  2298. }
  2299. public function testAfandfsPhone()
  2300. {
  2301. $provider = new refill\afandfs\RefillPhone([]);
  2302. // $resp = $provider->add(15139608757, 4, 30, ['order_sn' => $this->make_sn()]);
  2303. // $resp = $provider->query(['order_sn' => '65101618975926761630']);
  2304. // $data = '{"amount":"30","charge_type":"2","code":"1","partner_id":"52","phone":"15139608757","sign":"a7f54c1ac3e1af72f9fc849086cc4bec","partner_order_no":"65101618975926761630","official_order_id":"20210421113256628350"}';
  2305. // $input = json_decode($data, true);
  2306. // refill\RefillFactory::instance()->notify('afandfs',$input);
  2307. $resp = $provider->balance();
  2308. }
  2309. public function testYunlingfsPhone()
  2310. {
  2311. $provider = $this->getProvider('yunlingfs');
  2312. $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  2313. // $resp = $provider->query(['order_sn' => '79251623739433607563']);
  2314. // $data = '{"orderid":"BGC21061514434393910","sporderid":"79251623739433607563","userid":"10002543","merchantsubmittime":"20210615144434","resultno":"1","parvalue":"50","remark1":"20210615144420321813","payno":"20210615144420321813","fundbalance":"-47.65","sign":"6B9B7C15A3F9CBC773562327B6744B1E"}';
  2315. // $input = json_decode($data, true);
  2316. // refill\RefillFactory::instance()->notify('yunlingfs',$input);
  2317. // $resp = $provider->balance();
  2318. }
  2319. public function testTianchengPhone()
  2320. {
  2321. $provider = new refill\tiancheng\RefillPhone([]);
  2322. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2323. // $resp = $provider->query(['order_sn' => '15301619399212504464']);
  2324. // $data = ' {"result":"fail","msg":"0","order":"null","phone_no":"13699279618","amount":"10","op_no":"84801619340283980506","settle":"0","sign":"D64039ED791920B08BDA9DD95700C0E6"}';
  2325. // $input = json_decode($data, true);
  2326. // refill\RefillFactory::instance()->notify('tiancheng',$input);
  2327. $resp = $provider->balance();
  2328. }
  2329. public function testLingzhPhone()
  2330. {
  2331. $provider = new refill\lingzh\RefillPhone([]);
  2332. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  2333. // $resp = $provider->query(['order_sn' => '59911615124025101286']);
  2334. $resp = $provider->balance();
  2335. // $input['usr'] = 1;
  2336. // $input['ord'] = '52741615119546453690';
  2337. // $input['bz'] = '';
  2338. // $input['state'] = 2;
  2339. // $input['sgn'] = 'FFCBB75C307154DD306F4EC75BB69A6D';
  2340. // refill\RefillFactory::instance()->notify('lingzh',$input);
  2341. }
  2342. public function testAfandnewPhone()
  2343. {
  2344. $provider = new refill\afandnew\RefillPhone([]);
  2345. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  2346. // $resp = $provider->query(['order_sn' => '45371617101073876975', 'ch_trade_no' => '33018443659736309']);
  2347. $params = '{"amount":"100","carrierOrderNo":null,"mobile":"18500608333","orderNo":"45371617101073876975","orderStatus":3,"sign":"8DE392AD6B4730AD9EE0FC2B95BBDF17","tradeNo":"33018443659736309"}';
  2348. $input = json_decode($params, true);
  2349. refill\RefillFactory::instance()->notify('afandnew', $input);
  2350. }
  2351. public function testYifaPhone()
  2352. {
  2353. $provider = new refill\yifa\RefillPhone([]);
  2354. $resp = $provider->add(15120035568, 5, 50, ['order_sn' => $this->make_sn()]);
  2355. }
  2356. public function testTianjtOil()
  2357. {
  2358. $cardno = 1000111100021211884;
  2359. $provider = new refill\tianjt\RefillOil([]);
  2360. $resp = $provider->add($cardno, 2, 500, ['order_sn' => $this->make_sn()]);
  2361. }
  2362. public function testWeitPhone()
  2363. {
  2364. $provider = new refill\weit\RefillPhone([]);
  2365. for ($i = 0; $i <= 10; $i++) {
  2366. $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  2367. }
  2368. }
  2369. public function testWeitCB()
  2370. {
  2371. $params['sign'] = 'af820c33472f4b571fa0c48483dfb975';
  2372. $params['status'] = 0;
  2373. $params['price'] = 30;
  2374. $params['op_order_id'] = '';
  2375. $params['mch_order_id'] = '900664281823957221';
  2376. $params['pt_order_id'] = '2021011802434412825405218901';
  2377. $params['pay_type'] = '';
  2378. $params['tel'] = 18500608333;
  2379. $params['mchid'] = 10014;
  2380. $resp = http_request($this->mReqHost . "/mobile/refill_weit.php", $params, 'POST');
  2381. }
  2382. public function testYifaCB()
  2383. {
  2384. $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"}';
  2385. $input = json_decode($body, true);
  2386. refill\RefillFactory::instance()->notify('yifa', $input);
  2387. }
  2388. public function testBjbQuery()
  2389. {
  2390. $provider = new refill\bjb\RefillPhone([]);
  2391. $refill_info = ['order_sn' => 110667993758599771, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  2392. $resp = $provider->query($refill_info);
  2393. }
  2394. public function testXcQuery()
  2395. {
  2396. $provider = new refill\xc\RefillPhone([]);
  2397. $refill_info = ['order_sn' => 950663423236726632, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  2398. $resp = $provider->query($refill_info);
  2399. }
  2400. public function testTianjtQuery()
  2401. {
  2402. $provider = new refill\tianjt\RefillOil([]);
  2403. $refill_info = ['order_sn' => 680665862267622221, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  2404. $resp = $provider->query($refill_info);
  2405. }
  2406. public function testSaihuOil()
  2407. {
  2408. $provider = new refill\saihu\RefillOil([]);
  2409. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  2410. }
  2411. public function testBdtOil()
  2412. {
  2413. $provider = new refill\bdt\RefillOil([]);
  2414. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => '200229600556618886']);
  2415. }
  2416. public function testGFTDOil()
  2417. {
  2418. $provider = new refill\gftd\RefillOil([]);
  2419. $resp = $provider->add(1000111100020445281, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  2420. }
  2421. public function testYichangtOil()
  2422. {
  2423. $provider = $this->getProvider('yichangt','RefillOil');
  2424. // $resp = $provider->balance();
  2425. $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 50, ['order_sn' => $this->make_sn()]);
  2426. // $resp = $provider->query(['order_sn' => '86471642400354465488']);
  2427. }
  2428. public function testYichangt_hf()
  2429. {
  2430. $provider = $this->getProvider('yichangt_hf');
  2431. // $resp = $provider->balance();
  2432. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2433. // $resp = $provider->query(['order_sn' => '33161643533975771522']);
  2434. }
  2435. public function testYichangt_doubi()
  2436. {
  2437. $provider = $this->getProvider('yichangt_doubi');
  2438. // $resp = $provider->balance();
  2439. // $card_no = ['WK6788','575547903','1249835915','1943707492','LYYY520999','a88254587','45871584136','1877477562','1983377511','22291865790','1617206604','yy8672','1179363707','1770307081','Kurama..','Kakin0821','linxiaomi882','996407176','dyoehdm1c5sm','zhongge7686','1639978001','24198995','lbxb8023','setmefreeboy','setmefreeboy','JY20080121ZQ','25416140735','zg199388','dyt23c595wy8','1471177523','IP66600000','989501943','Maoxianwanglion','zouwenbin','tianshanzhid33','OscarKing1017','131250753','844740031','Bst0528','86391613636','880213019','59706196913','lieyinghusha','1190084099','42447950732','937099409','helei55432','mxy13629303898'];
  2440. $card_no = ['WK6788','575547903','1249835915','1943707492','LYYY520999','a88254587','45871584136','1877477562','1983377511','22291865790','1617206604','yy8672','1179363707','1770307081','Kurama..','Kakin0821','linxiaomi882','996407176','dyoehdm1c5sm'];
  2441. foreach ($card_no as $no)
  2442. {
  2443. $order_sn = $this->make_sn();
  2444. $resp = $provider->add($no, mtopcard\ThirdRefillCard, 100, ['order_sn' => $order_sn]);
  2445. $order_sns[] = $order_sn;
  2446. }
  2447. $order_sns = json_encode($order_sns);
  2448. Log::record("{$order_sns}");
  2449. // $resp = $provider->query(['order_sn' => '78111640843635846927']);
  2450. }
  2451. public function testGFTDCB()
  2452. {
  2453. $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","storage":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
  2454. $url = "http://192.168.1.220/mobile/refill_gftd.php?" . $data;
  2455. $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
  2456. }
  2457. public function testJiecPhone()
  2458. {
  2459. $provider = new refill\jiec\RefillPhone([]);
  2460. $resp = $provider->add('18500608333', 5, 30, ['order_sn' => $this->make_sn()]);
  2461. }
  2462. public function testBxtwtCB()
  2463. {
  2464. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  2465. }
  2466. public function testTianjtJDVerify()
  2467. {
  2468. $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';
  2469. $url = "http://192.168.1.220/mobile/refill_tianjt.php?" . $data;
  2470. $resp = http_request($url);
  2471. }
  2472. public function testSuhcPDD()
  2473. {
  2474. $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';
  2475. $url = "https://www.xyzshops.cn/mobile/refill_suhcpdd.php?" . $data;
  2476. $resp = http_request($url);
  2477. }
  2478. public function testSuhcTMVerify()
  2479. {
  2480. $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';
  2481. $url = "https://www.xyzshops.cn/mobile/refill_suhctm.php?" . $data;
  2482. $resp = http_request($url);
  2483. }
  2484. public function testBeixtVerify()
  2485. {
  2486. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  2487. $url = "https://www.xyzshops.cn/mobile/refill_bxtwt.php";
  2488. $headers = ['Content-Type: application/json'];
  2489. $resp = http_post_data($url, $data, $headers);
  2490. }
  2491. public function testInput()
  2492. {
  2493. $input = fopen("php://input", "rw");
  2494. file_put_contents($input, 'xxxx');
  2495. $content = file_get_contents('php://input');
  2496. }
  2497. public function testUrl()
  2498. {
  2499. $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';
  2500. $params = preg_split('/&/', $data);
  2501. foreach ($params as $pair) {
  2502. $kv = explode('=', $pair);
  2503. $count = count($kv);
  2504. if ($count === 1) {
  2505. $key = $kv[0];
  2506. $val = "";
  2507. } elseif ($count === 2) {
  2508. $key = $kv[0];
  2509. $val = $kv[1];
  2510. } else {
  2511. continue;
  2512. }
  2513. Log::record("{$key}:{$val}", Log::DEBUG);
  2514. }
  2515. }
  2516. public function testAddoil()
  2517. {
  2518. $url = $this->mReqHost . "/mobile/index.php";
  2519. $notifyurl = 'http://121.89.196.45/mobile/signature.php';
  2520. $params = ['mchid' => $this->mMchid,
  2521. 'cardno' => '1000111100020445281',
  2522. 'amount' => "100",
  2523. "act" => "refill",
  2524. "op" => "add",
  2525. 'order_sn' => $this->make_sn(),
  2526. 'notifyurl' => $notifyurl];
  2527. $resp = $this->send_md5($url, $params);
  2528. Log::record($resp, Log::DEBUG);
  2529. }
  2530. public function testBalance()
  2531. {
  2532. $url = $this->mReqHost . "/mobile/index.php";
  2533. $params = ['mchid' => 1092,
  2534. "act" => "refill",
  2535. "op" => "balance"];
  2536. $resp = $this->send_md5($url, $params);
  2537. Log::record($resp, Log::DEBUG);
  2538. }
  2539. public function testNotify()
  2540. {
  2541. $params = [
  2542. "mchid" => 10202,
  2543. "order_sn" => '21090216132600003_11675',
  2544. "amount" => '30.00',//intval($refill_info['refill_amount'] + 0.05),
  2545. "cardno" => 18639492164,
  2546. "trade_no" => 8693160683914496896438,
  2547. "idcard" => "",
  2548. "card_name" => "",
  2549. 'official_sn' => "",
  2550. 'message' => "匹配不到合适的充值通道",
  2551. "state" => 'CANCEL'];
  2552. $sign = $this->md5_sign($params,'KxK9f3yaBDOXVwvuOKDozvQ9Mt1CoqRX');
  2553. $notify_url = 'https://openapi-gateway-test.bbinsure.cn/ants_charge/v1/charge/order/notify/yeziOrderNew/1140';
  2554. $resp = http_request($notify_url, $params, 'POST');
  2555. }
  2556. public function testAddPhoe()
  2557. {
  2558. $url = $this->mReqHost . "/mobile/index.php";
  2559. $params = ['mchid' => $this->mMchid,
  2560. 'cardno' => '',
  2561. 'amount' => 100,
  2562. "act" => "refill",
  2563. "op" => "add",
  2564. 'order_sn' => '',
  2565. 'notifyurl' => "https://www.baoyung.com/api/unionservice/yezicharge"];
  2566. Log::record(json_encode($params), Log::DEBUG);
  2567. // $resp = $this->send_md5($url, $params);
  2568. }
  2569. public function testProxyHelper()
  2570. {
  2571. $phone = '13911129867';
  2572. $amount = 100;
  2573. $url = $this->mReqHost . "/mobile/index.php";
  2574. $params = ['mchid' => $this->mMchid,
  2575. 'cardno' => $phone,
  2576. 'amount' => $amount,
  2577. "act" => "refill",
  2578. "op" => "add",
  2579. 'order_sn' => $this->make_sn(),
  2580. 'notifyurl' => "https://xxx"];
  2581. $proxy = new refill_proxy("xxx");
  2582. $resp = $proxy->send($url, $params);
  2583. }
  2584. public function testGoods()
  2585. {
  2586. $req_url = $this->mReqHost . '/mobile/index.php';
  2587. $params = ['mchid' => $this->mMchid,
  2588. "act" => "refill",
  2589. "op" => "goods"];
  2590. $resp = $this->send_md5($req_url, $params);
  2591. }
  2592. public function testQueryFactory()
  2593. {
  2594. refill\RefillFactory::instance()->query(295);
  2595. }
  2596. public function testQuery()
  2597. {
  2598. //$req_url = 'https://www.xyzshops.cn/mobile/index.php';
  2599. // $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  2600. $req_url = BASE_SITE_URL . '/mobile/index.php';
  2601. $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  2602. $params = ['mchid' => 1,
  2603. "act" => "refill",
  2604. "op" => "query",
  2605. 'order_sn' => "13281476"];
  2606. $resp = $this->send_md5($req_url, $params);
  2607. }
  2608. public function testRemoveSession()
  2609. {
  2610. $resp = http_request(BASE_SITE_URL . "/mobile/signature.php", [], 'POST');
  2611. }
  2612. public function testTianjtCB()
  2613. {
  2614. // $notifyurl = BASE_SITE_URL . "/mobile/refill_tianjt.php";
  2615. $notifyurl = "https://www.xyzshops.cn/mobile/refill_tianjt.php";
  2616. // $notifyurl = "https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_tianjt.php";
  2617. $params = ['onlystr' => '690665858589475818',
  2618. 'amt' => 1000,
  2619. 'jdno' => '',
  2620. 'notifyurl' => $notifyurl,
  2621. 'cardtype' => 'Sinoepc',
  2622. 'batchid' => 30589,
  2623. 'cardno' => '1000113300007993287',
  2624. 'orgid' => '1590993600',
  2625. 'status' => 3];
  2626. $sign = $this->md5_sign($params);
  2627. $params['sign'] = $sign;
  2628. $resp = http_request($notifyurl, $params, 'POST');
  2629. Log::record($resp, Log::DEBUG);
  2630. }
  2631. public function testBJBCB()
  2632. {
  2633. $params = [
  2634. 'usr' => '13699279618',
  2635. 'ord' => '710662733975412771',
  2636. 'state' => '2',
  2637. 'bz' => '',
  2638. 'sgn' => 'AC9AFD254DE682D8440A97CA68B992DA'
  2639. ];
  2640. $resp = http_request("https://www.xyzshops.cn/mobile/refill_bjb.php", $params, 'POST');
  2641. }
  2642. public function testJiecCB()
  2643. {
  2644. $params['result'] = 'fail';
  2645. $params['msg'] = '0';
  2646. $params['order'] = 'null';
  2647. $params['phone_no'] = '18500608333';
  2648. $params['amount'] = '30.00';
  2649. $params['op_no'] = '800663597981819221';
  2650. $params['sign'] = '2510046895e8e12322c8a32547905ee9';
  2651. $resp = http_request($this->mReqHost . "/mobile/refill_jiec.php", $params, 'POST');
  2652. }
  2653. public function testZFKJ()
  2654. {
  2655. //带签名参数:mchid=1090&act=refill&op=add&cardno=100112121212212133
  2656. //&amount=10&order_sn=PH2012261356569433&
  2657. //notifyurl=https%3A%2F%2Fqzcz.edusahoo.com.cn%2Findex%2Findex%2Fcallback
  2658. //&sign=4a3ac5f9706e64aa70c6cab0fc5839d3
  2659. $params = ['mchid' => 1090,
  2660. 'cardno' => '100112121212212133',
  2661. 'amount' => '10',
  2662. "act" => "refill",
  2663. "op" => "add",
  2664. 'order_sn' => 'PH2012261356569433',
  2665. 'notifyurl' => 'https://qzcz.edusahoo.com.cn/index/index/callback'];
  2666. $resp = $this->send_md5(BASE_SITE_URL . '/mobile/index.php', $params);
  2667. }
  2668. protected function check_empty($value)
  2669. {
  2670. if (!isset($value))
  2671. return true;
  2672. if ($value === null)
  2673. return true;
  2674. if (trim($value) === "")
  2675. return true;
  2676. return false;
  2677. }
  2678. public function testcreateSign()
  2679. {
  2680. $params['act'] = 'refill';
  2681. $params['amount'] = '30';
  2682. $params['cardno'] = '18111516552';
  2683. $params['mchid'] = '10179';
  2684. $params['notifyurl'] = 'http://czapi2.1jinb.net/YeZiHCCallBackOrderServlet';
  2685. $params['op'] = 'add';
  2686. $params['order_sn'] = 'JFNOR10835056877';
  2687. $sign = $this->md5_sign($params);
  2688. }
  2689. public function testCheckphone()
  2690. {
  2691. $check = function ($phone) {
  2692. $url = 'https://mobileempty.shumaidata.com/mobileempty';
  2693. $params['mobile'] = $phone;
  2694. $headers = array();
  2695. array_push($headers, "Authorization:APPCODE " . '8f92d951293f4d2ea48ff86d5a70c537');
  2696. $resp = http_request($url, $params, 'GET', false, $headers);
  2697. $resp = json_decode($resp, true);
  2698. if ($resp['success'] == true && $resp['code'] == 200) {
  2699. Log::record("data phone:{$phone} , status : {$resp['data']['status']}", Log::DEBUG);
  2700. if (in_array($resp['data']['status'], [0, 3, 4, 5])) {
  2701. return false;
  2702. }
  2703. } else {
  2704. Log::record("data phone:{$phone} , 不支持的号段", Log::DEBUG);
  2705. }
  2706. };
  2707. $check(17801048874);
  2708. }
  2709. public function testCtSign()
  2710. {
  2711. $params['act'] = 'refill';
  2712. $params['op'] = 'add';
  2713. $params['mchid'] = '10198';
  2714. $params['cardno'] = '18696902060';
  2715. $params['amount'] = '30';
  2716. $params['order_sn'] = '163782007236900000878';
  2717. $params['notifyurl'] = 'http://open.apiwater.xyz:20801/';
  2718. $sign = $this->md5_sign($params,'b9b30f57eac34a398a7534021fa23a16');
  2719. }
  2720. private function md5_sign($params,$key = '')
  2721. {
  2722. ksort($params);
  2723. $body = "";
  2724. $i = 0;
  2725. foreach ($params as $k => $v) {
  2726. if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
  2727. if ($i == 0) {
  2728. $body .= "{$k}" . "=" . urlencode($v);
  2729. } else {
  2730. $body .= "&" . "{$k}" . "=" . urlencode($v);
  2731. }
  2732. $i++;
  2733. }
  2734. }
  2735. $body .= "&key={$key}";
  2736. return md5($body);
  2737. }
  2738. public function testCallMech()
  2739. {
  2740. $logic = Logic('queue');
  2741. $logic->NotifyMerchantComplete(['order_id' => 18171, 'manual' => true]);
  2742. }
  2743. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCallMech)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  2744. private function send($url, $params)
  2745. {
  2746. $mchid = $params['mchid'];
  2747. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  2748. $key = file_get_contents($pri_key);
  2749. $pri = openssl_get_privatekey($key);
  2750. $body = $this->body($params);
  2751. openssl_sign($body, $signed, $pri);
  2752. $sign = base64_encode($signed);
  2753. $params['sign'] = $sign;
  2754. $resp = http_request($url, $params, 'POST');
  2755. Log::record("resp:{$resp}", Log::DEBUG);
  2756. }
  2757. private function send_md5($url, $params)
  2758. {
  2759. $body = $this->body($params);
  2760. $body .= "&key={$this->mKey}";
  2761. $params['sign'] = md5($body);
  2762. $resp = http_request($url, $params, 'POST');
  2763. Log::record("resp:{$resp}", Log::DEBUG);
  2764. return $resp;
  2765. }
  2766. public function testCardType()
  2767. {
  2768. $cardno = '1000111100021211884';
  2769. $ret = preg_match('/^1[0-9]{18}$/', $cardno, $matches);
  2770. }
  2771. public function testMtrand()
  2772. {
  2773. }
  2774. public function testHttpRefill()
  2775. {
  2776. $mchid = '000001';
  2777. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  2778. $key = file_get_contents($pri_key);
  2779. $pri = openssl_get_privatekey($key);
  2780. $params = ['MCHID' => $mchid, 'cardno' => '1000111100021211884', 'amt' => "100", "act" => "refill", "op" => "addoil"];
  2781. $body = $this->body($params);
  2782. openssl_sign($body, $signed, $pri);
  2783. $sign = base64_encode($signed);
  2784. $params['sign'] = $sign;
  2785. $resp = http_request(BASE_SITE_URL . "/mobile/index.php", $params, 'POST');
  2786. }
  2787. private function body($params)
  2788. {
  2789. ksort($params);
  2790. $body = "";
  2791. $i = 0;
  2792. foreach ($params as $k => $v) {
  2793. if (false === $this->checkEmpty($v) && "@" != substr($v, 0, 1)) {
  2794. if ($i == 0) {
  2795. $body .= "{$k}" . "=" . urlencode($v);
  2796. } else {
  2797. $body .= "&" . "{$k}" . "=" . urlencode($v);
  2798. }
  2799. $i++;
  2800. }
  2801. }
  2802. return $body;
  2803. }
  2804. private function checkEmpty($value)
  2805. {
  2806. if (!isset($value))
  2807. return true;
  2808. if ($value === null)
  2809. return true;
  2810. if (trim($value) === "")
  2811. return true;
  2812. return false;
  2813. }
  2814. public function testKsort()
  2815. {
  2816. $age = ["Peter" => "35", "Ben" => "37", "Joe" => "43"];
  2817. ksort($age);
  2818. foreach ($age as $x => $x_value) {
  2819. echo "Key=" . $x . ", Value=" . $x_value;
  2820. echo "<br>";
  2821. }
  2822. }
  2823. public function testip()
  2824. {
  2825. $model_merchant = Model('merchant');
  2826. $merchant_info = $model_merchant->getMerchantInfo(['mchid' => 1]);
  2827. $ipwhitelist = unserialize($merchant_info['ip_white_list']);
  2828. $res = json_encode($ipwhitelist);
  2829. }
  2830. //测试向内部店提交订单,可先屏蔽其它充值通道
  2831. public function testAddoilToInnerStore()
  2832. {
  2833. $url = $this->mReqHost . "/mobile/index.php";
  2834. $notifyurl = BASE_SITE_URL . '/mobile/signature.php';
  2835. $params = ['mchid' => 1,
  2836. 'cardno' => '1000111100020445281',
  2837. 'amount' => "1000",
  2838. "act" => "refill",
  2839. "op" => "add",
  2840. 'order_sn' => $this->make_sn(),
  2841. 'notifyurl' => $notifyurl];
  2842. $resp = $this->send_md5($url, $params);
  2843. Log::record($resp, Log::DEBUG);
  2844. }
  2845. public function testRefillInnerCB()
  2846. {
  2847. $params = ['state_type' => 'order_cancel', 'order_id' => 311, 'channel_name' => 'lx'];
  2848. $resp = http_request(BASE_SITE_URL . '/mobile/refill_inner.php', $params, 'POST');
  2849. }
  2850. public function testArgs()
  2851. {
  2852. Log::record($_SERVER['argv'], Log::DEBUG);
  2853. }
  2854. public function testCall()
  2855. {
  2856. $order_id = 14974;
  2857. QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true], 10);
  2858. }
  2859. public function testSyncconfig()
  2860. {
  2861. $name_val_cfg = function ($items) {
  2862. $result = [];
  2863. foreach ($items as $item) {
  2864. $name = $item->name();
  2865. $result[$name] = $item;
  2866. }
  2867. return $result;
  2868. };
  2869. $name_val_row = function ($items) {
  2870. $result = [];
  2871. foreach ($items as $item) {
  2872. $name = $item['name'];
  2873. $result[$name] = $item;
  2874. }
  2875. return $result;
  2876. };
  2877. $match = function ($all, $cur) {
  2878. $insert = [];
  2879. foreach ($all as $key => $value) {
  2880. if (!array_key_exists($key, $cur)) {
  2881. $insert[] = $key;
  2882. }
  2883. }
  2884. return $insert;
  2885. };
  2886. $inserter = function ($mod, $type, $names) {
  2887. foreach ($names as $name) {
  2888. $data = ['name' => $name, 'type' => $type];
  2889. $mod->insert($data);
  2890. }
  2891. };
  2892. $provider = refill\RefillFactory::instance()->providers();
  2893. $oils = $name_val_cfg($provider['oil']);
  2894. $phones = $name_val_cfg($provider['phone']);
  2895. $mod_prov = Model('refill_provider');
  2896. $oil_items = $mod_prov->getProviderList(['type' => 1]);
  2897. $oil_items = $name_val_row($oil_items);
  2898. $oil_inserts = $match($oils, $oil_items);
  2899. $phone_items = $mod_prov->getProviderList(['type' => 2]);
  2900. $phone_items = $name_val_row($phone_items);
  2901. $phone_inserts = $match($phones, $phone_items);
  2902. $inserter($mod_prov, 1, $oil_inserts);
  2903. $inserter($mod_prov, 2, $phone_inserts);
  2904. }
  2905. public function testStat()
  2906. {
  2907. $model_refill_order = Model('refill_order');
  2908. $stat = Model('')->table('refill_order,vr_order')->join('inner')
  2909. ->on('refill_order.order_id=vr_order.order_id')
  2910. ->field('sum(refill_amount) as refill_amounts , sum(channel_amount) as channel_amounts , sum(mch_amount) as mch_amounts')
  2911. ->where([])->select();
  2912. }
  2913. public function testRefillGoods()
  2914. {
  2915. $goods = refill\RefillFactory::instance()->goods();
  2916. }
  2917. private function make_mobile()
  2918. {
  2919. $no = "1" . mt_rand(3000000000, 3999999999);
  2920. return $no;
  2921. }
  2922. private function refill_info($card_no, $card_type)
  2923. {
  2924. $data = rcache($card_no, 'cardrefill-');
  2925. if (empty($data)) {
  2926. $mod_topcard = Model('topcard');
  2927. $ret = $mod_topcard->get_card($card_no);
  2928. if (empty($ret)) {
  2929. $bind_phone = $this->make_mobile();
  2930. $mod_topcard->add($card_no, $card_type, time(), $bind_phone);
  2931. $data['bind_phone'] = $bind_phone;
  2932. $data['refill_time'] = time();
  2933. $data['times'] = 0;
  2934. wcache($card_no, $data, 'cardrefill-');
  2935. } else {
  2936. $val = $ret[0];
  2937. $data['bind_phone'] = $val['bind_phone'];
  2938. $data['refill_time'] = time();
  2939. $data['times'] = 0;
  2940. }
  2941. }
  2942. return $data;
  2943. }
  2944. public function testGetMobile()
  2945. {
  2946. $card_no = '1000119000001679247';
  2947. $card_type = 1;
  2948. $info = $this->refill_info($card_no, $card_type);
  2949. }
  2950. private function check_mchorder($mchid, $mch_order)
  2951. {
  2952. if (empty($mch_order)) {
  2953. return true;
  2954. } else {
  2955. $refill_order = Model('refill_order');
  2956. $ret = $refill_order->getOrderInfo(['mchid' => $mchid, 'mch_order' => $mch_order]);
  2957. return empty($ret);
  2958. }
  2959. }
  2960. public function testCheckMchorder()
  2961. {
  2962. $ret = $this->check_mchorder(1, '13281475');
  2963. }
  2964. public function testMakemobile()
  2965. {
  2966. $mobile = refill\util::make_mobile();
  2967. $ret = refill\util::set_black('1000111100020445281');
  2968. }
  2969. public function testLoadBlack()
  2970. {
  2971. $path = BASE_DATA_PATH . "/log";
  2972. $names = ['20210119-mobile.log',
  2973. '20210120-mobile.log', '20210121-mobile.log', '20210122-mobile.log', '20210123-mobile.log',
  2974. '20210124-mobile.log', '20210125-mobile.log'];
  2975. foreach ($names as $name) {
  2976. $file_name = $path . "/" . $name;
  2977. refill\util::black_from_log($file_name);
  2978. }
  2979. }
  2980. public function testStats()
  2981. {
  2982. $date = date('Y-m-d', time());
  2983. $today = strtotime("{$date}");
  2984. $times_begin = function ($start) {
  2985. $times = [];
  2986. $begin = $start;
  2987. for ($i = 0; $i < 7; $i++) {
  2988. $times[] = $begin;
  2989. $begin -= 86400;
  2990. }
  2991. return $times;
  2992. };
  2993. $reader = function ($mchid, $time) {
  2994. $cond['mchid'] = $mchid;
  2995. $cond['inner_status'] = 0;
  2996. $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 - 1]];
  2997. $items = Model('')->table('refill_order,vr_order')->join('inner')
  2998. ->on('refill_order.order_id=vr_order.order_id')
  2999. ->field('count(*) as order_count, vr_order.order_state, sum(mch_amount) as mch_amounts')
  3000. ->group('vr_order.order_state')
  3001. ->where($cond)->select();
  3002. return $items;
  3003. };
  3004. $begins = $times_begin($today);
  3005. $mchid = 10096;
  3006. // $states = rcache($this->mchid() , 'refillstat-');
  3007. $states = unserialize($states ?? "");
  3008. if (empty($states)) $states = [];
  3009. $result = [];
  3010. $cache = [];
  3011. foreach ($begins as $begin) {
  3012. if (array_key_exists($begin, $states)) {
  3013. $item = $states[$begin];
  3014. } else {
  3015. $item = $reader($mchid, $begin);
  3016. }
  3017. $result[$begin] = $item;
  3018. //判断item 中充值中的状态是否为0,为0的情况下放进cache
  3019. $cache = $item;
  3020. }
  3021. wcache($this->mchid(), $cache, 'refillstat-');
  3022. return $result;
  3023. }
  3024. public function testNotifyx()
  3025. {
  3026. $mch_cache = rcache("merchant-notify", 'refill-');
  3027. $caches = empty($mch_cache['data']) ? [] : unserialize($mch_cache['data']);
  3028. $new_caches = [];
  3029. $merchants = Model('merchant')->getMerchantList([], '', '', 'merchant.*,member.available_predeposit', "0,1000");
  3030. foreach ($merchants as $merchant) {
  3031. $mchid = $merchant['mchid'];
  3032. $phone = $merchant['contact_phone'] ?? "";
  3033. $available_pd = intval($merchant['available_predeposit']);
  3034. $alarm_pd = intval($merchant['alarm_amount']) < 10000 ? 10000 : intval($merchant['alarm_amount']);
  3035. if (array_key_exists($mchid, $caches)) {
  3036. $mch_cache = $caches[$mchid];
  3037. } else {
  3038. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  3039. }
  3040. if (!empty($phone) && ($available_pd < $alarm_pd)) {
  3041. $counts = $mch_cache['send_count'];
  3042. if (($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
  3043. $mch_cache = ['last_time' => time(), 'send_count' => $counts + 1];
  3044. QueueClient::push('sendSMS', ['mobile' => $merchant['contact_phone'],
  3045. 'type' => 'balance_warning', 'datas' => [date("m月d日H时"), $merchant['available_predeposit']]]);
  3046. }
  3047. } else {
  3048. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  3049. }
  3050. $new_caches[$mchid] = $mch_cache;
  3051. }
  3052. wcache("merchant-notify", ['data' => serialize($new_caches)], 'refill-');
  3053. }
  3054. public function testReadChannel()
  3055. {
  3056. refill\RefillFactory::instance()->read_channel();
  3057. }
  3058. public function testAllow()
  3059. {
  3060. $allow = refill\RefillFactory::instance()->allow(10096, 1, 100);
  3061. }
  3062. public function testCheckData()
  3063. {
  3064. $str = '|2|110667993758599771-充值失败|';
  3065. // $str = '0|提交成功|-36557.7400';
  3066. // if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
  3067. // return true;
  3068. // }
  3069. // if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
  3070. // return true;
  3071. // }
  3072. // return false;
  3073. $resp = ltrim($str, '|');
  3074. $resp = explode('|', $resp);
  3075. if (count($resp) != 3) {
  3076. return [false, '返回值错误'];
  3077. }
  3078. }
  3079. public function testErrre()
  3080. {
  3081. $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}';
  3082. $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);
  3083. }
  3084. public function testExpolode()
  3085. {
  3086. $x = "HTTP-504";
  3087. [$type,$code] = explode('-',$x);
  3088. }
  3089. public function testMchctl()
  3090. {
  3091. $ctl = new refill\mchctl();
  3092. }
  3093. public function testAsyncadd()
  3094. {
  3095. $x = \refill\util::async_add(['xxxx' => 1],4);
  3096. }
  3097. private function getProvider($name,$type = 'RefillPhone')
  3098. {
  3099. $file = BASE_HELPER_RAPI_PATH . "/$name/{$type}.php";
  3100. if(!file_exists($file)){
  3101. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  3102. return false;
  3103. } else {
  3104. require_once($file);
  3105. Log::record("file={$file} load success.",Log::DEBUG);
  3106. }
  3107. $class_name = "refill\\{$name}\\{$type}";
  3108. if (class_exists($class_name, false)) {
  3109. $caller = new $class_name([]);
  3110. return $caller;
  3111. } else {
  3112. $error = "Base Error: class {$class_name} isn't exists!";
  3113. Log::record($error, Log::ERR);
  3114. return false;
  3115. }
  3116. }
  3117. public function testOrderExist()
  3118. {
  3119. $refill_order = Model('refill_order');
  3120. $ret = $refill_order->exist(10116,'Yzb20210825111251415');
  3121. }
  3122. public function testRGoods()
  3123. {
  3124. $goods_list = refill\RefillFactory::instance()->goods();
  3125. }
  3126. public function testCanbu()
  3127. {
  3128. $notify = function ($resp)
  3129. {
  3130. if (empty($resp)) {
  3131. return [false, '网络错误'];
  3132. }
  3133. else
  3134. {
  3135. Log::record($resp, Log::DEBUG);
  3136. $resp = json_decode($resp, true);
  3137. if (empty($resp)) {
  3138. return [false, '网络错误'];
  3139. }
  3140. if($resp['code'] == 1)
  3141. {
  3142. $status = $resp['data']['status'];
  3143. if ($status == 'success') {
  3144. $order_state = ORDER_STATE_SUCCESS;
  3145. } elseif ($status == 'failed') {
  3146. $order_state = ORDER_STATE_CANCEL;
  3147. } elseif ($status == 'wait') {
  3148. $order_state = ORDER_STATE_SEND;
  3149. } else {
  3150. return [false, $status];
  3151. }
  3152. return [true, $order_state];
  3153. }
  3154. elseif($resp['code'] == -1 && $resp['msg'] == '订单不存在')
  3155. {
  3156. return [true, ORDER_STATE_NOEXIST];
  3157. }
  3158. else
  3159. {
  3160. return [false, $resp['msg']];
  3161. }
  3162. }
  3163. };
  3164. $resp = '{"code":1,"msg":"查询成功","data":{"systemOrderNo":"2049420687473912283808","agentOrderNo":"s16341299122819479569112","phone":"18571522718","itemName":"UNICOM","itemFacePrice":"50","status":0,"description":"待处理","amount":"47.2500","officialOrderNo":""}}';
  3165. $ret = $notify($resp);
  3166. }
  3167. }
  3168. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  3169. //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