PaymentConfiguration class Null safety

An object that holds information about a payment transaction.

This object helps load and store configuration information needed to issue a payment transaction for a given provider. It offers multiple options to create an instance, based on the source of the configuration.

For example, if the payment configuration is in string format as a result of loading it from a remote server:

PaymentConfiguration.fromJsonString(
    '{"provider": "apple_pay", "data": {}}');

Or, if the configuration is loaded from the assets folder instead:

PaymentConfiguration.fromAsset('configuration_asset.json');
Implementers

Constructors

PaymentConfiguration.fromJsonString(String paymentConfigurationString)
Creates a PaymentConfiguration object from the paymentConfigurationString in JSON format.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
provider PayProvider
The payment provider for this configuration.
latefinal
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toMap() Future<Map<String, dynamic>>
Returns the core configuration map in this object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromAsset(String paymentConfigurationAsset, {ConfigLoader profileLoader = _defaultProfileLoader}) Future<PaymentConfiguration>
Creates a PaymentConfiguration object wrapped in a Future from a configuration loaded from an external source.