mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix DummyPaymentProvider's return URL
This commit is contained in:
@ -14,10 +14,7 @@
|
|||||||
|
|
||||||
package pp
|
package pp
|
||||||
|
|
||||||
import (
|
import "net/http"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
)
|
|
||||||
|
|
||||||
type DummyPaymentProvider struct{}
|
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) {
|
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 returnUrl, "", nil
|
||||||
return payUrl, "", nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pp *DummyPaymentProvider) Notify(request *http.Request, body []byte, authorityPublicKey string, orderId string) (*NotifyResult, error) {
|
func (pp *DummyPaymentProvider) Notify(request *http.Request, body []byte, authorityPublicKey string, orderId string) (*NotifyResult, error) {
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
package pp
|
package pp
|
||||||
|
|
||||||
import (
|
import "net/http"
|
||||||
"net/http"
|
|
||||||
)
|
|
||||||
|
|
||||||
type PaymentState string
|
type PaymentState string
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user