Browse Source

澳門國際銀行支付

tags/v1.5.3
jiaoboxiang 2 years ago
parent
commit
86290ed518
2 changed files with 8 additions and 2 deletions
  1. +7
    -1
      lib/luso_bank/macao_luso.go
  2. +1
    -1
      test/luso_pay_test.go

+ 7
- 1
lib/luso_bank/macao_luso.go View File

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


+ 1
- 1
test/luso_pay_test.go View File

@@ -17,7 +17,7 @@ func TestLusoPay(t *testing.T) {
"mdseDesc ": "澳门世寶-自營購物", "mdseDesc ": "澳门世寶-自營購物",
"transAmount ": "100", "transAmount ": "100",
"transCur ": "MOP", "transCur ": "MOP",
"subMchtNm ": "世寶商城",
"subMchtNm ": luso.MchtStoreNm,
"notifyUrl ": "http://inapi.izhyin.cn:80/pay/boc/callback", "notifyUrl ": "http://inapi.izhyin.cn:80/pay/boc/callback",
"extMsg ": zhios_pay_utils.SerializeStr(map[string]string{ "extMsg ": zhios_pay_utils.SerializeStr(map[string]string{
"mid": "123456", "mid": "123456",


Loading…
Cancel
Save