12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- use PHPUnit\Framework\TestCase;
- define('APP_ID', 'test');
- define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/global.php');
- require_once(BASE_CORE_PATH . '/lrlz.php');
- require_once(BASE_ROOT_PATH . '/fooder.php');
- require_once(BASE_CORE_PATH . '/framework/function/http.php');
- require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
- require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
- class TestThirdRefill extends TestCase
- {
- public static function setUpBeforeClass() : void
- {
- Base::run_util();
- }
- public function testProviderPrice()
- {
- $thrid_refill = Model('thrid_refill');
- $product = $thrid_refill->getProviderProduct(34,1000,'LZPLM100591');
- }
- public function testMerchantPrice()
- {
- $thrid_refill = Model('thrid_refill');
- $price = $thrid_refill->getMerchantPrice(1,'LZ100465');
- }
- public function testSctongqian()
- {
- // $provider = new refill\sctongqian\RefillPhone([]);
- // $resp = $providers->CardOrderAdd(18500608333, 5, 50, ['order_sn' => $this->make_sn(), 'product_code' => 'PLM100024']);
- // $resp = $providers->query(['order_sn' => '84471620782999495754']);
- $data = '{"AppKey":"211394658","TimesTamp":"1620811809019","MOrderID":"84471620782999495754","OrderID":"210512093007747001","State":"2","ChargeAccount":"","Version":"1.0","BuyCount":"1","Attach":"","CardInfo":"HaDGHP8EECrqLl+Jlo1vqGP4Uws4dm9fd1msGnY3FBAPOQuvXcK9bd7Ffg5NKpkXLPH46\/dPGxM\/XR7UOXb4znxs9+7JOlCbw+AqdDJ2cxkzc\/euqHpc8VszvoUD6JpE1bgCaL0DdfCpcYhSzFOND7MnN+WIl+P\/jOn0j8k9I4Lfa2\/Y3\/V3TjKfc4CSnNTU0m+g8cGQ6AGJfSkNDbEg+RlcqW98nLWl\/+YO2wEnkzaMX2B966tjwuPIdsGZHntBXaIIJNwnQ4YWPlx8Hx6ms8s7QPYs8FuFDjdiJzlDEdjJyfyRIzsvY0LZYSZ9WWo8yqMtpulTzLrhVVjvxW7Upg==","Sign":"EEE6F112A14B38EF2BCA6BE37F030266"}';
- $params = json_decode($data, true);
- refill\RefillFactory::instance()->notify('sctongqian', $params);
- }
- }
|