Providers
Bogus
Information about working with Cardigan's built-in test provider.
Overview
The Bogus provider is available to all merchants immediately on Cardigan installation and allows testing of gift card functionality without the need to connect to an external provider. This can be useful to start validating customer flows without waiting for third party setup.
Setup
After installation, navigate to the "Profiles" section in your Cardigan settings and add a new "Bogus" gift card provider.
Credentials
As the Bogus provider doesn't communicate with an external service, there's no need to set up any credentials for it.
Configuration options
Currency
Select the currency that the Bogus provider's simulated responses should be returned in. Defaults to Australian Dollars.
Usage
Once the Bogus profile is set up and configured, you can add Cardigan's front end widgets to your store and test flows like balance lookups and redemptions. You can control the responses returned from the Bogus provider by using specific card numbers to trigger specific responses.
Card numbers
The following card numbers can be used to simulate specific responses:
10044000000000000100
: Active card with a balance of100.00
in the configured currency.10044000000000000050
: Active card with a balance of50.00
in the configured currency.10044000000000000025
: Active card with a balance of25.00
in the configured currency and a future expiry date.20044000000000000025
: Inactive card with a balance of25.00
in the configured currency.30044000000000000025
: Expired card with a balance of25.00
in the configured currency and a past expiry date.
Any other number will be treated as invalid and a failure response will be returned.
PINs
For all of the card numbers above, any four-digit number will be treated as a valid PIN, with the exception of 9999
. If this value is provided as a PIN then the Bogus provider will consider the request invalid and return a failure response.