type BCABankTransferDetail struct {
Bank Bank `json:"bank"`
VaNumber string `json:"va_number"`
FreeText struct {
Inquiry []BCABankTransferDetail `json:"inquiry"`
Payment []BCABankTransferDetail `json:"payment"`
} `json:"free_text"`
}
it should be using BCABankTransferLangDetail instead BCABankTransferDetail
type BCABankTransferDetail struct {
Bank Bank `json:"bank"`
VaNumber string `json:"va_number"`
FreeText struct {
Inquiry []BCABankTransferLangDetail `json:"inquiry"`
Payment []BCABankTransferLangDetail `json:"payment"`
} `json:"free_text"`
}
if i referred from doc the payload json should be like this
"bank_transfer":{
"bank": "bca",
"free_text": {
"inquiry": [
{
"id": "Free Text ID Free Text ID Free Text ID",
"en": "Free Text EN Free Text EN Free Text EN"
}
],
"payment": [
{
"id": "Free Text ID Free Text ID Free Text ID",
"en": "Free Text EN Free Text EN Free Text EN"
}
]
}
Hi There,
i just saw the codes on https://github.com/veritrans/go-midtrans/blob/master/request.go#L77. seems there was incorrect type
it should be using
BCABankTransferLangDetail
insteadBCABankTransferDetail
if i referred from doc the payload json should be like this
also this one
the second annotation should be
LangEN string json:"en,omitempty"