|
@@ -65,7 +65,7 @@ func (s *signParam) SetSign(privateKeyStr string) error { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (payParam *PayParam) Send(prd bool, method string) (string, error) { |
|
|
|
|
|
|
|
|
func (payParam *PayParam) Send(prd, isNeedEncode bool, method string) (string, error) { |
|
|
url := "https://qrpaytest.lusobank.com.mo:443" |
|
|
url := "https://qrpaytest.lusobank.com.mo:443" |
|
|
if prd { |
|
|
if prd { |
|
|
url = "https://qrpaytest.lusobank.com.mo:8443" |
|
|
url = "https://qrpaytest.lusobank.com.mo:8443" |
|
@@ -80,7 +80,11 @@ func (payParam *PayParam) Send(prd bool, method string) (string, error) { |
|
|
"Content-Type": "application/json", |
|
|
"Content-Type": "application/json", |
|
|
} |
|
|
} |
|
|
zhios_pay_utils.CurlDebug = true |
|
|
zhios_pay_utils.CurlDebug = true |
|
|
res, err := zhios_pay_utils.CurlPost(url, php2go.URLEncode(zhios_pay_utils.SerializeStr(payParam)), headers) |
|
|
|
|
|
|
|
|
body := zhios_pay_utils.SerializeStr(payParam) |
|
|
|
|
|
if isNeedEncode { |
|
|
|
|
|
body = php2go.URLEncode(body) |
|
|
|
|
|
} |
|
|
|
|
|
res, err := zhios_pay_utils.CurlPost(url, body, headers) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return "", err |
|
|
return "", err |
|
|
} |
|
|
} |
|
|