PaymentMethodTypeMapper
public class PaymentMethodTypeMapper: NSObject
Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.
-
This function returns the
PaymentMethodTypebased on the Datatrans payment method identifier.Declaration
Swift
public static func toType(identifier: String) -> PaymentMethodType?Parameters
identifierThe payment method identifier from Datatrans
Return Value
The payment method type, e.g. Visa, or nil if
identifieris invalid -
This function returns the
PaymentMethodTypebased on the Datatrans payment method identifier.This is for use from Objective-C only. The returned
NSNumbercontains therawValueof aDTPaymentMethodType.Declaration
Swift
public static func toTypeObjc(identifier: String) -> NSNumber?Parameters
identifierThe payment method identifier from Datatrans
Return Value
The payment method type, e.g. Visa, or nil if
identifieris invalid -
This function returns the payment method identifier based on the
PaymentMethodType.Declaration
Swift
public static func toIdentifier(type: PaymentMethodType) -> StringParameters
typeThe payment method type, e.g. Visa
Return Value
The payment method identifier
View on GitHub