TestRefill.php 291 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627
  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->mMchid = 1092;
  30. $this->mKey = '210fe406954220f56085997d6a4c5b80';
  31. }
  32. $this->make_sn();
  33. }
  34. public static function setUpBeforeClass(): void
  35. {
  36. Base::run_util();
  37. refill\RefillFactory::instance();
  38. }
  39. public function testExist()
  40. {
  41. $functor = function($card_no) {
  42. $ins = Cache::getInstance('cacheredis');
  43. $today = strtotime(date('Ymd', time()));
  44. $name = "unique_tongfu_{$today}";
  45. $key = "$card_no";
  46. $value = $ins->hget($name, '', $key);
  47. if ($value === false) {
  48. $ins->hset($name, '', [$key => 1]);
  49. return false;
  50. } else {
  51. return true;
  52. }
  53. };
  54. $x = $functor(13911129867);
  55. $x = $functor(13911129867);
  56. }
  57. public function testIsDay()
  58. {
  59. $ret = refill\functional::isDay();
  60. }
  61. public function testBodian_yd()
  62. {
  63. // $provider = $this->getProvider('bodian_yd');
  64. // $resp = $provider->balance();
  65. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  66. // $resp = $provider->query(['order_sn' => '16971663724801057246']);
  67. $body = ' {"szOrderId":"16971663724801057246","fSalePrice":"30.09","szAgentId":"200064","nFlag":"2","szVerifyString":"69c41652845d37f130186b05ddeecf6a","szPhoneNum":"15811535608","szRtnMsg":"00772022092109464443723910546991","nDemo":"30"}';
  68. $params = json_decode($body, true);
  69. $provider = $this->getProvider('bodian_yd', 'RefillCallBack');
  70. $ret = $provider->verify($params);
  71. $resp = $provider->notify($params);
  72. }
  73. public function testMerchantPrice()
  74. {
  75. $price = new refill\merchant_price();
  76. }
  77. public function testCallBack()
  78. {
  79. $params = [
  80. "mchid" => 10193,
  81. "order_sn" => 'open1632462013152110599086',
  82. "amount" => '100.0000',//intval($refill_info['refill_amount'] + 0.05),
  83. "cardno" => 18505101761,
  84. "trade_no" => '4034130685806092699201',
  85. "idcard" => $refill_info['idcard'] ?? "",
  86. "card_name" => $refill_info['card_name'] ?? "",
  87. 'official_sn' => '110103353072109241341340249560',
  88. 'message' => '',
  89. "state" => 'SUCCESS'
  90. ];
  91. $params['sign'] = $this->md5_sign($params, '0a845c18fbefaa121f36169ab8c880f3');
  92. $notify_url = 'http://v3.biyingniao.com/web/yezi/v2/straight_url?from=equityOpen';
  93. $resp = http_request($notify_url, $params, 'POST');
  94. }
  95. public function testFactory()
  96. {
  97. $provider = refill\RefillFactory::instance();
  98. }
  99. private function make_sn()
  100. {
  101. return mt_rand(1000, 9999)
  102. . sprintf('%010d', time())
  103. . sprintf('%06d', (float)microtime() * 1000000);
  104. }
  105. public function testRandomMobile()
  106. {
  107. $no = "1" . mt_rand(1, 9999999999);
  108. Log::record("phone no={$no}", Log::DEBUG);
  109. }
  110. public function testBJBAddPhone()
  111. {
  112. $provider = new refill\bjb\RefillPhone([]);
  113. for ($i = 3; $i > 0; --$i) {
  114. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  115. $resp = $provider->add(18500608333, 4, 10, ['order_sn' => $this->make_sn()]);
  116. $resp = $provider->add(18510683168, 4, 10, ['order_sn' => $this->make_sn()]);
  117. $resp = $provider->add(18513846008, 4, 10, ['order_sn' => $this->make_sn()]);
  118. $resp = $provider->add(18518237398, 4, 10, ['order_sn' => $this->make_sn()]);
  119. }
  120. }
  121. public function testOilticket()
  122. {
  123. $provider = new refill\bjb\RefillPhone([]);
  124. }
  125. public function testBjbRet()
  126. {
  127. $resp = '0|提交成功|14936.8600';
  128. $resp = explode('|', $resp);
  129. }
  130. public function testIpWhiteList()
  131. {
  132. $x = serialize(['47.99.57.105']);
  133. $ips = unserialize('a:1:{i:0;s:12:"47.99.57.105";}');
  134. if (!empty($ips)) {
  135. $addr = '47.99.57.105';
  136. Log::record("request ip:{$addr}", Log::DEBUG);
  137. if (!in_array($addr, $ips)) {
  138. throw new Exception("请求地址不在白名单中");
  139. }
  140. }
  141. }
  142. public function testBaizePhone()
  143. {
  144. $provider = new refill\baizeyd\RefillPhone([]);
  145. // $resp = $provider->add(17801048874, 5, 10, ['order_sn' => $this->make_sn()]);
  146. $resp = $provider->query(['order_sn' => '930668700375312006']);
  147. // $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';
  148. // $input = $this->parse_request($str);
  149. // $input['amount'] = 10.00;
  150. // $input['orderId'] = '92391614943913061206';
  151. // $input['phone'] = 17801048874;
  152. // $input['payTime'] = '2021-03-05 19:31:55';
  153. // $input['sign'] = 'bef6ae50319fb1e8cb3f21302f0abef8';
  154. // $input['appKey'] = 'uECmTOFAY6RPCTtI';
  155. // $input['payUrl'] = '';
  156. // $input['statusDes'] = '支付失败';
  157. // $input['status'] = 7;
  158. // refill\RefillFactory::instance()->notify('baizeyd',$input);
  159. }
  160. private function parse_request($squery)
  161. {
  162. if (empty($squery)) return [];
  163. $result = [];
  164. $params = preg_split('/&/', $squery);
  165. foreach ($params as $pair) {
  166. if (empty($pair)) continue;
  167. $kv = explode('=', $pair);
  168. $count = count($kv);
  169. if ($count === 1) {
  170. $key = $kv[0];
  171. $val = "";
  172. } elseif ($count === 2) {
  173. $key = $kv[0];
  174. $val = urldecode($kv[1]);
  175. } else {
  176. continue;
  177. }
  178. if (!empty($key)) {
  179. $result[$key] = $val;
  180. }
  181. }
  182. return $result;
  183. }
  184. public function testAmPhone()
  185. {
  186. // $provider = new refill\aming\RefillOil([]);
  187. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  188. $input['result'] = 'fail';
  189. $input['msg'] = 0;
  190. $input['order'] = 'null';
  191. $input['phone_no'] = 18500608333;
  192. $input['sign'] = 'c925ad19c63c3eb36ffc52d938e24604';
  193. $input['amount'] = '10.00';
  194. $input['op_no'] = '42601615096072517841';
  195. refill\RefillFactory::instance()->notify('aming', $input);
  196. }
  197. public function testBhcPhone()
  198. {
  199. $provider = new refill\binghc\RefillPhone([]);
  200. $resp = $provider->query(['order_sn' => 250668618955902006]);
  201. // $input['result'] = 'fail';
  202. // $input['msg'] = 0;
  203. // $input['order'] = 'null';
  204. // $input['phone_no'] = 18500608333;
  205. // $input['sign'] = 'c3aa38ee07cd1b69bfd5ead56f6da8d6';
  206. // $input['amount'] = '10.00';
  207. // $input['op_no'] = '24061615096361999002';
  208. // refill\RefillFactory::instance()->notify('binghc',$input);
  209. }
  210. public function testRuishunPhone()
  211. {
  212. // $provider = new refill\ruishun\RefillOil([]);
  213. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  214. $input['result'] = 'fail';
  215. $input['msg'] = 0;
  216. $input['order'] = null;
  217. $input['phone_no'] = 18500608333;
  218. $input['sign'] = 'e234f7d1c0458ca236f53a0008436b46';
  219. $input['amount'] = "10.00";
  220. $input['op_no'] = '76361615095403188513';
  221. refill\RefillFactory::instance()->notify('ruishun', $input);
  222. }
  223. public function testWuchenPhone()
  224. {
  225. $provider = new refill\wuchen\RefillPhone([]);
  226. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  227. $resp = $provider->query(['order_sn' => '790668630498425006']);
  228. // $input['app_id'] = '70016';
  229. // $input['message'] = 'fail';
  230. // $input['order_sn'] = '43101615277293035501';
  231. // $input['platform_order_id'] = '';
  232. // $input['sign'] = '5ea59f8ac51a518f2c622824d7db2a04';
  233. // $input['state'] = "fail";
  234. // $input['sys_sn'] = '202103091608231836913889';
  235. // $input['timestamp'] = '1615277361';
  236. // refill\RefillFactory::instance()->notify('wuchen',$input);
  237. }
  238. public function testYibaoPhone()
  239. {
  240. $provider = new refill\yibao\RefillPhone([]);
  241. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  242. $resp = $provider->query(['ch_trade_no' => '31215002972142736']);
  243. // $str = '{"amount":"30","carrierOrderNo":null,"mobile":"13699279618","orderNo":"27961615532426088043","orderStatus":3,"sign":"012BA0B093A0473D7DD1634A8356DCB1","tradeNo":"31215002972142736"}';
  244. // $data = json_decode($str,true);
  245. // refill\RefillFactory::instance()->notify('yibao',$data);
  246. }
  247. public function testAmingydPhone()
  248. {
  249. $provider = new refill\amingyd\RefillPhone([]);
  250. // $resp = $provider->add('13699279618', 5, 30, ['order_sn' => $this->make_sn()]);
  251. $resp = $provider->query(['order_sn' => '15421615627436792938']);
  252. // $str = '{"orderId":"15421615627436792938","amount":3000,"appKey":"40695059","timestamp":1615627503,"status":3,"operatorId":"508353854027968617","sign":"2A0562319ED4845AB9E3812A58F0B425"}';
  253. // $data = json_decode($str,true);
  254. // refill\RefillFactory::instance()->notify('amingyd',$data);
  255. }
  256. public function testChukaPhone()
  257. {
  258. $provider = new refill\chuka\RefillPhone([]);
  259. // $resp = $provider->add('18500608333', 5, 20, ['order_sn' => $this->make_sn()]);
  260. // $resp = $provider->query(['order_sn' => '92161616314884175179']);
  261. $params['customerId'] = '101787';
  262. $params['orderno'] = 'C1616314888506705492';
  263. $params['tmporder'] = '92161616314884175179';
  264. $params['code'] = '1';
  265. $params['number'] = '18500608333';
  266. $params['money'] = '20';
  267. $params['amount'] = '0';
  268. refill\RefillFactory::instance()->notify('chuka', $params);
  269. }
  270. public function testLegouPhone()
  271. {
  272. $provider = new refill\legou\RefillPhone([]);
  273. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '200649600557718881' , 'order_id' => 247 , 'buyer_id' => 52667]);
  274. $resp = $provider->query(['order_sn' => '200649600557718881', 'order_id' => 247]);
  275. $params['username'] = 'lzdc';
  276. $params['orderNumber'] = '690653407667699667';
  277. $params['cardNumber'] = '18500608333';
  278. $params['orderMoney'] = '30.0';
  279. $params['orderPay'] = '1.0';
  280. $params['resultCode'] = '2';
  281. $params['rechargeDesc'] = '{"rechargeStatus":600200,"rechargeDesc":"充值成功"}';
  282. $params['rechargeVoucher'] = '100407307092103291444050244599';
  283. $params['sign'] = 'c054884422a8c3749cbfda0e82b9af70';
  284. // refill\RefillFactory::instance()->notify('legou',$params);
  285. }
  286. public function testFeinimoshu()
  287. {
  288. $provider = new refill\feinimoshu\RefillOil([]);
  289. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  290. $resp = $provider->balance();
  291. }
  292. public function testFeinimoshu_hf()
  293. {
  294. $provider = new refill\feinimoshu_hf\RefillPhone([]);
  295. // $resp = $provider->query(['order_sn' => '3708210680873565742704']);
  296. $resp = $provider->balance();
  297. }
  298. public function testFeiniaoPhone()
  299. {
  300. $provider = new refill\feiniao\RefillPhone([]);
  301. // $order_sn = $this->make_sn();
  302. // Log::record($order_sn, Log::DEBUG);
  303. // $resp = $provider->add('13699279618', 4, 50, ['order_sn' => $order_sn]);
  304. $resp = $provider->query(['order_sn' => '28641617178590981824']);
  305. $params['result'] = 'fail';
  306. $params['msg'] = '0';
  307. $params['order'] = 'null';
  308. $params['phone_no'] = '18500608333';
  309. $params['amount'] = '100.00';
  310. $params['op_no'] = '64591617090761169983';
  311. $params['settle'] = '0';
  312. $params['sign'] = '907d2640f96e8d78d59202d090ddb470';
  313. // refill\RefillFactory::instance()->notify('feiniao',$params);
  314. }
  315. public function testTongyPhone()
  316. {
  317. $provider = new refill\tongy\RefillPhone([]);
  318. // $resp = $provider->add('18500608333', 5, 30, ['order_sn' => '690653407667699667', 'order_id' => 248, 'buyer_id' => 52667]);
  319. // $params['UserId'] = '100857';
  320. // $params['ShopId'] = '300000';
  321. // $params['SysOrderId'] = '21070215141210085700010';
  322. // $params['OrderId'] = '9241650678554051429291';
  323. // $params['State'] = '5';
  324. // $params['Timestamp'] = '1625210740472';
  325. // $params['sign'] = 'C5C4E888A3B678470071CDA6DC31719D';
  326. // $params['ParValue'] = '100.0000';
  327. // $params['VoucherType'] = '';
  328. // $params['VoucherContent'] = '';
  329. // $params['CreateTime'] = '2021-07-02 15:14:12';
  330. // $params['CompleteTime'] = '2021-07-02 15:25:40';
  331. // refill\RefillFactory::instance()->notify('tongy',$params);
  332. $resp = $provider->balance();
  333. }
  334. public function testWeiyiPhone()
  335. {
  336. $provider = new refill\weiyi\RefillPhone([]);
  337. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  338. // $resp = $provider->query(['order_sn' => '90401621489214002876']);
  339. $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"}';
  340. $params = json_decode($body, true);
  341. refill\RefillFactory::instance()->notify('weiyi', $params);
  342. }
  343. public function testWeiyimanPhone()
  344. {
  345. $provider = new refill\weiyiman\RefillPhone([]);
  346. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  347. // $resp = $provider->query(['order_sn' => '47591620898269370373']);
  348. $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"}';
  349. $params = json_decode($data, true);
  350. refill\RefillFactory::instance()->notify('weiyiman', $params);
  351. }
  352. public function testWeiyiWtPhone()
  353. {
  354. $provider = new refill\weiyiwt\RefillPhone([]);
  355. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  356. // $resp = $provider->query(['order_sn' => '38451621924366009924']);
  357. $body = '{"szOrderId":"38451621924366009924","fSalePrice":"47.25","szAgentId":"200016","nFlag":"2","szVerifyString":"a0b5bfc0bbf6c121a4cd74d9ecb2427d","szPhoneNum":"18074608795","szRtnMsg":"1000000083421052514441119833","nDemo":"50"}';
  358. $params = json_decode($body, true);
  359. refill\RefillFactory::instance()->notify('weiyiwt', $params);
  360. }
  361. public function testXiaochuangPhone()
  362. {
  363. $provider = new refill\xiaochuang\RefillPhone([]);
  364. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  365. // $resp = $provider->query(['order_sn' => '84891623028826872085']);
  366. // $body = '{"fail_msg":"","order_sn":"84891623028826872085","order_status":"4","p_order_sn":"2021060709203558011797441162","sign":"E842203C3CA48E924D60B1B56AB93C3B"}';
  367. // $params = json_decode($body , true);
  368. // refill\RefillFactory::instance()->notify('xiaochuang',$params);
  369. $resp = $provider->balance();
  370. }
  371. public function testYintengPhone()
  372. {
  373. $provider = new refill\yinteng\RefillPhone([]);
  374. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  375. // $resp = $provider->query(['order_sn' => '49631623737966351874']);
  376. // $data = '{"szOrderId":"49631623737966351874","fSalePrice":"47.35","szAgentId":"200009","nFlag":"2","szVerifyString":"01c5fafb1d67175f0533b69a762286e8","szPhoneNum":"18074608795","szRtnMsg":"1000000083421061514495400262","nDemo":"50"}';
  377. // $params = json_decode($data , true);
  378. // refill\RefillFactory::instance()->notify('yinteng',$params);
  379. $resp = $provider->balance();
  380. }
  381. public function testMoxjPhone()
  382. {
  383. $provider = new refill\moxj\RefillPhone([]);
  384. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  385. $resp = $provider->query(['order_sn' => '91131623906171663147']);
  386. $data = '{"result":"fail","msg":"0","order":"null","phone_no":"18500608333","amount":"50.0","op_no":"84901623900668776864","sign":"896b54914a07b814573d7f6cc403848a"}';
  387. $params = json_decode($data, true);
  388. // refill\RefillFactory::instance()->notify('moxj',$params);
  389. }
  390. public function testMoxj_fsPhone()
  391. {
  392. $provider = new refill\moxj_fs\RefillPhone([]);
  393. // $resp = $provider->add(15139608757, 4, 100, ['order_sn' => $this->make_sn()]);
  394. // $resp = $provider->query(['order_sn' => '42741624242693157165']);
  395. // $data = '{"amount":"100","charge_type":"2","code":"1","partner_id":"58","phone":"15139608757","sign":"30d193dba4101e50851ed0efabb75fb1","partner_order_no":"42741624242693157165","official_order_id":"20210621103211948830"}';
  396. // $params = json_decode($data , true);
  397. // refill\RefillFactory::instance()->notify('moxj_fs',$params);
  398. $resp = $provider->balance();
  399. }
  400. public function testZanzanquickPhone()
  401. {
  402. $provider = new refill\zanzanquick\RefillPhone([]);
  403. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  404. // $resp = $provider->query(['order_sn' => '90831623925322675223']);
  405. // $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"}';
  406. // $params = json_decode($data , true);
  407. // refill\RefillFactory::instance()->notify('zanzanquick',$params);
  408. $resp = $provider->balance();
  409. }
  410. public function testFengyemanPhone()
  411. {
  412. $provider = new refill\fengyeman\RefillPhone([]);
  413. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  414. // $resp = $provider->query(['order_sn' => '46221624265179185139']);
  415. // $data = '{"order_id":"46221624265179185139","mchid":"HF67a65_10008","tel":"18500608333","price":"50.00","sign":"2bb4ed5edc97ba7f60cf3848aab82cf4","out_order_id":"206877995456","status":"1"}';
  416. // $params = json_decode($data , true);
  417. // refill\RefillFactory::instance()->notify('fengyeman',$params);
  418. $resp = $provider->balance();
  419. }
  420. public function testMoxj_ydPhone()
  421. {
  422. $provider = new refill\moxj_yd\RefillPhone([]);
  423. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  424. // $resp = $provider->query(['order_sn' => '52101624413125875436']);
  425. // $data = '{"customer_order_no":"47651624412877257722","status":1,"merchant_id":"76505818","sign":"c185a0f2152b3ac3ee3f29009dec5a6b"}';
  426. // $params = json_decode($data , true);
  427. // refill\RefillFactory::instance()->notify('moxj_yd',$params);
  428. $resp = $provider->balance();
  429. }
  430. public function testXingzyPhone()
  431. {
  432. $provider = new refill\xingzy\RefillPhone([]);
  433. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  434. // $resp = $provider->query(['order_sn' => '76791624441423287373', 'ch_trade_no' => '210623174333941000']);
  435. // $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}';
  436. // $params = json_decode($data , true);
  437. // refill\RefillFactory::instance()->notify('xingzy',$params);
  438. $resp = $provider->balance();
  439. }
  440. public function testYuanmaiPhone()
  441. {
  442. $provider = new refill\yuanmai\RefillPhone([]);
  443. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  444. // $resp = $provider->query(['order_sn' => '24231624865882625203', 'ch_trade_no' => '210623174333941000']);
  445. // $data = '{"orderid":"24231624865882625203","status":"2","ordermoney":"50","sign":"94be5b1754ffcc7f0fe1551072146941","spsno":""}';
  446. // $params = json_decode($data, true);
  447. // refill\RefillFactory::instance()->notify('yuanmai',$params);
  448. $resp = $provider->balance();
  449. }
  450. public function testLangkePhone()
  451. {
  452. $provider = new refill\langke\RefillPhone([]);
  453. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  454. $resp = $provider->query(['order_sn' => '29461624952660047520', 'ch_trade_no' => '210623174333941000']);
  455. $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"}';
  456. $params = json_decode($data, true);
  457. // refill\RefillFactory::instance()->notify('langke',$params);
  458. }
  459. public function testYunlingdsPhone()
  460. {
  461. $provider = new refill\yunlingds\RefillPhone([]);
  462. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  463. // $resp = $provider->query(['order_sn' => '85351624961920020593']);
  464. // $data = '{"orderid":"OWS21062918188862392","sporderid":"85351624961920020593","userid":"10002623","merchantsubmittime":"20210629181929","resultno":"1","parvalue":"30","remark1":"AW20210629181906yRAvM","payno":"AW20210629181906yRAvM","fundbalance":"-28.59","sign":"11369509ADCF2A2612B3531A15049BDD"}';
  465. // $params = json_decode($data, true);
  466. // refill\RefillFactory::instance()->notify('yunlingds',$params);
  467. $resp = $provider->balance();
  468. }
  469. public function testLingzhmanPhone()
  470. {
  471. // $provider = $this->getProvider('lingzhman');
  472. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  473. // $resp = $provider->query(['order_sn' => '91641644558361512676']);
  474. // $resp = $provider->balance();
  475. $body = '{"orderNo":"F2202111346304162782","status":"001","consumerNo":"91641644558361512676","voucherNo":null,"mobile":"18500608333"}';
  476. $params = json_decode($body, true);
  477. $provider = $this->getProvider('lingzhman', 'RefillCallback');
  478. $resp = $provider->notify($params);
  479. }
  480. public function testQijutangPhone()
  481. {
  482. $provider = new refill\qijutang\RefillPhone([]);
  483. // for ($i=1;$i<2;$i++) {
  484. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  485. // }
  486. // $resp = $provider->query(['order_sn' => '51501625218912512231']);
  487. // $data = '{"szOrderId":"51501625218912512231","fSalePrice":"28.44","szAgentId":"200010","nFlag":"3","szVerifyString":"20cf16c6bb239e2a703d0bf3e5ef2d5a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  488. // $params = json_decode($data, true);
  489. // refill\RefillFactory::instance()->notify('qijutang',$params);
  490. $resp = $provider->balance();
  491. }
  492. public function testLingzhman48Phone()
  493. {
  494. // $provider = $this->getProvider('lingzhman48');
  495. // $resp = $provider->balance();
  496. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  497. // $resp = $provider->query(['order_sn' => '39991649558290585085']);
  498. $body = '{"orderNo":"F2204101038212358481","status":"019","consumerNo":"39991649558290585085","voucherNo":null,"mobile":"18500608333"}';
  499. $params = json_decode($body, true);
  500. $provider = $this->getProvider('lingzhman48', 'RefillCallBack');
  501. $ret = $provider->verify($params);
  502. $resp = $provider->notify($params);
  503. }
  504. public function testcangbuPhone()
  505. {
  506. $provider = $this->getProvider('cangbu');
  507. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  508. $resp = $provider->query(['order_sn' => '4024880687558152076462']);
  509. // $data = '{"customerId":"112","tmporder":"35041626071052333060","orderno":"s16260710607417944801112","number":"18500608333","money":"100","amount":"94.9000","code":"1","cardno":"","voucher":"110103307042107121424210550266","sign":"de463c3d389a4afe4a2c58257972121a"}';
  510. // $params = json_decode($data, true);
  511. // refill\RefillFactory::instance()->notify('cangbu',$params);
  512. $resp = $provider->balance();
  513. }
  514. public function testCangbukami()
  515. {
  516. $provider = new refill\cangbukami\RefillPhone([]);
  517. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  518. $resp = $provider->query(['order_sn' => '23231627380108954478']);
  519. }
  520. public function testTongykamiPhone()
  521. {
  522. $provider = new refill\tongykami\RefillPhone([]);
  523. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  524. $resp = $provider->query(['order_sn' => '26961626077050756648']);
  525. $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"}';
  526. $params = json_decode($data, true);
  527. // refill\RefillFactory::instance()->notify('tongykami',$params);
  528. }
  529. public function testTongluPhone()
  530. {
  531. $provider = new refill\tonglu\RefillPhone([]);
  532. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  533. $resp = $provider->query(['order_sn' => '22961616468561936356']);
  534. // $body = '{"order_no":"22961616468561936356","order_status":"5","phone_no":"18500608333","amount":5000,"time_paid":1616468856287,"order_cert_no":"","paid":false,"order_id":"20210323966497008"}';
  535. // $sign = '9E41F52F612D60EBB654B3A5D1E2F1E5';
  536. // $params = json_decode($body , true);
  537. // $params['sign'] = $sign;
  538. // refill\RefillFactory::instance()->notify('tonglu',$params);
  539. }
  540. public function testSialan()
  541. {
  542. $provider = $this->getProvider('sialan');
  543. // $resp = $provider->balance();
  544. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  545. $resp = $provider->query(['ch_trade_no' => '21112214053736552180705']);
  546. // $body = '{"api_id":"16855","recharge":"18500608333","amount":"10","order_sn":"21112213553615606755893","query_sn":"29151637560521755792","operator_sn":"","status":"2","sign":"32867363957ed9688b8bbdd8f42c08eb"}';
  547. // $params = json_decode($body, true);
  548. // $provider = $this->getProvider('sialan', 'RefillCallBack');
  549. // $ret = $provider->verify($params);
  550. // $resp = $provider->notify($params);
  551. }
  552. public function testMoxj_new()
  553. {
  554. $provider = new refill\moxj_new\RefillPhone([]);
  555. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  556. // $resp = $provider->query(['order_sn' => '33301627887529587739', 'card_no' => 13699279618]);
  557. // $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"}';
  558. // $params = json_decode($body, true);
  559. // refill\RefillFactory::instance()->notify('moxj_new', $params);
  560. $resp = $provider->balance();
  561. }
  562. public function testKangkai()
  563. {
  564. $provider = new refill\kangkai\RefillPhone([]);
  565. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  566. // $resp = $provider->query(['order_sn' => '25431627898461762024']);
  567. // $body = '{"TaskID":"267459","Mobile":"18500608333","Status":"5","ReportTime":"2021-08-02T18:02:01.777","ReportCode":"7:","OutTradeNo":"25431627898461762024","Price":"44.2500","ReceiptNum":"","Sign":"f0934a621fd0b076373f77a9bf8d7051"}';
  568. // $params = json_decode($body, true);
  569. // refill\RefillFactory::instance()->notify('kangkai', $params);
  570. $resp = $provider->balance();
  571. }
  572. public function testLechong()
  573. {
  574. $provider = new refill\lechong\RefillPhone([]);
  575. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  576. // $resp = $provider->query(['order_sn' => '55641627902450221838']);
  577. // $body = '{"sellerid":"55641627902450221838","agentcode":"202108021753","account":"MTg1MDA2MDgzMzM=","value":"50","payvalue":"47.8500","voucher":"","createtime":"20210802190739","endtime":"20210802191008","state":"4","remark":"","time":"20210802191008","sign":"0e2d69318d03871d887debd498cc50f2"}';
  578. // $params = json_decode($body, true);
  579. // refill\RefillFactory::instance()->notify('lechong', $params);
  580. $resp = $provider->balance();
  581. }
  582. public function testXinhengyang()
  583. {
  584. $provider = $this->getProvider('xinhengyang');
  585. // $resp = $provider->balance();
  586. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  587. $resp = $provider->query(['order_sn' => '6966570691155594416360']);
  588. // $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
  589. // $params = json_decode($body, true);
  590. // $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
  591. // $ret = $provider->verify($params);
  592. // $resp = $provider->notify($params);
  593. }
  594. public function testMiaoxt()
  595. {
  596. $provider = new refill\miaoxt\RefillPhone([]);
  597. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  598. // $resp = $provider->query(['order_sn' => '85101628064401524483']);
  599. // $resp = $provider->balance();
  600. $body = '{"szOrderId":"85101628064401524483","fSalePrice":"10.2","szAgentId":"200050","nFlag":"2","szVerifyString":"7a08b9a71a297a28843d749a7bf79dbc","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"10"}';
  601. $params = json_decode($body, true);
  602. refill\RefillFactory::instance()->notify('miaoxt', $params);
  603. }
  604. public function testTianyan()
  605. {
  606. $provider = new refill\tianyan\RefillPhone([]);
  607. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  608. // $resp = $provider->query(['order_sn' => '71241628067981955316', 'card_no' => 18500608333, 'card_type' => 5]);
  609. // $resp = $provider->balance();
  610. $params['amount'] = '100.00';
  611. $params['orderNo'] = '2618380681466713437097';
  612. $params['supplierId'] = '48';
  613. $params['orderId'] = 'S20210805081833371976224648';
  614. $params['notifyTime'] = '1628122793669';
  615. $params['sign'] = '4d8f70bf451608359e256ee1e5f30de1';
  616. $params['discountAmount'] = '5.50';
  617. $params['phoneNo'] = '17696554433';
  618. $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';
  619. $params['payType'] = 'wechat';
  620. $params['ticketNo'] = '110103353022108050819140250945';
  621. $params['company'] = 'lt';
  622. $params['status'] = '2';
  623. refill\RefillFactory::instance()->notify('tianyan', $params);
  624. }
  625. public function testYunsuoyaoman()
  626. {
  627. // $provider = $this->getProvider('yunsuoyaoman');
  628. // $resp = $provider->balance();
  629. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  630. // $resp = $provider->query(['order_sn' => '58771629702960801700']);
  631. $body = '{"orderid":"RLD21082315152651196","sporderid":"58771629702960801700","userid":"10002745","merchantsubmittime":"20210823152623","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-27.45","sign":"76A29E0101644831526138D63917C130"}';
  632. $params = json_decode($body, true);
  633. $provider = $this->getProvider('yunsuoyaoman', 'RefillCallBack');
  634. $ret = $provider->verify($params);
  635. $resp = $provider->notify($params);
  636. }
  637. public function testYouhe()
  638. {
  639. // $provider = $this->getProvider('youhe');
  640. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  641. // $resp = $provider->query(['order_sn' => '41051635145081582785']);
  642. // $resp = $provider->balance();
  643. $body = ' {"seqNo":"FE4D9D65781C0758","orderNo":"46101635142848462768","result":"Q0001","transo":"","sign":"3B02C7864154C94D8479305D27F3831C"}';
  644. $params = json_decode($body, true);
  645. $provider = $this->getProvider('youhe', 'RefillCallback');
  646. $ret = $provider->verify($params);
  647. $resp = $provider->notify($params);
  648. }
  649. public function testWenye()
  650. {
  651. $provider = new refill\wenye\RefillPhone([]);
  652. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  653. // $resp = $provider->query(['order_sn' => '88871628157083445809']);
  654. // $resp = $provider->balance();
  655. $body = '{"orderNo":"F2108051529062719948","status":"019","consumerNo":"95291628148539909985","voucherNo":null,"mobile":"18500608333"}';
  656. $params = json_decode($body, true);
  657. // refill\RefillFactory::instance()->notify('wenye', $params);
  658. }
  659. public function testXinyang()
  660. {
  661. $provider = new refill\xinyang\RefillPhone([]);
  662. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  663. // $resp = $provider->query(['order_sn' => '68151628157534687971']);
  664. // $resp = $provider->balance();
  665. $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"}';
  666. $params = json_decode($body, true);
  667. refill\RefillFactory::instance()->notify('xinyang', $params);
  668. }
  669. public function testGuochuang()
  670. {
  671. $provider = $this->getProvider('guochuang');
  672. $resp = $provider->add(13699279618, 4, 5, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  673. // $resp = $provider->query(['order_sn' => '82951628231038096078']);
  674. // $resp = $provider->balance();
  675. // $body = '{"account":"18074608795","evidence":"1000000083421080614310024563","evidenceType":"","id":"D2021080614235942044","inTime":"2021/08/06 14:26:22","money":"10","outerId":"82951628231038096078","status":"SUCCESS"}';
  676. // $params['ts'] = 1628231182;
  677. // $params['sign'] = '545F7024870B145915934CA36C6D341E';
  678. // $params['body'] = $body;
  679. // refill\RefillFactory::instance()->notify('guochuang', $params);
  680. // [$goods_id, $price] = $provider->goods(2, 10, 4, 1, []);
  681. }
  682. public function testXianghongrui()
  683. {
  684. $provider = new refill\xianghongrui\RefillPhone([]);
  685. // $resp = $provider->balance();
  686. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  687. // $resp = $provider->query(['order_sn' => '87691628758730981608']);
  688. $body = '{"orderid":"BAT21081216581941649","sporderid":"87691628758730981608","userid":"10002503","merchantsubmittime":"20210812165918","resultno":"1","parvalue":"50","remark1":"110103353052108121658550256634","payno":"110103353052108121658550256634","fundbalance":"-47.5","sign":"EF34F6FB6D37E4FCB92DCD8F41CC67E1"}';
  689. $params = json_decode($body, true);
  690. refill\RefillFactory::instance()->notify('xianghongrui', $params);
  691. }
  692. public function testDianchong()
  693. {
  694. $provider = $this->getProvider('dianchong');
  695. // $resp = $provider->balance();
  696. // $resp = $provider->add(18074608795, 5, 30, ['order_sn' => $this->make_sn()]);
  697. // $resp = $provider->query(['order_sn' => '26671629190230227788']);
  698. $body = '{"seqNo":"5C2D85572F8743CF","orderNo":"26671629190230227788","result":"Q0000","transo":"1000000083421081716331202254","sign":"87F3F67EA2B91709FD05468CF74210A1"}';
  699. $params = json_decode($body, true);
  700. $provider = $this->getProvider('dianchong', 'RefillCallBack');
  701. $ret = $provider->verify($params);
  702. $resp = $provider->notify($params);
  703. }
  704. public function testXunyinOil()
  705. {
  706. $provider = $this->getProvider('xunyinoil', 'RefillOil');
  707. // $resp = $provider->balance();
  708. // $resp = $provider->add(9030230005180327, 1, 50, ['order_sn' => $this->make_sn()]);
  709. $resp = $provider->query(['order_sn' => '77791629450541412891']);
  710. // $body = '{"ext":"","code":"8888","sign":"7db98f3f271013688134f2fbd503dc15","statemes":"\u6210\u529f","id":"80641629442789487318","userid":"8417","operatorid":"2421082015001888","status":"SUCCESS"}';
  711. // $params = json_decode($body, true);
  712. // $provider = $this->getProvider('xunyinoil','RefillCallBack');
  713. // $ret = $provider->verify($params);
  714. // $resp = $provider->notify($params);
  715. }
  716. public function testJumiThird()
  717. {
  718. $provider = $this->getProvider('jumithird');
  719. // $resp = $provider->balance();
  720. $resp = $provider->add(588073521, 7, 100, [
  721. 'order_sn' => $this->make_sn(),
  722. 'goods_id' => 6978,
  723. 'product_code' => 'XYZ100747'
  724. ]);
  725. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  726. // $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"}';
  727. // $params = json_decode($body, true);
  728. // $provider = $this->getProvider('jumithird','RefillCallBack');
  729. // $ret = $provider->verify($params);
  730. // $resp = $provider->notify($params);
  731. }
  732. public function testWangliantx()
  733. {
  734. // $provider = $this->getProvider('wangliantx');
  735. // $resp = $provider->balance();
  736. // for ($i = 1; $i<=1; $i++){
  737. // $resp = $provider->add(18074608795, 6, 50, [
  738. // 'order_sn' => $this->make_sn(),
  739. // 'regin_no' => 1
  740. // ]);
  741. // }
  742. // $resp = $provider->query(['order_sn' => '85901629801033376170']);
  743. $body = '{"userid":"10073664","sporderid":"85901629801033376170","orderid":"C5C5D4F49DB61A8773664","resultno":"1","merchantsubmittime":"20210824183109","ordermoney":"47.6","verifystring":"b6a873ecd6dc9cea3a410c6386cdab84","sign":"4a80e2a8c7b07c8aacada4feedd581bd","supnumber":"1000000083421082418345386156"}';
  744. $params = json_decode($body, true);
  745. $provider = $this->getProvider('wangliantx', 'RefillCallBack');
  746. $ret = $provider->verify($params);
  747. $resp = $provider->notify($params);
  748. }
  749. public function testZhuojian()
  750. {
  751. // $provider = $this->getProvider('zhuojian');
  752. // $resp = $provider->add(18500608333, 5, 50, [
  753. // 'order_sn' => $this->make_sn()
  754. // ]);
  755. // $resp = $provider->query(['order_sn' => '87231630026579229295']);
  756. $body = '{"money":"50.00","official_trade_no":"","out_trade_no":"87231630026579229295","status":"4","trade_no":"10000077828","sign":"0e19142c014ef6fe263601956e0be436"}';
  757. $params = json_decode($body, true);
  758. $provider = $this->getProvider('zhuojian', 'RefillCallBack');
  759. $ret = $provider->verify($params);
  760. $resp = $provider->notify($params);
  761. }
  762. public function testXianghongruifs()
  763. {
  764. // $provider = $this->getProvider('xianghongruifs');
  765. // $resp = $provider->balance();
  766. // $resp = $provider->add(15252490862, 4, 30, [
  767. // 'order_sn' => $this->make_sn()
  768. // ]);
  769. // $resp = $provider->query(['order_sn' => '70881632644084577858']);
  770. $body = '{"orderid":"AAO21092616144271467","sporderid":"70881632644084577858","userid":"10002524","merchantsubmittime":"20210926161610","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"343C28C4EB13F68E2EE251FA0F2A8262"}';
  771. $params = json_decode($body, true);
  772. $provider = $this->getProvider('xianghongruifs', 'RefillCallBack');
  773. $ret = $provider->verify($params);
  774. $resp = $provider->notify($params);
  775. }
  776. public function testYilin()
  777. {
  778. $provider = $this->getProvider('yilin');
  779. $resp = $provider->balance();
  780. // $resp = $provider->add(18500608333, 5, 30, [
  781. // 'order_sn' => $this->make_sn()
  782. // ]);
  783. // $resp = $provider->query(['order_sn' => '86981630484634157631']);
  784. // $body = '{"orderid":"NZX21090116244713140","sporderid":"86981630484634157631","userid":"10002543","merchantsubmittime":"20210901163039","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.71","sign":"53717BF9ECE83F4AD96C1EDD4BAE4E87"}';
  785. // $params = json_decode($body, true);
  786. // $provider = $this->getProvider('yilin','RefillCallBack');
  787. // $ret = $provider->verify($params);
  788. // $resp = $provider->notify($params);
  789. }
  790. public function testMiaoxt_fs()
  791. {
  792. $provider = $this->getProvider('miaoxt_fs');
  793. // $resp = $provider->balance();
  794. // $resp = $provider->add(13945846040, 4, 10, [
  795. // 'order_sn' => $this->make_sn()
  796. // ]);
  797. $resp = $provider->query(['order_sn' => '33101630577689278074']);
  798. // $body = '{"szOrderId":"33101630577689278074","fSalePrice":"9.95","szAgentId":"200055","nFlag":"2","szVerifyString":"1649fb2815926b75e4ed7e0fef3172ae","szPhoneNum":"13945846040","szRtnMsg":"","nDemo":"10"}';
  799. // $params = json_decode($body, true);
  800. // $provider = $this->getProvider('miaoxt_fs','RefillCallBack');
  801. // $ret = $provider->verify($params);
  802. // $resp = $provider->notify($params);
  803. }
  804. public function testXianzhibb()
  805. {
  806. // $provider = $this->getProvider('xianzhibb');
  807. // $resp = $provider->balance();
  808. // $resp = $provider->add(13699279618, 4, 200, [
  809. // 'order_sn' => $this->make_sn()
  810. // ]);
  811. // $resp = $provider->query(['order_sn' => '80881630650784871094']);
  812. $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"}';
  813. $params = json_decode($body, true);
  814. $provider = $this->getProvider('xianzhibb', 'RefillCallBack');
  815. $ret = $provider->verify($params);
  816. $resp = $provider->notify($params);
  817. }
  818. public function testYikatong()
  819. {
  820. // $provider = $this->getProvider('yikatong');
  821. // $resp = $provider->balance();
  822. // $resp = $provider->add(18500608333, 5, 30, [
  823. // 'order_sn' => $this->make_sn()
  824. // ]);
  825. // $resp = $provider->query(['order_sn' => '54641640157747514762']);
  826. $body = '{"msg":"","code":"1","productId":"2000030","orderId":"54641640157747514762","systemOrderId":"1042390009","faceValue":"30","price":"28.35","appId":"200005","mobile":"18500608333","sign":"caafec8ef1abcf6db5517245dbeceb9c"}';
  827. $params = json_decode($body, true);
  828. $provider = $this->getProvider('yikatong', 'RefillCallBack');
  829. $ret = $provider->verify($params);
  830. $resp = $provider->notify($params);
  831. }
  832. public function testSanti()
  833. {
  834. $provider = $this->getProvider('santi');
  835. // $resp = $provider->get_product(17801048874);
  836. // $resp = $provider->add(18500608333, 5, 1024, [
  837. // 'order_sn' => $this->make_sn(),
  838. // 'goods_id' => 7000,
  839. // 'product_code' => 'XYZ100751'
  840. // ]);
  841. $resp = $provider->query(['ch_trade_no' => '1631945759171581']);
  842. // $resp = $provider->balance();
  843. $body = '{"channelOrderNo":"49991631861285846684","extraData":"","orderNo":"1631861288127072","orderStatus":"4","providerResultCode":"3","providerResultReason":"\u5145\u503c\u6210\u529f","resultCode":"1000","resultMessage":"\u6210\u529f","sign":"472490783eaa82c76a1af8702881f04f"}';
  844. $params = json_decode($body, true);
  845. $provider = $this->getProvider('santi', 'RefillCallBack');
  846. $ret = $provider->verify($params);
  847. $resp = $provider->notify($params);
  848. }
  849. public function testSialan_tax()
  850. {
  851. // $provider = $this->getProvider('sialan_tax');
  852. // $resp = $provider->balance();
  853. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  854. // $resp = $provider->query(['ch_trade_no' => '21112214170092559557647']);
  855. $body = '{"api_id":"16856","recharge":"18500608333","amount":"10","order_sn":"21112214170092559557647","query_sn":"64801637561821444619","operator_sn":"","status":"2","sign":"900a01a1268cb14a37d6567691303ed9"}';
  856. $params = json_decode($body, true);
  857. $provider = $this->getProvider('sialan_tax', 'RefillCallBack');
  858. $ret = $provider->verify($params);
  859. $resp = $provider->notify($params);
  860. }
  861. public function testYunchonggong_yd()
  862. {
  863. $provider = $this->getProvider('yunchonggong_yd');
  864. // $resp = $provider->balance();
  865. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  866. // $resp = $provider->query(['order_sn' => '40181650866044454847']);
  867. // $body = '{"szOrderId":"34061631002071526340","fSalePrice":"47.7","szAgentId":"200043","nFlag":"3","szVerifyString":"48a7329c13af06b5be1d2fdad706b22e","szPhoneNum":"13699279618","szRtnMsg":"","nDemo":"50"}';
  868. // $params = json_decode($body, true);
  869. // $provider = $this->getProvider('yunchonggong_yd','RefillCallBack');
  870. // $ret = $provider->verify($params);
  871. // $resp = $provider->notify($params);
  872. }
  873. public function testGuochuang_nation()
  874. {
  875. $provider = $this->getProvider('guochuang_nation');
  876. $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  877. // $resp = $provider->query(['order_sn' => '4372390688043259849812']);
  878. // $resp = $provider->balance();
  879. // $body = '{"account":"18500608333","evidence":"N/A","evidenceType":"","id":"D2021090718185107657","inTime":"2021/09/07 18:19:05","money":"1","outerId":"65261631009929751933","status":"SUCCESS"}';
  880. // $params['ts'] = 1631009945;
  881. // $params['sign'] = 'C53F921EB5573EF4D0C757C5B5D4185D';
  882. // $params['body'] = $body;
  883. // $provider = $this->getProvider('guochuang_nation','RefillCallBack');
  884. // $ret = $provider->verify($params);
  885. // $resp = $provider->notify($params);
  886. }
  887. public function testTianyanman()
  888. {
  889. $provider = $this->getProvider('tianyanman');
  890. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  891. // $resp = $provider->query(['order_sn' => '12191631078826857172', 'card_no' => 18500608333, 'card_type' => 5]);
  892. // $resp = $provider->balance();
  893. // $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"}';
  894. // $params = json_decode($body, true);
  895. // $provider = $this->getProvider('tianyanman','RefillCallBack');
  896. // $ret = $provider->verify($params);
  897. // $resp = $provider->notify($params);
  898. }
  899. public function testShimer()
  900. {
  901. $provider = $this->getProvider('shimier');
  902. // $resp = $provider->balance();
  903. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  904. // $resp = $provider->query(['order_sn' => '56391631086657239320']);
  905. // $body = '{"orderId":"210908153756535112","appId":"b3k6DRwSOw","outOrderId":"56391631086657239320","sign":"86f9e783a3374463d546bedfc6920eff","orderStatus":"3","completeTime":"20210908154810","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  906. // $params = json_decode($body, true);
  907. // $provider = $this->getProvider('shimier','RefillCallBack');
  908. // $ret = $provider->verify($params);
  909. // $resp = $provider->notify($params);
  910. }
  911. public function testZhongst_mix()
  912. {
  913. // $provider = $this->getProvider('zhongst_mix');
  914. // $resp = $provider->balance();
  915. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  916. // $resp = $provider->query(['order_sn' => '81331649907306739763']);
  917. $body = '{"orderId":"220414113514628825","appId":"aKz6PN5XIw","outOrderId":"81331649907306739763","sign":"140099d15593e363e6b2682a4c2f24c2","orderStatus":"2","completeTime":"20220414120642","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"110103308032204141204470484590"}';
  918. $params = json_decode($body, true);
  919. $provider = $this->getProvider('zhongst_mix', 'RefillCallBack');
  920. $ret = $provider->verify($params);
  921. $resp = $provider->notify($params);
  922. }
  923. public function testHangtong()
  924. {
  925. // $provider = $this->getProvider('hangtong');
  926. // $resp = $provider->balance();
  927. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  928. // $resp = $provider->query(['order_sn' => '68221631775122967358']);
  929. $body = '{"phone":"13699279618","orderNo":"F2109161452121045530","status":"success","otherNo":"68221631775122967358","msg":"提交/充值成功","ext":"524501553021467113"}';
  930. $params = json_decode($body, true);
  931. $provider = $this->getProvider('hangtong', 'RefillCallBack');
  932. $ret = $provider->verify($params);
  933. $resp = $provider->notify($params);
  934. }
  935. public function testJinfeng()
  936. {
  937. // $provider = $this->getProvider('jinfeng');
  938. // $resp = $provider->balance();
  939. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  940. // $resp = $provider->query(['order_sn' => '78561631769733386091']);
  941. $body = '{"orderNo":"F2109161322374838924","status":"003","consumerNo":"78561631769733386091","voucherNo":null,"mobile":"18500608333"}';
  942. $params = json_decode($body, true);
  943. $provider = $this->getProvider('jinfeng', 'RefillCallBack');
  944. $ret = $provider->verify($params);
  945. $resp = $provider->notify($params);
  946. }
  947. public function testDashang()
  948. {
  949. // $provider = $this->getProvider('dashang');
  950. // $resp = $provider->balance();
  951. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  952. // $resp = $provider->query(['order_sn' => '63101631784169445345']);
  953. $body = '{"userId":"80800346","bizId":"90290050","ejId":"90916171545126","downstreamSerialno":"67971631783703671946","status":"3","voucher":"","voucherType":"0","sign":"46b13acf67f271e2f85db189ab9e1391"}';
  954. $params = json_decode($body, true);
  955. $provider = $this->getProvider('dashang', 'RefillCallBack');
  956. $ret = $provider->verify($params);
  957. $resp = $provider->notify($params);
  958. }
  959. public function testYuanta()
  960. {
  961. // $provider = $this->getProvider('yuanta');
  962. // $resp = $provider->balance();
  963. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  964. // $resp = $provider->query(['order_sn' => '96081645088688480739']);
  965. $body = '{"orderId":"220217170449505863","appId":"Uar9JIo4Zz","outOrderId":"96081645088688480739","sign":"1483916dbdc2f3b6024894442af816aa","orderStatus":"2","completeTime":"20220217175606","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  966. $params = json_decode($body, true);
  967. $provider = $this->getProvider('yuanta', 'RefillCallBack');
  968. $ret = $provider->verify($params);
  969. $resp = $provider->notify($params);
  970. }
  971. public function testDuojing()
  972. {
  973. // $provider = $this->getProvider('duojing');
  974. // $resp = $provider->balance();
  975. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  976. // $resp = $provider->query(['order_sn' => '51421642755293155833']);
  977. // $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"}';
  978. // $params = json_decode($body, true);
  979. // $provider = $this->getProvider('duojing','RefillCallBack');
  980. // $ret = $provider->verify($params);
  981. // $resp = $provider->notify($params);
  982. }
  983. public function testMenggu()
  984. {
  985. $provider = $this->getProvider('menggu', 'RefillOil');
  986. // $resp = $provider->add(1000111100021211884, 2, 500, ['order_sn' => $this->make_sn()]);
  987. $resp = $provider->query(['order_sn' => '63021632301956855605']);
  988. // $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"}';
  989. // $params = json_decode($body, true);
  990. // $provider = $this->getProvider('menggu','RefillCallBack');
  991. // $ret = $provider->verify($params);
  992. // $resp = $provider->notify($params);
  993. }
  994. public function testMenggu_hf()
  995. {
  996. $provider = $this->getProvider('menggu_hf');
  997. // $resp = $provider->balance();
  998. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  999. // $resp = $provider->query(['order_sn' => '24481632298991701065']);
  1000. // $body = '{"orderId":"210922162318123069","appId":"1hqLCRUja7","outOrderId":"24481632298991701065","sign":"73faefba3e179641af0df6f59becce8f","orderStatus":"3","completeTime":"20210922162451","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1001. // $params = json_decode($body, true);
  1002. // $provider = $this->getProvider('menggu_hf','RefillCallBack');
  1003. // $ret = $provider->verify($params);
  1004. // $resp = $provider->notify($params);
  1005. }
  1006. public function testChizeng()
  1007. {
  1008. $provider = $this->getProvider('chizeng');
  1009. // $resp = $provider->balance();
  1010. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1011. $resp = $provider->query(['order_sn' => '7013163540140101017048563']);
  1012. // $body = '{"orderid":"UQX21102814052855105","sporderid":"71241635401103845030","userid":"10002523","merchantsubmittime":"20211028140512","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.35","sign":"0B97DC1E16EC3BC5F139AAC3FB4C51BF"}';
  1013. // $params = json_decode($body, true);
  1014. // $provider = $this->getProvider('chizeng','RefillCallBack');
  1015. // $ret = $provider->verify($params);
  1016. // $resp = $provider->notify($params);
  1017. }
  1018. public function testJinxin()
  1019. {
  1020. // $provider = $this->getProvider('jinxin');
  1021. // $resp = $provider->balance();
  1022. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1023. // $resp = $provider->query(['order_sn' => '83481632465671278322']);
  1024. $body = '{"orderNo":"210924140000185","requestId":"83481632465671278322","sign":"80184350EC5C60445A50C9450D6CFB28","status":1,"supplierNo":"110103353192109241442090289402","timeStamp":"2021-09-24 14:43:07"}';
  1025. $params = json_decode($body, true);
  1026. $provider = $this->getProvider('jinxin', 'RefillCallBack');
  1027. $ret = $provider->verify($params);
  1028. $resp = $provider->notify($params);
  1029. }
  1030. public function testKachong()
  1031. {
  1032. // $provider = $this->getProvider('kachong');
  1033. // $resp = $provider->balance();
  1034. // $resp = $provider->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
  1035. // $resp = $provider->query(['order_sn' => '30691632889605245135']);
  1036. $body = '{"szAgentId":"200046","szOrderId":"30691632889605245135","szPhoneNum":"18500608333","nDemo":"20","fSalePrice":"19.82","nFlag":"2","szVerifyString":"dbac0df5e9ff2b067f74850f0cf55f3c","szRtnMsg":"982100337029603"}';
  1037. $params = json_decode($body, true);
  1038. $provider = $this->getProvider('kachong', 'RefillCallBack');
  1039. $ret = $provider->verify($params);
  1040. $resp = $provider->notify($params);
  1041. }
  1042. public function testXingzyNormal()
  1043. {
  1044. // $provider = $this->getProvider('xingzy_normal');
  1045. // $resp = $provider->balance();
  1046. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1047. // $resp = $provider->query(['order_sn' => '62881632898853651364']);
  1048. $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}';
  1049. $params = json_decode($body, true);
  1050. $provider = $this->getProvider('xingzy_normal', 'RefillCallBack');
  1051. $ret = $provider->verify($params);
  1052. $resp = $provider->notify($params);
  1053. }
  1054. public function testDingxin()
  1055. {
  1056. $provider = $this->getProvider('dingxin');
  1057. $resp = $provider->balance();
  1058. }
  1059. public function testPushang()
  1060. {
  1061. $provider = $this->getProvider('pushang');
  1062. // $resp = $provider->balance();
  1063. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1064. $resp = $provider->query(['order_sn' => '23391632986567769626']);
  1065. // $body = '{"msg":"\u8d26\u52a1\u6263\u6b3e\u5931\u8d25","extOrderId":"22081632982700152800","orderId":"R2021093014240000154555","salePrice":"30.0900","sign":"b0fe238f16e516316729589d42ab97b1","state":"5","exchangeTraded":""}';
  1066. // $params = json_decode($body, true);
  1067. // $provider = $this->getProvider('pushang','RefillCallBack');
  1068. // $ret = $provider->verify($params);
  1069. // $resp = $provider->notify($params);
  1070. }
  1071. public function testDinghui()
  1072. {
  1073. // $providers = $this->getProvider('dinghui');
  1074. // $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1075. // $resp = $providers->query(['order_sn' => '84891634279500368841']);
  1076. // $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"}';
  1077. // $params = json_decode($body, true);
  1078. $params['method'] = 'order.charge.status.update.notify';
  1079. $params['format'] = 'json';
  1080. $params['sign'] = '60d4e658cb730b9d8cc0c451414de9b51b79d14fa217261f7bbcf4a3472553b093a5c2377abba9573ed9d5e1a39a9f693830671ff1e641cc97a9782d2b2f393bed6a7bd22be0c642a13e20a7c6cf9f562c11ae65335758bd58ee55853b555cc2e511b6655c6e944a9defa6f0247263578d1554ff7709a7ced90db93911562dcb485518a4da3c21cb650ff01cacfcfa8dd9de533f5a5be2accc065e23cbd38b1b104e15feb3ce823c8cb7c7d5adf3fef0be768d8c25dc813a9112a14ec54a9e2ee517a5ba5b9ce2234dd4329b61c5456a82405aa6d2a307b4ec04be52bd1e3e5b204a2a4d7899d6fbf0fc09cd443cddc947f02bf58730142e9edc2b98eeeae086';
  1081. $params['message'] = 'GYmjEFMoy5jUfg/Ju7NRCSyaoyg2fu9EWpABAHb55xKpkvIedqXPDqRwG6Lo7iNx0A2yc6/IaU7vqwNV9YEVZOwHBDtsGXuHK1GCq5KUaW70pq1wEKr6kgjAHDITH7XdB3jmdSAQFhQYTi5hCz5EWWAzRKLYgTZeDksePKshm67QDbJzr8hpTu+rA1X1gRVkVqAL750crFPclgeWEYFG4mO4ZlmqygUrgz4si+seZ3f0pq1wEKr6kgjAHDITH7XdkFLNHratZfufbZKIZ5r+CA==';
  1082. $params['msgtype'] = 'notify_msg';
  1083. $params['version'] = 'V2.0';
  1084. $params['app_id'] = 'yeziapi';
  1085. $params['notify_id'] = '0000017c83f4786201547473800e31ee';
  1086. $params['timestamp'] = '1634301409378';
  1087. $providers = $this->getProvider('dinghui', 'RefillCallBack');
  1088. $ret = $providers->verify($params);
  1089. $resp = $providers->notify($params);
  1090. }
  1091. public function testHuafutong()
  1092. {
  1093. // $provider = $this->getProvider('huafutong');
  1094. // $resp = $provider->balance();
  1095. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1096. // $resp = $provider->query(['order_sn' => '48151634200413207059']);
  1097. $body = '{"PostData":"MJ88hD85bb2VPjI+q9R64jrR2TnZQSUn+4PHZCz1of27YQswyLKdNoNyyNuVEd2+98raKRC0pD+KFQf6beJn5mgOe+u9JjTtqxM5VcVYX93DQACU1ZdfJ+rSx5WRMwvi"}';
  1098. $params = json_decode($body, true);
  1099. $provider = $this->getProvider('huafutong', 'RefillCallBack');
  1100. $data = $provider->notify($params);
  1101. }
  1102. public function testShuoruan()
  1103. {
  1104. $provider = $this->getProvider('shuoruan');
  1105. // $resp = $provider->balance();
  1106. $resp = $provider->add(13911129867, 5, 10, ['order_sn' => $this->make_sn()]);
  1107. // $resp = $provider->query(['order_sn' => '80261634802627091026']);
  1108. $params['Action'] = 'CX';
  1109. $params['AgentAccount'] = '18600608333';
  1110. $params['Agentbalance'] = '-9.970';
  1111. $params['Orderid'] = '80261634802627091026';
  1112. $params['Chargeid'] = '2162076796';
  1113. $params['Orderstatu_int'] = '16';
  1114. $params['Orderstatu_text'] = '缴费成功_';
  1115. $params['TransCash'] = '10.000';
  1116. $params['OrderPayment'] = '9.970';
  1117. $params['Errorcode'] = '0000';
  1118. $params['Errormsg'] = '';
  1119. $params['Sign'] = '654fbc24c3d0878247bc3be3ed699f16';
  1120. $provider = $this->getProvider('shuoruan', 'RefillCallBack');
  1121. // $ret = $provider->verify($params);
  1122. // $data = $provider->notify($params);
  1123. }
  1124. public function testLinzhu()
  1125. {
  1126. // $provider = $this->getProvider('linzhu');
  1127. // $resp = $provider->balance();
  1128. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1129. // $resp = $provider->query(['order_sn' => '43881634986696312260']);
  1130. $body = '{"orderNo":"F2110231858443112627","status":"019","consumerNo":"43881634986696312260","voucherNo":null,"mobile":"18500608333"}';
  1131. $params = json_decode($body, true);
  1132. $provider = $this->getProvider('linzhu', 'RefillCallBack');
  1133. $ret = $provider->verify($params);
  1134. $data = $provider->notify($params);
  1135. }
  1136. public function testFangxing()
  1137. {
  1138. $provider = $this->getProvider('fangxing');
  1139. // $resp = $provider->balance();
  1140. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(), 'order_id' => 111111]);
  1141. $resp = $provider->query(['order_sn' => '82581635239506988570']);
  1142. $body = '{"orderId":"O21102617115969210570","respCode":"10003","respMsg":"\u6210\u529f \u5bf9\u7aef\u6d41\u6c34\u53f7: 21102617611981771","sign":"013F54D5E415668D3E012BBDE9E4BF16","transNo":"82581635239506988570"}';
  1143. $params = json_decode($body, true);
  1144. $provider = $this->getProvider('fangxing', 'RefillCallBack');
  1145. $ret = $provider->verify($params);
  1146. $data = $provider->notify($params);
  1147. }
  1148. public function testHuafutongMan()
  1149. {
  1150. // $provider = $this->getProvider('huafutongman');
  1151. // $resp = $provider->balance();
  1152. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1153. // $resp = $provider->query(['order_sn' => '73721635476007331621']);
  1154. $body = '{"PostData":"1Gi96e4PzohQIdxj8W4uOH4Q5pzT8ZHyCc+ZpTl7XEEF5TPgXffD32KLy0l2fZ7X36qZTO4JJA\/4nhWJRERklMy1FQuan825KK5vy2zQ6FOxg8vXMy0e7HOVg0kx123i"}';
  1155. $params = json_decode($body, true);
  1156. $provider = $this->getProvider('huafutongman', 'RefillCallBack');
  1157. $data = $provider->notify($params);
  1158. }
  1159. public function testFeimingyu()
  1160. {
  1161. // $provider = $this->getProvider('feimingyu');
  1162. // $resp = $provider->balance();
  1163. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  1164. // $resp = $provider->query(['order_sn' => '33891681804839775889']);
  1165. $body = '{"finishTime":"20230418160354079","orderNo":"XY3569958846292104149","appId":"VIP006","applyNo":"33891681804839775889","orderStatusDesc":"\u5931\u8d25","sign":"9196fe618512ad84fe1fdbbeb687253a","orderStatus":"FAILED","ext2":"NORMAL_FAILED","timestamp":"20230418160657014"}';
  1166. $params = json_decode($body, true);
  1167. $provider = $this->getProvider('feimingyu', 'RefillCallback');
  1168. $ret = $provider->verify($params);
  1169. $resp = $provider->notify($params);
  1170. }
  1171. public function testDashangnormal()
  1172. {
  1173. // $provider = $this->getProvider('dashang_normal');
  1174. // $resp = $provider->balance();
  1175. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1176. // $resp = $provider->query(['order_sn' => '34461636081408575185']);
  1177. $body = '{"userId":"80800357","bizId":"60040030","ejId":"91105110431325","downstreamSerialno":"34461636081408575185","status":"3","voucher":"","voucherType":"0","sign":"24a40c2b677820533e418d4a2b3f0806"}';
  1178. $params = json_decode($body, true);
  1179. $provider = $this->getProvider('dashang_normal', 'RefillCallBack');
  1180. $ret = $provider->verify($params);
  1181. $resp = $provider->notify($params);
  1182. }
  1183. public function testHuafutong_doubi()
  1184. {
  1185. $provider = $this->getProvider('huafutong_doubi');
  1186. // $resp = $provider->balance();
  1187. $resp = $provider->add(588073521, 7, 100, [
  1188. 'order_sn' => $this->make_sn(),
  1189. 'product_code' => 'XYZ100747'
  1190. ]);
  1191. // $resp = $provider->query(['order_sn' => '53151629791019902609']);
  1192. // $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"}';
  1193. // $params = json_decode($body, true);
  1194. // $provider = $this->getProvider('huafutong_doubi','RefillCallBack');
  1195. // $ret = $provider->verify($params);
  1196. // $resp = $provider->notify($params);
  1197. }
  1198. public function testYunchonggongfs()
  1199. {
  1200. // $provider = $this->getProvider('yunchonggongfs');
  1201. // $resp = $provider->balance();
  1202. // $resp = $provider->add(13935705732, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 4]);
  1203. // $resp = $provider->query(['order_sn' => '44721636430254462028']);
  1204. $body = '{"orderId":"211109115744298048","appId":"Z1sU5unYK7","outOrderId":"44721636430254462028","sign":"a368d3f6a8c2ec2d2dbd587f9a78a937","orderStatus":"3","completeTime":"20211109115840","orderDesc":"timeout"}';
  1205. $params = json_decode($body, true);
  1206. $provider = $this->getProvider('yunchonggongfs', 'RefillCallBack');
  1207. $ret = $provider->verify($params);
  1208. $resp = $provider->notify($params);
  1209. }
  1210. public function testDingchi()
  1211. {
  1212. // $provider = $this->getProvider('dingchi');
  1213. // $resp = $provider->balance();
  1214. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1215. // $resp = $provider->query(['order_sn' => '70651636508446628072']);
  1216. $body = '{"userId":"671","bizId":"200","id":"32894267","downstreamSerialno":"70651636508446628072","status":"2","statusDesc":"","extend":"100101101002111100940543157996","sign":"984c4708c14d0c2e08295c5010109ecf"}';
  1217. $params = json_decode($body, true);
  1218. $provider = $this->getProvider('dingchi', 'RefillCallBack');
  1219. $ret = $provider->verify($params);
  1220. $resp = $provider->notify($params);
  1221. }
  1222. public function testYanhao()
  1223. {
  1224. // $provider = $this->getProvider('yanhao');
  1225. // $resp = $provider->balance();
  1226. // $resp = $provider->add(2423503330, 5, 30, ['order_sn' => $this->make_sn()]);
  1227. // $resp = $provider->query(['order_sn' => '49571636609949577130']);
  1228. $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":""}';
  1229. $params = json_decode($body, true);
  1230. $provider = $this->getProvider('yanhao', 'RefillCallBack');
  1231. $ret = $provider->verify($params);
  1232. $resp = $provider->notify($params);
  1233. }
  1234. public function testYikatongfs()
  1235. {
  1236. $provider = $this->getProvider('yikatongfs');
  1237. // $resp = $provider->balance();
  1238. // $resp = $provider->add(13935705732, 5, 30, ['order_sn' => $this->make_sn()]);
  1239. $resp = $provider->query(['order_sn' => '30551636705402587123']);
  1240. // $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"}';
  1241. // $params = json_decode($body, true);
  1242. // $provider = $this->getProvider('yikatongfs','RefillCallBack');
  1243. // $ret = $provider->verify($params);
  1244. // $resp = $provider->notify($params);
  1245. }
  1246. public function testLexiangLt()
  1247. {
  1248. // $provider = $this->getProvider('lexianglt');
  1249. // $resp = $provider->balance();
  1250. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1251. // $resp = $provider->query(['order_sn' => '48911637136021090867']);
  1252. $body = '{"PostData":"405deLsCOS2UNQTOH\/M+3IWDDMm841EhhBwTgdasFvVqqVS3RHA6YdIzxAS2g8PIjmie1mOw+aNzXZ\/8rVR8lQTjoaeOCkE04cTc07JvDe1IDtvO2e66u+zzO+x0MUfU"}';
  1253. $params = json_decode($body, true);
  1254. $provider = $this->getProvider('lexianglt', 'RefillCallBack');
  1255. $ret = $provider->verify($params);
  1256. $resp = $provider->notify($params);
  1257. }
  1258. public function testXiaoniu_doubi()
  1259. {
  1260. // $provider = $this->getProvider('xiaoniu_doubi');
  1261. // $resp = $provider->balance();
  1262. // $resp = $provider->add(608168539, 7, 30, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100771']);
  1263. // $resp = $provider->query(['order_sn' => '49401678258857712229']);
  1264. $body = '{"content":"","realAmt":"27.3000","status":"1","timestamp":"20230308150118","sign":"4ec73b268388c6f5b794e0d0d91a9ad1","orderNo":"23030815010252905769","mOrderNo":"49401678258857712229"}';
  1265. $params = json_decode($body, true);
  1266. $provider = $this->getProvider('xiaoniu_doubi', 'RefillCallBack');
  1267. $ret = $provider->verify($params);
  1268. $resp = $provider->notify($params);
  1269. }
  1270. public function testGuantu()
  1271. {
  1272. $provider = $this->getProvider('guantu');
  1273. // $resp = $provider->balance();
  1274. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1275. $resp = $provider->query(['order_sn' => '82321639620607197216']);
  1276. // $body = '{"orderId":"211207110843025294","appId":"sprTIuIsst","outOrderId":"86151638846512034929","sign":"a94dc11a88831c4cc9cf79cd2dc4b60c","orderStatus":"3","completeTime":"20211207110903","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1277. // $params = json_decode($body, true);
  1278. // $provider = $this->getProvider('guantu','RefillCallBack');
  1279. // $ret = $provider->verify($params);
  1280. // $resp = $provider->notify($params);
  1281. }
  1282. public function testYiqian()
  1283. {
  1284. $provider = $this->getProvider('yiqian');
  1285. $resp = $provider->balance();
  1286. // $resp = $provider->add(185001234561608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1287. // $resp = $provider->query(['order_sn' => '58661639626089905328']);
  1288. // $body = '{"extOrderId":"12871637568430713782","orderId":"R2021112216240026238817","salePrice":"9.9950","sign":"b42f61bfb59f9f36c26c68e4f37f5a19","state":"4","exchangeTraded":"110103308002111221607170298685"}';
  1289. // $params = json_decode($body, true);
  1290. // $provider = $this->getProvider('yiqian','RefillCallBack');
  1291. // $ret = $provider->verify($params);
  1292. // $resp = $provider->notify($params);
  1293. }
  1294. public function testYinghuochong()
  1295. {
  1296. // $provider = $this->getProvider('yinghuochong');
  1297. // $resp = $provider->balance();
  1298. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1299. // $resp = $provider->query(['order_sn' => '14911637655330156024']);
  1300. $body = '{"times":"20211123161536","orderId":"2021112316151926232932","voucher":"","customerOrderId":"14911637655330156024","qyKey":"qhsvsyvj9rsekyvadlctr1ptx135fb3t","sign":"15D3272BE7BB7B038EEC9EA344C86567","status":"2"}';
  1301. $params = json_decode($body, true);
  1302. $provider = $this->getProvider('yinghuochong', 'RefillCallBack');
  1303. $ret = $provider->verify($params);
  1304. $resp = $provider->notify($params);
  1305. }
  1306. public function testMeixu()
  1307. {
  1308. // $provider = $this->getProvider('meixu');
  1309. // $resp = $provider->balance();
  1310. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  1311. // $resp = $provider->query(['order_sn' => '89361637662404606711']);
  1312. $body = '{"orderid":"XOJ21112318130505847","sporderid":"89361637662404606711","userid":"10003105","merchantsubmittime":"20211123181328","resultno":"9","parvalue":"10","remark1":"","payno":"","fundbalance":"-10.02","sign":"634194D21B034356F32C5A9FB045F23F"}';
  1313. $params = json_decode($body, true);
  1314. $provider = $this->getProvider('meixu', 'RefillCallBack');
  1315. $ret = $provider->verify($params);
  1316. $resp = $provider->notify($params);
  1317. }
  1318. public function testFuyuan()
  1319. {
  1320. // $provider = $this->getProvider('fuyuan');
  1321. // $resp = $provider->balance();
  1322. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1323. // $resp = $provider->query(['order_sn' => '60431637736327027514']);
  1324. $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":""}';
  1325. $params = json_decode($body, true);
  1326. $provider = $this->getProvider('fuyuan', 'RefillCallBack');
  1327. $ret = $provider->verify($params);
  1328. $resp = $provider->notify($params);
  1329. }
  1330. public function testDongye()
  1331. {
  1332. $provider = $this->getProvider('dongye');
  1333. // $resp = $provider->balance();
  1334. $resp = $provider->add(15139608757, 4, 10, ['order_sn' => $this->make_sn()]);
  1335. // $resp = $provider->query(['order_sn' => '94031638352288398624']);
  1336. // $body = '{"orderid":"NYG21113016502782946","sporderid":"33391638262247818098","userid":"10003105","merchantsubmittime":"20211130165104","resultno":"1","parvalue":"30","remark1":"100101101012111301651024042626","payno":"100101101012111301651024042626","fundbalance":"-30.075","sign":"4075B5A1D2639B19B91AC2FF45B5CFFE"}';
  1337. // $params = json_decode($body, true);
  1338. // $provider = $this->getProvider('dongye','RefillCallBack');
  1339. // $ret = $provider->verify($params);
  1340. // $resp = $provider->notify($params);
  1341. }
  1342. public function testDongyefs()
  1343. {
  1344. $provider = $this->getProvider('dongyefs');
  1345. // $resp = $provider->balance();
  1346. // [$goods_id, $price] = $provider->goods(1, 10, 4, 6, []);
  1347. // $resp = $provider->add(13898167806, 4, 10, ['order_sn' => $this->make_sn(),'regin_no' => 6]);
  1348. $resp = $provider->query(['order_sn' => '24461638757715661527']);
  1349. }
  1350. public function testBaixuan()
  1351. {
  1352. // $provider = $this->getProvider('baixuan');
  1353. // $resp = $provider->balance();
  1354. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1355. // $resp = $provider->query(['order_sn' => '22241638773647636323']);
  1356. $body = '{"orderId":"211206145422241449","appId":"Hs2pvfcPTK","outOrderId":"22241638773647636323","sign":"acdd4cdbf6c9ad8d1eec12070caef9c7","orderStatus":"3","completeTime":"20211206145422","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1357. $params = json_decode($body, true);
  1358. $provider = $this->getProvider('baixuan', 'RefillCallBack');
  1359. $ret = $provider->verify($params);
  1360. $resp = $provider->notify($params);
  1361. }
  1362. public function testBaixuan_normal()
  1363. {
  1364. // $provider = $this->getProvider('baixuan_normal');
  1365. // $resp = $provider->balance();
  1366. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1367. // $resp = $provider->query(['order_sn' => '79931638775980503797']);
  1368. $body = '{"orderId":"211206153306269670","appId":"ntzRlj2kNV","outOrderId":"79931638775980503797","sign":"f67939b937f818e97c551e76b4b4e5ea","orderStatus":"3","completeTime":"20211206153309","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1369. $params = json_decode($body, true);
  1370. $provider = $this->getProvider('baixuan_normal', 'RefillCallBack');
  1371. $ret = $provider->verify($params);
  1372. $resp = $provider->notify($params);
  1373. }
  1374. public function testCangbuYd()
  1375. {
  1376. // $provider = $this->getProvider('cangbuyd');
  1377. // $resp = $provider->balance();
  1378. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1379. // $resp = $provider->query(['order_sn' => '12441638778449837197']);
  1380. $body = '{"customerId":"220","tmporder":"12441638778449837197","orderno":"s16387784558073061114220","number":"13699279618","money":"50","amount":"47.9500","code":"-1","cardno":"","voucher":"","sign":"6623dbe8e392b61ddc843e16804e9eed"}';
  1381. $params = json_decode($body, true);
  1382. $provider = $this->getProvider('cangbuyd', 'RefillCallBack');
  1383. $ret = $provider->verify($params);
  1384. $resp = $provider->notify($params);
  1385. }
  1386. public function testShangtou()
  1387. {
  1388. // $provider = $this->getProvider('shangtou');
  1389. // $resp = $provider->balance();
  1390. // $resp = $provider->add(1004638637, 4, 100, ['order_sn' => $this->make_sn()]);
  1391. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1392. $body = '{"order_id":"88791638870099595473","out_order_id":"EZZbg23f4K487498","orderBillNo":"","mchid":"20126","account":"1004638637","price":"100","status":"1","sign":"87c3fc2beaabb107ef80c06dd186742f"}';
  1393. $params = json_decode($body, true);
  1394. $provider = $this->getProvider('shangtou', 'RefillCallBack');
  1395. $ret = $provider->verify($params);
  1396. $resp = $provider->notify($params);
  1397. }
  1398. public function testGuantufs()
  1399. {
  1400. $provider = $this->getProvider('guantufs');
  1401. // $resp = $provider->balance();
  1402. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1403. // $resp = $provider->query(['order_sn' => '88791638870099595473']);
  1404. }
  1405. public function testRuixunda()
  1406. {
  1407. // $provider = $this->getProvider('ruixunda');
  1408. // $resp = $provider->balance();
  1409. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1410. // $resp = $provider->query(['order_sn' => '77251661569789921261']);
  1411. $body = '{"orderid":"LRF22082711096411807","sporderid":"77251661569789921261","userid":"10002506","merchantsubmittime":"20220827110959","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-21500.17","sign":"34DD64D730CC71BD74A64A86FF623754"}';
  1412. $params = json_decode($body, true);
  1413. $provider = $this->getProvider('ruixunda', 'RefillCallBack');
  1414. $ret = $provider->verify($params);
  1415. $resp = $provider->notify($params);
  1416. }
  1417. public function testDashang_kami()
  1418. {
  1419. $provider = $this->getProvider('dashang_kami');
  1420. $resp = $provider->balance();
  1421. }
  1422. public function testWenye_oil()
  1423. {
  1424. $provider = $this->getProvider('wenye_oil', 'RefillOil');
  1425. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  1426. }
  1427. public function testYunlingdf()
  1428. {
  1429. $provider = $this->getProvider('yunlingdf');
  1430. // $resp = $provider->balance();
  1431. $resp = $provider->add(2079727198, 7, 100, [
  1432. 'order_sn' => $this->make_sn(), 'company_type' => 'nation', 'use_type' => 'home',
  1433. 'province' => 18, 'city' => '永州市', 'product_code' => 'DF_nation_home_100'
  1434. ]);
  1435. // $resp = $provider->query(['order_sn' => '45331652932902024418']);
  1436. // $body = ' {"orderid":"JDE22051911549026252","sporderid":"26641652932472092667","userid":"10002623","merchantsubmittime":"20220519115448","resultno":"9","parvalue":"100","remark1":"","payno":"","fundbalance":"-140.5","sign":"1EC1F9730A66ED23B68B89DD7CA4EB15"}';
  1437. // $params = json_decode($body, true);
  1438. // $provider = $this->getProvider('yunlingdf', 'RefillCallBack');
  1439. // $ret = $provider->verify($params);
  1440. // $resp = $provider->notify($params);
  1441. }
  1442. public function testYamiao_high()
  1443. {
  1444. $provider = $this->getProvider('yamiao_high');
  1445. $resp = $provider->balance();
  1446. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1447. // $resp = $provider->query(['order_sn' => '63301640162626708212']);
  1448. // $body = '{"orderId":"211222164353000006","appId":"piFzrSOCIy","outOrderId":"63301640162626708212","sign":"558e9992d99fb5e9dd47b1f5a7677b01","orderStatus":"3","completeTime":"20211222164445","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1449. // $params = json_decode($body, true);
  1450. // $provider = $this->getProvider('yamiao_high','RefillCallBack');
  1451. // $ret = $provider->verify($params);
  1452. // $resp = $provider->notify($params);
  1453. }
  1454. public function testYamiao_normal()
  1455. {
  1456. $provider = $this->getProvider('yamiao_normal');
  1457. $resp = $provider->balance();
  1458. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1459. // $resp = $provider->query(['order_sn' => '95951640223816352024']);
  1460. // $body = '{"orderId":"211223094402000046","appId":"1pjrA9YErq","outOrderId":"95951640223816352024","sign":"5bd7135f5ef35c8f111eddfc06593941","orderStatus":"3","completeTime":"20211223094512","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1461. // $params = json_decode($body, true);
  1462. // $provider = $this->getProvider('yamiao_normal','RefillCallBack');
  1463. // $ret = $provider->verify($params);
  1464. // $resp = $provider->notify($params);
  1465. }
  1466. public function testJiyemei_doubi()
  1467. {
  1468. $provider = $this->getProvider('jiyemei_doubi');
  1469. // $resp = $provider->balance();
  1470. $resp = $provider->add(588073521, mtopcard\ThirdRefillCard, 50, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100753']);
  1471. // $resp = $provider->query(['order_sn' => '87081640849391308752']);
  1472. // $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"}';
  1473. // $params = json_decode($body, true);
  1474. // $provider = $this->getProvider('jiyemei_doubi','RefillCallBack');
  1475. // $ret = $provider->verify($params);
  1476. // $resp = $provider->notify($params);
  1477. }
  1478. public function testJiyemei()
  1479. {
  1480. // $provider = $this->getProvider('jiyemei');
  1481. // $resp = $provider->balance();
  1482. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1483. // $resp = $provider->query(['order_sn' => '22041640934793168827']);
  1484. $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"}';
  1485. $params = json_decode($body, true);
  1486. $provider = $this->getProvider('jiyemei', 'RefillCallBack');
  1487. $ret = $provider->verify($params);
  1488. $resp = $provider->notify($params);
  1489. }
  1490. public function testCangxin()
  1491. {
  1492. $provider = $this->getProvider('cangxin');
  1493. // $resp = $provider->balance();
  1494. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 100, ['order_sn' => $this->make_sn()]);
  1495. $resp = $provider->query(['order_sn' => '7388320697632252006499']);
  1496. // $body = '{"sysOrderNo":"R16409227448286K55VRJ","clientId":"10025","verifyString":"557363563501c97e9aa2f5cecc0b3679","clientOrderNo":"66891640922736203952","status":"3"}';
  1497. // $params = json_decode($body, true);
  1498. // $provider = $this->getProvider('cangxin','RefillCallBack');
  1499. // $ret = $provider->verify($params);
  1500. // $resp = $provider->notify($params);
  1501. }
  1502. public function testBaixuannew_high()
  1503. {
  1504. // $provider = $this->getProvider('baixuannew_high');
  1505. // $resp = $provider->balance();
  1506. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1507. // $resp = $provider->query(['order_sn' => '24051641457089799916']);
  1508. $body = '{"orderid":"PLN22010616189234154","sporderid":"24051641457089799916","userid":"10002504","merchantsubmittime":"20220106162023","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.1","sign":"0279426E9CCEF5366B422D44DB5976C1"}';
  1509. $params = json_decode($body, true);
  1510. $provider = $this->getProvider('baixuannew_high', 'RefillCallBack');
  1511. $ret = $provider->verify($params);
  1512. $resp = $provider->notify($params);
  1513. }
  1514. public function testYouhenew()
  1515. {
  1516. // $provider = $this->getProvider('youhenew');
  1517. // $resp = $provider->balance();
  1518. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1519. // $resp = $provider->query(['order_sn' => '77201646366493835757']);
  1520. $body = '{"szOrderId":"77201646366493835757","fSalePrice":"28.59","szAgentId":"200038","nFlag":"3","szVerifyString":"bdaa73499a506839654d4b9c36c6831a","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  1521. $params = json_decode($body, true);
  1522. $provider = $this->getProvider('youhenew', 'RefillCallBack');
  1523. $ret = $provider->verify($params);
  1524. $resp = $provider->notify($params);
  1525. }
  1526. public function testHuoshenguo()
  1527. {
  1528. // $provider = $this->getProvider('huoshenguo');
  1529. // $resp = $provider->balance();
  1530. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 50, ['order_sn' => $this->make_sn()]);
  1531. // $resp = $provider->query(['order_sn' => '90691642049771400349']);
  1532. $body = '{"orderId":"220113125625000016","appId":"xaPOF8SAEG","outOrderId":"90691642049771400349","sign":"b00285a7eabef29b0a0ad400ce8a3ea0","orderStatus":"3","completeTime":"20220113125843","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1533. $params = json_decode($body, true);
  1534. $provider = $this->getProvider('huoshenguo', 'RefillCallBack');
  1535. $ret = $provider->verify($params);
  1536. $resp = $provider->notify($params);
  1537. }
  1538. public function testXinhengyangnew()
  1539. {
  1540. // $provider = $this->getProvider('xinhengyangnew');
  1541. // $resp = $provider->balance();
  1542. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 30, ['order_sn' => $this->make_sn()]);
  1543. // $resp = $provider->query(['order_sn' => '90991642572014786398']);
  1544. $body = '{"mchid":"200050","msg":"充值失败","oid":"1000325764014","orderid":"90991642572014786398","price":28.62,"sign":"56db7e6a4748a74bd1fac1a1ad5e8d6d","status":2,"voucher":""}';
  1545. $params = json_decode($body, true);
  1546. $provider = $this->getProvider('xinhengyangnew', 'RefillCallBack');
  1547. $ret = $provider->verify($params);
  1548. $resp = $provider->notify($params);
  1549. }
  1550. public function testTianchen()
  1551. {
  1552. // $provider = $this->getProvider('tianchen');
  1553. // $resp = $provider->balance();
  1554. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 500, ['order_sn' => $this->make_sn()]);
  1555. // $resp = $provider->query(['order_sn' => '60701644202744810497']);
  1556. $body = '{"mchid":"100125","msg":"充值失败","oid":"1000061410881","orderid":"60701644202744810497","price":"501.000","sign":"5dc1f9e466f30f02f2756c886ad36020","status":"2","voucher":""}';
  1557. $params = json_decode($body, true);
  1558. $provider = $this->getProvider('tianchen', 'RefillCallBack');
  1559. $ret = $provider->verify($params);
  1560. $resp = $provider->notify($params);
  1561. }
  1562. public function testYunchonggong_lt()
  1563. {
  1564. // $provider = $this->getProvider('yunchonggong_lt');
  1565. // $resp = $provider->balance();
  1566. // $resp = $provider->add(18500608333, mtopcard\ChinaUnicomCard, 50, ['order_sn' => $this->make_sn()]);
  1567. // $resp = $provider->query(['order_sn' => '97971642992760355090']);
  1568. $body = '{"orderId":"220124105256190713","appId":"nOlXoN2jRJ","outOrderId":"97971642992760355090","sign":"81a579f8c935da72fe94ca0960d0a71f","orderStatus":"3","completeTime":"20220124105547","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1569. $params = json_decode($body, true);
  1570. $provider = $this->getProvider('yunchonggong_lt', 'RefillCallBack');
  1571. $ret = $provider->verify($params);
  1572. $resp = $provider->notify($params);
  1573. }
  1574. public function testYiqianfs()
  1575. {
  1576. // $provider = $this->getProvider('yiqianfs');
  1577. // $resp = $provider->balance();
  1578. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  1579. // $resp = $provider->query(['order_sn' => '68971644218662333282']);
  1580. $body = '{"extOrderId":"68971644218662333282","orderId":"R2022020715240046789583","salePrice":"10.0000","sign":"cf59a3d76377cac096ac07c590657af0","state":"5"}';
  1581. $params = json_decode($body, true);
  1582. $provider = $this->getProvider('yiqianfs','RefillCallBack');
  1583. $ret = $provider->verify($params);
  1584. $resp = $provider->notify($params);
  1585. }
  1586. public function testZhutian()
  1587. {
  1588. $provider = $this->getProvider('zhutian');
  1589. // $resp = $provider->add(1004638637, 4, 50, ['order_sn' => $this->make_sn(), 'province' => 1]);
  1590. $resp = $provider->query(['order_sn' => '20661644895674724153']);
  1591. }
  1592. public function testRuizhi()
  1593. {
  1594. // $provider = $this->getProvider('ruizhi');
  1595. // $resp = $provider->balance();
  1596. // $resp = $provider->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
  1597. // $resp = $provider->query(['order_sn' => '66031645157064675953']);
  1598. $body = '{"userid":"65920","order_id":"22021812045065920f2b95cef2","account":"13699279618","amount":"100","price":"100.05","state":"success","user_order":"66031645157064675953","sign":"642AAB4C5A9CC56248AE80113878DB19","voucher":"220218-097370786582375"}';
  1599. $params = json_decode($body, true);
  1600. $provider = $this->getProvider('ruizhi','RefillCallBack');
  1601. $ret = $provider->verify($params);
  1602. $resp = $provider->notify($params);
  1603. }
  1604. public function testRuierxun()
  1605. {
  1606. // $provider = $this->getProvider('ruierxun');
  1607. // $resp = $provider->balance();
  1608. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1609. // $resp = $provider->query(['order_sn' => '48011645165293970916']);
  1610. $body = '{"orderId":"220218142143123894","appId":"LaEORKdrnZ","outOrderId":"48011645165293970916","sign":"28f30e616d06e7936d612995bb086d39","orderStatus":"3","completeTime":"20220218142205","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1611. $params = json_decode($body, true);
  1612. $provider = $this->getProvider('ruierxun','RefillCallBack');
  1613. $ret = $provider->verify($params);
  1614. $resp = $provider->notify($params);
  1615. }
  1616. public function testNingying()
  1617. {
  1618. // $provider = $this->getProvider('ningying');
  1619. // $resp = $provider->balance();
  1620. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  1621. // $resp = $provider->query(['order_sn' => '59481645434420716297']);
  1622. $body = '{"orderId":"220221170704698128","appId":"O8y6eOzWY1","outOrderId":"59481645434420716297","sign":"7476bd7d6cb51a5b25a183145d4a0ada","orderStatus":"3","completeTime":"20220221171148","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1623. $params = json_decode($body, true);
  1624. $provider = $this->getProvider('ningying','RefillCallBack');
  1625. $ret = $provider->verify($params);
  1626. $resp = $provider->notify($params);
  1627. }
  1628. public function testCangxin_yi()
  1629. {
  1630. // $provider = $this->getProvider('cangxin_yi');
  1631. // $resp = $provider->balance();
  1632. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  1633. // $resp = $provider->query(['order_sn' => '98761645683605613490']);
  1634. $body = '{"sysOrderNo":"R1645683614014oToK4ua","officialOrderNo":"","clientId":"10043","verifyString":"4040530613390299cf5d432a59dad348","clientOrderNo":"98761645683605613490","status":"4"}';
  1635. $params = json_decode($body, true);
  1636. $provider = $this->getProvider('cangxin_yi','RefillCallBack');
  1637. $ret = $provider->verify($params);
  1638. $resp = $provider->notify($params);
  1639. }
  1640. public function testZhenghe()
  1641. {
  1642. // $provider = $this->getProvider('zhenghe');
  1643. // $resp = $provider->balance();
  1644. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  1645. // $resp = $provider->query(['order_sn' => '20411645686498504519']);
  1646. $body = '{"szOrderId":"20411645686498504519","fSalePrice":"30.15","szAgentId":"200032","nFlag":"2","szVerifyString":"af368366f759289054328390f419d062","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  1647. $params = json_decode($body, true);
  1648. $provider = $this->getProvider('zhenghe','RefillCallBack');
  1649. $ret = $provider->verify($params);
  1650. $resp = $provider->notify($params);
  1651. }
  1652. public function testLexiang()
  1653. {
  1654. // $provider = $this->getProvider('lexiang');
  1655. // $resp = $provider->balance();
  1656. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1657. // $resp = $provider->query(['order_sn' => '36181645780442291806', 'commit_time' => 1645780259]);
  1658. $body = '{"mchId":"20","mchOrderNo":"36181645780442291806","sysOrderNo":"S202202251714039EusUAV0yO","account":"18074608795","money":"30.0000","status":"2","sign":"c55977367aa083850456c5ec7c14ed87","certificate":"1000000083422022517369130925"}';
  1659. $params = json_decode($body, true);
  1660. $provider = $this->getProvider('lexiang','RefillCallBack');
  1661. $ret = $provider->verify($params);
  1662. $resp = $provider->notify($params);
  1663. }
  1664. public function testKuaikuai()
  1665. {
  1666. // $provider = $this->getProvider('kuaikuai');
  1667. // $resp = $provider->balance();
  1668. // $resp = $provider->add(185006083, 5, 30, ['order_sn' => $this->make_sn()]);
  1669. // $resp = $provider->query(['order_sn' => '48821646219340197679']);
  1670. $body = '{"msg":"100101101012202281653493036477","orderId":"37691646038424123424","createTime":1646038427,"sign":"35df4f13ee4dcaed2d582d709ff66073","orderNum":"2c922ab97f2683b5017f3f89246d1e4a","status":2}';
  1671. $params = json_decode($body, true);
  1672. $provider = $this->getProvider('kuaikuai','RefillCallBack');
  1673. $ret = $provider->verify($params);
  1674. $resp = $provider->notify($params);
  1675. }
  1676. public function testJianjiao()
  1677. {
  1678. $provider = $this->getProvider('jianjiao');
  1679. // $resp = $provider->balance();
  1680. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1681. // $resp = $provider->query(['order_sn' => '14481646204704630736']);
  1682. // $body = '{"order_id":"22030215052639807","out_order_id":"14481646204704630736","status":3,"mobile":"13699279618","amount":50,"app_key":"3l6kd2yqsvcwftij","official_sn":"","timestamp":1646205722,"sign":"db77f48b8964b74e9c5e44fa9b3dcf49"}';
  1683. // $params = json_decode($body, true);
  1684. // $provider = $this->getProvider('jianjiao','RefillCallBack');
  1685. // $ret = $provider->verify($params);
  1686. // $resp = $provider->notify($params);
  1687. }
  1688. public function testHuoli()
  1689. {
  1690. // $provider = $this->getProvider('huoli');
  1691. // $resp = $provider->balance();
  1692. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1693. // $resp = $provider->query(['order_sn' => '89741646294399883574']);
  1694. $body = '{"app_key":"expzye","out_trade_no":"89741646294399883574","sign":"24adfe57f5ada22db154d4ed4b4b8e5f","status":2}';
  1695. $params = json_decode($body, true);
  1696. $provider = $this->getProvider('huoli','RefillCallBack');
  1697. $ret = $provider->verify($params);
  1698. $resp = $provider->notify($params);
  1699. }
  1700. public function testNingying_normal()
  1701. {
  1702. $provider = $this->getProvider('ningying_normal');
  1703. // $resp = $provider->balance();
  1704. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1705. // $resp = $provider->query(['order_sn' => '83651658900120901860']);
  1706. $body = '{"szOrderId":"83651658900120901860","fSalePrice":"94.2","szAgentId":"200006","nFlag":"3","szVerifyString":"44fff983651dd01946c400085b9efd32","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"100"}';
  1707. $params = json_decode($body, true);
  1708. $provider = $this->getProvider('ningying_normal','RefillCallBack');
  1709. $ret = $provider->verify($params);
  1710. $resp = $provider->notify($params);
  1711. }
  1712. public function testYuanrun()
  1713. {
  1714. // $provider = $this->getProvider('yuanrun');
  1715. // $resp = $provider->balance();
  1716. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1717. // $resp = $provider->query(['order_sn' => '25801646616116681917', 'card_no' => 18500608333, 'commit_time' => 1646616131]);
  1718. $body = '{"cpid":"49449","order_no":"22030709220549449952471675","mobile":"18500608333","amount":"30","status":"success","sz_order_no":"100101101042203070922143047338","ret_para":"25801646616116681917","sign":"2fd2661ce353e4cb554d7d3ca3f09f4d"}';
  1719. $params = json_decode($body, true);
  1720. $provider = $this->getProvider('yuanrun','RefillCallBack');
  1721. $ret = $provider->verify($params);
  1722. $resp = $provider->notify($params);
  1723. }
  1724. public function testFeimingyunew()
  1725. {
  1726. $provider = $this->getProvider('feimingyunew');
  1727. // $resp = $provider->balance();
  1728. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1729. // $resp = $provider->query(['order_sn' => '24001646631354076583']);
  1730. // $body = '{"orderid":"AUH22030713352134241","sporderid":"24001646631354076583","userid":"10002506","merchantsubmittime":"20220307133712","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.26","sign":"0C4A264A6692C68EB8CC000BEC5C0E53"}';
  1731. // $params = json_decode($body, true);
  1732. // $provider = $this->getProvider('feimingyunew','RefillCallBack');
  1733. // $ret = $provider->verify($params);
  1734. // $resp = $provider->notify($params);
  1735. }
  1736. public function testBailian()
  1737. {
  1738. $provider = $this->getProvider('bailian', 'RefillOil');
  1739. $resp = $provider->balance();
  1740. }
  1741. public function testHangtongyj()
  1742. {
  1743. $provider = $this->getProvider('hangtongyj');
  1744. // $resp = $provider->balance();
  1745. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1746. $resp = $provider->query(['order_sn' => '13791646729519910878']);
  1747. // $body = '{"phone":"13699279618","orderNo":"F2203081623054678137","status":"fail","otherNo":"23351646727780199005","msg":"产品不存在","ext":null}';
  1748. // $params = json_decode($body, true);
  1749. // $provider = $this->getProvider('hangtongyj','RefillCallBack');
  1750. // $ret = $provider->verify($params);
  1751. // $resp = $provider->notify($params);
  1752. }
  1753. public function testRuixundaman()
  1754. {
  1755. // $provider = $this->getProvider('ruixundaman');
  1756. // $resp = $provider->balance();
  1757. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1758. // $resp = $provider->query(['order_sn' => '98441646796808890306']);
  1759. $body = '{"orderId":"220309113357355093","appId":"8tYeow0MYZ","outOrderId":"98441646796808890306","sign":"ec2619a26a11e3320fcdc71fccc7b310","orderStatus":"2","completeTime":"20220309193655","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"2022233820220309193635"}';
  1760. $params = json_decode($body, true);
  1761. $provider = $this->getProvider('ruixundaman','RefillCallBack');
  1762. $ret = $provider->verify($params);
  1763. $resp = $provider->notify($params);
  1764. }
  1765. public function testRuizhi_tax()
  1766. {
  1767. // $provider = $this->getProvider('ruizhi_tax');
  1768. // $resp = $provider->balance();
  1769. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1770. // $resp = $provider->query(['order_sn' => '36411646882603857635']);
  1771. $body = '{"userid":"10713","order_id":"22031011232910713e1bc01a6b","account":"13699279618","amount":"50","price":"52.15","state":"success","user_order":"36411646882603857635","sign":"3CEDF5DF4F8A178471FA24B07C8D9BBB","voucher":"2022031027610736554488548137"}';
  1772. $params = json_decode($body, true);
  1773. $provider = $this->getProvider('ruizhi_tax','RefillCallBack');
  1774. $ret = $provider->verify($params);
  1775. $resp = $provider->notify($params);
  1776. }
  1777. public function testPengxinda()
  1778. {
  1779. $provider = $this->getProvider('pengxinda');
  1780. // $resp = $provider->balance();
  1781. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1782. // $resp = $provider->query(['order_sn' => '29131646900654146357']);
  1783. // $body = '{"api_userid":"beijingyz","order_no":"29131646900654146357","retcode":"1","errcode":"100101101042203101624383157550"}';
  1784. // $params = json_decode($body, true);
  1785. // $provider = $this->getProvider('pengxinda','RefillCallBack');
  1786. // $ret = $provider->verify($params);
  1787. // $resp = $provider->notify($params);
  1788. }
  1789. public function testHuazhong()
  1790. {
  1791. $provider = $this->getProvider('huazhong');
  1792. // $resp = $provider->balance();
  1793. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  1794. $resp = $provider->query(['order_sn' => '58581646984524382528']);
  1795. // $body = ' {"orderid":"GCN22031115279906665","sporderid":"54011646983613476599","userid":"10002763","merchantsubmittime":"20220311153014","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.65","sign":"198392B102B9B9FB60D52EF93EF2BDCC"}';
  1796. // $params = json_decode($body, true);
  1797. // $provider = $this->getProvider('huazhong','RefillCallBack');
  1798. // $ret = $provider->verify($params);
  1799. // $resp = $provider->notify($params);
  1800. }
  1801. public function testYamiaoman()
  1802. {
  1803. // $provider = $this->getProvider('yamiaoman');
  1804. // $resp = $provider->balance();
  1805. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1806. // $resp = $provider->query(['order_sn' => '53351647242979116742']);
  1807. $body = '{"orderId":"220314152954756093","appId":"zIODZmzSCk","outOrderId":"53351647242979116742","sign":"41ad7d4b4b26559377c6443d2b0d6c68","orderStatus":"3","completeTime":"20220314172722","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1808. $params = json_decode($body, true);
  1809. $provider = $this->getProvider('yamiaoman','RefillCallBack');
  1810. $ret = $provider->verify($params);
  1811. $resp = $provider->notify($params);
  1812. }
  1813. public function testKailinyu()
  1814. {
  1815. // $provider = $this->getProvider('kailinyu');
  1816. // $resp = $provider->balance();
  1817. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1818. // $resp = $provider->query(['order_sn' => '94371658718403772370']);
  1819. $body = '{"orderId":"220725110647030575","appId":"FcSAzHuWQ4","outOrderId":"94371658718403772370","sign":"6c2c7c91864f12ff1986ac4ea6fd7b4f","orderStatus":"3","completeTime":"20220725110647","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1820. $params = json_decode($body, true);
  1821. $provider = $this->getProvider('kailinyu','RefillCallBack');
  1822. $ret = $provider->verify($params);
  1823. $resp = $provider->notify($params);
  1824. }
  1825. public function testKuaikuaifs()
  1826. {
  1827. $provider = $this->getProvider('kuaikuaifs');
  1828. // $resp = $provider->balance();
  1829. $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1830. // $resp = $provider->query(['order_sn' => '96401647327929264712']);
  1831. }
  1832. public function testYouheman()
  1833. {
  1834. // $provider = $this->getProvider('youheman');
  1835. // $resp = $provider->balance();
  1836. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1837. // $resp = $provider->query(['order_sn' => '65891648444382784227']);
  1838. $body = '{"szOrderId":"65891648444382784227","fSalePrice":"91.5","szAgentId":"200040","nFlag":"2","szVerifyString":"899758ef408c86164529a3724806d52b","szPhoneNum":"18500608333","szRtnMsg":"OM1508468825220870144","nDemo":"100"}';
  1839. $params = json_decode($body, true);
  1840. $provider = $this->getProvider('youheman','RefillCallBack');
  1841. $ret = $provider->verify($params);
  1842. $resp = $provider->notify($params);
  1843. }
  1844. public function testHuoshenguoman()
  1845. {
  1846. // $provider = $this->getProvider('huoshenguoman');
  1847. // $resp = $provider->balance();
  1848. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1849. // $resp = $provider->query(['order_sn' => '89261649309598653504']);
  1850. $body = '{"orderId":"220407133327635878","appId":"tME7rcK07P","outOrderId":"89261649309598653504","sign":"e46a90c064177aa34cac3a3951410df9","orderStatus":"3","completeTime":"20220407140654","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1851. $params = json_decode($body, true);
  1852. $provider = $this->getProvider('huoshenguoman','RefillCallBack');
  1853. $ret = $provider->verify($params);
  1854. $resp = $provider->notify($params);
  1855. }
  1856. public function testGuitong()
  1857. {
  1858. // $provider = $this->getProvider('guitong');
  1859. // $resp = $provider->balance();
  1860. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1861. // $resp = $provider->query(['order_sn' => '15551649669272272125']);
  1862. $body = '{"szOrderId":"15551649669272272125","fSalePrice":"28.62","szAgentId":"200062","nFlag":"3","szVerifyString":"62e5b8a71935a36acf563f232b75210e","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  1863. $params = json_decode($body, true);
  1864. $provider = $this->getProvider('guitong','RefillCallBack');
  1865. $ret = $provider->verify($params);
  1866. $resp = $provider->notify($params);
  1867. }
  1868. public function testYouhedf()
  1869. {
  1870. // $provider = $this->getProvider('youhedf');
  1871. // $resp = $provider->balance();
  1872. // $resp = $provider->add(1004638637, 101, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  1873. // $resp = $provider->query(['order_sn' => '80821649748836825835']);
  1874. $body = '{"szOrderId":"27341649750036121132","fSalePrice":"46.5","szAgentId":"200044","nFlag":"3","szVerifyString":"52b9057e467f09cf21eaceacddb475e6","szPhoneNum":"1004638637","szRtnMsg":"","nDemo":"50"}';
  1875. $params = json_decode($body, true);
  1876. $provider = $this->getProvider('youhedf', 'RefillCallBack');
  1877. }
  1878. public function testYunchonggongman()
  1879. {
  1880. // $provider = $this->getProvider('yunchonggongman');
  1881. // $resp = $provider->balance();
  1882. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1883. // $resp = $provider->query(['order_sn' => '72011649828177343273']);
  1884. $body = '{"orderId":"220413133619562061","appId":"P9EYSTJenh","outOrderId":"72011649828177343273","sign":"5294a7cea3c30049f82454012d9dd028","orderStatus":"3","completeTime":"20220413140642","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  1885. $params = json_decode($body, true);
  1886. $provider = $this->getProvider('yunchonggongman','RefillCallBack');
  1887. $ret = $provider->verify($params);
  1888. $resp = $provider->notify($params);
  1889. }
  1890. public function testJike()
  1891. {
  1892. // $provider = $this->getProvider('jike');
  1893. // $resp = $provider->balance();
  1894. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1895. // $resp = $provider->query(['order_sn' => '61891650433011979641']);
  1896. $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"}';
  1897. $params = json_decode($body, true);
  1898. $provider = $this->getProvider('jike','RefillCallBack');
  1899. $ret = $provider->verify($params);
  1900. $resp = $provider->notify($params);
  1901. }
  1902. public function testJumeng()
  1903. {
  1904. // $provider = $this->getProvider('jumeng');
  1905. // $resp = $provider->balance();
  1906. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1907. // $resp = $provider->query(['order_sn' => '61891650433011979641']);
  1908. $body = '{"orderid":"NRG22042415190852684","sporderid":"54521650784779022915","userid":"10002591","merchantsubmittime":"20220424152241","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.32","sign":"315A02F52F772BFBE681541DC5D5A68F"}';
  1909. $params = json_decode($body, true);
  1910. $provider = $this->getProvider('jumeng','RefillCallBack');
  1911. $ret = $provider->verify($params);
  1912. $resp = $provider->notify($params);
  1913. }
  1914. public function testShantong()
  1915. {
  1916. // $provider = $this->getProvider('shantong');
  1917. // $resp = $provider->balance();
  1918. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  1919. // $resp = $provider->query(['order_sn' => '35151650783370889788']);
  1920. $body = '{"orderId":"23691650852278427609","mobile":"18500608333","sign":"e7239f5bc48819fcb18942ae56beba6c","orderStatus":3,"businessOrderId":"10040425100000001","finishDate":"2022-04-25 10:24:17","perValue":100}';
  1921. $params = json_decode($body, true);
  1922. $provider = $this->getProvider('shantong','RefillCallBack');
  1923. $ret = $provider->verify($params);
  1924. $resp = $provider->notify($params);
  1925. }
  1926. public function testYelin_hf()
  1927. {
  1928. // $provider = $this->getProvider('yelin_hf');
  1929. // $resp = $provider->balance();
  1930. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  1931. // $resp = $provider->query(['order_sn' => '96211651214739034917']);
  1932. $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"}';
  1933. $params = json_decode($body, true);
  1934. $provider = $this->getProvider('yelin_hf','RefillCallBack');
  1935. $ret = $provider->verify($params);
  1936. $resp = $provider->notify($params);
  1937. }
  1938. public function testAinika()
  1939. {
  1940. // $provider = $this->getProvider('ainika');
  1941. // $resp = $provider->balance();
  1942. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1943. // $resp = $provider->query(['order_sn' => '61961651223605267063']);
  1944. $body = '{"orderid":"HAP22042917132281477","sporderid":"61961651223605267063","userid":"10002584","merchantsubmittime":"20220429171341","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.9","sign":"36D1867A80924B6AE92C7B2CC1CE96BF"}';
  1945. $params = json_decode($body, true);
  1946. $provider = $this->getProvider('ainika','RefillCallBack');
  1947. $ret = $provider->verify($params);
  1948. $resp = $provider->notify($params);
  1949. }
  1950. public function testMiaoxt_tax()
  1951. {
  1952. // $provider = $this->getProvider('miaoxt_tax');
  1953. // $resp = $provider->balance();
  1954. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  1955. // $resp = $provider->query(['order_sn' => '26021652172403994919']);
  1956. $body = '{"szOrderId":"26021652172403994919","fSalePrice":"51.65","szAgentId":"200093","nFlag":"2","szVerifyString":"191888adc1a74ac284ab8a9aeba89753","szPhoneNum":"18500608333","szRtnMsg":"100101101052205101647064149797","nDemo":"50"}';
  1957. $params = json_decode($body, true);
  1958. $provider = $this->getProvider('miaoxt_tax','RefillCallBack');
  1959. $ret = $provider->verify($params);
  1960. $resp = $provider->notify($params);
  1961. }
  1962. public function testChending_df()
  1963. {
  1964. // $provider = $this->getProvider('chending_df');
  1965. // $resp = $provider->balance();
  1966. // $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']);
  1967. // $resp = $provider->query(['order_sn' => '63291660632954797381']);
  1968. $body = '{"orderId":"220513163943109440","appId":"SfjndCMdUC","outOrderId":"59951652431183676445","sign":"6e8bb3398fe726141760e4e7c134620a","orderStatus":"2","completeTime":"20220514191209","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  1969. $params = json_decode($body, true);
  1970. $provider = $this->getProvider('chending_df', 'RefillCallBack');
  1971. $ret = $provider->verify($params);
  1972. $resp = $provider->notify($params);
  1973. }
  1974. public function testChending_tax()
  1975. {
  1976. // $provider = $this->getProvider('chending_tax');
  1977. // $resp = $provider->balance();
  1978. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'company_type' => 'nation', 'use_type' => 'home', 'province' => 1, 'city' => '北京市']);
  1979. // $resp = $provider->query(['order_sn' => '22671652666858385750']);
  1980. $body = '{"orderId":"220516100746111668","appId":"4kMv0XHVYd","outOrderId":"22671652666858385750","sign":"e1f513d104df7cb31f767784f04833f1","orderStatus":"2","completeTime":"20220516100752","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"100101101032205161007504153995"}';
  1981. $params = json_decode($body, true);
  1982. $provider = $this->getProvider('chending_tax','RefillCallBack');
  1983. $ret = $provider->verify($params);
  1984. $resp = $provider->notify($params);
  1985. }
  1986. public function testDonghong_high()
  1987. {
  1988. // $provider = $this->getProvider('donghong_high');
  1989. // $resp = $provider->balance();
  1990. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  1991. // $resp = $provider->query(['order_sn' => '63621652775729185590']);
  1992. $body = '{"orderid":"FJW22051716222022479","sporderid":"63621652775729185590","userid":"10002583","merchantsubmittime":"20220517162522","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.25","sign":"E7AE9EE9E3D83909564E03935A7AFAA5"}';
  1993. $params = json_decode($body, true);
  1994. $provider = $this->getProvider('donghong_high','RefillCallBack');
  1995. $ret = $provider->verify($params);
  1996. $resp = $provider->notify($params);
  1997. }
  1998. public function testTongmai()
  1999. {
  2000. // $provider = $this->getProvider('tongmai');
  2001. // $resp = $provider->balance();
  2002. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  2003. // $resp = $provider->query(['order_sn' => '14471652858448773887']);
  2004. $body = '{"szOrderId":"14471652858448773887","fSalePrice":"49.75","szAgentId":"200010","nFlag":"2","szVerifyString":"228ad25509b080bb728276d6176d9fea","szPhoneNum":"13699279618","szRtnMsg":"220518-443138774640458","nDemo":"50"}';
  2005. $params = json_decode($body, true);
  2006. $provider = $this->getProvider('tongmai','RefillCallBack');
  2007. $ret = $provider->verify($params);
  2008. $resp = $provider->notify($params);
  2009. }
  2010. public function testLiantongzx()
  2011. {
  2012. // $provider = $this->getProvider('liantongzx');
  2013. // $resp = $provider->balance();
  2014. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2015. // $resp = $provider->query(['order_sn' => '31091653029001738304']);
  2016. $body = '{"msg":"成功","code":"00000","data":{"buisId":"31091653029001738304","signature":"59E5589E87B24B2DCBEC7AE09B0310B8","rechargePhone":"18500608333","appKey":"Dbjyz","id":"202205201443247E4AEC9FF804F14AC2","operator":"CU","status":2,"rechargeMoney":5000}}';
  2017. $params = json_decode($body, true);
  2018. $provider = $this->getProvider('liantongzx','RefillCallBack');
  2019. $ret = $provider->verify($params['data']);
  2020. $resp = $provider->notify($params['data']);
  2021. }
  2022. public function testBodian()
  2023. {
  2024. // $provider = $this->getProvider('bodian');
  2025. // $resp = $provider->balance();
  2026. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2027. // $resp = $provider->query(['order_sn' => '57771653272628058996']);
  2028. $body = '{"szOrderId":"57771653272628058996","fSalePrice":"49.9","szAgentId":"200022","nFlag":"2","szVerifyString":"3d0cad0e5b5b5e21822aeb30541d689c","szPhoneNum":"18500608333","szRtnMsg":"100101101062205231024014167462","nDemo":"50"}';
  2029. $params = json_decode($body, true);
  2030. $provider = $this->getProvider('bodian','RefillCallBack');
  2031. $ret = $provider->verify($params);
  2032. $resp = $provider->notify($params);
  2033. }
  2034. public function testGdsinopec()
  2035. {
  2036. $provider = $this->getProvider('gdsinopec','RefillOil');
  2037. // $resp = $provider->add(13699279618, 4, 5, [
  2038. // 'order_sn' => $this->make_sn(), 'province' => 19
  2039. // ]);
  2040. $resp = $provider->query(['order_sn' => '63821655370285849333']);
  2041. }
  2042. public function testYuke()
  2043. {
  2044. // $provider = $this->getProvider('yuke');
  2045. // $resp = $provider->balance();
  2046. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2047. // $resp = $provider->query(['order_sn' => '26641653296769663088']);
  2048. $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":""}}';
  2049. $params = json_decode($body, true);
  2050. $provider = $this->getProvider('yuke','RefillCallBack');
  2051. $ret = $provider->verify($params);
  2052. $resp = $provider->notify($params);
  2053. }
  2054. public function testChizeng_yi()
  2055. {
  2056. // $provider = $this->getProvider('chizeng_yi');
  2057. // $resp = $provider->balance();
  2058. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn()]);
  2059. // $resp = $provider->query(['order_sn' => '45611653372272644548']);
  2060. $body = '{"orderid":"YOQ22052414043859005","sporderid":"45611653372272644548","userid":"10003583","merchantsubmittime":"20220524140541","resultno":"9","parvalue":"100","remark1":"","payno":"","fundbalance":"-98","sign":"23331D82F432054D58CA7047F33A13F7"}';
  2061. $params = json_decode($body, true);
  2062. $provider = $this->getProvider('chizeng_yi','RefillCallBack');
  2063. $ret = $provider->verify($params);
  2064. $resp = $provider->notify($params);
  2065. }
  2066. public function testGuanbang()
  2067. {
  2068. // $provider = $this->getProvider('guanbang');
  2069. // $resp = $provider->balance();
  2070. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2071. // $resp = $provider->query(['order_sn' => '82791653469520046484']);
  2072. $body = ' {"userid":"57756","order_id":"22052517052557756af95c9977","account":"15811535608","amount":"30","price":"30.36","state":"failed","user_order":"82791653469520046484","sign":"941BE8B6FF2ABB832A1848DD2758121F","voucher":""}';
  2073. $params = json_decode($body, true);
  2074. $provider = $this->getProvider('guanbang','RefillCallBack');
  2075. $ret = $provider->verify($params);
  2076. $resp = $provider->notify($params);
  2077. }
  2078. public function testYuke_lt()
  2079. {
  2080. $provider = $this->getProvider('yuke_lt');
  2081. $resp = $provider->balance();
  2082. }
  2083. public function testYuke_dx()
  2084. {
  2085. $provider = $this->getProvider('yuke_dx');
  2086. $resp = $provider->balance();
  2087. }
  2088. public function testGaobiao()
  2089. {
  2090. $provider = $this->getProvider('gaobiao');
  2091. $resp = $provider->balance();
  2092. }
  2093. public function testHuoshenguo_Yd()
  2094. {
  2095. // $provider = $this->getProvider('huoshenguo_yd');
  2096. // $resp = $provider->balance();
  2097. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2098. // $resp = $provider->query(['order_sn' => '15731655879529254660']);
  2099. $body = '{"orderId":"220622143213646892","appId":"faGa76P2NZ","outOrderId":"15731655879529254660","sign":"b8199c227c0bf4cebc9ca97bc79400eb","orderStatus":"3","completeTime":"20220622143225","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2100. $params = json_decode($body, true);
  2101. $provider = $this->getProvider('huoshenguo_yd','RefillCallBack');
  2102. $ret = $provider->verify($params);
  2103. $resp = $provider->notify($params);
  2104. }
  2105. public function testXinruiheng()
  2106. {
  2107. // $provider = $this->getProvider('xinruiheng');
  2108. // $resp = $provider->balance();
  2109. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  2110. // $resp = $provider->query(['order_sn' => '39051656036848508036']);
  2111. $body = '{"orderid":"SPN22062410147271198","sporderid":"39051656036848508036","userid":"10002683","merchantsubmittime":"20220624101713","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.98","sign":"0BDCBB9BF688B35E55B1B16E88D5E5FD"}';
  2112. $params = json_decode($body, true);
  2113. $provider = $this->getProvider('xinruiheng','RefillCallBack');
  2114. $ret = $provider->verify($params);
  2115. $resp = $provider->notify($params);
  2116. }
  2117. public function testDezhi()
  2118. {
  2119. // $provider = $this->getProvider('dezhi');
  2120. // $resp = $provider->balance();
  2121. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2122. // $resp = $provider->query(['order_sn' => '16601665727931494879']);
  2123. $body = '{"orderid":"XEV22101414121957347","sporderid":"16601665727931494879","userid":"10002505","merchantsubmittime":"20221014141213","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-17409.66","sign":"666E01E56191A7C997049E965E67A31F"}';
  2124. $params = json_decode($body, true);
  2125. $provider = $this->getProvider('dezhi','RefillCallBack');
  2126. $ret = $provider->verify($params);
  2127. $resp = $provider->notify($params);
  2128. }
  2129. public function testHuoshenguo_fs()
  2130. {
  2131. // $provider = $this->getProvider('huoshenguo_fs');
  2132. // $resp = $provider->balance();
  2133. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2134. // $resp = $provider->query(['order_sn' => '94501657786482224013']);
  2135. $body = '{"orderId":"220714161448729470","appId":"0AQYfAzSyy","outOrderId":"94501657786482224013","sign":"ddc73651e25ae6ea39f082407c60cb39","orderStatus":"3","completeTime":"20220714161655","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2136. $params = json_decode($body, true);
  2137. $provider = $this->getProvider('huoshenguo_fs', 'RefillCallBack');
  2138. $ret = $provider->verify($params);
  2139. $resp = $provider->notify($params);
  2140. }
  2141. public function testJinglan()
  2142. {
  2143. // $provider = $this->getProvider('jinglan');
  2144. // $resp = $provider->balance();
  2145. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  2146. // $resp = $provider->query(['order_sn' => '80901658214434787593']);
  2147. $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"}';
  2148. $params = json_decode($body, true);
  2149. $provider = $this->getProvider('jinglan', 'RefillCallBack');
  2150. $ret = $provider->verify($params);
  2151. $resp = $provider->notify($params);
  2152. }
  2153. public function testXinruiheng_fs()
  2154. {
  2155. // $provider = $this->getProvider('xinruiheng_fs');
  2156. // $resp = $provider->balance();
  2157. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  2158. // $resp = $provider->query(['order_sn' => '85401658476449708732']);
  2159. $body = '{"orderid":"VEL22072215540081259","sporderid":"85401658476449708732","userid":"10002764","merchantsubmittime":"20220722155635","resultno":"1","parvalue":"30","remark1":"74620220722155607702045","payno":"74620220722155607702045","fundbalance":"-28.05","sign":"2196527C01BB57063B030C2E29270D98"}';
  2160. $params = json_decode($body, true);
  2161. $provider = $this->getProvider('xinruiheng_fs', 'RefillCallBack');
  2162. $ret = $provider->verify($params);
  2163. $resp = $provider->notify($params);
  2164. }
  2165. public function testZiyugui()
  2166. {
  2167. // $provider = $this->getProvider('ziyugui');
  2168. // $resp = $provider->balance();
  2169. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2170. // $resp = $provider->query(['order_sn' => '65941659496150348208']);
  2171. $body = '{"szOrderId":"65941659496150348208","fSalePrice":"28.32","szAgentId":"200001","nFlag":"3","szVerifyString":"53fddb31f9fa15a457b6fb3b8d1f71b9","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  2172. $params = json_decode($body, true);
  2173. $provider = $this->getProvider('ziyugui','RefillCallBack');
  2174. $ret = $provider->verify($params);
  2175. $resp = $provider->notify($params);
  2176. }
  2177. public function testGuiton_yi()
  2178. {
  2179. // $provider = $this->getProvider('guitong_yi');
  2180. // $resp = $provider->balance();
  2181. // $resp = $provider->add(13699279618, 4, 300, ['order_sn' => $this->make_sn()]);
  2182. // $resp = $provider->query(['order_sn' => '88981660030164774522']);
  2183. $body = '{"szOrderId":"88981660030164774522","fSalePrice":"300.45","szAgentId":"200104","nFlag":"2","szVerifyString":"9b4dbb981339f702f81441aa204e9a5c","szPhoneNum":"13699279618","szRtnMsg":"250457458535","nDemo":"300"}';
  2184. $params = json_decode($body, true);
  2185. $provider = $this->getProvider('guitong_yi','RefillCallBack');
  2186. $ret = $provider->verify($params);
  2187. $resp = $provider->notify($params);
  2188. }
  2189. public function testDazhanggui()
  2190. {
  2191. // $provider = $this->getProvider('dazhanggui');
  2192. // $resp = $provider->balance();
  2193. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2194. // $resp = $provider->query(['order_sn' => '38151660639715902891']);
  2195. $body = '{"szOrderId":"38151660639715902891","fSalePrice":"28.5","szAgentId":"200008","nFlag":"3","szVerifyString":"8e73b9e248e26089bd82303b5ed70992","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  2196. $params = json_decode($body, true);
  2197. $provider = $this->getProvider('dazhanggui', 'RefillCallBack');
  2198. $ret = $provider->verify($params);
  2199. $resp = $provider->notify($params);
  2200. }
  2201. public function testWeixue()
  2202. {
  2203. // $provider = $this->getProvider('weixue');
  2204. // $resp = $provider->balance();
  2205. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  2206. // $resp = $provider->query(['order_sn' => '93321661135376151843']);
  2207. $body = '{"orderid":"GKN22082210298364442","sporderid":"93321661135376151843","userid":"10002703","merchantsubmittime":"20220822103250","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.01","sign":"550EDFC88E0B08B90EAE3E5DE3CDA62E"}';
  2208. $params = json_decode($body, true);
  2209. $provider = $this->getProvider('weixue','RefillCallBack');
  2210. $ret = $provider->verify($params);
  2211. $resp = $provider->notify($params);
  2212. }
  2213. public function testDazhanggui_high()
  2214. {
  2215. // $provider = $this->getProvider('dazhanggui_high');
  2216. // $resp = $provider->balance();
  2217. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2218. // $resp = $provider->query(['order_sn' => '97891663034634307994']);
  2219. $body = '{"szOrderId":"97891663034634307994","fSalePrice":"48.75","szAgentId":"200021","nFlag":"3","szVerifyString":"2072991c0760ca1be5ec05ba3f4cf0b0","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2220. $params = json_decode($body, true);
  2221. $provider = $this->getProvider('dazhanggui_high', 'RefillCallBack');
  2222. $ret = $provider->verify($params);
  2223. $resp = $provider->notify($params);
  2224. }
  2225. public function testYingdian_hf()
  2226. {
  2227. // $provider = $this->getProvider('yingdian_hf');
  2228. // $resp = $provider->balance();
  2229. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn()]);
  2230. // $resp = $provider->query(['order_sn' => '95361663137380842711']);
  2231. $body = '{"amount":"50.0","cardNo":"15811535608","merchantId":"10026","orderNo":"20220914143618594153","outTradeNo":"95361663137380842711","requestTime":"2022-09-14 14:36:21","sign":"219f2f45298550c52a4a7e3b98b253a7","state":"FAIL"}';
  2232. $params = json_decode($body, true);
  2233. $provider = $this->getProvider('yingdian_hf', 'RefillCallBack');
  2234. $ret = $provider->verify($params);
  2235. $resp = $provider->notify($params);
  2236. }
  2237. public function testDazhanggui_fs()
  2238. {
  2239. // $provider = $this->getProvider('dazhanggui_fs');
  2240. // $resp = $provider->balance();
  2241. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2242. // $resp = $provider->query(['order_sn' => '45731664176822286443']);
  2243. $body = '{"szOrderId":"45731664176822286443","fSalePrice":"28.26","szAgentId":"200026","nFlag":"3","szVerifyString":"b685695ec2fb80f98566f71bd607c7d5","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
  2244. $params = json_decode($body, true);
  2245. $provider = $this->getProvider('dazhanggui_fs', 'RefillCallBack');
  2246. $ret = $provider->verify($params);
  2247. $resp = $provider->notify($params);
  2248. }
  2249. public function testFeiminyu_high()
  2250. {
  2251. // $provider = $this->getProvider('feimingyu_high');
  2252. // $resp = $provider->balance();
  2253. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2254. // $resp = $provider->query(['order_sn' => '67901664179951146425']);
  2255. $body = '{"orderid":"EIE22092616129360743","sporderid":"67901664179951146425","userid":"10002986","merchantsubmittime":"20220926161235","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.37","sign":"1D0D706BBC7944A0D0275382CC6337F5"}';
  2256. $params = json_decode($body, true);
  2257. $provider = $this->getProvider('feimingyu_high', 'RefillCallBack');
  2258. $ret = $provider->verify($params);
  2259. $resp = $provider->notify($params);
  2260. }
  2261. public function testWeixue_yi()
  2262. {
  2263. $provider = $this->getProvider('weixue_yi');
  2264. $resp = $provider->balance();
  2265. }
  2266. public function testJinfeng_fs()
  2267. {
  2268. // $provider = $this->getProvider('jinfeng_fs');
  2269. // $resp = $provider->balance();
  2270. // $resp = $provider->add(18010110637, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2271. // $resp = $provider->query(['order_sn' => '67481665209341012765']);
  2272. $body = '{"orderNo":"F2210081409124193922","status":"019","consumerNo":"67481665209341012765","voucherNo":null,"mobile":"18010110637"}';
  2273. $params = json_decode($body, true);
  2274. $provider = $this->getProvider('jinfeng_fs', 'RefillCallBack');
  2275. $ret = $provider->verify($params);
  2276. $resp = $provider->notify($params);
  2277. }
  2278. public function testDouxun()
  2279. {
  2280. $provider = $this->getProvider('douxun');
  2281. $resp = $provider->balance();
  2282. // $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2283. // $resp = $provider->query(['order_sn' => '15711665296902146642']);
  2284. $body = '<request>
  2285. <head>
  2286. <custInteId>BJQDWTC</custInteId>
  2287. <echo>tu7d1YZCB7Ca8wQNQC2mgEoMirD4an7R</echo>
  2288. <timestamp>20221009113824</timestamp>
  2289. <chargeSign>+jGibLIlbzG0Lzv0/sxdtg==</chargeSign>
  2290. </head>
  2291. <body>
  2292. <item>
  2293. <orderId>38901665286687817863</orderId>
  2294. <orderType>1</orderType>
  2295. <packCode>400030</packCode>
  2296. <mobile>15811535608</mobile>
  2297. <result>0017</result>
  2298. <desc>移动通道未开通或维护中</desc>
  2299. <operatorNo></operatorNo>
  2300. </item>
  2301. </body>
  2302. </request>';
  2303. // $params = refill\util::xmlToArray($body);
  2304. // $provider = $this->getProvider('douxun', 'RefillCallBack');
  2305. // $ret = $provider->verify($params);
  2306. // $resp = $provider->notify($params);
  2307. }
  2308. public function testFeimingyu_middle()
  2309. {
  2310. // $provider = $this->getProvider('feimingyu_middle');
  2311. // $resp = $provider->balance();
  2312. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
  2313. // $resp = $provider->query(['order_sn' => '22171665388992765168']);
  2314. $body = '{"orderid":"PFI22101016039457152","sporderid":"22171665388992765168","userid":"10003008","merchantsubmittime":"20221010160317","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.1","sign":"C5962454EED498806B920C1181257CD0"}';
  2315. $params = json_decode($body, true);
  2316. $provider = $this->getProvider('feimingyu_middle', 'RefillCallBack');
  2317. $ret = $provider->verify($params);
  2318. $resp = $provider->notify($params);
  2319. }
  2320. public function testRuixunda_fs()
  2321. {
  2322. // $provider = $this->getProvider('ruixunda_fs');
  2323. // $resp = $provider->balance();
  2324. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2325. // $resp = $provider->query(['order_sn' => '80291665542669040526']);
  2326. $body = '{"orderid":"KKY22101210450260770","sporderid":"80291665542669040526","userid":"10002703","merchantsubmittime":"20221012104537","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"F31A81C28225DA2EFD8D5ED0CC2B3889"}';
  2327. $params = json_decode($body, true);
  2328. $provider = $this->getProvider('ruixunda_fs', 'RefillCallBack');
  2329. $ret = $provider->verify($params);
  2330. $resp = $provider->notify($params);
  2331. }
  2332. public function testLechong_high()
  2333. {
  2334. // $provider = $this->getProvider('lechong_high');
  2335. // $resp = $provider->balance();
  2336. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2337. // $resp = $provider->query(['order_sn' => '99381665639827584183']);
  2338. $body = '{"sellerid":"99381665639827584183","agentcode":"202210131253","account":"MTU4MTE1MzU2MDg=","value":"50","payvalue":"48.5000","voucher":"","createtime":"20221013134453","endtime":"20221013134722","state":"4","remark":"","time":"20221013135258","sign":"2e81793ab79297aae39e668c3dfa1a33"}';
  2339. $params = json_decode($body, true);
  2340. $provider = $this->getProvider('lechong_high', 'RefillCallBack');
  2341. $ret = $provider->verify($params);
  2342. $resp = $provider->notify($params);
  2343. }
  2344. public function testDezhi_fs()
  2345. {
  2346. $provider = $this->getProvider('dezhi_fs');
  2347. $resp = $provider->balance();
  2348. }
  2349. public function testYelin_dx()
  2350. {
  2351. $provider = $this->getProvider('yelin_dx');
  2352. $resp = $provider->balance();
  2353. }
  2354. public function testQianqian_fs()
  2355. {
  2356. // $provider = $this->getProvider('qianqian_fs');
  2357. // $resp = $provider->balance();
  2358. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' =>15]);
  2359. // $resp = $provider->query(['order_sn' => '95171666766063652238']);
  2360. $body = '{"orderNo":"F2210261434301036619","status":"019","consumerNo":"95171666766063652238","voucherNo":null,"mobile":"15811535608"}';
  2361. $params = json_decode($body, true);
  2362. $provider = $this->getProvider('qianqian_fs', 'RefillCallBack');
  2363. $ret = $provider->verify($params);
  2364. $resp = $provider->notify($params);
  2365. }
  2366. public function testXinruiheng_yd()
  2367. {
  2368. // $provider = $this->getProvider('xinruiheng_yd');
  2369. // $resp = $provider->balance();
  2370. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>15]);
  2371. // $resp = $provider->query(['order_sn' => '66281667543910287910']);
  2372. $body = '{"orderid":"OIX22110414389027114","sporderid":"66281667543910287910","userid":"10003003","merchantsubmittime":"20221104143838","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.19","sign":"6796F06EB1D1BE3CA32F06A80A42F971"}';
  2373. $params = json_decode($body, true);
  2374. $provider = $this->getProvider('xinruiheng_yd', 'RefillCallBack');
  2375. $ret = $provider->verify($params);
  2376. $resp = $provider->notify($params);
  2377. }
  2378. public function testWanxin_fs()
  2379. {
  2380. // $provider = $this->getProvider('wanxin_fs');
  2381. // $resp = $provider->balance();
  2382. // $resp = $provider->add(15139608757, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2383. // $resp = $provider->query(['order_sn' => '87101667799056105168']);
  2384. $body = ' {"status":"020","orderNo":"F2211071331082216627","consumerNo":"87101667799056105168","mobile":"15139608757","voucherNo":"null","account":"wxgyyj","timestamp":"1667799069004","sign":"ee45c3c896d5e392d95858b913cd674c02fbfa5b"}';
  2385. $params = json_decode($body, true);
  2386. $provider = $this->getProvider('wanxin_fs', 'RefillCallBack');
  2387. $ret = $provider->verify($params);
  2388. $resp = $provider->notify($params);
  2389. }
  2390. public function testWanxin()
  2391. {
  2392. // $provider = $this->getProvider('wanxin');
  2393. // $resp = $provider->balance();
  2394. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2395. // $resp = $provider->query(['order_sn' => '29901667975986554424']);
  2396. $body = '{"status":"019","orderNo":"F2211091440143408966","consumerNo":"29901667975986554424","mobile":"18500608333","voucherNo":"null","account":"wxgyqg","timestamp":"1667976015002","sign":"0181d8fb2a98d1c7c605066f54e4ee0766cb8440"}';
  2397. $params = json_decode($body, true);
  2398. $provider = $this->getProvider('wanxin', 'RefillCallBack');
  2399. $ret = $provider->verify($params);
  2400. $resp = $provider->notify($params);
  2401. }
  2402. public function testYuewen()
  2403. {
  2404. // $provider = $this->getProvider('yuewen');
  2405. // $resp = $provider->balance();
  2406. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2407. // $resp = $provider->query(['order_sn' => '58661667979936889698']);
  2408. $body = '{"orderid":"AIG22110915454468629","sporderid":"58661667979936889698","userid":"10002644","merchantsubmittime":"20221109154540","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.8","sign":"E12FC52E718947DAA6B6733CF9DDA529"}';
  2409. $params = json_decode($body, true);
  2410. $provider = $this->getProvider('yuewen', 'RefillCallBack');
  2411. $ret = $provider->verify($params);
  2412. $resp = $provider->notify($params);
  2413. }
  2414. public function testMeixu_fs()
  2415. {
  2416. // $provider = $this->getProvider('meixu_fs');
  2417. // $resp = $provider->balance();
  2418. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' =>6]);
  2419. // $resp = $provider->query(['order_sn' => '65661668503421995249']);
  2420. $body = ' {"orderid":"GMJ22111517105484458","sporderid":"65661668503421995249","userid":"10003843","merchantsubmittime":"20221115171029","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-48.94","sign":"939AD149FABA7E1D85206195890F308F"}';
  2421. $params = json_decode($body, true);
  2422. $provider = $this->getProvider('meixu_fs', 'RefillCallBack');
  2423. $ret = $provider->verify($params);
  2424. $resp = $provider->notify($params);
  2425. }
  2426. public function testDazhanggui_fs_gd()
  2427. {
  2428. // $provider = $this->getProvider('dazhanggui_fs_gd');
  2429. // $resp = $provider->balance();
  2430. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2431. // $resp = $provider->query(['order_sn' => '85671668568809848159']);
  2432. $body = '{"szOrderId":"85671668568809848159","fSalePrice":"47.75","szAgentId":"200039","nFlag":"3","szVerifyString":"6f558a5f265d3993f60bf2727742caaf","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2433. $params = json_decode($body, true);
  2434. $provider = $this->getProvider('dazhanggui_fs_gd', 'RefillCallBack');
  2435. $ret = $provider->verify($params);
  2436. $resp = $provider->notify($params);
  2437. }
  2438. public function testQianqian_fs_gd()
  2439. {
  2440. // $provider = $this->getProvider('qianqian_fs_gd');
  2441. // $resp = $provider->balance();
  2442. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2443. // $resp = $provider->query(['order_sn' => '17721668570001406531']);
  2444. $body = '{"status":"019","orderNo":"F2211161140175529547","consumerNo":"17721668570001406531","mobile":"15811535608","voucherNo":"null","account":"wlyezhigdfs","timestamp":"1668570018003","sign":"f709d1f3e3fa0d527c2c3f0b7453c2d667b3d9c0"}';
  2445. $params = json_decode($body, true);
  2446. $provider = $this->getProvider('qianqian_fs_gd', 'RefillCallBack');
  2447. $ret = $provider->verify($params);
  2448. $resp = $provider->notify($params);
  2449. }
  2450. public function testMeixu_kami()
  2451. {
  2452. $provider = $this->getProvider('meixu_kami');
  2453. $resp = $provider->balance();
  2454. }
  2455. public function testYouhe_fs()
  2456. {
  2457. // $provider = $this->getProvider('youhe_fs');
  2458. // $resp = $provider->balance();
  2459. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2460. // $resp = $provider->query(['order_sn' => '42791668653632383737']);
  2461. $body = '{"szOrderId":"42791668653632383737","fSalePrice":"28.05","szAgentId":"200064","nFlag":"3","szVerifyString":"245107428fad62725a98e4f5022de830","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
  2462. $params = json_decode($body, true);
  2463. $provider = $this->getProvider('youhe_fs', 'RefillCallBack');
  2464. $ret = $provider->verify($params);
  2465. $resp = $provider->notify($params);
  2466. }
  2467. public function testHuishi()
  2468. {
  2469. // $provider = $this->getProvider('huishi');
  2470. // $resp = $provider->balance();
  2471. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 15]);
  2472. // $resp = $provider->query(['order_sn' => '34271668665589504035']);
  2473. $body = '{"timestamp":1668665604140,"sign":"1b83fd174b4f8d7f89384ff450162faa","api_key":"07onE26tNyaU","order_id":"34271668665589504035","status":6,"voucher":""}';
  2474. $params = json_decode($body, true);
  2475. $provider = $this->getProvider('huishi', 'RefillCallBack');
  2476. $ret = $provider->verify($params);
  2477. $resp = $provider->notify($params);
  2478. }
  2479. public function testYangchi()
  2480. {
  2481. // $provider = $this->getProvider('yangchi');
  2482. // $resp = $provider->balance();
  2483. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 16]);
  2484. // $resp = $provider->query(['order_sn' => '93291668743605489040']);
  2485. $body = '{"szOrderId":"93291668743605489040","fSalePrice":"48.3","szAgentId":"200035","nFlag":"3","szVerifyString":"bd51c3df1132ed84de92b46ee7f5743e","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2486. $params = json_decode($body, true);
  2487. $provider = $this->getProvider('yangchi', 'RefillCallBack');
  2488. $ret = $provider->verify($params);
  2489. $resp = $provider->notify($params);
  2490. }
  2491. public function testYangchi_fs()
  2492. {
  2493. // $provider = $this->getProvider('yangchi_fs');
  2494. // $resp = $provider->balance();
  2495. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 24]);
  2496. // $resp = $provider->query(['order_sn' => '43071668750406110934']);
  2497. $body = '{"szOrderId":"43071668750406110934","fSalePrice":"27.78","szAgentId":"200036","nFlag":"3","szVerifyString":"6b6f42600c07146d08c51b737487eafc","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  2498. $params = json_decode($body, true);
  2499. $provider = $this->getProvider('yangchi_fs', 'RefillCallBack');
  2500. $ret = $provider->verify($params);
  2501. $resp = $provider->notify($params);
  2502. }
  2503. public function testBier()
  2504. {
  2505. $provider = $this->getProvider('bier');
  2506. // $resp = $provider->balance();
  2507. // $phones = [
  2508. // 15811535608,
  2509. // 15136908757,
  2510. // 13683095937,
  2511. // 13699279618,
  2512. // 15811535608,
  2513. // 15136908757,
  2514. // 13683095937,
  2515. // 13699279618,
  2516. // 15811535608,
  2517. // 15136908757
  2518. // ];
  2519. // foreach ($phones as $phone)
  2520. // {
  2521. // $resp = $provider->add($phone, 4, 10, ['order_sn' => $this->make_sn()]);
  2522. // $result[] = $resp;
  2523. // }
  2524. $resp = $provider->query(['order_sn' => '77551669277530669853']);
  2525. $body = '{"status":"001","orderNo":"F2211241612105366466","consumerNo":"77551669277530669853","mobile":"13699279618","voucherNo":"2022112422001463431440964703","account":"lzyezi","timestamp":"1669277556001","sign":"b60774a793f882bb2e6bf77e9c2bf36299024cba"}';
  2526. $params = json_decode($body, true);
  2527. $provider = $this->getProvider('bier', 'RefillCallBack');
  2528. $ret = $provider->verify($params);
  2529. $resp = $provider->notify($params);
  2530. }
  2531. public function testBier_fs()
  2532. {
  2533. // $provider = $this->getProvider('bier_fs');
  2534. // $resp = $provider->balance();
  2535. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 13]);
  2536. // $resp = $provider->query(['order_sn' => '18361668755806837322']);
  2537. $body = '{"status":"027","orderNo":"F2211181516549189078","consumerNo":"18361668755806837322","mobile":"15811535608","voucherNo":"null","account":"yzfs1688","timestamp":"1668755817002","sign":"e44cadf815d0e2359f0872bce78a7628d0edbc98"}';
  2538. $params = json_decode($body, true);
  2539. $provider = $this->getProvider('bier_fs', 'RefillCallBack');
  2540. $ret = $provider->verify($params);
  2541. $resp = $provider->notify($params);
  2542. }
  2543. public function testLechongquan()
  2544. {
  2545. $provider = $this->getProvider('lechongquan');
  2546. // $resp = $provider->balance();
  2547. $net_errno = '';
  2548. $resp = $provider->add(15811535608, 4, 5, ['order_sn' => $this->make_sn()], $net_errno);
  2549. }
  2550. public function testLechongYin()
  2551. {
  2552. $provider = $this->getProvider('lechongyin');
  2553. $resp = $provider->balance();
  2554. }
  2555. public function testYuewen_fs()
  2556. {
  2557. // $provider = $this->getProvider('yuewen_fs');
  2558. // $resp = $provider->balance();
  2559. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 24]);
  2560. // $resp = $provider->query(['order_sn' => '75631669258194223094']);
  2561. $body = '{"orderid":"JWX22112410509839637","sporderid":"75631669258194223094","userid":"10002703","merchantsubmittime":"20221124105321","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-46.6","sign":"6BFACD01F21C365F36E6FA6CC37ACB2F"}';
  2562. $params = json_decode($body, true);
  2563. $provider = $this->getProvider('yuewen_fs', 'RefillCallBack');
  2564. $ret = $provider->verify($params);
  2565. $resp = $provider->notify($params);
  2566. }
  2567. public function testBodian_dx()
  2568. {
  2569. $provider = $this->getProvider('bodian_dx');
  2570. $resp = $provider->balance();
  2571. }
  2572. public function testHanwei()
  2573. {
  2574. // $provider = $this->getProvider('hanwei');
  2575. // $resp = $provider->balance();
  2576. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 24]);
  2577. // $resp = $provider->query(['order_sn' => '71841669948501757578']);
  2578. $body = ' {"szOrderId":"71841669948501757578","fSalePrice":"48.3","szAgentId":"200046","nFlag":"3","szVerifyString":"497172ecff90c82321a7489e7e98d5f4","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"50"}';
  2579. $params = json_decode($body, true);
  2580. $provider = $this->getProvider('hanwei', 'RefillCallBack');
  2581. $ret = $provider->verify($params);
  2582. $resp = $provider->notify($params);
  2583. }
  2584. public function testJumi_sec()
  2585. {
  2586. // $provider = $this->getProvider('jumi_sec', 'RefillOil');
  2587. // $resp = $provider->balance();
  2588. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  2589. // $resp = $provider->query(['order_sn' => '15461669628093278758']);
  2590. $body = '{"appid":"CZ27801384","order":"D20221128280985506419397","morder":"15461669628093278758","status":"3","cash":"100","signature":"f6ded2c0ac2340a5dea72715bc426024"}';
  2591. $params = json_decode($body, true);
  2592. $provider = $this->getProvider('jumi_sec', 'RefillCallBack');
  2593. }
  2594. public function testHanwei_fs()
  2595. {
  2596. // $provider = $this->getProvider('hanwei_fs');
  2597. // $resp = $provider->balance();
  2598. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 25]);
  2599. // $resp = $provider->query(['order_sn' => '66021670294205137877']);
  2600. $body = '{"szOrderId":"66021670294205137877","fSalePrice":"28.59","szAgentId":"200047","nFlag":"3","szVerifyString":"7210c6fee2bb07ed382c1777b3ab4e09","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  2601. $params = json_decode($body, true);
  2602. $provider = $this->getProvider('hanwei_fs', 'RefillCallBack');
  2603. $ret = $provider->verify($params);
  2604. $resp = $provider->notify($params);
  2605. }
  2606. public function testFeimingyu_fs()
  2607. {
  2608. // $provider = $this->getProvider('feimingyu_fs');
  2609. // $resp = $provider->balance();
  2610. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2611. // $resp = $provider->query(['order_sn' => '18881670298244168096']);
  2612. $body = '{"orderid":"RSQ22120611443597403","sporderid":"18881670298244168096","userid":"10003043","merchantsubmittime":"20221206114413","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.05","sign":"93937542BC5D5D11F0180A420E62A3F0"}';
  2613. $params = json_decode($body, true);
  2614. $provider = $this->getProvider('feimingyu_fs', 'RefillCallBack');
  2615. $ret = $provider->verify($params);
  2616. $resp = $provider->notify($params);
  2617. }
  2618. public function testYuewen_fs_gd()
  2619. {
  2620. $provider = $this->getProvider('yuewen_fs_gd');
  2621. $resp = $provider->balance();
  2622. }
  2623. public function testGuochuang_nation_sec()
  2624. {
  2625. $provider = $this->getProvider('guochuang_nation_sec');
  2626. $resp = $provider->balance();
  2627. }
  2628. public function testDouxun_sec()
  2629. {
  2630. $provider = $this->getProvider('douxun_sec');
  2631. $resp = $provider->balance();
  2632. }
  2633. public function testMeixu_tax()
  2634. {
  2635. // $provider = $this->getProvider('meixu_tax');
  2636. // $resp = $provider->balance();
  2637. // $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 19]);
  2638. // $resp = $provider->query(['order_sn' => '74501673492674950129']);
  2639. $body = '{"orderId":"230112110446071986","appId":"Bb0uub7pDi","outOrderId":"74501673492674950129","sign":"0f526e19eb5af23efe8b6e21f5914944","orderStatus":"2","completeTime":"20230112111006","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"N\/A"}';
  2640. $params = json_decode($body, true);
  2641. $provider = $this->getProvider('meixu_tax', 'RefillCallBack');
  2642. $ret = $provider->verify($params);
  2643. $resp = $provider->notify($params);
  2644. }
  2645. public function testMeixu_tax_sec()
  2646. {
  2647. $provider = $this->getProvider('meixu_tax_sec');
  2648. $resp = $provider->balance();
  2649. }
  2650. public function testRuizhi_sec()
  2651. {
  2652. $provider = $this->getProvider('ruizhi_sec');
  2653. $resp = $provider->balance();
  2654. }
  2655. public function testRuizhi_third()
  2656. {
  2657. $provider = $this->getProvider('ruizhi_third');
  2658. $resp = $provider->balance();
  2659. }
  2660. public function testXinhengyang_fs()
  2661. {
  2662. // $provider = $this->getProvider('xinhengyang_fs');
  2663. // $resp = $provider->balance();
  2664. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2665. // $resp = $provider->query(['order_sn' => '35371675219635958297']);
  2666. $body = '{"szOrderId":"35371675219635958297","fSalePrice":"28.05","szAgentId":"200104","nFlag":"3","szVerifyString":"8d3c21aff5b72f30bf179dd8f4138a3f","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
  2667. $params = json_decode($body, true);
  2668. $provider = $this->getProvider('xinhengyang_fs', 'RefillCallBack');
  2669. $ret = $provider->verify($params);
  2670. $resp = $provider->notify($params);
  2671. }
  2672. public function testChuangyu_qdw()
  2673. {
  2674. // $provider = $this->getProvider('chuangyu_qdw');
  2675. // $resp = $provider->balance();
  2676. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2677. // $resp = $provider->query(['order_sn' => '86411676429434128248']);
  2678. $body = '{"order_status":"success","account":"18500608333","account_type":1,"product_id":10011,"price":"51.8500","customer_order_no":"86411676429434128248","serial_number":"100101135112302151050411911769","signature":"d0af992b9ce2b1181d9e9c686dd81134"}';
  2679. $params = json_decode($body, true);
  2680. $provider = $this->getProvider('chuangyu_qdw','RefillCallBack');
  2681. $ret = $provider->verify($params);
  2682. $resp = $provider->notify($params);
  2683. }
  2684. public function testTianrui()
  2685. {
  2686. // $provider = $this->getProvider('tianrui');
  2687. // $resp = $provider->balance();
  2688. // $resp = $provider->add(18074608795, 6, 1, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2689. // $resp = $provider->query(['order_sn' => '74081676877369235785']);
  2690. $body = ' {"orderId":"230220151609757457","appId":"7q0uPQMdji","outOrderId":"74081676877369235785","sign":"02d321619e2f64d63dad3df400a5b478","orderStatus":"2","completeTime":"20230220152946","orderDesc":"\u8ba2\u5355\u6210\u529f"}';
  2691. $params = json_decode($body, true);
  2692. $provider = $this->getProvider('tianrui', 'RefillCallBack');
  2693. $ret = $provider->verify($params);
  2694. $resp = $provider->notify($params);
  2695. }
  2696. public function testChuangyu_ylyw()
  2697. {
  2698. $provider = $this->getProvider('chuangyu_ylyw');
  2699. $resp = $provider->balance();
  2700. }
  2701. public function testLechong_high_sec()
  2702. {
  2703. $provider = $this->getProvider('lechong_high_sec');
  2704. $resp = $provider->balance();
  2705. }
  2706. public function testZhongst_doubi()
  2707. {
  2708. // $provider = $this->getProvider('zhongst_doubi');
  2709. // $resp = $provider->balance();
  2710. // $resp = $provider->add(608168539, 7, 30, [
  2711. // 'order_sn' => $this->make_sn(),
  2712. // 'product_code' => 'XYZ100747',
  2713. // 'goods_id' => '6978'
  2714. // ]);
  2715. // $resp = $provider->query(['order_sn' => '81061677051839860385']);
  2716. $body = '{"szOrderId":"81061677051839860385","fSalePrice":"29.85","szAgentId":"200061","nFlag":"2","szVerifyString":"d65a4e5d53a2e6d29f0288013baaa22b","szPhoneNum":"608168539","szRtnMsg":"","nDemo":"30"}';
  2717. $params = json_decode($body, true);
  2718. $provider = $this->getProvider('zhongst_doubi','RefillCallBack');
  2719. $ret = $provider->verify($params);
  2720. $resp = $provider->notify($params);
  2721. }
  2722. public function testJiaqi()
  2723. {
  2724. // $provider = $this->getProvider('jiaqi');
  2725. // $resp = $provider->balance();
  2726. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2727. // $resp = $provider->query(['order_sn' => '49271677568849660255']);
  2728. $body = ' {"szOrderId":"49271677568849660255","fSalePrice":"46.75","szAgentId":"200004","nFlag":"3","szVerifyString":"cf6bfe87cf0e39edc28c1089d275f596","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  2729. $params = json_decode($body, true);
  2730. $provider = $this->getProvider('jiaqi', 'RefillCallBack');
  2731. $ret = $provider->verify($params);
  2732. $resp = $provider->notify($params);
  2733. }
  2734. public function testJiaqi_fs()
  2735. {
  2736. $provider = $this->getProvider('jiaqi_fs');
  2737. $resp = $provider->balance();
  2738. }
  2739. public function testQuanmiao()
  2740. {
  2741. // $provider = $this->getProvider('quanmiao');
  2742. // $resp = $provider->balance();
  2743. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2744. // $resp = $provider->query(['order_sn' => '48061678338499499484']);
  2745. $body = '{"access_key":"ACK211394676","orderid":230309130829524000,"out_trade_no":"48061678338499499484","timestamp":1678338526112,"code":2,"sign":"0GOGz/hClrbptF50g2V4tqfHUTk=","data":{"sellprice":312000,"phone":"15811535608","pass":null,"official_id":"00772023030913083880729757913991","official_ch":"其它"}}';
  2746. $params = json_decode($body, true);
  2747. $provider = $this->getProvider('quanmiao', 'RefillCallBack');
  2748. $ret = $provider->verify($params);
  2749. $resp = $provider->notify($params);
  2750. }
  2751. public function testQuanmiao_ylyw()
  2752. {
  2753. $provider = $this->getProvider('quanmiao_ylyw');
  2754. $resp = $provider->balance();
  2755. }
  2756. public function testShenzhou()
  2757. {
  2758. // $provider = $this->getProvider('shenzhou');
  2759. // $resp = $provider->balance();
  2760. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2761. // $resp = $provider->query(['order_sn' => '46851678761390025347']);
  2762. $body = '{"szOrderId":"46851678761390025347","fSalePrice":"103.7","szAgentId":"200237","nFlag":"2","szVerifyString":"3debe8777315482187f6396c2e97c3f7","szPhoneNum":"15811535608","szRtnMsg":"261359607860","nDemo":"100"}';
  2763. $params = json_decode($body, true);
  2764. $provider = $this->getProvider('shenzhou', 'RefillCallBack');
  2765. $ret = $provider->verify($params);
  2766. $resp = $provider->notify($params);
  2767. }
  2768. public function testShenzhou_ylyw()
  2769. {
  2770. $provider = $this->getProvider('shenzhou_ylyw');
  2771. $resp = $provider->balance();
  2772. }
  2773. public function testSiyicheng()
  2774. {
  2775. // $provider = $this->getProvider('siyicheng');
  2776. // $resp = $provider->balance();
  2777. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2778. // $resp = $provider->query(['order_sn' => '82871678852155519038']);
  2779. $body = '{"orderId":"230315114915719293","appId":"A3PsRxMTnw","outOrderId":"82871678852155519038","sign":"d8d947c99dd19661fc4265f61c113d98","orderStatus":"3","completeTime":"20230315115208","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2780. $params = json_decode($body, true);
  2781. $provider = $this->getProvider('siyicheng', 'RefillCallBack');
  2782. $ret = $provider->verify($params);
  2783. $resp = $provider->notify($params);
  2784. }
  2785. public function testPiaoyi()
  2786. {
  2787. // $provider = $this->getProvider('piaoyi');
  2788. // $resp = $provider->balance();
  2789. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2790. // $resp = $provider->query(['order_sn' => '77071679449784286441']);
  2791. $body = '{"outOrderNumber":"77071679449784286441","ext":"","brandName":"移动","orderNumber":"O1080925610093658","productId":"1","salesPrice":"51.800000","chargeNumber":"15811535608","orderRemark":"成功","sign":"679defcf243ff6359ef7374092d21576","agentName":"qdw-dp","orderStatus":"200","updateTime":"2023-03-22 09:50:44","productName":"话费快充","chargeFace":"50.00","cardList":"","brandOrderNumber":"00772023032209502341251815717991","cityName":"北京","createTime":"2023-03-22 09:50:12","notifyUrl":"https://www.xyzshops.cn/mobile/callback/testcb.php","provinceName":"北京","orderTimeOutDate":"2023-03-23 09:50:12","timestamp":"1679449844217"}';
  2792. $params = json_decode($body, true);
  2793. $provider = $this->getProvider('piaoyi', 'RefillCallBack');
  2794. $ret = $provider->verify($params);
  2795. $resp = $provider->notify($params);
  2796. }
  2797. public function testPiaoyi_ylyw()
  2798. {
  2799. $provider = $this->getProvider('piaoyi_ylyw');
  2800. $resp = $provider->balance();
  2801. }
  2802. public function testweixue_doubi()
  2803. {
  2804. // $provider = $this->getProvider('weixue_doubi');
  2805. // $resp = $provider->balance();
  2806. // $resp = $provider->add(588073521, 7, 100, [
  2807. // 'order_sn' => $this->make_sn(),
  2808. // 'product_code' => 'XYZ100772',
  2809. // 'goods_id' => '6978'
  2810. // ]);
  2811. // $resp = $provider->query(['order_sn' => '99341680249477846685']);
  2812. $body = '{"orderid":"KGM23033115585506241","sporderid":"99341680249477846685","userid":"10003063","merchantsubmittime":"20230331160351","resultno":"1","parvalue":"100","remark1":"{\"OfficialDes\"null,\"OfficialOrderID\"null,\"SellPrice\"1010000}","payno":"{\"OfficialDes\"null,\"OfficialOrderID\"null,\"SellPrice\"1010000}","fundbalance":"-97.5","sign":"C4A87E0C7C3AE4801FDAD746277B342B"}';
  2813. $params = json_decode($body, true);
  2814. $provider = $this->getProvider('weixue_doubi','RefillCallBack');
  2815. $ret = $provider->verify($params);
  2816. $resp = $provider->notify($params);
  2817. }
  2818. public function testYunhui()
  2819. {
  2820. // $provider = $this->getProvider('yunhui');
  2821. // $resp = $provider->balance();
  2822. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2823. // $resp = $provider->query(['order_sn' => '46461680767912339659']);
  2824. $body = '{"orderid":"ROY23040615581957358","sporderid":"46461680767912339659","userid":"10002863","merchantsubmittime":"20230406155836","resultno":"9","parvalue":"100","remark1":"","payno":"","fundbalance":"-98.6","sign":"56055EBC0F443940C91F76C3A9B9AA6B"}';
  2825. $params = json_decode($body, true);
  2826. $provider = $this->getProvider('yunhui', 'RefillCallBack');
  2827. $ret = $provider->verify($params);
  2828. $resp = $provider->notify($params);
  2829. }
  2830. public function testYongjia()
  2831. {
  2832. // $provider = $this->getProvider('yongjia');
  2833. // $resp = $provider->balance();
  2834. // $resp = $provider->add(18074608795, 6, 200, ['order_sn' => $this->make_sn(), 'province' => 1, 'product_code' => 'XYZ100777', 'goods_id' => 6978]);
  2835. // $resp = $provider->query(['order_sn' => '86061683172050676749']);
  2836. $body = '{"number":"18074608795","mchid":"1","orderid":"86061683172050676749","price":"100.0","voucher":"","sign":"3d62a44c8f49a158e3cb8d58518bc193","oid":162,"status":"3"}';
  2837. $params = json_decode($body, true);
  2838. $provider = $this->getProvider('yongjia', 'RefillCallback');
  2839. $ret = $provider->verify($params);
  2840. $resp = $provider->notify($params);
  2841. }
  2842. public function testHuiyuan()
  2843. {
  2844. $provider = $this->getProvider('huiyuan');
  2845. // $resp = $provider->balance();
  2846. // $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2847. // $resp = $provider->query(['order_sn' => '25551683853847719519']);
  2848. $content = 'agent_id=2145738&bill_id=25551683853847719519&jnet_bill_no=C230512588496314&par_price=10.0000&purchase_amt=10.3600&bill_charge_time=20230512092120&bill_status=%B3%C9%B9%A6&bill_data_info=C230512588496314%3a1&sign=b0c81c3b9b1ce25ed76299069df4be82';
  2849. $params = $provider->decode_tag($content);
  2850. $provider = $this->getProvider('huiyuan', 'RefillCallBack');
  2851. $ret = $provider->verify($params);
  2852. $resp = $provider->notify($params);
  2853. }
  2854. public function testDezhi_yi()
  2855. {
  2856. $provider = $this->getProvider('dezhi_yi');
  2857. $resp = $provider->balance();
  2858. }
  2859. public function testMeihan()
  2860. {
  2861. // $provider = $this->getProvider('meihan');
  2862. // $resp = $provider->balance();
  2863. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  2864. // $resp = $provider->query(['order_sn' => '53841681808288816594']);
  2865. $body = '{"orderId":"230418165816651111","appId":"W33zTP9202","outOrderId":"53841681808288816594","sign":"b7bed78f436d7fccd6b59a77e58521fc","orderStatus":"3","completeTime":"20230418165816","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2866. $params = json_decode($body, true);
  2867. $provider = $this->getProvider('meihan', 'RefillCallBack');
  2868. $ret = $provider->verify($params);
  2869. $resp = $provider->notify($params);
  2870. }
  2871. public function testMeihan_fs()
  2872. {
  2873. // $provider = $this->getProvider('meihan_fs');
  2874. // $resp = $provider->balance();
  2875. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
  2876. // $resp = $provider->query(['order_sn' => '56911681870334278247']);
  2877. $body = '{"orderId":"230419101229102385","appId":"WtCDoePp9g","outOrderId":"56911681870334278247","sign":"91eb93d735dd468ab24e8cb6c7c4256f","orderStatus":"3","completeTime":"20230419101628","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2878. $params = json_decode($body, true);
  2879. $provider = $this->getProvider('meihan_fs', 'RefillCallBack');
  2880. $ret = $provider->verify($params);
  2881. $resp = $provider->notify($params);
  2882. }
  2883. public function testBinyu()
  2884. {
  2885. $provider = $this->getProvider('binyu');
  2886. $resp = $provider->balance();
  2887. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn()]);
  2888. // $resp = $provider->query(['order_sn' => '30431682320503722891']);
  2889. // $body = '{"order_status":"success","account":"15811535608","account_type":1,"product_id":10000,"price":"100.0000","customer_order_no":"30431682320503722891","serial_number":"1682320511733","signature":"b8f29e6e7c9e2cc9f93267efdf9c0b54"}';
  2890. // $params = json_decode($body, true);
  2891. // $provider = $this->getProvider('binyu', 'RefillCallBack');
  2892. // $ret = $provider->verify($params);
  2893. // $resp = $provider->notify($params);
  2894. }
  2895. public function testGetXMLEncoding()
  2896. {
  2897. $header = '<?xml version="1.0" encoding="GB2312"?>';
  2898. /* $ret = preg_match("/<?xml\s+[\s\S]*?>/", $header, $res);*/
  2899. $ret = preg_match("/<?xml\s+[\s\S]*encoding=[\"']([^\"']*)[\"'][\s\S]*?>/", $header, $res);
  2900. }
  2901. public function testfeihan()
  2902. {
  2903. $provider = $this->getProvider('feihan', 'RefillOil');
  2904. $resp = $provider->balance();
  2905. $resp = $provider->add(9030230005180327, 1, 200, ['order_sn' => $this->make_sn()]);
  2906. $resp = $provider->query(['order_sn' => '18141682668825332400']);
  2907. // $body = '{"err_msg":"","ordersuccesstime":"20230428161615","sporder_id":"18141682668825332400","ret_code":"1"}';
  2908. // $params = json_decode($body, true);
  2909. // $provider = $this->getProvider('feihan', 'RefillCallBack');
  2910. // $ret = $provider->verify($params);
  2911. // $resp = $provider->notify($params);
  2912. }
  2913. public function testBy_online()
  2914. {
  2915. // $provider = $this->getProvider('by_online');
  2916. // $resp = $provider->balance();
  2917. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  2918. // $resp = $provider->query(['order_sn' => '13041683603793048767']);
  2919. $body = '{"appId":"1","merchantorder_no":"13041683603793048767","order_sn":"2023050911432028374556511004","pay_mobile":"18500608333","amount":"5000","real_price":"5000","order_status":"7","extra":"","pay_time":"2023-05-09 11:43:22","completion_time":"2023-05-09 11:43:22","sign":"bdf57f1437a1ee4cdbbe62f0f44e98cd"}';
  2920. $params = json_decode($body, true);
  2921. $provider = $this->getProvider('by_online', 'RefillCallBack');
  2922. $ret = $provider->verify($params);
  2923. $resp = $provider->notify($params);
  2924. }
  2925. public function testGuochuang_nation_trd()
  2926. {
  2927. $provider = $this->getProvider('guochuang_nation_trd');
  2928. $resp = $provider->balance();
  2929. }
  2930. public function testQuanzhen()
  2931. {
  2932. // $provider = $this->getProvider('quanzhen', 'RefillOil');
  2933. // $resp = $provider->balance();
  2934. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  2935. // $resp = $provider->query(['order_sn' => '49611683682698964856']);
  2936. $body = '{"msg":"FAIL","amount":"10000","orderId":"49611683682698964856","phone":"1000111100021211884","voucher":"","appid":"wp1680594711360","sign":"dbb5446b01a209330da268b4b51765eb","time":"20230510103433","status":3}';
  2937. $params = json_decode($body, true);
  2938. $provider = $this->getProvider('quanzhen', 'RefillCallBack');
  2939. $ret = $provider->verify($params);
  2940. $resp = $provider->notify($params);
  2941. }
  2942. public function testZhongst_oil()
  2943. {
  2944. // $provider = $this->getProvider('zhongst_oil', 'RefillOil');
  2945. // $resp = $provider->balance();
  2946. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  2947. // $resp = $provider->query(['order_sn' => '47761683793213899415']);
  2948. $body = '{"szOrderId":"47761683793213899415","fSalePrice":"100.3","szAgentId":"200072","nFlag":"3","szVerifyString":"486394ca15e8b50a96f4a3f5fdfe4554","szPhoneNum":"1000111100021211884","szRtnMsg":"","nDemo":"100"}';
  2949. $params = json_decode($body, true);
  2950. $provider = $this->getProvider('zhongst_oil', 'RefillCallBack');
  2951. $ret = $provider->verify($params);
  2952. $resp = $provider->notify($params);
  2953. }
  2954. public function testBingguang_third()
  2955. {
  2956. // $provider = $this->getProvider('bingguang_third');
  2957. // $resp = $provider->balance();
  2958. // $resp = $provider->add(608168539, 7, 30, [ 'order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => '6978', ]);
  2959. // $resp = $provider->query(['order_sn' => '92481683880348681476']);
  2960. $body = ' {"orderId":"230512163238675676","appId":"lMIQD9hkWG","outOrderId":"92481683880348681476","sign":"37a3b416c25f4272b4375a544168033b","orderStatus":"3","completeTime":"20230512164216","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  2961. $params = json_decode($body, true);
  2962. $provider = $this->getProvider('bingguang_third','RefillCallBack');
  2963. $ret = $provider->verify($params);
  2964. $resp = $provider->notify($params);
  2965. }
  2966. public function testTianchen_sec()
  2967. {
  2968. // $provider = $this->getProvider('tianchen_sec');
  2969. // $resp = $provider->balance();
  2970. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  2971. // $resp = $provider->query(['order_sn' => '18681685500032499039']);
  2972. $body = '{"szOrderId":"18681685500032499039","fSalePrice":"50.075","szAgentId":"100322","nFlag":"2","szVerifyString":"254e4e82e7bac8728e45f428bdb96cf8","szPhoneNum":"18500608333","szRtnMsg":"100101246122305311027173950243","nDemo":"50"}';
  2973. $params = json_decode($body, true);
  2974. $provider = $this->getProvider('tianchen_sec', 'RefillCallBack');
  2975. $ret = $provider->verify($params);
  2976. $resp = $provider->notify($params);
  2977. }
  2978. public function testQuanzhen_hf()
  2979. {
  2980. $provider = $this->getProvider('quanzhen_hf');
  2981. // $resp = $provider->balance();
  2982. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  2983. $resp = $provider->query(['order_sn' => '36471685521966668231']);
  2984. $body = ' {"msg":"success","amount":"5000","orderId":"36471685521966668231","phone":"15811535608","voucher":"","appid":"wp1685346652120","sign":"b4700c1f34d2eb4115ed57a257f59916","time":"20230531163356","status":2}';
  2985. $params = json_decode($body, true);
  2986. $provider = $this->getProvider('quanzhen_hf', 'RefillCallBack');
  2987. $ret = $provider->verify($params);
  2988. $resp = $provider->notify($params);
  2989. }
  2990. public function testQuanzhen_hf_man()
  2991. {
  2992. $provider = $this->getProvider('quanzhen_hf_man');
  2993. $resp = $provider->balance();
  2994. }
  2995. public function testMeixu_sec()
  2996. {
  2997. $provider = $this->getProvider('meixu_sec');
  2998. $resp = $provider->balance();
  2999. }
  3000. public function testShuzishijie()
  3001. {
  3002. // $provider = $this->getProvider('shuzishijie');
  3003. // $resp = $provider->balance();
  3004. // $resp = $provider->add(17801048874, 7, 30, [ 'order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => '6978', 'third_card_type' => 1]);
  3005. // $resp = $provider->query(['order_sn' => '68921686127924343359']);
  3006. $body = ' {"merchantId":"23329","outTradeNo":"68921686127924343359","status":"01","rechargeAccount":"17801048874","sign":"D3B1A52D7EB5A08C63803806C27C841A"}';
  3007. $params = json_decode($body, true);
  3008. $provider = $this->getProvider('shuzishijie','RefillCallBack');
  3009. $ret = $provider->verify($params);
  3010. $resp = $provider->notify($params);
  3011. }
  3012. public function testXinma()
  3013. {
  3014. // $provider = $this->getProvider('xinma', 'RefillOil');
  3015. // $resp = $provider->balance();
  3016. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3017. // $resp = $provider->query(['order_sn' => '14771686195802820971']);
  3018. $body = ' {"sys_order_id":"SN202306081143280001","user_order_id":"14771686195802820971","status":"202","err_msg":"","order_money":"0","sign":"578e3222b0c9278fd4d3c1272bdbf8b4","official_order_id":"","rec_msg":""}';
  3019. $params = json_decode($body, true);
  3020. $provider = $this->getProvider('xinma', 'RefillCallBack');
  3021. $ret = $provider->verify($params);
  3022. $resp = $provider->notify($params);
  3023. }
  3024. public function testPiaoyi_oil()
  3025. {
  3026. // $provider = $this->getProvider('piaoyi_oil');
  3027. // $resp = $provider->balance();
  3028. // $resp = $provider->add(9030230005180327, 7, 100, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => '6978',]);
  3029. // $resp = $provider->query(['order_sn' => '32121686561773063938']);
  3030. $body = '{"outOrderNumber":"32121686561773063938","ext":"","brandName":"中石油","orderNumber":"O1140496202559377","productId":"1244","salesPrice":"98.000000","chargeNumber":"9030230005180327","orderRemark":"成功","sign":"8af5a7df0ec6e53b3a8ea9f7dac28688","agentName":"yl-syj","orderStatus":"200","updateTime":"2023-06-12 17:23:55","productName":"安徽石油100","chargeFace":"100.00","cardList":"","brandOrderNumber":"","cityName":"全省","createTime":"2023-06-12 17:23:15","notifyUrl":"https://www.xyzshops.cn/mobile/callback/testcb.php","provinceName":"安徽","orderTimeOutDate":"2023-06-13 17:23:15","timestamp":"1686561835363"}';
  3031. $params = json_decode($body, true);
  3032. $provider = $this->getProvider('piaoyi_oil','RefillCallBack');
  3033. $ret = $provider->verify($params);
  3034. $resp = $provider->notify($params);
  3035. }
  3036. public function testQiantu()
  3037. {
  3038. // $provider = $this->getProvider('qiantu');
  3039. // $resp = $provider->balance();
  3040. // $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3041. // $resp = $provider->query(['order_sn' => '37251686721677638585']);
  3042. $body = '{"orderid":"NE2A230614134804263-7800830","sporderid":"37251686721677638585","userid":"10003166","merchantsubmittime":"20230614134805","resultno":"9","parvalue":"100","remark1":"","fundbalance":"-97.3","sign":"F09ABCC44C5C3350D628B3C7414253EB"}';
  3043. $params = json_decode($body, true);
  3044. $provider = $this->getProvider('qiantu', 'RefillCallBack');
  3045. $ret = $provider->verify($params);
  3046. $resp = $provider->notify($params);
  3047. }
  3048. public function testTongka()
  3049. {
  3050. // $provider = $this->getProvider('tongka');
  3051. // $resp = $provider->balance();
  3052. // $resp = $provider->add(18500608333, 7, 30, [ 'order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => '6978', ]);
  3053. // $resp = $provider->query(['order_sn' => '94421686817072302858']);
  3054. $body = '{"order_sn":"BL2306151618051810432584","status":"6","account":"18500608333","third_order_sn":"94421686817072302858","time":1686817094,"sign":"5852EF7F725AEDF6CCE9CBF459A27368"}';
  3055. $params = json_decode($body, true);
  3056. $provider = $this->getProvider('tongka', 'RefillCallBack');
  3057. }
  3058. public function testYuntian()
  3059. {
  3060. // $provider = $this->getProvider('yuntian');
  3061. // $resp = $provider->balance();
  3062. $provider = $this->getProvider('yuntian_fs');
  3063. // $resp = $provider->balance();
  3064. $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3065. // $resp = $provider->query(['order_sn' => '89151688372671258257']);
  3066. // $body = '{"status":"019","orderNo":"F2307031624355807256","consumerNo":"89151688372671258257","mobile":"15811535608","voucherNo":"null","account":"ytyzqg","timestamp":"1688372676004","sign":"b9b3e1643052fb4d2162d20311ec140f57790384"}';
  3067. // $params = json_decode($body, true);
  3068. // $provider = $this->getProvider('yuntian','RefillCallBack');
  3069. // $ret = $provider->verify($params);
  3070. // $resp = $provider->notify($params);
  3071. }
  3072. public function testKainuo()
  3073. {
  3074. // $provider = $this->getProvider('kainuo');
  3075. // $resp = $provider->balance();
  3076. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3077. // $resp = $provider->query(['order_sn' => '65391689824562951763']);
  3078. $body = '{"szOrderId":"65391689824562951763","fSalePrice":"49.7","szAgentId":"200050","nFlag":"3","szVerifyString":"1b55dc64277dd8e49f72dc4a5d46f045","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"50"}';
  3079. $params = json_decode($body, true);
  3080. $provider = $this->getProvider('kainuo','RefillCallBack');
  3081. $ret = $provider->verify($params);
  3082. $resp = $provider->notify($params);
  3083. }
  3084. public function testZhenghe_sec()
  3085. {
  3086. // $provider = $this->getProvider('zhenghe_sec');
  3087. // $resp = $provider->balance();
  3088. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3089. // $resp = $provider->query(['order_sn' => '16261690182981011717']);
  3090. $body = '{"number":"15811535608","mchid":"200003","orderid":"16261690182981011717","price":"50.25","voucher":"","sign":"556d199d03e7c46c40c90b9bd6fc7618","oid":2000000705,"status":"3"}';
  3091. $params = json_decode($body, true);
  3092. $provider = $this->getProvider('zhenghe_sec','RefillCallBack');
  3093. $ret = $provider->verify($params);
  3094. $resp = $provider->notify($params);
  3095. }
  3096. public function testJuhu()
  3097. {
  3098. $provider = $this->getProvider('juhu');
  3099. $resp = $provider->balance();
  3100. }
  3101. public function testFeihan_hf()
  3102. {
  3103. // $provider = $this->getProvider('feihan_hf');
  3104. // $resp = $provider->add(15715155515, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3105. $body = '{"err_msg":"","ordersuccesstime":"20230802150200","sign":"52920F6CECE7DE9ACE4A0A0224DEFD0C","sporder_id":"58431690957151281598","userid":"A08566","ret_code":"1"}';
  3106. $params = json_decode($body, true);
  3107. $provider = $this->getProvider('feihan_hf','RefillCallBack');
  3108. $ret = $provider->verify($params);
  3109. $resp = $provider->notify($params);
  3110. }
  3111. public function testWangxin()
  3112. {
  3113. // $provider = $this->getProvider('wangxin');
  3114. // $resp = $provider->balance();
  3115. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  3116. // $resp = $provider->query(['order_sn' => '83371692006923863228']);
  3117. $body = '{"body":{"err_msg":"充值失败","phone":"15811535608","status":"2","kh_order_id":"83371692006923863228","kh_settle_time":"20230814175650","kh_settle_price":"50.25","type":"1","order_id":"1495FC2007010931207019","ext_content":""},"header":{"sign":"Ia7+83wqIGlLDa8FR5ug5gPsmTLPm7/bvXAtM47Rqxa1nxGpHtVx3+/Fg876xPxHTeMkBQoWkLhdshX9XJdUoaijArU0RseQoDueWnExwDOX0aDBymLr/wyRJ7TavIa2+U/VglDOTIm9pTTen2u6dBUPoy8nn3jZ/BfIwU2KPIQ=","sign_nonce":"sign1692007064780","timestamp":"1692007064780","req_no":"reqno1692007064780","app_id":"20230811115729"}}';
  3118. $params = json_decode($body, true);
  3119. $body = $params['body'];
  3120. $header = $params['header'];
  3121. $params = array_merge($body, $header);
  3122. $provider = $this->getProvider('wangxin','RefillCallBack');
  3123. $ret = $provider->verify($params);
  3124. $resp = $provider->notify($params);
  3125. }
  3126. public function testAmingjd()
  3127. {
  3128. // $provider = new refill\amingjd\RefillOil([]);
  3129. // $resp = $provider->add(13699279618, 5, 30, ['order_sn' => $this->make_sn()]);
  3130. // $resp = $provider->query(['order_sn' => '42301616475989518588']);
  3131. $body = '{"order_id":"83321616478215494884","mchid":"10003","tel":"13699279618","price":"30.00","sign":"01c49620c155a80bc43cecc2b1651868","status":"0","out_order_id":"0"}';
  3132. $params = json_decode($body, true);
  3133. refill\RefillFactory::instance()->notify('amingjd', $params);
  3134. }
  3135. public function testAmingjdmanPhone()
  3136. {
  3137. $provider = new refill\amingjdman\RefillPhone([]);
  3138. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3139. // $resp = $provider->query(['order_sn' => '82741619577673758623']);
  3140. $body = '{"order_id":"82741619577673758623","mchid":"10045","tel":"13699279618","price":"30.00","sign":"2fe55fb4d4b2acc2e98137adb82fa57e","status":"0","out_order_id":"0"}';
  3141. $params = json_decode($body, true);
  3142. refill\RefillFactory::instance()->notify('amingjdman', $params);
  3143. }
  3144. public function testWeishengyWtPhone()
  3145. {
  3146. $provider = new refill\weishengywt\RefillPhone([]);
  3147. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3148. // $resp = $provider->query(['order_sn' => '27681620538125370652']);
  3149. $data = '{"szOrderId":"27681620538125370652","fSalePrice":"47.5","szAgentId":"200045","nFlag":"2","szVerifyString":"92fafec121b77518d539ed9f5005fdf9","szPhoneNum":"18500608333","szRtnMsg":"110103308032105091328520502948","nDemo":"50"}';
  3150. $params = json_decode($data, true);
  3151. refill\RefillFactory::instance()->notify('weishengywt', $params);
  3152. }
  3153. public function testWeishengyJDPhone()
  3154. {
  3155. $provider = new refill\weishengyjd\RefillPhone([]);
  3156. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3157. // $resp = $provider->query(['order_sn' => '14261620887423822879']);
  3158. $data = '{"szOrderId":"14261620887423822879","fSalePrice":"44.0","szAgentId":"200050","nFlag":"3","szVerifyString":"3cceef390602058e1d2fdde2e07636a4","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  3159. $params = json_decode($data, true);
  3160. refill\RefillFactory::instance()->notify('weishengyjd', $params);
  3161. }
  3162. public function testYeziPhone()
  3163. {
  3164. $provider = new refill\yezi\RefillPhone([]);
  3165. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3166. // $resp = $provider->query(['order_sn' => '35261620988265145105']);
  3167. $data = '{"mchid":"10147","order_sn":"35261620988265145105","amount":"50.00","cardno":"18500608333","trade_no":"6363570674332280422825","idcard":"","card_name":"","official_sn":"","message":"","state":"CANCEL","sign":"b79f2ddbb5b7eef98f414585a5bd2cde"}';
  3168. $params = json_decode($data, true);
  3169. refill\RefillFactory::instance()->notify('yezi', $params);
  3170. }
  3171. public function testWeishengysixPhone()
  3172. {
  3173. $provider = new refill\weishengysix\RefillPhone([]);
  3174. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3175. // $resp = $provider->query(['order_sn' => '17171624434289348649']);
  3176. $data = '{"szOrderId":"17171624434289348649","fSalePrice":"44.5","szAgentId":"200074","nFlag":"2","szVerifyString":"fa5735090199d97e6a50e7f3083be111","szPhoneNum":"18500608333","szRtnMsg":"AW2021062315464045A27","nDemo":"50"}';
  3177. $params = json_decode($data, true);
  3178. refill\RefillFactory::instance()->notify('weishengysix', $params);
  3179. }
  3180. public function testHaohaoOil()
  3181. {
  3182. $provider = new refill\haohao\RefillOil([]);
  3183. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  3184. $data['amount'] = 20000;
  3185. $data['mchId'] = 467253;
  3186. $data['mchOrderNo'] = '5514850674656058146707';
  3187. $data['mobile'] = '';
  3188. $data['sign'] = 'F282D68972A437F3CEB3516BB2FDD19A';
  3189. $data['operator'] = 4;
  3190. $data['number'] = '1000113200020348885';
  3191. $data['thirdOrderNo'] = '2317184088901537792';
  3192. $data['directStatus'] = 5;
  3193. // $input = json_decode($data, true);
  3194. refill\RefillFactory::instance()->notify('haohao',$data);
  3195. }
  3196. public function testJuzhuoOil()
  3197. {
  3198. $provider = new refill\juzhuo\RefillOil([]);
  3199. // $resp = $provider->add(1000111100021211884, 2, 200, ['order_sn' => $this->make_sn()]);
  3200. // $resp = $provider->query(['order_sn' => '20121621578185774451']);
  3201. // $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"}';
  3202. // $input = json_decode($data, true);
  3203. $data['channelsort'] = 'OIL_CARD';
  3204. $data['channelno'] = '';
  3205. $data['onlystr'] = '0772770675248490450497';
  3206. $data['channel'] = 'JD';
  3207. $data['sign'] = '4a9f113bfa4aa2d155de7136ca0afe2d';
  3208. $data['amt'] = '100';
  3209. $data['notifyurl'] = 'http://121.89.212.167/racc/callback/lingzh/juzhuo.php';
  3210. $data['cardtype'] = 'Sinoepc';
  3211. $data['cardno'] = '1000113200029532754';
  3212. $data['orgid'] = '6095171500';
  3213. $data['account'] = '';
  3214. $data['status'] = '3';
  3215. refill\RefillFactory::instance()->notify('juzhuo',$data);
  3216. }
  3217. public function testZeheng()
  3218. {
  3219. $provider = new refill\zeheng\RefillOil([]);
  3220. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  3221. // $resp = $provider->query(['order_sn' => '45951620814813332604']);
  3222. $data = '{"extOrderId":"45951620814813332604","orderId":"R2021051218240000192928","salePrice":"96.8000","sign":"0d6b9641eaf8d36ecba82cfefc6aa307","state":"4"}';
  3223. $input = json_decode($data, true);
  3224. refill\RefillFactory::instance()->notify('zeheng',$input);
  3225. }
  3226. public function testXiaoniu()
  3227. {
  3228. $provider = $this->getProvider('xiaoniu','RefillOil');
  3229. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 500, ['order_sn' => $this->make_sn()]);
  3230. $resp = $provider->query(['order_sn' => '15981632813532634860']);
  3231. // $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"}';
  3232. // $input = json_decode($data, true);
  3233. // refill\RefillFactory::instance()->notify('xiaoniu',$input);
  3234. // $resp = $provider->balance();
  3235. }
  3236. public function testYingdian()
  3237. {
  3238. $provider = $this->getProvider('yingdian','RefillOil');
  3239. $resp = $provider->balance();
  3240. // $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 200, ['order_sn' => $this->make_sn()]);
  3241. // $resp = $provider->query(['order_sn' => '94691626688509004979']);
  3242. // $resp = $provider->query(['order_sn' => '45671626687631917892']);
  3243. // $data = '{"orderNo":"94691626688509004979","vouchers":"[\"2421071918070053\"]","orderId":"63400811-e877-11eb-a89f-00163e147a9b","spOrderNo":"052423YK241720210719175503603473","status":"SUCCESS"}';
  3244. // $input = json_decode($data, true);
  3245. // refill\RefillFactory::instance()->notify('yingdian',$input);
  3246. }
  3247. public function testZhenqi()
  3248. {
  3249. $provider = new refill\zhenqi\RefillPhone([]);
  3250. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3251. // $resp = $provider->query(['order_sn' => '42611626267945146350']);
  3252. // $data = '{"out_trade_no":"14001626266194932132","create_time":"1626266201","sp_order_no":"110103353232107142044550619272","status":"1","sign":"3C2F8ED40EEB9151D2117E2DA1FA64AA"}';
  3253. // $input = json_decode($data, true);
  3254. // refill\RefillFactory::instance()->notify('zhenqi',$input);
  3255. $resp = $provider->balance();
  3256. }
  3257. public function testYunsuoyaofs()
  3258. {
  3259. $provider = new refill\yunsuoyaofs\RefillPhone([]);
  3260. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  3261. // $resp = $provider->query(['order_sn' => '85681626322286098163']);
  3262. // $data = '{"orderid":"AMU21071512111544162","sporderid":"85681626322286098163","userid":"10002671","merchantsubmittime":"20210715121132","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.7","sign":"45ECFF26E84F7DC3BFFDCFAFF3B1E561"}';
  3263. // $input = json_decode($data, true);
  3264. // refill\RefillFactory::instance()->notify('yunsuoyaofs',$input);
  3265. $resp = $provider->balance();
  3266. }
  3267. public function testZhenqi1m()
  3268. {
  3269. $provider = new refill\zhenqi1m\RefillPhone([]);
  3270. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3271. // $resp = $provider->query(['order_sn' => '45611626334593130605']);
  3272. // $data = '{"out_trade_no":"45611626334593130605","create_time":"1626334606","sp_order_no":"202107152200117311004426885635","status":"1","sign":"CF8EB902F60B76591C898C991361BB4D"}';
  3273. // $input = json_decode($data, true);
  3274. // refill\RefillFactory::instance()->notify('zhenqi1m',$input);
  3275. $resp = $provider->balance();
  3276. }
  3277. public function testHongxudayz()
  3278. {
  3279. $provider = new refill\hongxudayz\RefillPhone([]);
  3280. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3281. // $resp = $provider->query(['order_sn' => '78221626445316011524']);
  3282. $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":""}';
  3283. $input = json_decode($data, true);
  3284. refill\RefillFactory::instance()->notify('hongxudayz',$input);
  3285. }
  3286. public function testHongxudagy()
  3287. {
  3288. $provider = new refill\hongxudagy\RefillPhone([]);
  3289. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3290. // $resp = $provider->query(['order_sn' => '86521626446475240639']);
  3291. // $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":""}';
  3292. // $input = json_decode($data, true);
  3293. // refill\RefillFactory::instance()->notify('hongxudagy',$input);
  3294. $resp = $provider->balance();
  3295. }
  3296. public function testHongxudayz996()
  3297. {
  3298. $provider = new refill\hongxudayz996\RefillPhone([]);
  3299. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3300. // $resp = $provider->query(['order_sn' => '73691626753698522472']);
  3301. $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":""}';
  3302. $input = json_decode($data, true);
  3303. refill\RefillFactory::instance()->notify('hongxudayz996',$input);
  3304. }
  3305. public function testHongxudagy996()
  3306. {
  3307. $provider = new refill\hongxudagy996\RefillPhone([]);
  3308. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3309. // $resp = $provider->query(['order_sn' => '87681626758209689412']);
  3310. $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":""}';
  3311. $input = json_decode($data, true);
  3312. refill\RefillFactory::instance()->notify('hongxudagy996',$input);
  3313. }
  3314. public function testYunchonggong()
  3315. {
  3316. // $provider = $this->getProvider('yunchonggong');
  3317. // $resp = $provider->balance();
  3318. // $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
  3319. // $resp = $provider->query(['order_sn' => '30391661237853787868']);
  3320. $body = '{"szOrderId":"30391661237853787868","fSalePrice":"28.8","szAgentId":"200005","nFlag":"3","szVerifyString":"5996f052094ed3c7655ed666d66b2804","szPhoneNum":"15811535608","szRtnMsg":"","nDemo":"30"}';
  3321. $params = json_decode($body, true);
  3322. $provider = $this->getProvider('yunchonggong', 'RefillCallback');
  3323. $ret = $provider->verify($params);
  3324. $resp = $provider->notify($params);
  3325. }
  3326. public function testBingdht()
  3327. {
  3328. $provider = new refill\bingdht\RefillPhone([]);
  3329. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3330. // $resp = $provider->query(['order_sn' => '62491626761331174794']);
  3331. // $data = '{"szOrderId":"62491626761331174794","fSalePrice":"45.25","szAgentId":"200044","nFlag":"3","szVerifyString":"46745191d31b16ee7978a7f5554357d6","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
  3332. // $input = json_decode($data, true);
  3333. // refill\RefillFactory::instance()->notify('bingdht',$input);
  3334. $resp = $provider->balance();
  3335. }
  3336. public function testYuecheng()
  3337. {
  3338. $provider = new refill\yuecheng\RefillPhone([]);
  3339. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3340. // $resp = $provider->query(['order_sn' => '45101626776884387650']);
  3341. $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"}';
  3342. $input = json_decode($data, true);
  3343. refill\RefillFactory::instance()->notify('yuecheng',$input);
  3344. }
  3345. public function testPrice()
  3346. {
  3347. $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
  3348. $rate = 0.994;
  3349. foreach ($amounts as $amount) {
  3350. $price[] = $amount * $rate;
  3351. }
  3352. }
  3353. public function testCallbackDir()
  3354. {
  3355. $path = "/callback";
  3356. $file = "/mobile/callback/refill_call.php";
  3357. $basename = basename($file);
  3358. $tmp = "{$path}/{$basename}.php";
  3359. return file_exists($tmp);
  3360. }
  3361. public function testWeisPhone()
  3362. {
  3363. $provider = new refill\weisyd\RefillPhone([]);
  3364. $resp = $provider->add(17801048874, 4, 10, ['order_sn' => $this->make_sn()]);
  3365. }
  3366. public function testXcPhone()
  3367. {
  3368. $provider = new refill\xc\RefillPhone([]);
  3369. $resp = $provider->add(13699279618, 5, 100, ['order_sn' => $this->make_sn()]);
  3370. // $resp = $provider->query(['order_sn' => '87961616926444043617']);
  3371. $params['pay_orderid'] = '87961616926444043617';
  3372. $params['pay_iphone'] = '18500608333';
  3373. $params['pay_money'] = '100';
  3374. $params['wt_orderid'] = '202103281816121070';
  3375. $params['status'] = '1';
  3376. $params['sign'] = 'f7be2e859a5a6dc7b1a8273361617752';
  3377. // refill\RefillFactory::instance()->notify('xc',$params);
  3378. }
  3379. public function testAfandPhone()
  3380. {
  3381. $provider = new refill\afand\RefillPhone([]);
  3382. // for ($i = 3; $i > 0; --$i) {
  3383. $resp = $provider->query(['order_sn' => '540668612768904780']);
  3384. // }
  3385. }
  3386. public function testAfandengPhone()
  3387. {
  3388. $provider = new refill\afandeng\RefillPhone([]);
  3389. // for ($i = 5; $i > 0; --$i) {
  3390. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  3391. // }
  3392. // $resp = $provider->query(['order_sn' => '20941616115610023539']);
  3393. // $params['usr'] = 'afandeng';
  3394. // $params['ord'] = '20941616115610023539';
  3395. // $params['state'] = '2';
  3396. // $params['bz'] = '';
  3397. // $params['sgn'] = 'BA2C9D379C3EB648A0B7AAB3A21A3F6A';
  3398. // refill\RefillFactory::instance()->notify('afandeng',$params);
  3399. }
  3400. public function testWantongPhone()
  3401. {
  3402. $provider = new refill\wantong\RefillPhone([]);
  3403. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3404. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3405. $resp = $provider->query(['order_sn' => '26061618988575301841']);
  3406. $data = '{"uid":"97396885","order_no":"26061618988575301841","mobile_order_no":"","phone_number":"13699279618","face_value":"3000","status":"9","sign":"1a019202656cf4feffe715025fab01bf"}';
  3407. $input = json_decode($data, true);
  3408. // refill\RefillFactory::instance()->notify('wantong',$input);
  3409. }
  3410. public function testXunyinPhone()
  3411. {
  3412. $provider = $this->getProvider('xunyin');
  3413. $resp = $provider->balance();
  3414. // $resp = $provider->add(17703711950, 6, 30, ['order_sn' => $this->make_sn()]);
  3415. // $resp = $provider->query(['order_sn' => '76831617176125893158']);
  3416. // $xml = '<Order><cpid>8417</cpid><orderid>40591617173295524057</orderid><order_no>14784226</order_no><msg>充值中</msg><Code>0000</Code><Cards/></Order>';
  3417. // $resp = $provider->xmlToArray($xml);
  3418. // if ($resp['Code'] === '0000') {
  3419. // return [true, $resp['order_no'], false];
  3420. // } else {
  3421. // return [false, $resp['msg'], false];
  3422. // }
  3423. // $params['ext'] = '';
  3424. // $params['code'] = '8888';
  3425. // $params['sign'] = '428ac223cf3a1f6f3d382aac754e8e17';
  3426. // $params['statemes'] = '成功';
  3427. // $params['id'] = '76831617176125893158';
  3428. // $params['userid'] = '8417';
  3429. // $params['operatorid'] = '1000000083421033115583773201';
  3430. // $params['status'] = 'SUCCESS';
  3431. // refill\RefillFactory::instance()->notify('xunyin',$params);
  3432. $resp = $provider->balance();
  3433. }
  3434. public function testFenshengPhone()
  3435. {
  3436. $file = BASE_HELPER_RAPI_PATH . "/qianqian/RefillOil.php";
  3437. if(!file_exists($file)){
  3438. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  3439. return false;
  3440. } else {
  3441. require_once($file);
  3442. Log::record("file={$file} load success.",Log::DEBUG);
  3443. }
  3444. $provider = new refill\qianqian\RefillPhone([]);
  3445. $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3446. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  3447. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  3448. // $datas = json_decode($datas,true);
  3449. // foreach ($datas as $data) {
  3450. // refill\RefillFactory::instance()->notify('fensheng',$data);
  3451. // }
  3452. }
  3453. public function testQianqianPhone()
  3454. {
  3455. $provider = new refill\qianqian\RefillPhone([]);
  3456. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3457. // $resp = $provider->query(['order_sn' => '27511617764278021035']);
  3458. // $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
  3459. // $datas = json_decode($datas,true);
  3460. // foreach ($datas as $data) {
  3461. // refill\RefillFactory::instance()->notify('fensheng',$data);
  3462. // }
  3463. $resp = $provider->balance();
  3464. }
  3465. public function testQianqianmanPhone()
  3466. {
  3467. $provider = new refill\qianqianman\RefillPhone([]);
  3468. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  3469. // $resp = $provider->query(['order_sn' => '72011621236975003462']);
  3470. $data = '{"orderNo":"F2105171538062539442","status":"019","consumerNo":"72011621236975003462","voucherNo":null,"mobile":"13699279618"}';
  3471. $input = json_decode($data, true);
  3472. refill\RefillFactory::instance()->notify('qianqianman',$input);
  3473. }
  3474. public function testRiyingPhone()
  3475. {
  3476. $provider = new refill\riying\RefillPhone([]);
  3477. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3478. $resp = $provider->query(['ch_trade_no' => '2021041311120213187423105022']);
  3479. $data = '{"UserId":"10050","SysOrderId":"2021041311120213187423105022","OrderId":"15641618283518423567","State":"4","Timestamp":"1618283565746","VoucherType":"1","VoucherContent":"511009928000087852","Sign":"a6ec70a3ea42baae941528398c6d0a43"}';
  3480. $input = json_decode($data, true);
  3481. // refill\RefillFactory::instance()->notify('riying',$input);
  3482. }
  3483. public function testWeishengyPhone()
  3484. {
  3485. $provider = new refill\weishengy\RefillPhone([]);
  3486. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3487. // $resp = $provider->query(['order_sn' => '15551618590601301527']);
  3488. $data = '{"masId":"699270071532654592","oids":"158877719094,166090529155,158887187476","orderNo":"62411618635377880788","orderPrice":"150.00","phone":"18500608333","sign":"3EC10A32FC4CCC976048E1164D0FCBF6","status":"1","time":"1618643281063","type":"2"}';
  3489. $input = json_decode($data, true);
  3490. refill\RefillFactory::instance()->notify('weishengy',$input);
  3491. }
  3492. public function testWailingPhone()
  3493. {
  3494. $provider = new refill\wailing\RefillPhone([]);
  3495. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3496. $resp = $provider->query(['order_sn' => '73241618543784045618']);
  3497. $data = '{"order_id":"73241618543784045618","mchid":"10045","tel":"13699279618","price":"30.00","sign":"4991de3e40f14c198b8c194455ea021b","status":"0","out_order_id":"0"}';
  3498. $input = json_decode($data, true);
  3499. // refill\RefillFactory::instance()->notify('wailing',$input);
  3500. }
  3501. public function testShengyingPhone()
  3502. {
  3503. $provider = new refill\shengying\RefillPhone([]);
  3504. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3505. $resp = $provider->query(['order_sn' => '37571618805115582483']);
  3506. $data = '{"TaskID":"129636","Mobile":"13699279618","Status":"4","ReportTime":"2021-04-19T12:06:16.050","ReportCode":"1:511531522026586295","OutTradeNo":"37571618805115582483","ReceiptNum":"511531522026586295","Sign":"a7f46a988bc8483091d94130804e5078"}';
  3507. $input = json_decode($data, true);
  3508. // refill\RefillFactory::instance()->notify('shengying',$input);
  3509. }
  3510. public function testYunlingPhone()
  3511. {
  3512. $provider = new refill\yunling\RefillPhone([]);
  3513. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  3514. // $resp = $provider->query(['order_sn' => '73791623147517199719']);
  3515. // $data = '{"orderid":"EAF21060818183032772","sporderid":"73791623147517199719","userid":"10002504","merchantsubmittime":"20210608181912","resultno":"1","parvalue":"30","remark1":"1000000083421060818483137636","payno":"1000000083421060818483137636","fundbalance":"-28.59","sign":"8D77517AC3905ED88BF79EE789A5FA86"}';
  3516. // $input = json_decode($data, true);
  3517. // refill\RefillFactory::instance()->notify('yunling',$input);
  3518. $resp = $provider->balance();
  3519. }
  3520. public function testZhongstPhone()
  3521. {
  3522. // $provider = $this->getProvider('zhongst');
  3523. // $resp = $provider->balance();
  3524. // $resp = $provider->add(18500608333, 5, 1, ['order_sn' => $this->make_sn()]);
  3525. // $resp = $provider->query(['order_sn' => '14941642477572151012']);
  3526. $body = '{"orderId":"220118114638207211","appId":"Jab1HfumVk","outOrderId":"14941642477572151012","sign":"4e594f9c541667ea5f07c509993932fb","orderStatus":"2","completeTime":"20220118115013","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"110103308212201181148550490052"}';
  3527. $params = json_decode($body, true);
  3528. $provider = $this->getProvider('zhongst','RefillCallBack');
  3529. $ret = $provider->verify($params);
  3530. $resp = $provider->notify($params);
  3531. }
  3532. public function testXunaoPhone()
  3533. {
  3534. $provider = new refill\xunao\RefillPhone([]);
  3535. // $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  3536. // $resp = $provider->query(['order_sn' => '40021619431386253803', 'card_no' => 18074608795, 'card_type' => 6]);
  3537. // $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"}';
  3538. // $input = json_decode($data, true);
  3539. // refill\RefillFactory::instance()->notify('xunao',$input);
  3540. $resp = $provider->balance();
  3541. }
  3542. public function testYonghePhone()
  3543. {
  3544. $provider = new refill\yonghe\RefillPhone([]);
  3545. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  3546. // $resp = $provider->query(['order_sn' => '20461619597297972685']);
  3547. // $data = '{"szOrderId":"20461619597297972685","fSalePrice":"29.955","szAgentId":"200115","nFlag":"2","szVerifyString":"b5c292a13c5e67a9b850eb37239682ae","szPhoneNum":"13699279618","szRtnMsg":"2021042822001139701437383521","nDemo":"30"}';
  3548. // $input = json_decode($data, true);
  3549. // refill\RefillFactory::instance()->notify('yonghe',$input);
  3550. $resp = $provider->balance();
  3551. }
  3552. public function testJumiPhone()
  3553. {
  3554. $provider = new refill\jumikc\RefillPhone([]);
  3555. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  3556. // $resp = $provider->query(['order_sn' => '12161619768293529384']);
  3557. // $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"}';
  3558. // $input = json_decode($data, true);
  3559. // refill\RefillFactory::instance()->notify('jumi',$input);
  3560. $resp = $provider->balance();
  3561. }
  3562. public function testJumiOil()
  3563. {
  3564. $provider = new refill\jumi\RefillOil([]);
  3565. // $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  3566. // $resp = $provider->query(['order_sn' => '29021620617872685187']);
  3567. $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"}';
  3568. $input = json_decode($data, true);
  3569. refill\RefillFactory::instance()->notify('jumi',$input);
  3570. }
  3571. public function testFengyePhone()
  3572. {
  3573. $provider = new refill\fengye\RefillPhone([]);
  3574. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  3575. // $resp = $provider->query(['order_sn' => '53511620355988978053', 'card_no' => 18074608795, 'card_type' => 6]);
  3576. $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"}';
  3577. $input = json_decode($data, true);
  3578. refill\RefillFactory::instance()->notify('fengye',$input);
  3579. }
  3580. public function testYunsuoyaoPhone()
  3581. {
  3582. $provider = new refill\yunsuoyao\RefillPhone([]);
  3583. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  3584. // $resp = $provider->query(['order_sn' => '20431621331092296201']);
  3585. // $data = '{"orderid":"RLU21051817441937847","sporderid":"20431621331092296201","userid":"10002501","merchantsubmittime":"20210518174858","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.74","sign":"426EAC103B79505BAE7AB3F16886F1A8"}';
  3586. // $input = json_decode($data, true);
  3587. // refill\RefillFactory::instance()->notify('yunsuoyao',$input);
  3588. $resp = $provider->balance();
  3589. }
  3590. public function testAfdPhone()
  3591. {
  3592. $provider = new refill\afd\RefillPhone([]);
  3593. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3594. // $resp = $provider->query(['order_sn' => '71001621233525947994']);
  3595. $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"}';
  3596. $input = json_decode($data, true);
  3597. refill\RefillFactory::instance()->notify('afd',$input);
  3598. }
  3599. public function testLuqianPhone()
  3600. {
  3601. $provider = new refill\luqian\RefillPhone([]);
  3602. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  3603. $resp = $provider->query(['order_sn' => '2829660672500596314764']);
  3604. $data = '{"amount":"100","charge_type":"0","code":"1","partner_id":"38","phone":"18500608333","sign":"c2c86cccc73fa991a63c369e683c91f2","partner_order_no":"34101618897099329575","official_order_id":"110103308072104201338340278420"}';
  3605. $input = json_decode($data, true);
  3606. // refill\RefillFactory::instance()->notify('luqian',$input);
  3607. }
  3608. public function testAfandfsPhone()
  3609. {
  3610. $provider = new refill\afandfs\RefillPhone([]);
  3611. // $resp = $provider->add(15139608757, 4, 30, ['order_sn' => $this->make_sn()]);
  3612. // $resp = $provider->query(['order_sn' => '65101618975926761630']);
  3613. // $data = '{"amount":"30","charge_type":"2","code":"1","partner_id":"52","phone":"15139608757","sign":"a7f54c1ac3e1af72f9fc849086cc4bec","partner_order_no":"65101618975926761630","official_order_id":"20210421113256628350"}';
  3614. // $input = json_decode($data, true);
  3615. // refill\RefillFactory::instance()->notify('afandfs',$input);
  3616. $resp = $provider->balance();
  3617. }
  3618. public function testYunlingfsPhone()
  3619. {
  3620. $provider = $this->getProvider('yunlingfs');
  3621. $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  3622. // $resp = $provider->query(['order_sn' => '79251623739433607563']);
  3623. // $data = '{"orderid":"BGC21061514434393910","sporderid":"79251623739433607563","userid":"10002543","merchantsubmittime":"20210615144434","resultno":"1","parvalue":"50","remark1":"20210615144420321813","payno":"20210615144420321813","fundbalance":"-47.65","sign":"6B9B7C15A3F9CBC773562327B6744B1E"}';
  3624. // $input = json_decode($data, true);
  3625. // refill\RefillFactory::instance()->notify('yunlingfs',$input);
  3626. // $resp = $provider->balance();
  3627. }
  3628. public function testTianchengPhone()
  3629. {
  3630. $provider = new refill\tiancheng\RefillPhone([]);
  3631. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  3632. // $resp = $provider->query(['order_sn' => '15301619399212504464']);
  3633. // $data = ' {"result":"fail","msg":"0","order":"null","phone_no":"13699279618","amount":"10","op_no":"84801619340283980506","settle":"0","sign":"D64039ED791920B08BDA9DD95700C0E6"}';
  3634. // $input = json_decode($data, true);
  3635. // refill\RefillFactory::instance()->notify('tiancheng',$input);
  3636. $resp = $provider->balance();
  3637. }
  3638. public function testLingzhPhone()
  3639. {
  3640. $provider = new refill\lingzh\RefillPhone([]);
  3641. // $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  3642. // $resp = $provider->query(['order_sn' => '59911615124025101286']);
  3643. $resp = $provider->balance();
  3644. // $input['usr'] = 1;
  3645. // $input['ord'] = '52741615119546453690';
  3646. // $input['bz'] = '';
  3647. // $input['state'] = 2;
  3648. // $input['sgn'] = 'FFCBB75C307154DD306F4EC75BB69A6D';
  3649. // refill\RefillFactory::instance()->notify('lingzh',$input);
  3650. }
  3651. public function testAfandnewPhone()
  3652. {
  3653. $provider = new refill\afandnew\RefillPhone([]);
  3654. // $resp = $provider->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
  3655. // $resp = $provider->query(['order_sn' => '45371617101073876975', 'ch_trade_no' => '33018443659736309']);
  3656. $params = '{"amount":"100","carrierOrderNo":null,"mobile":"18500608333","orderNo":"45371617101073876975","orderStatus":3,"sign":"8DE392AD6B4730AD9EE0FC2B95BBDF17","tradeNo":"33018443659736309"}';
  3657. $input = json_decode($params, true);
  3658. refill\RefillFactory::instance()->notify('afandnew', $input);
  3659. }
  3660. public function testYifaPhone()
  3661. {
  3662. $provider = new refill\yifa\RefillPhone([]);
  3663. $resp = $provider->add(15120035568, 5, 50, ['order_sn' => $this->make_sn()]);
  3664. }
  3665. public function testTianjtOil()
  3666. {
  3667. $cardno = 1000111100021211884;
  3668. $provider = new refill\tianjt\RefillOil([]);
  3669. $resp = $provider->add($cardno, 2, 500, ['order_sn' => $this->make_sn()]);
  3670. }
  3671. public function testWeitPhone()
  3672. {
  3673. $provider = new refill\weit\RefillPhone([]);
  3674. for ($i = 0; $i <= 10; $i++) {
  3675. $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
  3676. }
  3677. }
  3678. public function testWeitCB()
  3679. {
  3680. $params['sign'] = 'af820c33472f4b571fa0c48483dfb975';
  3681. $params['status'] = 0;
  3682. $params['price'] = 30;
  3683. $params['op_order_id'] = '';
  3684. $params['mch_order_id'] = '900664281823957221';
  3685. $params['pt_order_id'] = '2021011802434412825405218901';
  3686. $params['pay_type'] = '';
  3687. $params['tel'] = 18500608333;
  3688. $params['mchid'] = 10014;
  3689. $resp = http_request($this->mReqHost . "/mobile/callback/refill_weit.php", $params, 'POST');
  3690. }
  3691. public function testYifaCB()
  3692. {
  3693. $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"}';
  3694. $input = json_decode($body, true);
  3695. refill\RefillFactory::instance()->notify('yifa', $input);
  3696. }
  3697. public function testBjbQuery()
  3698. {
  3699. $provider = new refill\bjb\RefillPhone([]);
  3700. $refill_info = ['order_sn' => 110667993758599771, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3701. $resp = $provider->query($refill_info);
  3702. }
  3703. public function testXcQuery()
  3704. {
  3705. $provider = new refill\xc\RefillPhone([]);
  3706. $refill_info = ['order_sn' => 950663423236726632, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3707. $resp = $provider->query($refill_info);
  3708. }
  3709. public function testTianjtQuery()
  3710. {
  3711. $provider = new refill\tianjt\RefillOil([]);
  3712. $refill_info = ['order_sn' => 680665862267622221, 'ch_trade_no' => 499, 'card_no' => 1000111200005252927];
  3713. $resp = $provider->query($refill_info);
  3714. }
  3715. public function testSaihuOil()
  3716. {
  3717. $provider = new refill\saihu\RefillOil([]);
  3718. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn()]);
  3719. }
  3720. public function testBdtOil()
  3721. {
  3722. $provider = new refill\bdt\RefillOil([]);
  3723. $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => '200229600556618886']);
  3724. }
  3725. public function testGFTDOil()
  3726. {
  3727. $provider = new refill\gftd\RefillOil([]);
  3728. $resp = $provider->add(1000111100020445281, mtopcard\SinopecCard, 100, ['order_sn' => $this->make_sn()]);
  3729. }
  3730. public function testYichangtOil()
  3731. {
  3732. $provider = $this->getProvider('yichangt','RefillOil');
  3733. // $resp = $provider->balance();
  3734. $resp = $provider->add(1000111100021211884, mtopcard\SinopecCard, 50, ['order_sn' => $this->make_sn()]);
  3735. // $resp = $provider->query(['order_sn' => '86471642400354465488']);
  3736. }
  3737. public function testYichangt_hf()
  3738. {
  3739. $provider = $this->getProvider('yichangt_hf');
  3740. // $resp = $provider->balance();
  3741. $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  3742. // $resp = $provider->query(['order_sn' => '33161643533975771522']);
  3743. }
  3744. public function testYichangt_doubi()
  3745. {
  3746. $provider = $this->getProvider('yichangt_doubi');
  3747. // $resp = $provider->balance();
  3748. // $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'];
  3749. $card_no = ['WK6788','575547903','1249835915','1943707492','LYYY520999','a88254587','45871584136','1877477562','1983377511','22291865790','1617206604','yy8672','1179363707','1770307081','Kurama..','Kakin0821','linxiaomi882','996407176','dyoehdm1c5sm'];
  3750. foreach ($card_no as $no)
  3751. {
  3752. $order_sn = $this->make_sn();
  3753. $resp = $provider->add($no, mtopcard\ThirdRefillCard, 100, ['order_sn' => $order_sn]);
  3754. $order_sns[] = $order_sn;
  3755. }
  3756. $order_sns = json_encode($order_sns);
  3757. Log::record("{$order_sns}");
  3758. // $resp = $provider->query(['order_sn' => '78111640843635846927']);
  3759. }
  3760. public function testGFTDCB()
  3761. {
  3762. $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","storage":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
  3763. $url = "http://192.168.1.220/mobile/callback/refill_gftd.php?" . $data;
  3764. $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
  3765. }
  3766. public function testJiecPhone()
  3767. {
  3768. $provider = new refill\jiec\RefillPhone([]);
  3769. $resp = $provider->add('18500608333', 5, 30, ['order_sn' => $this->make_sn()]);
  3770. }
  3771. public function testBxtwtCB()
  3772. {
  3773. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  3774. }
  3775. public function testTianjtJDVerify()
  3776. {
  3777. $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';
  3778. $url = "http://192.168.1.220/mobile/callback/refill_tianjt.php?" . $data;
  3779. $resp = http_request($url);
  3780. }
  3781. public function testSuhcPDD()
  3782. {
  3783. $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';
  3784. $url = "https://www.xyzshops.cn/mobile/callback/refill_suhcpdd.php?" . $data;
  3785. $resp = http_request($url);
  3786. }
  3787. public function testSuhcTMVerify()
  3788. {
  3789. $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';
  3790. $url = "https://www.xyzshops.cn/mobile/callback/refill_suhctm.php?" . $data;
  3791. $resp = http_request($url);
  3792. }
  3793. public function testBeixtVerify()
  3794. {
  3795. $data = '{"order_number":18219726,"shipping_status":4,"shipping_status_desc":"发货失败","shipping_status_message":"","sign":"863b4d972f2a4d39a9af7396879116c4","voucher":"","vouchertype":"","voucherurl":"","tradeNo":"100662475851197741"}';
  3796. $url = "https://www.xyzshops.cn/mobile/callback/refill_bxtwt.php";
  3797. $headers = ['Content-Type: application/json'];
  3798. $resp = http_post_data($url, $data, $headers);
  3799. }
  3800. public function testInput()
  3801. {
  3802. $input = fopen("php://input", "rw");
  3803. file_put_contents($input, 'xxxx');
  3804. $content = file_get_contents('php://input');
  3805. }
  3806. public function testUrl()
  3807. {
  3808. $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';
  3809. $params = preg_split('/&/', $data);
  3810. foreach ($params as $pair) {
  3811. $kv = explode('=', $pair);
  3812. $count = count($kv);
  3813. if ($count === 1) {
  3814. $key = $kv[0];
  3815. $val = "";
  3816. } elseif ($count === 2) {
  3817. $key = $kv[0];
  3818. $val = $kv[1];
  3819. } else {
  3820. continue;
  3821. }
  3822. Log::record("{$key}:{$val}", Log::DEBUG);
  3823. }
  3824. }
  3825. public function testAddoil()
  3826. {
  3827. $url = $this->mReqHost . "/mobile/index.php";
  3828. $notifyurl = 'http://121.89.196.45/mobile/callback/testcb.php';
  3829. $params = ['mchid' => $this->mMchid,
  3830. 'cardno' => '1000111100020445281',
  3831. 'amount' => "100",
  3832. "act" => "refill",
  3833. "op" => "add",
  3834. 'order_sn' => $this->make_sn(),
  3835. 'notifyurl' => $notifyurl];
  3836. $resp = $this->send_md5($url, $params);
  3837. Log::record($resp, Log::DEBUG);
  3838. }
  3839. public function testBalance()
  3840. {
  3841. $url = $this->mReqHost . "/mobile/index.php";
  3842. $params = ['mchid' => 1092,
  3843. "act" => "refill",
  3844. "op" => "balance"];
  3845. $resp = $this->send_md5($url, $params);
  3846. Log::record($resp, Log::DEBUG);
  3847. }
  3848. public function testNotify()
  3849. {
  3850. $params = [
  3851. "mchid" => 10202,
  3852. "order_sn" => '21090216132600003_11675',
  3853. "amount" => '30.00',//intval($refill_info['refill_amount'] + 0.05),
  3854. "cardno" => 18639492164,
  3855. "trade_no" => 8693160683914496896438,
  3856. "idcard" => "",
  3857. "card_name" => "",
  3858. 'official_sn' => "",
  3859. 'message' => "匹配不到合适的充值通道",
  3860. "state" => 'CANCEL'];
  3861. $sign = $this->md5_sign($params,'KxK9f3yaBDOXVwvuOKDozvQ9Mt1CoqRX');
  3862. $notify_url = 'https://openapi-gateway-test.bbinsure.cn/ants_charge/v1/charge/order/notify/yeziOrderNew/1140';
  3863. $resp = http_request($notify_url, $params, 'POST');
  3864. }
  3865. public function testAddPhoe()
  3866. {
  3867. $url = $this->mReqHost . "/mobile/index.php";
  3868. $params = ['mchid' => $this->mMchid,
  3869. 'cardno' => '',
  3870. 'amount' => 100,
  3871. "act" => "refill",
  3872. "op" => "add",
  3873. 'order_sn' => '',
  3874. 'notifyurl' => "https://www.baoyung.com/api/unionservice/yezicharge"];
  3875. Log::record(json_encode($params), Log::DEBUG);
  3876. // $resp = $this->send_md5($url, $params);
  3877. }
  3878. public function testProxyHelper()
  3879. {
  3880. $phone = '13911129867';
  3881. $amount = 100;
  3882. $url = $this->mReqHost . "/mobile/index.php";
  3883. $params = ['mchid' => $this->mMchid,
  3884. 'cardno' => $phone,
  3885. 'amount' => $amount,
  3886. "act" => "refill",
  3887. "op" => "add",
  3888. 'order_sn' => $this->make_sn(),
  3889. 'notifyurl' => "https://xxx"];
  3890. $proxy = new refill_proxy("xxx");
  3891. $resp = $proxy->send($url, $params);
  3892. }
  3893. public function testGoods()
  3894. {
  3895. $req_url = $this->mReqHost . '/mobile/index.php';
  3896. $params = ['mchid' => $this->mMchid,
  3897. "act" => "refill",
  3898. "op" => "goods"];
  3899. $resp = $this->send_md5($req_url, $params);
  3900. }
  3901. public function testQueryFactory()
  3902. {
  3903. refill\RefillFactory::instance()->query(295);
  3904. }
  3905. public function testQuery()
  3906. {
  3907. //$req_url = 'https://www.xyzshops.cn/mobile/index.php';
  3908. // $notifyurl = 'https://www.xyzshops.cn/mobile/callback/testcb.php';
  3909. $req_url = BASE_SITE_URL . '/mobile/index.php';
  3910. $notifyurl = 'https://www.xyzshops.cn/mobile/callback/testcb.php';
  3911. $params = ['mchid' => 1,
  3912. "act" => "refill",
  3913. "op" => "query",
  3914. 'order_sn' => "13281476"];
  3915. $resp = $this->send_md5($req_url, $params);
  3916. }
  3917. public function testRemoveSession()
  3918. {
  3919. $resp = http_request(BASE_SITE_URL . "/mobile/callback/testcb.php", [], 'POST');
  3920. }
  3921. public function testTianjtCB()
  3922. {
  3923. // $notifyurl = BASE_SITE_URL . "/mobile/callback/refill_tianjt.php";
  3924. $notifyurl = "https://www.xyzshops.cn/mobile/callback/refill_tianjt.php";
  3925. // $notifyurl = "https%3A%2F%2Fwww.xyzshops.cn%2Fmobile%2Frefill_tianjt.php";
  3926. $params = ['onlystr' => '690665858589475818',
  3927. 'amt' => 1000,
  3928. 'jdno' => '',
  3929. 'notifyurl' => $notifyurl,
  3930. 'cardtype' => 'Sinoepc',
  3931. 'batchid' => 30589,
  3932. 'cardno' => '1000113300007993287',
  3933. 'orgid' => '1590993600',
  3934. 'status' => 3];
  3935. $sign = $this->md5_sign($params);
  3936. $params['sign'] = $sign;
  3937. $resp = http_request($notifyurl, $params, 'POST');
  3938. Log::record($resp, Log::DEBUG);
  3939. }
  3940. public function testBJBCB()
  3941. {
  3942. $params = [
  3943. 'usr' => '13699279618',
  3944. 'ord' => '710662733975412771',
  3945. 'state' => '2',
  3946. 'bz' => '',
  3947. 'sgn' => 'AC9AFD254DE682D8440A97CA68B992DA'
  3948. ];
  3949. $resp = http_request("https://www.xyzshops.cn/mobile/callback/refill_bjb.php", $params, 'POST');
  3950. }
  3951. public function testJiecCB()
  3952. {
  3953. $params['result'] = 'fail';
  3954. $params['msg'] = '0';
  3955. $params['order'] = 'null';
  3956. $params['phone_no'] = '18500608333';
  3957. $params['amount'] = '30.00';
  3958. $params['op_no'] = '800663597981819221';
  3959. $params['sign'] = '2510046895e8e12322c8a32547905ee9';
  3960. $resp = http_request($this->mReqHost . "/mobile/callback/refill_jiec.php", $params, 'POST');
  3961. }
  3962. public function testZFKJ()
  3963. {
  3964. //带签名参数:mchid=1090&act=refill&op=add&cardno=100112121212212133
  3965. //&amount=10&order_sn=PH2012261356569433&
  3966. //notifyurl=https%3A%2F%2Fqzcz.edusahoo.com.cn%2Findex%2Findex%2Fcallback
  3967. //&sign=4a3ac5f9706e64aa70c6cab0fc5839d3
  3968. $params = ['mchid' => 1090,
  3969. 'cardno' => '100112121212212133',
  3970. 'amount' => '10',
  3971. "act" => "refill",
  3972. "op" => "add",
  3973. 'order_sn' => 'PH2012261356569433',
  3974. 'notifyurl' => 'https://qzcz.edusahoo.com.cn/index/index/callback'];
  3975. $resp = $this->send_md5(BASE_SITE_URL . '/mobile/index.php', $params);
  3976. }
  3977. protected function check_empty($value)
  3978. {
  3979. if (!isset($value))
  3980. return true;
  3981. if ($value === null)
  3982. return true;
  3983. if (trim($value) === "")
  3984. return true;
  3985. return false;
  3986. }
  3987. public function testcreateSign()
  3988. {
  3989. $params['act'] = 'refill';
  3990. $params['amount'] = '30';
  3991. $params['cardno'] = '18111516552';
  3992. $params['mchid'] = '10179';
  3993. $params['notifyurl'] = 'http://czapi2.1jinb.net/YeZiHCCallBackOrderServlet';
  3994. $params['op'] = 'add';
  3995. $params['order_sn'] = 'JFNOR10835056877';
  3996. $sign = $this->md5_sign($params);
  3997. }
  3998. public function testCheckphone()
  3999. {
  4000. $check = function ($phone) {
  4001. $url = 'https://mobileempty.shumaidata.com/mobileempty';
  4002. $params['mobile'] = $phone;
  4003. $headers = array();
  4004. array_push($headers, "Authorization:APPCODE " . '8f92d951293f4d2ea48ff86d5a70c537');
  4005. $resp = http_request($url, $params, 'GET', false, $headers);
  4006. $resp = json_decode($resp, true);
  4007. if ($resp['success'] == true && $resp['code'] == 200) {
  4008. Log::record("data phone:{$phone} , status : {$resp['data']['status']}", Log::DEBUG);
  4009. if (in_array($resp['data']['status'], [0, 3, 4, 5])) {
  4010. return false;
  4011. }
  4012. } else {
  4013. Log::record("data phone:{$phone} , 不支持的号段", Log::DEBUG);
  4014. }
  4015. };
  4016. $check(17801048874);
  4017. }
  4018. public function testCtSign()
  4019. {
  4020. $params['act'] = 'refill';
  4021. $params['op'] = 'add';
  4022. $params['mchid'] = '10198';
  4023. $params['cardno'] = '18696902060';
  4024. $params['amount'] = '30';
  4025. $params['order_sn'] = '163782007236900000878';
  4026. $params['notifyurl'] = 'http://open.apiwater.xyz:20801/';
  4027. $sign = $this->md5_sign($params,'b9b30f57eac34a398a7534021fa23a16');
  4028. }
  4029. private function md5_sign($params,$key = '')
  4030. {
  4031. ksort($params);
  4032. $body = "";
  4033. $i = 0;
  4034. foreach ($params as $k => $v) {
  4035. if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
  4036. if ($i == 0) {
  4037. $body .= "{$k}" . "=" . urlencode($v);
  4038. } else {
  4039. $body .= "&" . "{$k}" . "=" . urlencode($v);
  4040. }
  4041. $i++;
  4042. }
  4043. }
  4044. $body .= "&key={$key}";
  4045. return md5($body);
  4046. }
  4047. public function testCallMech()
  4048. {
  4049. $logic = Logic('queue');
  4050. $logic->NotifyMerchantComplete(['order_id' => 18171, 'manual' => true]);
  4051. }
  4052. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCallMech)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  4053. private function send($url, $params)
  4054. {
  4055. $mchid = $params['mchid'];
  4056. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  4057. $key = file_get_contents($pri_key);
  4058. $pri = openssl_get_privatekey($key);
  4059. $body = $this->body($params);
  4060. openssl_sign($body, $signed, $pri);
  4061. $sign = base64_encode($signed);
  4062. $params['sign'] = $sign;
  4063. $resp = http_request($url, $params, 'POST');
  4064. Log::record("resp:{$resp}", Log::DEBUG);
  4065. }
  4066. private function send_md5($url, $params)
  4067. {
  4068. $body = $this->body($params);
  4069. $body .= "&key={$this->mKey}";
  4070. $params['sign'] = md5($body);
  4071. $resp = http_request($url, $params, 'POST');
  4072. Log::record("resp:{$resp}", Log::DEBUG);
  4073. return $resp;
  4074. }
  4075. public function testCardType()
  4076. {
  4077. $cardno = '1000111100021211884';
  4078. $ret = preg_match('/^1[0-9]{18}$/', $cardno, $matches);
  4079. }
  4080. public function testMtrand()
  4081. {
  4082. }
  4083. public function testHttpRefill()
  4084. {
  4085. $mchid = '000001';
  4086. $pri_key = BASE_DATA_PATH . "/api/merchant/key/{$mchid}_pri.pem";
  4087. $key = file_get_contents($pri_key);
  4088. $pri = openssl_get_privatekey($key);
  4089. $params = ['MCHID' => $mchid, 'cardno' => '1000111100021211884', 'amt' => "100", "act" => "refill", "op" => "addoil"];
  4090. $body = $this->body($params);
  4091. openssl_sign($body, $signed, $pri);
  4092. $sign = base64_encode($signed);
  4093. $params['sign'] = $sign;
  4094. $resp = http_request(BASE_SITE_URL . "/mobile/index.php", $params, 'POST');
  4095. }
  4096. private function body($params)
  4097. {
  4098. ksort($params);
  4099. $body = "";
  4100. $i = 0;
  4101. foreach ($params as $k => $v) {
  4102. if (false === $this->checkEmpty($v) && "@" != substr($v, 0, 1)) {
  4103. if ($i == 0) {
  4104. $body .= "{$k}" . "=" . urlencode($v);
  4105. } else {
  4106. $body .= "&" . "{$k}" . "=" . urlencode($v);
  4107. }
  4108. $i++;
  4109. }
  4110. }
  4111. return $body;
  4112. }
  4113. private function checkEmpty($value)
  4114. {
  4115. if (!isset($value))
  4116. return true;
  4117. if ($value === null)
  4118. return true;
  4119. if (trim($value) === "")
  4120. return true;
  4121. return false;
  4122. }
  4123. public function testKsort()
  4124. {
  4125. $age = ["Peter" => "35", "Ben" => "37", "Joe" => "43"];
  4126. ksort($age);
  4127. foreach ($age as $x => $x_value) {
  4128. echo "Key=" . $x . ", Value=" . $x_value;
  4129. echo "<br>";
  4130. }
  4131. }
  4132. public function testip()
  4133. {
  4134. $model_merchant = Model('merchant');
  4135. $merchant_info = $model_merchant->getMerchantInfo(['mchid' => 1]);
  4136. $ipwhitelist = unserialize($merchant_info['ip_white_list']);
  4137. $res = json_encode($ipwhitelist);
  4138. }
  4139. //测试向内部店提交订单,可先屏蔽其它充值通道
  4140. public function testAddoilToInnerStore()
  4141. {
  4142. $url = $this->mReqHost . "/mobile/index.php";
  4143. $notifyurl = BASE_SITE_URL . '/mobile/callback/testcb.php';
  4144. $params = ['mchid' => 1,
  4145. 'cardno' => '1000111100020445281',
  4146. 'amount' => "1000",
  4147. "act" => "refill",
  4148. "op" => "add",
  4149. 'order_sn' => $this->make_sn(),
  4150. 'notifyurl' => $notifyurl];
  4151. $resp = $this->send_md5($url, $params);
  4152. Log::record($resp, Log::DEBUG);
  4153. }
  4154. public function testRefillInnerCB()
  4155. {
  4156. $params = ['state_type' => 'order_cancel', 'order_id' => 311, 'channel_name' => 'lx'];
  4157. $resp = http_request(BASE_SITE_URL . '/mobile/callback/refill_inner.php', $params, 'POST');
  4158. }
  4159. public function testArgs()
  4160. {
  4161. Log::record($_SERVER['argv'], Log::DEBUG);
  4162. }
  4163. public function testCall()
  4164. {
  4165. $order_id = 14974;
  4166. QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true], 10);
  4167. }
  4168. public function testSyncconfig()
  4169. {
  4170. $name_val_cfg = function ($items) {
  4171. $result = [];
  4172. foreach ($items as $item) {
  4173. $name = $item->name();
  4174. $result[$name] = $item;
  4175. }
  4176. return $result;
  4177. };
  4178. $name_val_row = function ($items) {
  4179. $result = [];
  4180. foreach ($items as $item) {
  4181. $name = $item['name'];
  4182. $result[$name] = $item;
  4183. }
  4184. return $result;
  4185. };
  4186. $match = function ($all, $cur) {
  4187. $insert = [];
  4188. foreach ($all as $key => $value) {
  4189. if (!array_key_exists($key, $cur)) {
  4190. $insert[] = $key;
  4191. }
  4192. }
  4193. return $insert;
  4194. };
  4195. $inserter = function ($mod, $type, $names) {
  4196. foreach ($names as $name) {
  4197. $data = ['name' => $name, 'type' => $type];
  4198. $mod->insert($data);
  4199. }
  4200. };
  4201. $provider = refill\RefillFactory::instance()->providers();
  4202. $oils = $name_val_cfg($provider['oil']);
  4203. $phones = $name_val_cfg($provider['phone']);
  4204. $mod_prov = Model('refill_provider');
  4205. $oil_items = $mod_prov->getProviderList(['type' => 1]);
  4206. $oil_items = $name_val_row($oil_items);
  4207. $oil_inserts = $match($oils, $oil_items);
  4208. $phone_items = $mod_prov->getProviderList(['type' => 2]);
  4209. $phone_items = $name_val_row($phone_items);
  4210. $phone_inserts = $match($phones, $phone_items);
  4211. $inserter($mod_prov, 1, $oil_inserts);
  4212. $inserter($mod_prov, 2, $phone_inserts);
  4213. }
  4214. public function testStat()
  4215. {
  4216. $model_refill_order = Model('refill_order');
  4217. $stat = Model('')->table('refill_order,vr_order')->join('inner')
  4218. ->on('refill_order.order_id=vr_order.order_id')
  4219. ->field('sum(refill_amount) as refill_amounts , sum(channel_amount) as channel_amounts , sum(mch_amount) as mch_amounts')
  4220. ->where([])->select();
  4221. }
  4222. public function testRefillGoods()
  4223. {
  4224. $goods = refill\RefillFactory::instance()->goods();
  4225. }
  4226. private function make_mobile()
  4227. {
  4228. $no = "1" . mt_rand(3000000000, 3999999999);
  4229. return $no;
  4230. }
  4231. private function refill_info($card_no, $card_type)
  4232. {
  4233. $data = rcache($card_no, 'cardrefill-');
  4234. if (empty($data)) {
  4235. $mod_topcard = Model('topcard');
  4236. $ret = $mod_topcard->get_card($card_no);
  4237. if (empty($ret)) {
  4238. $bind_phone = $this->make_mobile();
  4239. $mod_topcard->add($card_no, $card_type, time(), $bind_phone);
  4240. $data['bind_phone'] = $bind_phone;
  4241. $data['refill_time'] = time();
  4242. $data['times'] = 0;
  4243. wcache($card_no, $data, 'cardrefill-');
  4244. } else {
  4245. $val = $ret[0];
  4246. $data['bind_phone'] = $val['bind_phone'];
  4247. $data['refill_time'] = time();
  4248. $data['times'] = 0;
  4249. }
  4250. }
  4251. return $data;
  4252. }
  4253. public function testGetMobile()
  4254. {
  4255. $card_no = '1000119000001679247';
  4256. $card_type = 1;
  4257. $info = $this->refill_info($card_no, $card_type);
  4258. }
  4259. private function check_mchorder($mchid, $mch_order)
  4260. {
  4261. if (empty($mch_order)) {
  4262. return true;
  4263. } else {
  4264. $refill_order = Model('refill_order');
  4265. $ret = $refill_order->getOrderInfo(['mchid' => $mchid, 'mch_order' => $mch_order]);
  4266. return empty($ret);
  4267. }
  4268. }
  4269. public function testCheckMchorder()
  4270. {
  4271. $ret = $this->check_mchorder(1, '13281475');
  4272. }
  4273. public function testMakemobile()
  4274. {
  4275. $mobile = refill\util::make_mobile();
  4276. $ret = refill\util::set_black('1000111100020445281');
  4277. }
  4278. public function testLoadBlack()
  4279. {
  4280. $path = BASE_DATA_PATH . "/log";
  4281. $names = ['20210119-mobile.log',
  4282. '20210120-mobile.log', '20210121-mobile.log', '20210122-mobile.log', '20210123-mobile.log',
  4283. '20210124-mobile.log', '20210125-mobile.log'];
  4284. foreach ($names as $name) {
  4285. $file_name = $path . "/" . $name;
  4286. refill\util::black_from_log($file_name);
  4287. }
  4288. }
  4289. public function testStats()
  4290. {
  4291. $date = date('Y-m-d', time());
  4292. $today = strtotime("{$date}");
  4293. $times_begin = function ($start) {
  4294. $times = [];
  4295. $begin = $start;
  4296. for ($i = 0; $i < 7; $i++) {
  4297. $times[] = $begin;
  4298. $begin -= 86400;
  4299. }
  4300. return $times;
  4301. };
  4302. $reader = function ($mchid, $time) {
  4303. $cond['mchid'] = $mchid;
  4304. $cond['inner_status'] = 0;
  4305. $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 - 1]];
  4306. $items = Model('')->table('refill_order,vr_order')->join('inner')
  4307. ->on('refill_order.order_id=vr_order.order_id')
  4308. ->field('count(*) as order_count, vr_order.order_state, sum(mch_amount) as mch_amounts')
  4309. ->group('vr_order.order_state')
  4310. ->where($cond)->select();
  4311. return $items;
  4312. };
  4313. $begins = $times_begin($today);
  4314. $mchid = 10096;
  4315. // $states = rcache($this->mchid() , 'refillstat-');
  4316. $states = unserialize($states ?? "");
  4317. if (empty($states)) $states = [];
  4318. $result = [];
  4319. $cache = [];
  4320. foreach ($begins as $begin) {
  4321. if (array_key_exists($begin, $states)) {
  4322. $item = $states[$begin];
  4323. } else {
  4324. $item = $reader($mchid, $begin);
  4325. }
  4326. $result[$begin] = $item;
  4327. //判断item 中充值中的状态是否为0,为0的情况下放进cache
  4328. $cache = $item;
  4329. }
  4330. wcache($this->mchid(), $cache, 'refillstat-');
  4331. return $result;
  4332. }
  4333. public function testNotifyx()
  4334. {
  4335. $mch_cache = rcache("merchant-notify", 'refill-');
  4336. $caches = empty($mch_cache['data']) ? [] : unserialize($mch_cache['data']);
  4337. $new_caches = [];
  4338. $merchants = Model('merchant')->getMerchantList([], '', '', 'merchant.*,member.available_predeposit', "0,1000");
  4339. foreach ($merchants as $merchant) {
  4340. $mchid = $merchant['mchid'];
  4341. $phone = $merchant['contact_phone'] ?? "";
  4342. $available_pd = intval($merchant['available_predeposit']);
  4343. $alarm_pd = intval($merchant['alarm_amount']) < 10000 ? 10000 : intval($merchant['alarm_amount']);
  4344. if (array_key_exists($mchid, $caches)) {
  4345. $mch_cache = $caches[$mchid];
  4346. } else {
  4347. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  4348. }
  4349. if (!empty($phone) && ($available_pd < $alarm_pd)) {
  4350. $counts = $mch_cache['send_count'];
  4351. if (($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
  4352. $mch_cache = ['last_time' => time(), 'send_count' => $counts + 1];
  4353. QueueClient::push('sendSMS', ['mobile' => $merchant['contact_phone'],
  4354. 'type' => 'balance_warning', 'datas' => [date("m月d日H时"), $merchant['available_predeposit']]]);
  4355. }
  4356. } else {
  4357. $mch_cache = ['last_time' => 0, 'send_count' => 0];
  4358. }
  4359. $new_caches[$mchid] = $mch_cache;
  4360. }
  4361. wcache("merchant-notify", ['data' => serialize($new_caches)], 'refill-');
  4362. }
  4363. public function testReadChannel()
  4364. {
  4365. refill\RefillFactory::instance()->read_channel();
  4366. }
  4367. public function testAllow()
  4368. {
  4369. $allow = refill\RefillFactory::instance()->allow(10096, 1, 100);
  4370. }
  4371. public function testCheckData()
  4372. {
  4373. $str = '|2|110667993758599771-充值失败|';
  4374. // $str = '0|提交成功|-36557.7400';
  4375. // if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
  4376. // return true;
  4377. // }
  4378. // if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
  4379. // return true;
  4380. // }
  4381. // return false;
  4382. $resp = ltrim($str, '|');
  4383. $resp = explode('|', $resp);
  4384. if (count($resp) != 3) {
  4385. return [false, '返回值错误'];
  4386. }
  4387. }
  4388. public function testErrre()
  4389. {
  4390. $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}';
  4391. $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);
  4392. }
  4393. public function testExpolode()
  4394. {
  4395. $x = "HTTP-504";
  4396. [$type,$code] = explode('-',$x);
  4397. }
  4398. public function testMchctl()
  4399. {
  4400. $ctl = new refill\mchctl();
  4401. }
  4402. public function testAsyncadd()
  4403. {
  4404. $x = \refill\util::async_add(['xxxx' => 1],4);
  4405. }
  4406. private function getProvider($name,$type = 'RefillPhone')
  4407. {
  4408. $file = BASE_HELPER_RAPI_PATH . "/$name/{$type}.php";
  4409. if(!file_exists($file)){
  4410. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  4411. return false;
  4412. } else {
  4413. require_once($file);
  4414. Log::record("file={$file} load success.",Log::DEBUG);
  4415. }
  4416. $class_name = "refill\\{$name}\\{$type}";
  4417. if (class_exists($class_name, false)) {
  4418. $caller = new $class_name([]);
  4419. return $caller;
  4420. } else {
  4421. $error = "Base Error: class {$class_name} isn't exists!";
  4422. Log::record($error, Log::ERR);
  4423. return false;
  4424. }
  4425. }
  4426. public function testOrderExist()
  4427. {
  4428. $refill_order = Model('refill_order');
  4429. $ret = $refill_order->exist(10116,'Yzb20210825111251415');
  4430. }
  4431. public function testRGoods()
  4432. {
  4433. $goods_list = refill\RefillFactory::instance()->goods();
  4434. }
  4435. public function testCanbu()
  4436. {
  4437. $notify = function ($resp)
  4438. {
  4439. if (empty($resp)) {
  4440. return [false, '网络错误'];
  4441. }
  4442. else
  4443. {
  4444. Log::record($resp, Log::DEBUG);
  4445. $resp = json_decode($resp, true);
  4446. if (empty($resp)) {
  4447. return [false, '网络错误'];
  4448. }
  4449. if($resp['code'] == 1)
  4450. {
  4451. $status = $resp['data']['status'];
  4452. if ($status == 'success') {
  4453. $order_state = ORDER_STATE_SUCCESS;
  4454. } elseif ($status == 'failed') {
  4455. $order_state = ORDER_STATE_CANCEL;
  4456. } elseif ($status == 'wait') {
  4457. $order_state = ORDER_STATE_SEND;
  4458. } else {
  4459. return [false, $status];
  4460. }
  4461. return [true, $order_state];
  4462. }
  4463. elseif($resp['code'] == -1 && $resp['msg'] == '订单不存在')
  4464. {
  4465. return [true, ORDER_STATE_NOEXIST];
  4466. }
  4467. else
  4468. {
  4469. return [false, $resp['msg']];
  4470. }
  4471. }
  4472. };
  4473. $resp = '{"code":1,"msg":"查询成功","data":{"systemOrderNo":"2049420687473912283808","agentOrderNo":"s16341299122819479569112","phone":"18571522718","itemName":"UNICOM","itemFacePrice":"50","status":0,"description":"待处理","amount":"47.2500","officialOrderNo":""}}';
  4474. $ret = $notify($resp);
  4475. }
  4476. public function testShenzhoudzfy_Balance()
  4477. {
  4478. $provider = $this->getProvider('shenzhoudzfy');
  4479. [$succ, $val] = $provider->balance();
  4480. }
  4481. public function testShenzhouzfy_Add()
  4482. {
  4483. $provider = $this->getProvider('shenzhoudzfy');
  4484. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4485. }
  4486. public function testGuitongdianz_Balance()
  4487. {
  4488. $provider = $this->getProvider('guitongdianz');
  4489. [$succ, $val] = $provider->balance();
  4490. }
  4491. public function testGuitongdianz_Add()
  4492. {
  4493. $provider = $this->getProvider('guitongdianz');
  4494. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4495. }
  4496. public function testWogoudianzijuanFy_Balance()
  4497. {
  4498. $provider = $this->getProvider('wogoudianzijuan_fy');
  4499. [$succ, $val] = $provider->balance();
  4500. }
  4501. public function testWogoudianzijuanFy_Add()
  4502. {
  4503. $provider = $this->getProvider('wogoudianzijuan_fy');
  4504. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4505. }
  4506. public function testWogoukongcfeiy_Balance()
  4507. {
  4508. $provider = $this->getProvider('wogoukongcfeiy');
  4509. [$succ, $val] = $provider->balance();
  4510. }
  4511. public function testWogoukongcfeiy_Add()
  4512. {
  4513. $provider = $this->getProvider("wogoukongcfeiy");
  4514. $resp = $provider->add(13581540213, 4, 10, ['order_sn' => $this->make_sn()]);
  4515. }
  4516. public function testWangcxdzjfeiy_Balance()
  4517. {
  4518. $provider = $this->getProvider('wangcxdzjfeiy');
  4519. [$succ, $val] = $provider->balance();
  4520. }
  4521. public function testWangcxdzjfeiy_Add()
  4522. {
  4523. $provider = $this->getProvider("wangcxdzjfeiy");
  4524. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4525. }
  4526. public function testXunyuan_Balance()
  4527. {
  4528. $provider = $this->getProvider('xunyuan');
  4529. [$succ, $val] = $provider->balance();
  4530. }
  4531. public function testFulunoy_Balance()
  4532. {
  4533. $provider = $this->getProvider('fulunoy');
  4534. [$succ, $val] = $provider->balance();
  4535. }
  4536. public function testFulunoy_Add()
  4537. {
  4538. $provider = $this->getProvider("fulunoy");
  4539. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4540. }
  4541. public function testXuyoufs_Add()
  4542. {
  4543. $provider = $this->getProvider("xuyou_sdm");
  4544. $resp = $provider->add(18074608795, 6, 100, ['order_sn' => $this->make_sn(), 'province' => "肥西供电公司", 'product_code' => 9990001]);
  4545. }
  4546. public function testXuyoufs_Balance()
  4547. {
  4548. $provider = $this->getProvider('xuyou_sdm');
  4549. [$succ, $val] = $provider->balance();
  4550. }
  4551. public function testYoulaithreefy_Balance()
  4552. {
  4553. $provider = $this->getProvider('youlaifeiythree');
  4554. [$succ, $val] = $provider->balance();
  4555. }
  4556. public function testYoulaithreefy_Add()
  4557. {
  4558. $provider = $this->getProvider('youlaifeiythree');
  4559. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4560. }
  4561. public function testBaibaoquanyi_Balance()
  4562. {
  4563. $provider = $this->getProvider('baibaoquanyi');
  4564. [$succ, $val] = $provider->balance();
  4565. }
  4566. public function testYoulaicomet_Balance()
  4567. {
  4568. $provider = $this->getProvider('youlaicomet');
  4569. [$succ, $val] = $provider->balance();
  4570. }
  4571. public function testRenyueoil_Balance()
  4572. {
  4573. $provider = $this->getProvider('renyueoil', 'RefillOil');
  4574. [$succ, $val] = $provider->balance();
  4575. }
  4576. public function testRenyueoil_Add()
  4577. {
  4578. $provider = $this->getProvider('renyueoil', 'RefillOil');
  4579. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4580. }
  4581. public function testRyuequanyi_Balance()
  4582. {
  4583. $provider = $this->getProvider('ryuequanyi');
  4584. [$succ, $val] = $provider->balance();
  4585. }
  4586. public function testShengtonghfy_Balance()
  4587. {
  4588. $provider = $this->getProvider('shengtonghfy');
  4589. [$succ, $val] = $provider->balance();
  4590. }
  4591. public function testLeyou_Balance()
  4592. {
  4593. $provider = $this->getProvider('leyou','RefillOil');
  4594. [$succ, $val] = $provider->balance();
  4595. }
  4596. public function testLeyou_Add()
  4597. {
  4598. $provider = $this->getProvider('leyou','RefillOil');
  4599. $net_errno = '';
  4600. [$succ, $val, $neterr] = $provider->add('1000111100021211884', 2, 50, ['order_sn'=>'Test-Leyou-Oil'.time()], $net_errno);
  4601. }
  4602. public function testLeyou_Query()
  4603. {
  4604. $provider = $this->getProvider('leyou','RefillOil');
  4605. [$succ, $val] = $provider->query(['order_sn'=>'Test-Leyou-Oil1693375143']);
  4606. }
  4607. public function testLeyou_Waterno_By_Voucher()
  4608. {
  4609. $watorno1 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号:1623083013592106');
  4610. $watorno2 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号1623083013592106');
  4611. $watorno3 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号');
  4612. $watorno4 = $this->Leyou_Waterno_By_Voucher('');
  4613. $watorno5 = $this->Leyou_Waterno_By_Voucher(null);
  4614. }
  4615. private function Leyou_Waterno_By_Voucher($voucher):string
  4616. {
  4617. $matches = [];
  4618. $ret = preg_match("/\:(\d+)/",$voucher,$matches);
  4619. if ($ret === 1 && !empty($matches)){
  4620. return $matches[1];
  4621. }
  4622. return '';
  4623. }
  4624. public function testLeyou_CallBack()
  4625. {
  4626. $body = '{"username":"guoyan","orderNumber":"Test-Leyou-Oil1693375143","number":"1000111100021211884","money":50,"pay":50.6,"recharge":50,"status":5,"desc":"充值成功","voucher":"voucher","endTime":"2023-08-30 13:59:25","sign":"79fc766ae0eaf6539aef9f7ee3ee1f0f"}';
  4627. $params = json_decode($body, true);
  4628. $provider = $this->getProvider('leyou', 'RefillCallBack');
  4629. $ret = $provider->verify($params);
  4630. $resp = $provider->notify($params);
  4631. }
  4632. public function testMingjiangnoy_Sign()
  4633. {
  4634. $sign = $this->Mingjiangnoy_Sign([
  4635. 'merchantId' => 'MQS00342',
  4636. 'amt' => 50,
  4637. 'phone' => '13911129867',
  4638. 'extOrderId' => 'order-number-1234567890',
  4639. 'notifyUrl' => 'http://a.b.com/index.php',
  4640. 'operator' => '移动'
  4641. ],['operator']);
  4642. }
  4643. private function Mingjiangnoy_Sign($params,$ignore_fields = [])
  4644. {
  4645. $key = 'PQeC3T3qZSz5CGhbeTVfKuYJfcJzCtnD';
  4646. $originalStr = '';
  4647. ksort($params);
  4648. foreach ($params as $field => $val)
  4649. {
  4650. if (!empty($val) && !in_array($field, $ignore_fields))
  4651. {
  4652. $originalStr .= $val;
  4653. }
  4654. }
  4655. $originalStr .= $key;
  4656. return md5($originalStr);
  4657. }
  4658. public function testNanjingpushanghf_Balance()
  4659. {
  4660. $provider = $this->getProvider('nanjingpushang_hf');
  4661. [$succ, $val] = $provider->balance();
  4662. }
  4663. public function testNanjingpushanghf_Add()
  4664. {
  4665. $provider = $this->getProvider('nanjingpushang_hf');
  4666. $net_errno = '';
  4667. [$succ, $val] = $provider->add(13911129867, 4, 1, ['order_sn' => 'TestNanjingpushangfy'.time()], $net_errno);
  4668. }
  4669. public function testNanjingpushanghf_Query()
  4670. {
  4671. $provider = $this->getProvider('nanjingpushang_hf');
  4672. [$succ, $val] = $provider->query(['order_sn' => 'TestNanjingpushangfy1693811532','commit_time'=>time()-300]);
  4673. }
  4674. public function testNanjingpushanghf_CallBack()
  4675. {
  4676. $body = '{"extOrderId":"TestNanjingpushangfy1693879576","orderId":"R2023090510240000002552","salePrice":"1","sign":"2cbae86e3ea0cca01b15d47c5abba92c","state":"5","exchangeTraded":""}';
  4677. $params = json_decode($body, true);
  4678. $provider = $this->getProvider('nanjingpushang_hf', 'RefillCallBack');
  4679. $ret = $provider->verify($params);
  4680. $resp = $provider->notify($params);
  4681. }
  4682. public function testNanjingpushangoil_Balance()
  4683. {
  4684. $provider = $this->getProvider('nanjingpushang_oil','RefillOil');
  4685. [$succ, $val] = $provider->balance();
  4686. }
  4687. public function testNanjingpushangoil_Add()
  4688. {
  4689. $provider = $this->getProvider('nanjingpushang_oil','RefillOil');
  4690. $net_errno = '';
  4691. [$succ, $val] = $provider->add(1000111100021211884,2, 100, ['order_sn' => 'Testnanjingpushangoil'.time()], $net_errno);
  4692. }
  4693. public function testNanjingpushangoil_Query()
  4694. {
  4695. $provider = $this->getProvider('nanjingpushang_oil','RefillOil');
  4696. [$succ, $val] = $provider->query(['order_sn' => 'Testnanjingpushangoil1693902368','commit_time'=>time()-300]);
  4697. }
  4698. public function testNanjingpushangoil_CallBack()
  4699. {
  4700. $body = '{"extOrderId":"Testnanjingpushangoil1693903181","orderId":"R2023090516240000008000","salePrice":"","sign":"b157844dcd7ea374c47f0f8fa38417b2","state":"5","exchangeTraded":""}';
  4701. $params = json_decode($body, true);
  4702. $provider = $this->getProvider('nanjingpushang_oil', 'RefillCallBack');
  4703. $ret = $provider->verify($params);
  4704. $resp = $provider->notify($params);
  4705. }
  4706. public function testTianxinxqjiay_Balance()
  4707. {
  4708. $provider = $this->getProvider('tianxinxqjiay','RefillOil');
  4709. [$succ, $val] = $provider->balance();
  4710. }
  4711. public function testLansequany_Balance()
  4712. {
  4713. $provider = $this->getProvider('lansequany');
  4714. [$succ, $val] = $provider->balance();
  4715. }
  4716. public function testLansequany_Add()
  4717. {
  4718. $provider = $this->getProvider('lansequany');
  4719. $resp = $provider->add(588073521, 7, 100, [
  4720. 'order_sn' => $this->make_sn(),
  4721. 'goods_id' => 8377,
  4722. 'product_code' => 'XYZ100747'
  4723. ]);
  4724. }
  4725. public function testKaisinuojy_Balance()
  4726. {
  4727. $provider = $this->getProvider('kaisinuojy', 'RefillOil');
  4728. [$succ, $val] = $provider->balance();
  4729. }
  4730. public function testKaisinuojy_Add()
  4731. {
  4732. $provider = $this->getProvider('kaisinuojy', 'RefillOil');
  4733. $resp = $provider->add(13911129867, 4, 10, ['order_sn' => $this->make_sn()]);
  4734. }
  4735. public function testxuyouoil_Balance()
  4736. {
  4737. $provider = $this->getProvider('xuyou_oil', 'RefillOil');
  4738. [$succ, $val] = $provider->balance();
  4739. }
  4740. public function testxuyouoil_Query()
  4741. {
  4742. $provider = $this->getProvider("xuyou_oil", 'RefillOil');
  4743. [$succ, $state] = $provider->query([
  4744. 'order_sn' => '18041694746710140007',
  4745. 'commit_time'=>time()-180
  4746. ]);
  4747. }
  4748. public function testxuyouoil_Add()
  4749. {
  4750. $provider = $this->getProvider("xuyou_oil", "RefillOil");
  4751. $resp = $provider->add(18074608795,2, 100, ['order_sn' => $this->make_sn(), 'province'=>12]);
  4752. }
  4753. public function testxuyouHf_Balance()
  4754. {
  4755. $provider = $this->getProvider('xuyou_hf');
  4756. [$succ, $val] = $provider->balance();
  4757. }
  4758. public function testxuyouHf_Add()
  4759. {
  4760. $provider = $this->getProvider("xuyou_hf");
  4761. $resp = $provider->add(18074608795,6, 100, ['orderid' => $this->make_sn(), 'productid' => 2000001]);
  4762. }
  4763. public function testxuyouHf_Query()
  4764. {
  4765. $provider = $this->getProvider("xuyou_hf");
  4766. [$succ, $state] = $provider->query([
  4767. 'mchid' => 1,
  4768. 'orderid' => '57041693891791297861',
  4769. 'commit_time'=>time()-180
  4770. ]);
  4771. }
  4772. public function testxuyouoil_Notify()
  4773. {
  4774. $body = '{"number":"18074608795","mchid":"1","orderid":"45081694761170468835","price":"1.0","voucher":"","sign":"d91cf119c068042e0f1624e2295f40c1","oid":470,"status":"3"}';
  4775. $params = json_decode($body, true);
  4776. $provider = $this->getProvider('xuyou_oil', 'RefillCallBack');
  4777. $ret = $provider->verify($params);
  4778. }
  4779. public function testxuyouHf_Notify()
  4780. {
  4781. $body = '{"number":"18074608795","mchid":"1","orderid":"12131693903272787845","price":"1.0","voucher":"","sign":"65609fff20bdc64cd57b0e5fe6dcba39","oid":449,"status":"3"}';
  4782. $params = json_decode($body, true);
  4783. $provider = $this->getProvider('xuyou_hf', 'RefillCallBack');
  4784. $ret = $provider->verify($params);
  4785. }
  4786. public function testguoruiHf_add()
  4787. {
  4788. $provider = $this->getProvider("guorui_hf");
  4789. $resp = $provider->add(18074608795,6, 100, ['requestId' => $this->make_sn(), 'productId' => 10015, 'checkPrice'=>"10.0900"]);
  4790. }
  4791. public function testguitongxinxnoy_Balance()
  4792. {
  4793. $provider = $this->getProvider('guitongxinxnoy');
  4794. [$succ, $val] = $provider->balance();
  4795. }
  4796. public function testguitongxinxnoy_Add()
  4797. {
  4798. $provider = $this->getProvider("guitongxinxnoy");
  4799. $resp = $provider->add(18074608795,6, 100, ['order_sn' => $this->make_sn()]);
  4800. }
  4801. public function testcitydiff()
  4802. {
  4803. // $newCity = ['甘肃','新疆','江苏','贵州','黑龙江','福建','四川','湖南','广东','浙江','北京','江西','云南','湖北','山东','青海','广西','安徽','宁夏','辽宁','河南','陕西','河北','上海','重庆'];
  4804. // $oldCity = ['广西','福建','江西','四川','贵州','云南','黑龙江','甘肃','河南','江苏','湖北','浙江'];
  4805. $newCity = ['湖北','北京','上海','四川','安徽','新疆','广东','江苏','山东','青海','湖南','天津','浙江'];
  4806. $oldCity = ['天津','湖北','湖南','四川','江苏','新疆','广东'];
  4807. $diff = array_diff($newCity,$oldCity);
  4808. $s = implode(',',$diff);
  4809. }
  4810. public function testXinmaOfficialSn()
  4811. {
  4812. $extractOfficialSn = function ($officialSnStr)
  4813. {
  4814. $officialSn = '';
  4815. if (preg_match_all("/(\d+)/", $officialSnStr, $matches))
  4816. {
  4817. foreach ($matches[1] as $item)
  4818. {
  4819. if (strlen($officialSn) < strlen($item)) {
  4820. $officialSn = $item;
  4821. }
  4822. }
  4823. }
  4824. return $officialSn;
  4825. };
  4826. //
  4827. // $s0 = $extractOfficialSn('');
  4828. // $s1 = $extractOfficialSn('1623091817214688');
  4829. // $s3 = $extractOfficialSn('【中国石化】您尾号为869682的加油卡于09月18日 17时21分充值成功,金额200元,订单号:1623091817214688');
  4830. $s4 = $extractOfficialSn('充值成功:982400036401654');
  4831. }
  4832. public function testYezifensheng_Balance()
  4833. {
  4834. $provider = $this->getProvider('yezifensheng');
  4835. [$succ, $val] = $provider->balance();
  4836. }
  4837. public function testyixun_hf_Balance()
  4838. {
  4839. $provider = $this->getProvider('yixun_hf');
  4840. [$succ, $val] = $provider->balance();
  4841. }
  4842. public function testyixun_hf_Add()
  4843. {
  4844. $provider = $this->getProvider('yixun_hf');
  4845. $net_errno = '';
  4846. $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()], $net_errno);
  4847. }
  4848. public function testyixun_hf_Query()
  4849. {
  4850. $provider = $this->getProvider('yixun_hf');
  4851. [$succ, $val] = $provider->query(['order_sn'=>'53971695273960799345']);
  4852. }
  4853. public function testKainuo15()
  4854. {
  4855. $provider = $this->getProvider('kainuo_15m');
  4856. $resp = $provider->balance();
  4857. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  4858. // $resp = $provider->query(['order_sn' => '65391689824562951763']);
  4859. }
  4860. public function testmeixu_nation_balance()
  4861. {
  4862. $provider = $this->getProvider('meixu_nation');
  4863. $resp = $provider->balance();
  4864. }
  4865. public function testmeixu_nation_add()
  4866. {
  4867. $provider = $this->getProvider('meixu_nation');
  4868. $net_errno = '';
  4869. $resp = $provider->add(18074608795, 6, 5, ['order_sn' => $this->make_sn(), 'channel_code' => 30000001470], $net_errno);
  4870. }
  4871. public function testmeixu_nation_Query()
  4872. {
  4873. $provider = $this->getProvider('meixu_nation');
  4874. [$succ, $val, $official_sn] = $provider->query(['order_sn'=>'14001696842751883773']);
  4875. }
  4876. public function testyuntian_high_balance()
  4877. {
  4878. $provider = $this->getProvider('yuntian_high');
  4879. $resp = $provider->balance();
  4880. }
  4881. public function testmeixull_fs_balance()
  4882. {
  4883. $provider = $this->getProvider('meixu_nation');
  4884. $resp = $provider->balance();
  4885. }
  4886. public function testmeixull_fs_add()
  4887. {
  4888. $provider = $this->getProvider('meixull_fs');
  4889. $net_errno = '';
  4890. $resp = $provider->add(18074608795, 6, 5, ['order_sn' => $this->make_sn(), 'channel_code' => 14964], $net_errno);
  4891. }
  4892. public function testguangxinkc_balance()
  4893. {
  4894. $provider = $this->getProvider('guangxinkc');
  4895. $resp = $provider->balance();
  4896. }
  4897. public function testguangxinllqg_balance()
  4898. {
  4899. $provider = $this->getProvider('guangxinllqg');
  4900. $resp = $provider->balance();
  4901. }
  4902. public function testguangxinllfs_balance()
  4903. {
  4904. $provider = $this->getProvider('guangxinllfs');
  4905. $resp = $provider->balance();
  4906. }
  4907. public function testyeyekami_balance()
  4908. {
  4909. $provider = $this->getProvider('yeyekami');
  4910. $resp = $provider->balance();
  4911. }
  4912. public function testyiqiandq()
  4913. {
  4914. $provider = $this->getProvider('yiqiandq');
  4915. $resp = $provider->balance();
  4916. // $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  4917. }
  4918. public function testyiqiandq_fs()
  4919. {
  4920. $provider = $this->getProvider('yiqiandq_fs');
  4921. // $resp = $provider->balance();
  4922. $resp = $provider->add(18074608795, 6, 10, ['order_sn' => $this->make_sn()]);
  4923. }
  4924. public function testalipay_result(){
  4925. $r = '{"alipay_user_dtbankcust_channelvoucher_send_response":{"code":"10000","msg":"Success","activity_order_id":"20201228141643299883232211233","activity_id":"ACT836FBC00020212","send_status":"SUCCESS","discount_type":"reduce","discount_threshold_amt":288,"discount_value":300,"send_amount":599,"voucher_id":"券id","account_no":"169******35"},"sign":"ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"}';
  4926. $respObject = json_decode($r);
  4927. $rr = json_encode($respObject);
  4928. $content = ": {$rr}\r\n";
  4929. Log::record($respObject, Log::DEBUG);
  4930. }
  4931. public function testbeirui_nation()
  4932. {
  4933. $provider = $this->getProvider('beirui_nation');
  4934. // $resp = $provider->balance();
  4935. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  4936. $resp = $provider->query(['order_sn' => '95011698287167847318']);
  4937. }
  4938. public function testbeirui_fs()
  4939. {
  4940. $provider = $this->getProvider('beirui_fs');
  4941. $resp = $provider->balance();
  4942. // $resp = $provider->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
  4943. // $resp = $provider->query(['order_sn' => '79181698287963081934']);
  4944. }
  4945. public function testliantuo_nation()
  4946. {
  4947. $provider = $this->getProvider('liantuo_nation');
  4948. $resp = $provider->balance();
  4949. }
  4950. public function testliantuo_fs()
  4951. {
  4952. $provider = $this->getProvider('liantuo_fs');
  4953. $resp = $provider->balance();
  4954. }
  4955. public function testguangxinxiaome()
  4956. {
  4957. $provider = $this->getProvider('guangxinxiaome');
  4958. $resp = $provider->balance();
  4959. }
  4960. public function testliantuo_high()
  4961. {
  4962. $provider = $this->getProvider('liantuo_high');
  4963. // $resp = $provider->balance();
  4964. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  4965. }
  4966. public function testmiaoxt_tax_trd()
  4967. {
  4968. $provider = $this->getProvider('miaoxt_tax_trd');
  4969. // $resp = $provider->balance();
  4970. $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  4971. }
  4972. public function testmiaoxt_tax_seco()
  4973. {
  4974. $provider = $this->getProvider('miaoxt_tax_seco');
  4975. $resp = $provider->balance();
  4976. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  4977. }
  4978. public function testbeirui_sec()
  4979. {
  4980. $provider = $this->getProvider('beirui_sec');
  4981. $resp = $provider->balance();
  4982. }
  4983. public function testliantuo_nation_trd()
  4984. {
  4985. $provider = $this->getProvider('liantuo_nation_trd');
  4986. $resp = $provider->balance();
  4987. }
  4988. public function testbeirui_trd()
  4989. {
  4990. $provider = $this->getProvider('beirui_trd');
  4991. $resp = $provider->balance();
  4992. }
  4993. public function testweisanhuo()
  4994. {
  4995. $provider = $this->getProvider('weisanhuo');
  4996. $resp = $provider->balance();
  4997. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  4998. $resp = $provider->query(['order_sn' => '24271700815859899563']);
  4999. // $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
  5000. // $data = json_decode($post, true);
  5001. // $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
  5002. //
  5003. // $ret = $provider->verify($data);
  5004. // $resp = $provider->notify($data);
  5005. }
  5006. public function testyiqian_tax()
  5007. {
  5008. $provider = $this->getProvider('yiqian_tax');
  5009. $resp = $provider->balance();
  5010. }
  5011. public function testmiaoxt_fs_three()
  5012. {
  5013. $provider = $this->getProvider('miaoxt_fs_three');
  5014. $resp = $provider->balance();
  5015. }
  5016. public function testkainuo60_official_sn()
  5017. {
  5018. $extractOfficialSn = function ($officialSnStr) {
  5019. $officialSnStr = trim($officialSnStr);
  5020. if (strtolower($officialSnStr) == 'null') {
  5021. return '';
  5022. }
  5023. if (preg_match("/^[a-zA-Z0-9]+$/", $officialSnStr)) {
  5024. return $officialSnStr;
  5025. }
  5026. return '';
  5027. };
  5028. $s0 = $extractOfficialSn('');
  5029. $s1 = $extractOfficialSn('缴费成功__');
  5030. $s3 = $extractOfficialSn('ZT20231129192955657301');
  5031. $s4 = $extractOfficialSn('ZF231129183051100000000009626746');
  5032. $s5 = $extractOfficialSn('1000000083423112919300173770');
  5033. $s6 = $extractOfficialSn('594043620012941162');
  5034. $s7 = $extractOfficialSn('GZV02311303763808458');
  5035. }
  5036. public function testyzpuchong2()
  5037. {
  5038. $provider = $this->getProvider('yzpuchong2');
  5039. $resp = $provider->balance();
  5040. }
  5041. public function testalibank_coupon()
  5042. {
  5043. require_once(BASE_DATA_PATH . '/api/alibank/coupon.php');
  5044. $ac_client = alibank\coupon::getInstance();
  5045. $resp = $ac_client->query_balance('2088741018134438');
  5046. //查询活动配置
  5047. $resp = $ac_client->query_activity_config('ACT143DSC01870718');
  5048. }
  5049. public function testapi_response() {
  5050. require_once(BASE_DATA_PATH . '/api/alibank/coupon.php');
  5051. $net_err = '';
  5052. $ac_client = alibank\coupon::getInstance('', '', '', '');
  5053. $r = $ac_client->api_response(true, new stdClass(), '', $net_err);
  5054. $r1 = $ac_client->api_response(true, [new stdClass(), new stdClass()], '', $net_err);
  5055. $r2 = $ac_client->api_response(true, null, '', $net_err);
  5056. $r3 = $ac_client->api_response(true, '', '', $net_err);
  5057. $r4 = $ac_client->api_response(true, ['code' => '10000', 'msg' => 'success'], '', $net_err);
  5058. }
  5059. public function teststr_iconv()
  5060. {
  5061. ini_set('display_errors',1);
  5062. error_reporting(-1);
  5063. $str = '{"alipay_data_bill_balance_query_response":{"code":"10000","msg":"Success","freeze_amount":"0.00","total_amount":"0.00","available_amount":"0.00"},"sign":"EG7W/IwOhGkDzpA8Y2XAZ1X6DODAlfW9j1O+kAZ12IigyVDzNAhjPZhCv1MWOjZcf+RkE4y0wtA+pK3xUIZqPZi6ouk3DTAUUwrs/XkfwZ59EH1OwZ+AzEDMOxrbRFmwFXsIgiFVezCrGHSROzrhLkzOLlYbMRaHP+7/u53j7/ECkC3DyhYnLkg5WRAR44Re4isIznfhVn5l54ys+lCftgG/9d1TeoaSV0lt/6sTaK4HSK56yvRWkhgeiFd7zmwugmzLjsIkCrbRSOt7vb7maV9ACVzeQMq0BcJGghDCcsCZN1Ete8c3og4ElgVzKnQu5hpoxOQgwJhDAt15qivCVw=="}';
  5064. $encode = mb_detect_encoding($str, array('UTF-8', 'ASCII', "GB2312", "GBK"));
  5065. $s = iconv($encode,'UTF-8', $str);
  5066. $s1 = iconv('UTF-8',"UTF-8", $s);
  5067. }
  5068. public function testyuntian_trd()
  5069. {
  5070. $provider = $this->getProvider('yuntian_trd');
  5071. $resp = $provider->balance();
  5072. }
  5073. public function testyeyekami_fast()
  5074. {
  5075. $provider = $this->getProvider('yeyekami_fast');
  5076. $resp = $provider->balance();
  5077. }
  5078. public function testxingchuang_nation()
  5079. {
  5080. $provider = $this->getProvider('xingchuang_nation');
  5081. $resp = $provider->balance();
  5082. }
  5083. public function testxingchuang_fs()
  5084. {
  5085. $provider = $this->getProvider('xingchuang_fs');
  5086. $resp = $provider->balance();
  5087. }
  5088. public function testtengyoujun_ylyw()
  5089. {
  5090. $provider = $this->getProvider('tengyoujun_ylyw');
  5091. $resp = $provider->balance();
  5092. }
  5093. public function testtengyoujun_yj()
  5094. {
  5095. $provider = $this->getProvider('tengyoujun_yj');
  5096. $resp = $provider->balance();
  5097. }
  5098. public function testhuifen_fast()
  5099. {
  5100. $provider = $this->getProvider('huifen_fast');
  5101. // $resp = $provider->balance();
  5102. // $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
  5103. // $resp = $provider->query(['order_sn' => '68431705563180643504']); //充值成功
  5104. // $resp = $provider->query(['order_sn' => '45151705563526718624']); //充值失败
  5105. // $resp = $provider->query(['order_sn' => '39941705567795321592']); //充值中
  5106. $resp = $provider->query(['order_sn' => '399417055677953215921']); //查询不存在的订单
  5107. }
  5108. public function testxingchuang_sec()
  5109. {
  5110. $provider = $this->getProvider('xingchuang_sec');
  5111. $resp = $provider->balance();
  5112. }
  5113. public function testkachong_new()
  5114. {
  5115. $provider = $this->getProvider('kachong_new');
  5116. $resp = $provider->balance();
  5117. }
  5118. public function testxingchuang_trd()
  5119. {
  5120. $provider = $this->getProvider('xingchuang_trd');
  5121. $resp = $provider->balance();
  5122. $resp = $provider->query(['order_sn' => '56641701227303096134']);
  5123. }
  5124. public function testmenshang_sec()
  5125. {
  5126. $provider = $this->getProvider('menshang_sec');
  5127. $resp = $provider->balance();
  5128. $resp = $provider->query(['order_sn' => '56641701227303096134']);
  5129. }
  5130. public function testmenshang()
  5131. {
  5132. $provider = $this->getProvider('menshang');
  5133. $resp = $provider->balance();
  5134. $resp = $provider->query(['order_sn' => '56641701227303096134']);
  5135. }
  5136. public function testmenshang_fs()
  5137. {
  5138. $provider = $this->getProvider('menshang_fs');
  5139. $resp = $provider->balance();
  5140. // $resp = $provider->add(15811535608, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 3]);
  5141. $resp = $provider->query(['order_sn' => '56641701227303096134']);
  5142. }
  5143. public function testyeyepucnt()
  5144. {
  5145. $provider = $this->getProvider('yeyepucnt');
  5146. $resp = $provider->balance();
  5147. }
  5148. public function testzunni()
  5149. {
  5150. $provider = $this->getProvider('zunni');
  5151. $resp = $provider->balance();
  5152. }
  5153. public function testtaoxun()
  5154. {
  5155. $provider = $this->getProvider('taoxun');
  5156. $resp = $provider->balance();
  5157. }
  5158. public function testyoushilian_sec()
  5159. {
  5160. $provider = $this->getProvider('youshilian_sec');
  5161. $resp = $provider->balance();
  5162. }
  5163. public function testyoushilian()
  5164. {
  5165. $provider = $this->getProvider('youshilian');
  5166. $resp = $provider->balance();
  5167. }
  5168. public function testyeyepcthree()
  5169. {
  5170. $provider = $this->getProvider('yeyepcthree');
  5171. $resp = $provider->balance();
  5172. }
  5173. public function testyeye666cd()
  5174. {
  5175. $provider = $this->getProvider('yeye666cd');
  5176. $resp = $provider->balance();
  5177. }
  5178. public function testxinbao()
  5179. {
  5180. $provider = $this->getProvider('xinbao');
  5181. $resp = $provider->balance();
  5182. }
  5183. public function testxinbao_sec()
  5184. {
  5185. $provider = $this->getProvider('xinbao_sec');
  5186. $resp = $provider->balance();
  5187. }
  5188. public function testxinbao_trd()
  5189. {
  5190. $provider = $this->getProvider('xinbao_trd');
  5191. $resp = $provider->balance();
  5192. }
  5193. public function testdunhui()
  5194. {
  5195. $provider = $this->getProvider('dunhui');
  5196. $resp = $provider->balance();
  5197. }
  5198. public function testdunhui_sec()
  5199. {
  5200. $provider = $this->getProvider('dunhui_sec');
  5201. $resp = $provider->balance();
  5202. }
  5203. public function testyoushilian_fs()
  5204. {
  5205. $provider = $this->getProvider('youshilian_fs');
  5206. $resp = $provider->balance();
  5207. }
  5208. public function testruizhi_tax_yj()
  5209. {
  5210. $provider = $this->getProvider('ruizhi_tax_yj');
  5211. $resp = $provider->balance();
  5212. }
  5213. public function testxinbao_fs()
  5214. {
  5215. $provider = $this->getProvider('xinbao_fs');
  5216. $resp = $provider->balance();
  5217. }
  5218. public function testxinbao_fourth()
  5219. {
  5220. $provider = $this->getProvider('xinbao_fourth');
  5221. $resp = $provider->balance();
  5222. }
  5223. public function testkachong_sec()
  5224. {
  5225. $provider = $this->getProvider('kachong_sec');
  5226. $resp = $provider->balance();
  5227. }
  5228. public function testyuansheng()
  5229. {
  5230. $provider = $this->getProvider('yuansheng');
  5231. $resp = $provider->balance();
  5232. }
  5233. public function testhengyeshi()
  5234. {
  5235. $provider = $this->getProvider('hengyeshi');
  5236. $resp = $provider->balance();
  5237. }
  5238. public function testweisanhuo_sec()
  5239. {
  5240. $provider = $this->getProvider('weisanhuo_sec');
  5241. $resp = $provider->balance();
  5242. // $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
  5243. //// $resp = $provider->query(['order_sn' => '24271700815859899563']);
  5244. }
  5245. public function testyuansheng_trd()
  5246. {
  5247. $provider = $this->getProvider('yuansheng_trd');
  5248. $resp = $provider->balance();
  5249. }
  5250. public function testxinbao_fifth()
  5251. {
  5252. $provider = $this->getProvider('xinbao_fifth');
  5253. $resp = $provider->balance();
  5254. }
  5255. public function testyuansheng_fs()
  5256. {
  5257. $provider = $this->getProvider('yuansheng_fs');
  5258. $resp = $provider->balance();
  5259. }
  5260. public function testhuifen_fast_sec()
  5261. {
  5262. $provider = $this->getProvider('huifen_fast_sec');
  5263. $resp = $provider->balance();
  5264. }
  5265. public function testgudelake()
  5266. {
  5267. $provider = $this->getProvider('gudelake');
  5268. $resp = $provider->balance();
  5269. }
  5270. public function testhengyeshi_sec()
  5271. {
  5272. $provider = $this->getProvider('hengyeshi_sec');
  5273. $resp = $provider->balance();
  5274. }
  5275. public function testyuansheng_sec()
  5276. {
  5277. $provider = $this->getProvider('yuansheng_sec');
  5278. $resp = $provider->balance();
  5279. }
  5280. public function testzhongtuo()
  5281. {
  5282. $provider = $this->getProvider('zhongtuo');
  5283. $resp = $provider->balance();
  5284. }
  5285. public function testzhongtuo_fs()
  5286. {
  5287. $provider = $this->getProvider('zhongtuo_fs');
  5288. $resp = $provider->balance();
  5289. }
  5290. public function testzhongtuo_sec()
  5291. {
  5292. $provider = $this->getProvider('zhongtuo_sec');
  5293. $resp = $provider->balance();
  5294. }
  5295. public function testxinhangxian()
  5296. {
  5297. $provider = $this->getProvider('xinhangxian');
  5298. $resp = $provider->balance();
  5299. }
  5300. public function testtelida()
  5301. {
  5302. $provider = $this->getProvider('telida');
  5303. $resp = $provider->balance();
  5304. }
  5305. public function testyezioilzyt()
  5306. {
  5307. $provider = $this->getProvider('yezioilzyt', 'RefillOil');
  5308. $resp = $provider->balance();
  5309. }
  5310. public function testduiba_oil_add()
  5311. {
  5312. $provider = $this->getProvider('duiba_oil', 'RefillOil');
  5313. $order_sn = $this->make_sn();
  5314. $net_errno = '';
  5315. [$succ, $val, $neterr] = $provider->add(1000111100021211884,2, 50, ['order_sn' => $order_sn], $net_errno);
  5316. }
  5317. public function testduiba_oil_query()
  5318. {
  5319. $provider = $this->getProvider('duiba_oil', 'RefillOil');
  5320. [$succ, $val] = $provider->query(['order_sn'=>'66901721296849300562']);
  5321. }
  5322. public function testduiba_oil_callback()
  5323. {
  5324. $provider = $this->getProvider('duiba_oil', 'RefillCallBack');
  5325. $content = '{"sign":"da7e6514d9e968904b74865992201ba1","failReason":"json为空","appKey":"6yTjhWWfpxmC528uHm4FyDtvBHP","thirdOrderNum":"68361721294021662085","supplyOrderNum":"177583762","status":"4","timestamp":"1721294628381"}';
  5326. $input = json_decode($content,true);
  5327. $val = $provider->verify($input);
  5328. $val1 = $provider->notify($input);
  5329. }
  5330. public function testtelida_fs()
  5331. {
  5332. $provider = $this->getProvider('telida_fs');
  5333. $resp = $provider->balance();
  5334. }
  5335. public function testjinmiaoli()
  5336. {
  5337. $provider = $this->getProvider('jinmiaoli');
  5338. $resp = $provider->balance();
  5339. }
  5340. public function testjinmiaoli_sec()
  5341. {
  5342. $provider = $this->getProvider('jinmiaoli_sec');
  5343. $resp = $provider->balance();
  5344. }
  5345. public function testtelida_nation()
  5346. {
  5347. $provider = $this->getProvider('telida_nation');
  5348. $resp = $provider->balance();
  5349. }
  5350. public function testxinhangxian_fs()
  5351. {
  5352. $provider = $this->getProvider('xinhangxian_fs');
  5353. $resp = $provider->balance();
  5354. }
  5355. public function testmiaofeng()
  5356. {
  5357. $provider = $this->getProvider('miaofeng');
  5358. $resp = $provider->balance();
  5359. }
  5360. public function testmiaofeng_fs()
  5361. {
  5362. $provider = $this->getProvider('miaofeng_fs');
  5363. $resp = $provider->balance();
  5364. }
  5365. public function testjiahu()
  5366. {
  5367. $provider = $this->getProvider('jiahu');
  5368. $resp = $provider->balance();
  5369. }
  5370. public function testxinbao_small()
  5371. {
  5372. $provider = $this->getProvider('xinbao_small');
  5373. $resp = $provider->balance();
  5374. }
  5375. public function testyuankun()
  5376. {
  5377. $provider = $this->getProvider('yuankun');
  5378. $resp = $provider->balance();
  5379. }
  5380. public function testzhixin()
  5381. {
  5382. $provider = $this->getProvider('zhixin');
  5383. $resp = $provider->balance();
  5384. }
  5385. public function testjiahu_fs()
  5386. {
  5387. $provider = $this->getProvider('jiahu_fs');
  5388. $resp = $provider->balance();
  5389. }
  5390. public function testchengchong()
  5391. {
  5392. $provider = $this->getProvider('chengchong');
  5393. $resp = $provider->balance();
  5394. }
  5395. public function testchengchong_sec()
  5396. {
  5397. $provider = $this->getProvider('chengchong_sec');
  5398. $resp = $provider->balance();
  5399. }
  5400. public function testchengchong_fs()
  5401. {
  5402. $provider = $this->getProvider('chengchong_fs');
  5403. $resp = $provider->balance();
  5404. }
  5405. public function testdexin()
  5406. {
  5407. $provider = $this->getProvider('dexin');
  5408. $resp = $provider->balance();
  5409. }
  5410. public function testdexin_sec()
  5411. {
  5412. $provider = $this->getProvider('dexin_sec');
  5413. $resp = $provider->balance();
  5414. }
  5415. public function testqingyu()
  5416. {
  5417. $provider = $this->getProvider('qingyu');
  5418. $resp = $provider->balance();
  5419. }
  5420. public function testyouge()
  5421. {
  5422. $provider = $this->getProvider('youge');
  5423. $resp = $provider->balance();
  5424. }
  5425. public function testyouge_sec()
  5426. {
  5427. $provider = $this->getProvider('youge_sec');
  5428. $resp = $provider->balance();
  5429. }
  5430. public function testcuyun()
  5431. {
  5432. $provider = $this->getProvider('cuyun');
  5433. $resp = $provider->balance();
  5434. }
  5435. public function testlihui()
  5436. {
  5437. $provider = $this->getProvider('lihui');
  5438. $resp = $provider->balance();
  5439. }
  5440. public function testyeyankc001()
  5441. {
  5442. $provider = $this->getProvider('yeyankc001');
  5443. $resp = $provider->balance();
  5444. }
  5445. public function testyeyankc002()
  5446. {
  5447. $provider = $this->getProvider('yeyankc002');
  5448. $resp = $provider->balance();
  5449. }
  5450. public function testmasheng()
  5451. {
  5452. $provider = $this->getProvider('masheng');
  5453. $resp = $provider->balance();
  5454. //
  5455. // $query_params = [
  5456. // 'order_sn' => $this->make_sn(),
  5457. // ];
  5458. // $provider->query($query_params);
  5459. // $net_errno = '';
  5460. // $provider->add('13911129867',4, 1, ['order_sn' => $this->make_sn()], $net_errno);
  5461. }
  5462. public function testsign()
  5463. {
  5464. $sign = function($params)
  5465. {
  5466. ksort($params);
  5467. $content = '';
  5468. foreach ($params as $key => $value) {
  5469. $content .= "{$key}{$value}";
  5470. }
  5471. $content .= '3845afd20883a8e16';
  5472. return md5($content);
  5473. };
  5474. $sgin = $sign([
  5475. 'cpid' => '57974',
  5476. 'order_no' => '24123018453457974331926531',
  5477. 'mobile' => '15712899758',
  5478. 'amount' => '100',
  5479. 'status' => 'failed',
  5480. 'sz_order_no' => '',
  5481. 'ret_para' => '1434340788899534324530',
  5482. // 'sign' => '99469ee5770c27f8a849f2cf2c652e25'
  5483. ]);
  5484. }
  5485. public function testtengsu()
  5486. {
  5487. $provider = $this->getProvider('tengsu');
  5488. $resp = $provider->balance();
  5489. }
  5490. public function testqingyu_sec()
  5491. {
  5492. $provider = $this->getProvider('qingyu_sec');
  5493. $resp = $provider->balance();
  5494. }
  5495. public function testdskm70ka()
  5496. {
  5497. $provider = $this->getProvider('dskm70ka');
  5498. $resp = $provider->balance();
  5499. }
  5500. public function testdskm70ka_100()
  5501. {
  5502. $provider = $this->getProvider('dskm70ka_100');
  5503. $resp = $provider->balance();
  5504. }
  5505. public function testjietaiyu()
  5506. {
  5507. $provider = $this->getProvider('jietaiyu');
  5508. $resp = $provider->balance();
  5509. }
  5510. public function testchengchong_trd()
  5511. {
  5512. $provider = $this->getProvider('chengchong_trd');
  5513. $resp = $provider->balance();
  5514. }
  5515. public function testkadankuaichong()
  5516. {
  5517. $provider = $this->getProvider('kadankuaichong');
  5518. $resp = $provider->balance();
  5519. }
  5520. public function testkadanhuitthree()
  5521. {
  5522. $provider = $this->getProvider('kadanhuitthree');
  5523. $resp = $provider->balance();
  5524. }
  5525. public function testkadanhuitpc()
  5526. {
  5527. $provider = $this->getProvider('kadanhuitpc');
  5528. $resp = $provider->balance();
  5529. }
  5530. public function testtechaohe()
  5531. {
  5532. $provider = $this->getProvider('techaohe');
  5533. $resp = $provider->balance();
  5534. }
  5535. public function testjizheng()
  5536. {
  5537. $provider = $this->getProvider('jizheng');
  5538. $resp = $provider->balance();
  5539. }
  5540. public function testkachong_trd()
  5541. {
  5542. $provider = $this->getProvider('kachong_trd');
  5543. $resp = $provider->balance();
  5544. }
  5545. public function testkachong70()
  5546. {
  5547. $provider = $this->getProvider('kachong70');
  5548. $resp = $provider->balance();
  5549. }
  5550. public function testchaohe_sec()
  5551. {
  5552. $provider = $this->getProvider('chaohe_sec');
  5553. $resp = $provider->balance();
  5554. }
  5555. public function testchanlian()
  5556. {
  5557. $provider = $this->getProvider('chanlian');
  5558. $resp = $provider->balance();
  5559. }
  5560. public function testchanlian_sec()
  5561. {
  5562. $provider = $this->getProvider('chanlian_sec');
  5563. $resp = $provider->balance();
  5564. }
  5565. public function testyeyekc18()
  5566. {
  5567. $provider = $this->getProvider('yeyekc18');
  5568. $resp = $provider->balance();
  5569. }
  5570. public function testxinguande()
  5571. {
  5572. $provider = $this->getProvider('xinguande');
  5573. $resp = $provider->balance();
  5574. }
  5575. public function testlihui_fs()
  5576. {
  5577. $provider = $this->getProvider('lihui_fs');
  5578. $resp = $provider->balance();
  5579. }
  5580. public function testcuanqi_sec()
  5581. {
  5582. $provider = $this->getProvider('cuanqi_sec');
  5583. $resp = $provider->balance();
  5584. }
  5585. public function testtetengsu_sec()
  5586. {
  5587. $provider = $this->getProvider('tetengsu_sec');
  5588. $resp = $provider->balance();
  5589. }
  5590. public function testtechaohe_trd()
  5591. {
  5592. $provider = $this->getProvider('techaohe_trd');
  5593. $resp = $provider->balance();
  5594. }
  5595. public function testnantai()
  5596. {
  5597. $provider = $this->getProvider('nantai');
  5598. $resp = $provider->balance();
  5599. }
  5600. public function testnantai_sec()
  5601. {
  5602. $provider = $this->getProvider('nantai_sec');
  5603. $resp = $provider->balance();
  5604. }
  5605. public function testnantai_jingdong()
  5606. {
  5607. $provider = $this->getProvider('nantai_jingdong');
  5608. $resp = $provider->balance();
  5609. }
  5610. public function testnantai_fs()
  5611. {
  5612. $provider = $this->getProvider('nantai_fs');
  5613. $resp = $provider->balance();
  5614. }
  5615. public function testyeyekcthreehv()
  5616. {
  5617. $provider = $this->getProvider('yeyekcthreehv');
  5618. $resp = $provider->balance();
  5619. }
  5620. public function testkachong70_ye()
  5621. {
  5622. $provider = $this->getProvider('kachong70_ye');
  5623. $resp = $provider->balance();
  5624. }
  5625. public function testfengsheng()
  5626. {
  5627. $provider = $this->getProvider('fengsheng');
  5628. // $resp = $provider->add(15811535608, 4, 50, ['order_sn' => $this->make_sn(), 'ch_price' => 0.01]);
  5629. // $resp = $provider->query(['order_sn' => '16971663724801057246']);
  5630. $resp = $provider->balance();
  5631. }
  5632. public function testruishang()
  5633. {
  5634. $provider = $this->getProvider('ruishang');
  5635. $resp = $provider->balance();
  5636. }
  5637. public function testzhongying()
  5638. {
  5639. $provider = $this->getProvider('zhongying');
  5640. $resp = $provider->balance();
  5641. }
  5642. public function testyeyankc003()
  5643. {
  5644. $provider = $this->getProvider('yeyankc003');
  5645. $resp = $provider->balance();
  5646. }
  5647. public function testnrui()
  5648. {
  5649. $provider = $this->getProvider('nrui');
  5650. $resp = $provider->balance();
  5651. }
  5652. public function testnfeng()
  5653. {
  5654. $provider = $this->getProvider('nfeng');
  5655. $resp = $provider->balance();
  5656. }
  5657. public function testnruifeng_jd()
  5658. {
  5659. $provider = $this->getProvider('nruifeng_jd');
  5660. $resp = $provider->balance();
  5661. }
  5662. public function testnyingyang_km()
  5663. {
  5664. $provider = $this->getProvider('nyingyang_km');
  5665. $resp = $provider->balance();
  5666. }
  5667. public function testzhixinzhuanch()
  5668. {
  5669. $provider = $this->getProvider('zhixinzhuanch');
  5670. $resp = $provider->balance();
  5671. }
  5672. public function testfengsheng_fs()
  5673. {
  5674. $provider = $this->getProvider('fengsheng_fs');
  5675. $resp = $provider->balance();
  5676. }
  5677. public function testbenyu_sec()
  5678. {
  5679. $provider = $this->getProvider('benyu_sec');
  5680. $resp = $provider->balance();
  5681. }
  5682. }
  5683. //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
  5684. //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