购买软路由-支付
This commit is contained in:
@@ -62,6 +62,11 @@ class Order extends Controller
|
||||
{
|
||||
$data = json_decode(file_get_contents("php://input"),true)['data'];
|
||||
|
||||
if (empty($data['username']) || empty($data['phone']) || empty($data['address'])) {
|
||||
echo json_encode(['code' => -1]);
|
||||
die;
|
||||
}
|
||||
|
||||
$product_model = new ProductModel();
|
||||
|
||||
$product_info = $product_model->getOne(['id' => $data['product_id']]);
|
||||
@@ -113,6 +118,11 @@ class Order extends Controller
|
||||
public function wxpay() {
|
||||
$data = json_decode(file_get_contents("php://input"),true)['data'];
|
||||
|
||||
if (empty($data['username']) || empty($data['phone']) || empty($data['address'])) {
|
||||
echo json_encode(['code' => -1]);
|
||||
die;
|
||||
}
|
||||
|
||||
$product_model = new ProductModel();
|
||||
|
||||
$product_info = $product_model->getOne(['id' => $data['product_id']]);
|
||||
@@ -163,6 +173,11 @@ class Order extends Controller
|
||||
public function balancepay(){
|
||||
$data = json_decode(file_get_contents("php://input"),true)['data'];
|
||||
|
||||
if (empty($data['username']) || empty($data['phone']) || empty($data['address'])) {
|
||||
echo json_encode(['code' => -1]);
|
||||
die;
|
||||
}
|
||||
|
||||
$product_model = new ProductModel();
|
||||
|
||||
$product_info = $product_model->getOne(['id' => $data['product_id']]);
|
||||
|
||||
Reference in New Issue
Block a user