|
@@ -17,7 +17,7 @@ require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
|
|
|
const LocalTest = 1;
|
|
|
const NetTest = 2;
|
|
|
|
|
|
-const CurrentTest = LocalTest;
|
|
|
+const CurrentTest = NetTest;
|
|
|
|
|
|
class TestRefill extends TestCase
|
|
|
{
|
|
@@ -54,9 +54,12 @@ class TestRefill extends TestCase
|
|
|
public function testBJBAddPhone()
|
|
|
{
|
|
|
$providers = new refill\bjb\RefillPhone([]);
|
|
|
- for ($i = 15; $i > 0; --$i)
|
|
|
- {
|
|
|
- $resp = $providers->add(18500608333,4,30,['order_sn' => $this->make_sn()]);
|
|
|
+ for ($i = 3; $i > 0; --$i) {
|
|
|
+ $resp = $providers->add(13911129867,4,10,['order_sn' => $this->make_sn()]);
|
|
|
+ $resp = $providers->add(18500608333,4,10,['order_sn' => $this->make_sn()]);
|
|
|
+ $resp = $providers->add(18510683168,4,10,['order_sn' => $this->make_sn()]);
|
|
|
+ $resp = $providers->add(18513846008,4,10,['order_sn' => $this->make_sn()]);
|
|
|
+ $resp = $providers->add(18518237398,4,10,['order_sn' => $this->make_sn()]);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -165,17 +168,28 @@ class TestRefill extends TestCase
|
|
|
|
|
|
public function testAddPhoe()
|
|
|
{
|
|
|
- $url = $this->mReqHost . "/mobile/index.php";
|
|
|
- $params = ['mchid' => 1,
|
|
|
- 'cardno' => '15120035568',
|
|
|
- 'amount' => "50",
|
|
|
- "act"=>"refill",
|
|
|
- "op"=>"add",
|
|
|
- 'order_sn' => "13281475",
|
|
|
- 'notifyurl'=> $this->mReqHost . "/mobile/beixt_notify.php"];
|
|
|
+ $phones = [13911129867,
|
|
|
+ 18500608333,
|
|
|
+ 18510683168,
|
|
|
+ 18513846008,
|
|
|
+ 18518237398];
|
|
|
|
|
|
- $resp = $this->send_md5($url,$params);
|
|
|
- Log::record($resp,Log::DEBUG);
|
|
|
+ for ($i = 0; $i < 3; $i++)
|
|
|
+ {
|
|
|
+ foreach ($phones as $phone) {
|
|
|
+ $url = $this->mReqHost . "/mobile/index.php";
|
|
|
+ $params = ['mchid' => 1,
|
|
|
+ 'cardno' => '15120035568',
|
|
|
+ 'amount' => "50",
|
|
|
+ "act"=>"refill",
|
|
|
+ "op"=>"add",
|
|
|
+ 'order_sn' => "13281475",
|
|
|
+ 'notifyurl'=> $this->mReqHost . "/mobile/beixt_notify.php"];
|
|
|
+
|
|
|
+ $resp = $this->send_md5($url,$params);
|
|
|
+ Log::record($resp,Log::DEBUG);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public function testGoods()
|