fix decrypt
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
lzstring "github.com/daku10/go-lz-string"
|
||||
)
|
||||
|
||||
func BPJSGetResponse(url string, secretKey string, cons_id string, User_keys string, tstamp string, X_signature string, kdPoly string, tanggal string, headers map[string]string) (string, error) {
|
||||
@@ -43,9 +45,9 @@ func BPJSGetResponse(url string, secretKey string, cons_id string, User_keys str
|
||||
log.Fatalf("Error Unmarshaling: %v", err)
|
||||
}
|
||||
log.Println("RESPONSE DATA", jadwalDokter.Response)
|
||||
dataResp, err := docs.ResponseVclaim(jadwalDokter.Response, key)
|
||||
dataResp, err := lzstring.DecompressFromEncodedURIComponent((docs.StringDecrypt(key, jadwalDokter.Response)))
|
||||
if err != nil {
|
||||
log.Fatalf("Error Unmarshaling: %v", err)
|
||||
log.Fatalf("Error Decrypt: %v", err)
|
||||
}
|
||||
log.Println("res: ", dataResp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user