|
@@ -57,11 +57,17 @@ func (s *signParam) SetSign(privateKeyStr string) error { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (payParam *PayParam) Send(prd bool) (string, error) { |
|
|
|
|
|
|
|
|
func (payParam *PayParam) Send(prd 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" |
|
|
} |
|
|
} |
|
|
|
|
|
switch method { |
|
|
|
|
|
case "create": |
|
|
|
|
|
url = url + "/upcp-iap-pps-lqrp/libQrPay/json/create" |
|
|
|
|
|
case "pay": |
|
|
|
|
|
url = url + "/upcp-iap-pps-lqrp/libQrPay/json/pay" |
|
|
|
|
|
} |
|
|
headers := map[string]string{ |
|
|
headers := map[string]string{ |
|
|
"Content-Type": "application/json", |
|
|
"Content-Type": "application/json", |
|
|
} |
|
|
} |
|
|