|
@@ -109,22 +109,23 @@ class TestRefill extends TestCase
|
|
|
$provider->notify($content);
|
|
|
}
|
|
|
|
|
|
- public function testWensanhuo()
|
|
|
+ public function testWeisanhuo()
|
|
|
{
|
|
|
$provider = $this->getProvider('weisanhuo_normal');
|
|
|
$order_sn = $this->make_sn();
|
|
|
- //$resp = $provider->add(18855414101, 4, 30, ['order_sn' => $order_sn, 'regin_no' => 1]);//30为测试产品
|
|
|
- //$resp = $provider->query(['order_sn' => $order_sn]);
|
|
|
+ $resp = $provider->add(13911220681, 4, 1, ['order_sn' => $order_sn, 'regin_no' => 1]);//30为测试产品
|
|
|
+ $resp = $provider->query(['order_sn' => $order_sn]);
|
|
|
$resp = $provider->balance();
|
|
|
}
|
|
|
|
|
|
- public function testWensanhuoCB()
|
|
|
+ public function testWeisanhuoCB()
|
|
|
{
|
|
|
- $_POST='{"orderId":"S23112800025098","outOrderId":"60201701159853851187","requestDate":"20231128164156","sign":"E172D40D040D26C8226E237ACED8C861","accessToken":"beaf87f8-7c6b-cb8a-98b8-53c207ca9aef","status":"1"}';
|
|
|
- $content = json_decode($_POST,true);
|
|
|
- $provider = $this->getProvider('lifang_normal','RefillCallBack');
|
|
|
- $provider->verify($content);
|
|
|
- $provider->notify($content);
|
|
|
+ $post = '{"operatorTradeNo":"202312198256229371","statusDesc":"交易成功","phone":"13911220681","outTradeNo":"91791702973663689415","sign":"c81575ceb8d2b28cd37e33c65141361c","inTradeNo":"20231219161425561173378018037","status":"success","reportTime":"1702974060008"}';
|
|
|
+ $data = json_decode($post, true);
|
|
|
+ $provider = $this->getProvider('weisanhuo_normal', 'RefillCallBack');
|
|
|
+
|
|
|
+ $ret = $provider->verify($data);
|
|
|
+ $resp = $provider->notify($data);
|
|
|
}
|
|
|
|
|
|
public function testJson()
|
|
@@ -166,18 +167,4 @@ class TestRefill extends TestCase
|
|
|
$microtime = intval(microtime(true) * 1000);
|
|
|
}
|
|
|
|
|
|
- public function testweisanhuo()
|
|
|
- {
|
|
|
- $provider = $this->getProvider('weisanhuo');
|
|
|
-// $resp = $provider->balance();
|
|
|
-// $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
|
|
|
- $resp = $provider->query(['order_sn' => '24271700815859899563-9']);
|
|
|
-
|
|
|
- $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
|
|
|
- $data = json_decode($post, true);
|
|
|
- $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
|
|
|
-
|
|
|
- $ret = $provider->verify($data);
|
|
|
-// $resp = $provider->notify($data);
|
|
|
- }
|
|
|
}
|