Skip to content

Commit

Permalink
iOS: Release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
skirsche-ieffects committed Apr 6, 2021
1 parent 6f0fd42 commit 825eb98
Show file tree
Hide file tree
Showing 68 changed files with 775 additions and 139 deletions.
Binary file modified Datatrans.xcframework/ios-arm64/Datatrans.framework/Assets.car
Binary file not shown.
Binary file modified Datatrans.xcframework/ios-arm64/Datatrans.framework/Datatrans
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@

#import <Foundation/Foundation.h>

typedef enum {
DTPaymentReturnsCreditCardNever = 1,
DTPaymentReturnsCreditCardSelectableDefaultNo,
DTPaymentReturnsCreditCardSelectableDefaultYes,
DTPaymentReturnsCreditCardAlways
} DTPaymentReturnsCreditCard;

typedef enum {
DTPaymentCardholderHidden = 0,
DTPaymentCardholderOptional,
Expand All @@ -32,7 +25,6 @@ typedef enum {
@property (nonatomic, assign) BOOL testing;
@property (nonatomic, assign) BOOL hideToolbarSecurityInfo;
@property (nonatomic, assign) BOOL showBackButtonOnFirstScreen;
@property (nonatomic, assign) DTPaymentReturnsCreditCard returnsCreditCard;
@property (nonatomic, assign) BOOL returnsAlias;
@property (nonatomic, assign) BOOL displayShippingDetails;
@property (nonatomic, assign) BOOL useWebCreditCardInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,27 +238,29 @@ SWIFT_CLASS_NAMED("ApplePayConfig")
+ (BOOL)hasApplePayWithSupportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks SWIFT_WARN_UNUSED_RESULT;
/// Creates a new Apple Pay configuration object with an Apple Pay country code.
/// If no countryCode is specified, the SDK will set Switzerland as the country code.
/// \param merchantIdentifier The merchant Identifier for Apple Pay.
/// \param applePayMerchantId The merchant identifier (Merchant ID) at Apple,
/// which you created together with the CSR file provided by Datatrans.
///
/// \param supportedNetworks Supported card acquirers.
///
/// \param countryCode Apple Pay country code
///
- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks countryCode:(NSString * _Nonnull)countryCode OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithApplePayMerchantId:(NSString * _Nonnull)applePayMerchantId supportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks countryCode:(NSString * _Nonnull)countryCode OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks;
- (nonnull instancetype)initWithApplePayMerchantId:(NSString * _Nonnull)applePayMerchantId supportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks;
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

enum DTPaymentMethodType : NSInteger;
@class NSCoder;

/// This is the base class for payment methods. It contains a type to identify the
/// payment method, e.g. Visa or Mastercard.
SWIFT_CLASS_NAMED("PaymentMethod")
@interface DTPaymentMethod : NSObject <NSCopying>
@interface DTPaymentMethod : NSObject <NSCoding, NSCopying>
/// Payment method type, e.g. Visa
@property (nonatomic, readonly) enum DTPaymentMethodType type;
/// This init method initializes a <code>PaymentMethod</code> object with the
Expand All @@ -268,6 +270,10 @@ SWIFT_CLASS_NAMED("PaymentMethod")
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCoding</code> protocol
- (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
Expand Down Expand Up @@ -298,6 +304,8 @@ SWIFT_CLASS_NAMED("Card")
/// \param cardholder Cardholder’s name
///
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type number:(NSString * _Nonnull)number expiryDate:(DTCardExpiryDate * _Nonnull)expiryDate cvv:(NSString * _Nullable)cvv cardholder:(NSString * _Nullable)cardholder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE;
@end

Expand Down Expand Up @@ -363,12 +371,25 @@ SWIFT_CLASS_NAMED("PaymentMethodToken")
/// \param jsonString String of JSON encoded data
///
+ (DTPaymentMethodToken * _Nullable)createWithJsonString:(NSString * _Nonnull)jsonString SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(ios,deprecated=13.0,message="Use create(data:decoder:) instead.");
/// Creates a <code>PaymentMethodToken</code> from data encoded by the old payment library.
/// \param legacyTokenData Data encoded by
/// <code>DTRecurringPaymentMethod.data()</code>, <code>DTCreditCard.data()</code>,
/// <code>DTPostFinanceCard.data()</code>, <code>DTReka.data()</code> or <code>DTPayPal.data()</code>.
///
///
/// returns:
/// The decoded <code>PaymentMethodToken</code>, <code>CardToken</code>,
/// <code>PostFinanceCardToken</code>, <code>RekaToken</code> or <code>PayPalToken</code>, if successful,
/// nil if <code>legacyTokenData</code> is invalid.
+ (DTPaymentMethodToken * _Nullable)createWithLegacyTokenData:(NSData * _Nonnull)legacyTokenData SWIFT_WARN_UNUSED_RESULT;
/// This function checks if the payment method token is valid. This function
/// will also be used to tell you if data (e.g. expiry date) from the token
/// subclasses is correct or not.
- (BOOL)isValid SWIFT_WARN_UNUSED_RESULT;
/// Refer to the <code>NSObject</code> protocol
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE;
Expand Down Expand Up @@ -412,6 +433,8 @@ SWIFT_CLASS_NAMED("CardToken")
@property (nonatomic, readonly, copy) NSString * _Nullable accessibilityTitle;
/// Checks if the expiration date is in the future or not.
- (BOOL)isValid SWIFT_WARN_UNUSED_RESULT;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSObject</code> protocol
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// Refer to the <code>NSCopying</code> protocol
Expand Down Expand Up @@ -442,6 +465,8 @@ SWIFT_CLASS_NAMED("PayPalToken")
@property (nonatomic, readonly, copy) NSString * _Nonnull displayTitle;
/// For VoiceOver this title is used instead of displayTitle.
@property (nonatomic, readonly, copy) NSString * _Nullable accessibilityTitle;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token SWIFT_UNAVAILABLE;
Expand Down Expand Up @@ -541,6 +566,8 @@ SWIFT_CLASS_NAMED("PostFinanceCardToken")
/// \param cardholder Cardholder’s name
///
- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token cardExpiryDate:(DTCardExpiryDate * _Nullable)cardExpiryDate maskedCardNumber:(NSString * _Nullable)maskedCardNumber cardholder:(NSString * _Nullable)cardholder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCoding</code> protocol
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token cardExpiryDate:(DTCardExpiryDate * _Nullable)cardExpiryDate maskedCardNumber:(NSString * _Nullable)maskedCardNumber cardholder:(NSString * _Nullable)cardholder SWIFT_UNAVAILABLE;
Expand Down Expand Up @@ -570,6 +597,7 @@ SWIFT_CLASS_NAMED("RekaToken")
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token cardExpiryDate:(DTCardExpiryDate * _Nullable)cardExpiryDate maskedCardNumber:(NSString * _Nullable)maskedCardNumber cardholder:(NSString * _Nullable)cardholder OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end


Expand Down Expand Up @@ -605,6 +633,7 @@ SWIFT_CLASS_NAMED("SEPAToken")
/// Refer to the <code>NSCopying</code> protocol
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end

@class UIColor;
Expand Down Expand Up @@ -690,7 +719,7 @@ SWIFT_CLASS_NAMED("Transaction")
/// used to present the user interface during an on-going transaction
///
- (void)startWithPresentingController:(UIViewController * _Nonnull)presentingController;
/// This function is called when an error occurred during a transaction.
/// :nodoc:
- (void)didHandleError:(NSError * _Nonnull)error;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
Expand Down Expand Up @@ -740,7 +769,6 @@ SWIFT_PROTOCOL_NAMED("TransactionDelegate")
@end

@class NSNumber;
@class NSCoder;

/// This class includes the error message and other details of a transaction.
SWIFT_CLASS_NAMED("TransactionError")
Expand All @@ -767,9 +795,7 @@ SWIFT_CLASS_NAMED("TransactionOptions")
/// Specify the <code>ApplePayConfig</code> object here. This is mandatory
/// for Apple Pay transactions.
@property (nonatomic, strong) DTApplePayConfig * _Nullable applePayConfig;
/// A set of merchant-defined key-value pairs of type <code>String</code>.
/// Properties are sent along with the transaction requests and
/// posted to the merchant’s PostURL.
/// :nodoc:
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nullable merchantProperties;
/// Use this setting to display or hide critical and transaction errors.
@property (nonatomic) BOOL suppressTransactionErrorDialog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ FOUNDATION_EXPORT const unsigned char DatatransVersionString[];

#import <Datatrans/DTApplePayDelegate.h>

// Private, but required in .framework
#import <Datatrans/DTErrorHandlerDelegate.h>
#import <Datatrans/DTPaymentMethodIdentifiers.h>
#import <Datatrans/DTPaymentMethodInfo.h>

// Private
#import <Datatrans/CardIOCreditCardInfo.h>
#import <Datatrans/CardIODetectionMode.h>
Expand All @@ -32,7 +37,6 @@ FOUNDATION_EXPORT const unsigned char DatatransVersionString[];
#import <Datatrans/DTByjunoPaymentInfo.h>
#import <Datatrans/DTCustomer.h>
#import <Datatrans/DTDate.h>
#import <Datatrans/DTErrorHandlerDelegate.h>
#import <Datatrans/DTErrorHandler.h>
#import <Datatrans/DTErrorPresenter.h>
#import <Datatrans/DTExternalWebAppDelegateProxy.h>
Expand All @@ -43,8 +47,6 @@ FOUNDATION_EXPORT const unsigned char DatatransVersionString[];
#import <Datatrans/DTLockScreenPresenter.h>
#import <Datatrans/DTNetworking.h>
#import <Datatrans/DTPaymentAuthorizationRequest.h>
#import <Datatrans/DTPaymentMethodIdentifiers.h>
#import <Datatrans/DTPaymentMethodInfo.h>
#import <Datatrans/DTPaymentModel.h>
#import <Datatrans/DTPaymentOptions.h>
#import <Datatrans/DTPaymentRequest.h>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import WebKit
@objc public var cvv: Swift.String?
@objc public var cardholder: Swift.String?
@objc public init(type: Datatrans.PaymentMethodType, number: Swift.String, expiryDate: Datatrans.CardExpiryDate, cvv: Swift.String?, cardholder: Swift.String?)
@objc required public init?(coder: Foundation.NSCoder)
@objc deinit
@objc override public init(type: Datatrans.PaymentMethodType)
}
Expand All @@ -44,6 +45,7 @@ import WebKit
@objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc deinit
@objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?)
@objc required public init?(coder: Foundation.NSCoder)
}
@_inheritsConvenienceInitializers @objc(DTTransactionOptions) @objcMembers public class TransactionOptions : ObjectiveC.NSObject {
@objc public var appCallbackScheme: Swift.String?
Expand Down Expand Up @@ -115,6 +117,7 @@ import WebKit
@objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc deinit
@objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String)
@objc required public init?(coder: Foundation.NSCoder)
}
@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) @objcMembers public class PaymentMethodTypeMapper : ObjectiveC.NSObject {
@objc public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType
Expand All @@ -124,6 +127,7 @@ import WebKit
}
@_hasMissingDesignatedInitializers @objc(DTPostFinanceCardToken) @objcMembers public class PostFinanceCardToken : Datatrans.CardToken {
@objc public init(token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?)
@objc required public init?(coder: Foundation.NSCoder)
@objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc deinit
@objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?)
Expand Down Expand Up @@ -168,6 +172,7 @@ import WebKit
}
@objc override public func isValid() -> Swift.Bool
override public func encode(to encoder: Swift.Encoder) throws
@objc required public init?(coder: Foundation.NSCoder)
@objc override dynamic public var description: Swift.String {
@objc get
}
Expand All @@ -183,18 +188,20 @@ import WebKit
}
@objc public var showLargeButton: Swift.Bool
@objc public class func hasApplePay(withSupportedNetworks supportedNetworks: [PassKit.PKPaymentNetwork]) -> Swift.Bool
@objc public init(merchantIdentifier: Swift.String, supportedNetworks: [PassKit.PKPaymentNetwork], countryCode: Swift.String)
@objc convenience public init(merchantIdentifier: Swift.String, supportedNetworks: [PassKit.PKPaymentNetwork])
@objc public init(applePayMerchantId: Swift.String, supportedNetworks: [PassKit.PKPaymentNetwork], countryCode: Swift.String)
@objc convenience public init(applePayMerchantId: Swift.String, supportedNetworks: [PassKit.PKPaymentNetwork])
@objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc deinit
@objc override dynamic public init()
}
@objc(DTPaymentMethod) @objcMembers public class PaymentMethod : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCopying {
@objc(DTPaymentMethod) @objcMembers public class PaymentMethod : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCoding, Foundation.NSCopying {
@objc final public let type: Datatrans.PaymentMethodType
@objc public init(type: Datatrans.PaymentMethodType)
required public init(from decoder: Swift.Decoder) throws
public func encode(to encoder: Swift.Encoder) throws
@objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc required public init?(coder: Foundation.NSCoder)
@objc public func encode(with coder: Foundation.NSCoder)
@objc override dynamic public init()
@objc deinit
}
Expand Down Expand Up @@ -230,11 +237,14 @@ import WebKit
public class func create<T>(data: T.Input, decoder: T) -> Datatrans.PaymentMethodToken? where T : Combine.TopLevelDecoder
@objc @available(iOS, deprecated: 13.0, message: "Use create(data:decoder:) instead.")
public class func create(jsonString: Swift.String) -> Datatrans.PaymentMethodToken?
@objc public class func create(legacyTokenData: Foundation.Data) -> Datatrans.PaymentMethodToken?
public func toJson() throws -> Swift.String?
@objc public func isValid() -> Swift.Bool
@objc override dynamic public var description: Swift.String {
@objc get
}
override public func encode(to encoder: Swift.Encoder) throws
@objc required public init?(coder: Foundation.NSCoder)
@objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc override public init(type: Datatrans.PaymentMethodType)
@objc deinit
Expand All @@ -249,6 +259,7 @@ import WebKit
@objc get
}
override public func encode(to encoder: Swift.Encoder) throws
@objc required public init?(coder: Foundation.NSCoder)
@objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any
@objc deinit
@objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String)
Expand Down
Binary file not shown.
Loading

0 comments on commit 825eb98

Please sign in to comment.