SettleAccountTransferTest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. class SettleAccountTestTransferTest extends TestCase
  4. {
  5. public function testCreate()
  6. {
  7. $adaPay = new AdaPay\AdaPay();
  8. $adaPay->gateWayType = 'api';
  9. $obj = new \AdaPaySdk\SettleAccountTransfer();
  10. $obj_params = array(
  11. 'app_id'=> 'app_7d87c043-aae3-4357-9b2c-269349a980d6',
  12. 'order_no'=> "TF_". date("YmdHis").rand(100000, 999999),
  13. 'trans_amt'=> '0.10',
  14. 'out_member_id'=> '0',
  15. 'in_member_id' => 'user_000031'
  16. );
  17. $obj->create($obj_params);
  18. print("创建结算交易账户".$obj->isError().'=>'.json_encode($obj->result)."\n");
  19. $this->assertEquals('succeeded', $obj->result['status']);
  20. }
  21. public function testQueryList()
  22. {
  23. $adaPay = new AdaPay\AdaPay();
  24. $adaPay->gateWayType = 'api';
  25. $obj = new \AdaPaySdk\SettleAccountTransfer();
  26. $obj_params = array(
  27. 'app_id'=> 'app_7d87c043-aae3-4357-9b2c-269349a980d6',
  28. 'order_no'=> '',
  29. 'status'=> '',
  30. 'page_index'=> '1',
  31. 'page_size'=> '10',
  32. 'created_gte'=> '',
  33. 'created_lte'=> ''
  34. );
  35. $obj->queryList($obj_params);
  36. print("查询结算交易账户".$obj->isError().'=>'.json_encode($obj->result)."\n");
  37. $this->assertEquals('succeeded', $obj->result['status']);
  38. // $this->assertTrue($account->isError());
  39. }
  40. }