Fix NotifyPayment().

This commit is contained in:
Yang Luo
2022-03-13 19:57:23 +08:00
parent 55a84644e1
commit fde8c4b5f6
5 changed files with 50 additions and 25 deletions

View File

@ -179,7 +179,7 @@ func BuyProduct(id string, providerId string, user *User, host string) (string,
productId := product.Name
originFrontend, originBackend := getOriginFromHost(host)
returnUrl := fmt.Sprintf("%s/payments/%s", originFrontend, paymentId)
returnUrl := fmt.Sprintf("%s/payments/%s/result", originFrontend, paymentId)
notifyUrl := fmt.Sprintf("%s/api/notify-payment", originBackend)
payUrl, err := pProvider.Pay(productName, productId, providerId, paymentId, product.Price, returnUrl, notifyUrl)