SettleAccountTransferTest.php 1.4 KB

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