支付宝接口
This commit is contained in:
29
app/order/controller/Index.php
Normal file
29
app/order/controller/Index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace app\order\controller;
|
||||
|
||||
use app\order\model\CashOut as CashMoedl;
|
||||
use fastphp\base\Controller;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
//接收提现请求
|
||||
public function index()
|
||||
{
|
||||
$post = json_decode(file_get_contents("php://input"), true);
|
||||
$data = [];
|
||||
$data['userid'] = $this->userinfo['UserId'];
|
||||
$data['username'] = $this->userinfo['LoginName'];
|
||||
$data['money'] = $post['cash_out_money'];
|
||||
$data['apply_reason'] = $post['reason'];
|
||||
$data['alipay_account'] = $post['alipay_account'];
|
||||
$cash = new CashMoedl;
|
||||
$status = $cash->add($data);
|
||||
if ($status) {
|
||||
echo json_encode(['Code'=>10000,]);
|
||||
} else {
|
||||
echo json_encode(['Code'=>-10000,]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user