Skip to content

Commit

Permalink
iOS: Release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii Libin committed May 3, 2023
1 parent 4783996 commit 4303762
Show file tree
Hide file tree
Showing 128 changed files with 257 additions and 162 deletions.
4 changes: 2 additions & 2 deletions 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 = "2.7.2"
spec.version = "3.0.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 All @@ -17,5 +17,5 @@ Pod::Spec.new do |spec|
spec.platform = :ios, "11.0"

spec.source = { :git => "https://github.com/datatrans/ios-sdk.git", :tag => "#{spec.version}" }
spec.vendored_frameworks = "Datatrans.xcframework", "DTCardScanner.xcframework", "DTKlarna.xcframework", "KlarnaMobileSDK.xcframework", "PPRiskMagnes.xcframework"
spec.vendored_frameworks = "Datatrans.xcframework", "DTKlarna.xcframework", "KlarnaMobileSDK.xcframework", "PPRiskMagnes.xcframework"
end
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 @@ -29,6 +29,10 @@
// All methods below have been copied verbatim from PKPaymentAuthorizationViewControllerDelegate. Please refer to
// the official Apple Pay developer documentation for more information.

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didChangeCouponCode:(NSString *)couponCode
handler:(void (^)(PKPaymentRequestCouponCodeUpdate *update))completion API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(watchos);

