Orchard Core Commerce supports multiple payment providers. Exactly® is one of the officially included ones. Unlike our Stripe implementation, it uses redirects to send you to a payment interface on their domain.
To start using, follow these steps:
- Sign up to Exactly®. Please be sure to use this link to create your account. That way Lombiq (the steward of the Orchard Core Commerce project) will get a commission on the payment fees, which helps cover some of the development costs of OCC. This is at no cost to you; the fees you pay are the same either way.
- Once they respond, ask your contact person for the following:
- Whitelist for your web domain.
- If needed, a sandbox project you can use for testing.
- A live project for your final site.
- Go to https://dashboard.exactly.com/projects/.
- Take note of your Project ID and your Project API key (both are GUID style hexadecimal strings).
- On your Orchard Core tenant go to Admin dashboard → Configuration → Features.
- Make sure the Orchard Core Commerce - Payment - Exactly feature is enabled.
- Go to Admin dashboard → Configuration → Commerce → Exactly API.
- Fill out the Project ID and API key fields.
- Save and then click the Verify currently saved API configuration button to test it. This will create a new transaction you can check on https://dashboard.exactly.com/transactions.
Once you have set up the site configuration, an additional Pay with exactly button will appear during checkout.
ℹ At the time of writing callback URLs targeting localhost are not supported. If you want to test your site locally, we suggest adding a whitelisted domain to your hosts file. The address doesn't have to be accessible from their server so this approach is safer than exposing your machine via port forwarding or tunneling.
There are available test cards for the sandbox environment that can be found in Exactly's documentation. Some of these test card numbers are commonly used by other payment providers as well.
Brand | Number | CVC | Date | Result |
---|---|---|---|---|
Visa | 4000 0000 0000 7775 | Any 3 digits | Any future date | the card has insufficient funds |
Visa | 4000 0000 0000 3220 | Any 3 digits | Any future date | success during 3DS Auth (3DS is always expected) |
Visa | 4000 0084 0000 1280 | Any 3 digits | Any future date | the card fails 3DS Auth (3DS is always expected) |
Mastercard | 5555 5555 5555 4444 | Any 3 digits | Any future date | Mastercard test card |
⚠ The sandbox environment only supports EUR and USD currencies. If payment is attempted with anything else, it will display a 403.21: Unsupported currency error.
As mentioned above, this module uses redirects to communicate with the payment processor. This means the OrchardCore.Commerce site never sees the buyer's payment information, which avoids potential liability and improves buyer confidence. Here is a broad overview of what happens when you click on the Pay with exactly button:
- JS script sends a POST request that only contains the contents of the checkout page (i.e. addresses).
- C# backend creates a new Order content item from the checkout data and the stored shopping cart.
- C# backend sends a POST request to the Exactly API including the order total and the return URL.
- JS script gets a redirect URL (on Exactly's domain) as response, then navigates there.
- Payment continues on Exactly, then redirects back to the return URL.
- C# backend validates the transaction state, updates Order and redirects to the Success page.