/bkashgo

bKash is a leading MFS in Bangladesh and growing its user-base rapidly. So does its integration with services. This go SDK aim to implement bKash tokenized api for developers who wants to integrate bKash tokenized api with their service(s) written in go.

Primary LanguageGoMIT LicenseMIT

bKashGo

This go SDK aim to implement bKash tokenized api

Go Reference CodeQL

Ref:

Feautures

Tokenized Checkout

  • Grant Token
  • Refresh Token
  • Create Agreement
  • Execute Agreement
  • Query Agreement
  • Cancel Agreement
  • Create Payment
  • Execute Payment
  • Query Payment
  • Search Transaction
  • Refund Transaction
  • Refund Status

Examples:

To Generate a Token

// bKash Instance
bkash := bkashgo.GetBkash(username, password, appKey, appSecret, isLiveStore)

// Token and error message
token, err := bkash.GetToken()
if err != nil {
  panic(err)
}
fmt.Println(token)

To Generate Refresh Token

// bKash Instance
bkash := bkashgo.GetBkash(username, password, appKey, appSecret, isLiveStore)

// Token and error message
token, err := bkash.GetToken()
if err != nil {
  panic(err)
}

refreshToken, err := bkash.RefreshToken(&models.TokenRequest{
  RefreshToken: token.RefreshToken
})
if err != nil {
  panic(err)
}
fmt.Println(refreshToken)

Made with ❤️ by Rakibul Yeasin