TestRefill.php 216 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531
  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 function testIsDay()
  35. {
  36. $ret = refill\functional::isDay();
  37. }
  38. public static function setUpBeforeClass(): void
  39. {
  40. Base::run_util();
  41. refill\RefillFactory::instance();
  42. }
  43. public function testBodian_yd()
  44. {
  45. // $provider = $this->getProvider('bodian_yd');
  46. // $resp = $provider->balance();
  47. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  48. // $resp = $provider->query(['order_sn' => '16971663724801057246']);
  49. $body = ' {"szOrderId":"16971663724801057246","fSalePrice":"30.09","szAgentId":"200064","nFlag":"2","szVerifyString":"69c41652845d37f130186b05ddeecf6a","szPhoneNum":"15811535608","szRtnMsg":"00772022092109464443723910546991","nDemo":"30"}';
  50. $params = json_decode($body, true);
  51. $provider = $this->getProvider('bodian_yd', 'RefillCallBack');
  52. $ret = $provider->verify($params);
  53. $resp = $provider->notify($params);
  54. }
  55. public function testMerchantPrice()
  56. {
  57. $price = new refill\merchant_price();
  58. }
  59. public function testCallBack()
  60. {
  61. $params = [
  62. "mchid" => 10193,
  63. "order_sn" => 'open1632462013152110599086',
  64. "amount" => '100.0000',//intval($refill_info['refill_amount'] + 0.05),
  65. "cardno" => 18505101761,
  66. "trade_no" => '4034130685806092699201',
  67. "idcard" => $refill_info['idcard'] ?? "",
  68. "card_name" => $refill_info['card_name'] ?? "",
  69. 'official_sn' => '110103353072109241341340249560',
  70. 'message' => '',
  71. "state" => 'SUCCESS'
  72. ];
  73. $params['sign'] = $this->md5_sign($params, '0a845c18fbefaa121f36169ab8c880f3');
  74. $notify_url = 'http://v3.biyingniao.com/web/yezi/v2/straight_url?from=equityOpen';
  75. $resp = http_request($notify_url, $params, 'POST');
  76. }
  77. public function testFactory()
  78. {
  79. $provider = refill\RefillFactory::instance();
  80. }
  81. private function make_sn()
  82. {
  83. return mt_rand(1000, 9999)
  84. . sprintf('%010d', time())
  85. . sprintf('%06d', (float)microtime() * 1000000);
  86. }
  87. public function testRandomMobile()
  88. {
  89. $no = "1" . mt_rand(1, 9999999999);
  90. Log::record("phone no={$no}", Log::DEBUG);
  91. }
  92. public function testBJBAddPhone()
  93. {
  94. $provider = new refill\bjb\RefillPhone([]);
  95. for ($i = 3; $i > 0; --$i) {
  96. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  97. $resp = $provider->add(18500608333, 4, 10, ['order_sn' => $this->make_sn()]);
  98. $resp = $provider->add(18510683168, 4, 10, ['order_sn' => $this->make_sn()]);
  99. $resp = $provider->add(18513846008, 4, 10, ['order_sn' => $this->make_sn()]);
  100. $resp = $provider->add(18518237398, 4, 10, ['order_sn' => $this->make_sn()]);
  101. }
  102. }
  103. public function testOilticket()
  104. {
  105. $provider = new refill\bjb\RefillPhone([]);
  106. }
  107. public function testBjbRet()
  108. {
  109. $resp = '0|提交成功|14936.8600';
  110. $resp = explode('|', $resp);
  111. }
  112. public function testIpWhiteList()
  113. {
  114. $x = serialize(['47.99.57.105']);
  115. $ips = unserialize('a:1:{i:0;s:12:"47.99.57.105";}');
  116. if (!empty($ips)) {
  117. $addr = '47.99.57.105';
  118. Log::record("request ip:{$addr}", Log::DEBUG);
  119. if (!in_array($addr, $ips)) {
  120. throw new Exception("请求地址不在白名单中");
  121. }
  122. }
  123. }
  124. public function testBaizePhone()
  125. {
  126. $provider = new refill\baizeyd\RefillPhone([]);
  127. // $resp = $provider->add(17801048874, 5, 10, ['order_sn' => $this->make_sn()]);
  128. $resp = $provider->query(['order_sn' => '930668700375312006']);
  129. // $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';
  130. // $input = $this->parse_request($str);
  131. // $input['amount'] = 10.00;
  132. // $input['orderId'] = '92391614943913061206';
  133. // $input['phone'] = 17801048874;
  134. // $input['payTime'] = '2021-03-05 19:31:55';
  135. // $input['sign'] = 'bef6ae50319fb1e8cb3f21302f0abef8';
  136. // $input['appKey'] = 'uECmTOFAY6RPCTtI';
  137. // $input['payUrl'] = '';
  138. // $input['statusDes'] = '支付失败';
  139. // $input['status'] = 7;
  140. // refill\RefillFactory::instance()->notify('baizeyd',$input);
  141. }
  142. private function parse_request($squery)
  143. {
  144. if (empty($squery)) return [];
  145. $result = [];
  146. $params = preg_split('/&/', $squery);
  147. foreach ($params as $pair) {
  148. if (empty($pair)) continue;
  149. $kv = explode('=', $pair);
  150. $count = count($kv);
  151. if ($count === 1) {
  152. $key = $kv[0];
  153. $val = "";
  154. } elseif ($count === 2) {
  155. $key = $kv[0];
  156. $val = urldecode($kv[1]);
  157. } else {
  158. continue;
  159. }
  160. if (!empty($key)) {
  161. $result[$key] = $val;
  162. }
  163. }
  164. return $result;
  165. }
  166. public function testAmPhone()
  167. {
  168. // $provider = new refill\aming\RefillPhone([]);
  169. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  170. $input['result'] = 'fail';
  171. $input['msg'] = 0;
  172. $input['order'] = 'null';
  173. $input['phone_no'] = 18500608333;
  174. $input['sign'] = 'c925ad19c63c3eb36ffc52d938e24604';
  175. $input['amount'] = '10.00';
  176. $input['op_no'] = '42601615096072517841';
  177. refill\RefillFactory::instance()->notify('aming', $input);
  178. }
  179. public function testBhcPhone()
  180. {
  181. $provider = new refill\binghc\RefillPhone([]);
  182. $resp = $provider->query(['order_sn' => 250668618955902006]);
  183. // $input['result'] = 'fail';
  184. // $input['msg'] = 0;
  185. // $input['order'] = 'null';
  186. // $input['phone_no'] = 18500608333;
  187. // $input['sign'] = 'c3aa38ee07cd1b69bfd5ead56f6da8d6';
  188. // $input['amount'] = '10.00';
  189. // $input['op_no'] = '24061615096361999002';
  190. // refill\RefillFactory::instance()->notify('binghc',$input);
  191. }
  192. public function testRuishunPhone()
  193. {
  194. // $provider = new refill\ruishun\RefillPhone([]);
  195. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  196. $input['result'] = 'fail';
  197. $input['msg'] = 0;
  198. $input['order'] = null;
  199. $input['phone_no'] = 18500608333;
  200. $input['sign'] = 'e234f7d1c0458ca236f53a0008436b46';
  201. $input['amount'] = "10.00";
  202. $input['op_no'] = '76361615095403188513';
  203. refill\RefillFactory::instance()->notify('ruishun', $input);
  204. }
  205. public function testWuchenPhone()
  206. {
  207. $provider = new refill\wuchen\RefillPhone([]);
  208. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  209. $resp = $provider->query(['order_sn' => '790668630498425006']);
  210. // $input['app_id'] = '70016';
  211. // $input['message'] = 'fail';
  212. // $input['order_sn'] = '43101615277293035501';
  213. // $input['platform_order_id'] = '';
  214. // $input['sign'] = '5ea59f8ac51a518f2c622824d7db2a04';
  215. // $input['state'] = "fail";
  216. // $input['sys_sn'] = '202103091608231836913889';
  217. // $input['timestamp'] = '1615277361';
  218. // refill\RefillFactory::instance()->notify('wuchen',$input);
  219. }
  220. public function testYibaoPhone()
  221. {
  222. $provider = new refill\yibao\RefillPhone([]);
  223. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  224. $resp = $provider->query(['ch_trade_no' => '31215002972142736']);
  225. // $str = '{"amount":"30","carrierOrderNo":null,"mobile":"13699279618","orderNo":"27961615532426088043","orderStatus":3,"sign":"012BA0B093A0473D7DD1634A8356DCB1","tradeNo":"31215002972142736"}';
  226. // $data = json_decode($str,true);
  227. // refill\RefillFactory::instance()->notify('yibao',$data);
  228. }
  229. public function testAmingydPhone()
  230. {
  231. $provider = new refill\amingyd\RefillPhone([]);
  232. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  233. $resp = $provider->query(['order_sn' => '15421615627436792938']);
  234. // $str = '{"orderId":"15421615627436792938","amount":3000,"appKey":"40695059","timestamp":1615627503,"status":3,"operatorId":"508353854027968617","sign":"2A0562319ED4845AB9E3812A58F0B425"}';
  235. // $data = json_decode($str,true);
  236. // refill\RefillFactory::instance()->notify('amingyd',$data);
  237. }
  238. public function testChukaPhone()
  239. {
  240. $provider = new refill\chuka\RefillPhone([]);
  241. // $resp = $provider->add('18500608333', 5, 20, ['order_sn' => $this->make_sn()]);
  242. // $resp = $provider->query(['order_sn' => '92161616314884175179']);
  243. $params['customerId'] = '101787';
  244. $params['orderno'] = 'C1616314888506705492';
  245. $params['tmporder'] = '92161616314884175179';
  246. $params['code'] = '1';
  247. $params['number'] = '18500608333';
  248. $params['money'] = '20';
  249. $params['amount'] = '0';
  250. refill\RefillFactory::instance()->notify('chuka', $params);
  251. }
  252. public function testLegouPhone()
  253. {
  254. $provider = new refill\legou\RefillPhone([]);
  255. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '200649600557718881' , 'order_id' => 247 , 'buyer_id' => 52667]);
  256. $resp = $provider->query(['order_sn' => '200649600557718881', 'order_id' => 247]);
  257. $params['username'] = 'lzdc';
  258. $params['orderNumber'] = '690653407667699667';
  259. $params['cardNumber'] = '18500608333';
  260. $params['orderMoney'] = '30.0';
  261. $params['orderPay'] = '1.0';
  262. $params['resultCode'] = '2';
  263. $params['rechargeDesc'] = '{"rechargeStatus":600200,"rechargeDesc":"充值成功"}';
  264. $params['rechargeVoucher'] = '100407307092103291444050244599';
  265. $params['sign'] = 'c054884422a8c3749cbfda0e82b9af70';
  266. // refill\RefillFactory::instance()->notify('legou',$params);
  267. }
  268. public function testFeinimoshu()
  269. {
  270. $provider = new refill\feinimoshu\RefillOil([]);
  271. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  272. $resp = $provider->balance();
  273. }
  274. public function testFeinimoshu_hf()
  275. {
  276. $provider = new refill\feinimoshu_hf\RefillPhone([]);
  277. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  278. $resp = $provider->balance();
  279. }
  280. public function testFeiniaoPhone()
  281. {
  282. $provider = new refill\feiniao\RefillPhone([]);
  283. // $order_sn = $this->make_sn();
  284. // Log::record($order_sn, Log::DEBUG);
  285. // $resp = $provider->add('13699279618', 4, 50, ['order_sn' => $order_sn]);
  286. $resp = $provider->query(['order_sn' => '28641617178590981824']);
  287. $params['result'] = 'fail';
  288. $params['msg'] = '0';
  289. $params['order'] = 'null';
  290. $params['phone_no'] = '18500608333';
  291. $params['amount'] = '100.00';
  292. $params['op_no'] = '64591617090761169983';
  293. $params['settle'] = '0';
  294. $params['sign'] = '907d2640f96e8d78d59202d090ddb470';
  295. // refill\RefillFactory::instance()->notify('feiniao',$params);
  296. }
  297. public function testTongyPhone()
  298. {
  299. $provider = new refill\tongy\RefillPhone([]);
  300. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '690653407667699667', 'order_id' => 248, 'buyer_id' => 52667]);
  301. // $params['UserId'] = '100857';
  302. // $params['ShopId'] = '300000';
  303. // $params['SysOrderId'] = '21070215141210085700010';
  304. // $params['OrderId'] = '9241650678554051429291';
  305. // $params['State'] = '5';
  306. // $params['Timestamp'] = '1625210740472';
  307. // $params['sign'] = 'C5C4E888A3B678470071CDA6DC31719D';
  308. // $params['ParValue'] = '100.0000';
  309. // $params['VoucherType'] = '';
  310. // $params['VoucherContent'] = '';
  311. // $params['CreateTime'] = '2021-07-02 15:14:12';
  312. // $params['CompleteTime'] = '2021-07-02 15:25:40';
  313. // refill\RefillFactory::instance()->notify('tongy',$params);
  314. $resp = $provider->balance();
  315. }
  316. public function testWeiyiPhone()
  317. {
  318. $provider = new refill\weiyi\RefillPhone([]);
  319. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  320. // $resp = $provider->query(['order_sn' => '90401621489214002876']);
  321. $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"}';
  322. $params = json_decode($body, true);
  323. refill\RefillFactory::instance()->notify('weiyi', $params);
  324. }
  325. public function testWeiyimanPhone()
  326. {
  327. $provider = new refill\weiyiman\RefillPhone([]);
  328. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  329. // $resp = $provider->query(['order_sn' => '47591620898269370373']);
  330. $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"}';
  331. $params = json_decode($data, true);
  332. refill\RefillFactory::instance()->notify('weiyiman', $params);
  333. }
  334. public function testWeiyiWtPhone()
  335. {
  336. $provider = new refill\weiyiwt\RefillPhone([]);
  337. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  338. // $resp = $provider->query(['order_sn' => '38451621924366009924']);
  339. $body = '{"szOrderId":"38451621924366009924","fSalePrice":"47.25","szAgentId":"200016","nFlag":"2","szVerifyString":"a0b5bfc0bbf6c121a4cd74d9ecb2427d","szPhoneNum":"18074608795","szRtnMsg":"1000000083421052514441119833","nDemo":"50"}';
  340. $params = json_decode($body, true);
  341. refill\RefillFactory::instance()->notify('weiyiwt', $params);
  342. }
  343. public function testXiaochuangPhone()
  344. {
  345. $provider = new refill\xiaochuang\RefillPhone([]);
  346. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  347. // $resp = $provider->query(['order_sn' => '84891623028826872085']);
  348. // $body = '{"fail_msg":"","order_sn":"84891623028826872085","order_status":"4","p_order_sn":"2021060709203558011797441162","sign":"E842203C3CA48E924D60B1B56AB93C3B"}';
  349. // $params = json_decode($body , true);
  350. // refill\RefillFactory::instance()->notify('xiaochuang',$params);
  351. $resp = $provider->balance();
  352. }
  353. public function testYintengPhone()
  354. {
  355. $provider = new refill\yinteng\RefillPhone([]);
  356. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  357. // $resp = $provider->query(['order_sn' => '49631623737966351874']);
  358. // $data = '{"szOrderId":"49631623737966351874","fSalePrice":"47.35","szAgentId":"200009","nFlag":"2","szVerifyString":"01c5fafb1d67175f0533b69a762286e8","szPhoneNum":"18074608795","szRtnMsg":"1000000083421061514495400262","nDemo":"50"}';
  359. // $params = json_decode($data , true);
  360. // refill\RefillFactory::instance()->notify('yinteng',$params);
  361. $resp = $provider->balance();
  362. }
  363. public function testMoxjPhone()
  364. {
  365. $provider = new refill\moxj\RefillPhone([]);
  366. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  367. $resp = $provider->query(['order_sn' => '91131623906171663147']);
  368. $data = '{"result":"fail","msg":"0","order":"null","phone_no":"18500608333","amount":"50.0","op_no":"84901623900668776864","sign":"896b54914a07b814573d7f6cc403848a"}';
  369. $params = json_decode($data, true);
  370. // refill\RefillFactory::instance()->notify('moxj',$params);
  371. }
  372. public function testMoxj_fsPhone()
  373. {
  374. $provider = new refill\moxj_fs\RefillPhone([]);
  375. // $resp = $provider->add(15139608757, 4, 100, ['order_sn' => $this->make_sn()]);
  376. // $resp = $provider->query(['order_sn' => '42741624242693157165']);
  377. // $data = '{"amount":"100","charge_type":"2","code":"1","partner_id":"58","phone":"15139608757","sign":"30d193dba4101e50851ed0efabb75fb1","partner_order_no":"42741624242693157165","official_order_id":"20210621103211948830"}';
  378. // $params = json_decode($data , true);
  379. // refill\RefillFactory::instance()->notify('moxj_fs',$params);
  380. $resp = $provider->balance();
  381. }
  382. public function testZanzanquickPhone()
  383. {
  384. $provider = new refill\zanzanquick\RefillPhone([]);
  385. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  386. // $resp = $provider->query(['order_sn' => '90831623925322675223']);
  387. // $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"}';
  388. // $params = json_decode($data , true);
  389. // refill\RefillFactory::instance()->notify('zanzanquick',$params);
  390. $resp = $provider->balance();
  391. }
  392. public function testFengyemanPhone()
  393. {
  394. $provider = new refill\fengyeman\RefillPhone([]);
  395. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  396. // $resp = $provider->query(['order_sn' => '46221624265179185139']);
  397. // $data = '{"order_id":"46221624265179185139","mchid":"HF67a65_10008","tel":"18500608333","price":"50.00","sign":"2bb4ed5edc97ba7f60cf3848aab82cf4","out_order_id":"206877995456","status":"1"}';
  398. // $params = json_decode($data , true);
  399. // refill\RefillFactory::instance()->notify('fengyeman',$params);
  400. $resp = $provider->balance();
  401. }
  402. public function testMoxj_ydPhone()
  403. {
  404. $provider = new refill\moxj_yd\RefillPhone([]);
  405. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  406. // $resp = $provider->query(['order_sn' => '52101624413125875436']);
  407. // $data = '{"customer_order_no":"47651624412877257722","status":1,"merchant_id":"76505818","sign":"c185a0f2152b3ac3ee3f29009dec5a6b"}';
  408. // $params = json_decode($data , true);
  409. // refill\RefillFactory::instance()->notify('moxj_yd',$params);
  410. $resp = $provider->balance();
  411. }
  412. public function testXingzyPhone()
  413. {
  414. $provider = new refill\xingzy\RefillPhone([]);
  415. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  416. // $resp = $provider->query(['order_sn' => '76791624441423287373', 'ch_trade_no' => '210623174333941000']);
  417. // $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}';
  418. // $params = json_decode($data , true);
  419. // refill\RefillFactory::instance()->notify('xingzy',$params);
  420. $resp = $provider->balance();
  421. }
  422. public function testYuanmaiPhone()
  423. {
  424. $provider = new refill\yuanmai\RefillPhone([]);
  425. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  426. // $resp = $provider->query(['order_sn' => '24231624865882625203', 'ch_trade_no' => '210623174333941000']);
  427. // $data = '{"orderid":"24231624865882625203","status":"2","ordermoney":"50","sign":"94be5b1754ffcc7f0fe1551072146941","spsno":""}';
  428. // $params = json_decode($data, true);
  429. // refill\RefillFactory::instance()->notify('yuanmai',$params);
  430. $resp = $provider->balance();
  431. }
  432. public function testLangkePhone()
  433. {
  434. $provider = new refill\langke\RefillPhone([]);
  435. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  436. $resp = $provider->query(['order_sn' => '29461624952660047520', 'ch_trade_no' => '210623174333941000']);
  437. $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"}';
  438. $params = json_decode($data, true);
  439. // refill\RefillFactory::instance()->notify('langke',$params);
  440. }
  441. public function testYunlingdsPhone()
  442. {
  443. $provider = new refill\yunlingds\RefillPhone([]);
  444. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  445. // $resp = $provider->query(['order_sn' => '85351624961920020593']);
  446. // $data = '{"orderid":"OWS21062918188862392","sporderid":"85351624961920020593","userid":"10002623","merchantsubmittime":"20210629181929","resultno":"1","parvalue":"30","remark1":"AW20210629181906yRAvM","payno":"AW20210629181906yRAvM","fundbalance":"-28.59","sign":"11369509ADCF2A2612B3531A15049BDD"}';
  447. // $params = json_decode($data, true);
  448. // refill\RefillFactory::instance()->notify('yunlingds',$params);
  449. $resp = $provider->balance();
  450. }
  451. public function testLingzhmanPhone()
  452. {
  453. // $provider = $this->getProvider('lingzhman');
  454. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  455. // $resp = $provider->query(['order_sn' => '91641644558361512676']);
  456. // $resp = $provider->balance();
  457. $body = '{"orderNo":"F2202111346304162782","status":"001","consumerNo":"91641644558361512676","voucherNo":null,"mobile":"18500608333"}';
  458. $params = json_decode($body, true);
  459. $provider = $this->getProvider('lingzhman', 'RefillCallback');
  460. $resp = $provider->notify($params);
  461. }
  462. public function testQijutangPhone()
  463. {
  464. $provider = new refill\qijutang\RefillPhone([]);
  465. // for ($i=1;$i<2;$i++) {
  466. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  467. // }
  468. // $resp = $provider->query(['order_sn' => '51501625218912512231']);
  469. // $data = '{"szOrderId":"51501625218912512231","fSalePrice":"28.44","szAgentId":"200010","nFlag":"3","szVerifyString":"20cf16c6bb239e2a703d0bf3e5ef2d5a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  470. // $params = json_decode($data, true);
  471. // refill\RefillFactory::instance()->notify('qijutang',$params);
  472. $resp = $provider->balance();
  473. }
  474. public function testLingzhman48Phone()
  475. {
  476. // $provider = $this->getProvider('lingzhman48');
  477. // $resp = $provider->balance();
  478. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  479. // $resp = $provider->query(['order_sn' => '39991649558290585085']);
  480. $body = '{"orderNo":"F2204101038212358481","status":"019","consumerNo":"39991649558290585085","voucherNo":null,"mobile":"18500608333"}';
  481. $params = json_decode($body, true);
  482. $provider = $this->getProvider('lingzhman48', 'RefillCallBack');
  483. $ret = $provider->verify($params);
  484. $resp = $provider->notify($params);
  485. }
  486. public function testcangbuPhone()
  487. {
  488. $provider = $this->getProvider('cangbu');
  489. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  490. $resp = $provider->query(['order_sn' => '4024880687558152076462']);
  491. // $data = '{"customerId":"112","tmporder":"35041626071052333060","orderno":"s16260710607417944801112","number":"18500608333","money":"100","amount":"94.9000","code":"1","cardno":"","voucher":"110103307042107121424210550266","sign":"de463c3d389a4afe4a2c58257972121a"}';
  492. // $params = json_decode($data, true);
  493. // refill\RefillFactory::instance()->notify('cangbu',$params);
  494. $resp = $provider->balance();
  495. }
  496. public function testCangbukami()
  497. {
  498. $provider = new refill\cangbukami\RefillPhone([]);
  499. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  500. $resp = $provider->query(['order_sn' => '23231627380108954478']);
  501. }
  502. public function testTongykamiPhone()
  503. {
  504. $provider = new refill\tongykami\RefillPhone([]);
  505. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  506. $resp = $provider->query(['order_sn' => '26961626077050756648']);
  507. $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"}';
  508. $params = json_decode($data, true);
  509. // refill\RefillFactory::instance()->notify('tongykami',$params);
  510. }
  511. public function testTongluPhone()
  512. {
  513. $provider = new refill\tonglu\RefillPhone([]);
  514. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  515. $resp = $provider->query(['order_sn' => '22961616468561936356']);
  516. // $body = '{"order_no":"22961616468561936356","order_status":"5","phone_no":"18500608333","amount":5000,"time_paid":1616468856287,"order_cert_no":"","paid":false,"order_id":"20210323966497008"}';
  517. // $sign = '9E41F52F612D60EBB654B3A5D1E2F1E5';
  518. // $params = json_decode($body , true);
  519. // $params['sign'] = $sign;
  520. // refill\RefillFactory::instance()->notify('tonglu',$params);
  521. }
  522. public function testSialan()
  523. {
  524. $provider = $this->getProvider('sialan');
  525. // $resp = $provider->balance();
  526. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  527. $resp = $provider->query(['ch_trade_no' => '21112214053736552180705']);
  528. // $body = '{"api_id":"16855","recharge":"18500608333","amount":"10","order_sn":"21112213553615606755893","query_sn":"29151637560521755792","operator_sn":"","status":"2","sign":"32867363957ed9688b8bbdd8f42c08eb"}';
  529. // $params = json_decode($body, true);
  530. // $provider = $this->getProvider('sialan', 'RefillCallBack');
  531. // $ret = $provider->verify($params);
  532. // $resp = $provider->notify($params);
  533. }
  534. public function testMoxj_new()
  535. {
  536. $provider = new refill\moxj_new\RefillPhone([]);
  537. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  538. // $resp = $provider->query(['order_sn' => '33301627887529587739', 'card_no' => 13699279618]);
  539. // $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"}';
  540. // $params = json_decode($body, true);
  541. // refill\RefillFactory::instance()->notify('moxj_new', $params);
  542. $resp = $provider->balance();
  543. }
  544. public function testKangkai()
  545. {
  546. $provider = new refill\kangkai\RefillPhone([]);
  547. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  548. // $resp = $provider->query(['order_sn' => '25431627898461762024']);
  549. // $body = '{"TaskID":"267459","Mobile":"18500608333","Status":"5","ReportTime":"2021-08-02T18:02:01.777","ReportCode":"7:","OutTradeNo":"25431627898461762024","Price":"44.2500","ReceiptNum":"","Sign":"f0934a621fd0b076373f77a9bf8d7051"}';
  550. // $params = json_decode($body, true);
  551. // refill\RefillFactory::instance()->notify('kangkai', $params);
  552. $resp = $provider->balance();
  553. }
  554. public function testLechong()
  555. {
  556. $provider = new refill\lechong\RefillPhone([]);
  557. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  558. // $resp = $provider->query(['order_sn' => '55641627902450221838']);
  559. // $body = '{"sellerid":"55641627902450221838","agentcode":"202108021753","account":"MTg1MDA2MDgzMzM=","value":"50","payvalue":"47.8500","voucher":"","createtime":"20210802190739","endtime":"20210802191008","state":"4","remark":"","time":"20210802191008","sign":"0e2d69318d03871d887debd498cc50f2"}';
  560. // $params = json_decode($body, true);
  561. // refill\RefillFactory::instance()->notify('lechong', $params);
  562. $resp = $provider->balance();
  563. }
  564. public function testXinhengyang()
  565. {
  566. $provider = $this->getProvider('xinhengyang');
  567. // $resp = $provider->balance();
  568. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  569. $resp = $provider->query(['order_sn' => '6966570691155594416360']);
  570. // $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
  571. // $params = json_decode($body, true);
  572. // $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
  573. // $ret = $provider->verify($params);
  574. // $resp = $provider->notify($params);
  575. }
  576. public function testMiaoxt()
  577. {
  578. $provider = new refill\miaoxt\RefillPhone([]);
  579. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  580. // $resp = $provider->query(['order_sn' => '85101628064401524483']);
  581. // $resp = $provider->balance();
  582. $body = '{"szOrderId":"85101628064401524483","fSalePrice":"10.2","szAgentId":"200050","nFlag":"2","szVerifyString":"7a08b9a71a297a28843d749a7bf79dbc","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"10"}';
  583. $params = json_decode($body, true);
  584. refill\RefillFactory::instance()->notify('miaoxt', $params);
  585. }
  586. public function testTianyan()
  587. {
  588. $provider = new refill\tianyan\RefillPhone([]);
  589. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  590. // $resp = $provider->query(['order_sn' => '71241628067981955316', 'card_no' => 18500608333, 'card_type' => 5]);
  591. // $resp = $provider->balance();
  592. $params['amount'] = '100.00';
  593. $params['orderNo'] = '2618380681466713437097';
  594. $params['supplierId'] = '48';
  595. $params['orderId'] = 'S20210805081833371976224648';
  596. $params['notifyTime'] = '1628122793669';
  597. $params['sign'] = '4d8f70bf451608359e256ee1e5f30de1';
  598. $params['discountAmount'] = '5.50';
  599. $params['phoneNo'] = '17696554433';
  600. $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';
  601. $params['payType'] = 'wechat';
  602. $params['ticketNo'] = '110103353022108050819140250945';
  603. $params['company'] = 'lt';
  604. $params['status'] = '2';
  605. refill\RefillFactory::instance()->notify('tianyan', $params);
  606. }
  607. public function testYunsuoyaoman()
  608. {
  609. // $provider = $this->getProvider('yunsuoyaoman');
  610. // $resp = $provider->balance();
  611. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  612. // $resp = $provider->query(['order_sn' => '58771629702960801700']);
  613. $body = '{"orderid":"RLD21082315152651196","sporderid":"58771629702960801700","userid":"10002745","merchantsubmittime":"20210823152623","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-27.45","sign":"76A29E0101644831526138D63917C130"}';
  614. $params = json_decode($body, true);
  615. $provider = $this->getProvider('yunsuoyaoman', 'RefillCallBack');
  616. $ret = $provider->verify($params);
  617. $resp = $provider->notify($params);
  618. }
  619. public function testYouhe()
  620. {
  621. // $provider = $this->getProvider('youhe');
  622. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  623. // $resp = $provider->query(['order_sn' => '41051635145081582785']);
  624. // $resp = $provider->balance();
  625. $body = ' {"seqNo":"FE4D9D65781C0758","orderNo":"46101635142848462768","result":"Q0001","transo":"","sign":"3B02C7864154C94D8479305D27F3831C"}';
  626. $params = json_decode($body, true);
  627. $provider = $this->getProvider('youhe', 'RefillCallback');
  628. $ret = $provider->verify($params);
  629. $resp = $provider->notify($params);
  630. }
  631. public function testWenye()
  632. {
  633. $provider = new refill\wenye\RefillPhone([]);
  634. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  635. // $resp = $provider->query(['order_sn' => '88871628157083445809']);
  636. // $resp = $provider->balance();
  637. $body = '{"orderNo":"F2108051529062719948","status":"019","consumerNo":"95291628148539909985","voucherNo":null,"mobile":"18500608333"}';
  638. $params = json_decode($body, true);
  639. // refill\RefillFactory::instance()->notify('wenye', $params);
  640. }
  641. public function testXinyang()
  642. {
  643. $provider = new refill\xinyang\RefillPhone([]);
  644. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  645. // $resp = $provider->query(['order_sn' => '68151628157534687971']);
  646. // $resp = $provider->balance();
  647. $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"}';
  648. $params = json_decode($body, true);
  649. refill\RefillFactory::instance()->notify('xinyang', $params);
  650. }
  651. public function testGuochuang()
  652. {
  653. $provider = $this->getProvider('guochuang');
  654. $resp = $provider->add(13699279618, 4, 5, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  655. // $resp = $provider->query(['order_sn' => '82951628231038096078']);
  656. // $resp = $provider->balance();
  657. // $body = '{"account":"18074608795","evidence":"1000000083421080614310024563","evidenceType":"","id":"D2021080614235942044","inTime":"2021/08/06 14:26:22","money":"10","outerId":"82951628231038096078","status":"SUCCESS"}';
  658. // $params['ts'] = 1628231182;
  659. // $params['sign'] = '545F7024870B145915934CA36C6D341E';
  660. // $params['body'] = $body;
  661. // refill\RefillFactory::instance()->notify('guochuang', $params);
  662. // [$goods_id, $price] = $provider->goods(2, 10, 4, 1, []);
  663. }
  664. public function testXianghongrui()
  665. {
  666. $provider = new refill\xianghongrui\RefillPhone([]);
  667. // $resp = $provider->balance();
  668. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  669. // $resp = $provider->query(['order_sn' => '87691628758730981608']);
  670. $body = '{"orderid":"BAT21081216581941649","sporderid":"87691628758730981608","userid":"10002503","merchantsubmittime":"20210812165918","resultno":"1","parvalue":"50","remark1":"110103353052108121658550256634","payno":"110103353052108121658550256634","fundbalance":"-47.5","sign":"EF34F6FB6D37E4FCB92DCD8F41CC67E1"}';
  671. $params = json_decode($body, true);
  672. refill\RefillFactory::instance()->notify('xianghongrui', $params);
  673. }
  674. public function testDianchong()
  675. {
  676. $provider = $this->getProvider('dianchong');
  677. // $resp = $provider->balance();
  678. // $resp = $provider->add(18074608795, 5, 30, ['order_sn' => $this->make_sn()]);
  679. // $resp = $provider->query(['order_sn' => '26671629190230227788']);
  680. $body = '{"seqNo":"5C2D85572F8743CF","orderNo":"26671629190230227788","result":"Q0000","transo":"1000000083421081716331202254","sign":"87F3F67EA2B91709FD05468CF74210A1"}';
  681. $params = json_decode($body, true);
  682. $provider = $this->getProvider('dianchong', 'RefillCallBack');
  683. $ret = $provider->verify($params);
  684. $resp = $provider->notify($params);
  685. }
  686. public function testXunyinOil()
  687. {
  688. $provider = $this->getProvider('xunyinoil', 'RefillOil');
  689. // $resp = $provider->balance();
  690. // $resp = $provider->add(9030230005180327, 1, 50, ['order_sn' => $this->make_sn()]);
  691. $resp = $provider->query(['order_sn' => '77791629450541412891']);
  692. // $body = '{"ext":"","code":"8888","sign":"7db98f3f271013688134f2fbd503dc15","statemes":"\u6210\u529f","id":"80641629442789487318","userid":"8417","operatorid":"2421082015001888","status":"SUCCESS"}';
  693. // $params = json_decode($body, true);
  694. // $provider = $this->getProvider('xunyinoil','RefillCallBack');
  695. // $ret = $provider->verify($params);
  696. // $resp = $provider->notify($params);
  697. }
  698. public function testJumiThird()
  699. {
  700. $provider = $this->getProvider('jumithird');
  701. // $resp = $provider->balance();
  702. $resp = $provider->add(588073521, 7, 100, [
  703. 'order_sn' => $this->make_sn(),
  704. 'goods_id' => 6978,
  705. 'product_code' => 'XYZ100747'
  706. ]);
  707. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  708. // $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"}';
  709. // $params = json_decode($body, true);
  710. // $provider = $this->getProvider('jumithird','RefillCallBack');
  711. // $ret = $provider->verify($params);
  712. // $resp = $provider->notify($params);
  713. }
  714. public function testWangliantx()
  715. {
  716. // $provider = $this->getProvider('wangliantx');
  717. // $resp = $provider->balance();
  718. // for ($i = 1; $i<=1; $i++){
  719. // $resp = $provider->add(18074608795, 6, 50, [
  720. // 'order_sn' => $this->make_sn(),
  721. // 'regin_no' => 1
  722. // ]);
  723. // }
  724. // $resp = $provider->query(['order_sn' => '85901629801033376170']);
  725. $body = '{"userid":"10073664","sporderid":"85901629801033376170","orderid":"C5C5D4F49DB61A8773664","resultno":"1","merchantsubmittime":"20210824183109","ordermoney":"47.6","verifystring":"b6a873ecd6dc9cea3a410c6386cdab84","sign":"4a80e2a8c7b07c8aacada4feedd581bd","supnumber":"1000000083421082418345386156"}';
  726. $params = json_decode($body, true);
  727. $provider = $this->getProvider('wangliantx', 'RefillCallBack');
  728. $ret = $provider->verify($params);
  729. $resp = $provider->notify($params);
  730. }
  731. public function testZhuojian()
  732. {
  733. // $provider = $this->getProvider('zhuojian');
  734. // $resp = $provider->add(18500608333, 5, 50, [
  735. // 'order_sn' => $this->make_sn()
  736. // ]);
  737. // $resp = $provider->query(['order_sn' => '87231630026579229295']);
  738. $body = '{"money":"50.00","official_trade_no":"","out_trade_no":"87231630026579229295","status":"4","trade_no":"10000077828","sign":"0e19142c014ef6fe263601956e0be436"}';
  739. $params = json_decode($body, true);
  740. $provider = $this->getProvider('zhuojian', 'RefillCallBack');
  741. $ret = $provider->verify($params);
  742. $resp = $provider->notify($params);
  743. }
  744. public function testXianghongruifs()
  745. {
  746. // $provider = $this->getProvider('xianghongruifs');
  747. // $resp = $provider->balance();
  748. // $resp = $provider->add(15252490862, 4, 30, [
  749. // 'order_sn' => $this->make_sn()
  750. // ]);
  751. // $resp = $provider->query(['order_sn' => '70881632644084577858']);
  752. $body = '{"orderid":"AAO21092616144271467","sporderid":"70881632644084577858","userid":"10002524","merchantsubmittime":"20210926161610","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"343C28C4EB13F68E2EE251FA0F2A8262"}';
  753. $params = json_decode($body, true);
  754. $provider = $this->getProvider('xianghongruifs', 'RefillCallBack');
  755. $ret = $provider->verify($params);
  756. $resp = $provider->notify($params);
  757. }
  758. public function testYilin()
  759. {
  760. $provider = $this->getProvider('yilin');
  761. $resp = $provider->balance();
  762. // $resp = $provider->add(18500608333, 5, 30, [
  763. // 'order_sn' => $this->make_sn()
  764. // ]);
  765. // $resp = $provider->query(['order_sn' => '86981630484634157631']);
  766. // $body = '{"orderid":"NZX21090116244713140","sporderid":"86981630484634157631","userid":"10002543","merchantsubmittime":"20210901163039","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.71","sign":"53717BF9ECE83F4AD96C1EDD4BAE4E87"}';
  767. // $params = json_decode($body, true);
  768. // $provider = $this->getProvider('yilin','RefillCallBack');
  769. // $ret = $provider->verify($params);
  770. // $resp = $provider->notify($params);
  771. }
  772. public function testMiaoxt_fs()
  773. {
  774. $provider = $this->getProvider('miaoxt_fs');
  775. // $resp = $provider->balance();
  776. // $resp = $provider->add(13945846040, 4, 10, [
  777. // 'order_sn' => $this->make_sn()
  778. // ]);
  779. $resp = $provider->query(['order_sn' => '33101630577689278074']);
  780. // $body = '{"szOrderId":"33101630577689278074","fSalePrice":"9.95","szAgentId":"200055","nFlag":"2","szVerifyString":"1649fb2815926b75e4ed7e0fef3172ae","szPhoneNum":"13945846040","szRtnMsg":"","nDemo":"10"}';
  781. // $params = json_decode($body, true);
  782. // $provider = $this->getProvider('miaoxt_fs','RefillCallBack');
  783. // $ret = $provider->verify($params);
  784. // $resp = $provider->notify($params);
  785. }
  786. public function testXianzhibb()
  787. {
  788. // $provider = $this->getProvider('xianzhibb');
  789. // $resp = $provider->balance();
  790. // $resp = $provider->add(13699279618, 4, 200, [
  791. // 'order_sn' => $this->make_sn()
  792. // ]);
  793. // $resp = $provider->query(['order_sn' => '80881630650784871094']);
  794. $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"}';
  795. $params = json_decode($body, true);
  796. $provider = $this->getProvider('xianzhibb', 'RefillCallBack');
  797. $ret = $provider->verify($params);
  798. $resp = $provider->notify($params);
  799. }
  800. public function testYikatong()
  801. {
  802. // $provider = $this->getProvider('yikatong');
  803. // $resp = $provider->balance();
  804. // $resp = $provider->add(18500608333, 5, 30, [
  805. // 'order_sn' => $this->make_sn()
  806. // ]);
  807. // $resp = $provider->query(['order_sn' => '54641640157747514762']);
  808. $body = '{"msg":"","code":"1","productId":"2000030","orderId":"54641640157747514762","systemOrderId":"1042390009","faceValue":"30","price":"28.35","appId":"200005","mobile":"18500608333","sign":"caafec8ef1abcf6db5517245dbeceb9c"}';
  809. $params = json_decode($body, true);
  810. $provider = $this->getProvider('yikatong', 'RefillCallBack');
  811. $ret = $provider->verify($params);
  812. $resp = $provider->notify($params);
  813. }
  814. public function testSanti()
  815. {
  816. $provider = $this->getProvider('santi');
  817. // $resp = $provider->get_product(17801048874);
  818. // $resp = $provider->add(18500608333, 5, 1024, [
  819. // 'order_sn' => $this->make_sn(),
  820. // 'goods_id' => 7000,
  821. // 'product_code' => 'XYZ100751'
  822. // ]);
  823. $resp = $provider->query(['ch_trade_no' => '1631945759171581']);
  824. // $resp = $provider->balance();
  825. $body = '{"channelOrderNo":"49991631861285846684","extraData":"","orderNo":"1631861288127072","orderStatus":"4","providerResultCode":"3","providerResultReason":"\u5145\u503c\u6210\u529f","resultCode":"1000","resultMessage":"\u6210\u529f","sign":"472490783eaa82c76a1af8702881f04f"}';
  826. $params = json_decode($body, true);
  827. $provider = $this->getProvider('santi', 'RefillCallBack');
  828. $ret = $provider->verify($params);
  829. $resp = $provider->notify($params);
  830. }
  831. public function testSialan_tax()
  832. {
  833. // $provider = $this->getProvider('sialan_tax');
  834. // $resp = $provider->balance();
  835. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  836. // $resp = $provider->query(['ch_trade_no' => '21112214170092559557647']);
  837. $body = '{"api_id":"16856","recharge":"18500608333","amount":"10","order_sn":"21112214170092559557647","query_sn":"64801637561821444619","operator_sn":"","status":"2","sign":"900a01a1268cb14a37d6567691303ed9"}';
  838. $params = json_decode($body, true);
  839. $provider = $this->getProvider('sialan_tax', 'RefillCallBack');
  840. $ret = $provider->verify($params);
  841. $resp = $provider->notify($params);
  842. }
  843. public function testYunchonggong_yd()
  844. {
  845. $provider = $this->getProvider('yunchonggong_yd');
  846. // $resp = $provider->balance();
  847. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  848. // $resp = $provider->query(['order_sn' => '40181650866044454847']);
  849. // $body = '{"szOrderId":"34061631002071526340","fSalePrice":"47.7","szAgentId":"200043","nFlag":"3","szVerifyString":"48a7329c13af06b5be1d2fdad706b22e","szPhoneNum":"13699279618","szRtnMsg":"","nDemo":"50"}';
  850. // $params = json_decode($body, true);
  851. // $provider = $this->getProvider('yunchonggong_yd','RefillCallBack');
  852. // $ret = $provider->verify($params);
  853. // $resp = $provider->notify($params);
  854. }
  855. public function testGuochuang_nation()
  856. {
  857. $provider = $this->getProvider('guochuang_nation');
  858. $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  859. // $resp = $provider->query(['order_sn' => '4372390688043259849812']);
  860. // $resp = $provider->balance();
  861. // $body = '{"account":"18500608333","evidence":"N/A","evidenceType":"","id":"D2021090718185107657","inTime":"2021/09/07 18:19:05","money":"1","outerId":"65261631009929751933","status":"SUCCESS"}';
  862. // $params['ts'] = 1631009945;
  863. // $params['sign'] = 'C53F921EB5573EF4D0C757C5B5D4185D';
  864. // $params['body'] = $body;
  865. // $provider = $this->getProvider('guochuang_nation','RefillCallBack');
  866. // $ret = $provider->verify($params);
  867. // $resp = $provider->notify($params);
  868. }
  869. public function testTianyanman()
  870. {
  871. $provider = $this->getProvider('tianyanman');
  872. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  873. // $resp = $provider->query(['order_sn' => '12191631078826857172', 'card_no' => 18500608333, 'card_type' => 5]);
  874. // $resp = $provider->balance();
  875. // $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"}';
  876. // $params = json_decode($body, true);
  877. // $provider = $this->getProvider('tianyanman','RefillCallBack');
  878. // $ret = $provider->verify($params);
  879. // $resp = $provider->notify($params);
  880. }
  881. public function testShimer()
  882. {
  883. $provider = $this->getProvider('shimier');
  884. // $resp = $provider->balance();
  885. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  886. // $resp = $provider->query(['order_sn' => '56391631086657239320']);
  887. // $body = '{"orderId":"210908153756535112","appId":"b3k6DRwSOw","outOrderId":"56391631086657239320","sign":"86f9e783a3374463d546bedfc6920eff","orderStatus":"3","completeTime":"20210908154810","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  888. // $params = json_decode($body, true);
  889. // $provider = $this->getProvider('shimier','RefillCallBack');
  890. // $ret = $provider->verify($params);
  891. // $resp = $provider->notify($params);
  892. }
  893. public function testZhongst_mix()
  894. {
  895. // $provider = $this->getProvider('zhongst_mix');
  896. // $resp = $provider->balance();
  897. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  898. // $resp = $provider->query(['order_sn' => '81331649907306739763']);
  899. $body = '{"orderId":"220414113514628825","appId":"aKz6PN5XIw","outOrderId":"81331649907306739763","sign":"140099d15593e363e6b2682a4c2f24c2","orderStatus":"2","completeTime":"20220414120642","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"110103308032204141204470484590"}';
  900. $params = json_decode($body, true);
  901. $provider = $this->getProvider('zhongst_mix', 'RefillCallBack');
  902. $ret = $provider->verify($params);
  903. $resp = $provider->notify($params);
  904. }
  905. public function testHangtong()
  906. {
  907. // $provider = $this->getProvider('hangtong');
  908. // $resp = $provider->balance();
  909. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  910. // $resp = $provider->query(['order_sn' => '68221631775122967358']);
  911. $body = '{"phone":"13699279618","orderNo":"F2109161452121045530","status":"success","otherNo":"68221631775122967358","msg":"提交/充值成功","ext":"524501553021467113"}';
  912. $params = json_decode($body, true);
  913. $provider = $this->getProvider('hangtong', 'RefillCallBack');
  914. $ret = $provider->verify($params);
  915. $resp = $provider->notify($params);
  916. }
  917. public function testJinfeng()
  918. {
  919. // $provider = $this->getProvider('jinfeng');
  920. // $resp = $provider->balance();
  921. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  922. // $resp = $provider->query(['order_sn' => '78561631769733386091']);
  923. $body = '{"orderNo":"F2109161322374838924","status":"003","consumerNo":"78561631769733386091","voucherNo":null,"mobile":"18500608333"}';
  924. $params = json_decode($body, true);
  925. $provider = $this->getProvider('jinfeng', 'RefillCallBack');
  926. $ret = $provider->verify($params);
  927. $resp = $provider->notify($params);
  928. }
  929. public function testDashang()
  930. {
  931. // $provider = $this->getProvider('dashang');
  932. // $resp = $provider->balance();
  933. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  934. // $resp = $provider->query(['order_sn' => '63101631784169445345']);
  935. $body = '{"userId":"80800346","bizId":"90290050","ejId":"90916171545126","downstreamSerialno":"67971631783703671946","status":"3","voucher":"","voucherType":"0","sign":"46b13acf67f271e2f85db189ab9e1391"}';
  936. $params = json_decode($body, true);
  937. $provider = $this->getProvider('dashang', 'RefillCallBack');
  938. $ret = $provider->verify($params);
  939. $resp = $provider->notify($params);
  940. }
  941. public function testYuanta()
  942. {
  943. // $provider = $this->getProvider('yuanta');
  944. // $resp = $provider->balance();
  945. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  946. // $resp = $provider->query(['order_sn' => '96081645088688480739']);
  947. $body = '{"orderId":"220217170449505863","appId":"Uar9JIo4Zz","outOrderId":"96081645088688480739","sign":"1483916dbdc2f3b6024894442af816aa","orderStatus":"2","completeTime":"20220217175606","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  948. $params = json_decode($body, true);
  949. $provider = $this->getProvider('yuanta', 'RefillCallBack');
  950. $ret = $provider->verify($params);
  951. $resp = $provider->notify($params);
  952. }
  953. public function testDuojing()
  954. {
  955. // $provider = $this->getProvider('duojing');
  956. // $resp = $provider->balance();
  957. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  958. // $resp = $provider->query(['order_sn' => '51421642755293155833']);
  959. // $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"}';
  960. // $params = json_decode($body, true);
  961. // $provider = $this->getProvider('duojing','RefillCallBack');
  962. // $ret = $provider->verify($params);
  963. // $resp = $provider->notify($params);
  964. }
  965. public function testMenggu()
  966. {
  967. $provider = $this->getProvider('menggu', 'RefillOil');
  968. // $resp = $provider->add(1000111100021211884, 2, 500, ['order_sn' => $this->make_sn()]);
  969. $resp = $provider->query(['order_sn' => '63021632301956855605']);
  970. // $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"}';
  971. // $params = json_decode($body, true);
  972. // $provider = $this->getProvider('menggu','RefillCallBack');
  973. // $ret = $provider->verify($params);
  974. // $resp = $provider->notify($params);
  975. }
  976. public function testMenggu_hf()
  977. {
  978. $provider = $this->getProvider('menggu_hf');
  979. // $resp = $provider->balance();
  980. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  981. // $resp = $provider->query(['order_sn' => '24481632298991701065']);
  982. // $body = '{"orderId":"210922162318123069","appId":"1hqLCRUja7","outOrderId":"24481632298991701065","sign":"73faefba3e179641af0df6f59becce8f","orderStatus":"3","completeTime":"20210922162451","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  983. // $params = json_decode($body, true);
  984. // $provider = $this->getProvider('menggu_hf','RefillCallBack');
  985. // $ret = $provider->verify($params);
  986. // $resp = $provider->notify($params);
  987. }
  988. public function testChizeng()
  989. {
  990. $provider = $this->getProvider('chizeng');
  991. // $resp = $provider->balance();
  992. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  993. $resp = $provider->query(['order_sn' => '7013163540140101017048563']);
  994. // $body = '{"orderid":"UQX21102814052855105","sporderid":"71241635401103845030","userid":"10002523","merchantsubmittime":"20211028140512","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.35","sign":"0B97DC1E16EC3BC5F139AAC3FB4C51BF"}';
  995. // $params = json_decode($body, true);
  996. // $provider = $this->getProvider('chizeng','RefillCallBack');
  997. // $ret = $provider->verify($params);
  998. // $resp = $provider->notify($params);
  999. }
  1000. public function testJinxin()
  1001. {
  1002. // $provider = $this->getProvider('jinxin');
  1003. // $resp = $provider->balance();
  1004. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1005. // $resp = $provider->query(['order_sn' => '83481632465671278322']);
  1006. $body = '{"orderNo":"210924140000185","requestId":"83481632465671278322","sign":"80184350EC5C60445A50C9450D6CFB28","status":1,"supplierNo":"110103353192109241442090289402","timeStamp":"2021-09-24 14:43:07"}';
  1007. $params = json_decode($body, true);
  1008. $provider = $this->getProvider('jinxin', 'RefillCallBack');
  1009. $ret = $provider->verify($params);
  1010. $resp = $provider->notify($params);
  1011. }
  1012. public function testKachong()
  1013. {
  1014. // $provider = $this->getProvider('kachong');
  1015. // $resp = $provider->balance();
  1016. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  1017. // $resp = $provider->query(['order_sn' => '30691632889605245135']);
  1018. $body = '{"szAgentId":"200046","szOrderId":"30691632889605245135","szPhoneNum":"18500608333","nDemo":"20","fSalePrice":"19.82","nFlag":"2","szVerifyString":"dbac0df5e9ff2b067f74850f0cf55f3c","szRtnMsg":"982100337029603"}';
  1019. $params = json_decode($body, true);
  1020. $provider = $this->getProvider('kachong', 'RefillCallBack');
  1021. $ret = $provider->verify($params);
  1022. $resp = $provider->notify($params);
  1023. }
  1024. public function testXingzyNormal()
  1025. {
  1026. // $provider = $this->getProvider('xingzy_normal');
  1027. // $resp = $provider->balance();
  1028. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1029. // $resp = $provider->query(['order_sn' => '62881632898853651364']);
  1030. $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}';
  1031. $params = json_decode($body, true);
  1032. $provider = $this->getProvider('xingzy_normal', 'RefillCallBack');
  1033. $ret = $provider->verify($params);
  1034. $resp = $provider->notify($params);
  1035. }
  1036. public function testDingxin()
  1037. {
  1038. $provider = $this->getProvider('dingxin');
  1039. $resp = $provider->balance();
  1040. }
  1041. public function testPushang()
  1042. {
  1043. $provider = $this->getProvider('pushang');
  1044. // $resp = $provider->balance();
  1045. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1046. $resp = $provider->query(['order_sn' => '23391632986567769626']);
  1047. // $body = '{"msg":"\u8d26\u52a1\u6263\u6b3e\u5931\u8d25","extOrderId":"22081632982700152800","orderId":"R2021093014240000154555","salePrice":"30.0900","sign":"b0fe238f16e516316729589d42ab97b1","state":"5","exchangeTraded":""}';
  1048. // $params = json_decode($body, true);
  1049. // $provider = $this->getProvider('pushang','RefillCallBack');
  1050. // $ret = $provider->verify($params);
  1051. // $resp = $provider->notify($params);
  1052. }
  1053. public function testDinghui()
  1054. {
  1055. // $providers = $this->getProvider('dinghui');
  1056. // $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1057. // $resp = $providers->query(['order_sn' => '84891634279500368841']);
  1058. // $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"}';
  1059. // $params = json_decode($body, true);
  1060. $params['method'] = 'order.charge.status.update.notify';
  1061. $params['format'] = 'json';
  1062. $params['sign'] = '60d4e658cb730b9d8cc0c451414de9b51b79d14fa217261f7bbcf4a3472553b093a5c2377abba9573ed9d5e1a39a9f693830671ff1e641cc97a9782d2b2f393bed6a7bd22be0c642a13e20a7c6cf9f562c11ae65335758bd58ee55853b555cc2e511b6655c6e944a9defa6f0247263578d1554ff7709a7ced90db93911562dcb485518a4da3c21cb650ff01cacfcfa8dd9de533f5a5be2accc065e23cbd38b1b104e15feb3ce823c8cb7c7d5adf3fef0be768d8c25dc813a9112a14ec54a9e2ee517a5ba5b9ce2234dd4329b61c5456a82405aa6d2a307b4ec04be52bd1e3e5b204a2a4d7899d6fbf0fc09cd443cddc947f02bf58730142e9edc2b98eeeae086';
  1063. $params['message'] = 'GYmjEFMoy5jUfg/Ju7NRCSyaoyg2fu9EWpABAHb55xKpkvIedqXPDqRwG6Lo7iNx0A2yc6/IaU7vqwNV9YEVZOwHBDtsGXuHK1GCq5KUaW70pq1wEKr6kgjAHDITH7XdB3jmdSAQFhQYTi5hCz5EWWAzRKLYgTZeDksePKshm67QDbJzr8hpTu+rA1X1gRVkVqAL750crFPclgeWEYFG4mO4ZlmqygUrgz4si+seZ3f0pq1wEKr6kgjAHDITH7XdkFLNHratZfufbZKIZ5r+CA==';
  1064. $params['msgtype'] = 'notify_msg';
  1065. $params['version'] = 'V2.0';
  1066. $params['app_id'] = 'yeziapi';
  1067. $params['notify_id'] = '0000017c83f4786201547473800e31ee';
  1068. $params['timestamp'] = '1634301409378';
  1069. $providers = $this->getProvider('dinghui', 'RefillCallBack');
  1070. $ret = $providers->verify($params);
  1071. $resp = $providers->notify($params);
  1072. }
  1073. public function testHuafutong()
  1074. {
  1075. // $provider = $this->getProvider('huafutong');
  1076. // $resp = $provider->balance();
  1077. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1078. // $resp = $provider->query(['order_sn' => '48151634200413207059']);
  1079. $body = '{"PostData":"MJ88hD85bb2VPjI+q9R64jrR2TnZQSUn+4PHZCz1of27YQswyLKdNoNyyNuVEd2+98raKRC0pD+KFQf6beJn5mgOe+u9JjTtqxM5VcVYX93DQACU1ZdfJ+rSx5WRMwvi"}';
  1080. $params = json_decode($body, true);
  1081. $provider = $this->getProvider('huafutong', 'RefillCallBack');
  1082. $data = $provider->notify($params);
  1083. }
  1084. public function testShuoruan()
  1085. {
  1086. $provider = $this->getProvider('shuoruan');
  1087. // $resp = $provider->balance();
  1088. $resp = $provider->add(13911129867, 5, 10, ['order_sn' => $this->make_sn()]);
  1089. // $resp = $provider->query(['order_sn' => '80261634802627091026']);
  1090. $params['Action'] = 'CX';
  1091. $params['AgentAccount'] = '18600608333';
  1092. $params['Agentbalance'] = '-9.970';
  1093. $params['Orderid'] = '80261634802627091026';
  1094. $params['Chargeid'] = '2162076796';
  1095. $params['Orderstatu_int'] = '16';
  1096. $params['Orderstatu_text'] = '缴费成功_';
  1097. $params['TransCash'] = '10.000';
  1098. $params['OrderPayment'] = '9.970';
  1099. $params['Errorcode'] = '0000';
  1100. $params['Errormsg'] = '';
  1101. $params['Sign'] = '654fbc24c3d0878247bc3be3ed699f16';
  1102. $provider = $this->getProvider('shuoruan', 'RefillCallBack');
  1103. // $ret = $provider->verify($params);
  1104. // $data = $provider->notify($params);
  1105. }
  1106. public function testLinzhu()
  1107. {
  1108. // $provider = $this->getProvider('linzhu');
  1109. // $resp = $provider->balance();
  1110. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1111. // $resp = $provider->query(['order_sn' => '43881634986696312260']);
  1112. $body = '{"orderNo":"F2110231858443112627","status":"019","consumerNo":"43881634986696312260","voucherNo":null,"mobile":"18500608333"}';
  1113. $params = json_decode($body, true);
  1114. $provider = $this->getProvider('linzhu', 'RefillCallBack');
  1115. $ret = $provider->verify($params);
  1116. $data = $provider->notify($params);
  1117. }
  1118. public function testFangxing()
  1119. {
  1120. $provider = $this->getProvider('fangxing');
  1121. // $resp = $provider->balance();
  1122. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(), 'order_id' => 111111]);
  1123. $resp = $provider->query(['order_sn' => '82581635239506988570']);
  1124. $body = '{"orderId":"O21102617115969210570","respCode":"10003","respMsg":"\u6210\u529f \u5bf9\u7aef\u6d41\u6c34\u53f7: 21102617611981771","sign":"013F54D5E415668D3E012BBDE9E4BF16","transNo":"82581635239506988570"}';
  1125. $params = json_decode($body, true);
  1126. $provider = $this->getProvider('fangxing', 'RefillCallBack');
  1127. $ret = $provider->verify($params);
  1128. $data = $provider->notify($params);
  1129. }
  1130. public function testHuafutongMan()
  1131. {
  1132. // $provider = $this->getProvider('huafutongman');
  1133. // $resp = $provider->balance();
  1134. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1135. // $resp = $provider->query(['order_sn' => '73721635476007331621']);
  1136. $body = '{"PostData":"1Gi96e4PzohQIdxj8W4uOH4Q5pzT8ZHyCc+ZpTl7XEEF5TPgXffD32KLy0l2fZ7X36qZTO4JJA\/4nhWJRERklMy1FQuan825KK5vy2zQ6FOxg8vXMy0e7HOVg0kx123i"}';
  1137. $params = json_decode($body, true);
  1138. $provider = $this->getProvider('huafutongman', 'RefillCallBack');
  1139. $data = $provider->notify($params);
  1140. }
  1141. public function testFeimingyu()
  1142. {
  1143. // $provider = $this->getProvider('feimingyu');
  1144. // $resp = $provider->balance();
  1145. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1146. // $resp = $provider->query(['order_sn' => '99741635757876781160']);
  1147. $body = '{"userid":"69876","order_id":"21110117111869876daed6b187","account":"18500608333","amount":"30","price":"28.41","state":"failed","user_order":"99741635757876781160","sign":"C82F4821547BBFC462E9758EE28287E1","voucher":""}';
  1148. $params = json_decode($body, true);
  1149. $provider = $this->getProvider('feimingyu', 'RefillCallBack');
  1150. $ret = $provider->verify($params);
  1151. $resp = $provider->notify($params);
  1152. }
  1153. public function testDashangnormal()
  1154. {
  1155. // $provider = $this->getProvider('dashang_normal');
  1156. // $resp = $provider->balance();
  1157. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1158. // $resp = $provider->query(['order_sn' => '34461636081408575185']);
  1159. $body = '{"userId":"80800357","bizId":"60040030","ejId":"91105110431325","downstreamSerialno":"34461636081408575185","status":"3","voucher":"","voucherType":"0","sign":"24a40c2b677820533e418d4a2b3f0806"}';
  1160. $params = json_decode($body, true);
  1161. $provider = $this->getProvider('dashang_normal', 'RefillCallBack');
  1162. $ret = $provider->verify($params);
  1163. $resp = $provider->notify($params);
  1164. }
  1165. public function testHuafutong_doubi()
  1166. {
  1167. $provider = $this->getProvider('huafutong_doubi');
  1168. // $resp = $provider->balance();
  1169. $resp = $provider->add(588073521, 7, 100, [
  1170. 'order_sn' => $this->make_sn(),
  1171. 'product_code' => 'XYZ100747'
  1172. ]);
  1173. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  1174. // $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"}';
  1175. // $params = json_decode($body, true);
  1176. // $provider = $this->getProvider('huafutong_doubi','RefillCallBack');
  1177. // $ret = $provider->verify($params);
  1178. // $resp = $provider->notify($params);
  1179. }
  1180. public function testYunchonggongfs()
  1181. {
  1182. // $provider = $this->getProvider('yunchonggongfs');
  1183. // $resp = $provider->balance();
  1184. // $resp = $provider->add(13935705732, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 4]);
  1185. // $resp = $provider->query(['order_sn' => '44721636430254462028']);
  1186. $body = '{"orderId":"211109115744298048","appId":"Z1sU5unYK7","outOrderId":"44721636430254462028","sign":"a368d3f6a8c2ec2d2dbd587f9a78a937","orderStatus":"3","completeTime":"20211109115840","orderDesc":"timeout"}';
  1187. $params = json_decode($body, true);
  1188. $provider = $this->getProvider('yunchonggongfs', 'RefillCallBack');
  1189. $ret = $provider->verify($params);
  1190. $resp = $provider->notify($params);
  1191. }
  1192. public function testDingchi()
  1193. {
  1194. // $provider = $this->getProvider('dingchi');
  1195. // $resp = $provider->balance();
  1196. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1197. // $resp = $provider->query(['order_sn' => '70651636508446628072']);
  1198. $body = '{"userId":"671","bizId":"200","id":"32894267","downstreamSerialno":"70651636508446628072","status":"2","statusDesc":"","extend":"100101101002111100940543157996","sign":"984c4708c14d0c2e08295c5010109ecf"}';
  1199. $params = json_decode($body, true);
  1200. $provider = $this->getProvider('dingchi', 'RefillCallBack');
  1201. $ret = $provider->verify($params);
  1202. $resp = $provider->notify($params);
  1203. }
  1204. public function testYanhao()
  1205. {
  1206. // $provider = $this->getProvider('yanhao');
  1207. // $resp = $provider->balance();
  1208. // $resp = $provider->add(2423503330, 5, 30, ['order_sn' => $this->make_sn()]);
  1209. // $resp = $provider->query(['order_sn' => '49571636609949577130']);
  1210. $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":""}';
  1211. $params = json_decode($body, true);
  1212. $provider = $this->getProvider('yanhao', 'RefillCallBack');
  1213. $ret = $provider->verify($params);
  1214. $resp = $provider->notify($params);
  1215. }
  1216. public function testYikatongfs()
  1217. {
  1218. $provider = $this->getProvider('yikatongfs');
  1219. // $resp = $provider->balance();
  1220. // $resp = $provider->add(13935705732, 5, 30, ['order_sn' => $this->make_sn()]);
  1221. $resp = $provider->query(['order_sn' => '30551636705402587123']);
  1222. // $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"}';
  1223. // $params = json_decode($body, true);
  1224. // $provider = $this->getProvider('yikatongfs','RefillCallBack');
  1225. // $ret = $provider->verify($params);
  1226. // $resp = $provider->notify($params);
  1227. }
  1228. public function testLexiangLt()
  1229. {
  1230. // $provider = $this->getProvider('lexianglt');
  1231. // $resp = $provider->balance();
  1232. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1233. // $resp = $provider->query(['order_sn' => '48911637136021090867']);
  1234. $body = '{"PostData":"405deLsCOS2UNQTOH\/M+3IWDDMm841EhhBwTgdasFvVqqVS3RHA6YdIzxAS2g8PIjmie1mOw+aNzXZ\/8rVR8lQTjoaeOCkE04cTc07JvDe1IDtvO2e66u+zzO+x0MUfU"}';
  1235. $params = json_decode($body, true);
  1236. $provider = $this->getProvider('lexianglt', 'RefillCallBack');
  1237. $ret = $provider->verify($params);
  1238. $resp = $provider->notify($params);
  1239. }
  1240. public function testXiaoniu_doubi()
  1241. {
  1242. // $provider = $this->getProvider('xiaoniu_doubi');
  1243. // $resp = $provider->balance();
  1244. // $resp = $provider->add(61841435, 7, 100, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100747']);
  1245. // $resp = $provider->query(['order_sn' => '22971637223235623767']);
  1246. $body = '{"content":"","realAmt":"92.0000","status":"1","timestamp":"20211118161507","sign":"28598a6c4674294aecb0337ef20b4e02","orderNo":"XN20211118161400122361716","mOrderNo":"22971637223235623767"}';
  1247. $params = json_decode($body, true);
  1248. $provider = $this->getProvider('xiaoniu_doubi', 'RefillCallBack');
  1249. $ret = $provider->verify($params);
  1250. $resp = $provider->notify($params);
  1251. }
  1252. public function testGuantu()
  1253. {
  1254. $provider = $this->getProvider('guantu');
  1255. // $resp = $provider->balance();
  1256. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1257. $resp = $provider->query(['order_sn' => '82321639620607197216']);
  1258. // $body = '{"orderId":"211207110843025294","appId":"sprTIuIsst","outOrderId":"86151638846512034929","sign":"a94dc11a88831c4cc9cf79cd2dc4b60c","orderStatus":"3","completeTime":"20211207110903","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1259. // $params = json_decode($body, true);
  1260. // $provider = $this->getProvider('guantu','RefillCallBack');
  1261. // $ret = $provider->verify($params);
  1262. // $resp = $provider->notify($params);
  1263. }
  1264. public function testYiqian()
  1265. {
  1266. $provider = $this->getProvider('yiqian');
  1267. // $resp = $provider->balance();
  1268. // $resp = $provider->add(185001234561608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1269. $resp = $provider->query(['order_sn' => '58661639626089905328']);
  1270. // $body = '{"extOrderId":"12871637568430713782","orderId":"R2021112216240026238817","salePrice":"9.9950","sign":"b42f61bfb59f9f36c26c68e4f37f5a19","state":"4","exchangeTraded":"110103308002111221607170298685"}';
  1271. // $params = json_decode($body, true);
  1272. // $provider = $this->getProvider('yiqian','RefillCallBack');
  1273. // $ret = $provider->verify($params);
  1274. // $resp = $provider->notify($params);
  1275. }
  1276. public function testYinghuochong()
  1277. {
  1278. // $provider = $this->getProvider('yinghuochong');
  1279. // $resp = $provider->balance();
  1280. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1281. // $resp = $provider->query(['order_sn' => '14911637655330156024']);
  1282. $body = '{"times":"20211123161536","orderId":"2021112316151926232932","voucher":"","customerOrderId":"14911637655330156024","qyKey":"qhsvsyvj9rsekyvadlctr1ptx135fb3t","sign":"15D3272BE7BB7B038EEC9EA344C86567","status":"2"}';
  1283. $params = json_decode($body, true);
  1284. $provider = $this->getProvider('yinghuochong', 'RefillCallBack');
  1285. $ret = $provider->verify($params);
  1286. $resp = $provider->notify($params);
  1287. }
  1288. public function testMeixu()
  1289. {
  1290. // $provider = $this->getProvider('meixu');
  1291. // $resp = $provider->balance();
  1292. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1293. // $resp = $provider->query(['order_sn' => '89361637662404606711']);
  1294. $body = '{"orderid":"XOJ21112318130505847","sporderid":"89361637662404606711","userid":"10003105","merchantsubmittime":"20211123181328","resultno":"9","parvalue":"10","remark1":"","payno":"","fundbalance":"-10.02","sign":"634194D21B034356F32C5A9FB045F23F"}';
  1295. $params = json_decode($body, true);
  1296. $provider = $this->getProvider('meixu', 'RefillCallBack');
  1297. $ret = $provider->verify($params);
  1298. $resp = $provider->notify($params);
  1299. }
  1300. public function testFuyuan()
  1301. {
  1302. // $provider = $this->getProvider('fuyuan');
  1303. // $resp = $provider->balance();
  1304. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1305. // $resp = $provider->query(['order_sn' => '60431637736327027514']);
  1306. $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":""}';
  1307. $params = json_decode($body, true);
  1308. $provider = $this->getProvider('fuyuan', 'RefillCallBack');
  1309. $ret = $provider->verify($params);
  1310. $resp = $provider->notify($params);
  1311. }
  1312. public function testDongye()
  1313. {
  1314. $provider = $this->getProvider('dongye');
  1315. // $resp = $provider->balance();
  1316. $resp = $provider->add(15139608757, 4, 10, ['order_sn' => $this->make_sn()]);
  1317. // $resp = $provider->query(['order_sn' => '94031638352288398624']);
  1318. // $body = '{"orderid":"NYG21113016502782946","sporderid":"33391638262247818098","userid":"10003105","merchantsubmittime":"20211130165104","resultno":"1","parvalue":"30","remark1":"100101101012111301651024042626","payno":"100101101012111301651024042626","fundbalance":"-30.075","sign":"4075B5A1D2639B19B91AC2FF45B5CFFE"}';
  1319. // $params = json_decode($body, true);
  1320. // $provider = $this->getProvider('dongye','RefillCallBack');
  1321. // $ret = $provider->verify($params);
  1322. // $resp = $provider->notify($params);
  1323. }
  1324. public function testDongyefs()
  1325. {
  1326. $provider = $this->getProvider('dongyefs');
  1327. // $resp = $provider->balance();
  1328. // [$goods_id, $price] = $provider->goods(1, 10, 4, 6, []);
  1329. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(),'regin_no' => 6]);
  1330. $resp = $provider->query(['order_sn' => '24461638757715661527']);
  1331. }
  1332. public function testBaixuan()
  1333. {
  1334. // $provider = $this->getProvider('baixuan');
  1335. // $resp = $provider->balance();
  1336. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1337. // $resp = $provider->query(['order_sn' => '22241638773647636323']);
  1338. $body = '{"orderId":"211206145422241449","appId":"Hs2pvfcPTK","outOrderId":"22241638773647636323","sign":"acdd4cdbf6c9ad8d1eec12070caef9c7","orderStatus":"3","completeTime":"20211206145422","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1339. $params = json_decode($body, true);
  1340. $provider = $this->getProvider('baixuan', 'RefillCallBack');
  1341. $ret = $provider->verify($params);
  1342. $resp = $provider->notify($params);
  1343. }
  1344. public function testBaixuan_normal()
  1345. {
  1346. // $provider = $this->getProvider('baixuan_normal');
  1347. // $resp = $provider->balance();
  1348. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1349. // $resp = $provider->query(['order_sn' => '79931638775980503797']);
  1350. $body = '{"orderId":"211206153306269670","appId":"ntzRlj2kNV","outOrderId":"79931638775980503797","sign":"f67939b937f818e97c551e76b4b4e5ea","orderStatus":"3","completeTime":"20211206153309","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1351. $params = json_decode($body, true);
  1352. $provider = $this->getProvider('baixuan_normal', 'RefillCallBack');
  1353. $ret = $provider->verify($params);
  1354. $resp = $provider->notify($params);
  1355. }
  1356. public function testCangbuYd()
  1357. {
  1358. // $provider = $this->getProvider('cangbuyd');
  1359. // $resp = $provider->balance();
  1360. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1361. // $resp = $provider->query(['order_sn' => '12441638778449837197']);
  1362. $body = '{"customerId":"220","tmporder":"12441638778449837197","orderno":"s16387784558073061114220","number":"13699279618","money":"50","amount":"47.9500","code":"-1","cardno":"","voucher":"","sign":"6623dbe8e392b61ddc843e16804e9eed"}';
  1363. $params = json_decode($body, true);
  1364. $provider = $this->getProvider('cangbuyd', 'RefillCallBack');
  1365. $ret = $provider->verify($params);
  1366. $resp = $provider->notify($params);
  1367. }
  1368. public function testShangtou()
  1369. {
  1370. // $provider = $this->getProvider('shangtou');
  1371. // $resp = $provider->balance();
  1372. // $resp = $provider->add(1004638637, 4, 100, ['order_sn' => $this->make_sn()]);
  1373. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1374. $body = '{"order_id":"88791638870099595473","out_order_id":"EZZbg23f4K487498","orderBillNo":"","mchid":"20126","account":"1004638637","price":"100","status":"1","sign":"87c3fc2beaabb107ef80c06dd186742f"}';
  1375. $params = json_decode($body, true);
  1376. $provider = $this->getProvider('shangtou', 'RefillCallBack');
  1377. $ret = $provider->verify($params);
  1378. $resp = $provider->notify($params);
  1379. }
  1380. public function testGuantufs()
  1381. {
  1382. $provider = $this->getProvider('guantufs');
  1383. // $resp = $provider->balance();
  1384. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1385. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1386. }
  1387. public function testRuixunda()
  1388. {
  1389. // $provider = $this->getProvider('ruixunda');
  1390. // $resp = $provider->balance();
  1391. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1392. // $resp = $provider->query(['order_sn' => '77251661569789921261']);
  1393. $body = '{"orderid":"LRF22082711096411807","sporderid":"77251661569789921261","userid":"10002506","merchantsubmittime":"20220827110959","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-21500.17","sign":"34DD64D730CC71BD74A64A86FF623754"}';
  1394. $params = json_decode($body, true);
  1395. $provider = $this->getProvider('ruixunda', 'RefillCallBack');
  1396. $ret = $provider->verify($params);
  1397. $resp = $provider->notify($params);
  1398. }
  1399. public function testDashang_kami()
  1400. {
  1401. $provider = $this->getProvider('dashang_kami');
  1402. $resp = $provider->balance();
  1403. }
  1404. public function testWenye_oil()
  1405. {
  1406. $provider = $this->getProvider('wenye_oil', 'RefillOil');
  1407. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1408. }
  1409. public function testYunlingdf()
  1410. {
  1411. $provider = $this->getProvider('yunlingdf');
  1412. // $resp = $provider->balance();
  1413. $resp = $provider->add(2079727198, 7, 100, [
  1414. 'order_sn' => $this->make_sn(), 'company_type' => 'nation', 'use_type' => 'home',
  1415. 'province' => 18, 'city' => '永州市', 'product_code' => 'DF_nation_home_100'
  1416. ]);
  1417. // $resp = $provider->query(['order_sn' => '45331652932902024418']);
  1418. // $body = ' {"orderid":"JDE22051911549026252","sporderid":"26641652932472092667","userid":"10002623","merchantsubmittime":"20220519115448","resultno":"9","parvalue":"100","remark1":"","payno":"","fundbalance":"-140.5","sign":"1EC1F9730A66ED23B68B89DD7CA4EB15"}';
  1419. // $params = json_decode($body, true);
  1420. // $provider = $this->getProvider('yunlingdf', 'RefillCallBack');
  1421. // $ret = $provider->verify($params);
  1422. // $resp = $provider->notify($params);
  1423. }
  1424. public function testYamiao_high()
  1425. {
  1426. $provider = $this->getProvider('yamiao_high');
  1427. $resp = $provider->balance();
  1428. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1429. // $resp = $provider->query(['order_sn' => '63301640162626708212']);
  1430. // $body = '{"orderId":"211222164353000006","appId":"piFzrSOCIy","outOrderId":"63301640162626708212","sign":"558e9992d99fb5e9dd47b1f5a7677b01","orderStatus":"3","completeTime":"20211222164445","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1431. // $params = json_decode($body, true);
  1432. // $provider = $this->getProvider('yamiao_high','RefillCallBack');
  1433. // $ret = $provider->verify($params);
  1434. // $resp = $provider->notify($params);
  1435. }
  1436. public function testYamiao_normal()
  1437. {
  1438. $provider = $this->getProvider('yamiao_normal');
  1439. $resp = $provider->balance();
  1440. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1441. // $resp = $provider->query(['order_sn' => '95951640223816352024']);
  1442. // $body = '{"orderId":"211223094402000046","appId":"1pjrA9YErq","outOrderId":"95951640223816352024","sign":"5bd7135f5ef35c8f111eddfc06593941","orderStatus":"3","completeTime":"20211223094512","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1443. // $params = json_decode($body, true);
  1444. // $provider = $this->getProvider('yamiao_normal','RefillCallBack');
  1445. // $ret = $provider->verify($params);
  1446. // $resp = $provider->notify($params);
  1447. }
  1448. public function testJiyemei_doubi()
  1449. {
  1450. $provider = $this->getProvider('jiyemei_doubi');
  1451. // $resp = $provider->balance();
  1452. $resp = $provider->add(588073521, mtopcard\ThirdRefillCard, 50, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100753']);
  1453. // $resp = $provider->query(['order_sn' => '87081640849391308752']);
  1454. // $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"}';
  1455. // $params = json_decode($body, true);
  1456. // $provider = $this->getProvider('jiyemei_doubi','RefillCallBack');
  1457. // $ret = $provider->verify($params);
  1458. // $resp = $provider->notify($params);
  1459. }
  1460. public function testJiyemei()
  1461. {
  1462. // $provider = $this->getProvider('jiyemei');
  1463. // $resp = $provider->balance();
  1464. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1465. // $resp = $provider->query(['order_sn' => '22041640934793168827']);
  1466. $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"}';
  1467. $params = json_decode($body, true);
  1468. $provider = $this->getProvider('jiyemei', 'RefillCallBack');
  1469. $ret = $provider->verify($params);
  1470. $resp = $provider->notify($params);
  1471. }
  1472. public function testCangxin()
  1473. {
  1474. $provider = $this->getProvider('cangxin');
  1475. // $resp = $provider->balance();
  1476. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 100, ['order_sn' => $this->make_sn()]);
  1477. $resp = $provider->query(['order_sn' => '7388320697632252006499']);
  1478. // $body = '{"sysOrderNo":"R16409227448286K55VRJ","clientId":"10025","verifyString":"557363563501c97e9aa2f5cecc0b3679","clientOrderNo":"66891640922736203952","status":"3"}';
  1479. // $params = json_decode($body, true);
  1480. // $provider = $this->getProvider('cangxin','RefillCallBack');
  1481. // $ret = $provider->verify($params);
  1482. // $resp = $provider->notify($params);
  1483. }
  1484. public function testBaixuannew_high()
  1485. {
  1486. // $provider = $this->getProvider('baixuannew_high');
  1487. // $resp = $provider->balance();
  1488. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1489. // $resp = $provider->query(['order_sn' => '24051641457089799916']);
  1490. $body = '{"orderid":"PLN22010616189234154","sporderid":"24051641457089799916","userid":"10002504","merchantsubmittime":"20220106162023","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.1","sign":"0279426E9CCEF5366B422D44DB5976C1"}';
  1491. $params = json_decode($body, true);
  1492. $provider = $this->getProvider('baixuannew_high', 'RefillCallBack');
  1493. $ret = $provider->verify($params);
  1494. $resp = $provider->notify($params);
  1495. }
  1496. public function testYouhenew()
  1497. {
  1498. // $provider = $this->getProvider('youhenew');
  1499. // $resp = $provider->balance();
  1500. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1501. // $resp = $provider->query(['order_sn' => '77201646366493835757']);
  1502. $body = '{"szOrderId":"77201646366493835757","fSalePrice":"28.59","szAgentId":"200038","nFlag":"3","szVerifyString":"bdaa73499a506839654d4b9c36c6831a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  1503. $params = json_decode($body, true);
  1504. $provider = $this->getProvider('youhenew', 'RefillCallBack');
  1505. $ret = $provider->verify($params);
  1506. $resp = $provider->notify($params);
  1507. }
  1508. public function testHuoshenguo()
  1509. {
  1510. // $provider = $this->getProvider('huoshenguo');
  1511. // $resp = $provider->balance();
  1512. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1513. // $resp = $provider->query(['order_sn' => '90691642049771400349']);
  1514. $body = '{"orderId":"220113125625000016","appId":"xaPOF8SAEG","outOrderId":"90691642049771400349","sign":"b00285a7eabef29b0a0ad400ce8a3ea0","orderStatus":"3","completeTime":"20220113125843","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1515. $params = json_decode($body, true);
  1516. $provider = $this->getProvider('huoshenguo', 'RefillCallBack');
  1517. $ret = $provider->verify($params);
  1518. $resp = $provider->notify($params);
  1519. }
  1520. public function testXinhengyangnew()
  1521. {
  1522. // $provider = $this->getProvider('xinhengyangnew');
  1523. // $resp = $provider->balance();
  1524. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 30, ['order_sn' => $this->make_sn()]);
  1525. // $resp = $provider->query(['order_sn' => '90991642572014786398']);
  1526. $body = '{"mchid":"200050","msg":"充值失败","oid":"1000325764014","orderid":"90991642572014786398","price":28.62,"sign":"56db7e6a4748a74bd1fac1a1ad5e8d6d","status":2,"voucher":""}';
  1527. $params = json_decode($body, true);
  1528. $provider = $this->getProvider('xinhengyangnew', 'RefillCallBack');
  1529. $ret = $provider->verify($params);
  1530. $resp = $provider->notify($params);
  1531. }
  1532. public function testTianchen()
  1533. {
  1534. // $provider = $this->getProvider('tianchen');
  1535. // $resp = $provider->balance();
  1536. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 500, ['order_sn' => $this->make_sn()]);
  1537. // $resp = $provider->query(['order_sn' => '60701644202744810497']);
  1538. $body = '{"mchid":"100125","msg":"充值失败","oid":"1000061410881","orderid":"60701644202744810497","price":"501.000","sign":"5dc1f9e466f30f02f2756c886ad36020","status":"2","voucher":""}';
  1539. $params = json_decode($body, true);
  1540. $provider = $this->getProvider('tianchen', 'RefillCallBack');
  1541. $ret = $provider->verify($params);
  1542. $resp = $provider->notify($params);
  1543. }
  1544. public function testYunchonggong_lt()
  1545. {
  1546. // $provider = $this->getProvider('yunchonggong_lt');
  1547. // $resp = $provider->balance();
  1548. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 50, ['order_sn' => $this->make_sn()]);
  1549. // $resp = $provider->query(['order_sn' => '97971642992760355090']);
  1550. $body = '{"orderId":"220124105256190713","appId":"nOlXoN2jRJ","outOrderId":"97971642992760355090","sign":"81a579f8c935da72fe94ca0960d0a71f","orderStatus":"3","completeTime":"20220124105547","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1551. $params = json_decode($body, true);
  1552. $provider = $this->getProvider('yunchonggong_lt', 'RefillCallBack');
  1553. $ret = $provider->verify($params);
  1554. $resp = $provider->notify($params);
  1555. }
  1556. public function testYiqianfs()
  1557. {
  1558. // $provider = $this->getProvider('yiqianfs');
  1559. // $resp = $provider->balance();
  1560. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1561. // $resp = $provider->query(['order_sn' => '68971644218662333282']);
  1562. $body = '{"extOrderId":"68971644218662333282","orderId":"R2022020715240046789583","salePrice":"10.0000","sign":"cf59a3d76377cac096ac07c590657af0","state":"5"}';
  1563. $params = json_decode($body, true);
  1564. $provider = $this->getProvider('yiqianfs','RefillCallBack');
  1565. $ret = $provider->verify($params);
  1566. $resp = $provider->notify($params);
  1567. }
  1568. public function testZhutian()
  1569. {
  1570. $provider = $this->getProvider('zhutian');
  1571. // $resp = $provider->add(1004638637, 4, 50, ['order_sn' => $this->make_sn(), 'province' => 1]);
  1572. $resp = $provider->query(['order_sn' => '20661644895674724153']);
  1573. }
  1574. public function testRuizhi()
  1575. {
  1576. // $provider = $this->getProvider('ruizhi');
  1577. // $resp = $provider->balance();
  1578. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  1579. // $resp = $provider->query(['order_sn' => '66031645157064675953']);
  1580. $body = '{"userid":"65920","order_id":"22021812045065920f2b95cef2","account":"13699279618","amount":"100","price":"100.05","state":"success","user_order":"66031645157064675953","sign":"642AAB4C5A9CC56248AE80113878DB19","voucher":"220218-097370786582375"}';
  1581. $params = json_decode($body, true);
  1582. $provider = $this->getProvider('ruizhi','RefillCallBack');
  1583. $ret = $provider->verify($params);
  1584. $resp = $provider->notify($params);
  1585. }
  1586. public function testRuierxun()
  1587. {
  1588. // $provider = $this->getProvider('ruierxun');
  1589. // $resp = $provider->balance();
  1590. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1591. // $resp = $provider->query(['order_sn' => '48011645165293970916']);
  1592. $body = '{"orderId":"220218142143123894","appId":"LaEORKdrnZ","outOrderId":"48011645165293970916","sign":"28f30e616d06e7936d612995bb086d39","orderStatus":"3","completeTime":"20220218142205","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1593. $params = json_decode($body, true);
  1594. $provider = $this->getProvider('ruierxun','RefillCallBack');
  1595. $ret = $provider->verify($params);
  1596. $resp = $provider->notify($params);
  1597. }
  1598. public function testNingying()
  1599. {
  1600. // $provider = $this->getProvider('ningying');
  1601. // $resp = $provider->balance();
  1602. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1603. // $resp = $provider->query(['order_sn' => '59481645434420716297']);
  1604. $body = '{"orderId":"220221170704698128","appId":"O8y6eOzWY1","outOrderId":"59481645434420716297","sign":"7476bd7d6cb51a5b25a183145d4a0ada","orderStatus":"3","completeTime":"20220221171148","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1605. $params = json_decode($body, true);
  1606. $provider = $this->getProvider('ningying','RefillCallBack');
  1607. $ret = $provider->verify($params);
  1608. $resp = $provider->notify($params);
  1609. }
  1610. public function testCangxin_yi()
  1611. {
  1612. // $provider = $this->getProvider('cangxin_yi');
  1613. // $resp = $provider->balance();
  1614. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  1615. // $resp = $provider->query(['order_sn' => '98761645683605613490']);
  1616. $body = '{"sysOrderNo":"R1645683614014oToK4ua","officialOrderNo":"","clientId":"10043","verifyString":"4040530613390299cf5d432a59dad348","clientOrderNo":"98761645683605613490","status":"4"}';
  1617. $params = json_decode($body, true);
  1618. $provider = $this->getProvider('cangxin_yi','RefillCallBack');
  1619. $ret = $provider->verify($params);
  1620. $resp = $provider->notify($params);
  1621. }
  1622. public function testZhenghe()
  1623. {
  1624. // $provider = $this->getProvider('zhenghe');
  1625. // $resp = $provider->balance();
  1626. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  1627. // $resp = $provider->query(['order_sn' => '20411645686498504519']);
  1628. $body = '{"szOrderId":"20411645686498504519","fSalePrice":"30.15","szAgentId":"200032","nFlag":"2","szVerifyString":"af368366f759289054328390f419d062","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  1629. $params = json_decode($body, true);
  1630. $provider = $this->getProvider('zhenghe','RefillCallBack');
  1631. $ret = $provider->verify($params);
  1632. $resp = $provider->notify($params);
  1633. }
  1634. public function testLexiang()
  1635. {
  1636. // $provider = $this->getProvider('lexiang');
  1637. // $resp = $provider->balance();
  1638. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1639. // $resp = $provider->query(['order_sn' => '36181645780442291806', 'commit_time' => 1645780259]);
  1640. $body = '{"mchId":"20","mchOrderNo":"36181645780442291806","sysOrderNo":"S202202251714039EusUAV0yO","account":"18074608795","money":"30.0000","status":"2","sign":"c55977367aa083850456c5ec7c14ed87","certificate":"1000000083422022517369130925"}';
  1641. $params = json_decode($body, true);
  1642. $provider = $this->getProvider('lexiang','RefillCallBack');
  1643. $ret = $provider->verify($params);
  1644. $resp = $provider->notify($params);
  1645. }
  1646. public function testKuaikuai()
  1647. {
  1648. // $provider = $this->getProvider('kuaikuai');
  1649. // $resp = $provider->balance();
  1650. // $resp = $provider->add(185006083, 5, 30, ['order_sn' => $this->make_sn()]);
  1651. // $resp = $provider->query(['order_sn' => '48821646219340197679']);
  1652. $body = '{"msg":"100101101012202281653493036477","orderId":"37691646038424123424","createTime":1646038427,"sign":"35df4f13ee4dcaed2d582d709ff66073","orderNum":"2c922ab97f2683b5017f3f89246d1e4a","status":2}';
  1653. $params = json_decode($body, true);
  1654. $provider = $this->getProvider('kuaikuai','RefillCallBack');
  1655. $ret = $provider->verify($params);
  1656. $resp = $provider->notify($params);
  1657. }
  1658. public function testJianjiao()
  1659. {
  1660. $provider = $this->getProvider('jianjiao');
  1661. // $resp = $provider->balance();
  1662. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1663. // $resp = $provider->query(['order_sn' => '14481646204704630736']);
  1664. // $body = '{"order_id":"22030215052639807","out_order_id":"14481646204704630736","status":3,"mobile":"13699279618","amount":50,"app_key":"3l6kd2yqsvcwftij","official_sn":"","timestamp":1646205722,"sign":"db77f48b8964b74e9c5e44fa9b3dcf49"}';
  1665. // $params = json_decode($body, true);
  1666. // $provider = $this->getProvider('jianjiao','RefillCallBack');
  1667. // $ret = $provider->verify($params);
  1668. // $resp = $provider->notify($params);
  1669. }
  1670. public function testHuoli()
  1671. {
  1672. // $provider = $this->getProvider('huoli');
  1673. // $resp = $provider->balance();
  1674. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1675. // $resp = $provider->query(['order_sn' => '89741646294399883574']);
  1676. $body = '{"app_key":"expzye","out_trade_no":"89741646294399883574","sign":"24adfe57f5ada22db154d4ed4b4b8e5f","status":2}';
  1677. $params = json_decode($body, true);
  1678. $provider = $this->getProvider('huoli','RefillCallBack');
  1679. $ret = $provider->verify($params);
  1680. $resp = $provider->notify($params);
  1681. }
  1682. public function testNingying_normal()
  1683. {
  1684. $provider = $this->getProvider('ningying_normal');
  1685. // $resp = $provider->balance();
  1686. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1687. // $resp = $provider->query(['order_sn' => '83651658900120901860']);
  1688. $body = '{"szOrderId":"83651658900120901860","fSalePrice":"94.2","szAgentId":"200006","nFlag":"3","szVerifyString":"44fff983651dd01946c400085b9efd32","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"100"}';
  1689. $params = json_decode($body, true);
  1690. $provider = $this->getProvider('ningying_normal','RefillCallBack');
  1691. $ret = $provider->verify($params);
  1692. $resp = $provider->notify($params);
  1693. }
  1694. public function testYuanrun()
  1695. {
  1696. // $provider = $this->getProvider('yuanrun');
  1697. // $resp = $provider->balance();
  1698. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1699. // $resp = $provider->query(['order_sn' => '25801646616116681917', 'card_no' => 18500608333, 'commit_time' => 1646616131]);
  1700. $body = '{"cpid":"49449","order_no":"22030709220549449952471675","mobile":"18500608333","amount":"30","status":"success","sz_order_no":"100101101042203070922143047338","ret_para":"25801646616116681917","sign":"2fd2661ce353e4cb554d7d3ca3f09f4d"}';
  1701. $params = json_decode($body, true);
  1702. $provider = $this->getProvider('yuanrun','RefillCallBack');
  1703. $ret = $provider->verify($params);
  1704. $resp = $provider->notify($params);
  1705. }
  1706. public function testFeimingyunew()
  1707. {
  1708. $provider = $this->getProvider('feimingyunew');
  1709. // $resp = $provider->balance();
  1710. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1711. // $resp = $provider->query(['order_sn' => '24001646631354076583']);
  1712. // $body = '{"orderid":"AUH22030713352134241","sporderid":"24001646631354076583","userid":"10002506","merchantsubmittime":"20220307133712","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.26","sign":"0C4A264A6692C68EB8CC000BEC5C0E53"}';
  1713. // $params = json_decode($body, true);
  1714. // $provider = $this->getProvider('feimingyunew','RefillCallBack');
  1715. // $ret = $provider->verify($params);
  1716. // $resp = $provider->notify($params);
  1717. }
  1718. public function testBailian()
  1719. {
  1720. $provider = $this->getProvider('bailian', 'RefillOil');
  1721. $resp = $provider->balance();
  1722. }
  1723. public function testHangtongyj()
  1724. {
  1725. $provider = $this->getProvider('hangtongyj');
  1726. // $resp = $provider->balance();
  1727. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1728. $resp = $provider->query(['order_sn' => '13791646729519910878']);
  1729. // $body = '{"phone":"13699279618","orderNo":"F2203081623054678137","status":"fail","otherNo":"23351646727780199005","msg":"产品不存在","ext":null}';
  1730. // $params = json_decode($body, true);
  1731. // $provider = $this->getProvider('hangtongyj','RefillCallBack');
  1732. // $ret = $provider->verify($params);
  1733. // $resp = $provider->notify($params);
  1734. }
  1735. public function testRuixundaman()
  1736. {
  1737. // $provider = $this->getProvider('ruixundaman');
  1738. // $resp = $provider->balance();
  1739. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1740. // $resp = $provider->query(['order_sn' => '98441646796808890306']);
  1741. $body = '{"orderId":"220309113357355093","appId":"8tYeow0MYZ","outOrderId":"98441646796808890306","sign":"ec2619a26a11e3320fcdc71fccc7b310","orderStatus":"2","completeTime":"20220309193655","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"2022233820220309193635"}';
  1742. $params = json_decode($body, true);
  1743. $provider = $this->getProvider('ruixundaman','RefillCallBack');
  1744. $ret = $provider->verify($params);
  1745. $resp = $provider->notify($params);
  1746. }
  1747. public function testRuizhi_tax()
  1748. {
  1749. // $provider = $this->getProvider('ruizhi_tax');
  1750. // $resp = $provider->balance();
  1751. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1752. // $resp = $provider->query(['order_sn' => '36411646882603857635']);
  1753. $body = '{"userid":"10713","order_id":"22031011232910713e1bc01a6b","account":"13699279618","amount":"50","price":"52.15","state":"success","user_order":"36411646882603857635","sign":"3CEDF5DF4F8A178471FA24B07C8D9BBB","voucher":"2022031027610736554488548137"}';
  1754. $params = json_decode($body, true);
  1755. $provider = $this->getProvider('ruizhi_tax','RefillCallBack');
  1756. $ret = $provider->verify($params);
  1757. $resp = $provider->notify($params);
  1758. }
  1759. public function testPengxinda()
  1760. {
  1761. $provider = $this->getProvider('pengxinda');
  1762. // $resp = $provider->balance();
  1763. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1764. // $resp = $provider->query(['order_sn' => '29131646900654146357']);
  1765. // $body = '{"api_userid":"beijingyz","order_no":"29131646900654146357","retcode":"1","errcode":"100101101042203101624383157550"}';
  1766. // $params = json_decode($body, true);
  1767. // $provider = $this->getProvider('pengxinda','RefillCallBack');
  1768. // $ret = $provider->verify($params);
  1769. // $resp = $provider->notify($params);
  1770. }
  1771. public function testHuazhong()
  1772. {
  1773. $provider = $this->getProvider('huazhong');
  1774. // $resp = $provider->balance();
  1775. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1776. $resp = $provider->query(['order_sn' => '58581646984524382528']);
  1777. // $body = ' {"orderid":"GCN22031115279906665","sporderid":"54011646983613476599","userid":"10002763","merchantsubmittime":"20220311153014","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.65","sign":"198392B102B9B9FB60D52EF93EF2BDCC"}';
  1778. // $params = json_decode($body, true);
  1779. // $provider = $this->getProvider('huazhong','RefillCallBack');
  1780. // $ret = $provider->verify($params);
  1781. // $resp = $provider->notify($params);
  1782. }
  1783. public function testYamiaoman()
  1784. {
  1785. // $provider = $this->getProvider('yamiaoman');
  1786. // $resp = $provider->balance();
  1787. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1788. // $resp = $provider->query(['order_sn' => '53351647242979116742']);
  1789. $body = '{"orderId":"220314152954756093","appId":"zIODZmzSCk","outOrderId":"53351647242979116742","sign":"41ad7d4b4b26559377c6443d2b0d6c68","orderStatus":"3","completeTime":"20220314172722","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1790. $params = json_decode($body, true);
  1791. $provider = $this->getProvider('yamiaoman','RefillCallBack');
  1792. $ret = $provider->verify($params);
  1793. $resp = $provider->notify($params);
  1794. }
  1795. public function testKailinyu()
  1796. {
  1797. // $provider = $this->getProvider('kailinyu');
  1798. // $resp = $provider->balance();
  1799. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1800. // $resp = $provider->query(['order_sn' => '94371658718403772370']);
  1801. $body = '{"orderId":"220725110647030575","appId":"FcSAzHuWQ4","outOrderId":"94371658718403772370","sign":"6c2c7c91864f12ff1986ac4ea6fd7b4f","orderStatus":"3","completeTime":"20220725110647","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1802. $params = json_decode($body, true);
  1803. $provider = $this->getProvider('kailinyu','RefillCallBack');
  1804. $ret = $provider->verify($params);
  1805. $resp = $provider->notify($params);
  1806. }
  1807. public function testKuaikuaifs()
  1808. {
  1809. $provider = $this->getProvider('kuaikuaifs');
  1810. // $resp = $provider->balance();
  1811. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1812. // $resp = $provider->query(['order_sn' => '96401647327929264712']);
  1813. }
  1814. public function testYouheman()
  1815. {
  1816. // $provider = $this->getProvider('youheman');
  1817. // $resp = $provider->balance();
  1818. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1819. // $resp = $provider->query(['order_sn' => '65891648444382784227']);
  1820. $body = '{"szOrderId":"65891648444382784227","fSalePrice":"91.5","szAgentId":"200040","nFlag":"2","szVerifyString":"899758ef408c86164529a3724806d52b","szPhoneNum":"18500608333","szRtnMsg":"OM1508468825220870144","nDemo":"100"}';
  1821. $params = json_decode($body, true);
  1822. $provider = $this->getProvider('youheman','RefillCallBack');
  1823. $ret = $provider->verify($params);
  1824. $resp = $provider->notify($params);
  1825. }
  1826. public function testHuoshenguoman()
  1827. {
  1828. // $provider = $this->getProvider('huoshenguoman');
  1829. // $resp = $provider->balance();
  1830. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1831. // $resp = $provider->query(['order_sn' => '89261649309598653504']);
  1832. $body = '{"orderId":"220407133327635878","appId":"tME7rcK07P","outOrderId":"89261649309598653504","sign":"e46a90c064177aa34cac3a3951410df9","orderStatus":"3","completeTime":"20220407140654","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1833. $params = json_decode($body, true);
  1834. $provider = $this->getProvider('huoshenguoman','RefillCallBack');
  1835. $ret = $provider->verify($params);
  1836. $resp = $provider->notify($params);
  1837. }
  1838. public function testGuitong()
  1839. {
  1840. // $provider = $this->getProvider('guitong');
  1841. // $resp = $provider->balance();
  1842. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1843. // $resp = $provider->query(['order_sn' => '15551649669272272125']);
  1844. $body = '{"szOrderId":"15551649669272272125","fSalePrice":"28.62","szAgentId":"200062","nFlag":"3","szVerifyString":"62e5b8a71935a36acf563f232b75210e","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  1845. $params = json_decode($body, true);
  1846. $provider = $this->getProvider('guitong','RefillCallBack');
  1847. $ret = $provider->verify($params);
  1848. $resp = $provider->notify($params);
  1849. }
  1850. public function testYouhedf()
  1851. {
  1852. // $provider = $this->getProvider('youhedf');
  1853. // $resp = $provider->balance();
  1854. // $resp = $provider->add(1004638637, 101, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  1855. // $resp = $provider->query(['order_sn' => '80821649748836825835']);
  1856. $body = '{"szOrderId":"27341649750036121132","fSalePrice":"46.5","szAgentId":"200044","nFlag":"3","szVerifyString":"52b9057e467f09cf21eaceacddb475e6","szPhoneNum":"1004638637","szRtnMsg":"","nDemo":"50"}';
  1857. $params = json_decode($body, true);
  1858. $provider = $this->getProvider('youhedf', 'RefillCallBack');
  1859. }
  1860. public function testYunchonggongman()
  1861. {
  1862. // $provider = $this->getProvider('yunchonggongman');
  1863. // $resp = $provider->balance();
  1864. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1865. // $resp = $provider->query(['order_sn' => '72011649828177343273']);
  1866. $body = '{"orderId":"220413133619562061","appId":"P9EYSTJenh","outOrderId":"72011649828177343273","sign":"5294a7cea3c30049f82454012d9dd028","orderStatus":"3","completeTime":"20220413140642","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1867. $params = json_decode($body, true);
  1868. $provider = $this->getProvider('yunchonggongman','RefillCallBack');
  1869. $ret = $provider->verify($params);
  1870. $resp = $provider->notify($params);
  1871. }
  1872. public function testJike()
  1873. {
  1874. // $provider = $this->getProvider('jike');
  1875. // $resp = $provider->balance();
  1876. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1877. // $resp = $provider->query(['order_sn' => '61891650433011979641']);
  1878. $body = '{"amount":30.00,"finishTime":"2022-04-20 13:40:22","mobile":"18500608333","orderNo":"QY2022042013371516594bw95","outOrderNo":"61891650433011979641","refundAmount":0.00,"settlementAmount":29.25,"sign":"c9814fcd0e3fcc8f978a33cba1387ef4","status":3,"timestamp":1650433222213,"updateTime":"2022-04-20 13:40:22"}';
  1879. $params = json_decode($body, true);
  1880. $provider = $this->getProvider('jike','RefillCallBack');
  1881. $ret = $provider->verify($params);
  1882. $resp = $provider->notify($params);
  1883. }
  1884. public function testJumeng()
  1885. {
  1886. // $provider = $this->getProvider('jumeng');
  1887. // $resp = $provider->balance();
  1888. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1889. // $resp = $provider->query(['order_sn' => '61891650433011979641']);
  1890. $body = '{"orderid":"NRG22042415190852684","sporderid":"54521650784779022915","userid":"10002591","merchantsubmittime":"20220424152241","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.32","sign":"315A02F52F772BFBE681541DC5D5A68F"}';
  1891. $params = json_decode($body, true);
  1892. $provider = $this->getProvider('jumeng','RefillCallBack');
  1893. $ret = $provider->verify($params);
  1894. $resp = $provider->notify($params);
  1895. }
  1896. public function testShantong()
  1897. {
  1898. // $provider = $this->getProvider('shantong');
  1899. // $resp = $provider->balance();
  1900. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1901. // $resp = $provider->query(['order_sn' => '35151650783370889788']);
  1902. $body = '{"orderId":"23691650852278427609","mobile":"18500608333","sign":"e7239f5bc48819fcb18942ae56beba6c","orderStatus":3,"businessOrderId":"10040425100000001","finishDate":"2022-04-25 10:24:17","perValue":100}';
  1903. $params = json_decode($body, true);
  1904. $provider = $this->getProvider('shantong','RefillCallBack');
  1905. $ret = $provider->verify($params);
  1906. $resp = $provider->notify($params);
  1907. }
  1908. public function testYelin_hf()
  1909. {
  1910. // $provider = $this->getProvider('yelin_hf');
  1911. // $resp = $provider->balance();
  1912. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1913. // $resp = $provider->query(['order_sn' => '96211651214739034917']);
  1914. $body = '{"mchid":"10286","order_sn":"96211651214739034917","amount":"30.0000","cardno":"18500608333","trade_no":"7442240704558746373340","idcard":"","card_name":"","official_sn":"","message":"fail","state":"CANCEL","sign":"317b6787d3fab8ce7f60a4acfe25bbc9"}';
  1915. $params = json_decode($body, true);
  1916. $provider = $this->getProvider('yelin_hf','RefillCallBack');
  1917. $ret = $provider->verify($params);
  1918. $resp = $provider->notify($params);
  1919. }
  1920. public function testAinika()
  1921. {
  1922. // $provider = $this->getProvider('ainika');
  1923. // $resp = $provider->balance();
  1924. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1925. // $resp = $provider->query(['order_sn' => '61961651223605267063']);
  1926. $body = '{"orderid":"HAP22042917132281477","sporderid":"61961651223605267063","userid":"10002584","merchantsubmittime":"20220429171341","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.9","sign":"36D1867A80924B6AE92C7B2CC1CE96BF"}';
  1927. $params = json_decode($body, true);
  1928. $provider = $this->getProvider('ainika','RefillCallBack');
  1929. $ret = $provider->verify($params);
  1930. $resp = $provider->notify($params);
  1931. }
  1932. public function testMiaoxt_tax()
  1933. {
  1934. // $provider = $this->getProvider('miaoxt_tax');
  1935. // $resp = $provider->balance();
  1936. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1937. // $resp = $provider->query(['order_sn' => '26021652172403994919']);
  1938. $body = '{"szOrderId":"26021652172403994919","fSalePrice":"51.65","szAgentId":"200093","nFlag":"2","szVerifyString":"191888adc1a74ac284ab8a9aeba89753","szPhoneNum":"18500608333","szRtnMsg":"100101101052205101647064149797","nDemo":"50"}';
  1939. $params = json_decode($body, true);
  1940. $provider = $this->getProvider('miaoxt_tax','RefillCallBack');
  1941. $ret = $provider->verify($params);
  1942. $resp = $provider->notify($params);
  1943. }
  1944. public function testChending_df()
  1945. {
  1946. // $provider = $this->getProvider('chending_df');
  1947. // $resp = $provider->balance();
  1948. // $resp = $provider->add(0014520437, 7, 100, ['order_sn' => $this->make_sn(), 'company_type' => 'nation', 'use_type' => 'home', 'province' => 1, 'city' => '北京市', 'product_code' => 'DF_nation_home_100']);
  1949. // $resp = $provider->query(['order_sn' => '63291660632954797381']);
  1950. $body = '{"orderId":"220513163943109440","appId":"SfjndCMdUC","outOrderId":"59951652431183676445","sign":"6e8bb3398fe726141760e4e7c134620a","orderStatus":"2","completeTime":"20220514191209","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  1951. $params = json_decode($body, true);
  1952. $provider = $this->getProvider('chending_df', 'RefillCallBack');
  1953. $ret = $provider->verify($params);
  1954. $resp = $provider->notify($params);
  1955. }
  1956. public function testChending_tax()
  1957. {
  1958. // $provider = $this->getProvider('chending_tax');
  1959. // $resp = $provider->balance();
  1960. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'company_type' => 'nation', 'use_type' => 'home', 'province' => 1, 'city' => '北京市']);
  1961. // $resp = $provider->query(['order_sn' => '22671652666858385750']);
  1962. $body = '{"orderId":"220516100746111668","appId":"4kMv0XHVYd","outOrderId":"22671652666858385750","sign":"e1f513d104df7cb31f767784f04833f1","orderStatus":"2","completeTime":"20220516100752","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"100101101032205161007504153995"}';
  1963. $params = json_decode($body, true);
  1964. $provider = $this->getProvider('chending_tax','RefillCallBack');
  1965. $ret = $provider->verify($params);
  1966. $resp = $provider->notify($params);
  1967. }
  1968. public function testDonghong_high()
  1969. {
  1970. // $provider = $this->getProvider('donghong_high');
  1971. // $resp = $provider->balance();
  1972. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1973. // $resp = $provider->query(['order_sn' => '63621652775729185590']);
  1974. $body = '{"orderid":"FJW22051716222022479","sporderid":"63621652775729185590","userid":"10002583","merchantsubmittime":"20220517162522","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.25","sign":"E7AE9EE9E3D83909564E03935A7AFAA5"}';
  1975. $params = json_decode($body, true);
  1976. $provider = $this->getProvider('donghong_high','RefillCallBack');
  1977. $ret = $provider->verify($params);
  1978. $resp = $provider->notify($params);
  1979. }
  1980. public function testTongmai()
  1981. {
  1982. // $provider = $this->getProvider('tongmai');
  1983. // $resp = $provider->balance();
  1984. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1985. // $resp = $provider->query(['order_sn' => '14471652858448773887']);
  1986. $body = '{"szOrderId":"14471652858448773887","fSalePrice":"49.75","szAgentId":"200010","nFlag":"2","szVerifyString":"228ad25509b080bb728276d6176d9fea","szPhoneNum":"13699279618","szRtnMsg":"220518-443138774640458","nDemo":"50"}';
  1987. $params = json_decode($body, true);
  1988. $provider = $this->getProvider('tongmai','RefillCallBack');
  1989. $ret = $provider->verify($params);
  1990. $resp = $provider->notify($params);
  1991. }
  1992. public function testLiantongzx()
  1993. {
  1994. // $provider = $this->getProvider('liantongzx');
  1995. // $resp = $provider->balance();
  1996. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1997. // $resp = $provider->query(['order_sn' => '31091653029001738304']);
  1998. $body = '{"msg":"成功","code":"00000","data":{"buisId":"31091653029001738304","signature":"59E5589E87B24B2DCBEC7AE09B0310B8","rechargePhone":"18500608333","appKey":"Dbjyz","id":"202205201443247E4AEC9FF804F14AC2","operator":"CU","status":2,"rechargeMoney":5000}}';
  1999. $params = json_decode($body, true);
  2000. $provider = $this->getProvider('liantongzx','RefillCallBack');
  2001. $ret = $provider->verify($params['data']);
  2002. $resp = $provider->notify($params['data']);
  2003. }
  2004. public function testBodian()
  2005. {
  2006. // $provider = $this->getProvider('bodian');
  2007. // $resp = $provider->balance();
  2008. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2009. // $resp = $provider->query(['order_sn' => '57771653272628058996']);
  2010. $body = '{"szOrderId":"57771653272628058996","fSalePrice":"49.9","szAgentId":"200022","nFlag":"2","szVerifyString":"3d0cad0e5b5b5e21822aeb30541d689c","szPhoneNum":"18500608333","szRtnMsg":"100101101062205231024014167462","nDemo":"50"}';
  2011. $params = json_decode($body, true);
  2012. $provider = $this->getProvider('bodian','RefillCallBack');
  2013. $ret = $provider->verify($params);
  2014. $resp = $provider->notify($params);
  2015. }
  2016. public function testGdsinopec()
  2017. {
  2018. $provider = $this->getProvider('gdsinopec','RefillOil');
  2019. // $resp = $provider->add(13699279618, 4, 5, [
  2020. // 'order_sn' => $this->make_sn(), 'province' => 19
  2021. // ]);
  2022. $resp = $provider->query(['order_sn' => '63821655370285849333']);
  2023. }
  2024. public function testYuke()
  2025. {
  2026. // $provider = $this->getProvider('yuke');
  2027. // $resp = $provider->balance();
  2028. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2029. // $resp = $provider->query(['order_sn' => '26641653296769663088']);
  2030. $body = '{"orderType":0,"updatedTime":"2022-05-23 17:16:02","outOpenId":"","orderSn":"20220523170620286044131126629607","sign":"ABD2343F3D936E0C0B7C1FB2893ED06E","orderStatus":3,"rechargeAccount":"15811535608","rechargeAmount":50.000,"createTime":"2022-05-23 17:06:20","outOrderId":"26641653296769663088","tPfChannelId":192,"cpParam":"","callbackOtherAttr":{"cert_no":""}}';
  2031. $params = json_decode($body, true);
  2032. $provider = $this->getProvider('yuke','RefillCallBack');
  2033. $ret = $provider->verify($params);
  2034. $resp = $provider->notify($params);
  2035. }
  2036. public function testChizeng_yi()
  2037. {
  2038. // $provider = $this->getProvider('chizeng_yi');
  2039. // $resp = $provider->balance();
  2040. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn()]);
  2041. // $resp = $provider->query(['order_sn' => '45611653372272644548']);
  2042. $body = '{"orderid":"YOQ22052414043859005","sporderid":"45611653372272644548","userid":"10003583","merchantsubmittime":"20220524140541","resultno":"9","parvalue":"100","remark1":"","payno":"","fundbalance":"-98","sign":"23331D82F432054D58CA7047F33A13F7"}';
  2043. $params = json_decode($body, true);
  2044. $provider = $this->getProvider('chizeng_yi','RefillCallBack');
  2045. $ret = $provider->verify($params);
  2046. $resp = $provider->notify($params);
  2047. }
  2048. public function testGuanbang()
  2049. {
  2050. // $provider = $this->getProvider('guanbang');
  2051. // $resp = $provider->balance();
  2052. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2053. // $resp = $provider->query(['order_sn' => '82791653469520046484']);
  2054. $body = ' {"userid":"57756","order_id":"22052517052557756af95c9977","account":"15811535608","amount":"30","price":"30.36","state":"failed","user_order":"82791653469520046484","sign":"941BE8B6FF2ABB832A1848DD2758121F","voucher":""}';
  2055. $params = json_decode($body, true);
  2056. $provider = $this->getProvider('guanbang','RefillCallBack');
  2057. $ret = $provider->verify($params);
  2058. $resp = $provider->notify($params);
  2059. }
  2060. public function testYuke_lt()
  2061. {
  2062. $provider = $this->getProvider('yuke_lt');
  2063. $resp = $provider->balance();
  2064. }
  2065. public function testYuke_dx()
  2066. {
  2067. $provider = $this->getProvider('yuke_dx');
  2068. $resp = $provider->balance();
  2069. }
  2070. public function testGaobiao()
  2071. {
  2072. $provider = $this->getProvider('gaobiao');
  2073. $resp = $provider->balance();
  2074. }
  2075. public function testHuoshenguo_Yd()
  2076. {
  2077. // $provider = $this->getProvider('huoshenguo_yd');
  2078. // $resp = $provider->balance();
  2079. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2080. // $resp = $provider->query(['order_sn' => '15731655879529254660']);
  2081. $body = '{"orderId":"220622143213646892","appId":"faGa76P2NZ","outOrderId":"15731655879529254660","sign":"b8199c227c0bf4cebc9ca97bc79400eb","orderStatus":"3","completeTime":"20220622143225","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2082. $params = json_decode($body, true);
  2083. $provider = $this->getProvider('huoshenguo_yd','RefillCallBack');
  2084. $ret = $provider->verify($params);
  2085. $resp = $provider->notify($params);
  2086. }
  2087. public function testXinruiheng()
  2088. {
  2089. // $provider = $this->getProvider('xinruiheng');
  2090. // $resp = $provider->balance();
  2091. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2092. // $resp = $provider->query(['order_sn' => '39051656036848508036']);
  2093. $body = '{"orderid":"SPN22062410147271198","sporderid":"39051656036848508036","userid":"10002683","merchantsubmittime":"20220624101713","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.98","sign":"0BDCBB9BF688B35E55B1B16E88D5E5FD"}';
  2094. $params = json_decode($body, true);
  2095. $provider = $this->getProvider('xinruiheng','RefillCallBack');
  2096. $ret = $provider->verify($params);
  2097. $resp = $provider->notify($params);
  2098. }
  2099. public function testDezhi()
  2100. {
  2101. // $provider = $this->getProvider('dezhi');
  2102. // $resp = $provider->balance();
  2103. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2104. // $resp = $provider->query(['order_sn' => '16601665727931494879']);
  2105. $body = '{"orderid":"XEV22101414121957347","sporderid":"16601665727931494879","userid":"10002505","merchantsubmittime":"20221014141213","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-17409.66","sign":"666E01E56191A7C997049E965E67A31F"}';
  2106. $params = json_decode($body, true);
  2107. $provider = $this->getProvider('dezhi','RefillCallBack');
  2108. $ret = $provider->verify($params);
  2109. $resp = $provider->notify($params);
  2110. }
  2111. public function testHuoshenguo_fs()
  2112. {
  2113. // $provider = $this->getProvider('huoshenguo_fs');
  2114. // $resp = $provider->balance();
  2115. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2116. // $resp = $provider->query(['order_sn' => '94501657786482224013']);
  2117. $body = '{"orderId":"220714161448729470","appId":"0AQYfAzSyy","outOrderId":"94501657786482224013","sign":"ddc73651e25ae6ea39f082407c60cb39","orderStatus":"3","completeTime":"20220714161655","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2118. $params = json_decode($body, true);
  2119. $provider = $this->getProvider('huoshenguo_fs', 'RefillCallBack');
  2120. $ret = $provider->verify($params);
  2121. $resp = $provider->notify($params);
  2122. }
  2123. public function testJinglan()
  2124. {
  2125. // $provider = $this->getProvider('jinglan');
  2126. // $resp = $provider->balance();
  2127. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2128. // $resp = $provider->query(['order_sn' => '80901658214434787593']);
  2129. $body = '{"orderNo":"12020220719150001876401","merAccount":"1000000851","merOrderNo":"80901658214434787593","sign":"8d6e9ac7c0eaef0f4b921c983106b710","discountAmount":"50000","merOrderTime":"2022-07-19 15:07:16","successAmount":"50000","orderState":"24","merUserAccount":"","orderAmount":"50000","orderTime":"2022-07-19 15:07:18","payAmount":"50000","orderStateDesc":"\u6210\u529f","orderDetail":"\u5317\u4eac\u8054\u901a\u8bdd\u8d39\u5145\u503c50\u5143","attach":"","endTime":"2022-07-19 15:17:27","businessType":"12"}';
  2130. $params = json_decode($body, true);
  2131. $provider = $this->getProvider('jinglan', 'RefillCallBack');
  2132. $ret = $provider->verify($params);
  2133. $resp = $provider->notify($params);
  2134. }
  2135. public function testXinruiheng_fs()
  2136. {
  2137. // $provider = $this->getProvider('xinruiheng_fs');
  2138. // $resp = $provider->balance();
  2139. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2140. // $resp = $provider->query(['order_sn' => '85401658476449708732']);
  2141. $body = '{"orderid":"VEL22072215540081259","sporderid":"85401658476449708732","userid":"10002764","merchantsubmittime":"20220722155635","resultno":"1","parvalue":"30","remark1":"74620220722155607702045","payno":"74620220722155607702045","fundbalance":"-28.05","sign":"2196527C01BB57063B030C2E29270D98"}';
  2142. $params = json_decode($body, true);
  2143. $provider = $this->getProvider('xinruiheng_fs', 'RefillCallBack');
  2144. $ret = $provider->verify($params);
  2145. $resp = $provider->notify($params);
  2146. }
  2147. public function testZiyugui()
  2148. {
  2149. // $provider = $this->getProvider('ziyugui');
  2150. // $resp = $provider->balance();
  2151. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2152. // $resp = $provider->query(['order_sn' => '65941659496150348208']);
  2153. $body = '{"szOrderId":"65941659496150348208","fSalePrice":"28.32","szAgentId":"200001","nFlag":"3","szVerifyString":"53fddb31f9fa15a457b6fb3b8d1f71b9","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  2154. $params = json_decode($body, true);
  2155. $provider = $this->getProvider('ziyugui','RefillCallBack');
  2156. $ret = $provider->verify($params);
  2157. $resp = $provider->notify($params);
  2158. }
  2159. public function testGuiton_yi()
  2160. {
  2161. // $provider = $this->getProvider('guitong_yi');
  2162. // $resp = $provider->balance();
  2163. // $resp = $provider->add(13699279618, 4, 300, ['order_sn' => $this->make_sn()]);
  2164. // $resp = $provider->query(['order_sn' => '88981660030164774522']);
  2165. $body = '{"szOrderId":"88981660030164774522","fSalePrice":"300.45","szAgentId":"200104","nFlag":"2","szVerifyString":"9b4dbb981339f702f81441aa204e9a5c","szPhoneNum":"13699279618","szRtnMsg":"250457458535","nDemo":"300"}';
  2166. $params = json_decode($body, true);
  2167. $provider = $this->getProvider('guitong_yi','RefillCallBack');
  2168. $ret = $provider->verify($params);
  2169. $resp = $provider->notify($params);
  2170. }
  2171. public function testDazhanggui()
  2172. {
  2173. // $provider = $this->getProvider('dazhanggui');
  2174. // $resp = $provider->balance();
  2175. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2176. // $resp = $provider->query(['order_sn' => '38151660639715902891']);
  2177. $body = '{"szOrderId":"38151660639715902891","fSalePrice":"28.5","szAgentId":"200008","nFlag":"3","szVerifyString":"8e73b9e248e26089bd82303b5ed70992","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  2178. $params = json_decode($body, true);
  2179. $provider = $this->getProvider('dazhanggui', 'RefillCallBack');
  2180. $ret = $provider->verify($params);
  2181. $resp = $provider->notify($params);
  2182. }
  2183. public function testWeixue()
  2184. {
  2185. // $provider = $this->getProvider('weixue');
  2186. // $resp = $provider->balance();
  2187. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2188. // $resp = $provider->query(['order_sn' => '93321661135376151843']);
  2189. $body = '{"orderid":"GKN22082210298364442","sporderid":"93321661135376151843","userid":"10002703","merchantsubmittime":"20220822103250","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.01","sign":"550EDFC88E0B08B90EAE3E5DE3CDA62E"}';
  2190. $params = json_decode($body, true);
  2191. $provider = $this->getProvider('weixue','RefillCallBack');
  2192. $ret = $provider->verify($params);
  2193. $resp = $provider->notify($params);
  2194. }
  2195. public function testDazhanggui_high()
  2196. {
  2197. // $provider = $this->getProvider('dazhanggui_high');
  2198. // $resp = $provider->balance();
  2199. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2200. // $resp = $provider->query(['order_sn' => '97891663034634307994']);
  2201. $body = '{"szOrderId":"97891663034634307994","fSalePrice":"48.75","szAgentId":"200021","nFlag":"3","szVerifyString":"2072991c0760ca1be5ec05ba3f4cf0b0","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2202. $params = json_decode($body, true);
  2203. $provider = $this->getProvider('dazhanggui_high', 'RefillCallBack');
  2204. $ret = $provider->verify($params);
  2205. $resp = $provider->notify($params);
  2206. }
  2207. public function testYingdian_hf()
  2208. {
  2209. // $provider = $this->getProvider('yingdian_hf');
  2210. // $resp = $provider->balance();
  2211. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2212. // $resp = $provider->query(['order_sn' => '95361663137380842711']);
  2213. $body = '{"amount":"50.0","cardNo":"15811535608","merchantId":"10026","orderNo":"20220914143618594153","outTradeNo":"95361663137380842711","requestTime":"2022-09-14 14:36:21","sign":"219f2f45298550c52a4a7e3b98b253a7","state":"FAIL"}';
  2214. $params = json_decode($body, true);
  2215. $provider = $this->getProvider('yingdian_hf', 'RefillCallBack');
  2216. $ret = $provider->verify($params);
  2217. $resp = $provider->notify($params);
  2218. }
  2219. public function testDazhanggui_fs()
  2220. {
  2221. // $provider = $this->getProvider('dazhanggui_fs');
  2222. // $resp = $provider->balance();
  2223. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2224. // $resp = $provider->query(['order_sn' => '45731664176822286443']);
  2225. $body = '{"szOrderId":"45731664176822286443","fSalePrice":"28.26","szAgentId":"200026","nFlag":"3","szVerifyString":"b685695ec2fb80f98566f71bd607c7d5","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
  2226. $params = json_decode($body, true);
  2227. $provider = $this->getProvider('dazhanggui_fs', 'RefillCallBack');
  2228. $ret = $provider->verify($params);
  2229. $resp = $provider->notify($params);
  2230. }
  2231. public function testFeiminyu_high()
  2232. {
  2233. // $provider = $this->getProvider('feimingyu_high');
  2234. // $resp = $provider->balance();
  2235. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2236. // $resp = $provider->query(['order_sn' => '67901664179951146425']);
  2237. $body = '{"orderid":"EIE22092616129360743","sporderid":"67901664179951146425","userid":"10002986","merchantsubmittime":"20220926161235","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.37","sign":"1D0D706BBC7944A0D0275382CC6337F5"}';
  2238. $params = json_decode($body, true);
  2239. $provider = $this->getProvider('feimingyu_high', 'RefillCallBack');
  2240. $ret = $provider->verify($params);
  2241. $resp = $provider->notify($params);
  2242. }
  2243. public function testWeixue_yi()
  2244. {
  2245. $provider = $this->getProvider('weixue_yi');
  2246. $resp = $provider->balance();
  2247. }
  2248. public function testJinfeng_fs()
  2249. {
  2250. // $provider = $this->getProvider('jinfeng_fs');
  2251. // $resp = $provider->balance();
  2252. // $resp = $provider->add(18010110637, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2253. // $resp = $provider->query(['order_sn' => '67481665209341012765']);
  2254. $body = '{"orderNo":"F2210081409124193922","status":"019","consumerNo":"67481665209341012765","voucherNo":null,"mobile":"18010110637"}';
  2255. $params = json_decode($body, true);
  2256. $provider = $this->getProvider('jinfeng_fs', 'RefillCallBack');
  2257. $ret = $provider->verify($params);
  2258. $resp = $provider->notify($params);
  2259. }
  2260. public function testDouxun()
  2261. {
  2262. $provider = $this->getProvider('douxun');
  2263. $resp = $provider->balance();
  2264. // $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2265. // $resp = $provider->query(['order_sn' => '15711665296902146642']);
  2266. $body = '<request>
  2267. <head>
  2268. <custInteId>BJQDWTC</custInteId>
  2269. <echo>tu7d1YZCB7Ca8wQNQC2mgEoMirD4an7R</echo>
  2270. <timestamp>20221009113824</timestamp>
  2271. <chargeSign>+jGibLIlbzG0Lzv0/sxdtg==</chargeSign>
  2272. </head>
  2273. <body>
  2274. <item>
  2275. <orderId>38901665286687817863</orderId>
  2276. <orderType>1</orderType>
  2277. <packCode>400030</packCode>
  2278. <mobile>15811535608</mobile>
  2279. <result>0017</result>
  2280. <desc>移动通道未开通或维护中</desc>
  2281. <operatorNo></operatorNo>
  2282. </item>
  2283. </body>
  2284. </request>';
  2285. // $params = refill\util::xmlToArray($body);
  2286. // $provider = $this->getProvider('douxun', 'RefillCallBack');
  2287. // $ret = $provider->verify($params);
  2288. // $resp = $provider->notify($params);
  2289. }
  2290. public function testFeimingyu_middle()
  2291. {
  2292. // $provider = $this->getProvider('feimingyu_middle');
  2293. // $resp = $provider->balance();
  2294. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2295. // $resp = $provider->query(['order_sn' => '22171665388992765168']);
  2296. $body = '{"orderid":"PFI22101016039457152","sporderid":"22171665388992765168","userid":"10003008","merchantsubmittime":"20221010160317","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.1","sign":"C5962454EED498806B920C1181257CD0"}';
  2297. $params = json_decode($body, true);
  2298. $provider = $this->getProvider('feimingyu_middle', 'RefillCallBack');
  2299. $ret = $provider->verify($params);
  2300. $resp = $provider->notify($params);
  2301. }
  2302. public function testRuixunda_fs()
  2303. {
  2304. // $provider = $this->getProvider('ruixunda_fs');
  2305. // $resp = $provider->balance();
  2306. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2307. // $resp = $provider->query(['order_sn' => '80291665542669040526']);
  2308. $body = '{"orderid":"KKY22101210450260770","sporderid":"80291665542669040526","userid":"10002703","merchantsubmittime":"20221012104537","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"F31A81C28225DA2EFD8D5ED0CC2B3889"}';
  2309. $params = json_decode($body, true);
  2310. $provider = $this->getProvider('ruixunda_fs', 'RefillCallBack');
  2311. $ret = $provider->verify($params);
  2312. $resp = $provider->notify($params);
  2313. }
  2314. public function testLechong_high()
  2315. {
  2316. // $provider = $this->getProvider('lechong_high');
  2317. // $resp = $provider->balance();
  2318. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2319. // $resp = $provider->query(['order_sn' => '99381665639827584183']);
  2320. $body = '{"sellerid":"99381665639827584183","agentcode":"202210131253","account":"MTU4MTE1MzU2MDg=","value":"50","payvalue":"48.5000","voucher":"","createtime":"20221013134453","endtime":"20221013134722","state":"4","remark":"","time":"20221013135258","sign":"2e81793ab79297aae39e668c3dfa1a33"}';
  2321. $params = json_decode($body, true);
  2322. $provider = $this->getProvider('lechong_high', 'RefillCallBack');
  2323. $ret = $provider->verify($params);
  2324. $resp = $provider->notify($params);
  2325. }
  2326. public function testDezhi_fs()
  2327. {
  2328. $provider = $this->getProvider('dezhi_fs');
  2329. $resp = $provider->balance();
  2330. }
  2331. public function testYelin_dx()
  2332. {
  2333. $provider = $this->getProvider('yelin_dx');
  2334. $resp = $provider->balance();
  2335. }
  2336. public function testQianqian_fs()
  2337. {
  2338. // $provider = $this->getProvider('qianqian_fs');
  2339. // $resp = $provider->balance();
  2340. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' =>15]);
  2341. // $resp = $provider->query(['order_sn' => '95171666766063652238']);
  2342. $body = '{"orderNo":"F2210261434301036619","status":"019","consumerNo":"95171666766063652238","voucherNo":null,"mobile":"15811535608"}';
  2343. $params = json_decode($body, true);
  2344. $provider = $this->getProvider('qianqian_fs', 'RefillCallBack');
  2345. $ret = $provider->verify($params);
  2346. $resp = $provider->notify($params);
  2347. }
  2348. public function testXinruiheng_yd()
  2349. {
  2350. // $provider = $this->getProvider('xinruiheng_yd');
  2351. // $resp = $provider->balance();
  2352. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>15]);
  2353. // $resp = $provider->query(['order_sn' => '66281667543910287910']);
  2354. $body = '{"orderid":"OIX22110414389027114","sporderid":"66281667543910287910","userid":"10003003","merchantsubmittime":"20221104143838","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.19","sign":"6796F06EB1D1BE3CA32F06A80A42F971"}';
  2355. $params = json_decode($body, true);
  2356. $provider = $this->getProvider('xinruiheng_yd', 'RefillCallBack');
  2357. $ret = $provider->verify($params);
  2358. $resp = $provider->notify($params);
  2359. }
  2360. public function testWanxin_fs()
  2361. {
  2362. // $provider = $this->getProvider('wanxin_fs');
  2363. // $resp = $provider->balance();
  2364. // $resp = $provider->add(15139608757, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2365. // $resp = $provider->query(['order_sn' => '87101667799056105168']);
  2366. $body = ' {"status":"020","orderNo":"F2211071331082216627","consumerNo":"87101667799056105168","mobile":"15139608757","voucherNo":"null","account":"wxgyyj","timestamp":"1667799069004","sign":"ee45c3c896d5e392d95858b913cd674c02fbfa5b"}';
  2367. $params = json_decode($body, true);
  2368. $provider = $this->getProvider('wanxin_fs', 'RefillCallBack');
  2369. $ret = $provider->verify($params);
  2370. $resp = $provider->notify($params);
  2371. }
  2372. public function testWanxin()
  2373. {
  2374. // $provider = $this->getProvider('wanxin');
  2375. // $resp = $provider->balance();
  2376. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2377. // $resp = $provider->query(['order_sn' => '29901667975986554424']);
  2378. $body = '{"status":"019","orderNo":"F2211091440143408966","consumerNo":"29901667975986554424","mobile":"18500608333","voucherNo":"null","account":"wxgyqg","timestamp":"1667976015002","sign":"0181d8fb2a98d1c7c605066f54e4ee0766cb8440"}';
  2379. $params = json_decode($body, true);
  2380. $provider = $this->getProvider('wanxin', 'RefillCallBack');
  2381. $ret = $provider->verify($params);
  2382. $resp = $provider->notify($params);
  2383. }
  2384. public function testYuewen()
  2385. {
  2386. // $provider = $this->getProvider('yuewen');
  2387. // $resp = $provider->balance();
  2388. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2389. // $resp = $provider->query(['order_sn' => '58661667979936889698']);
  2390. $body = '{"orderid":"AIG22110915454468629","sporderid":"58661667979936889698","userid":"10002644","merchantsubmittime":"20221109154540","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.8","sign":"E12FC52E718947DAA6B6733CF9DDA529"}';
  2391. $params = json_decode($body, true);
  2392. $provider = $this->getProvider('yuewen', 'RefillCallBack');
  2393. $ret = $provider->verify($params);
  2394. $resp = $provider->notify($params);
  2395. }
  2396. public function testMeixu_fs()
  2397. {
  2398. // $provider = $this->getProvider('meixu_fs');
  2399. // $resp = $provider->balance();
  2400. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' =>6]);
  2401. // $resp = $provider->query(['order_sn' => '65661668503421995249']);
  2402. $body = ' {"orderid":"GMJ22111517105484458","sporderid":"65661668503421995249","userid":"10003843","merchantsubmittime":"20221115171029","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.94","sign":"939AD149FABA7E1D85206195890F308F"}';
  2403. $params = json_decode($body, true);
  2404. $provider = $this->getProvider('meixu_fs', 'RefillCallBack');
  2405. $ret = $provider->verify($params);
  2406. $resp = $provider->notify($params);
  2407. }
  2408. public function testDazhanggui_fs_gd()
  2409. {
  2410. // $provider = $this->getProvider('dazhanggui_fs_gd');
  2411. // $resp = $provider->balance();
  2412. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2413. // $resp = $provider->query(['order_sn' => '85671668568809848159']);
  2414. $body = '{"szOrderId":"85671668568809848159","fSalePrice":"47.75","szAgentId":"200039","nFlag":"3","szVerifyString":"6f558a5f265d3993f60bf2727742caaf","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2415. $params = json_decode($body, true);
  2416. $provider = $this->getProvider('dazhanggui_fs_gd', 'RefillCallBack');
  2417. $ret = $provider->verify($params);
  2418. $resp = $provider->notify($params);
  2419. }
  2420. public function testQianqian_fs_gd()
  2421. {
  2422. // $provider = $this->getProvider('qianqian_fs_gd');
  2423. // $resp = $provider->balance();
  2424. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2425. // $resp = $provider->query(['order_sn' => '17721668570001406531']);
  2426. $body = '{"status":"019","orderNo":"F2211161140175529547","consumerNo":"17721668570001406531","mobile":"15811535608","voucherNo":"null","account":"wlyezhigdfs","timestamp":"1668570018003","sign":"f709d1f3e3fa0d527c2c3f0b7453c2d667b3d9c0"}';
  2427. $params = json_decode($body, true);
  2428. $provider = $this->getProvider('qianqian_fs_gd', 'RefillCallBack');
  2429. $ret = $provider->verify($params);
  2430. $resp = $provider->notify($params);
  2431. }
  2432. public function testMeixu_kami()
  2433. {
  2434. $provider = $this->getProvider('meixu_kami');
  2435. $resp = $provider->balance();
  2436. }
  2437. public function testYouhe_fs()
  2438. {
  2439. // $provider = $this->getProvider('youhe_fs');
  2440. // $resp = $provider->balance();
  2441. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2442. // $resp = $provider->query(['order_sn' => '42791668653632383737']);
  2443. $body = '{"szOrderId":"42791668653632383737","fSalePrice":"28.05","szAgentId":"200064","nFlag":"3","szVerifyString":"245107428fad62725a98e4f5022de830","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
  2444. $params = json_decode($body, true);
  2445. $provider = $this->getProvider('youhe_fs', 'RefillCallBack');
  2446. $ret = $provider->verify($params);
  2447. $resp = $provider->notify($params);
  2448. }
  2449. public function testHuishi()
  2450. {
  2451. // $provider = $this->getProvider('huishi');
  2452. // $resp = $provider->balance();
  2453. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2454. // $resp = $provider->query(['order_sn' => '34271668665589504035']);
  2455. $body = '{"timestamp":1668665604140,"sign":"1b83fd174b4f8d7f89384ff450162faa","api_key":"07onE26tNyaU","order_id":"34271668665589504035","status":6,"voucher":""}';
  2456. $params = json_decode($body, true);
  2457. $provider = $this->getProvider('huishi', 'RefillCallBack');
  2458. $ret = $provider->verify($params);
  2459. $resp = $provider->notify($params);
  2460. }
  2461. public function testYangchi()
  2462. {
  2463. // $provider = $this->getProvider('yangchi');
  2464. // $resp = $provider->balance();
  2465. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2466. // $resp = $provider->query(['order_sn' => '93291668743605489040']);
  2467. $body = '{"szOrderId":"93291668743605489040","fSalePrice":"48.3","szAgentId":"200035","nFlag":"3","szVerifyString":"bd51c3df1132ed84de92b46ee7f5743e","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2468. $params = json_decode($body, true);
  2469. $provider = $this->getProvider('yangchi', 'RefillCallBack');
  2470. $ret = $provider->verify($params);
  2471. $resp = $provider->notify($params);
  2472. }
  2473. public function testYangchi_fs()
  2474. {
  2475. // $provider = $this->getProvider('yangchi_fs');
  2476. // $resp = $provider->balance();
  2477. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 24]);
  2478. // $resp = $provider->query(['order_sn' => '43071668750406110934']);
  2479. $body = '{"szOrderId":"43071668750406110934","fSalePrice":"27.78","szAgentId":"200036","nFlag":"3","szVerifyString":"6b6f42600c07146d08c51b737487eafc","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  2480. $params = json_decode($body, true);
  2481. $provider = $this->getProvider('yangchi_fs', 'RefillCallBack');
  2482. $ret = $provider->verify($params);
  2483. $resp = $provider->notify($params);
  2484. }
  2485. public function testBier()
  2486. {
  2487. $provider = $this->getProvider('bier');
  2488. // $resp = $provider->balance();
  2489. // $phones = [
  2490. // 15811535608,
  2491. // 15136908757,
  2492. // 13683095937,
  2493. // 13699279618,
  2494. // 15811535608,
  2495. // 15136908757,
  2496. // 13683095937,
  2497. // 13699279618,
  2498. // 15811535608,
  2499. // 15136908757
  2500. // ];
  2501. // foreach ($phones as $phone)
  2502. // {
  2503. // $resp = $provider->add($phone, 4, 10, ['order_sn' => $this->make_sn()]);
  2504. // $result[] = $resp;
  2505. // }
  2506. $resp = $provider->query(['order_sn' => '77551669277530669853']);
  2507. $body = '{"status":"001","orderNo":"F2211241612105366466","consumerNo":"77551669277530669853","mobile":"13699279618","voucherNo":"2022112422001463431440964703","account":"lzyezi","timestamp":"1669277556001","sign":"b60774a793f882bb2e6bf77e9c2bf36299024cba"}';
  2508. $params = json_decode($body, true);
  2509. $provider = $this->getProvider('bier', 'RefillCallBack');
  2510. $ret = $provider->verify($params);
  2511. $resp = $provider->notify($params);
  2512. }
  2513. public function testBier_fs()
  2514. {
  2515. // $provider = $this->getProvider('bier_fs');
  2516. // $resp = $provider->balance();
  2517. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 13]);
  2518. // $resp = $provider->query(['order_sn' => '18361668755806837322']);
  2519. $body = '{"status":"027","orderNo":"F2211181516549189078","consumerNo":"18361668755806837322","mobile":"15811535608","voucherNo":"null","account":"yzfs1688","timestamp":"1668755817002","sign":"e44cadf815d0e2359f0872bce78a7628d0edbc98"}';
  2520. $params = json_decode($body, true);
  2521. $provider = $this->getProvider('bier_fs', 'RefillCallBack');
  2522. $ret = $provider->verify($params);
  2523. $resp = $provider->notify($params);
  2524. }
  2525. public function testLechongquan()
  2526. {
  2527. $provider = $this->getProvider('lechongquan');
  2528. $resp = $provider->balance();
  2529. }
  2530. public function testLechongYin()
  2531. {
  2532. $provider = $this->getProvider('lechongyin');
  2533. $resp = $provider->balance();
  2534. }
  2535. public function testYuewen_fs()
  2536. {
  2537. // $provider = $this->getProvider('yuewen_fs');
  2538. // $resp = $provider->balance();
  2539. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 24]);
  2540. // $resp = $provider->query(['order_sn' => '75631669258194223094']);
  2541. $body = '{"orderid":"JWX22112410509839637","sporderid":"75631669258194223094","userid":"10002703","merchantsubmittime":"20221124105321","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-46.6","sign":"6BFACD01F21C365F36E6FA6CC37ACB2F"}';
  2542. $params = json_decode($body, true);
  2543. $provider = $this->getProvider('yuewen_fs', 'RefillCallBack');
  2544. $ret = $provider->verify($params);
  2545. $resp = $provider->notify($params);
  2546. }
  2547. public function testBodian_dx()
  2548. {
  2549. $provider = $this->getProvider('bodian_dx');
  2550. $resp = $provider->balance();
  2551. }
  2552. public function testJumi_sec()
  2553. {
  2554. // $provider = $this->getProvider('jumi_sec', 'RefillOil');
  2555. // $resp = $provider->balance();
  2556. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  2557. // $resp = $provider->query(['order_sn' => '73491669603140334285']);
  2558. $body = '{"appid":"CZ27801384","order":"D20221128031516100180983","morder":"73491669603140334285","status":"3","cash":"100","signature":"1e0d2b0dbec37ebc4a8bd03f0afd03dc"}';
  2559. $params = json_decode($body, true);
  2560. $provider = $this->getProvider('jumi_sec', 'RefillCallBack');
  2561. $ret = $provider->verify($params);
  2562. $resp = $provider->notify($params);
  2563. }
  2564. public function testAmingjd()
  2565. {
  2566. // $provider = new refill\amingjd\RefillPhone([]);
  2567. // $resp = $provider->add(13699279618, 5, 30, ['order_sn' => $this->make_sn()]);
  2568. // $resp = $provider->query(['order_sn' => '42301616475989518588']);
  2569. $body = '{"order_id":"83321616478215494884","mchid":"10003","tel":"13699279618","price":"30.00","sign":"01c49620c155a80bc43cecc2b1651868","status":"0","out_order_id":"0"}';
  2570. $params = json_decode($body, true);
  2571. refill\RefillFactory::instance()->notify('amingjd', $params);
  2572. }
  2573. public function testAmingjdmanPhone()
  2574. {
  2575. $provider = new refill\amingjdman\RefillPhone([]);
  2576. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2577. // $resp = $provider->query(['order_sn' => '82741619577673758623']);
  2578. $body = '{"order_id":"82741619577673758623","mchid":"10045","tel":"13699279618","price":"30.00","sign":"2fe55fb4d4b2acc2e98137adb82fa57e","status":"0","out_order_id":"0"}';
  2579. $params = json_decode($body, true);
  2580. refill\RefillFactory::instance()->notify('amingjdman', $params);
  2581. }
  2582. public function testWeishengyWtPhone()
  2583. {
  2584. $provider = new refill\weishengywt\RefillPhone([]);
  2585. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2586. // $resp = $provider->query(['order_sn' => '27681620538125370652']);
  2587. $data = '{"szOrderId":"27681620538125370652","fSalePrice":"47.5","szAgentId":"200045","nFlag":"2","szVerifyString":"92fafec121b77518d539ed9f5005fdf9","szPhoneNum":"18500608333","szRtnMsg":"110103308032105091328520502948","nDemo":"50"}';
  2588. $params = json_decode($data, true);
  2589. refill\RefillFactory::instance()->notify('weishengywt', $params);
  2590. }
  2591. public function testWeishengyJDPhone()
  2592. {
  2593. $provider = new refill\weishengyjd\RefillPhone([]);
  2594. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2595. // $resp = $provider->query(['order_sn' => '14261620887423822879']);
  2596. $data = '{"szOrderId":"14261620887423822879","fSalePrice":"44.0","szAgentId":"200050","nFlag":"3","szVerifyString":"3cceef390602058e1d2fdde2e07636a4","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  2597. $params = json_decode($data, true);
  2598. refill\RefillFactory::instance()->notify('weishengyjd', $params);
  2599. }
  2600. public function testYeziPhone()
  2601. {
  2602. $provider = new refill\yezi\RefillPhone([]);
  2603. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2604. // $resp = $provider->query(['order_sn' => '35261620988265145105']);
  2605. $data = '{"mchid":"10147","order_sn":"35261620988265145105","amount":"50.00","cardno":"18500608333","trade_no":"6363570674332280422825","idcard":"","card_name":"","official_sn":"","message":"","state":"CANCEL","sign":"b79f2ddbb5b7eef98f414585a5bd2cde"}';
  2606. $params = json_decode($data, true);
  2607. refill\RefillFactory::instance()->notify('yezi', $params);
  2608. }
  2609. public function testWeishengysixPhone()
  2610. {
  2611. $provider = new refill\weishengysix\RefillPhone([]);
  2612. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2613. // $resp = $provider->query(['order_sn' => '17171624434289348649']);
  2614. $data = '{"szOrderId":"17171624434289348649","fSalePrice":"44.5","szAgentId":"200074","nFlag":"2","szVerifyString":"fa5735090199d97e6a50e7f3083be111","szPhoneNum":"18500608333","szRtnMsg":"AW2021062315464045A27","nDemo":"50"}';
  2615. $params = json_decode($data, true);
  2616. refill\RefillFactory::instance()->notify('weishengysix', $params);
  2617. }
  2618. public function testHaohaoOil()
  2619. {
  2620. $provider = new refill\haohao\RefillOil([]);
  2621. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  2622. $data['amount'] = 20000;
  2623. $data['mchId'] = 467253;
  2624. $data['mchOrderNo'] = '5514850674656058146707';
  2625. $data['mobile'] = '';
  2626. $data['sign'] = 'F282D68972A437F3CEB3516BB2FDD19A';
  2627. $data['operator'] = 4;
  2628. $data['number'] = '1000113200020348885';
  2629. $data['thirdOrderNo'] = '2317184088901537792';
  2630. $data['directStatus'] = 5;
  2631. // $input = json_decode($data, true);
  2632. refill\RefillFactory::instance()->notify('haohao',$data);
  2633. }
  2634. public function testJuzhuoOil()
  2635. {
  2636. $provider = new refill\juzhuo\RefillOil([]);
  2637. // $resp = $provider->add(1000111100021211884, 2, 200, ['order_sn' => $this->make_sn()]);
  2638. // $resp = $provider->query(['order_sn' => '20121621578185774451']);
  2639. // $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"}';
  2640. // $input = json_decode($data, true);
  2641. $data['channelsort'] = 'OIL_CARD';
  2642. $data['channelno'] = '';
  2643. $data['onlystr'] = '0772770675248490450497';
  2644. $data['channel'] = 'JD';
  2645. $data['sign'] = '4a9f113bfa4aa2d155de7136ca0afe2d';
  2646. $data['amt'] = '100';
  2647. $data['notifyurl'] = 'http://121.89.212.167/racc/callback/lingzh/juzhuo.php';
  2648. $data['cardtype'] = 'Sinoepc';
  2649. $data['cardno'] = '1000113200029532754';
  2650. $data['orgid'] = '6095171500';
  2651. $data['account'] = '';
  2652. $data['status'] = '3';
  2653. refill\RefillFactory::instance()->notify('juzhuo',$data);
  2654. }
  2655. public function testZeheng()
  2656. {
  2657. $provider = new refill\zeheng\RefillOil([]);
  2658. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  2659. // $resp = $provider->query(['order_sn' => '45951620814813332604']);
  2660. $data = '{"extOrderId":"45951620814813332604","orderId":"R2021051218240000192928","salePrice":"96.8000","sign":"0d6b9641eaf8d36ecba82cfefc6aa307","state":"4"}';
  2661. $input = json_decode($data, true);
  2662. refill\RefillFactory::instance()->notify('zeheng',$input);
  2663. }
  2664. public function testXiaoniu()
  2665. {
  2666. $provider = $this->getProvider('xiaoniu','RefillOil');
  2667. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 500, ['order_sn' => $this->make_sn()]);
  2668. $resp = $provider->query(['order_sn' => '15981632813532634860']);
  2669. // $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"}';
  2670. // $input = json_decode($data, true);
  2671. // refill\RefillFactory::instance()->notify('xiaoniu',$input);
  2672. // $resp = $provider->balance();
  2673. }
  2674. public function testYingdian()
  2675. {
  2676. $provider = $this->getProvider('yingdian','RefillOil');
  2677. $resp = $provider->balance();
  2678. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 200, ['order_sn' => $this->make_sn()]);
  2679. // $resp = $provider->query(['order_sn' => '94691626688509004979']);
  2680. // $resp = $provider->query(['order_sn' => '45671626687631917892']);
  2681. // $data = '{"orderNo":"94691626688509004979","vouchers":"[\"2421071918070053\"]","orderId":"63400811-e877-11eb-a89f-00163e147a9b","spOrderNo":"052423YK241720210719175503603473","status":"SUCCESS"}';
  2682. // $input = json_decode($data, true);
  2683. // refill\RefillFactory::instance()->notify('yingdian',$input);
  2684. }
  2685. public function testZhenqi()
  2686. {
  2687. $provider = new refill\zhenqi\RefillPhone([]);
  2688. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2689. // $resp = $provider->query(['order_sn' => '42611626267945146350']);
  2690. // $data = '{"out_trade_no":"14001626266194932132","create_time":"1626266201","sp_order_no":"110103353232107142044550619272","status":"1","sign":"3C2F8ED40EEB9151D2117E2DA1FA64AA"}';
  2691. // $input = json_decode($data, true);
  2692. // refill\RefillFactory::instance()->notify('zhenqi',$input);
  2693. $resp = $provider->balance();
  2694. }
  2695. public function testYunsuoyaofs()
  2696. {
  2697. $provider = new refill\yunsuoyaofs\RefillPhone([]);
  2698. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2699. // $resp = $provider->query(['order_sn' => '85681626322286098163']);
  2700. // $data = '{"orderid":"AMU21071512111544162","sporderid":"85681626322286098163","userid":"10002671","merchantsubmittime":"20210715121132","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.7","sign":"45ECFF26E84F7DC3BFFDCFAFF3B1E561"}';
  2701. // $input = json_decode($data, true);
  2702. // refill\RefillFactory::instance()->notify('yunsuoyaofs',$input);
  2703. $resp = $provider->balance();
  2704. }
  2705. public function testZhenqi1m()
  2706. {
  2707. $provider = new refill\zhenqi1m\RefillPhone([]);
  2708. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2709. // $resp = $provider->query(['order_sn' => '45611626334593130605']);
  2710. // $data = '{"out_trade_no":"45611626334593130605","create_time":"1626334606","sp_order_no":"202107152200117311004426885635","status":"1","sign":"CF8EB902F60B76591C898C991361BB4D"}';
  2711. // $input = json_decode($data, true);
  2712. // refill\RefillFactory::instance()->notify('zhenqi1m',$input);
  2713. $resp = $provider->balance();
  2714. }
  2715. public function testHongxudayz()
  2716. {
  2717. $provider = new refill\hongxudayz\RefillPhone([]);
  2718. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2719. // $resp = $provider->query(['order_sn' => '78221626445316011524']);
  2720. $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":""}';
  2721. $input = json_decode($data, true);
  2722. refill\RefillFactory::instance()->notify('hongxudayz',$input);
  2723. }
  2724. public function testHongxudagy()
  2725. {
  2726. $provider = new refill\hongxudagy\RefillPhone([]);
  2727. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2728. // $resp = $provider->query(['order_sn' => '86521626446475240639']);
  2729. // $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":""}';
  2730. // $input = json_decode($data, true);
  2731. // refill\RefillFactory::instance()->notify('hongxudagy',$input);
  2732. $resp = $provider->balance();
  2733. }
  2734. public function testHongxudayz996()
  2735. {
  2736. $provider = new refill\hongxudayz996\RefillPhone([]);
  2737. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2738. // $resp = $provider->query(['order_sn' => '73691626753698522472']);
  2739. $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":""}';
  2740. $input = json_decode($data, true);
  2741. refill\RefillFactory::instance()->notify('hongxudayz996',$input);
  2742. }
  2743. public function testHongxudagy996()
  2744. {
  2745. $provider = new refill\hongxudagy996\RefillPhone([]);
  2746. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2747. // $resp = $provider->query(['order_sn' => '87681626758209689412']);
  2748. $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":""}';
  2749. $input = json_decode($data, true);
  2750. refill\RefillFactory::instance()->notify('hongxudagy996',$input);
  2751. }
  2752. public function testYunchonggong()
  2753. {
  2754. // $provider = $this->getProvider('yunchonggong');
  2755. // $resp = $provider->balance();
  2756. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2757. // $resp = $provider->query(['order_sn' => '30391661237853787868']);
  2758. $body = '{"szOrderId":"30391661237853787868","fSalePrice":"28.8","szAgentId":"200005","nFlag":"3","szVerifyString":"5996f052094ed3c7655ed666d66b2804","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  2759. $params = json_decode($body, true);
  2760. $provider = $this->getProvider('yunchonggong', 'RefillCallback');
  2761. $ret = $provider->verify($params);
  2762. $resp = $provider->notify($params);
  2763. }
  2764. public function testBingdht()
  2765. {
  2766. $provider = new refill\bingdht\RefillPhone([]);
  2767. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2768. // $resp = $provider->query(['order_sn' => '62491626761331174794']);
  2769. // $data = '{"szOrderId":"62491626761331174794","fSalePrice":"45.25","szAgentId":"200044","nFlag":"3","szVerifyString":"46745191d31b16ee7978a7f5554357d6","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  2770. // $input = json_decode($data, true);
  2771. // refill\RefillFactory::instance()->notify('bingdht',$input);
  2772. $resp = $provider->balance();
  2773. }
  2774. public function testYuecheng()
  2775. {
  2776. $provider = new refill\yuecheng\RefillPhone([]);
  2777. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2778. // $resp = $provider->query(['order_sn' => '45101626776884387650']);
  2779. $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"}';
  2780. $input = json_decode($data, true);
  2781. refill\RefillFactory::instance()->notify('yuecheng',$input);
  2782. }
  2783. public function testPrice()
  2784. {
  2785. $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
  2786. $rate = 0.994;
  2787. foreach ($amounts as $amount) {
  2788. $price[] = $amount * $rate;
  2789. }
  2790. }
  2791. public function testCallbackDir()
  2792. {
  2793. $path = "/callback";
  2794. $file = "/mobile/callback/refill_call.php";
  2795. $basename = basename($file);
  2796. $tmp = "{$path}/{$basename}.php";
  2797. return file_exists($tmp);
  2798. }
  2799. public function testWeisPhone()
  2800. {
  2801. $provider = new refill\weisyd\RefillPhone([]);
  2802. $resp = $provider->add(17801048874, 4, 10, ['order_sn' => $this->make_sn()]);
  2803. }
  2804. public function testXcPhone()
  2805. {
  2806. $provider = new refill\xc\RefillPhone([]);
  2807. $resp = $provider->add(13699279618, 5, 100, ['order_sn' => $this->make_sn()]);
  2808. // $resp = $provider->query(['order_sn' => '87961616926444043617']);
  2809. $params['pay_orderid'] = '87961616926444043617';
  2810. $params['pay_iphone'] = '18500608333';
  2811. $params['pay_money'] = '100';
  2812. $params['wt_orderid'] = '202103281816121070';
  2813. $params['status'] = '1';
  2814. $params['sign'] = 'f7be2e859a5a6dc7b1a8273361617752';
  2815. // refill\RefillFactory::instance()->notify('xc',$params);
  2816. }
  2817. public function testAfandPhone()
  2818. {
  2819. $provider = new refill\afand\RefillPhone([]);
  2820. // for ($i = 3; $i > 0; --$i) {
  2821. $resp = $provider->query(['order_sn' => '540668612768904780']);
  2822. // }
  2823. }
  2824. public function testAfandengPhone()
  2825. {
  2826. $provider = new refill\afandeng\RefillPhone([]);
  2827. // for ($i = 5; $i > 0; --$i) {
  2828. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2829. // }
  2830. // $resp = $provider->query(['order_sn' => '20941616115610023539']);
  2831. // $params['usr'] = 'afandeng';
  2832. // $params['ord'] = '20941616115610023539';
  2833. // $params['state'] = '2';
  2834. // $params['bz'] = '';
  2835. // $params['sgn'] = 'BA2C9D379C3EB648A0B7AAB3A21A3F6A';
  2836. // refill\RefillFactory::instance()->notify('afandeng',$params);
  2837. }
  2838. public function testWantongPhone()
  2839. {
  2840. $provider = new refill\wantong\RefillPhone([]);
  2841. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2842. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2843. $resp = $provider->query(['order_sn' => '26061618988575301841']);
  2844. $data = '{"uid":"97396885","order_no":"26061618988575301841","mobile_order_no":"","phone_number":"13699279618","face_value":"3000","status":"9","sign":"1a019202656cf4feffe715025fab01bf"}';
  2845. $input = json_decode($data, true);
  2846. // refill\RefillFactory::instance()->notify('wantong',$input);
  2847. }
  2848. public function testXunyinPhone()
  2849. {
  2850. $provider = $this->getProvider('xunyin');
  2851. $resp = $provider->balance();
  2852. // $resp = $provider->add(17703711950, 6, 30, ['order_sn' => $this->make_sn()]);
  2853. // $resp = $provider->query(['order_sn' => '76831617176125893158']);
  2854. // $xml = '<Order><cpid>8417</cpid><orderid>40591617173295524057</orderid><order_no>14784226</order_no><msg>充值中</msg><Code>0000</Code><Cards/></Order>';
  2855. // $resp = $provider->xmlToArray($xml);
  2856. // if ($resp['Code'] === '0000') {
  2857. // return [true, $resp['order_no'], false];
  2858. // } else {
  2859. // return [false, $resp['msg'], false];
  2860. // }
  2861. // $params['ext'] = '';
  2862. // $params['code'] = '8888';
  2863. // $params['sign'] = '428ac223cf3a1f6f3d382aac754e8e17';
  2864. // $params['statemes'] = '成功';
  2865. // $params['id'] = '76831617176125893158';
  2866. // $params['userid'] = '8417';
  2867. // $params['operatorid'] = '1000000083421033115583773201';
  2868. // $params['status'] = 'SUCCESS';
  2869. // refill\RefillFactory::instance()->notify('xunyin',$params);
  2870. $resp = $provider->balance();
  2871. }
  2872. public function testFenshengPhone()
  2873. {
  2874. $file = BASE_HELPER_RAPI_PATH . "/qianqian/RefillPhone.php";
  2875. if(!file_exists($file)){
  2876. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  2877. return false;
  2878. } else {
  2879. require_once($file);
  2880. Log::record("file={$file} load success.",Log::DEBUG);
  2881. }
  2882. $provider = new refill\qianqian\RefillPhone([]);
  2883. $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2884. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  2885. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  2886. // $datas = json_decode($datas,true);
  2887. // foreach ($datas as $data) {
  2888. // refill\RefillFactory::instance()->notify('fensheng',$data);
  2889. // }
  2890. }
  2891. public function testQianqianPhone()
  2892. {
  2893. $provider = new refill\qianqian\RefillPhone([]);
  2894. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2895. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  2896. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  2897. // $datas = json_decode($datas,true);
  2898. // foreach ($datas as $data) {
  2899. // refill\RefillFactory::instance()->notify('fensheng',$data);
  2900. // }
  2901. $resp = $provider->balance();
  2902. }
  2903. public function testQianqianmanPhone()
  2904. {
  2905. $provider = new refill\qianqianman\RefillPhone([]);
  2906. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2907. // $resp = $provider->query(['order_sn' => '72011621236975003462']);
  2908. $data = '{"orderNo":"F2105171538062539442","status":"019","consumerNo":"72011621236975003462","voucherNo":null,"mobile":"13699279618"}';
  2909. $input = json_decode($data, true);
  2910. refill\RefillFactory::instance()->notify('qianqianman',$input);
  2911. }
  2912. public function testRiyingPhone()
  2913. {
  2914. $provider = new refill\riying\RefillPhone([]);
  2915. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2916. $resp = $provider->query(['ch_trade_no' => '2021041311120213187423105022']);
  2917. $data = '{"UserId":"10050","SysOrderId":"2021041311120213187423105022","OrderId":"15641618283518423567","State":"4","Timestamp":"1618283565746","VoucherType":"1","VoucherContent":"511009928000087852","Sign":"a6ec70a3ea42baae941528398c6d0a43"}';
  2918. $input = json_decode($data, true);
  2919. // refill\RefillFactory::instance()->notify('riying',$input);
  2920. }
  2921. public function testWeishengyPhone()
  2922. {
  2923. $provider = new refill\weishengy\RefillPhone([]);
  2924. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2925. // $resp = $provider->query(['order_sn' => '15551618590601301527']);
  2926. $data = '{"masId":"699270071532654592","oids":"158877719094,166090529155,158887187476","orderNo":"62411618635377880788","orderPrice":"150.00","phone":"18500608333","sign":"3EC10A32FC4CCC976048E1164D0FCBF6","status":"1","time":"1618643281063","type":"2"}';
  2927. $input = json_decode($data, true);
  2928. refill\RefillFactory::instance()->notify('weishengy',$input);
  2929. }
  2930. public function testWailingPhone()
  2931. {
  2932. $provider = new refill\wailing\RefillPhone([]);
  2933. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2934. $resp = $provider->query(['order_sn' => '73241618543784045618']);
  2935. $data = '{"order_id":"73241618543784045618","mchid":"10045","tel":"13699279618","price":"30.00","sign":"4991de3e40f14c198b8c194455ea021b","status":"0","out_order_id":"0"}';
  2936. $input = json_decode($data, true);
  2937. // refill\RefillFactory::instance()->notify('wailing',$input);
  2938. }
  2939. public function testShengyingPhone()
  2940. {
  2941. $provider = new refill\shengying\RefillPhone([]);
  2942. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2943. $resp = $provider->query(['order_sn' => '37571618805115582483']);
  2944. $data = '{"TaskID":"129636","Mobile":"13699279618","Status":"4","ReportTime":"2021-04-19T12:06:16.050","ReportCode":"1:511531522026586295","OutTradeNo":"37571618805115582483","ReceiptNum":"511531522026586295","Sign":"a7f46a988bc8483091d94130804e5078"}';
  2945. $input = json_decode($data, true);
  2946. // refill\RefillFactory::instance()->notify('shengying',$input);
  2947. }
  2948. public function testYunlingPhone()
  2949. {
  2950. $provider = new refill\yunling\RefillPhone([]);
  2951. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2952. // $resp = $provider->query(['order_sn' => '73791623147517199719']);
  2953. // $data = '{"orderid":"EAF21060818183032772","sporderid":"73791623147517199719","userid":"10002504","merchantsubmittime":"20210608181912","resultno":"1","parvalue":"30","remark1":"1000000083421060818483137636","payno":"1000000083421060818483137636","fundbalance":"-28.59","sign":"8D77517AC3905ED88BF79EE789A5FA86"}';
  2954. // $input = json_decode($data, true);
  2955. // refill\RefillFactory::instance()->notify('yunling',$input);
  2956. $resp = $provider->balance();
  2957. }
  2958. public function testZhongstPhone()
  2959. {
  2960. // $provider = $this->getProvider('zhongst');
  2961. // $resp = $provider->balance();
  2962. // $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn()]);
  2963. // $resp = $provider->query(['order_sn' => '14941642477572151012']);
  2964. $body = '{"orderId":"220118114638207211","appId":"Jab1HfumVk","outOrderId":"14941642477572151012","sign":"4e594f9c541667ea5f07c509993932fb","orderStatus":"2","completeTime":"20220118115013","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"110103308212201181148550490052"}';
  2965. $params = json_decode($body, true);
  2966. $provider = $this->getProvider('zhongst','RefillCallBack');
  2967. $ret = $provider->verify($params);
  2968. $resp = $provider->notify($params);
  2969. }
  2970. public function testXunaoPhone()
  2971. {
  2972. $provider = new refill\xunao\RefillPhone([]);
  2973. // $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  2974. // $resp = $provider->query(['order_sn' => '40021619431386253803', 'card_no' => 18074608795, 'card_type' => 6]);
  2975. // $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"}';
  2976. // $input = json_decode($data, true);
  2977. // refill\RefillFactory::instance()->notify('xunao',$input);
  2978. $resp = $provider->balance();
  2979. }
  2980. public function testYonghePhone()
  2981. {
  2982. $provider = new refill\yonghe\RefillPhone([]);
  2983. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2984. // $resp = $provider->query(['order_sn' => '20461619597297972685']);
  2985. // $data = '{"szOrderId":"20461619597297972685","fSalePrice":"29.955","szAgentId":"200115","nFlag":"2","szVerifyString":"b5c292a13c5e67a9b850eb37239682ae","szPhoneNum":"13699279618","szRtnMsg":"2021042822001139701437383521","nDemo":"30"}';
  2986. // $input = json_decode($data, true);
  2987. // refill\RefillFactory::instance()->notify('yonghe',$input);
  2988. $resp = $provider->balance();
  2989. }
  2990. public function testJumiPhone()
  2991. {
  2992. $provider = new refill\jumikc\RefillPhone([]);
  2993. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2994. // $resp = $provider->query(['order_sn' => '12161619768293529384']);
  2995. // $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"}';
  2996. // $input = json_decode($data, true);
  2997. // refill\RefillFactory::instance()->notify('jumi',$input);
  2998. $resp = $provider->balance();
  2999. }
  3000. public function testJumiOil()
  3001. {
  3002. $provider = new refill\jumi\RefillOil([]);
  3003. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  3004. // $resp = $provider->query(['order_sn' => '29021620617872685187']);
  3005. $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"}';
  3006. $input = json_decode($data, true);
  3007. refill\RefillFactory::instance()->notify('jumi',$input);
  3008. }
  3009. public function testFengyePhone()
  3010. {
  3011. $provider = new refill\fengye\RefillPhone([]);
  3012. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  3013. // $resp = $provider->query(['order_sn' => '53511620355988978053', 'card_no' => 18074608795, 'card_type' => 6]);
  3014. $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"}';
  3015. $input = json_decode($data, true);
  3016. refill\RefillFactory::instance()->notify('fengye',$input);
  3017. }
  3018. public function testYunsuoyaoPhone()
  3019. {
  3020. $provider = new refill\yunsuoyao\RefillPhone([]);
  3021. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3022. // $resp = $provider->query(['order_sn' => '20431621331092296201']);
  3023. // $data = '{"orderid":"RLU21051817441937847","sporderid":"20431621331092296201","userid":"10002501","merchantsubmittime":"20210518174858","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.74","sign":"426EAC103B79505BAE7AB3F16886F1A8"}';
  3024. // $input = json_decode($data, true);
  3025. // refill\RefillFactory::instance()->notify('yunsuoyao',$input);
  3026. $resp = $provider->balance();
  3027. }
  3028. public function testAfdPhone()
  3029. {
  3030. $provider = new refill\afd\RefillPhone([]);
  3031. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3032. // $resp = $provider->query(['order_sn' => '71001621233525947994']);
  3033. $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"}';
  3034. $input = json_decode($data, true);
  3035. refill\RefillFactory::instance()->notify('afd',$input);
  3036. }
  3037. public function testLuqianPhone()
  3038. {
  3039. $provider = new refill\luqian\RefillPhone([]);
  3040. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  3041. $resp = $provider->query(['order_sn' => '2829660672500596314764']);
  3042. $data = '{"amount":"100","charge_type":"0","code":"1","partner_id":"38","phone":"18500608333","sign":"c2c86cccc73fa991a63c369e683c91f2","partner_order_no":"34101618897099329575","official_order_id":"110103308072104201338340278420"}';
  3043. $input = json_decode($data, true);
  3044. // refill\RefillFactory::instance()->notify('luqian',$input);
  3045. }
  3046. public function testAfandfsPhone()
  3047. {
  3048. $provider = new refill\afandfs\RefillPhone([]);
  3049. // $resp = $provider->add(15139608757, 4, 30, ['order_sn' => $this->make_sn()]);
  3050. // $resp = $provider->query(['order_sn' => '65101618975926761630']);
  3051. // $data = '{"amount":"30","charge_type":"2","code":"1","partner_id":"52","phone":"15139608757","sign":"a7f54c1ac3e1af72f9fc849086cc4bec","partner_order_no":"65101618975926761630","official_order_id":"20210421113256628350"}';
  3052. // $input = json_decode($data, true);
  3053. // refill\RefillFactory::instance()->notify('afandfs',$input);
  3054. $resp = $provider->balance();
  3055. }
  3056. public function testYunlingfsPhone()
  3057. {
  3058. $provider = $this->getProvider('yunlingfs');
  3059. $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  3060. // $resp = $provider->query(['order_sn' => '79251623739433607563']);
  3061. // $data = '{"orderid":"BGC21061514434393910","sporderid":"79251623739433607563","userid":"10002543","merchantsubmittime":"20210615144434","resultno":"1","parvalue":"50","remark1":"20210615144420321813","payno":"20210615144420321813","fundbalance":"-47.65","sign":"6B9B7C15A3F9CBC773562327B6744B1E"}';
  3062. // $input = json_decode($data, true);
  3063. // refill\RefillFactory::instance()->notify('yunlingfs',$input);
  3064. // $resp = $provider->balance();
  3065. }
  3066. public function testTianchengPhone()
  3067. {
  3068. $provider = new refill\tiancheng\RefillPhone([]);
  3069. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  3070. // $resp = $provider->query(['order_sn' => '15301619399212504464']);
  3071. // $data = ' {"result":"fail","msg":"0","order":"null","phone_no":"13699279618","amount":"10","op_no":"84801619340283980506","settle":"0","sign":"D64039ED791920B08BDA9DD95700C0E6"}';
  3072. // $input = json_decode($data, true);
  3073. // refill\RefillFactory::instance()->notify('tiancheng',$input);
  3074. $resp = $provider->balance();
  3075. }
  3076. public function testLingzhPhone()
  3077. {
  3078. $provider = new refill\lingzh\RefillPhone([]);
  3079. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  3080. // $resp = $provider->query(['order_sn' => '59911615124025101286']);
  3081. $resp = $provider->balance();
  3082. // $input['usr'] = 1;
  3083. // $input['ord'] = '52741615119546453690';
  3084. // $input['bz'] = '';
  3085. // $input['state'] = 2;
  3086. // $input['sgn'] = 'FFCBB75C307154DD306F4EC75BB69A6D';
  3087. // refill\RefillFactory::instance()->notify('lingzh',$input);
  3088. }
  3089. public function testAfandnewPhone()
  3090. {
  3091. $provider = new refill\afandnew\RefillPhone([]);
  3092. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  3093. // $resp = $provider->query(['order_sn' => '45371617101073876975', 'ch_trade_no' => '33018443659736309']);
  3094. $params = '{"amount":"100","carrierOrderNo":null,"mobile":"18500608333","orderNo":"45371617101073876975","orderStatus":3,"sign":"8DE392AD6B4730AD9EE0FC2B95BBDF17","tradeNo":"33018443659736309"}';
  3095. $input = json_decode($params, true);
  3096. refill\RefillFactory::instance()->notify('afandnew', $input);
  3097. }
  3098. public function testYifaPhone()
  3099. {
  3100. $provider = new refill\yifa\RefillPhone([]);
  3101. $resp = $provider->add(15120035568, 5, 50, ['order_sn' => $this->make_sn()]);
  3102. }
  3103. public function testTianjtOil()
  3104. {
  3105. $cardno = 1000111100021211884;
  3106. $provider = new refill\tianjt\RefillOil([]);
  3107. $resp = $provider->add($cardno, 2, 500, ['order_sn' => $this->make_sn()]);
  3108. }
  3109. public function testWeitPhone()
  3110. {
  3111. $provider = new refill\weit\RefillPhone([]);
  3112. for ($i = 0; $i <= 10; $i++) {
  3113. $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  3114. }
  3115. }
  3116. public function testWeitCB()
  3117. {
  3118. $params['sign'] = 'af820c33472f4b571fa0c48483dfb975';
  3119. $params['status'] = 0;
  3120. $params['price'] = 30;
  3121. $params['op_order_id'] = '';
  3122. $params['mch_order_id'] = '900664281823957221';
  3123. $params['pt_order_id'] = '2021011802434412825405218901';
  3124. $params['pay_type'] = '';
  3125. $params['tel'] = 18500608333;
  3126. $params['mchid'] = 10014;
  3127. $resp = http_request($this->mReqHost . "/mobile/refill_weit.php", $params, 'POST');
  3128. }
  3129. public function testYifaCB()
  3130. {
  3131. $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"}';
  3132. $input = json_decode($body, true);
  3133. refill\RefillFactory::instance()->notify('yifa', $input);
  3134. }
  3135. public function testBjbQuery()
  3136. {
  3137. $provider = new refill\bjb\RefillPhone([]);
  3138. $refill_info = ['order_sn' => 110667993758599771, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3139. $resp = $provider->query($refill_info);
  3140. }
  3141. public function testXcQuery()
  3142. {
  3143. $provider = new refill\xc\RefillPhone([]);
  3144. $refill_info = ['order_sn' => 950663423236726632, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3145. $resp = $provider->query($refill_info);
  3146. }
  3147. public function testTianjtQuery()
  3148. {
  3149. $provider = new refill\tianjt\RefillOil([]);
  3150. $refill_info = ['order_sn' => 680665862267622221, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3151. $resp = $provider->query($refill_info);
  3152. }
  3153. public function testSaihuOil()
  3154. {
  3155. $provider = new refill\saihu\RefillOil([]);
  3156. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  3157. }
  3158. public function testBdtOil()
  3159. {
  3160. $provider = new refill\bdt\RefillOil([]);
  3161. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => '200229600556618886']);
  3162. }
  3163. public function testGFTDOil()
  3164. {
  3165. $provider = new refill\gftd\RefillOil([]);
  3166. $resp = $provider->add(1000111100020445281, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  3167. }
  3168. public function testYichangtOil()
  3169. {
  3170. $provider = $this->getProvider('yichangt','RefillOil');
  3171. // $resp = $provider->balance();
  3172. $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 50, ['order_sn' => $this->make_sn()]);
  3173. // $resp = $provider->query(['order_sn' => '86471642400354465488']);
  3174. }
  3175. public function testYichangt_hf()
  3176. {
  3177. $provider = $this->getProvider('yichangt_hf');
  3178. // $resp = $provider->balance();
  3179. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3180. // $resp = $provider->query(['order_sn' => '33161643533975771522']);
  3181. }
  3182. public function testYichangt_doubi()
  3183. {
  3184. $provider = $this->getProvider('yichangt_doubi');
  3185. // $resp = $provider->balance();
  3186. // $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'];
  3187. $card_no = ['WK6788','575547903','1249835915','1943707492','LYYY520999','a88254587','45871584136','1877477562','1983377511','22291865790','1617206604','yy8672','1179363707','1770307081','Kurama..','Kakin0821','linxiaomi882','996407176','dyoehdm1c5sm'];
  3188. foreach ($card_no as $no)
  3189. {
  3190. $order_sn = $this->make_sn();
  3191. $resp = $provider->add($no, mtopcard\ThirdRefillCard, 100, ['order_sn' => $order_sn]);
  3192. $order_sns[] = $order_sn;
  3193. }
  3194. $order_sns = json_encode($order_sns);
  3195. Log::record("{$order_sns}");
  3196. // $resp = $provider->query(['order_sn' => '78111640843635846927']);
  3197. }
  3198. public function testGFTDCB()
  3199. {
  3200. $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","storage":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
  3201. $url = "http://192.168.1.220/mobile/refill_gftd.php?" . $data;
  3202. $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
  3203. }
  3204. public function testJiecPhone()
  3205. {
  3206. $provider = new refill\jiec\RefillPhone([]);
  3207. $resp = $provider->add('18500608333', 5, 30, ['order_sn' => $this->make_sn()]);
  3208. }
  3209. public function testBxtwtCB()
  3210. {
  3211. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  3212. }
  3213. public function testTianjtJDVerify()
  3214. {
  3215. $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';
  3216. $url = "http://192.168.1.220/mobile/refill_tianjt.php?" . $data;
  3217. $resp = http_request($url);
  3218. }
  3219. public function testSuhcPDD()
  3220. {
  3221. $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';
  3222. $url = "https://www.xyzshops.cn/mobile/refill_suhcpdd.php?" . $data;
  3223. $resp = http_request($url);
  3224. }
  3225. public function testSuhcTMVerify()
  3226. {
  3227. $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';
  3228. $url = "https://www.xyzshops.cn/mobile/refill_suhctm.php?" . $data;
  3229. $resp = http_request($url);
  3230. }
  3231. public function testBeixtVerify()
  3232. {
  3233. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  3234. $url = "https://www.xyzshops.cn/mobile/refill_bxtwt.php";
  3235. $headers = ['Content-Type: application/json'];
  3236. $resp = http_post_data($url, $data, $headers);
  3237. }
  3238. public function testInput()
  3239. {
  3240. $input = fopen("php://input", "rw");
  3241. file_put_contents($input, 'xxxx');
  3242. $content = file_get_contents('php://input');
  3243. }
  3244. public function testUrl()
  3245. {
  3246. $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';
  3247. $params = preg_split('/&/', $data);
  3248. foreach ($params as $pair) {
  3249. $kv = explode('=', $pair);
  3250. $count = count($kv);
  3251. if ($count === 1) {
  3252. $key = $kv[0];
  3253. $val = "";
  3254. } elseif ($count === 2) {
  3255. $key = $kv[0];
  3256. $val = $kv[1];
  3257. } else {
  3258. continue;
  3259. }
  3260. Log::record("{$key}:{$val}", Log::DEBUG);
  3261. }
  3262. }
  3263. public function testAddoil()
  3264. {
  3265. $url = $this->mReqHost . "/mobile/index.php";
  3266. $notifyurl = 'http://121.89.196.45/mobile/signature.php';
  3267. $params = ['mchid' => $this->mMchid,
  3268. 'cardno' => '1000111100020445281',
  3269. 'amount' => "100",
  3270. "act" => "refill",
  3271. "op" => "add",
  3272. 'order_sn' => $this->make_sn(),
  3273. 'notifyurl' => $notifyurl];
  3274. $resp = $this->send_md5($url, $params);
  3275. Log::record($resp, Log::DEBUG);
  3276. }
  3277. public function testBalance()
  3278. {
  3279. $url = $this->mReqHost . "/mobile/index.php";
  3280. $params = ['mchid' => 1092,
  3281. "act" => "refill",
  3282. "op" => "balance"];
  3283. $resp = $this->send_md5($url, $params);
  3284. Log::record($resp, Log::DEBUG);
  3285. }
  3286. public function testNotify()
  3287. {
  3288. $params = [
  3289. "mchid" => 10202,
  3290. "order_sn" => '21090216132600003_11675',
  3291. "amount" => '30.00',//intval($refill_info['refill_amount'] + 0.05),
  3292. "cardno" => 18639492164,
  3293. "trade_no" => 8693160683914496896438,
  3294. "idcard" => "",
  3295. "card_name" => "",
  3296. 'official_sn' => "",
  3297. 'message' => "匹配不到合适的充值通道",
  3298. "state" => 'CANCEL'];
  3299. $sign = $this->md5_sign($params,'KxK9f3yaBDOXVwvuOKDozvQ9Mt1CoqRX');
  3300. $notify_url = 'https://openapi-gateway-test.bbinsure.cn/ants_charge/v1/charge/order/notify/yeziOrderNew/1140';
  3301. $resp = http_request($notify_url, $params, 'POST');
  3302. }
  3303. public function testAddPhoe()
  3304. {
  3305. $url = $this->mReqHost . "/mobile/index.php";
  3306. $params = ['mchid' => $this->mMchid,
  3307. 'cardno' => '',
  3308. 'amount' => 100,
  3309. "act" => "refill",
  3310. "op" => "add",
  3311. 'order_sn' => '',
  3312. 'notifyurl' => "https://www.baoyung.com/api/unionservice/yezicharge"];
  3313. Log::record(json_encode($params), Log::DEBUG);
  3314. // $resp = $this->send_md5($url, $params);
  3315. }
  3316. public function testProxyHelper()
  3317. {
  3318. $phone = '13911129867';
  3319. $amount = 100;
  3320. $url = $this->mReqHost . "/mobile/index.php";
  3321. $params = ['mchid' => $this->mMchid,
  3322. 'cardno' => $phone,
  3323. 'amount' => $amount,
  3324. "act" => "refill",
  3325. "op" => "add",
  3326. 'order_sn' => $this->make_sn(),
  3327. 'notifyurl' => "https://xxx"];
  3328. $proxy = new refill_proxy("xxx");
  3329. $resp = $proxy->send($url, $params);
  3330. }
  3331. public function testGoods()
  3332. {
  3333. $req_url = $this->mReqHost . '/mobile/index.php';
  3334. $params = ['mchid' => $this->mMchid,
  3335. "act" => "refill",
  3336. "op" => "goods"];
  3337. $resp = $this->send_md5($req_url, $params);
  3338. }
  3339. public function testQueryFactory()
  3340. {
  3341. refill\RefillFactory::instance()->query(295);
  3342. }
  3343. public function testQuery()
  3344. {
  3345. //$req_url = 'https://www.xyzshops.cn/mobile/index.php';
  3346. // $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  3347. $req_url = BASE_SITE_URL . '/mobile/index.php';
  3348. $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
  3349. $params = ['mchid' => 1,
  3350. "act" => "refill",
  3351. "op" => "query",
  3352. 'order_sn' => "13281476"];
  3353. $resp = $this->send_md5($req_url, $params);
  3354. }
  3355. public function testRemoveSession()
  3356. {
  3357. $resp = http_request(BASE_SITE_URL . "/mobile/signature.php", [], 'POST');
  3358. }
  3359. public function testTianjtCB()
  3360. {
  3361. // $notifyurl = BASE_SITE_URL . "/mobile/refill_tianjt.php";
  3362. $notifyurl = "https://www.xyzshops.cn/mobile/refill_tianjt.php";
  3363. // $notifyurl = "https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_tianjt.php";
  3364. $params = ['onlystr' => '690665858589475818',
  3365. 'amt' => 1000,
  3366. 'jdno' => '',
  3367. 'notifyurl' => $notifyurl,
  3368. 'cardtype' => 'Sinoepc',
  3369. 'batchid' => 30589,
  3370. 'cardno' => '1000113300007993287',
  3371. 'orgid' => '1590993600',
  3372. 'status' => 3];
  3373. $sign = $this->md5_sign($params);
  3374. $params['sign'] = $sign;
  3375. $resp = http_request($notifyurl, $params, 'POST');
  3376. Log::record($resp, Log::DEBUG);
  3377. }
  3378. public function testBJBCB()
  3379. {
  3380. $params = [
  3381. 'usr' => '13699279618',
  3382. 'ord' => '710662733975412771',
  3383. 'state' => '2',
  3384. 'bz' => '',
  3385. 'sgn' => 'AC9AFD254DE682D8440A97CA68B992DA'
  3386. ];
  3387. $resp = http_request("https://www.xyzshops.cn/mobile/refill_bjb.php", $params, 'POST');
  3388. }
  3389. public function testJiecCB()
  3390. {
  3391. $params['result'] = 'fail';
  3392. $params['msg'] = '0';
  3393. $params['order'] = 'null';
  3394. $params['phone_no'] = '18500608333';
  3395. $params['amount'] = '30.00';
  3396. $params['op_no'] = '800663597981819221';
  3397. $params['sign'] = '2510046895e8e12322c8a32547905ee9';
  3398. $resp = http_request($this->mReqHost . "/mobile/refill_jiec.php", $params, 'POST');
  3399. }
  3400. public function testZFKJ()
  3401. {
  3402. //带签名参数:mchid=1090&act=refill&op=add&cardno=100112121212212133
  3403. //&amount=10&order_sn=PH2012261356569433&
  3404. //notifyurl=https%3A%2F%2Fqzcz.edusahoo.com.cn%2Findex%2Findex%2Fcallback
  3405. //&sign=4a3ac5f9706e64aa70c6cab0fc5839d3
  3406. $params = ['mchid' => 1090,
  3407. 'cardno' => '100112121212212133',
  3408. 'amount' => '10',
  3409. "act" => "refill",
  3410. "op" => "add",
  3411. 'order_sn' => 'PH2012261356569433',
  3412. 'notifyurl' => 'https://qzcz.edusahoo.com.cn/index/index/callback'];
  3413. $resp = $this->send_md5(BASE_SITE_URL . '/mobile/index.php', $params);
  3414. }
  3415. protected function check_empty($value)
  3416. {
  3417. if (!isset($value))
  3418. return true;
  3419. if ($value === null)
  3420. return true;
  3421. if (trim($value) === "")
  3422. return true;
  3423. return false;
  3424. }
  3425. public function testcreateSign()
  3426. {
  3427. $params['act'] = 'refill';
  3428. $params['amount'] = '30';
  3429. $params['cardno'] = '18111516552';
  3430. $params['mchid'] = '10179';
  3431. $params['notifyurl'] = 'http://czapi2.1jinb.net/YeZiHCCallBackOrderServlet';
  3432. $params['op'] = 'add';
  3433. $params['order_sn'] = 'JFNOR10835056877';
  3434. $sign = $this->md5_sign($params);
  3435. }
  3436. public function testCheckphone()
  3437. {
  3438. $check = function ($phone) {
  3439. $url = 'https://mobileempty.shumaidata.com/mobileempty';
  3440. $params['mobile'] = $phone;
  3441. $headers = array();
  3442. array_push($headers, "Authorization:APPCODE " . '8f92d951293f4d2ea48ff86d5a70c537');
  3443. $resp = http_request($url, $params, 'GET', false, $headers);
  3444. $resp = json_decode($resp, true);
  3445. if ($resp['success'] == true && $resp['code'] == 200) {
  3446. Log::record("data phone:{$phone} , status : {$resp['data']['status']}", Log::DEBUG);
  3447. if (in_array($resp['data']['status'], [0, 3, 4, 5])) {
  3448. return false;
  3449. }
  3450. } else {
  3451. Log::record("data phone:{$phone} , 不支持的号段", Log::DEBUG);
  3452. }
  3453. };
  3454. $check(17801048874);
  3455. }
  3456. public function testCtSign()
  3457. {
  3458. $params['act'] = 'refill';
  3459. $params['op'] = 'add';
  3460. $params['mchid'] = '10198';
  3461. $params['cardno'] = '18696902060';
  3462. $params['amount'] = '30';
  3463. $params['order_sn'] = '163782007236900000878';
  3464. $params['notifyurl'] = 'http://open.apiwater.xyz:20801/';
  3465. $sign = $this->md5_sign($params,'b9b30f57eac34a398a7534021fa23a16');
  3466. }
  3467. private function md5_sign($params,$key = '')
  3468. {
  3469. ksort($params);
  3470. $body = "";
  3471. $i = 0;
  3472. foreach ($params as $k => $v) {
  3473. if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
  3474. if ($i == 0) {
  3475. $body .= "{$k}" . "=" . urlencode($v);
  3476. } else {
  3477. $body .= "&" . "{$k}" . "=" . urlencode($v);
  3478. }
  3479. $i++;
  3480. }
  3481. }
  3482. $body .= "&key={$key}";
  3483. return md5($body);
  3484. }
  3485. public function testCallMech()
  3486. {
  3487. $logic = Logic('queue');
  3488. $logic->NotifyMerchantComplete(['order_id' => 18171, 'manual' => true]);
  3489. }
  3490. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCallMech)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  3491. private function send($url, $params)
  3492. {
  3493. $mchid = $params['mchid'];
  3494. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  3495. $key = file_get_contents($pri_key);
  3496. $pri = openssl_get_privatekey($key);
  3497. $body = $this->body($params);
  3498. openssl_sign($body, $signed, $pri);
  3499. $sign = base64_encode($signed);
  3500. $params['sign'] = $sign;
  3501. $resp = http_request($url, $params, 'POST');
  3502. Log::record("resp:{$resp}", Log::DEBUG);
  3503. }
  3504. private function send_md5($url, $params)
  3505. {
  3506. $body = $this->body($params);
  3507. $body .= "&key={$this->mKey}";
  3508. $params['sign'] = md5($body);
  3509. $resp = http_request($url, $params, 'POST');
  3510. Log::record("resp:{$resp}", Log::DEBUG);
  3511. return $resp;
  3512. }
  3513. public function testCardType()
  3514. {
  3515. $cardno = '1000111100021211884';
  3516. $ret = preg_match('/^1[0-9]{18}$/', $cardno, $matches);
  3517. }
  3518. public function testMtrand()
  3519. {
  3520. }
  3521. public function testHttpRefill()
  3522. {
  3523. $mchid = '000001';
  3524. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  3525. $key = file_get_contents($pri_key);
  3526. $pri = openssl_get_privatekey($key);
  3527. $params = ['MCHID' => $mchid, 'cardno' => '1000111100021211884', 'amt' => "100", "act" => "refill", "op" => "addoil"];
  3528. $body = $this->body($params);
  3529. openssl_sign($body, $signed, $pri);
  3530. $sign = base64_encode($signed);
  3531. $params['sign'] = $sign;
  3532. $resp = http_request(BASE_SITE_URL . "/mobile/index.php", $params, 'POST');
  3533. }
  3534. private function body($params)
  3535. {
  3536. ksort($params);
  3537. $body = "";
  3538. $i = 0;
  3539. foreach ($params as $k => $v) {
  3540. if (false === $this->checkEmpty($v) && "@" != substr($v, 0, 1)) {
  3541. if ($i == 0) {
  3542. $body .= "{$k}" . "=" . urlencode($v);
  3543. } else {
  3544. $body .= "&" . "{$k}" . "=" . urlencode($v);
  3545. }
  3546. $i++;
  3547. }
  3548. }
  3549. return $body;
  3550. }
  3551. private function checkEmpty($value)
  3552. {
  3553. if (!isset($value))
  3554. return true;
  3555. if ($value === null)
  3556. return true;
  3557. if (trim($value) === "")
  3558. return true;
  3559. return false;
  3560. }
  3561. public function testKsort()
  3562. {
  3563. $age = ["Peter" => "35", "Ben" => "37", "Joe" => "43"];
  3564. ksort($age);
  3565. foreach ($age as $x => $x_value) {
  3566. echo "Key=" . $x . ", Value=" . $x_value;
  3567. echo "<br>";
  3568. }
  3569. }
  3570. public function testip()
  3571. {
  3572. $model_merchant = Model('merchant');
  3573. $merchant_info = $model_merchant->getMerchantInfo(['mchid' => 1]);
  3574. $ipwhitelist = unserialize($merchant_info['ip_white_list']);
  3575. $res = json_encode($ipwhitelist);
  3576. }
  3577. //测试向内部店提交订单,可先屏蔽其它充值通道
  3578. public function testAddoilToInnerStore()
  3579. {
  3580. $url = $this->mReqHost . "/mobile/index.php";
  3581. $notifyurl = BASE_SITE_URL . '/mobile/signature.php';
  3582. $params = ['mchid' => 1,
  3583. 'cardno' => '1000111100020445281',
  3584. 'amount' => "1000",
  3585. "act" => "refill",
  3586. "op" => "add",
  3587. 'order_sn' => $this->make_sn(),
  3588. 'notifyurl' => $notifyurl];
  3589. $resp = $this->send_md5($url, $params);
  3590. Log::record($resp, Log::DEBUG);
  3591. }
  3592. public function testRefillInnerCB()
  3593. {
  3594. $params = ['state_type' => 'order_cancel', 'order_id' => 311, 'channel_name' => 'lx'];
  3595. $resp = http_request(BASE_SITE_URL . '/mobile/refill_inner.php', $params, 'POST');
  3596. }
  3597. public function testArgs()
  3598. {
  3599. Log::record($_SERVER['argv'], Log::DEBUG);
  3600. }
  3601. public function testCall()
  3602. {
  3603. $order_id = 14974;
  3604. QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true], 10);
  3605. }
  3606. public function testSyncconfig()
  3607. {
  3608. $name_val_cfg = function ($items) {
  3609. $result = [];
  3610. foreach ($items as $item) {
  3611. $name = $item->name();
  3612. $result[$name] = $item;
  3613. }
  3614. return $result;
  3615. };
  3616. $name_val_row = function ($items) {
  3617. $result = [];
  3618. foreach ($items as $item) {
  3619. $name = $item['name'];
  3620. $result[$name] = $item;
  3621. }
  3622. return $result;
  3623. };
  3624. $match = function ($all, $cur) {
  3625. $insert = [];
  3626. foreach ($all as $key => $value) {
  3627. if (!array_key_exists($key, $cur)) {
  3628. $insert[] = $key;
  3629. }
  3630. }
  3631. return $insert;
  3632. };
  3633. $inserter = function ($mod, $type, $names) {
  3634. foreach ($names as $name) {
  3635. $data = ['name' => $name, 'type' => $type];
  3636. $mod->insert($data);
  3637. }
  3638. };
  3639. $provider = refill\RefillFactory::instance()->providers();
  3640. $oils = $name_val_cfg($provider['oil']);
  3641. $phones = $name_val_cfg($provider['phone']);
  3642. $mod_prov = Model('refill_provider');
  3643. $oil_items = $mod_prov->getProviderList(['type' => 1]);
  3644. $oil_items = $name_val_row($oil_items);
  3645. $oil_inserts = $match($oils, $oil_items);
  3646. $phone_items = $mod_prov->getProviderList(['type' => 2]);
  3647. $phone_items = $name_val_row($phone_items);
  3648. $phone_inserts = $match($phones, $phone_items);
  3649. $inserter($mod_prov, 1, $oil_inserts);
  3650. $inserter($mod_prov, 2, $phone_inserts);
  3651. }
  3652. public function testStat()
  3653. {
  3654. $model_refill_order = Model('refill_order');
  3655. $stat = Model('')->table('refill_order,vr_order')->join('inner')
  3656. ->on('refill_order.order_id=vr_order.order_id')
  3657. ->field('sum(refill_amount) as refill_amounts , sum(channel_amount) as channel_amounts , sum(mch_amount) as mch_amounts')
  3658. ->where([])->select();
  3659. }
  3660. public function testRefillGoods()
  3661. {
  3662. $goods = refill\RefillFactory::instance()->goods();
  3663. }
  3664. private function make_mobile()
  3665. {
  3666. $no = "1" . mt_rand(3000000000, 3999999999);
  3667. return $no;
  3668. }
  3669. private function refill_info($card_no, $card_type)
  3670. {
  3671. $data = rcache($card_no, 'cardrefill-');
  3672. if (empty($data)) {
  3673. $mod_topcard = Model('topcard');
  3674. $ret = $mod_topcard->get_card($card_no);
  3675. if (empty($ret)) {
  3676. $bind_phone = $this->make_mobile();
  3677. $mod_topcard->add($card_no, $card_type, time(), $bind_phone);
  3678. $data['bind_phone'] = $bind_phone;
  3679. $data['refill_time'] = time();
  3680. $data['times'] = 0;
  3681. wcache($card_no, $data, 'cardrefill-');
  3682. } else {
  3683. $val = $ret[0];
  3684. $data['bind_phone'] = $val['bind_phone'];
  3685. $data['refill_time'] = time();
  3686. $data['times'] = 0;
  3687. }
  3688. }
  3689. return $data;
  3690. }
  3691. public function testGetMobile()
  3692. {
  3693. $card_no = '1000119000001679247';
  3694. $card_type = 1;
  3695. $info = $this->refill_info($card_no, $card_type);
  3696. }
  3697. private function check_mchorder($mchid, $mch_order)
  3698. {
  3699. if (empty($mch_order)) {
  3700. return true;
  3701. } else {
  3702. $refill_order = Model('refill_order');
  3703. $ret = $refill_order->getOrderInfo(['mchid' => $mchid, 'mch_order' => $mch_order]);
  3704. return empty($ret);
  3705. }
  3706. }
  3707. public function testCheckMchorder()
  3708. {
  3709. $ret = $this->check_mchorder(1, '13281475');
  3710. }
  3711. public function testMakemobile()
  3712. {
  3713. $mobile = refill\util::make_mobile();
  3714. $ret = refill\util::set_black('1000111100020445281');
  3715. }
  3716. public function testLoadBlack()
  3717. {
  3718. $path = BASE_DATA_PATH . "/log";
  3719. $names = ['20210119-mobile.log',
  3720. '20210120-mobile.log', '20210121-mobile.log', '20210122-mobile.log', '20210123-mobile.log',
  3721. '20210124-mobile.log', '20210125-mobile.log'];
  3722. foreach ($names as $name) {
  3723. $file_name = $path . "/" . $name;
  3724. refill\util::black_from_log($file_name);
  3725. }
  3726. }
  3727. public function testStats()
  3728. {
  3729. $date = date('Y-m-d', time());
  3730. $today = strtotime("{$date}");
  3731. $times_begin = function ($start) {
  3732. $times = [];
  3733. $begin = $start;
  3734. for ($i = 0; $i < 7; $i++) {
  3735. $times[] = $begin;
  3736. $begin -= 86400;
  3737. }
  3738. return $times;
  3739. };
  3740. $reader = function ($mchid, $time) {
  3741. $cond['mchid'] = $mchid;
  3742. $cond['inner_status'] = 0;
  3743. $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 - 1]];
  3744. $items = Model('')->table('refill_order,vr_order')->join('inner')
  3745. ->on('refill_order.order_id=vr_order.order_id')
  3746. ->field('count(*) as order_count, vr_order.order_state, sum(mch_amount) as mch_amounts')
  3747. ->group('vr_order.order_state')
  3748. ->where($cond)->select();
  3749. return $items;
  3750. };
  3751. $begins = $times_begin($today);
  3752. $mchid = 10096;
  3753. // $states = rcache($this->mchid() , 'refillstat-');
  3754. $states = unserialize($states ?? "");
  3755. if (empty($states)) $states = [];
  3756. $result = [];
  3757. $cache = [];
  3758. foreach ($begins as $begin) {
  3759. if (array_key_exists($begin, $states)) {
  3760. $item = $states[$begin];
  3761. } else {
  3762. $item = $reader($mchid, $begin);
  3763. }
  3764. $result[$begin] = $item;
  3765. //判断item 中充值中的状态是否为0,为0的情况下放进cache
  3766. $cache = $item;
  3767. }
  3768. wcache($this->mchid(), $cache, 'refillstat-');
  3769. return $result;
  3770. }
  3771. public function testNotifyx()
  3772. {
  3773. $mch_cache = rcache("merchant-notify", 'refill-');
  3774. $caches = empty($mch_cache['data']) ? [] : unserialize($mch_cache['data']);
  3775. $new_caches = [];
  3776. $merchants = Model('merchant')->getMerchantList([], '', '', 'merchant.*,member.available_predeposit', "0,1000");
  3777. foreach ($merchants as $merchant) {
  3778. $mchid = $merchant['mchid'];
  3779. $phone = $merchant['contact_phone'] ?? "";
  3780. $available_pd = intval($merchant['available_predeposit']);
  3781. $alarm_pd = intval($merchant['alarm_amount']) < 10000 ? 10000 : intval($merchant['alarm_amount']);
  3782. if (array_key_exists($mchid, $caches)) {
  3783. $mch_cache = $caches[$mchid];
  3784. } else {
  3785. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  3786. }
  3787. if (!empty($phone) && ($available_pd < $alarm_pd)) {
  3788. $counts = $mch_cache['send_count'];
  3789. if (($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
  3790. $mch_cache = ['last_time' => time(), 'send_count' => $counts + 1];
  3791. QueueClient::push('sendSMS', ['mobile' => $merchant['contact_phone'],
  3792. 'type' => 'balance_warning', 'datas' => [date("m月d日H时"), $merchant['available_predeposit']]]);
  3793. }
  3794. } else {
  3795. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  3796. }
  3797. $new_caches[$mchid] = $mch_cache;
  3798. }
  3799. wcache("merchant-notify", ['data' => serialize($new_caches)], 'refill-');
  3800. }
  3801. public function testReadChannel()
  3802. {
  3803. refill\RefillFactory::instance()->read_channel();
  3804. }
  3805. public function testAllow()
  3806. {
  3807. $allow = refill\RefillFactory::instance()->allow(10096, 1, 100);
  3808. }
  3809. public function testCheckData()
  3810. {
  3811. $str = '|2|110667993758599771-充值失败|';
  3812. // $str = '0|提交成功|-36557.7400';
  3813. // if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
  3814. // return true;
  3815. // }
  3816. // if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
  3817. // return true;
  3818. // }
  3819. // return false;
  3820. $resp = ltrim($str, '|');
  3821. $resp = explode('|', $resp);
  3822. if (count($resp) != 3) {
  3823. return [false, '返回值错误'];
  3824. }
  3825. }
  3826. public function testErrre()
  3827. {
  3828. $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}';
  3829. $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);
  3830. }
  3831. public function testExpolode()
  3832. {
  3833. $x = "HTTP-504";
  3834. [$type,$code] = explode('-',$x);
  3835. }
  3836. public function testMchctl()
  3837. {
  3838. $ctl = new refill\mchctl();
  3839. }
  3840. public function testAsyncadd()
  3841. {
  3842. $x = \refill\util::async_add(['xxxx' => 1],4);
  3843. }
  3844. private function getProvider($name,$type = 'RefillPhone')
  3845. {
  3846. $file = BASE_HELPER_RAPI_PATH . "/$name/{$type}.php";
  3847. if(!file_exists($file)){
  3848. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  3849. return false;
  3850. } else {
  3851. require_once($file);
  3852. Log::record("file={$file} load success.",Log::DEBUG);
  3853. }
  3854. $class_name = "refill\\{$name}\\{$type}";
  3855. if (class_exists($class_name, false)) {
  3856. $caller = new $class_name([]);
  3857. return $caller;
  3858. } else {
  3859. $error = "Base Error: class {$class_name} isn't exists!";
  3860. Log::record($error, Log::ERR);
  3861. return false;
  3862. }
  3863. }
  3864. public function testOrderExist()
  3865. {
  3866. $refill_order = Model('refill_order');
  3867. $ret = $refill_order->exist(10116,'Yzb20210825111251415');
  3868. }
  3869. public function testRGoods()
  3870. {
  3871. $goods_list = refill\RefillFactory::instance()->goods();
  3872. }
  3873. public function testCanbu()
  3874. {
  3875. $notify = function ($resp)
  3876. {
  3877. if (empty($resp)) {
  3878. return [false, '网络错误'];
  3879. }
  3880. else
  3881. {
  3882. Log::record($resp, Log::DEBUG);
  3883. $resp = json_decode($resp, true);
  3884. if (empty($resp)) {
  3885. return [false, '网络错误'];
  3886. }
  3887. if($resp['code'] == 1)
  3888. {
  3889. $status = $resp['data']['status'];
  3890. if ($status == 'success') {
  3891. $order_state = ORDER_STATE_SUCCESS;
  3892. } elseif ($status == 'failed') {
  3893. $order_state = ORDER_STATE_CANCEL;
  3894. } elseif ($status == 'wait') {
  3895. $order_state = ORDER_STATE_SEND;
  3896. } else {
  3897. return [false, $status];
  3898. }
  3899. return [true, $order_state];
  3900. }
  3901. elseif($resp['code'] == -1 && $resp['msg'] == '订单不存在')
  3902. {
  3903. return [true, ORDER_STATE_NOEXIST];
  3904. }
  3905. else
  3906. {
  3907. return [false, $resp['msg']];
  3908. }
  3909. }
  3910. };
  3911. $resp = '{"code":1,"msg":"查询成功","data":{"systemOrderNo":"2049420687473912283808","agentOrderNo":"s16341299122819479569112","phone":"18571522718","itemName":"UNICOM","itemFacePrice":"50","status":0,"description":"待处理","amount":"47.2500","officialOrderNo":""}}';
  3912. $ret = $notify($resp);
  3913. }
  3914. }
  3915. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  3916. //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