Fix DummyPaymentProvider's return URL

This commit is contained in:
Yang Luo 2023-09-01 01:25:15 +08:00
parent ec956c12ca
commit c829bf1769
2 changed files with 3 additions and 9 deletions

View File

@ -14,10 +14,7 @@
package pp
import (
"fmt"
"net/http"
)
import "net/http"
type DummyPaymentProvider struct{}
@ -27,8 +24,7 @@ func NewDummyPaymentProvider() (*DummyPaymentProvider, error) {
}
func (pp *DummyPaymentProvider) Pay(providerName string, productName string, payerName string, paymentName string, productDisplayName string, price float64, currency string, returnUrl string, notifyUrl string) (string, string, error) {
payUrl := fmt.Sprintf("/payments/%s/result", paymentName)
return payUrl, "", nil
return returnUrl, "", nil
}
func (pp *DummyPaymentProvider) Notify(request *http.Request, body []byte, authorityPublicKey string, orderId string) (*NotifyResult, error) {

View File

@ -14,9 +14,7 @@
package pp
import (
"net/http"
)
import "net/http"
type PaymentState string