1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\api\controller\tests;
- use AdaPay;
- use AdaPaySdk;
- use PHPUnit\Framework\TestCase;
- class AccountTest extends TestCase
- {
-
-
-
-
- public function testPayment()
- {
-
- $adaPay = new AdaPay\AdaPay();
- $adaPay->gateWayType = 'page';
- $obj = new AdaPaySdk\Account();
- $account_params = array(
-
- 'app_id' => 'app_7d87c043-aae3-4357-9b2c-269349a980d6',
-
- 'order_no' => "WL_" . date("YmdHis") . rand(100000, 999999),
-
- 'pay_amt' => '0.10',
-
- 'currency' => 'cny',
-
- 'goods_title' => '12314',
-
- 'goods_desc' => '123122123',
- );
- $obj->payment($account_params);
-
- print($obj->isError() . '=>' . json_encode($obj->result));
- $this->assertEquals('succeeded', $obj->result['status']);
-
- }
- }
|