// Sent when the user has selected a new shipping method. The delegate should determine
// shipping costs based on the shipping method and either the shipping address supplied in the original
// PKPaymentRequest or the address fragment provided by the last call to paymentAuthorizationViewController:
Expand All @@ -40,31 +44,26 @@
// until it has invoked the completion block.
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingMethod:(PKShippingMethod *)shippingMethod
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKPaymentSummaryItem *> *summaryItems))completion;
handler:(void (^)(PKPaymentRequestShippingMethodUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

// Sent when the user has selected a new shipping address. The delegate should inspect the
// address and must invoke the completion block with an updated array of PKPaymentSummaryItem objects.
//
// The delegate will receive no further callbacks except paymentAuthorizationViewControllerDidFinish:
// until it has invoked the completion block.
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingAddress:(ABRecordRef)address
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods,
NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed delegate method instead");

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingContact:(PKContact *)contact
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods,
NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_AVAILABLE_IOS(9_0);

handler:(void (^)(PKPaymentRequestShippingContactUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

// Sent when the user has selected a new payment card. Use this delegate callback if you need to
// update the summary items in response to the card type changing (for example, applying credit card surcharges)
//
// The delegate will receive no further callbacks except paymentAuthorizationViewControllerDidFinish:
// until it has invoked the completion block.

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod
completion:(void (^)(NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_AVAILABLE_IOS(9_0);
handler:(void (^)(PKPaymentRequestPaymentMethodUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

@end
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
- (nonnull instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *)jsonObject;

- (void)addOptionsToPaymentOptions:(nonnull DTPaymentOptions *)paymentOptions;
- (void)addOptionsToPaymentOptions:(nonnull DTPaymentOptions *)paymentOptions hasInternalMethod:(BOOL)hasInternalMethod;

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

@end
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ typedef enum {

+ (BOOL)isTechnicalError:(NSError *)error;
+ (BOOL)isSSLError:(NSError *)error;
+ (BOOL)isMobileTokenNotFoundError:(NSError *)error;

- (instancetype)initWithMobileToken:(NSString *)mobileToken urls:(DTUrls *)urls certificatePinning:(BOOL)certificatePinning;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ extern NSString* const DTPaymentMethodBoncard;
extern NSString* const DTPaymentMethodElo;
extern NSString* const DTPaymentMethodHipercard;
extern NSString* const DTPaymentMethodKlarna;
extern NSString* const DTPaymentMethodDankort;

// reka alternative identifiers
extern NSString* const DTPaymentMethodRekaRail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@
@property (nullable, nonatomic, copy) DTSwissPassPaymentInfo* swissPassPaymentInfo;
@property (nullable, nonatomic, copy) NSString* paysafecardMerchantClientId;
@property (nullable, nonatomic, strong) DTPaycardPaymentInfo* paycardPaymentInfo;
@property (nonatomic, assign) BOOL isPayment;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ SWIFT_CLASS_NAMED("PCIPTokenizationOptions")
@interface DTPCIPTokenizationOptions : NSObject
/// Use this setting to change the UI language. If this is not
/// specified, the default language determined by the system will be used.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>nl</code>,<code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
@property (nonatomic, copy) NSString * _Nullable language;
/// Use this setting to display or hide critical errors.
@property (nonatomic) BOOL suppressCriticalErrorDialog;
Expand Down Expand Up @@ -694,6 +694,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", op
DTPaymentMethodTypeHipercard = 24,
/// Klarna payment method
DTPaymentMethodTypeKlarna = 25,
/// Dankort payment method
DTPaymentMethodTypeDankort = 26,
};


Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// swift-compiler-version: Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Datatrans
import AVFoundation
import AudioToolbox
import CoreHaptics
@_exported import Datatrans
import Foundation
import PassKit
import SafariServices
import Swift
import UIKit
import Vision
import WebKit
import _Concurrency
@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError {
Expand Down Expand Up @@ -191,6 +194,7 @@ import _Concurrency
case Elo
case Hipercard
case Klarna
case Dankort
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
// All methods below have been copied verbatim from PKPaymentAuthorizationViewControllerDelegate. Please refer to
// the official Apple Pay developer documentation for more information.

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didChangeCouponCode:(NSString *)couponCode
handler:(void (^)(PKPaymentRequestCouponCodeUpdate *update))completion API_AVAILABLE(macos(12.0), ios(15.0)) API_UNAVAILABLE(watchos);

// Sent when the user has selected a new shipping method. The delegate should determine
// shipping costs based on the shipping method and either the shipping address supplied in the original
// PKPaymentRequest or the address fragment provided by the last call to paymentAuthorizationViewController:
Expand All @@ -40,31 +44,26 @@
// until it has invoked the completion block.
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingMethod:(PKShippingMethod *)shippingMethod
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKPaymentSummaryItem *> *summaryItems))completion;
handler:(void (^)(PKPaymentRequestShippingMethodUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

// Sent when the user has selected a new shipping address. The delegate should inspect the
// address and must invoke the completion block with an updated array of PKPaymentSummaryItem objects.
//
// The delegate will receive no further callbacks except paymentAuthorizationViewControllerDidFinish:
// until it has invoked the completion block.
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingAddress:(ABRecordRef)address
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods,
NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed delegate method instead");

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingContact:(PKContact *)contact
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods,
NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_AVAILABLE_IOS(9_0);

handler:(void (^)(PKPaymentRequestShippingContactUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

// Sent when the user has selected a new payment card. Use this delegate callback if you need to
// update the summary items in response to the card type changing (for example, applying credit card surcharges)
//
// The delegate will receive no further callbacks except paymentAuthorizationViewControllerDidFinish:
// until it has invoked the completion block.

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod
completion:(void (^)(NSArray<PKPaymentSummaryItem *> *summaryItems))completion NS_AVAILABLE_IOS(9_0);
handler:(void (^)(PKPaymentRequestPaymentMethodUpdate *update))completion API_AVAILABLE(macos(11.0), ios(11.0), watchos(4.0));

@end
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
- (nonnull instancetype)init NS_UNAVAILABLE;
- (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *)jsonObject;

- (void)addOptionsToPaymentOptions:(nonnull DTPaymentOptions *)paymentOptions;
- (void)addOptionsToPaymentOptions:(nonnull DTPaymentOptions *)paymentOptions hasInternalMethod:(BOOL)hasInternalMethod;

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

@end
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ typedef enum {

+ (BOOL)isTechnicalError:(NSError *)error;
+ (BOOL)isSSLError:(NSError *)error;
+ (BOOL)isMobileTokenNotFoundError:(NSError *)error;

- (instancetype)initWithMobileToken:(NSString *)mobileToken urls:(DTUrls *)urls certificatePinning:(BOOL)certificatePinning;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ extern NSString* const DTPaymentMethodBoncard;
extern NSString* const DTPaymentMethodElo;
extern NSString* const DTPaymentMethodHipercard;
extern NSString* const DTPaymentMethodKlarna;
extern NSString* const DTPaymentMethodDankort;

// reka alternative identifiers
extern NSString* const DTPaymentMethodRekaRail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@
@property (nullable, nonatomic, copy) DTSwissPassPaymentInfo* swissPassPaymentInfo;
@property (nullable, nonatomic, copy) NSString* paysafecardMerchantClientId;
@property (nullable, nonatomic, strong) DTPaycardPaymentInfo* paycardPaymentInfo;
@property (nonatomic, assign) BOOL isPayment;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ SWIFT_CLASS_NAMED("PCIPTokenizationOptions")
@interface DTPCIPTokenizationOptions : NSObject
/// Use this setting to change the UI language. If this is not
/// specified, the default language determined by the system will be used.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>nl</code>,<code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
@property (nonatomic, copy) NSString * _Nullable language;
/// Use this setting to display or hide critical errors.
@property (nonatomic) BOOL suppressCriticalErrorDialog;
Expand Down Expand Up @@ -696,6 +696,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", op
DTPaymentMethodTypeHipercard = 24,
/// Klarna payment method
DTPaymentMethodTypeKlarna = 25,
/// Dankort payment method
DTPaymentMethodTypeDankort = 26,
};


Expand Down Expand Up @@ -1838,7 +1840,7 @@ SWIFT_CLASS_NAMED("PCIPTokenizationOptions")
@interface DTPCIPTokenizationOptions : NSObject
/// Use this setting to change the UI language. If this is not
/// specified, the default language determined by the system will be used.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
/// The supported values are <code>en</code>, <code>da</code>, <code>de</code>, <code>es</code>, <code>fi</code>, <code>fr</code>, <code>it</code>, <code>nl</code>,<code>no</code>, <code>pt</code>, <code>sv</code> and <code>nil</code>.
@property (nonatomic, copy) NSString * _Nullable language;
/// Use this setting to display or hide critical errors.
@property (nonatomic) BOOL suppressCriticalErrorDialog;
Expand Down Expand Up @@ -1930,6 +1932,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", op
DTPaymentMethodTypeHipercard = 24,
/// Klarna payment method
DTPaymentMethodTypeKlarna = 25,
/// Dankort payment method
DTPaymentMethodTypeDankort = 26,
};


Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// swift-compiler-version: Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Datatrans
import AVFoundation
import AudioToolbox
import CoreHaptics
@_exported import Datatrans
import Foundation
import PassKit
import SafariServices
import Swift
import UIKit
import Vision
import WebKit
import _Concurrency
@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError {
Expand Down Expand Up @@ -191,6 +194,7 @@ import _Concurrency
case Elo
case Hipercard
case Klarna
case Dankort
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// swift-compiler-version: Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Datatrans
import AVFoundation
import AudioToolbox
import CoreHaptics
@_exported import Datatrans
import Foundation
import PassKit
import SafariServices
import Swift
import UIKit
import Vision
import WebKit
import _Concurrency
@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError {
Expand Down Expand Up @@ -191,6 +194,7 @@ import _Concurrency
case Elo
case Hipercard
case Klarna
case Dankort
public init?(rawValue: Swift.Int)
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
Expand Down
Loading

0 comments on commit 4303762

Please sign in to comment.