Ver código fonte

澳門國際銀行支付

tags/v1.5.6
jiaoboxiang 2 anos atrás
pai
commit
083ff9d58d
1 arquivos alterados com 6 adições e 2 exclusões
  1. +6
    -2
      lib/luso_bank/macao_luso.go

+ 6
- 2
lib/luso_bank/macao_luso.go Ver arquivo

@@ -65,7 +65,7 @@ func (s *signParam) SetSign(privateKeyStr string) error {
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"
if prd {
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",
}
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 {
return "", err
}


Carregando…
Cancelar
Salvar