- There is a type named
Client
(dana.Client
) that should be instantiated through NewClient
which hold any possible setting to the library.
- There is a gateway classes which you will be using depending on whether you used. The gateway type need a Client instance.
- All Header field is handled by this library
- There's also VerifySignature to verify whether the signature response/request is valid.
- Replace
.sample
files to your own credential.
danaClient := dana.NewClient()
danaClient.BaseUrl = "DANA_BASE_URL",
---
---
coreGateway := dana.CoreGateway{
Client: danaClient,
}
body := &dana.RequestBody{
Order: {},
MerchantId: "MERCHANT_ID",
---
---
---
}
res, _ := coreGateway.Order(req)