From 8a47bbb09c471bb15361a8041cb0e65d8497d717 Mon Sep 17 00:00:00 2001 From: Pavel Maliavkin Date: Thu, 11 Aug 2022 12:54:45 +0300 Subject: [PATCH] check response.resut field for error --- liqpay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liqpay.go b/liqpay.go index cfcbbd7..d674c18 100644 --- a/liqpay.go +++ b/liqpay.go @@ -73,7 +73,7 @@ func (c Client) Send(apiUrl string, req Request) (Response, error) { return nil, err } - if res["status"] == "error" { + if res["status"] == "error" || res["result"] == "error" { errMsg, ok := res["err_description"].(string) if ok { return nil, errors.New(errMsg)