购买软路由-支付

This commit is contained in:
“wanyongkang”
2022-03-23 16:41:52 +08:00
parent 5661016d4f
commit 6c9c65671f

View File

@@ -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']]);