Pembuatan checkout
Untuk metode instant_payment, CartPublishController menyiapkan payload transaksi dan memanggil endpoint payment aplikasi utama. Toko Digital kemudian menggunakan hasil response untuk mengarahkan customer ke halaman pending atau payment provider.
Toko Digital tidak menjadi payment provider dan tidak boleh menyimpan credential provider secara langsung di halaman frontend.
Pemeriksaan status
Route proxy:
POST /api/payment/check-status/{orderId}Controller memilih target berdasarkan APP_ENV dan variable BACKEND_API_URL_*, lalu meneruskan response serta status HTTP target. Timeout request adalah 10 detik.
Browser → Toko Digital /api/payment/check-status/{id}
→ aplikasi utama /api/payment/check-status/{id}
← response payment statusRoute memasang throttle 10,1, yaitu maksimal 10 request per menit sesuai konfigurasi route.
Failure behavior
Jika target tidak berhasil, proxy mengembalikan response target. Jika terjadi exception jaringan, proxy mengembalikan JSON error dengan status 500. Log menyertakan order ID, status HTTP, dan status payment, tetapi tidak boleh ditambah dengan credential atau payload rahasia.
Koordinasi lintas service
Sebelum mengubah:
- nama payment method;
- format order ID;
- payment status;
- payload create checkout;
- URL callback atau redirect;
periksa implementasi counterpart di dazoapp dan dokumentasi payment service.