PaymentConfiguration class

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');

Constructors

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

Properties

hashCode int
The hash code for this object.
no setterinherited
provider PayProvider
The payment provider for this configuration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parameterMap() 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.