3.8.1
This commit is contained in:
94
tests/mall/Domain/Config_Test.php
Normal file
94
tests/mall/Domain/Config_Test.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* PhalApi_Mall\Domain\Config_Test
|
||||
*
|
||||
* 针对 ../src/mall/Domain/Config.php Mall\Domain\Config 类的PHPUnit单元测试
|
||||
*
|
||||
* @author: dogstar 20200925
|
||||
*/
|
||||
|
||||
namespace tests\Mall\Domain;
|
||||
use Mall\Domain\Config;
|
||||
|
||||
class PhpUnderControl_MallDomainConfig_Test extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public $mallDomainConfig;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->mallDomainConfig = new \Mall\Domain\Config();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
// 输出本次单元测试所执行的SQL语句
|
||||
// var_dump(\PhalApi\DI()->tracer->getSqls());
|
||||
|
||||
// 输出本次单元测试所涉及的追踪埋点
|
||||
// var_dump(\PhalApi\DI()->tracer->getStack());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group testGetPayList
|
||||
*/
|
||||
public function testGetPayList()
|
||||
{
|
||||
$checkSwitch = true;
|
||||
|
||||
$rs = $this->mallDomainConfig->getPayList($checkSwitch);
|
||||
|
||||
$this->assertTrue(is_array($rs));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetDefaultPayType
|
||||
*/
|
||||
public function testGetDefaultPayType()
|
||||
{
|
||||
$rs = $this->mallDomainConfig->getDefaultPayType();
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetPayConfigDetail
|
||||
*/
|
||||
public function testGetPayConfigDetail()
|
||||
{
|
||||
$pay_type = 'cash';
|
||||
|
||||
$rs = $this->mallDomainConfig->getPayConfigDetail($pay_type);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetPayConfig
|
||||
*/
|
||||
public function testGetPayConfig()
|
||||
{
|
||||
$rs = $this->mallDomainConfig->getPayConfig();
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testUpdatePayConfig
|
||||
*/
|
||||
public function testUpdatePayConfig()
|
||||
{
|
||||
$config = array('cash' => array('switch' => 0));
|
||||
|
||||
$rs = $this->mallDomainConfig->updatePayConfig($config);
|
||||
|
||||
$rs = $this->mallDomainConfig->getPayConfig();
|
||||
// var_dump($rs);
|
||||
|
||||
$this->assertEquals(0, $rs['cash']['switch']);
|
||||
$this->assertEquals(1, $rs['alipay']['switch']);
|
||||
}
|
||||
|
||||
}
|
||||
210
tests/mall/Domain/Flow_Test.php
Normal file
210
tests/mall/Domain/Flow_Test.php
Normal file
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
/**
|
||||
* PhalApi_Mall\Domain\Flow_Test
|
||||
*
|
||||
* 针对 ../src/mall/Domain/Flow.php Mall\Domain\Flow 类的PHPUnit单元测试
|
||||
*
|
||||
* @author: dogstar 20200915
|
||||
*/
|
||||
|
||||
namespace tests\Mall\Domain;
|
||||
use Mall\Domain\Flow;
|
||||
|
||||
class PhpUnderControl_MallDomainFlow_Test extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public $mallDomainFlow;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->mallDomainFlow = new \Mall\Domain\Flow();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
// 输出本次单元测试所执行的SQL语句
|
||||
// var_dump(\PhalApi\DI()->tracer->getSqls());
|
||||
|
||||
// 输出本次单元测试所涉及的追踪埋点
|
||||
// var_dump(\PhalApi\DI()->tracer->getStack());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group testAddNewFlow
|
||||
*/
|
||||
public function testAddNewFlow()
|
||||
{
|
||||
$flow = array(
|
||||
'username' => 'rights_user',
|
||||
'product_key' => 'App.Config.GetConfig',
|
||||
'product_name' => 'test',
|
||||
'total_amount' => 10,
|
||||
'expire_time' => time() + 86400,
|
||||
);
|
||||
|
||||
$rs = $this->mallDomainFlow->addNewFlow($flow);
|
||||
}
|
||||
|
||||
public function testAddNewFlowExpireOut()
|
||||
{
|
||||
$flow = array(
|
||||
'username' => 'rights_user',
|
||||
'product_key' => 'App.Config.GetConfig',
|
||||
'product_name' => 'test',
|
||||
'total_amount' => 10,
|
||||
'expire_time' => time() - 86400, // 注意这里
|
||||
);
|
||||
|
||||
$rs = $this->mallDomainFlow->addNewFlow($flow);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testUpdateFlow
|
||||
*/
|
||||
public function testUpdateFlow()
|
||||
{
|
||||
$id = 1;
|
||||
$flow = array('total_amount' => 200);
|
||||
|
||||
$rs = $this->mallDomainFlow->updateFlow($id, $flow);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetFlow
|
||||
*/
|
||||
public function testGetFlow()
|
||||
{
|
||||
$id = 1;
|
||||
|
||||
$rs = $this->mallDomainFlow->getFlow($id);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
$this->assertEquals(200, $rs['total_amount']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testDeleteFlow
|
||||
*/
|
||||
public function testDeleteFlow()
|
||||
{
|
||||
$id = 404;
|
||||
|
||||
$rs = $this->mallDomainFlow->deleteFlow($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetFlowList
|
||||
*/
|
||||
public function testGetFlowList()
|
||||
{
|
||||
$page = 1;
|
||||
$perpage = 2;
|
||||
|
||||
$rs = $this->mallDomainFlow->getFlowList($page, $perpage);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetFlowStatusList
|
||||
*/
|
||||
public function testGetFlowStatusList()
|
||||
{
|
||||
$isMap = true;
|
||||
|
||||
$rs = $this->mallDomainFlow->getFlowStatusList($isMap);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testCutdown
|
||||
* 什么套餐都没有时,不需要扣费
|
||||
*/
|
||||
public function testCutdown()
|
||||
{
|
||||
$service = 'App.Config.GetConfig';
|
||||
$appKey = 'test_flow';
|
||||
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
|
||||
$this->assertEquals(0, $rs);
|
||||
}
|
||||
|
||||
// 有付费套餐时,扣费失败
|
||||
public function testCutdownFail()
|
||||
{
|
||||
$sql = "insert into `pp_mall_product` ( `id`, `add_time`, `product_type`, `product_name`, `product_key_lower`, `amount`, `expire_time_desc`, `price`, `product_key`, `product_desc`, `original_price`, `product_status`, `expire_time`) values ( '6', '2020-09-15 10:42:19', 'api_buy', '配置接口流量套餐', 'app.config.getconfig', '220', '', '2.00', 'App.Config.GetConfig', null, '0.00', '1', '2020');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$service = 'App.Config.GetConfig';
|
||||
$appKey = 'test_flow';
|
||||
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
|
||||
$this->assertEquals(-1, $rs);
|
||||
}
|
||||
|
||||
// 有付费套餐时,增加了免费套餐,因此通过
|
||||
public function testCutdownFree()
|
||||
{
|
||||
$sql = "insert into `pp_mall_product` ( `id`, `add_time`, `product_type`, `product_name`, `product_key_lower`, `amount`, `expire_time_desc`, `price`, `product_key`, `product_desc`, `original_price`, `product_status`, `expire_time`) values ( '7', '2020-09-15 10:42:24', 'api_free', '配置接口流量套餐', 'app.config.getconfig', '2', '', '0.00', 'App.Config.GetConfig', null, '0.00', '1', '2020');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$service = 'App.Config.GetConfig';
|
||||
$appKey = 'test_flow';
|
||||
|
||||
// 准备一个新的app
|
||||
$domain = new \Base\Domain\Apps();
|
||||
$domain->addApp('测试流量', $appKey, '123', 0, 10, '', 1);
|
||||
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertGreaterThan(0, $rs);
|
||||
|
||||
// 第2次免费
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertGreaterThan(0, $rs);
|
||||
|
||||
// 失败了
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertEquals(-1, $rs);
|
||||
}
|
||||
|
||||
public function testCutdownBuy()
|
||||
{
|
||||
// 添加流量
|
||||
$flow = array(
|
||||
'username' => 'test_dev',
|
||||
'product_key' => 'App.Config.GetConfig',
|
||||
'product_name' => 'test_flow',
|
||||
'total_amount' => 3,
|
||||
'expire_time' => time() + 86400,
|
||||
);
|
||||
|
||||
$rs = $this->mallDomainFlow->addNewFlow($flow);
|
||||
|
||||
$service = 'App.Config.GetConfig';
|
||||
$appKey = 'test_flow';
|
||||
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertGreaterThan(0, $rs);
|
||||
|
||||
$rs3 = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertGreaterThan(0, $rs3);
|
||||
|
||||
$flow3 = $this->mallDomainFlow->getFlow($rs3);
|
||||
$this->assertEquals(\Mall\Model\Mall\Flow::FLOW_STATUS_USING, $flow3['flow_status']);
|
||||
|
||||
$rs4 = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertGreaterThan(0, $rs4);
|
||||
|
||||
$flow4 = $this->mallDomainFlow->getFlow($rs4);
|
||||
$this->assertEquals(\Mall\Model\Mall\Flow::FLOW_STATUS_OUT, $flow4['flow_status']);
|
||||
|
||||
// 第4次,用光
|
||||
$rs = $this->mallDomainFlow->cutdown($service, $appKey);
|
||||
$this->assertEquals(-1, $rs);
|
||||
}
|
||||
}
|
||||
187
tests/mall/Domain/Order_Test.php
Normal file
187
tests/mall/Domain/Order_Test.php
Normal file
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/**
|
||||
* PhalApi_Mall\Domain\Order_Test
|
||||
*
|
||||
* 针对 ../src/mall/Domain/Order.php Mall\Domain\Order 类的PHPUnit单元测试
|
||||
*
|
||||
* @author: dogstar 20200924
|
||||
*/
|
||||
|
||||
namespace tests\Mall\Domain;
|
||||
use Mall\Domain\Order;
|
||||
|
||||
class PhpUnderControl_MallDomainOrder_Test extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public $mallDomainOrder;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->mallDomainOrder = new \Mall\Domain\Order();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
// 输出本次单元测试所执行的SQL语句
|
||||
// var_dump(\PhalApi\DI()->tracer->getSqls());
|
||||
|
||||
// 输出本次单元测试所涉及的追踪埋点
|
||||
// var_dump(\PhalApi\DI()->tracer->getStack());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group testGetOrderInfo
|
||||
*/
|
||||
public function testGetOrderInfo()
|
||||
{
|
||||
$sql = "insert into `pp_mall_order` ( `is_deliver`, `username`, `pay_time`, `product_type`, `product_key`, `member_id`, `order_status`, `pay_type`, `third_payment_id`, `product_expire_time`, `order_id`, `id`, `product_id`, `add_time`, `num`, `product_expire_time_desc`, `note`, `product_amount`, `price`, `order_name`) values ( '0', 'admin', '2020-09-21 21:58:55', 'api_buy', 'App.BarCode.Gen', '1', '0', 'cash', '', '86400', '2020098816064072753', '140', '4', '2020-09-15 16:06:40', '4', '1个月', 'test', '9', '2.00', '条形码流量套餐');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$order_id = '2020098816064072753';
|
||||
|
||||
$rs = $this->mallDomainOrder->getOrderInfo($order_id);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testCheckOrderPay
|
||||
*/
|
||||
public function testCheckOrderPay()
|
||||
{
|
||||
$order_id = '2020098816064072753';
|
||||
|
||||
$rs = $this->mallDomainOrder->checkOrderPay($order_id);
|
||||
|
||||
$this->assertFalse($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testCreateOrder
|
||||
*/
|
||||
public function testCreateOrder()
|
||||
{
|
||||
$sql = "insert into `pp_mall_product` ( `id`, `add_time`, `product_type`, `product_name`, `product_key_lower`, `amount`, `expire_time_desc`, `price`, `product_key`, `product_desc`, `original_price`, `product_status`, `expire_time`) values ( '600', '2020-09-15 10:42:19', 'api_buy', '配置接口流量套餐', 'app.config.getconfig', '220', '', '2.00', 'App.Config.GetConfig', null, '0.00', '1', '2020');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$product_id = '600';
|
||||
$num = '2';
|
||||
$note = 'testtest';
|
||||
|
||||
$rs = $this->mallDomainOrder->createOrder($product_id, $num, $note);
|
||||
|
||||
$this->assertGreaterThan(0, $rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testUpdatePayType
|
||||
*/
|
||||
public function testUpdatePayType()
|
||||
{
|
||||
$sql = "insert into `pp_mall_order` ( `is_deliver`, `username`, `pay_time`, `product_type`, `product_key`, `member_id`, `order_status`, `pay_type`, `third_payment_id`, `product_expire_time`, `order_id`, `id`, `product_id`, `add_time`, `num`, `product_expire_time_desc`, `note`, `product_amount`, `price`, `order_name`) values ( '0', 'admin', '2020-09-21 21:58:55', 'api_buy', 'App.BarCode.Gen', '1', '0', 'paypal', '', '86400', '2020091516064072153', '15', '4', '2020-09-15 16:06:40', '4', '1个月', 'test', '9', '2.00', '条形码流量套餐');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
$id = '15';
|
||||
$pay_type = 'cash';
|
||||
|
||||
$rs = $this->mallDomainOrder->updatePayType($id, $pay_type);
|
||||
|
||||
$this->assertEquals(1, $rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetMyOrderList
|
||||
*/
|
||||
public function testGetMyOrderList()
|
||||
{
|
||||
$page = '1';
|
||||
$perpage = '2';
|
||||
$uid = 1;
|
||||
|
||||
$rs = $this->mallDomainOrder->getMyOrderList($page, $perpage, $uid);
|
||||
|
||||
$this->assertNotEmpty($rs['items']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testUpdateOrder
|
||||
*/
|
||||
public function testUpdateOrder()
|
||||
{
|
||||
$sql = "insert into `pp_mall_order` ( `is_deliver`, `username`, `pay_time`, `product_type`, `product_key`, `member_id`, `order_status`, `pay_type`, `third_payment_id`, `product_expire_time`, `order_id`, `id`, `product_id`, `add_time`, `num`, `product_expire_time_desc`, `note`, `product_amount`, `price`, `order_name`) values ( '0', 'admin', '2020-09-21 21:58:55', 'api_buy', 'App.BarCode.Gen', '1', '0', 'paypal', '', '86400', '2020091516064072888', '1600', '4', '2020-09-15 16:06:40', '4', '1个月', 'test', '9', '2.00', '条形码流量套餐');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$id = '1600';
|
||||
$order = array('order_status' => 10);
|
||||
$op = '';
|
||||
|
||||
$rs = $this->mallDomainOrder->updateOrder($id, $order, $op);
|
||||
|
||||
// 工人审核,发流量
|
||||
$order = array('order_status' => 20);
|
||||
$op = 'send';
|
||||
|
||||
$rs = $this->mallDomainOrder->updateOrder($id, $order, $op);
|
||||
|
||||
$count = \PhalApi\DI()->notorm->mall_flow->where('order_id', '2020091516064072888')->where('flow_status', 10)->count();
|
||||
$this->assertGreaterThan(0, $count);
|
||||
|
||||
// 退款,回收流量
|
||||
$order = array('order_status' => 30);
|
||||
$op = 'back';
|
||||
|
||||
$rs = $this->mallDomainOrder->updateOrder($id, $order, $op);
|
||||
|
||||
$count = \PhalApi\DI()->notorm->mall_flow->where('order_id', '2020091516064072888')->where('flow_status', 0)->count();
|
||||
$this->assertGreaterThan(0, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetOrder
|
||||
*/
|
||||
public function testGetOrder()
|
||||
{
|
||||
$id = '140';
|
||||
|
||||
$rs = $this->mallDomainOrder->getOrder($id);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testDeleteOrder
|
||||
*/
|
||||
public function testDeleteOrder()
|
||||
{
|
||||
$id = '400';
|
||||
|
||||
$rs = $this->mallDomainOrder->deleteOrder($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetOrderList
|
||||
*/
|
||||
public function testGetOrderList()
|
||||
{
|
||||
$page = '1';
|
||||
$perpage = '10';
|
||||
|
||||
$rs = $this->mallDomainOrder->getOrderList($page, $perpage);
|
||||
|
||||
$this->assertNotEmpty($rs['items']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testGetOrderStatusList
|
||||
*/
|
||||
public function testGetOrderStatusList()
|
||||
{
|
||||
$isMap = true;
|
||||
|
||||
$rs = $this->mallDomainOrder->getOrderStatusList($isMap);
|
||||
|
||||
$this->assertNotEmpty($rs);
|
||||
}
|
||||
|
||||
}
|
||||
90
tests/mall/Domain/Pay_Test.php
Normal file
90
tests/mall/Domain/Pay_Test.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* PhalApi_Mall\Domain\Pay_Test
|
||||
*
|
||||
* 针对 ../src/mall/Domain/Pay.php Mall\Domain\Pay 类的PHPUnit单元测试
|
||||
*
|
||||
* @author: dogstar 20200924
|
||||
*/
|
||||
|
||||
namespace tests\Mall\Domain;
|
||||
use Mall\Domain\Pay;
|
||||
|
||||
class PhpUnderControl_MallDomainPay_Test extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public $mallDomainPay;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->mallDomainPay = new \Mall\Domain\Pay();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
// 输出本次单元测试所执行的SQL语句
|
||||
// var_dump(\PhalApi\DI()->tracer->getSqls());
|
||||
|
||||
// 输出本次单元测试所涉及的追踪埋点
|
||||
// var_dump(\PhalApi\DI()->tracer->getStack());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @group testStartPay
|
||||
*/
|
||||
public function testStartPay()
|
||||
{
|
||||
$sql = "insert into `pp_mall_order` ( `is_deliver`, `username`, `pay_time`, `product_type`, `product_key`, `member_id`, `order_status`, `pay_type`, `third_payment_id`, `product_expire_time`, `order_id`, `id`, `product_id`, `add_time`, `num`, `product_expire_time_desc`, `note`, `product_amount`, `price`, `order_name`) values ( '0', 'admin', '2020-09-21 21:58:55', 'api_buy', 'App.BarCode.Gen', '1', '0', 'cash', '', '86400', '2020091516064079999', '159', '4', '2020-09-15 16:06:40', '4', '1个月', 'test', '9', '2.00', '条形码流量套餐');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$order_id = '2020091516064079999';
|
||||
$pay_type = null;
|
||||
|
||||
$rs = $this->mallDomainPay->startPay($order_id, $pay_type);
|
||||
|
||||
$this->assertEquals('cash', $rs['pay_type']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testCheckPay
|
||||
*/
|
||||
public function testCheckPay()
|
||||
{
|
||||
$orderInfo = array('order_id' => '2020091516064079999', 'pay_type' => 'cash');;
|
||||
|
||||
$rs = $this->mallDomainPay->checkPay($orderInfo);
|
||||
|
||||
$this->assertFalse($rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group testAlipayNotify
|
||||
*/
|
||||
//public function testAlipayNotify()
|
||||
//{
|
||||
// $rs = $this->mallDomainPay->alipayNotify();
|
||||
//}
|
||||
|
||||
/**
|
||||
* @group testCapturePaypalOrder
|
||||
*/
|
||||
public function testCapturePaypalOrder()
|
||||
{
|
||||
$sql = "insert into `pp_mall_order` ( `is_deliver`, `username`, `pay_time`, `product_type`, `product_key`, `member_id`, `order_status`, `pay_type`, `third_payment_id`, `product_expire_time`, `order_id`, `id`, `product_id`, `add_time`, `num`, `product_expire_time_desc`, `note`, `product_amount`, `price`, `order_name`) values ( '1', 'admin', '2020-09-22 16:11:02', 'api_buy', 'App.BarCode.Gen', '1', '20', 'paypal', '2D387077TH8550000', '86400', '2020091516064072543', '4', '4', '2020-09-15 16:06:40', '4', '1个月', 'test', '9', '2.00', '条形码流量套餐');";
|
||||
\PhalApi\DI()->notorm->demo->executeSql($sql);
|
||||
|
||||
$orderInfo = \PhalApi\DI()->notorm->mall_order->where('order_id', '2D387077TH8550000')->fetchOne();
|
||||
|
||||
$rs = $this->mallDomainPay->checkPay($orderInfo);
|
||||
|
||||
$this->assertFalse($rs);
|
||||
|
||||
//$payConfig = '';
|
||||
//$orderInfo = '';
|
||||
|
||||
//$rs = $this->mallDomainPay->capturePaypalOrder($payConfig, $orderInfo);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user