feat(dimentorin): payment status refresh via Midtrans + auto-paid auto-confirm
- store provider_order_id (Midtrans order id) on payment create
- POST /payments/{id}/refresh: query Midtrans v2/{order}/status (settlement/capture → paid + confirm session)
- fix: status URL must end with /status; force Accept-Encoding: identity (istio gzip mangling)
- e2e verified: simulated VA payment in sandbox → refresh → paid + session confirmed
This commit is contained in:
1 parent
aa0b659b48
commit
390f46b0e7
9 files changed
+141
-2
No files matched your search
@@ -43,6 +43,10 @@ pub struct Model {
|
||||
#[sea_orm(nullable)]
|
||||
pub external_ref: Option<String>,
|
||||
|
||||
// provider order id (Midtrans order_id, e.g. "DM-<uuid>") used to query status
|
||||
#[sea_orm(nullable)]
|
||||
pub provider_order_id: Option<String>,
|
||||
|
||||
#[sea_orm(nullable)]
|
||||
pub paid_at: Option<DateTime<Utc>>,
|
||||
|
||||
|
||||
Reference in new issue
Block a user