This go SDK aim to implement bKash tokenized api
Ref:
- Grant Token
- Refresh Token
- Create Agreement
- Execute Agreement
- Query Agreement
- Cancel Agreement
- Create Payment
- Execute Payment
- Query Payment
- Search Transaction
- Refund Transaction
- Refund Status
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