Midtrans-Middleware
Go to file
root 5976f8e088 Merge pull request 'epic-6-snap-hybrid-complete' (#15) from epic-6-snap-hybrid-complete into dev
Reviewed-on: #15
2025-12-04 08:25:49 +00:00
public feat: update favicon and page title for branding 2025-11-22 11:58:37 +07:00
scripts Fix Snap payment flow: direct to payment UI in step 2 and add customer/item details to API request 2025-12-03 17:01:12 +07:00
server fix ux 2025-12-04 14:56:53 +07:00
src fix ux 2025-12-04 14:56:53 +07:00
v4-backup/.bmad-core new improvement 2025-11-25 16:24:52 +07:00
web-bundles feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
.gitignore chore: update .gitignore to exclude .bmad, .trae folders and docs folder 2025-11-28 06:16:18 +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
ecosystem.config.cjs adding ecosystem 2025-11-28 07:24:50 +00:00
eslint.config.js feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR 2025-11-10 11:10:35 +07:00
index.html feat: update favicon and page title for branding 2025-11-22 11:58:37 +07:00
package-lock.json adding ecosystem 2025-11-28 07:24:50 +00: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: implement toast notifications and update UI components 2025-11-14 15:13:46 +07:00
test-create-payment-link.cjs feat: Add customer name display and improve Snap payment UX 2025-12-04 12:45:05 +07:00
test-frontend-payload.cjs feat: Add customer name display and improve Snap payment UX 2025-12-04 12:45:05 +07:00
test-snap-token.cjs feat: Add customer name display and improve Snap payment UX 2025-12-04 12:45:05 +07:00
tmp-createtransaksi.json fix ux 2025-12-04 14:56:53 +07:00
tmp-sig.txt notify erp 2025-11-14 10:07:11 +07:00
tmp-sig2.txt notify erp 2025-11-14 10:07:11 +07:00
tmp-sig3.txt notify erp 2025-11-14 10:07:11 +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.