TestRefillYl.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. define('APP_ID', 'test');
  4. define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
  5. require_once(BASE_ROOT_PATH . '/global.php');
  6. require_once(BASE_CORE_PATH . '/lrlz.php');
  7. require_once(BASE_ROOT_PATH . '/fooder.php');
  8. require_once(BASE_CORE_PATH . '/framework/function/http.php');
  9. require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
  10. require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
  11. const LocalTest = 1;
  12. const NetTest = 2;
  13. const CurrentTest = NetTest;
  14. class TestRefillYl extends TestCase
  15. {
  16. public static function setUpBeforeClass(): void
  17. {
  18. Base::run_util();
  19. refill\RefillFactory::instance();
  20. }
  21. private function getProvider($name,$type = 'RefillPhone')
  22. {
  23. $file = BASE_HELPER_RAPI_PATH . "/$name/{$type}.php";
  24. if(!file_exists($file)){
  25. Log::record("provider api file={$file} not exist.",Log::DEBUG);
  26. return false;
  27. } else {
  28. require_once($file);
  29. Log::record("file={$file} load success.",Log::DEBUG);
  30. }
  31. $class_name = "refill\\{$name}\\{$type}";
  32. if (class_exists($class_name, false)) {
  33. $caller = new $class_name([]);
  34. return $caller;
  35. } else {
  36. $error = "Base Error: class {$class_name} isn't exists!";
  37. Log::record($error, Log::ERR);
  38. return false;
  39. }
  40. }
  41. private function make_sn()
  42. {
  43. return mt_rand(1000, 9999)
  44. . sprintf('%010d', time())
  45. . sprintf('%06d', (float)microtime() * 1000000);
  46. }
  47. public function testYamiao_high()
  48. {
  49. // $provider = $this->getProvider('yamiao_high');
  50. // $resp = $provider->balance();
  51. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  52. // $resp = $provider->query(['order_sn' => '80031648092448376229']);
  53. $body = '{"orderId":"220324112752228331","appId":"ILo9IfHYg0","outOrderId":"80031648092448376229","sign":"1ef1ba02308669673ebcb136cb67e1c1","orderStatus":"3","completeTime":"20220324112803","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  54. $params = json_decode($body, true);
  55. $provider = $this->getProvider('yamiao_high','RefillCallBack');
  56. $ret = $provider->verify($params);
  57. $resp = $provider->notify($params);
  58. }
  59. public function testYamiao_normal()
  60. {
  61. // $provider = $this->getProvider('yamiao_normal');
  62. // $resp = $provider->balance();
  63. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  64. // $resp = $provider->query(['order_sn' => '65931648092912669252']);
  65. $body = '{"orderId":"220324113519231696","appId":"Mxh2JUZocr","outOrderId":"65931648092912669252","sign":"6560cab5e7ec5f265b04632c4c2a1f1a","orderStatus":"3","completeTime":"20220324113522","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  66. $params = json_decode($body, true);
  67. $provider = $this->getProvider('yamiao_normal','RefillCallBack');
  68. $ret = $provider->verify($params);
  69. $resp = $provider->notify($params);
  70. }
  71. public function testYamiaoman()
  72. {
  73. $provider = $this->getProvider('yamiaoman');
  74. $resp = $provider->balance();
  75. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  76. // $resp = $provider->query(['order_sn' => '53351647242979116742']);
  77. // $body = '{"orderId":"220314152954756093","appId":"zIODZmzSCk","outOrderId":"53351647242979116742","sign":"41ad7d4b4b26559377c6443d2b0d6c68","orderStatus":"3","completeTime":"20220314172722","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  78. // $params = json_decode($body, true);
  79. // $provider = $this->getProvider('yamiaoman','RefillCallBack');
  80. // $ret = $provider->verify($params);
  81. // $resp = $provider->notify($params);
  82. }
  83. public function testGuantu()
  84. {
  85. // $provider = $this->getProvider('guantu');
  86. // $resp = $provider->balance();
  87. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  88. // $resp = $provider->query(['order_sn' => '59041648111767968756']);
  89. $body = ' {"orderId":"220324164934076577","appId":"t7gmui2D3w","outOrderId":"59041648111767968756","sign":"e957df33cfaa777cd3c2349cd2023996","orderStatus":"3","completeTime":"20220324165033","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  90. $params = json_decode($body, true);
  91. $provider = $this->getProvider('guantu','RefillCallBack');
  92. $ret = $provider->verify($params);
  93. $resp = $provider->notify($params);
  94. }
  95. public function testLechong()
  96. {
  97. $provider = $this->getProvider('lechong');
  98. // $resp = $provider->balance();
  99. // $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
  100. // $resp = $provider->query(['order_sn' => '65361648114672703928']);
  101. $body = '{"sellerid":"65361648114672703928","agentcode":"202203241556","account":"MTg1MDA2MDgzMzM=","value":"50","payvalue":"47.8000","voucher":"","createtime":"20220324173803","endtime":"20220324173857","state":"4","remark":"","time":"20220324174224","sign":"8a2c011095cadb6dc5abd00c25a11d1c"}';
  102. $params = json_decode($body, true);
  103. $provider = $this->getProvider('lechong','RefillCallBack');
  104. $ret = $provider->verify($params);
  105. $resp = $provider->notify($params);
  106. }
  107. public function testXinhengyangnew()
  108. {
  109. // $provider = $this->getProvider('xinhengyangnew');
  110. // $resp = $provider->balance();
  111. // $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 30, ['order_sn' => $this->make_sn()]);
  112. // $resp = $provider->query(['order_sn' => '98351648200827982694']);
  113. $body = '{"mchid":"200065","msg":"充值失败","oid":"1000432223966","orderid":"98351648200827982694","price":"28.770","sign":"f3364cabace651f55f464aa5c6fa2d0b","status":"2","voucher":""}';
  114. $params = json_decode($body, true);
  115. $provider = $this->getProvider('xinhengyangnew', 'RefillCallBack');
  116. $ret = $provider->verify($params);
  117. $resp = $provider->notify($params);
  118. }
  119. public function testHuazhong()
  120. {
  121. $provider = $this->getProvider('huazhong');
  122. // $resp = $provider->balance();
  123. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  124. // $resp = $provider->query(['order_sn' => '85281648450617184602']);
  125. $body = '{"orderid":"SAD22032814599651058","sporderid":"85281648450617184602","userid":"10002823","merchantsubmittime":"20220328145958","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.59","sign":"C43F386C2804A71208E74FB336A600DA"}';
  126. $params = json_decode($body, true);
  127. $provider = $this->getProvider('huazhong','RefillCallBack');
  128. $ret = $provider->verify($params);
  129. $resp = $provider->notify($params);
  130. }
  131. public function testYouhenew()
  132. {
  133. // $provider = $this->getProvider('youhenew');
  134. // $resp = $provider->balance();
  135. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  136. // $resp = $provider->query(['order_sn' => '24941648452249459365']);
  137. $body = ' {"szOrderId":"24941648452249459365","fSalePrice":"28.74","szAgentId":"200039","nFlag":"3","szVerifyString":"57fa9c6232850f75841bee763d479dca","szPhoneNum":"13699279618","szRtnMsg":"","nDemo":"30"}';
  138. $params = json_decode($body, true);
  139. $provider = $this->getProvider('youhenew', 'RefillCallBack');
  140. $ret = $provider->verify($params);
  141. $resp = $provider->notify($params);
  142. }
  143. public function testLinzhu()
  144. {
  145. // $provider = $this->getProvider('linzhu');
  146. // $resp = $provider->balance();
  147. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  148. // $resp = $provider->query(['order_sn' => '84391648889914218946']);
  149. $body = '{"orderNo":"F2204021658518549406","status":"003","consumerNo":"84391648889914218946","voucherNo":null,"mobile":"18500608333"}';
  150. $params = json_decode($body, true);
  151. $provider = $this->getProvider('linzhu', 'RefillCallBack');
  152. $ret = $provider->verify($params);
  153. $data = $provider->notify($params);
  154. }
  155. public function testRuixunda()
  156. {
  157. // $provider = $this->getProvider('ruixunda');
  158. // $resp = $provider->balance();
  159. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  160. // $resp = $provider->query(['order_sn' => '33231648458371654420']);
  161. $body = '{"orderId":"220328170618202120","appId":"IvpY5p7PF2","outOrderId":"33231648458371654420","sign":"c28dda0d82efac178933e34465c6bf10","orderStatus":"3","completeTime":"20220328170623","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  162. $params = json_decode($body, true);
  163. $provider = $this->getProvider('ruixunda', 'RefillCallBack');
  164. $ret = $provider->verify($params);
  165. $resp = $provider->notify($params);
  166. }
  167. public function testHangtong()
  168. {
  169. // $provider = $this->getProvider('hangtong');
  170. // $resp = $provider->balance();
  171. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  172. // $resp = $provider->query(['order_sn' => '74101648459089504352']);
  173. $body = '{"phone":"18500608333","orderNo":"F2203281718158019474","status":"fail","otherNo":"74101648459089504352","msg":"提交/充值失败","ext":null}';
  174. $params = json_decode($body, true);
  175. $provider = $this->getProvider('hangtong', 'RefillCallBack');
  176. $ret = $provider->verify($params);
  177. $resp = $provider->notify($params);
  178. }
  179. public function testRuixunda_lt()
  180. {
  181. // $provider = $this->getProvider('ruixunda_lt');
  182. // $resp = $provider->balance();
  183. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  184. // $resp = $provider->query(['order_sn' => '46111648526030456955']);
  185. $body = '{"orderId":"220329115433227387","appId":"Uue0cNoWpa","outOrderId":"46111648526030456955","sign":"10e5addeb793510c775acba893ffe293","orderStatus":"3","completeTime":"20220329115514","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  186. $params = json_decode($body, true);
  187. $provider = $this->getProvider('ruixunda_lt', 'RefillCallBack');
  188. $ret = $provider->verify($params);
  189. $resp = $provider->notify($params);
  190. }
  191. public function testWangliantx()
  192. {
  193. // $provider = $this->getProvider('wangliantx');
  194. // $resp = $provider->balance();
  195. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
  196. // $resp = $provider->query(['order_sn' => '94661648534383050223']);
  197. $body = '{"userid":"10073945","sporderid":"94661648534383050223","orderid":"674A7408073BED1573945","resultno":"9","merchantsubmittime":"20220329141510","ordermoney":"28.53","verifystring":"29c7929b53beb1d67844edc6ecc7e84d","sign":"27dfda24686f696e8360c27922fc7ad1"}';
  198. $params = json_decode($body, true);
  199. $provider = $this->getProvider('wangliantx', 'RefillCallBack');
  200. $ret = $provider->verify($params);
  201. $resp = $provider->notify($params);
  202. }
  203. public function testXianghongrui()
  204. {
  205. // $provider = $this->getProvider('xianghongrui');
  206. // $resp = $provider->balance();
  207. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  208. // $resp = $provider->query(['order_sn' => '87461648535891960493']);
  209. $body = '{"orderid":"JTH22032914388095709","sporderid":"87461648535891960493","userid":"10002703","merchantsubmittime":"20220329143837","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"A2F64CAE7B37AE11D4F95468BC836EC0"}';
  210. $params = json_decode($body, true);
  211. $provider = $this->getProvider('xianghongrui', 'RefillCallBack');
  212. $ret = $provider->verify($params);
  213. $resp = $provider->notify($params);
  214. }
  215. public function testYunlingPhone()
  216. {
  217. // $provider = $this->getProvider('yunling');
  218. // $resp = $provider->balance();
  219. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  220. // $resp = $provider->query(['order_sn' => '77231648538773326953']);
  221. $body = '{"orderid":"LJQ22032915260029217","sporderid":"77231648538773326953","userid":"10003484","merchantsubmittime":"20220329152917","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.59","sign":"1CE276A68364C8B340B171EDB4A1383B"}';
  222. $params = json_decode($body, true);
  223. $provider = $this->getProvider('yunling', 'RefillCallBack');
  224. $ret = $provider->verify($params);
  225. $resp = $provider->notify($params);
  226. }
  227. public function testCangxin()
  228. {
  229. // $provider = $this->getProvider('cangxin');
  230. // $resp = $provider->balance();
  231. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  232. // $resp = $provider->query(['order_sn' => '51681648547830625598']);
  233. $body = ' {"sysOrderNo":"R1648547869045xQhULR1","clientId":"10046","verifyString":"c5c9a7cc0e6b4ce7146c3c49646ff17d","clientOrderNo":"51681648547830625598","status":"3"}';
  234. $params = json_decode($body, true);
  235. $provider = $this->getProvider('cangxin','RefillCallBack');
  236. $ret = $provider->verify($params);
  237. $resp = $provider->notify($params);
  238. }
  239. public function testCangxin_high()
  240. {
  241. $provider = $this->getProvider('cangxin_high');
  242. // $resp = $provider->balance();
  243. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  244. $resp = $provider->query(['order_sn' => '42631648622259046907']);
  245. // $body = '{"sysOrderNo":"R1648622681393At7McKz","clientId":"10047","verifyString":"e0df61027ee49fc91a39f329928100f3","clientOrderNo":"42631648622259046907","status":"3"}';
  246. // $params = json_decode($body, true);
  247. // $provider = $this->getProvider('cangxin_high','RefillCallBack');
  248. // $ret = $provider->verify($params);
  249. // $resp = $provider->notify($params);
  250. }
  251. public function testChizeng()
  252. {
  253. // $provider = $this->getProvider('chizeng');
  254. // $resp = $provider->balance();
  255. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  256. // $resp = $provider->query(['order_sn' => '72501648625275495598']);
  257. $body = '{"orderid":"ZEU22033015287999229","sporderid":"72501648625275495598","userid":"10003143","merchantsubmittime":"20220330153119","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.8","sign":"A051CB62898E9ECEF119CFD2B942E13B"}';
  258. $params = json_decode($body, true);
  259. $provider = $this->getProvider('chizeng','RefillCallBack');
  260. $ret = $provider->verify($params);
  261. $resp = $provider->notify($params);
  262. }
  263. public function testChizeng_normal()
  264. {
  265. // $provider = $this->getProvider('chizeng_normal');
  266. // $resp = $provider->balance();
  267. // $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
  268. // $resp = $provider->query(['order_sn' => '22251648624513997615']);
  269. $body = '{"orderid":"TJR22033015167908033","sporderid":"22251648624513997615","userid":"10003144","merchantsubmittime":"20220330151906","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.59","sign":"F7B00BD73CB384F008116D2D6D573B90"}';
  270. $params = json_decode($body, true);
  271. $provider = $this->getProvider('chizeng_normal','RefillCallBack');
  272. $ret = $provider->verify($params);
  273. $resp = $provider->notify($params);
  274. }
  275. public function testZhenghe()
  276. {
  277. // $provider = $this->getProvider('zhenghe');
  278. // $resp = $provider->balance();
  279. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  280. // $resp = $provider->query(['order_sn' => '54051648695406464004']);
  281. $body = '{"szOrderId":"54051648695406464004","fSalePrice":"30.0","szAgentId":"200042","nFlag":"3","szVerifyString":"be8816cd62ad8a36334498ea12b6c86d","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
  282. $params = json_decode($body, true);
  283. $provider = $this->getProvider('zhenghe','RefillCallBack');
  284. $ret = $provider->verify($params);
  285. $resp = $provider->notify($params);
  286. }
  287. public function testYilin()
  288. {
  289. // $provider = $this->getProvider('yilin');
  290. // $resp = $provider->balance();
  291. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  292. // $resp = $provider->query(['order_sn' => '76531648706723056884']);
  293. $body = '{"orderid":"PFJ22033114052380331","sporderid":"76531648706723056884","userid":"10002623","merchantsubmittime":"20220331140600","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.77","sign":"1FB68DFC9901A58BB1341CEFECFA15D0"}';
  294. $params = json_decode($body, true);
  295. $provider = $this->getProvider('yilin','RefillCallBack');
  296. $ret = $provider->verify($params);
  297. $resp = $provider->notify($params);
  298. }
  299. public function testHuoshenguo_high()
  300. {
  301. // $provider = $this->getProvider('huoshenguo_high');
  302. // $resp = $provider->balance();
  303. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  304. // $resp = $provider->query(['order_sn' => '12811648705888259160']);
  305. $body = '{"orderId":"220331135141084508","appId":"QBr2zmrWFD","outOrderId":"12811648705888259160","sign":"a386787a21c498b3004ec4b78060c5a2","orderStatus":"3","completeTime":"20220331135304","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  306. $params = json_decode($body, true);
  307. $provider = $this->getProvider('huoshenguo_high', 'RefillCallBack');
  308. $ret = $provider->verify($params);
  309. $resp = $provider->notify($params);
  310. }
  311. public function testHuoshenguo()
  312. {
  313. $provider = $this->getProvider('huoshenguo');
  314. // $resp = $provider->balance();
  315. // $resp = $provider->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
  316. $resp = $provider->query(['order_sn' => '31891648711311837528']);
  317. // $body = '{"orderId":"220113125625000016","appId":"xaPOF8SAEG","outOrderId":"90691642049771400349","sign":"b00285a7eabef29b0a0ad400ce8a3ea0","orderStatus":"3","completeTime":"20220113125843","orderDesc":"\u8ba2\u5355\u5931\u8d25"}';
  318. // $params = json_decode($body, true);
  319. // $provider = $this->getProvider('huoshenguo', 'RefillCallBack');
  320. // $ret = $provider->verify($params);
  321. // $resp = $provider->notify($params);
  322. }
  323. public function testGuochuang()
  324. {
  325. $provider = $this->getProvider('guochuang');
  326. $resp = $provider->balance();
  327. }
  328. public function testGuochuang_nation()
  329. {
  330. $provider = $this->getProvider('guochuang_nation');
  331. $resp = $provider->balance();
  332. }
  333. public function testShuoruan()
  334. {
  335. $provider = $this->getProvider('shuoruan');
  336. $resp = $provider->balance();
  337. }
  338. public function testYunlingfs()
  339. {
  340. $provider = $this->getProvider('yunlingfs');
  341. $resp = $provider->balance();
  342. }
  343. public function testYunchonggong()
  344. {
  345. $provider = $this->getProvider('yunchonggong');
  346. $resp = $provider->balance();
  347. }
  348. public function testYunchonggongfs()
  349. {
  350. $provider = $this->getProvider('yunchonggongfs');
  351. $resp = $provider->balance();
  352. }
  353. public function testJianjiao()
  354. {
  355. $provider = $this->getProvider('jianjiao');
  356. $resp = $provider->balance();
  357. }
  358. public function testFeimingyunew()
  359. {
  360. $provider = $this->getProvider('feimingyunew');
  361. $resp = $provider->balance();
  362. }
  363. public function testNingying()
  364. {
  365. $provider = $this->getProvider('ningying');
  366. $resp = $provider->balance();
  367. }
  368. public function testNingying_normal()
  369. {
  370. $provider = $this->getProvider('ningying_normal');
  371. $resp = $provider->balance();
  372. }
  373. public function testXingzy_normal()
  374. {
  375. $provider = $this->getProvider('xingzy_normal');
  376. $resp = $provider->balance();
  377. }
  378. public function testDashang_normal()
  379. {
  380. $provider = $this->getProvider('dashang_normal');
  381. $resp = $provider->balance();
  382. }
  383. public function testYunsuoyao()
  384. {
  385. $provider = $this->getProvider('yunsuoyao');
  386. $resp = $provider->balance();
  387. }
  388. public function testYunsuoyaofs()
  389. {
  390. $provider = $this->getProvider('yunsuoyaofs');
  391. $resp = $provider->balance();
  392. }
  393. public function testTianchen()
  394. {
  395. $provider = $this->getProvider('tianchen');
  396. $resp = $provider->balance();
  397. }
  398. public function testTianchen_fs()
  399. {
  400. $provider = $this->getProvider('tianchen_fs');
  401. $resp = $provider->balance();
  402. }
  403. public function testZhongst()
  404. {
  405. $provider = $this->getProvider('zhongst');
  406. $resp = $provider->balance();
  407. }
  408. public function testDonye()
  409. {
  410. $provider = $this->getProvider('dongye');
  411. $resp = $provider->balance();
  412. }
  413. public function testDonyefs()
  414. {
  415. $provider = $this->getProvider('dongyefs');
  416. $resp = $provider->balance();
  417. }
  418. public function testYinghuochong()
  419. {
  420. $provider = $this->getProvider('yinghuochong');
  421. $resp = $provider->balance();
  422. }
  423. public function testMiaoxt()
  424. {
  425. $provider = $this->getProvider('miaoxt');
  426. $resp = $provider->balance();
  427. }
  428. public function testMiaoxt_fs()
  429. {
  430. $provider = $this->getProvider('miaoxt_fs');
  431. $resp = $provider->balance();
  432. }
  433. public function testYiqian()
  434. {
  435. $provider = $this->getProvider('yiqian');
  436. $resp = $provider->balance();
  437. }
  438. public function testWenye()
  439. {
  440. // $provider = $this->getProvider('wenye');
  441. // $resp = $provider->balance();
  442. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  443. // $resp = $provider->query(['order_sn' => '75831649382357605928']);
  444. $body = '{"orderNo":"F2204080946116661055","status":"019","consumerNo":"75831649382357605928","voucherNo":null,"mobile":"18500608333"}';
  445. $params = json_decode($body, true);
  446. $provider = $this->getProvider('wenye', 'RefillCallBack');
  447. $ret = $provider->verify($params);
  448. $data = $provider->notify($params);
  449. }
  450. public function testJinfeng()
  451. {
  452. // $provider = $this->getProvider('jinfeng');
  453. // $resp = $provider->balance();
  454. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  455. // $resp = $provider->query(['order_sn' => '63601649383025688678']);
  456. $body = '{"orderNo":"F2204080957259120259","status":"003","consumerNo":"63601649383025688678","voucherNo":"","mobile":"18500608333"}';
  457. $params = json_decode($body, true);
  458. $provider = $this->getProvider('jinfeng', 'RefillCallBack');
  459. $ret = $provider->verify($params);
  460. $data = $provider->notify($params);
  461. }
  462. public function testQianqian()
  463. {
  464. // $provider = $this->getProvider('qianqian');
  465. // $resp = $provider->balance();
  466. // $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
  467. // $resp = $provider->query(['order_sn' => '32311649385385944534']);
  468. $body = '{"orderNo":"F2204081036326692716","status":"019","consumerNo":"32311649385385944534","voucherNo":null,"mobile":"18500608333"}';
  469. $params = json_decode($body, true);
  470. $provider = $this->getProvider('qianqian', 'RefillCallBack');
  471. $ret = $provider->verify($params);
  472. $data = $provider->notify($params);
  473. }
  474. }