Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

kitabisa/sangu-dana

Folders and files

NameName
Last commit message
Last commit date
Dec 9, 2019
Dec 9, 2019
Dec 9, 2019
Apr 6, 2022
Dec 9, 2019
Apr 6, 2022
Dec 9, 2019
Dec 9, 2019
Dec 9, 2019
Oct 5, 2021
Oct 5, 2021
Oct 5, 2021
Dec 9, 2019
Apr 6, 2022
Apr 6, 2022
Dec 9, 2019

Repository files navigation

Dana Sangu

Usage blueprint

  1. There is a type named Client (dana.Client) that should be instantiated through NewClient which hold any possible setting to the library.
  2. There is a gateway classes which you will be using depending on whether you used. The gateway type need a Client instance.
  3. All Header field is handled by this library
  4. There's also VerifySignature to verify whether the signature response/request is valid.
  5. Replace .sample files to your own credential.

Example

    danaClient := dana.NewClient()
    danaClient.BaseUrl = "DANA_BASE_URL",
    ---
    ---

    coreGateway := dana.CoreGateway{
        Client: danaClient,
    }

    body := &dana.RequestBody{
        Order: {},
        MerchantId: "MERCHANT_ID",
        ---
        ---
        ---
    }

    res, _ := coreGateway.Order(req)