Skip to content

Commit

Permalink
iOS: Release 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skirsche-ieffects committed Dec 23, 2021
1 parent e514404 commit 313dbbc
Show file tree
Hide file tree
Showing 143 changed files with 5,509 additions and 6,833 deletions.
2 changes: 1 addition & 1 deletion Datatrans.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "Datatrans"
spec.version = "1.4.1"
spec.version = "1.5.0"
spec.summary = "Datatrans iOS SDK - Accept payments on your iOS apps"
spec.description = <<-DESC
Accept payments on your iOS apps: Our mobile SDKs support your entire payment and
Expand Down
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 @@ -4,7 +4,7 @@
@class DTByjunoPaymentInfo;
@class DTPaymentMethodInfo;
@class DTPaymentRequest;
@class DTPaymentMethodToken;
@class DTSavedPaymentMethod;

@interface DTAliasPaymentAuthorizationRequest : NSObject

Expand All @@ -15,8 +15,7 @@
@property (nonatomic, nonnull, copy) DTPaymentRequest* paymentRequest;
@property (nonatomic, nullable, copy) NSString* payPalPairingId;
@property (nonatomic, nonnull, copy) NSString* reqType;
@property (nonatomic, nonnull, copy) DTPaymentMethodToken* paymentMethodToken;
@property (nonatomic, assign) BOOL returnAlias;
@property (nonatomic, nonnull, copy) DTSavedPaymentMethod* savedPaymentMethod;
@property (nonatomic, nullable, copy) NSString* transactionId;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@

@property (nonatomic, readonly) NSString* merchantId;
@property (nonatomic, readonly) NSString* currencyCode;
@property (nonatomic, copy) DTCard* card;
@property (nonatomic, readonly) NSArray<NSString *>* paymentMethodIdents;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@

#import <Foundation/Foundation.h>

@class DTCard;

@interface DTAliasRequest : NSObject <NSCopying>

// hidden mode card alias request
- (id)initWithMerchantId:(NSString *)merchantId
currencyCode:(NSString *)currencyCode
card:(DTCard *)card;

// standard mode alias request
- (id)initWithMerchantId:(NSString *)merchantId currencyCode:(NSString *)currencyCode paymentMethods:(NSArray *)paymentMethods;
- (id)initWithMerchantId:(NSString *)merchantId currencyCode:(NSString *)currencyCode;

@end
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//
// DTCardTokenRequestResponse.h
// DTCardAliasRequestResponse.h
// Datatrans
//
// Created by Patrick Fompeyrine on 23.11.20.
//

#import <Datatrans/DTResponse.h>

@interface DTCardTokenRequestResponse : NSObject<DTResponse>
@interface DTCardAliasRequestResponse : NSObject <DTResponse>

@property (nonatomic, copy) NSString* alias;
@property (nonatomic, copy) NSString* maskedCardNumber;
@property (nonatomic, copy) NSString* token;
@property (nonatomic, copy) NSString* transactionId;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- (void)handleTechnicalError:(nonnull NSError *)error;
- (void)handleTechnicalError:(nonnull NSError *)error retryBlock:(void (^_Nullable)(void))retryBlock;
- (void)handleTechnicalError:(nonnull NSError *)error dismissBlock:(void (^_Nullable)(void))dismissBlock retryBlock:(void (^_Nullable)(void))retryBlock;
- (void)handleWebError:(nonnull NSError *)error isPayment:(BOOL)isPayment;
- (void)handleCriticalWebError:(nonnull NSError *)error isPayment:(BOOL)isPayment;
- (void)showAliasRegistrationError:(nonnull NSError *)error returnAuthorizationError:(BOOL)returnAuthorizationError;
- (void)showAuthenticationError:(nonnull NSError *)error;
- (void)showAuthorizationError:(nonnull NSError *)error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

- (void)showCriticalErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message dismissAction:(void (^_Nonnull)(void))dismissAction; // ok button
- (void)showErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message; // ok button
- (void)showErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message dismissAction:(void (^_Nullable)(void))dismissAction retryAction:(void (^_Nullable)(void))retryAction; // ok and retry button (if action provided)
- (void)showErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message dismissAction:(void (^_Nullable)(void))dismissAction retryAction:(void (^_Nullable)(void))retryAction; // ok or retry button (if action provided), cancel and retry button if both actions provided

