SettleAccountCommissionsTest.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. class SettleAccountCommissionsTest extends TestCase
  4. {
  5. public function testCreate()
  6. {
  7. $obj = new \AdaPaySdk\SettleAccountCommissions();
  8. $adaPay = new AdaPay\AdaPay();
  9. $adaPay->gateWayType = 'api';
  10. $obj_params = array(
  11. 'payment_id'=> '002112021012814392510200754865217691648',
  12. 'order_no'=> "CMS_". date("YmdHis").rand(100000, 999999),
  13. 'trans_amt'=> '0.10'
  14. );
  15. $obj->create($obj_params);
  16. print("创建分账账户".$obj->isError().'=>'.json_encode($obj->result)."\n");
  17. $this->assertEquals('succeeded', $obj->result['status']);
  18. }
  19. public function testQueryList()
  20. {
  21. $obj = new \AdaPaySdk\SettleAccountCommissions();
  22. $adaPay = new AdaPay\AdaPay();
  23. $adaPay->gateWayType = 'api';
  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. }