TestRefill.php 273 KB

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