Midtrans-Middleware
Go to file
root 9b8a62f1d8 Merge pull request 'feat/payment-link-flow' (#4) from feat/payment-link-flow into main
Reviewed-on: #4
2025-11-11 08:55:06 +00:00
.bmad-core feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
.trae/rules feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
docs update merchat order id 2025-11-11 15:11:22 +07:00
public improvisasi 2025-11-10 15:32:41 +07:00
scripts feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
server update merchat order id 2025-11-11 15:11:22 +07:00
src Align PayPage flow and update /createtransaksi schema 2025-11-11 10:19:50 +07:00
web-bundles feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
.gitignore feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
README.md feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
coreApiSimpleExample.js feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
eslint.config.js feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
index.html feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
package-lock.json feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
package.json feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
postcss.config.cjs feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
tailwind.config.ts feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
tmp-createtransaksi.json update merchat order id 2025-11-11 15:11:22 +07:00
tsconfig.app.json feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
tsconfig.json feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
tsconfig.node.json feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
vite.config.ts feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00

README.md

Core Midtrans CIFO (Frontend)

Frontend Vite + React untuk integrasi Midtrans Core API dengan UI kustom.

Setup

  1. Duplikasi file contoh env dan isi nilainya:
cp .env.example .env.local

Isi .env.local (lihat .env.example untuk referensi):

VITE_API_BASE_URL=http://localhost:8000/api
VITE_MIDTRANS_CLIENT_KEY=YOUR_CLIENT_KEY
VITE_MIDTRANS_ENV=sandbox
  1. Jalankan pengembangan:
npm install
npm run dev

App akan tersedia di http://localhost:5173/ (atau port lain jika 5173 dipakai).

Catatan Integrasi Midtrans

  • Client Key hanya digunakan di frontend (mis. tokenisasi kartu/3DS). Server Key TIDAK pernah di frontend.
  • Semua request ke Midtrans dilakukan lewat backend (VITE_API_BASE_URL). Frontend memanggil endpoint seperti /payments/:orderId/status.
  • Status real-time dapat diimplementasikan via polling (TanStack Query) atau SSE/WebSocket dari backend.

Struktur Env di Kode

  • Akses env melalui modul src/lib/env.ts:
    • Env.API_BASE_URL
    • Env.MIDTRANS_CLIENT_KEY
    • Env.MIDTRANS_ENV

Lisensi

Internal project skeleton.