### Stripe Test Card Details for Payment Simulation Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/stripe-payment.md Examples of test credit card numbers provided by Stripe for simulating various payment outcomes without using real financial data. These cards can be used to test successful transactions, card declines due to insufficient funds, and scenarios requiring 3D Secure authentication. ```Text 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 ``` -------------------------------- ### Configuring Exactly® API in Orchard Core Commerce Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/exactly-payment.md Detailed steps to set up and verify the Exactly® payment gateway within the Orchard Core Commerce administration dashboard, including obtaining necessary credentials and testing the API connection. ```Instructions 1. Sign up to Exactly® using the partner link: https://application.exactly.com/?utm_source=partner&utm_medium=kirill&utm_campaign=LOMBIQ 2. Ask your contact person for: - Whitelist for your web domain. - A sandbox project for testing (if needed). - A live project for your final site. 3. Go to https://dashboard.exactly.com/projects/. 4. Take note of your Project ID and Project API key. 5. On your Orchard Core tenant, go to Admin dashboard → Configuration → Features. 6. Enable the 'Orchard Core Commerce - Payment - Exactly' feature. 7. Go to Admin dashboard → Configuration → Commerce → Exactly API. 8. Fill out the Project ID and API key fields. 9. Save and then click 'Verify currently saved API configuration' to test. This creates a new transaction viewable at https://dashboard.exactly.com/transactions. ``` -------------------------------- ### Python Documentation Build Dependencies Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/requirements.txt This snippet provides the list of Python packages and their minimum required versions used to build the documentation for the OrchardCore Commerce project. These dependencies are typically managed using `pip` and a `requirements.txt` file. ```Python mkdocs>=1.6.0 mkdocs-material>=9.5.20 mkdocs-git-authors-plugin>=0.8.0 mkdocs-git-revision-date-localized-plugin>=1.2.5 pymdown-extensions>=10.8.1 mkdocs-exclude>=1.0.2 mdx_truly_sane_lists>=1.2 ``` -------------------------------- ### Configure Stripe CLI for Local Webhook Testing Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/stripe-payment.md Instructions to set up the Stripe CLI for forwarding webhook events to a local development environment. This process involves logging into your Stripe account via the CLI, setting up a listener to forward events to your local application's webhook endpoint, and then copying the generated webhook key into your Orchard Core site's Stripe API settings. ```CLI stripe login stripe listen --forward-to https://localhost:5001/stripe-webhook ``` -------------------------------- ### Exactly® Test Card Details for Sandbox Environment Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/exactly-payment.md Provides a list of test card numbers, CVCs, and dates for various brands (Visa, Mastercard) to simulate different transaction outcomes (insufficient funds, 3DS success/failure, generic success) within the Exactly® sandbox environment. Notes currency limitations. ```Table Data | 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 | Note: 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. ``` -------------------------------- ### Minimal API: Headless Stripe Integration Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md These minimal API endpoints provide full interaction with the Orchard Core Commerce Stripe implementation in a headless manner, allowing for custom payment flows. ```APIDOC Endpoint: ~/api/stripe/* Description: Full interaction with Stripe implementation in a headless manner. ``` -------------------------------- ### Exactly® Payment Technical Overview and Transaction Flow Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/exactly-payment.md Describes the technical architecture and transaction flow for Exactly® payments, emphasizing the redirect-based approach that enhances security by preventing the OrchardCore.Commerce site from handling sensitive payment information. Outlines the sequence of events from checkout button click to transaction validation. ```Flow Description This module uses redirects to communicate with the payment processor, ensuring the OrchardCore.Commerce site never sees the buyer's payment information. Transaction Flow: - JS script sends a POST request containing checkout page contents (e.g., addresses). - C# backend creates a new Order content item from checkout data and stored shopping cart. - C# backend sends a POST request to the Exactly API including the order total and the return URL. - JS script receives a redirect URL (on Exactly's domain) as response, then navigates there. - Payment continues on Exactly's domain, then redirects back to the return URL. - C# backend validates the transaction state, updates the Order, and redirects to the Success page. ``` -------------------------------- ### ProductPart Fields and Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/product-part.md Defines the core fields and properties available on the ProductPart, including SKU, CanBeBought status, and ProductImage. These properties are crucial for product identification, inventory management, and visual representation. ```APIDOC ProductPart: SKU: Type: string Description: The product's stock keeping unit, used for identification purposes. Must be globally unique and cannot contain the hyphen (-) character. CanBeBought: Type: IDictionary Description: Determines whether the product can currently be bought based on current inventory settings. If there is no `InventoryPart` on the product, it is unused. This is not editable in the product's editor. ProductImage: Type: MediaField Description: Allows selecting an image from the Media Library that will be displayed on the product's page. ``` -------------------------------- ### Configure Lombiq Analyzers Path in Directory.Build.props Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/Readme.md This XML snippet demonstrates how to configure the `LombiqAnalyzersPath` property within a `Directory.Build.props` file. This configuration is essential when Lombiq Analyzers are included as a submodule in your project, ensuring that the build system correctly identifies and utilizes the analyzer tools. ```XML $(MSBuildThisFileDirectory)/tools/Lombiq.Analyzers ``` -------------------------------- ### Orchard Core Commerce Content Fields Reference Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/src/Modules/OrchardCore.Commerce.ContentFields/Readme.md Details the commerce-specific content fields available in Orchard Core, including their purpose and components for each field type. ```APIDOC AddressField: Description: A field that contains parts of an address. Components: - Country - Region - Street Address - etc. AmountField: Description: A field that contains a numeric value and a currency. Components: - Numeric Value - Currency ``` -------------------------------- ### Minimal API: Free Item Checkout Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md This minimal API endpoint facilitates ordering the contents of a shopping cart that exclusively contains free items, bypassing the standard payment process. ```APIDOC Endpoint: ~/api/checkout/free/{shoppingCartId?} Method: POST Description: Order free items, skipping payment. ``` -------------------------------- ### Jinja2/Liquid Template for Page Structure and Disqus Integration Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/theme/main.html This template snippet extends a base HTML template, dynamically displays page authors from a 'git_info' object, and includes a Disqus comment section partial. It's commonly used in content management systems like Orchard Core for rendering dynamic page elements. It expects 'git_info' to be available in the context, containing a 'page_authors' list. ```Jinja2 {% extends "base.html" %} {% block disqus %} Authors: {% if git\_info %} {%- for author in git\_info.get('page\_authors') -%} {{ author.name }}{% if not loop.last %}, {% endif %} {%- endfor -%} {% endif %} {% include "partials/integrations/disqus.html" %} {% endblock %} ``` -------------------------------- ### PricePart Fields and Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/price-part.md Details the fields and properties available within the PricePart, specifically the PriceField, which is used to set the base price of a product. ```APIDOC PricePart: Fields and properties: PriceField: Type: PriceField Description: Sets the base price of a product using a decimal number and a currency. The final price of a product may differ based on other features that implement IShoppingCartEvents, like promotions and tax settings. ``` -------------------------------- ### Minimal API: Shopping Cart Management Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md This minimal API endpoint allows comprehensive interaction with the shopping cart, supporting operations to retrieve cart contents, update the cart, and add or remove items. ```APIDOC Endpoint: ~/api/shoppingcart/{shoppingCartId?} Methods: GET, POST, PUT, DELETE Description: Get contents, update, add/remove items. ``` -------------------------------- ### OrchardCore.Commerce Workflow Event: Order was created Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/workflows.md Executes when an order is created on the frontend. This event does not expect an output and can be used for other automation tasks. ```APIDOC Event: "Order was created" Description: Executes when an order is created on the frontend. Inputs: - ContentItem: ContentItem object of the Order content item that has just been created. Outputs: None expected. ``` -------------------------------- ### Custom Payment Provider Implementation Requirements Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/payment-providers.md Details the necessary components and interfaces for integrating a custom payment provider into Orchard Core Commerce, including service registration, shape definition, and key `IPaymentProvider` methods used by the `CheckoutController`. ```APIDOC Custom Payment Provider Requirements: - Service Registration: - An implementation of `IPaymentProvider` must be registered as a service. - Shape Definition: - A shape type `Checkout{provider.Name}` is required (e.g., _CheckoutStripe.cshtml_, _CheckoutDummy.cshtml_). - This shape contains the payment button and front-end logic for calling the payment processor. - Callback URL: - Use the `~/checkout/callback/{providerName}/{orderId?}` action for handling payment callbacks. - IPaymentProvider Interface: - Contains implementable methods used by the `CheckoutController`. - Key method mentioned: `UpdateAndRedirectToFinishedOrderAsync()` (used to resolve pending orders). ``` -------------------------------- ### InventoryPart Fields and Properties API Reference Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/inventory-part.md Defines the fields and properties available on the `InventoryPart` for managing product inventory, back orders, and order quantities. These fields control various aspects of product availability and order validation. ```APIDOC InventoryPart: Fields and Properties: AllowsBackOrder: Type: BooleanField Description: When set to true, product can be ordered even when the Inventory field's value is below 1. IgnoreInventory: Type: BooleanField Description: When set to true, all inventory checks (within InventoryShoppingCartEvents) are bypassed. Inventory: Type: IDictionary Description: Sets the number of available products. Uses a Dictionary object to keep track of multiple inventories (which is mostly relevant for products with a PriceVariantsPart attached to them). MaximumOrderQuantity: Type: NumericField Description: Determines the maximum amount of products that can be placed in an order. Also sets the upper limit for the _Quantity_ input on the product's page. This field is ignored if its value is set to 0 or below. MinimumOrderQuantity: Type: NumericField Description: Determines the minimum amount of products that can be placed in an order. Also sets the lower limit for the _Quantity_ input on the product's page. This field is ignored if its value is set to 0 or below. OutOfStockMessage: Type: HtmlField Description: Enables providing a specific message for an out of stock product. Defaults to "Out of Stock". ``` -------------------------------- ### Minimal API: Payment Request Status Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md This minimal API endpoint returns information about a specified Order, indicating whether payment is required for that order. ```APIDOC Endpoint: ~/api/checkout/payment-request/{orderId} Method: GET Description: Returns information on whether an order needs to be paid. ``` -------------------------------- ### PriceVariantsPart Fields and Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/price-variants-part.md Defines the properties available on the PriceVariantsPart for managing product variants and their prices. ```APIDOC PriceVariantsPart: Properties: Variants: Type: IDictionary Description: This property stores each variant's SKU along with their price. ``` -------------------------------- ### IPaymentIntentPersistence Interface Method Changes Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/4.0.0.md Documentation for the breaking changes in the `IPaymentIntentPersistence` interface, where synchronous methods have been replaced by asynchronous counterparts requiring `await`. This change affects how payment intent persistence operations are performed. ```APIDOC Interface: IPaymentIntentPersistence Breaking Change: Methods are now asynchronous and require awaiting. Old Methods (Synchronous): - Retrieve(paymentIntentId: string) - Store(paymentIntent: PaymentIntent) - Remove(paymentIntentId: string) New Methods (Asynchronous): - RetrieveAsync(paymentIntentId: string, shoppingCartId: string = null): Task - Description: Retrieves a payment intent asynchronously. - Parameters: - paymentIntentId: string - The ID of the payment intent. - shoppingCartId: string (optional) - The ID of the shopping cart associated with the payment intent. - Returns: Task - A task representing the asynchronous operation, yielding the retrieved PaymentIntent. - StoreAsync(paymentIntent: PaymentIntent, shoppingCartId: string = null): Task - Description: Stores a payment intent asynchronously. - Parameters: - paymentIntent: PaymentIntent - The payment intent object to store. - shoppingCartId: string (optional) - The ID of the shopping cart associated with the payment intent. - Returns: Task - A task representing the asynchronous operation. - RemoveAsync(paymentIntentId: string, shoppingCartId: string = null): Task - Description: Removes a payment intent asynchronously. - Parameters: - paymentIntentId: string - The ID of the payment intent to remove. - shoppingCartId: string (optional) - The ID of the shopping cart associated with the payment intent. - Returns: Task - A task representing the asynchronous operation. ``` -------------------------------- ### Stripe API Endpoint Changes: Payment Parameters Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md The `ConfirmPaymentParameters` action in `StripeController` has been updated, with its path changed from `checkout/params/Stripe` to `stripe/params`. ```APIDOC Old Path: checkout/params/Stripe New Path: stripe/params Action: ConfirmPaymentParameters ``` -------------------------------- ### TextProductAttributeField Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/text-product-attribute-field.md Defines the configurable fields and properties for the TextProductAttributeField, including their types and descriptions, which control its behavior and display on the product page. ```APIDOC TextProductAttributeField Properties: Hint (string): Sets the description text to display for this attribute on the product's page. Required (bool): Determines whether a value is required. DefaultValue (T): Sets the default value. Placeholder (string): Sets the hint to display when the input is empty. PredefinedValues (IEnumerable): Holds the set of allowed values. These are also used to create variants with a `PriceVariantsPart`. RestrictToPredefinedValues (bool): Determines whether values should be restricted to the set of predefined values. When true, the field is displayed as a list of radio buttons. Note that this must be set to true for `PriceVariantsPart` to pick up the values. MultipleValues (bool): Determines whether multiple values can be selected. This only makes sense when _RestrictToPredefinedValues_ is true. If enabled, the predefined values are displayed as a list of checkboxes. ``` -------------------------------- ### Stripe Test API Keys for Orchard Core Commerce Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/stripe-payment.md Public sample test API keys provided by Stripe for testing purposes. These include the publishable key, secret key, and a sample webhook signing key. It is crucial not to submit any personally identifiable information when using these public test keys. ```Text Publishable key: pk_test_51H59owJmQoVhz82aWAoi9M5s8PC6sSAqFI7KfAD2NRKun5riDIOM0dvu2caM25a5f5JbYLMc5Umxw8Dl7dBIDNwM00yVbSX8uS Secret key: sk_test_51H59owJmQoVhz82OUNOuCVbK0u1zjyRFKkFp9EfrqzWaUWqQni3oSxljsdTIu2YZ9XvlbeGjZRU7B7ye2EjJQE000Dm2DtMWD Webhook signing key: whsec_453d1046fc31377b7a93... ``` -------------------------------- ### OrchardCore.Commerce Workflow Event: Verifying cart item Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/workflows.md Executes before an item is added to the shopping cart to check whether it can be added based on inventory status. This event allows returning an error message if validation fails. ```APIDOC Event: "Verifying cart item" Description: Executes before an item is added to the shopping cart to check whether it can be added based on inventory status. Input: - Context: ShoppingCartItem object - JSON: Serialized version of Context Outputs: - Error: LocalizedHtmlString or null (error message to be displayed if item can't be added; no output if validation passes) ``` -------------------------------- ### BooleanProductAttributeField Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/boolean-product-attribute-field.md Defines the configurable fields and properties for the BooleanProductAttributeField, including hint text, default value, and label, which control its behavior and display on the product page. ```APIDOC BooleanProductAttributeField Properties: Hint: Type: string Description: Sets the description text to display for this attribute on the product's page. DefaultValue: Type: T Description: Sets the default value. Label: Type: string Description: Sets the text associated to the checkbox for this attribute on the product page. ``` -------------------------------- ### Stripe API Endpoint Changes: Payment Confirmation Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md The `PaymentConfirmationMiddleware` action in `StripeController` has been updated, with its action name changed to `PaymentConfirmation` and its path from `checkout/middleware/Stripe` to `stripe/middleware`. ```APIDOC Old Action/Path: PaymentConfirmationMiddleware (checkout/middleware/Stripe) New Action/Path: PaymentConfirmation (stripe/middleware) ``` -------------------------------- ### OrchardCore.Commerce Workflow Event: Cart displaying Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/workflows.md Executes after the shopping cart data is prepared, but before the shapes are rendered. This event allows modification of shopping cart headers and lines for display purposes. ```APIDOC Event: "Cart displaying" Description: Executes after the shopping cart data is prepared, but before the shapes are rendered. Input: - Context: ShoppingCartDisplayingEventContext object (current shopping cart's headers and lines) - JSON: Serialized version of Context Outputs (optional): - Headers: LocalizedHtmlString array (shopping cart header labels in order) Note: For multiple locales, use { Name: string, Value: string } format, as LocalizedHtmlString.Name is used for template generation. - Lines: ShoppingCartLineViewModel array (for display purposes only; usually not altered) ``` -------------------------------- ### OrchardCore.Commerce Workflow Event: Product added to cart Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/workflows.md Executes when a product is added to the shopping cart. This event does not expect an output and can be used for other automation tasks. ```APIDOC Event: "Product added to cart" Description: Executes when a product is added to the shopping cart. Inputs: - LineItem: ShoppingCartItem object Outputs: None expected. ``` -------------------------------- ### NumericProductAttributeField Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/numeric-product-attribute-field.md Defines the configurable properties for the NumericProductAttributeField, which allows capturing numeric input from buyers. Note that this attribute is currently not supported for price variant creation. ```APIDOC NumericProductAttributeField: Properties: - Hint (string): Sets the description text to display for this attribute on the product's page. - DefaultValue (T): Sets the default value. - Required (bool): Determines whether a value is required. - Placeholder (string): Sets the hint to display when the input is empty. - DecimalPlaces (string): Sets the number of digits possible after the decimal point. - Minimum (string): Determines the minimum value allowed. - Maximum (string): Determines the maximum value allowed. ``` -------------------------------- ### Liquid Filter: Format Amount to String Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/releases/3.0.0.md The `amount_to_string` Liquid filter processes an input object as an `Amount` and formats it like `Amount.ToString()` in C#. It supports specifying a decimal separator and can format any numeric value as a given currency. ```Liquid {{ value | amount_to_string: dot: "," }} {{ value | amount_to_string: currency: "EUR" }} ``` -------------------------------- ### OrchardCore.Commerce Workflow Event: Cart loaded Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/workflows.md Executes after the shopping cart content is loaded from the store and before it's displayed or used for calculation. This event allows altering the shopping cart object. It's crucial to use the `input('JSON')` for outputting changes due to custom JSON converters. ```APIDOC Event: "Cart loaded" Description: Executes after the shopping cart content is loaded from the store and before it's displayed or used for calculation. Input: - Context: ShoppingCart object - JSON: Serialized version of Context Outputs: - ShoppingCart: ShoppingCart object (an altered version of the input; can be skipped if no changes are necessary) Note: Only use input('JSON') for outputting changes, as ShoppingCart has custom JSON converters that only correctly serialize in .NET code. ``` -------------------------------- ### TieredPricePart Fields and Properties Source: https://github.com/orchardcms/orchardcore.commerce/blob/main/docs/features/tiered-price-part.md Defines the data structure for setting tiered prices on a product, including a default price and a list of price tiers. These properties control how product prices adjust based on purchase quantity. ```APIDOC TieredPricePart: Fields and properties: DefaultPrice: Type: Amount Description: Sets the base price of the product, which will be applicable until the selected quantity reaches one of the specified tiers. PriceTiers: Type: IList Description: A list of PriceTiers that determine which price to use at which quantity. The currency of these prices follows the currency set for the DefaultPrice property. If there are no tiers specified, the DefaultPrice's value is used in all cases. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.