feat: add gateway-neutral payment package
This commit is contained in:
1 parent
a9670c2a1c
commit
98e0813061
23 files changed
+1902
-6
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import { getPaymentService } from "./core.ts";
|
||||
|
||||
export async function POST(ctx: { req: Request; params?: Record<string, string> }) {
|
||||
const gateway = ctx.params?.gateway?.trim();
|
||||
if (!gateway) return Response.json({ error: "payment gateway is required" }, { status: 400 });
|
||||
return getPaymentService().paymentWebhookHandler(gateway)(ctx);
|
||||
}
|
||||
Reference in new issue
Block a user