diff options
| author | yogi sofiharja <hardja.ogie@gmail.com> | 2023-07-06 10:52:05 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-07-06 13:27:33 +0700 |
| commit | 1ec4c69017704b76b2a45210c132ac91f6f83be7 (patch) | |
| tree | 3a01bef013b758c57cffa44a0831dfbbcfa3ac3f | |
| parent | 4065a6c41d972b4bf800d1ac8df4c5cf89687719 (diff) | |
| download | duitku-1ec4c69017704b76b2a45210c132ac91f6f83be7.tar.xz | |
client: return response from duitku even if the code is not success (00)
It allow the client to show error that comes from duitku
| -rw-r--r-- | client.go | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -93,9 +93,6 @@ func (cl *Client) CheckBalance() (bal *Balance, err error) { if err != nil { return nil, fmt.Errorf(`%s: %s`, logp, err) } - if bal.Code != ResCodeSuccess { - return nil, fmt.Errorf(`%s: %s: %s`, logp, bal.Code, bal.Desc) - } return bal, nil } @@ -131,9 +128,6 @@ func (cl *Client) ClearingInquiry(req *ClearingInquiry) (res *ClearingInquiryRes if err != nil { return nil, fmt.Errorf(`%s: %w`, logp, err) } - if res.Code != ResCodeSuccess { - return nil, fmt.Errorf(`%s: %s: %s`, logp, res.Code, res.Desc) - } return res, nil } @@ -400,9 +394,6 @@ func (cl *Client) RtolInquiry(req *RtolInquiry) (res *RtolInquiryResponse, err e if err != nil { return nil, fmt.Errorf(`%s: %w`, logp, err) } - if res.Code != ResCodeSuccess { - return nil, fmt.Errorf(`%s: %s: %s`, logp, res.Code, res.Desc) - } return res, nil } |
