The commerce module for Orchard Core.
Orchard Core Commerce will be an Orchard Core port and partial rewrite of the open source Nwazet Commerce module that was built for Orchard CMS 1.x. Nwazet Commerce was initially built in 2012 by Bertrand Le Roy, loosely based on a commerce sample by Sipke Shoorstra. The initial goal of Nwazet Commerce was to power the web site of the hardware startup Nwazet. While Nwazet is no longer operating, the Nwazet Commerce project went on, and was further developed by a group of passionate contributors who are using the platform for their own, and their customer's web sites.
Like Orchard, Nwazet Commerce was built with extensibility in mind, and as such it has its own extensions (typical examples include local tax and shipping modules). It's also pure, idiomatic Orchard.
Orchard Core represents a major evolution of the Orchard design principles, and is sufficiently different that running Nwazet Commerce on it will necessitate significant work. As such, we've decided that starting from a blank slate was the best way to go, so we'll port Nwazet Commerce piece by piece, being careful to accurately apply Orchard Core's new design principles. We also decided to adopt a new name, that gets rid of the now obsolete origins, and establishes our ambition for the module to become the go-to commerce module for Orchard Core.
This work is in its initial design phases. There's a lot of work to do, and yes, we do welcome participation in any shape or form.
The work will focus at first on porting a minimum viable feature set.
- Product, price, and inventory parts and/or fields (those were a single part in Nwazet) Note: not all products have a price
- Shopping cart
- Base infrastructure for payment, plus one implementation (Stripe)
- Checkout (probably redesigned around Orchard Workflows)
- Order content type and management screens (including a redesign and refactoring of the order part)
- Workflow activities
Globalization should be taken into account at every step.
- Clone this repository.
- Build and run the
OrchardCore.Commerce.Web
project, then run theOrchardCore Commerce - Development
recipe on the setup screen. - Go to Features, search for “Commerce” and turn on everything.
- Go to Settings → Commerce, and save it (by default, this setting has no value, so you need to save it, it’s a bug, and it will need to be fixed in the future, it can break the product sites).
- Go to Settings → Stripe API. Set the keys (test keys can be found below). If the keys are not set, payment won't work.
- Go to Content Items, and create a
Product
.
Stripe API uses a secret-publishable key pair. The following API keys are public sample test keys, they can be found in Stripe's documentation.
- Publishable key:
pk_test_51H59owJmQoVhz82aWAoi9M5s8PC6sSAqFI7KfAD2NRKun5riDIOM0dvu2caM25a5f5JbYLMc5Umxw8Dl7dBIDNwM00yVbSX8uS
- Secret key:
sk_test_51H59owJmQoVhz82aOUNOuCVbK0u1zjyRFKkFp9EfrqzWaUWqQni3oSxljsdTIu2YZ9XvlbeGjZRU7B7ye2EjJQE000Dm2DtMWD
These are just test keys. Don’t submit any personally identifiable information in requests made with this key.
The Stripe API key pair can be set inside Dashboard → Settings → Stripe API.
There are available test cards that can be found in Stripe's documentation.
There are multiple test cards that can simulate any scenario, including error codes. Here are two examples:
Brand | Number | CVC | Date | Result |
---|---|---|---|---|
Visa | 4242424242424242 | Any 3 digits | Any future date | success |
Visa | 4000000000009995 | Any 3 digits | Any future date | card_declined, insufficient_funds |
Visa | 4000000000003220 | Any 3 digits | Any future date | success, goes through 3DS authentication |