Jerry 6 سال پیش
والد
کامیت
a1be59d299
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      alipay_client_test.go
  2. 1 1
      alipay_server_api.go

+ 1 - 1
alipay_client_test.go

@@ -77,7 +77,7 @@ func TestAliPayClient_AliPayTradePagePay(t *testing.T) {
 	//请求参数
 	body := make(BodyMap)
 	body.Set("subject", "网站测试支付")
-	body.Set("out_trade_no", "GYWX201901301040355706100429")
+	body.Set("out_trade_no", "GYWX201901301040355706100430")
 	body.Set("quit_url", "https://www.igoogle.ink")
 	body.Set("total_amount", "88.88")
 	body.Set("product_code", "FAST_INSTANT_TRADE_PAY")

+ 1 - 1
alipay_server_api.go

@@ -119,7 +119,7 @@ func VerifyAliPayResultSign(aliPayPublicKey string, notifyRsp *AliPayNotifyReque
 		}
 	}
 	pKey := FormatAliPayPublicKey(aliPayPublicKey)
-	sign, err := getRsaSign(newBody, notifyRsp.SignType, pKey)
+	sign, err := getRsaSign(newBody, "RSA", pKey)
 	if err != nil {
 		return false, err.Error()
 	}