Skip to content
20 changes: 19 additions & 1 deletion 16/umbraco-commerce/key-concepts/payment-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,28 @@ public class MyPaymentProviderSettings

All Payment Providers inherit from a base class `AsyncPaymentProviderBase<TSettings>`. `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`.

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.
### Payment Provider Settings
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.

{% hint style="info" %}
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.

```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:
Expand Down
19 changes: 18 additions & 1 deletion 16/umbraco-commerce/key-concepts/shipping-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,27 @@ public class MyShippingProviderSettings

All Shipping Providers inherit from a base class `ShippingProviderBase<TSettings>`. `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`.

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.
### Shipping Provider Settings
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.

{% hint style="info" %}
The **Validate Shipping Provider Settings** feature is available in Umbraco Commerce 16.4.0 and later
{% endhint %}

Umbraco Commerce supports validating shipping provider settings using the `System.ComponentModel.DataAnnotations.ValidationAttribute` class.

```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:
Expand Down