29 lines
529 B
PHP
29 lines
529 B
PHP
<?php
|
|
|
|
require 'classes/OrderCtrl.php';
|
|
|
|
use classes;
|
|
|
|
class UnitTestController {
|
|
|
|
public function __construct()
|
|
{
|
|
if (SERVER_ENV == _ONLINE) {
|
|
die("can't create UnitTestController");
|
|
return;
|
|
}
|
|
}
|
|
|
|
public function genOrderId()
|
|
{
|
|
$order_ctrl = new classes\OrderCtrl();
|
|
echo json_encode(array(
|
|
'errcode' => 0,
|
|
'errmsg' => '',
|
|
'orderid' => $order_ctrl->genOrder($_REQUEST['account_id']
|
|
))
|
|
);
|
|
}
|
|
|
|
}
|