Skip to content

Commit

Permalink
iOS: Release 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii Libin committed Jul 14, 2023
1 parent 8f06dea commit d55feb6
Show file tree
Hide file tree
Showing 130 changed files with 1,252 additions and 310 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.1.1"
spec.version = "3.2.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 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 @@ -35,6 +35,8 @@ extern NSString* const DTPaymentMethodKlarna;
extern NSString* const DTPaymentMethodDankort;
extern NSString* const DTPaymentMethodSwish;
extern NSString* const DTPaymentMethodVipps;
extern NSString* const DTPaymentMethodMaestro;
extern NSString* const DTPaymentMethodChinaUnionPay;

// reka alternative identifiers
extern NSString* const DTPaymentMethodRekaRail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ typedef enum {
DTPaymentMethodWebPayment = 1 << 1,
DTPaymentMethodWebPaymentExternal = 1 << 2,
DTPaymentMethodRequiresCustomScheme = 1 << 3,
DTPaymentMethodCreditCardOptionalCvv = 1 << 5,
} DTPaymentMethodFlags;

@interface DTPaymentMethodInfo : NSObject
Expand All @@ -28,6 +29,7 @@ typedef enum {
@property (nonatomic, readonly) BOOL needsCardVerification;
@property (nonatomic, readonly) BOOL hasSavedPaymentMethodSupport;
@property (nonatomic, readonly) BOOL requiresCustomScheme;
@property (nonatomic, readonly) BOOL isOptionalCvv;

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

Expand All @@ -44,6 +46,4 @@ typedef enum {
- (void)updateWithOptions:(nonnull DTPaymentOptions *)options;
- (nullable NSString *)validateOptions:(nonnull DTPaymentOptions *)options isAliasPayment:(BOOL)isAliasPayment hasKlarnaSDK:(BOOL)hasKlarnaSDK;

+ (nonnull NSSet<DTPaymentMethodInfo *> *)methodsInMethods:(nonnull NSArray<DTPaymentMethodInfo *> *)methods forNumberStartingWith:(nonnull NSString *)number;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,21 @@ SWIFT_CLASS_NAMED("ApplePayConfig")
/// Use this option to show Apple Pay as a payment button instead of a
/// listed payment method.
@property (nonatomic) BOOL showLargeButton;
/// Although the library automatically hides Apple Pay if no cards are supported,
/// this shows if Apple Pay is available for the specified card acquirers.
/// Use this option to hide and disable Apple Pay when the user hasn’t yet set up
/// a supported card with Apple Pay. By default Apple Pay is shown in any case.
@property (nonatomic) BOOL existingCardRequired;
/// Use this method to determine the availability of Apple Pay for the specified parameters on a given device. Note that while the SDK automatically manages the visibility
/// of Apple Pay and hides it when not available, if Apple Pay is the only payment option and it is not available, an error will be thrown.
/// This method is commonly employed in scenarios where Apple Pay is presented as a fast checkout option on a product page or when the merchant displays
/// the list of available payment methods.
/// \param supportedNetworks Supported card acquirers.
///
/// \param existingCardRequired Determines whether Apple Pay should be exclusively available when at least one supported card is already set up by the user.
///
///
/// returns:
/// True if Apple Pay is available on the device, false if it is unavailable.
+ (BOOL)hasApplePayWithSupportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks SWIFT_WARN_UNUSED_RESULT;
+ (BOOL)hasApplePayWithSupportedNetworks:(NSArray<PKPaymentNetwork> * _Nonnull)supportedNetworks existingCardRequired:(BOOL)existingCardRequired 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 applePayMerchantId The merchant identifier (Merchant ID) at Apple,
Expand Down Expand Up @@ -278,28 +285,6 @@ SWIFT_CLASS_NAMED("BackendError")
@end


@class DTBinRangeMatch;

/// :nodoc:
SWIFT_CLASS_NAMED("BinRange")
@interface DTBinRange : NSObject
+ (DTBinRange * _Nonnull)rangeWithStart:(NSString * _Nonnull)start end:(NSString * _Nonnull)end SWIFT_WARN_UNUSED_RESULT;
+ (DTBinRange * _Nonnull)prefix:(NSString * _Nonnull)prefix SWIFT_WARN_UNUSED_RESULT;
- (DTBinRangeMatch * _Nullable)match:(NSString * _Nonnull)number SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end


/// :nodoc:
SWIFT_CLASS_NAMED("BinRangeMatch")
@interface DTBinRangeMatch : NSObject
@property (nonatomic, readonly) NSInteger matchLength;
@property (nonatomic, readonly) BOOL complete;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class NSNumber;

/// Configuration object for Boncard transactions.
Expand Down Expand Up @@ -425,6 +410,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTCardLabelType, "CardLabelType", open) {




/// Callback invoked by the SDK when the custom initial loader must be dismissed.
/// important:
/// The SDK does not invoke the callback when nothing has to be shown throughout the process. Make sure you dismiss the loading animation at the end of the transaction if the SDK hasn’t done so already.
Expand Down Expand Up @@ -530,7 +516,7 @@ SWIFT_CLASS_NAMED("PCIPTokenization")
- (nonnull instancetype)initWithMerchantId:(NSString * _Nonnull)merchantId paymentMethodTypes:(NSArray<NSNumber *> * _Nonnull)paymentMethodTypesObjc;
/// Starts the SDK and displays any needed user interface using the provided
/// <code>presentingController</code>. Note that a tokenization can only
/// be started once.
/// be started once. For SwiftUI, use <code>View.datatrans(startWithPCIPTokenization:)</code> instead.
/// \param presentingController <code>UIViewController</code>
/// used to present the user interface during an on-going tokenization.
///
Expand Down Expand Up @@ -700,6 +686,10 @@ typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", op
DTPaymentMethodTypeSwish = 27,
/// Vipps payment method
DTPaymentMethodTypeVipps = 28,
/// Maestro payment method
DTPaymentMethodTypeMaestro = 29,
/// China Union Pay payment method
DTPaymentMethodTypeChinaUnionPay = 30,
};


Expand Down Expand Up @@ -1075,7 +1065,7 @@ SWIFT_CLASS_NAMED("Transaction")
- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken savedPaymentMethods:(NSArray<DTSavedPaymentMethod *> * _Nonnull)savedPaymentMethods OBJC_DESIGNATED_INITIALIZER;
/// Starts the SDK and displays any needed user interface using the
/// provided <code>presentingController</code>. Note that a transaction
/// can only be started once.
/// can only be started once. For SwiftUI, use <code>View.datatrans(startWithTransaction:)</code> instead.
/// \param presentingController <code>UIViewController</code>
/// used to present the user interface during an on-going transaction
///
Expand Down
Binary file modified Datatrans.xcframework/ios-arm64/Datatrans.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation
import PassKit
import SafariServices
import Swift
import SwiftUI
import UIKit
import Vision
import WebKit
Expand Down Expand Up @@ -121,17 +122,6 @@ import _Concurrency
@objc func tokenizationDidFail(_ tokenization: Datatrans.PCIPTokenization, error: Datatrans.PCIPTokenizationError)
@objc optional func tokenizationDidCancel(_ tokenization: Datatrans.PCIPTokenization)
}
@_hasMissingDesignatedInitializers @objc(DTBinRange) public class BinRange : ObjectiveC.NSObject {
@objc public class func range(start: Swift.String, end: Swift.String) -> Datatrans.BinRange
@objc public class func prefix(_ prefix: Swift.String) -> Datatrans.BinRange
@objc public func match(_ number: Swift.String) -> Datatrans.BinRangeMatch?
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(DTBinRangeMatch) public class BinRangeMatch : ObjectiveC.NSObject {
@objc final public let matchLength: Swift.Int
@objc final public let complete: Swift.Bool
@objc deinit
}
@_inheritsConvenienceInitializers @objc(DTBackendError) public class BackendError : Foundation.NSError {
@objc public var name: Swift.String {
@objc get
Expand Down Expand Up @@ -167,7 +157,7 @@ import _Concurrency
@objc override dynamic public init()
@objc deinit
}
@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int {
@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int, Swift.CaseIterable {
case Visa
case MasterCard
case DinersClub
Expand Down Expand Up @@ -197,8 +187,17 @@ import _Concurrency
case Dankort
case Swish
case Vipps
case Maestro
case ChinaUnionPay
public var identifier: Swift.String {
get
}
public init?(rawValue: Swift.Int)
public typealias AllCases = [Datatrans.PaymentMethodType]
public typealias RawValue = Swift.Int
public static var allCases: [Datatrans.PaymentMethodType] {
get
}
public var rawValue: Swift.Int {
get
}
Expand Down Expand Up @@ -230,6 +229,13 @@ import _Concurrency
@objc required public init?(coder: Foundation.NSCoder)
@objc deinit
}
@available(iOS 14.0, *)
extension SwiftUI.View {
public func datatrans(startWithTransaction: SwiftUI.Binding<Datatrans.Transaction?>) -> some SwiftUI.View

public func datatrans(startWithPCIPTokenization: SwiftUI.Binding<Datatrans.PCIPTokenization?>) -> some SwiftUI.View

}
@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) public class PaymentMethodTypeMapper : ObjectiveC.NSObject {
public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType?
@objc(toTypeWithIdentifier:) public static func toTypeObjc(identifier: Swift.String) -> Foundation.NSNumber?
Expand Down Expand Up @@ -297,7 +303,8 @@ import _Concurrency
}
@objc public var showApplePayAsSavedPaymentMethod: Swift.Bool
@objc public var showLargeButton: Swift.Bool
@objc public class func hasApplePay(withSupportedNetworks supportedNetworks: [PassKit.PKPaymentNetwork]) -> Swift.Bool
@objc public var existingCardRequired: Swift.Bool
@objc public class func hasApplePay(withSupportedNetworks supportedNetworks: [PassKit.PKPaymentNetwork], existingCardRequired: Swift.Bool) -> Swift.Bool
@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
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 @@ -35,6 +35,8 @@ extern NSString* const DTPaymentMethodKlarna;
extern NSString* const DTPaymentMethodDankort;
extern NSString* const DTPaymentMethodSwish;
extern NSString* const DTPaymentMethodVipps;
extern NSString* const DTPaymentMethodMaestro;
extern NSString* const DTPaymentMethodChinaUnionPay;

// reka alternative identifiers
extern NSString* const DTPaymentMethodRekaRail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ typedef enum {
DTPaymentMethodWebPayment = 1 << 1,
DTPaymentMethodWebPaymentExternal = 1 << 2,
DTPaymentMethodRequiresCustomScheme = 1 << 3,
DTPaymentMethodCreditCardOptionalCvv = 1 << 5,
} DTPaymentMethodFlags;

@interface DTPaymentMethodInfo : NSObject
Expand All @@ -28,6 +29,7 @@ typedef enum {
@property (nonatomic, readonly) BOOL needsCardVerification;
@property (nonatomic, readonly) BOOL hasSavedPaymentMethodSupport;
@property (nonatomic, readonly) BOOL requiresCustomScheme;
@property (nonatomic, readonly) BOOL isOptionalCvv;

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

Expand All @@ -44,6 +46,4 @@ typedef enum {
- (void)updateWithOptions:(nonnull DTPaymentOptions *)options;
- (nullable NSString *)validateOptions:(nonnull DTPaymentOptions *)options isAliasPayment:(BOOL)isAliasPayment hasKlarnaSDK:(BOOL)hasKlarnaSDK;

+ (nonnull NSSet<DTPaymentMethodInfo *> *)methodsInMethods:(nonnull NSArray<DTPaymentMethodInfo *> *)methods forNumberStartingWith:(nonnull NSString *)number;

@end
Loading

0 comments on commit d55feb6

Please sign in to comment.