create

Creates a SavedPaymentMethod from a JSON string.

Use this method to deserialize a saved payment method. It takes a JSON string that has been created with toJson.

The JSON string is compatible with the iOS version of the Datatrans SDK.

Return

The decoded SavedPaymentMethod or one of its subclasses, if successful. null if jsonString is invalid or payment method is not supported

Parameters

jsonString

The JSON string representation.


fun create(legacySavedPaymentMethodData: ByteArray): SavedPaymentMethod?

Creates a SavedPaymentMethod from data encoded by the old payment library.

Return

The decoded SavedPaymentMethod or one of its subclasses, if successful, null if legacySavedPaymentMethodData is invalid or payment method is not supported

Parameters

legacySavedPaymentMethodData

Data encoded by Java object serialization instead of JSON serialization (toJson())