From 69478bdbf181ed147cf9c440b2da68f193353e49 Mon Sep 17 00:00:00 2001 From: Dinh Tran Date: Tue, 7 Oct 2025 18:09:11 +0700 Subject: [PATCH 1/7] add docs about payment/shipping provider settings validation --- .../key-concepts/payment-providers.md | 18 ++++++++++++++++++ .../key-concepts/shipping-providers.md | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/16/umbraco-commerce/key-concepts/payment-providers.md b/16/umbraco-commerce/key-concepts/payment-providers.md index bb69586fb96..bd2d1b89244 100644 --- a/16/umbraco-commerce/key-concepts/payment-providers.md +++ b/16/umbraco-commerce/key-concepts/payment-providers.md @@ -35,10 +35,28 @@ public class MyPaymentProviderSettings All Payment Providers inherit from a base class `AsyncPaymentProviderBase`. `TSettings` is the type of a Plain Old Class Object (POCO) model class representing the Payment Provider's settings. The class must be decorated with `PaymentProviderAttribute` which defines the Payment Providers `alias`. +### Payment Provider Settings The settings class consists of a series of properties, each decorated with a `PaymentProviderSettingAttribute`. These will all be used to dynamically build an editor interface for the given settings in the backoffice. Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. +{% hint style="info" %} +The **Validate Payment Provider Settings** feature has been available since Umbraco Commerce 16.4.0. +{% endhint %} + +Umbraco Commerce supports validating payment provider settings by using `System.ComponentModel.DataAnnotations.ValidationAttribute`. + +```csharp +public class MyPaymentProviderSettings +{ + [System.ComponentModel.DataAnnotations.Required] // Validation Attribute + [System.ComponentModel.DataAnnotations.StringLength(100)] // Validation Attribute + [PaymentProviderSetting(SortOrder = 100)] + public string ContinueUrl { get; set; } + ... +} +``` + ## Payment Provider Responsibilities There are two main responsibilities of a Payment Provider, and those are: diff --git a/16/umbraco-commerce/key-concepts/shipping-providers.md b/16/umbraco-commerce/key-concepts/shipping-providers.md index 6230d22fcf9..68cf8bc6978 100644 --- a/16/umbraco-commerce/key-concepts/shipping-providers.md +++ b/16/umbraco-commerce/key-concepts/shipping-providers.md @@ -35,10 +35,27 @@ public class MyShippingProviderSettings All Shipping Providers inherit from a base class `ShippingProviderBase`. `TSettings` is the type of a Plain Old Class Object (POCO) model class representing the Shipping Provider's settings. The class must be decorated with `ShippingProviderAttribute` which defines the Shipping Providers `alias`. +### Shipping Provider Settings The settings class consists of a series of properties, each decorated with a `ShippingProviderSettingAttribute`. These will all be used to dynamically build an editor interface for the given settings in the backoffice. Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. +{% hint style="info" %} +The **Validate Shipping Provider Settings** feature has been available since Umbraco Commerce 16.4.0. +{% endhint %} + +Umbraco Commerce supports validating shipping provider settings by using `System.ComponentModel.DataAnnotations.ValidationAttribute`. + +```csharp +public class MyShippingProviderSettings +{ + [System.ComponentModel.DataAnnotations.Required] // Validation Attribute + [System.ComponentModel.DataAnnotations.StringLength(100)] // Validation Attribute + [ShippingProviderSetting(SortOrder = 100)] + public string ContinueUrl { get; set; } + ... +} +``` ## Shipping Provider Responsibilities The responsibilities of a Shipping Provider are: From 7022d265553a354345f779e6fc643b94e0fe06cf Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:42:59 +0200 Subject: [PATCH 2/7] Update 16/umbraco-commerce/key-concepts/payment-providers.md --- 16/umbraco-commerce/key-concepts/payment-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/payment-providers.md b/16/umbraco-commerce/key-concepts/payment-providers.md index bd2d1b89244..2492554130c 100644 --- a/16/umbraco-commerce/key-concepts/payment-providers.md +++ b/16/umbraco-commerce/key-concepts/payment-providers.md @@ -44,7 +44,7 @@ Labels and descriptions for providers and their settings are controlled through The **Validate Payment Provider Settings** feature has been available since Umbraco Commerce 16.4.0. {% endhint %} -Umbraco Commerce supports validating payment provider settings by using `System.ComponentModel.DataAnnotations.ValidationAttribute`. +Umbraco Commerce supports validating payment provider settings using the `System.ComponentModel.DataAnnotations.ValidationAttribute` class. ```csharp public class MyPaymentProviderSettings From 9978b5d919ab94a24109d99dd2e53747582b7ed7 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:43:06 +0200 Subject: [PATCH 3/7] Update 16/umbraco-commerce/key-concepts/payment-providers.md --- 16/umbraco-commerce/key-concepts/payment-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/payment-providers.md b/16/umbraco-commerce/key-concepts/payment-providers.md index 2492554130c..db358fa9d73 100644 --- a/16/umbraco-commerce/key-concepts/payment-providers.md +++ b/16/umbraco-commerce/key-concepts/payment-providers.md @@ -36,7 +36,7 @@ public class MyPaymentProviderSettings All Payment Providers inherit from a base class `AsyncPaymentProviderBase`. `TSettings` is the type of a Plain Old Class Object (POCO) model class representing the Payment Provider's settings. The class must be decorated with `PaymentProviderAttribute` which defines the Payment Providers `alias`. ### Payment Provider Settings -The settings class consists of a series of properties, each decorated with a `PaymentProviderSettingAttribute`. These will all be used to dynamically build an editor interface for the given settings in the backoffice. +The settings class consists of a series of properties, each decorated with a `PaymentProviderSettingAttribute`. These attributes are used to dynamically build an editor interface for the settings in the backoffice. Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. From b389e476e526cc2893c5a633c70e8b43d6680e55 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:43:13 +0200 Subject: [PATCH 4/7] Update 16/umbraco-commerce/key-concepts/payment-providers.md --- 16/umbraco-commerce/key-concepts/payment-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/payment-providers.md b/16/umbraco-commerce/key-concepts/payment-providers.md index db358fa9d73..f05f6eafb82 100644 --- a/16/umbraco-commerce/key-concepts/payment-providers.md +++ b/16/umbraco-commerce/key-concepts/payment-providers.md @@ -41,7 +41,7 @@ The settings class consists of a series of properties, each decorated with a `Pa Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. {% hint style="info" %} -The **Validate Payment Provider Settings** feature has been available since Umbraco Commerce 16.4.0. +The **Validate Payment Provider Settings** feature is available in Umbraco Commerce 16.4.0 and later. {% endhint %} Umbraco Commerce supports validating payment provider settings using the `System.ComponentModel.DataAnnotations.ValidationAttribute` class. From d1dfec72c71f9bd376b3d40baffcf234ab30b29e Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:43:22 +0200 Subject: [PATCH 5/7] Update 16/umbraco-commerce/key-concepts/shipping-providers.md --- 16/umbraco-commerce/key-concepts/shipping-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/shipping-providers.md b/16/umbraco-commerce/key-concepts/shipping-providers.md index 68cf8bc6978..3eb3ab01c9e 100644 --- a/16/umbraco-commerce/key-concepts/shipping-providers.md +++ b/16/umbraco-commerce/key-concepts/shipping-providers.md @@ -36,7 +36,7 @@ public class MyShippingProviderSettings All Shipping Providers inherit from a base class `ShippingProviderBase`. `TSettings` is the type of a Plain Old Class Object (POCO) model class representing the Shipping Provider's settings. The class must be decorated with `ShippingProviderAttribute` which defines the Shipping Providers `alias`. ### Shipping Provider Settings -The settings class consists of a series of properties, each decorated with a `ShippingProviderSettingAttribute`. These will all be used to dynamically build an editor interface for the given settings in the backoffice. +The settings class consists of a series of properties, each decorated with a `ShippingProviderSettingAttribute`. These attributes are used to dynamically build an editor interface for the settings in the backoffice. Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. From d6dd8f980015bd632b190138e0d870aa2929dafc Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:43:29 +0200 Subject: [PATCH 6/7] Update 16/umbraco-commerce/key-concepts/shipping-providers.md --- 16/umbraco-commerce/key-concepts/shipping-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/shipping-providers.md b/16/umbraco-commerce/key-concepts/shipping-providers.md index 3eb3ab01c9e..1e61ddd3d2b 100644 --- a/16/umbraco-commerce/key-concepts/shipping-providers.md +++ b/16/umbraco-commerce/key-concepts/shipping-providers.md @@ -41,7 +41,7 @@ The settings class consists of a series of properties, each decorated with a `Sh Labels and descriptions for providers and their settings are controlled through [Localization](#localization) entries. {% hint style="info" %} -The **Validate Shipping Provider Settings** feature has been available since Umbraco Commerce 16.4.0. +The **Validate Shipping Provider Settings** feature is available in Umbraco Commerce 16.4.0 and later {% endhint %} Umbraco Commerce supports validating shipping provider settings by using `System.ComponentModel.DataAnnotations.ValidationAttribute`. From 9b102d53528d993a851dad47648a05cd20966244 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:43:35 +0200 Subject: [PATCH 7/7] Update 16/umbraco-commerce/key-concepts/shipping-providers.md --- 16/umbraco-commerce/key-concepts/shipping-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-commerce/key-concepts/shipping-providers.md b/16/umbraco-commerce/key-concepts/shipping-providers.md index 1e61ddd3d2b..14d7a8b0c6b 100644 --- a/16/umbraco-commerce/key-concepts/shipping-providers.md +++ b/16/umbraco-commerce/key-concepts/shipping-providers.md @@ -44,7 +44,7 @@ Labels and descriptions for providers and their settings are controlled through The **Validate Shipping Provider Settings** feature is available in Umbraco Commerce 16.4.0 and later {% endhint %} -Umbraco Commerce supports validating shipping provider settings by using `System.ComponentModel.DataAnnotations.ValidationAttribute`. +Umbraco Commerce supports validating shipping provider settings using the `System.ComponentModel.DataAnnotations.ValidationAttribute` class. ```csharp public class MyShippingProviderSettings