mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
Add DummyPaymentProvider
This commit is contained in:
@ -210,6 +210,11 @@ func BuyProduct(id string, providerName string, user *User, host string) (string
|
||||
ReturnUrl: product.ReturnUrl,
|
||||
State: "Created",
|
||||
}
|
||||
|
||||
if provider.Type == "Dummy" {
|
||||
payment.State = "Paid"
|
||||
}
|
||||
|
||||
affected, err := AddPayment(&payment)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Reference in New Issue
Block a user