Skip to content

Commit

Permalink
iOS: Release 3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-libin committed Aug 13, 2024
1 parent 16043a2 commit 5fadb26
Show file tree
Hide file tree
Showing 159 changed files with 3,655 additions and 252 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 = "3.6.3"
spec.version = "3.7.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 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
@@ -0,0 +1,15 @@
//
// DTDevUrls.h
// Datatrans
//
// Created by Serhii Libin on 26.06.2024.
//

#import <Foundation/Foundation.h>
#import <Datatrans/DTUrlsProtocol.h>

@interface DTDevUrls : NSObject <DTUrlsProtocol>

- (nonnull instancetype)initWithDevHost:(nonnull NSString *)devHost;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// DTIDEALRequestHandler.h
// Datatrans
//
// Created by Serhii Libin on 26.06.2024.
//

#import <Datatrans/DTWebCallbacks.h>

@interface DTIDEALRequestHandler : NSObject <DTRequestHandler>

@end
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
@class DTStartTWINTRequestResponse;
@class DTStatusRequestResponse;
@class DTTWINTStatusRequestResponse;
@class DTUrls;
@class DT2FARequestResponse;
@protocol DTUrlsProtocol;

typedef enum {
DT_ENROLLMENT_STATUS_NOT_ENROLLED,
Expand All @@ -48,7 +48,7 @@ typedef enum {
+ (BOOL)isSSLError:(NSError *)error;
+ (BOOL)isMobileTokenNotFoundError:(NSError *)error;

- (instancetype)initWithMobileToken:(NSString *)mobileToken urls:(DTUrls *)urls certificatePinning:(BOOL)certificatePinning testing:(BOOL)testing;
- (instancetype)initWithMobileToken:(NSString *)mobileToken urls:(id<DTUrlsProtocol>)urls certificatePinning:(BOOL)certificatePinning testing:(BOOL)testing;

- (void)requestInitialTransaction:(NSString *)mobileToken idempotencyKey:(NSString *)idempotencyKey completion:(void (^)(NSData *, NSError *))completion;
- (void)requestCardAliasForMerchantId:(NSString *)merchantId card:(DTCard *)card options:(DTPaymentOptions *)options completion:(void (^)(DTCardAliasRequestResponse *, NSError *))completion;
Expand All @@ -62,7 +62,7 @@ typedef enum {
- (void)startTWINTAliasRequest:(DTAliasRequest *)aliasRequest options:(DTPaymentOptions *)options completion:(void (^)(DTStartTWINTRequestResponse *, NSError *))completion;
- (void)TWINTStatusRequestForMerchantId:(NSString *)merchantId transactionId:(NSString *)transactionId options:(DTPaymentOptions *)options completion:(void (^)(DTTWINTStatusRequestResponse *, NSError *))completion;
- (void)cancelRequest:(DTPaymentRequest *)paymentRequest transactionId:(NSString *)transactionId;
- (void)startApplePayRequest:(DTPaymentRequest *)paymentRequest token:(NSString *)token options:(DTPaymentOptions *)options completion:(void (^)(DTStartApplePayRequestResponse *, NSError *))completion;
- (void)startApplePayRequest:(DTPaymentRequest *)paymentRequest token:(NSString *)token displayName:(NSString *)displayName options:(DTPaymentOptions *)options completion:(void (^)(DTStartApplePayRequestResponse *, NSError *))completion;
- (void)dccInfoForMerchantId:(NSString *)merchantId paymentMethod:(NSString *)paymentMethod cardno:(NSString *)cardno alias:(NSString *)alias completion:(void (^)(DTDCCServiceResponse *, NSError *))completion;

#pragma mark - Management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extern NSString* const DTPaymentMethodMobilePay;
extern NSString* const DTPaymentMethodMaestro;
extern NSString* const DTPaymentMethodChinaUnionPay;
extern NSString* const DTPaymentMethodHalfFarePlus;
extern NSString* const DTPaymentMethodIDEAL;

// reka alternative identifiers
extern NSString* const DTPaymentMethodRekaRail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>
#import <PassKit/PassKit.h>

@class DTPaymentOptions;

Expand Down Expand Up @@ -36,6 +37,7 @@ typedef enum {
@property (nonatomic, readonly) NSString* _Nonnull identifier;
@property (nonatomic, readonly) NSString* _Nonnull imageName;
@property (nonatomic, readonly) Class _Nullable savedPaymentMethodClass;
@property (nonatomic, readonly) PKPaymentNetwork _Nullable pkPaymentNetworkIdentifier;

@property (nonatomic, readonly) NSRange creditCardVerificationLengthRange;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@

#pragma mark Payment request

@interface DTPaymentRequest : NSObject <NSCopying> {
NSString* _merchantId;
NSString* _refno;
NSString* _refno2;
NSString* _refno3;
NSString* _currencyCode;
NSUInteger _amountInSmallestCurrencyUnit;

NSString *_localizedPriceDescription;
}

@property (nonatomic, copy) NSString* merchantId;
@property (nonatomic, copy) NSString* refno;
@property (nonatomic, copy) NSString* refno2;
@property (nonatomic, copy) NSString* refno3;
@property (nonatomic, copy) NSString* currencyCode;
@interface DTPaymentRequest : NSObject <NSCopying>

@property (nonatomic, copy, nonnull) NSString* merchantId;
@property (nonatomic, copy, nonnull) NSString* refno;
@property (nonatomic, copy, nullable) NSString* refno2;
@property (nonatomic, copy, nullable) NSString* refno3;
@property (nonatomic, copy, nonnull) NSString* currencyCode;
@property (nonatomic, assign) NSUInteger amountInSmallestCurrencyUnit;

@property (nonatomic, copy) NSString* localizedPriceDescription;
@property (nonatomic, copy, nullable) NSString* localizedPriceDescription;

- (nonnull instancetype)init NS_UNAVAILABLE;

- (nonnull instancetype)initWithMerchantId:(nonnull NSString *)merchantId
refno:(nonnull NSString *)refno
refno2:(nullable NSString *)refno2
refno3:(nullable NSString *)refno3
currencyCode:(nonnull NSString *)currencyCode
amountInSmallestCurrencyUnit:(NSUInteger)amountInSmallestCurrencyUnit
localizedPriceDescription:(nullable NSString *)localizedPriceDescription;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,11 @@
// Copyright 2020 ieffects ag. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Datatrans/DTUrlsProtocol.h>

@interface DTUrls : NSObject
@interface DTUrls : NSObject <DTUrlsProtocol>

- (nonnull instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithTestingEnabled:(BOOL)testingEnabled;

- (nonnull NSString *)get3DAuthenticationUrl;
- (nonnull NSString *)get3DStatusUrl:(BOOL)isAliasRequest;
- (nonnull NSString *)getAliasUrl;
- (nonnull NSString *)getApplePayUrl;
- (nonnull NSString *)getDCCServiceUrl;
- (nonnull NSString *)getAuthorizationUrl;
- (nonnull NSString *)getAuthorizationSplitUrl;
- (nonnull NSString *)getCancelUrl;
- (nonnull NSString *)getInitialTransactionRequestUrl;
- (nonnull NSString *)getPaymentPostUrl:(BOOL)isResumed;
- (nonnull NSString *)getTokenizationUrl;
- (nonnull NSString *)getTWINTRegistrationUrl;
- (nonnull NSString *)getTWINTStatusUrl;
- (nonnull NSString *)getBinRangesUrl;

- (nonnull NSArray<NSString *> *)getHosts;
- (void)switchUrl;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// DTUrlsProtocol.h
// Datatrans
//
// Created by Serhii Libin on 26.06.2024.
//

@protocol DTUrlsProtocol <NSObject>

- (nonnull NSString *)get3DAuthenticationUrl;
- (nonnull NSString *)get3DStatusUrl:(BOOL)isAliasRequest;
- (nonnull NSString *)getAliasUrl;
- (nonnull NSString *)getApplePayUrl;
- (nonnull NSString *)getDCCServiceUrl;
- (nonnull NSString *)getAuthorizationUrl;
- (nonnull NSString *)getAuthorizationSplitUrl;
- (nonnull NSString *)getCancelUrl;
- (nonnull NSString *)getInitialTransactionRequestUrl;
- (nonnull NSString *)getPaymentPostUrl:(BOOL)isResumed;
- (nonnull NSString *)getTokenizationUrl;
- (nonnull NSString *)getTWINTRegistrationUrl;
- (nonnull NSString *)getTWINTStatusUrl;
- (nonnull NSString *)getBinRangesUrl;

- (nonnull NSArray<NSString *> *)getHosts;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@
- (void)webProcessDidStartPFEPayment:(nonnull id<DTWebProcess>)webProcess url:(nonnull NSURL *)url;

@end

@protocol DTIDEALWebProcessDelegate <DTWebProcessDelegate>

- (void)webProcessDidStartIDEALPayment:(nonnull id<DTWebProcess>)webProcess url:(nonnull NSURL *)url;

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

@class DTAliasRequest;
@class DTDCCModel;
@class DTPaymentOptions;
@class DTSavedCard;
@class DTWebCallbackUrls;
@protocol DTTransactionModel;
@protocol DTUrlsProtocol;

@interface DTWebRequestFactory : NSObject

- (nonnull instancetype)initWithUrls:(nonnull DTUrls *)urls callbackUrls:(nonnull DTWebCallbackUrls *)callbackUrls;
- (nonnull instancetype)initWithUrls:(nonnull id<DTUrlsProtocol>)urls callbackUrls:(nonnull DTWebCallbackUrls *)callbackUrls;

- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id<DTTransactionModel>)transactionModel;
- (nonnull NSURLRequest *)authenticate3DRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest creditCard:(nonnull DTSavedCard *)creditCard transactionId:(nonnull NSString *)transactionId testing:(BOOL)testing dccModel:(nullable DTDCCModel *)dccModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", op
DTPaymentMethodTypeChinaUnionPay = 31,
/// SBB Half Fare Travelcard PLUS payment method
DTPaymentMethodTypeHalfFarePlus = 32,
/// iDEAL payment method
DTPaymentMethodTypeIDEAL = 33,
};


Expand Down Expand Up @@ -876,6 +878,39 @@ SWIFT_CLASS_NAMED("SavedPaymentMethod")
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE;
@end

@class DTSavedCard;

/// This class contains saved Apple Pay payment method details.
/// Like any other <code>SavedPaymentMethod</code> subclass, it can be used to initiate
/// follow-up payments with the same method. Note: Using this class will still present
/// the Apple Pay sheet to the user when they are in session.
/// A <code>SavedApplePay</code> object can be created by successfully completing an Apple Pay
/// payment or with a dedicated registration.
SWIFT_CLASS_NAMED("SavedApplePay")
@interface DTSavedApplePay : DTSavedPaymentMethod
/// The Apple Pay device token associated with the previous transaction.
/// <em>Important:</em> This data is strictly for use in merchant-initiated follow-up transactions (MIT)
/// where the customer is not present during payment. Do not display any information such as
/// <code>maskedCardNumber</code> or <code>cardExpiryDate</code> to users. These details are derived from
/// the device token and do not represent the actual card information. For details about the real
/// card, refer to <code>last4</code>.
@property (nonatomic, strong) DTSavedCard * _Nonnull token;
/// The last 4 digits of the real card number used in the transaction. Note: This information may
/// not be available for all card types.
@property (nonatomic, copy) NSString * _Nullable last4;
/// A human readable title.
@property (nonatomic, readonly, copy) NSString * _Nonnull displayTitle;
/// For VoiceOver this title is used instead of displayTitle.
@property (nonatomic, readonly, copy) NSString * _Nonnull accessibilityTitle;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type alias:(NSString * _Nonnull)alias SWIFT_UNAVAILABLE;
@end


/// This class contains saved Boncard payment method details.
/// Just like any other <code>SavedPaymentMethod</code> subclass, this class can be used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ FOUNDATION_EXPORT const unsigned char DatatransVersionString[];
#import <Datatrans/DTWebProcess.h>
#import <Datatrans/DTBasicAPMAppDelegateProxy.h>
#import <Datatrans/DT2FARequestResponse.h>
#import <Datatrans/DTIDEALRequestHandler.h>
#import <Datatrans/DTUrlsProtocol.h>
#import <Datatrans/DTDevUrls.h>
Binary file modified Datatrans.xcframework/ios-arm64/Datatrans.framework/Info.plist
Binary file not shown.
Loading

0 comments on commit 5fadb26

Please sign in to comment.