Customer Order
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user