@end
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@class DTAliasRequest;
@class DTPaymentOptions;
@class DTPaymentRequest;
@class DTPaymentMethodToken;
@class DTSavedPaymentMethod;


@interface DTInitialTransaction : NSObject
Expand All @@ -18,14 +18,11 @@
- (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *)jsonObject;

- (void)addOptionsToPaymentOptions:(nonnull DTPaymentOptions *)paymentOptions;
- (nullable NSString *)cancelURL;
- (nullable NSString *)errorURL;
- (nullable NSString *)successURL;

- (nonnull DTAliasRequest *)aliasRequest;
- (nonnull NSArray<NSString *> *)paymentMethods;
- (nonnull DTPaymentRequest *)paymentRequest;
- (nullable DTPaymentMethodToken *)paymentMethodToken;
- (nullable DTSavedPaymentMethod *)savedPaymentMethod;
- (BOOL)isPayment;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@class DTAliasRequest;
@class DTAuthorizationRequestResponse;
@class DTCard;
@class DTCardTokenRequestResponse;
@class DTCardAliasRequestResponse;
@class DTPaymentAuthorizationRequest;
@class DTPaymentOptions;
@class DTPaymentRequest;
Expand Down Expand Up @@ -48,7 +48,7 @@ typedef enum {
- (instancetype)initWithMobileToken:(NSString *)mobileToken urls:(DTUrls *)urls certificatePinning:(BOOL)certificatePinning;

- (void)requestInitialTransaction:(NSString *)mobileToken idempotencyKey:(NSString *)idempotencyKey completion:(void (^)(NSData *, NSError *))completion;
- (void)requestCardTokenForMerchantId:(NSString *)merchantId card:(DTCard *)card options:(DTPaymentOptions *)options completion:(void (^)(DTCardTokenRequestResponse *, NSError *))completion;
- (void)requestCardAliasForMerchantId:(NSString *)merchantId card:(DTCard *)card options:(DTPaymentOptions *)options completion:(void (^)(DTCardAliasRequestResponse *, NSError *))completion;
- (void)requestStatusForMerchantId:(NSString *)merchantId alias:(NSString *)alias currencyCode:(NSString *)currencyCode isAliasRequest:(BOOL)isAliasRequest completion:(void(^)(DTStatusRequestResponse *, NSError *))completion;
- (void)requestTokenizationWithJSONBody:(NSData *)body completion:(void (^)(NSData *, NSError *))completion;
- (void)authorizeAliasPaymentRequest:(DTAliasPaymentAuthorizationRequest *)authorizationRequest completion:(void (^)(DTAuthorizationRequestResponse *, NSError *))completion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

@interface DTPaymentAuthorizationRequest : NSObject

@property (nonatomic, assign) NSUInteger amountInSmallestCurrencyUnit;
@property (nonatomic, assign) BOOL autoSettlement;
@property (nonatomic, nonnull, copy) NSString* currencyCode;
@property (nonatomic, nonnull, copy) NSString* merchantId;
@property (nonatomic, nullable, copy) NSDictionary<NSString *, NSString *>* merchantProperties;
@property (nonatomic, nullable, copy) DTPaymentMethodInfo* paymentMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ extern NSString* const DTPaymentMethodMasterCard;
extern NSString* const DTPaymentMethodDinersClub;
extern NSString* const DTPaymentMethodAmericanExpress;
extern NSString* const DTPaymentMethodJCB;
extern NSString* const DTPaymentMethodMyOne;
extern NSString* const DTPaymentMethodUATP;
extern NSString* const DTPaymentMethodDiscover;
extern NSString* const DTPaymentMethodSupercard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,14 @@ typedef enum {
@property (nonatomic, readonly) BOOL needsCardExpiration;
@property (nonatomic, readonly) BOOL needsCardVerification;
@property (nonatomic, readonly) BOOL needsCardholder;
@property (nonatomic, readonly) BOOL hasTransparentBackground;
@property (nonatomic, readonly) BOOL hasTokenSupport;
@property (nonatomic, readonly) BOOL hasCardScan;
@property (nonatomic, readonly) BOOL hasLogoShadow;
@property (nonatomic, readonly) BOOL hasSavedPaymentMethodSupport;

@property (nonatomic, readonly) NSString* _Nullable viewPortAdjustment;

@property (nonatomic, readonly) NSString* _Nonnull title;
@property (nonatomic, readonly) NSString* _Nonnull identifier;
@property (nonatomic, readonly) NSString* _Nonnull imageName;
@property (nonatomic, readonly) Class _Nullable tokenPaymentMethodClass;
@property (nonatomic, readonly) Class _Nullable savedPaymentMethodClass;

@property (nonatomic, readonly) NSRange creditCardVerificationLengthRange;
@property (nonatomic, readonly) NSRange creditCardNumberLengthRange;
Expand All @@ -51,7 +48,7 @@ typedef enum {
- (nullable UIImage *)imageForSize:(CGSize)size;

- (void)updateWithOptions:(nonnull DTPaymentOptions *)options;
- (void)validateOptions:(nonnull DTPaymentOptions *)options isTokenPayment:(BOOL)isTokenPayment;
- (nullable NSString *)validateOptions:(nonnull DTPaymentOptions *)options isAliasPayment:(BOOL)isAliasPayment;

+ (nullable DTPaymentMethodInfo *)uniqueMethodInMethods:(nonnull NSArray<DTPaymentMethodInfo *> *)methods forNumberStartingWith:(nonnull NSString *)number;
+ (nonnull NSSet<DTPaymentMethodInfo *> *)methodsInMethods:(nonnull NSArray<DTPaymentMethodInfo *> *)methods forNumberStartingWith:(nonnull NSString *)number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

#import <Foundation/Foundation.h>

typedef enum {
DTPaymentCardholderHidden = 0,
DTPaymentCardholderOptional,
DTPaymentCardholderRequired
} DTPaymentCardholder;

@class DTApplePayConfig;
@class DTByjunoPaymentInfo;
@class DTSwissBillingPaymentInfo;
Expand All @@ -23,27 +17,17 @@ typedef enum {
@interface DTPaymentOptions : NSObject <NSCopying>

@property (nonatomic, assign) BOOL testing;
@property (nonatomic, assign) BOOL hideToolbarSecurityInfo;
@property (nonatomic, assign) BOOL showBackButtonOnFirstScreen;
@property (nonatomic, assign) BOOL returnsAlias;
@property (nonatomic, assign) BOOL displayShippingDetails;
@property (nonatomic, assign) BOOL useWebCreditCardInput;
@property (nonatomic, assign) BOOL useWebELVInput;
@property (nullable, nonatomic, copy) NSString* easypayTitle;
@property (nullable, nonatomic, copy) NSString* easypayDescription;
@property (nullable, nonatomic, copy) NSString* easypayPaymentInfo;
@property (nonatomic, assign) BOOL easypayPresentedAsNATELPay;
@property (nonatomic, assign) BOOL autoSettlement;
@property (nonatomic, assign) BOOL certificatePinning;
@property (nonatomic, assign) DTPaymentCardholder cardholder;
@property (nullable, nonatomic, copy) NSDictionary<NSString *, NSString *>* merchantProperties;
@property (nullable, nonatomic, copy) NSString* creditCardInputLocalizedDoneButtonTitle;
@property (nullable, nonatomic, copy) NSString* language; // ISO 639-1 code (also supports ISO 3166-1 alpha-2 code addon as per Apple spec)
@property (nonatomic, assign) BOOL creditCardScanningEnabled;
@property (nullable, nonatomic, copy) DTSwissBillingPaymentInfo* swissBillingPaymentInfo;
@property (nullable, nonatomic, copy) NSString* appCallbackScheme;
@property (nonatomic, assign) BOOL suppressCriticalErrorDialog;
@property (nullable, nonatomic, copy) NSString* applePayMerchantIdentifier;
@property (nullable, nonatomic, copy) DTApplePayConfig* applePayConfig;
@property (nonatomic, assign) BOOL authenticationOnly;
@property (nullable, nonatomic, copy) DTByjunoPaymentInfo* byjunoPaymentInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@
NSString* _refno;
NSString* _currencyCode;
NSUInteger _amountInSmallestCurrencyUnit;
NSString* _signature;


NSString *_localizedPriceDescription;
}

@property (nonatomic, copy) NSString* merchantId;
@property (nonatomic, copy) NSString* refno;
@property (nonatomic, copy) NSString* currencyCode;
@property (nonatomic, assign) NSUInteger amountInSmallestCurrencyUnit;
@property (nonatomic, copy) NSString* signature;

@property (nonatomic, copy) NSString* localizedPriceDescription;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@interface DTStartTokenRequestResponse : NSObject<DTResponse>

@property (nonatomic, assign) NSInteger responseCode;
@property (nonatomic, copy) NSString* token;
@property (nonatomic, copy) NSString* transactionId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#import <Foundation/Foundation.h>

@class DTPaymentMethodToken;
@class DTPaymentMethodInfo;
@class DTPaymentOptions;
@class DTSavedPaymentMethod;

@protocol DTTransactionModel <NSObject>

@property(nullable, copy) DTAliasRequest* aliasRequest;
@property(nonnull, readonly) NSString* mobileToken;
@property(nonnull, readonly) DTPaymentOptions* options;
@property(nullable, copy) DTPaymentMethodInfo* paymentMethod;
@property(nullable, copy) DTPaymentMethodToken* paymentMethodToken;
@property(nullable, copy) DTSavedPaymentMethod* savedPaymentMethod;
@property(nullable, copy) NSString* transactionId;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@interface DTTwintProcess : NSObject

- (nonnull instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithPresentingController:(nonnull UIViewController *)controller networking:(nonnull DTNetworking *)networking errorHandler:(nonnull DTErrorHandler *)errorHandler loaderPresenter:(nonnull id<DTLoaderPresenter>)loaderPresenter lockScreenPresenter:(nonnull id<DTLockScreenPresenter>)lockScreenPresenter options:(nonnull DTPaymentOptions *)options delegate:(nonnull id<DTTwintProcessDelegate>)delegate;
- (nonnull instancetype)initWithPresentingController:(nonnull UIViewController *)controller networking:(nonnull DTNetworking *)networking errorHandler:(nonnull DTErrorHandler *)errorHandler loaderPresenter:(nonnull id<DTLoaderPresenter>)loaderPresenter lockScreenPresenter:(nonnull id<DTLockScreenPresenter>)lockScreenPresenter askToRetry:(BOOL)askToRetry options:(nonnull DTPaymentOptions *)options delegate:(nonnull id<DTTwintProcessDelegate>)delegate;

- (void)startWithPaymentRequest:(nonnull DTPaymentRequest *)request paymentModel:(nonnull id<DTTransactionModel>)model;
- (void)startWithAliasRequest:(nonnull DTAliasRequest *)aliasRequest paymentModel:(nonnull id<DTTransactionModel>)model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

+ (uint32_t)libraryVersion;
+ (NSString *)libraryVersionString;
+ (NSString *)libraryVersionStringWithDeviceType;

+ (NSMutableDictionary *)statsProperties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

@interface DTWebCallbackUrls : NSObject

- (nonnull instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithCallbackScheme:(nullable NSString *)scheme testing:(BOOL)testing;

- (nonnull NSURL *)cancelURL;
- (nonnull NSURL *)errorURL;
- (nonnull NSURL *)successURL;

- (void)setCancelURL:(nonnull NSString *)cancelUrl errorURL:(nonnull NSString *)errorURL successURL:(nonnull NSString *)successURL;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#import <Datatrans/DTUrls.h>

@class DTAliasRequest;
@class DTCardToken;
@class DTPaymentOptions;
@class DTSavedCard;
@class DTWebCallbackUrls;
@protocol DTTransactionModel;

Expand All @@ -21,7 +21,7 @@
- (nonnull instancetype)initWithUrls:(nonnull DTUrls *)urls callbackUrls:(nonnull DTWebCallbackUrls *)callbackUrls;

- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id<DTTransactionModel>)transactionModel;
- (nonnull NSURLRequest *)authenticate3DRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest creditCard:(nonnull DTCardToken *)creditCard transactionId:(nonnull NSString *)transactionId testing:(BOOL)testing;
- (nonnull NSURLRequest *)authenticate3DRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest creditCard:(nonnull DTSavedCard *)creditCard transactionId:(nonnull NSString *)transactionId testing:(BOOL)testing;
- (nonnull NSURLRequest *)paymentInputRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest transactionModel:(nonnull id<DTTransactionModel>)transactionModel;

@end
Loading

0 comments on commit 313dbbc

Please sign in to comment.