Files
wechatWeb/api/controller_admin/biz_payment.js
张成 aa8eaa6ccd init
2026-03-24 16:07:02 +08:00

25 lines
677 B
JavaScript

const logic = require("../service/biz_subscription_logic");
function getRequestBody(ctx) {
if (ctx.request && ctx.request.body && Object.keys(ctx.request.body).length > 0) {
return ctx.request.body;
}
if (typeof ctx.getBody === "function") {
return ctx.getBody() || {};
}
return {};
}
module.exports = {
"POST /biz_payment/confirm-offline": async (ctx) => {
const body = getRequestBody(ctx);
const row = await logic.confirmOfflinePayment(body);
ctx.success(row);
},
"POST /biz_payment/confirm-link": async (ctx) => {
const body = getRequestBody(ctx);
const row = await logic.confirmLinkPayment(body);
ctx.success(row);
},
};