瀏覽代碼

澳門國際銀行支付

tags/v1.5.6
jiaoboxiang 2 年之前
父節點
當前提交
083ff9d58d
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. +6
    -2
      lib/luso_bank/macao_luso.go

+ 6
- 2
lib/luso_bank/macao_luso.go 查看文件

@@ -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
}


Loading…
取消
儲存