Jerry há 7 anos atrás
pai
commit
033615a4d2
3 ficheiros alterados com 6 adições e 7 exclusões
  1. 1 1
      alipay_client.go
  2. 3 4
      alipay_client_test.go
  3. 2 2
      wechat_client_test.go

+ 1 - 1
alipay_client.go

@@ -80,7 +80,7 @@ func (this *aliPayClient) AliPayTradeQuery(body BodyMap) {
 func (this *aliPayClient) AliPayTradeAppPay(body BodyMap) (payParam string, err error) {
 	var bytes []byte
 	//===============product_code值===================
-	body.Set("product_code", "QUICK_MSECURITY_PAY")
+	//body.Set("product_code", "QUICK_MSECURITY_PAY")
 	bytes, err = this.doAliPay(body, "alipay.trade.app.pay")
 	if err != nil {
 		return null, err

+ 3 - 4
alipay_client_test.go

@@ -17,14 +17,14 @@ func TestAliPayClient_AliPayTradeWapPay(t *testing.T) {
 	//配置公共参数
 	client.SetCharset("utf-8").
 		SetSignType("RSA2").
-		//SetReturnUrl("https://www.igoogle.ink").
+		//SetReturnUrl("https://www.gopay.ink").
 		//SetNotifyUrl("https://api.iguiyu.com/gy_pay/alipay/notify").
 		SetNotifyUrl("https://gytmp.iguiyu.com/park-api/pay/alipay/notify")
 	//请求参数
 	body := make(BodyMap)
 	body.Set("subject", "手机网站测试支付")
 	body.Set("out_trade_no", "GYWX201901301040355706100448")
-	body.Set("quit_url", "https://www.igoogle.ink")
+	body.Set("quit_url", "https://www.gopay.ink")
 	body.Set("total_amount", "100.00")
 	body.Set("product_code", "QUICK_WAP_WAY")
 	//手机网站支付请求
@@ -53,7 +53,6 @@ func TestAliPayClient_AliPayTradeAppPay(t *testing.T) {
 	body.Set("subject", "测试APP支付")
 	body.Set("out_trade_no", "GYWX201901301040355706100411")
 	body.Set("total_amount", "1.00")
-	body.Set("product_code", "QUICK_MSECURITY_PAY")
 	//手机APP支付参数请求
 	payParam, err := client.AliPayTradeAppPay(body)
 	if err != nil {
@@ -95,7 +94,7 @@ func TestAliPayParams(t *testing.T) {
 	bodyMap := make(BodyMap)
 	bodyMap.Set("subject", "测试支付")
 	bodyMap.Set("out_trade_no", "GYWX201901301040355706100401")
-	bodyMap.Set("quit_url", "https://www.igoogle.ink")
+	bodyMap.Set("quit_url", "https://www.gopay.ink")
 	bodyMap.Set("total_amount", "1.00")
 	bodyMap.Set("product_code", "QUICK_WAP_WAY")
 

+ 2 - 2
wechat_client_test.go

@@ -26,11 +26,11 @@ func TestWeChatClient_UnifiedOrder(t *testing.T) {
 	body.Set("out_trade_no", number)
 	body.Set("total_fee", 10)
 	body.Set("spbill_create_ip", "124.77.173.62")
-	body.Set("notify_url", "http://www.igoogle.ink")
+	body.Set("notify_url", "http://www.gopay.ink")
 	body.Set("trade_type", TradeType_H5)
 	body.Set("device_info", "WEB")
 	body.Set("sign_type", SignType_MD5)
-	//body.Set("scene_info", `{"h5_info": {"type":"Wap","wap_url": "http://www.igoogle.ink","wap_name": "测试支付"}}`)
+	//body.Set("scene_info", `{"h5_info": {"type":"Wap","wap_url": "http://www.gopay.ink","wap_name": "测试支付"}}`)
 	//body.Set("openid", OpenID)
 
 	//请求支付下单,成功后得到结果