TestController.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Http\Controllers\Api\v1;
  3. use App\Http\Controllers\Api\webApp;
  4. use App\Services\Api\MemberService;
  5. use App\Services\Api\MessageService;
  6. use App\Services\DyrPayService;
  7. use App\Services\Kd100Service;
  8. use App\Services\MapService;
  9. use App\Services\MpService;
  10. use App\Services\RedisService;
  11. /**
  12. * 测试
  13. * Class TestController
  14. * @package App\Http\Controllers\Api
  15. */
  16. class TestController extends webApp
  17. {
  18. public function check()
  19. {
  20. // $result = Kd100Service::make()->query('YT8824762286422','17877188025','yuantong');
  21. $productId = '1105';
  22. $amount = 50;
  23. $orderNo = get_order_num('PR');
  24. $result = DyrPayService::make()->recharge($orderNo, '17877188025', $productId, $amount);
  25. dump(DyrPayService::make()->getError());
  26. dump($result);
  27. //array:3 [▼
  28. // "errno" => 0
  29. // "errmsg" => "提交成功"
  30. // "data" => array:9 [▼
  31. // "id" => 505535
  32. // "order_number" => "QWE251227505535"
  33. // "mobile" => "17877188025"
  34. // "product_id" => 1105
  35. // "total_price" => "47.00"
  36. // "create_time" => 1766804483
  37. // "guishu" => "广西南宁"
  38. // "title" => "苹果快充三网50话费快充"
  39. // "out_trade_num" => "PR25122711012274882"
  40. // ]
  41. //]
  42. return showJson('操作成功', true, $result);
  43. }
  44. }