FufenTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Bear
  5. * Date: 2019/11/28
  6. * Time: 下午1:36
  7. */
  8. use app\main\service\FufenService;
  9. use app\common\library\Redis;
  10. use app\main\constants\CacheConstants;
  11. class FufenTest extends TestInit
  12. {
  13. public $user_id = 60063;
  14. public $channel_id = 1734;
  15. public function testId()
  16. {
  17. $cache = CacheConstants::getWxpayFunfen($this->user_id);
  18. Redis::instance()->sAdd($cache, 40);
  19. $id = FufenService::instance()->getWxpayId($this->user_id, $this->channel_id);
  20. var_dump($id);
  21. }
  22. public function testUrl()
  23. {
  24. $cache = CacheConstants::getWxpayFunfen($this->user_id);
  25. // Redis::instance()->del($cache);
  26. Redis::instance()->sAdd($cache, 40);
  27. $url = FufenService::instance()->getPayUrl($this->user_id, $this->channel_id)->data;
  28. var_dump($url);
  29. }
  30. public function testClearWxpay()
  31. {
  32. Redis::delScan('WXP:*');
  33. }
  34. public function testRedis()
  35. {
  36. $data = Redis::instance()->get(CacheConstants::getChannelWxpayIds(1734));
  37. var_dump($data);
  38. }
  39. }