Test purchases with the Dummy provider
This guide explains the Dummy payment provider. It simulates payments without calling a payment service, so that you can test the purchase flow before you go live.
Learning outcomes
- Add the Dummy provider and test a purchase.
What you need
- A product in Casdoor
Add the provider
- In the Casdoor admin console, go to Identity > Providers and add a provider.
- Set Category to
Paymentand Type toDummy. The provider needs no credentials. - Save the provider.
Test a purchase
- Add the provider to the Payment providers of the product and save it.
- Buy the product with the Dummy provider.
Casdoor sends the user straight to the payment result page without calling any payment service. After about one second, the result page notifies Casdoor, which marks the payment as paid. No money is charged.
Only the user who made the payment or an admin of its organization can complete a Dummy payment.
The Dummy provider is for development and testing only. Don't leave it in the Payment providers of a product in production: any user who can choose it at checkout gets the product without paying.
Before you go live, replace the Dummy provider with a real one, such as Stripe or PayPal.