32 lines
987 B
JavaScript
32 lines
987 B
JavaScript
const logic = require("../service/biz_subscription_logic");
|
|
const audit = require("../service/biz_audit_service");
|
|
|
|
|
|
|
|
module.exports = {
|
|
"POST /biz_payment/confirm-offline": async (ctx) => {
|
|
const body = ctx.getBody();
|
|
const row = await logic.confirmOfflinePayment(body);
|
|
await audit.logAudit({
|
|
admin_user_id: audit.pickAdminId(ctx),
|
|
action: "biz_payment.confirm_offline",
|
|
resource_type: "biz_subscription",
|
|
resource_id: body.subscription_id,
|
|
detail: { payment_ref: body.payment_ref },
|
|
});
|
|
ctx.success(row);
|
|
},
|
|
"POST /biz_payment/confirm-link": async (ctx) => {
|
|
const body = ctx.getBody();
|
|
const row = await logic.confirmLinkPayment(body);
|
|
await audit.logAudit({
|
|
admin_user_id: audit.pickAdminId(ctx),
|
|
action: "biz_payment.confirm_link",
|
|
resource_type: "biz_subscription",
|
|
resource_id: body.subscription_id,
|
|
detail: { payment_ref: body.payment_ref },
|
|
});
|
|
ctx.success(row);
|
|
},
|
|
};
|