package test import ( luso "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/lib/luso_bank" zhios_pay_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/utils" "testing" ) func TestLusoPay(t *testing.T) { var ( payParam luso.PayParam dataParam luso.DataParam ) req := map[string]string{ "mchtOrderId": "202211041102", "payScene ": "AS_MWEB", "mdseDesc ": "澳门世寶-自營購物", "transAmount ": "100", "transCur ": "MOP", "subMchtNm ": luso.MchtStoreNm, "notifyUrl ": "http://inapi.izhyin.cn:80/pay/boc/callback", "extMsg ": zhios_pay_utils.SerializeStr(map[string]string{ "mid": "123456", "ord_type": "mall_goods", }), } dataParam.Head.MchtNo = luso.MerchantId dataParam.ReqBody = req client := payParam.SetData(dataParam) err := client.SetSign(luso.PrivateKeyStr) if err != nil { t.Error(err) } resp, err := client.PayParam.Send(false) if err != nil { t.Error(err) } t.Logf("回調信息:%s", resp) }