Customer Order

This commit is contained in:
aditya.siregar
2024-08-04 01:16:25 +07:00
parent 265dd9b6e8
commit bdf930445c
30 changed files with 832 additions and 43 deletions
+7 -3
View File
@@ -39,10 +39,14 @@ func (c *ClientService) CreatePayment(order entity.MidtransRequest) (*entity.Mid
Client: c.client,
}
paymentMethod := []midtrans.PaymentType{}
if order.PaymentMethod == "GOPAY" {
paymentMethod = append(paymentMethod, midtrans.SourceGopay)
}
snapReq := &midtrans.SnapReq{
EnabledPayments: []midtrans.PaymentType{
midtrans.SourceGopay,
},
EnabledPayments: paymentMethod,
TransactionDetails: midtrans.TransactionDetails{
OrderID: order.PaymentReferenceID,
GrossAmt: order.TotalAmount,