Mhamdans17 commited on
Commit
2c61479
·
1 Parent(s): 27a7c82

feat: save tripay fee upfront when creating qris order

Browse files
Files changed (1) hide show
  1. controllers/order_controller.go +2 -0
controllers/order_controller.go CHANGED
@@ -583,6 +583,8 @@ func PayTripay(c *gin.Context) {
583
  order.PaymentStatus = "pending"
584
  order.CustomerName = req.CustomerName
585
  order.CustomerPhone = req.CustomerPhone
 
 
586
  if req.ServedBy != "" {
587
  order.ServedBy = req.ServedBy
588
  }
 
583
  order.PaymentStatus = "pending"
584
  order.CustomerName = req.CustomerName
585
  order.CustomerPhone = req.CustomerPhone
586
+ order.TotalAmount = tripayRes.Data.Amount
587
+ order.PlatformFee = tripayRes.Data.TotalFee
588
  if req.ServedBy != "" {
589
  order.ServedBy = req.ServedBy
590
  }