diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ce4813 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +/.build +/Packages +/.swiftpm +/*.xcodeproj +xcuserdata/ diff --git a/Datatrans.xcframework/Info.plist b/Datatrans.xcframework/Info.plist new file mode 100644 index 0000000..9e6da25 --- /dev/null +++ b/Datatrans.xcframework/Info.plist @@ -0,0 +1,39 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-x86_64-simulator + LibraryPath + Datatrans.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64 + LibraryPath + Datatrans.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Assets.car b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Assets.car new file mode 100644 index 0000000..9cae02e Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Assets.car differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Datatrans b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Datatrans new file mode 100755 index 0000000..c776a85 Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Datatrans differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOCreditCardInfo.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOCreditCardInfo.h new file mode 100755 index 0000000..a7e4d87 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOCreditCardInfo.h @@ -0,0 +1,80 @@ +// +// CardIOCreditCardInfo.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import + +/// CardIOCreditCardType Identifies type of card. +typedef NS_ENUM(NSInteger, CardIOCreditCardType) { + /// The card number does not correspond to any recognizable card type. + CardIOCreditCardTypeUnrecognized = 0, + /// The card number corresponds to multiple card types (e.g., when only a few digits have been entered). + CardIOCreditCardTypeAmbiguous = 1, + /// American Express + CardIOCreditCardTypeAmex = '3', + /// Japan Credit Bureau + CardIOCreditCardTypeJCB = 'J', + /// VISA + CardIOCreditCardTypeVisa = '4', + /// MasterCard + CardIOCreditCardTypeMastercard = '5', + /// Discover Card + CardIOCreditCardTypeDiscover = '6' +}; + + +/// Container for the information about a card. +@interface CardIOCreditCardInfo : NSObject + +/// Card number. +@property(nonatomic, copy, readwrite) NSString *cardNumber; + +/// Card number with all but the last four digits obfuscated. +@property(nonatomic, copy, readonly) NSString *redactedCardNumber; + +/// January == 1 +/// @note expiryMonth & expiryYear may be 0, if expiry information was not requested. +@property(nonatomic, assign, readwrite) NSUInteger expiryMonth; + +/// The full four digit year. +/// @note expiryMonth & expiryYear may be 0, if expiry information was not requested. +@property(nonatomic, assign, readwrite) NSUInteger expiryYear; + +/// Security code (aka CSC, CVV, CVV2, etc.) +/// @note May be nil, if security code was not requested. +@property(nonatomic, copy, readwrite) NSString *cvv; + +/// Postal code. Format is country dependent. +/// @note May be nil, if postal code information was not requested. +@property(nonatomic, copy, readwrite) NSString *postalCode; + +/// Was the card number scanned (as opposed to entered manually)? +@property(nonatomic, assign, readwrite) BOOL scanned; + +/// The rectified card image; usually 428x270. +@property(nonatomic, strong, readwrite) UIImage *cardImage; + +/// Derived from cardNumber. +/// @note CardIOCreditInfo objects returned by either of the delegate methods +/// userDidProvideCreditCardInfo:inPaymentViewController: +/// or cardIOView:didScanCard: +/// will never return a cardType of CardIOCreditCardTypeAmbiguous. +@property(nonatomic, assign, readonly) CardIOCreditCardType cardType; + +/// Convenience method which returns a card type string suitable for display (e.g. "Visa", "American Express", "JCB", "MasterCard", or "Discover"). +/// Where appropriate, this string will be translated into the language specified. +/// @param cardType The card type. +/// @param languageOrLocale See CardIOPaymentViewController.h for a detailed explanation of languageOrLocale. +/// @return Card type string suitable for display. ++ (NSString *)displayStringForCardType:(CardIOCreditCardType)cardType usingLanguageOrLocale:(NSString *)languageOrLocale; + +/// Returns a 36x25 credit card logo, at a resolution appropriate for the device. +/// @param cardType The card type. +/// @return 36x25 credit card logo. ++ (UIImage *)logoForCardType:(CardIOCreditCardType)cardType; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIODetectionMode.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIODetectionMode.h new file mode 100755 index 0000000..a119c47 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIODetectionMode.h @@ -0,0 +1,18 @@ +// +// CardIODetectionMode.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// +// + +#ifndef icc_CardIODetectionMode_h +#define icc_CardIODetectionMode_h + +typedef NS_ENUM(NSInteger, CardIODetectionMode) { + CardIODetectionModeCardImageAndNumber = 0, + CardIODetectionModeCardImageOnly, + CardIODetectionModeAutomatic +}; + +#endif diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOUtilities.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOUtilities.h new file mode 100755 index 0000000..765663a --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOUtilities.h @@ -0,0 +1,37 @@ +// +// CardIOUtilities.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import + +@interface CardIOUtilities : NSObject + +/// Please send the output of this method with any technical support requests. +/// @return Human-readable version of this library. ++ (NSString *)libraryVersion; + +/// Determine whether this device supports camera-based card scanning, considering +/// factors such as hardware support and OS version. +/// +/// card.io automatically provides manual entry of cards as a fallback, +/// so it is not typically necessary for your app to check this. +/// +/// @return YES iff the user's device supports camera-based card scanning. ++ (BOOL)canReadCardWithCamera; + +/// The preload method prepares card.io to launch faster. Calling preload is optional but suggested. +/// On an iPhone 5S, for example, preloading makes card.io launch ~400ms faster. +/// The best time to call preload is when displaying a view from which card.io might be launched; +/// e.g., inside your view controller's viewWillAppear: method. +/// preload works in the background; the call to preload returns immediately. ++ (void)preload; + +/// Returns a doubly Gaussian-blurred screenshot, intended for screenshots when backgrounding. +/// @return Blurred screenshot. ++ (UIImageView *)blurredScreenImageView; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOView.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOView.h new file mode 100755 index 0000000..8919923 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOView.h @@ -0,0 +1,125 @@ +// +// CardIOView.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import "CardIOViewDelegate.h" +#import "CardIODetectionMode.h" + +/// CardIOView is one of two main entry points into the card.io SDK. +/// @see CardIOPaymentViewController +@interface CardIOView : UIView + + +#pragma mark - Properties you MUST set + +/// Typically, your view controller will set itself as this delegate. +@property(nonatomic, weak, readwrite) id delegate; + + +#pragma mark - Properties you MAY set + +/// The preferred language for all strings appearing in the user interface. +/// If not set, or if set to nil, defaults to the device's current language setting. +/// +/// Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.). +/// If card.io does not contain localized strings for a specified locale, then it will fall back to the language. E.g., "es_CO" -> "es". +/// If card.io does not contain localized strings for a specified language, then it will fall back to American English. +/// +/// If you specify only a language code, and that code matches the device's currently preferred language, +/// then card.io will attempt to use the device's current region as well. +/// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB". +/// +/// These localizations are currently included: +/// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW. +@property(nonatomic, copy, readwrite) NSString *languageOrLocale; + +/// Alter the card guide (bracket) color. Opaque colors recommended. +/// Defaults to nil; if nil, will use card.io green. +@property(nonatomic, retain, readwrite) UIColor *guideColor; + +/// Set to YES to show the card.io logo over the camera instead of the PayPal logo. Defaults to NO. +@property(nonatomic, assign, readwrite) BOOL useCardIOLogo; + +/// Hide the PayPal or card.io logo in the scan view. Defaults to NO. +@property(nonatomic, assign, readwrite) BOOL hideCardIOLogo; + +/// By default, in camera view the card guide and the buttons always rotate to match the device's orientation. +/// All four orientations are permitted, regardless of any app or viewcontroller constraints. +/// If you wish, the card guide and buttons can instead obey standard iOS constraints, including +/// the UISupportedInterfaceOrientations settings in your app's plist. +/// Set to NO to follow standard iOS constraints. Defaults to YES. (Does not affect the manual entry screen.) +@property(nonatomic, assign, readwrite) BOOL allowFreelyRotatingCardGuide; + +/// Set the scan instruction text. If nil, use the default text. Defaults to nil. +/// Use newlines as desired to control the wrapping of text onto multiple lines. +@property(nonatomic, copy, readwrite) NSString *scanInstructions; + +/// A custom view that will be overlaid atop the entire scan view. Defaults to nil. +/// If you set a scanOverlayView, be sure to: +/// +/// * Consider rotation. Be sure to test on the iPad with rotation both enabled and disabled. +/// To make rotation synchronization easier, whenever a scanOverlayView is set, and card.io does an +/// in-place rotation (rotates its UI elements relative to their containers), card.io will generate +/// rotation notifications; see CardIOScanningOrientationDidChangeNotification +/// and associated userInfo key documentation below. +/// As with UIKit, the initial rotation is always UIInterfaceOrientationPortrait. +/// +/// * Be sure to pass touches through to the superview as appropriate. Note that the entire camera +/// preview responds to touches (triggers refocusing). Test the light button and the toolbar buttons. +/// +/// * Minimize animations, redrawing, or any other CPU/GPU/memory intensive activities +@property(nonatomic, retain, readwrite) UIView *scanOverlayView; + +/// Set to NO if you don't want the camera to try to scan the card expiration. +/// Defaults to YES. +@property(nonatomic, assign, readwrite) BOOL scanExpiry; + +/// CardIODetectionModeCardImageAndNumber: the scanner must successfully identify the card number. +/// CardIODetectionModeCardImageOnly: don't scan the card, just detect a credit-card-shaped card. +/// CardIODetectionModeAutomatic: start as CardIODetectionModeCardImageAndNumber, but fall back to +/// CardIODetectionModeCardImageOnly if scanning has not succeeded within a reasonable time. +/// Defaults to CardIODetectionModeCardImageAndNumber. +/// +/// @note Images returned in CardIODetectionModeCardImageOnly mode may be less focused, to accomodate scanning +/// cards that are dominantly white (e.g., the backs of drivers licenses), and thus +/// hard to calculate accurate focus scores for. +@property(nonatomic, assign, readwrite) CardIODetectionMode detectionMode; + +/// After a successful scan, the CardIOView will briefly display an image of the card with +/// the computed card number superimposed. This property controls how long (in seconds) +/// that image will be displayed. +/// Set this to 0.0 to suppress the display entirely. +/// Defaults to 1.0. +@property(nonatomic, assign, readwrite) CGFloat scannedImageDuration; + +/// Name for orientation change notification. +extern NSString * const CardIOScanningOrientationDidChangeNotification; + +/// userInfo key for orientation change notification, to get the current scanning orientation. +/// +/// Returned as an NSValue wrapping a UIDeviceOrientation. Sample extraction code: +/// @code +/// NSValue *wrappedOrientation = notification.userInfo[CardIOCurrentScanningOrientation]; +/// UIDeviceOrientation scanningOrientation = UIDeviceOrientationPortrait; // set a default value just to be safe +/// [wrappedOrientation getValue:&scanningOrientation]; +/// // use scanningOrientation... +/// @endcode +extern NSString * const CardIOCurrentScanningOrientation; + +/// userInfo key for orientation change notification, to get the duration of the card.io rotation animations. +/// +/// Returned as an NSNumber wrapping an NSTimeInterval (i.e. a double). +extern NSString * const CardIOScanningOrientationAnimationDuration; + + +#pragma mark - Property you MAY get + +/// The actual camera preview area within the CardIOView. Location is relative to the CardIOView's origin. +/// You might want to use this, for example, when adjusting your view controller's view layout. +@property(nonatomic, assign, readonly) CGRect cameraPreviewFrame; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOViewDelegate.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOViewDelegate.h new file mode 100755 index 0000000..9e255aa --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/CardIOViewDelegate.h @@ -0,0 +1,26 @@ +// +// CardIOViewDelegate.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import + +@class CardIOCreditCardInfo; +@class CardIOView; + +/// The receiver will be notified when the CardIOView completes it work. +@protocol CardIOViewDelegate + +@required + +/// This method will be called when the CardIOView completes its work. +/// It is up to you to hide or remove the CardIOView. +/// At a minimum, you should give the user an opportunity to confirm that the card information was captured correctly. +/// @param cardIOView The active CardIOView. +/// @param cardInfo The results of the scan. +/// @note cardInfo will be nil if exiting due to a problem (e.g., no available camera). +- (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)cardInfo; + +@end \ No newline at end of file diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAddress.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAddress.h new file mode 100644 index 0000000..05500e2 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAddress.h @@ -0,0 +1,27 @@ +// +// DTAddress.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTAddress : NSObject + +@property (nonatomic, copy) NSString* firstName; +@property (nonatomic, copy) NSString* lastName; +@property (nonatomic, copy) NSString* street; +@property (nonatomic, copy) NSString* zipCode; + +@property (nonatomic, copy) NSString* city; +@property (nonatomic, copy) NSString* countryCode; +@property (nonatomic, copy) NSString* street2; + +- (id)initWithFirstName:(NSString *)firstName + lastName:(NSString *)lastName + street:(NSString *)street + zipCode:(NSString *)zipCode; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h new file mode 100644 index 0000000..5aaae40 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h @@ -0,0 +1,20 @@ + +#import + +@class DTPaymentMethodInfo; +@class DTPaymentRequest; +@class DTPaymentMethodToken; + +@interface DTAliasPaymentAuthorizationRequest : NSObject + +@property (nonatomic, nullable, copy) NSString* cvv; +@property (nonatomic, nullable, copy) NSString* easypayPaymentInfo; +@property (nonatomic, nullable, copy) NSDictionary* merchantProperties; +@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, nullable, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest+Internal.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest+Internal.h new file mode 100644 index 0000000..84a0b9e --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest+Internal.h @@ -0,0 +1,18 @@ +// +// DTAliasRequest+Internal.h +// datatrans-iphone +// +// Created by bacherma on 9/9/14. +// +// + +#import + +@interface DTAliasRequest (Internal) + +@property (nonatomic, readonly) NSString* merchantId; +@property (nonatomic, readonly) NSString* currencyCode; +@property (nonatomic, copy) DTCard* card; +@property (nonatomic, readonly) NSArray* paymentMethodIdents; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest.h new file mode 100644 index 0000000..e56cdb6 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequest.h @@ -0,0 +1,23 @@ +// +// DTAliasRequest.h +// Datatrans +// +// Created by Basil Achermann on 12/27/10. +// Copyright 2010 iEffects GmbH. All rights reserved. +// + +#import + +@class DTCard; + +@interface DTAliasRequest : NSObject + +// 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; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequestResponse.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequestResponse.h new file mode 100644 index 0000000..f5bbdbc --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAliasRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTAliasRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTAliasRequestResponse : NSObject + +@property (nonatomic, copy) NSString* alias; +@property (nonatomic, copy) NSString* maskedCardNumber; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayDelegate.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayDelegate.h new file mode 100644 index 0000000..14ddccc --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayDelegate.h @@ -0,0 +1,53 @@ +// +// DTApplePayDelegate.h +// +// DTApplePayDelegate methods can be implemented to customize Apple Pay payments. All methods have been copied +// verbatim from PKPaymentAuthorizationViewControllerDelegate and are optional. Please refer to the official +// Apple Pay developer documentation for more information. +// + +#import + + +@protocol DTApplePayDelegate + +@optional +// 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: +// didSelectShippingAddress:completion:. +// +// The delegate 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 + didSelectShippingMethod:(PKShippingMethod *)shippingMethod + completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray *summaryItems))completion; + +// 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 *shippingMethods, + NSArray *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 *shippingMethods, + NSArray *summaryItems))completion NS_AVAILABLE_IOS(9_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 *summaryItems))completion NS_AVAILABLE_IOS(9_0); + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayProcess.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayProcess.h new file mode 100644 index 0000000..da07aac --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTApplePayProcess.h @@ -0,0 +1,29 @@ +// +// DTApplePayProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 06.10.20. +// + +@class DTErrorHandler; +@class DTNetworking; +@class DTPaymentOptions; +@class DTPaymentRequest; +@protocol DTTransactionModel; + +@protocol DTApplePayProcessDelegate + +- (void)paymentDidFinish; +- (void)transactionWasCancelled; +- (void)transactionDidFailWithError:(nonnull NSError *)error; + +@end + +@interface DTApplePayProcess : NSObject + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (nonnull instancetype)initWithPresentingController:(nonnull UIViewController *)controller networking:(nonnull DTNetworking *)networking errorHandler:(nonnull DTErrorHandler *)errorHandler options:(nonnull DTPaymentOptions *)options delegate:(nonnull id)delegate; + +- (void)startWithPaymentRequest:(nonnull DTPaymentRequest *)request paymentModel:(nonnull id)model; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h new file mode 100644 index 0000000..e8793f1 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTAuthorizationRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTAuthorizationRequestResponse : NSObject + +@property (nonatomic, assign) NSInteger responseCode; +@property (nonatomic, copy) NSDictionary* responseInfo; // optional info (maskedCC etc.), in case of split authorization +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTBasketItem.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTBasketItem.h new file mode 100644 index 0000000..bfde66c --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTBasketItem.h @@ -0,0 +1,25 @@ +// +// DTBasketItem-h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTBasketItem : NSObject + +@property (nonatomic, copy) NSString* articleId; +@property (nonatomic, copy) NSString* name; +@property (nonatomic, assign) NSInteger grossPrice; +@property (nonatomic, assign) NSInteger quantity; + +@property (nonatomic, copy) NSString* itemDescription; +@property (nonatomic, assign) float_t tax; +@property (nonatomic, assign) NSInteger taxAmount; +@property (nonatomic, copy) NSString* type; // default: "goods" + +- (id)initWithId:(NSString *)articleId name:(NSString *)name grossPrice:(NSInteger)grossPrice quantity:(NSInteger)quantity; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTByjunoPaymentInfo.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTByjunoPaymentInfo.h new file mode 100644 index 0000000..995f76a --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTByjunoPaymentInfo.h @@ -0,0 +1,42 @@ +// +// DTByjunoPaymentInfo.h +// datatrans-iphone +// +// Created by bacherma on 14/08/17. +// Copyright 2017 ieffects ag. All rights reserved. +// +// +// Class for configuring Byjuno payments. In the following example a possible Byjuno payment is configured: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Mark" +// lastName:@"Uber" +// street:@"Amstelstrasse 11" +// zipCode:@"4123"]; +// address.city = @"Allschwil"; +// address.countryCode = @"CH"; +// +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.customerId = @"10067822"; +// customer.type = @"P"; +// customer.gender = @"female"; +// customer.address = address; +// customer.birthDate = [[DTDate alloc] initWithYear:1986 month:5 day:14]; +// customer.language = @"DE"; +// customer.mailAddress = @"h.mustermann@intrum.com"; +// paymentController.paymentOptions.customer = customer; +// +// DTByjunoPaymentInfo* info = [[DTByjunoPaymentInfo alloc] init]; +// info.deviceFingerprintId = @"deviceFingerprintId-test"; +// paymentController.paymentOptions.byjunoPaymentInfo = info; +// + +#import + +@interface DTByjunoPaymentInfo : NSObject + +@property (nonatomic, copy) NSString* deviceFingerprintId; +@property (nonatomic, copy) NSString* verifiedDocument1Number; +@property (nonatomic, copy) NSString* verifiedDocument1Issuer; +@property (nonatomic, copy) NSString* verifiedDocument1Type; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTCustomer.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTCustomer.h new file mode 100644 index 0000000..65e2a1d --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTCustomer.h @@ -0,0 +1,27 @@ +// +// DTCustomer.h +// datatrans-iphone +// +// Created by pschmid on 14/08/17. +// Copyright 2017 ieffects ag. All rights reserved. +// + +#import + +@class DTDate; +@class DTAddress; + +@interface DTCustomer : NSObject + +@property (nonatomic, copy) DTAddress* address; +@property (nonatomic, copy) DTDate* birthDate; +@property (nonatomic, copy) NSString* cellPhone; +@property (nonatomic, copy) NSString* customerId; +@property (nonatomic, copy) NSString* gender; +@property (nonatomic, copy) NSString* ipAddress; +@property (nonatomic, copy) NSString* language; +@property (nonatomic, copy) NSString* mailAddress; +@property (nonatomic, copy) NSString* phone; +@property (nonatomic, copy) NSString* type; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTDate.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTDate.h new file mode 100644 index 0000000..8808167 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTDate.h @@ -0,0 +1,18 @@ +// +// DTDate.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTDate : NSObject + +@property (nonatomic, readonly) NSString* dateString; + +- (id)initWithYear:(int)year month:(int)month day:(int)day; +- (id)initWithString:(NSString *)s; // dd.MM.yyyy or yyyy-MM-dd + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandler.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandler.h new file mode 100644 index 0000000..24b6e55 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandler.h @@ -0,0 +1,25 @@ +// +// DTErrorHandler.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 02.10.20. +// + +@protocol DTErrorHandlerDelegate; +@protocol DTErrorPresenter; +@class DTUrls; + +@interface DTErrorHandler : NSObject + +- (nonnull instancetype)initWithDelegate:(nonnull id)delegate errorPresenter:(nonnull id)errorPresenter urls:(nonnull DTUrls *)urls suppressTransactionErrorDialog:(BOOL)suppressTransactionErrorDialog; + +- (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)showAliasRegistrationError:(nonnull NSError *)error returnAuthorizationError:(BOOL)returnAuthorizationError; +- (void)showAuthenticationError:(nonnull NSError *)error; +- (void)showAuthorizationError:(nonnull NSError *)error; +- (void)showCriticalErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message error:(nonnull NSError *)error; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandlerDelegate.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandlerDelegate.h new file mode 100644 index 0000000..291898b --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorHandlerDelegate.h @@ -0,0 +1,12 @@ +// +// DTErrorHandlerDelegate.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 08.10.20. +// + +@protocol DTErrorHandlerDelegate + +- (void)didHandleError:(nonnull NSError *)error; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorPresenter.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorPresenter.h new file mode 100644 index 0000000..65aca2b --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTErrorPresenter.h @@ -0,0 +1,9 @@ +#import + +@protocol DTErrorPresenter + +- (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) + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h new file mode 100644 index 0000000..cf46f60 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h @@ -0,0 +1,17 @@ +// +// DTExternalWebAppDelegateProxy.h +// datatrans-iphone +// +// Created by Basil Achermann on 25.01.18. +// + +#import + +@interface DTExternalWebAppDelegateProxy : NSObject + +typedef BOOL (^DTExternalWebAppDelegateProxyHandler)(NSURL* url); + +- (id)initWithViewController:(UIViewController *)viewController handler:(DTExternalWebAppDelegateProxyHandler)handler; +- (void)cancel; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h new file mode 100644 index 0000000..bbfc4cb --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h @@ -0,0 +1,16 @@ +// +// DTFakePaymentRequestFactory.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 30.09.20. +// + +@class DTAliasRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; + +@interface DTFakePaymentRequestFactory : NSObject + ++ (nonnull DTPaymentRequest *)createFakePayment:(nonnull DTAliasRequest *)aliasRequest options:(nonnull DTPaymentOptions *)options; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransaction.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransaction.h new file mode 100644 index 0000000..a5dc726 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransaction.h @@ -0,0 +1,31 @@ +// +// DTInitialTransaction.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + +@class DTAliasRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; +@class DTPaymentMethodToken; + + +@interface DTInitialTransaction : NSObject + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (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 *)paymentMethods; +- (nonnull DTPaymentRequest *)paymentRequest; +- (nullable DTPaymentMethodToken *)paymentMethodToken; +- (BOOL)isPayment; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransactionProcess.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransactionProcess.h new file mode 100644 index 0000000..a6c7d23 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTInitialTransactionProcess.h @@ -0,0 +1,22 @@ +// +// DTInitialTransactionProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + +@class DTInitialTransaction; +@class DTNetworking; + + +@interface DTInitialTransactionProcess : NSObject + +typedef void (^InitialTransactionCompletion)(DTInitialTransaction * _Nullable transaction, NSError * _Nullable error); + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (nonnull instancetype)initWithNetworking:(nonnull DTNetworking *)networking idempotencyKey:(nonnull NSString *)idempotencyKey; + +- (void)startWithMobileToken:(nonnull NSString *)mobileToken completion:(nonnull InitialTransactionCompletion)completion; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLoaderPresenter.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLoaderPresenter.h new file mode 100644 index 0000000..9b1730d --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLoaderPresenter.h @@ -0,0 +1,13 @@ +// +// DTLoaderPresenter.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 29.09.20. +// + +@protocol DTLoaderPresenter + +- (void)showLoader; +- (void)dismissLoader; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLockScreenPresenter.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLockScreenPresenter.h new file mode 100644 index 0000000..48b7c2a --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTLockScreenPresenter.h @@ -0,0 +1,7 @@ + +@protocol DTLockScreenPresenter + +- (void)showLockScreenWithText:(nonnull NSString *)text; +- (void)dismissLockScreen; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTNetworking.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTNetworking.h new file mode 100644 index 0000000..0206177 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTNetworking.h @@ -0,0 +1,70 @@ +// +// DTNetworking.h +// DTPaymentLib +// +// Created by Basil Achermann on 8/11/10. +// Copyright 2010 iEffects GmbH. All rights reserved. +// + +#import + +@class DTAliasPaymentAuthorizationRequest; +@class DTAliasRequest; +@class DTAliasRequestResponse; +@class DTAuthorizationRequestResponse; +@class DTPaymentAuthorizationRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; +@class DTStartApplePayRequestResponse; +@class DTStartTokenRequestResponse; +@class DTStartTWINTRequestResponse; +@class DTStatusRequestResponse; +@class DTTWINTStatusRequestResponse; +@class DTUrls; + +typedef enum { + DT_ENROLLMENT_STATUS_NOT_ENROLLED, + DT_ENROLLMENT_STATUS_ENROLLED +} DTEnrollmentStatus; + +@protocol DTNWRequest +- (void)cancel; +@end + + +// Datatrans networking API. All requests are asynchronous. Responses are posted to the _main_ thread. +// Errors can be: +// - Technical errors: error codes of Apple internal domains (NSURLErrorDomain, kCFErrorDomainCFNetwork), +// negative error codes of kGDataHTTPFetcherErrorDomain, +// internal and parsing errors of DTNetworkingErrorDomain defined by DTNetworkingErrorCode. +// - Invalid HTTP status codes: positive error codes of domain kGDataHTTPFetcherErrorDomain +// - Transaction errors: all non-technical error codes of DTNetworkingErrorDomain as defined by DTNetworkingErrorCode +@interface DTNetworking : NSObject { +@protected + BOOL _testingEnabled; + DTPaymentOptions* _options; +} + ++ (BOOL)isTechnicalError:(NSError *)error; ++ (BOOL)isSSLError:(NSError *)error; + +- (instancetype)initWithMobileToken:(NSString *)mobileToken options:(DTPaymentOptions *)paymentOptions urls:(DTUrls *)urls; + +- (void)requestInitialTransaction:(NSString *)mobileToken idempotencyKey:(NSString *)idempotencyKey completion:(void (^)(NSData *, NSError *))completion; +- (void)requestAliasForMerchantId:(NSString *)merchantId cardNo:(NSString *)cardNo completion:(void (^)(DTAliasRequestResponse *, NSError *))completion; +- (void)requestStatusForMerchantId:(NSString *)merchantId alias:(NSString *)alias currencyCode:(NSString *)currencyCode isAliasRequest:(BOOL)isAliasRequest completion:(void(^)(DTStatusRequestResponse *, NSError *))completion; +- (void)authorizeAliasPaymentRequest:(DTAliasPaymentAuthorizationRequest *)authorizationRequest completion:(void (^)(DTAuthorizationRequestResponse *, NSError *))completion; +- (void)authorizePaymentRequest:(DTPaymentAuthorizationRequest *)authorizationRequest completion:(void (^)(DTAuthorizationRequestResponse *, NSError *))completion; // split web payment +- (void)startTokenRequest:(DTPaymentRequest *)paymentRequest paymentMethod:(NSString *)paymentMethod completion:(void (^)(DTStartTokenRequestResponse *, NSError *))completion; +- (void)startTokenRequestForAlias:(DTAliasRequest *)aliasRequest paymentMethod:(NSString *)paymentMethod completion:(void (^)(DTStartTokenRequestResponse *, NSError *))completion; +- (void)startTWINTAliasRequest:(DTAliasRequest *)aliasRequest completion:(void (^)(DTStartTWINTRequestResponse *, NSError *))completion; +- (void)TWINTStatusRequestForMerchantId:(NSString *)merchantId transactionId:(NSString *)transactionId completion:(void (^)(DTTWINTStatusRequestResponse *, NSError *))completion; +- (void)cancelRequest:(DTPaymentRequest *)paymentRequest transactionId:(NSString *)transactionId; +- (void)startApplePayRequest:(DTPaymentRequest *)paymentRequest token:(NSString *)token completion:(void (^)(DTStartApplePayRequestResponse *, NSError *))completion; + +#pragma mark - Management +typedef void (^DTManagementCompletion)(NSError* error); +- (void)cancelTransaction:(NSString *)transactionId request:(DTPaymentRequest *)request completion:(DTManagementCompletion)completion; +- (void)cancelCurrentRequest; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPPRiskComponentManager.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPPRiskComponentManager.h new file mode 100644 index 0000000..5c3c1d9 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPPRiskComponentManager.h @@ -0,0 +1,20 @@ +// +// DTPPRiskComponentManager.h +// datatrans-iphone +// +// Created by Basil Achermann on 20.02.18. +// + +#import + + +@interface DTPPRiskComponentManager : NSObject + +// +// The returned instance must be kept while the PP risk component is being used, i.e. during the complete PAP process. +// Release the instance at the end of the process to also dealloc the PP shared component +- (instancetype)initWithPairingId:(NSString *)pairingId; + ++ (NSString *)uniquePairingId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h new file mode 100644 index 0000000..de9ff23 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h @@ -0,0 +1,17 @@ + +#import + +@class DTPaymentMethodInfo; + +@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* merchantProperties; +@property (nonatomic, nullable, copy) DTPaymentMethodInfo* paymentMethod; +@property (nonatomic, nonnull, copy) NSString* refno; +@property (nonatomic, nonnull, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentError.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentError.h new file mode 100644 index 0000000..5880ee4 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentError.h @@ -0,0 +1,31 @@ +// +// DTPaymentError.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 06.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +extern NSString* _Nonnull const DTPaymentErrorDomain; +extern NSString* _Nonnull const DTPaymentMethodKey; + +typedef enum { + DTPaymentErrorTechnical, + DTPaymentErrorValidation, + DTPaymentErrorAuthentication, + DTPaymentErrorAuthorization +} DTPaymentErrorCode; + +@interface DTPaymentError : NSError + ++ (nonnull instancetype)paymentErrorTechnical; ++ (nonnull instancetype)paymentErrorTechnical:(nullable NSString *)message; ++ (nonnull instancetype)paymentErrorValidation:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentErrorAuthentication:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentErrorAuthorization:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentError:(nonnull NSError *)underlyingError paymentMethod:(nullable NSString *)paymentMethod; + ++ (BOOL)isAuthorizationError:(nonnull NSError *)error; +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h new file mode 100644 index 0000000..dd9be0f --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h @@ -0,0 +1,40 @@ +// +// DTPaymentMethodIdentifiers.h +// datatrans-iphone +// +// Created by Patrick Schmid on 02/08/18. +// Copyright 2018 ieffects ag. All rights reserved. +// + +extern NSString* const DTPaymentMethodVisa; +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; +extern NSString* const DTPaymentMethodPostFinanceCard; +extern NSString* const DTPaymentMethodPostFinanceEFinance; +extern NSString* const DTPaymentMethodPayPal; +extern NSString* const DTPaymentMethodEasypay; +extern NSString* const DTPaymentMethodSEPA; +extern NSString* const DTPaymentMethodSwissBilling; +extern NSString* const DTPaymentMethodTwint; +extern NSString* const DTPaymentMethodApplePay; +extern NSString* const DTPaymentMethodReka; +extern NSString* const DTPaymentMethodByjuno; +extern NSString* const DTPaymentMethodByjunoDirectInvoice; +extern NSString* const DTPaymentMethodSwissPass; +extern NSString* const DTPaymentMethodPowerpay; +extern NSString* const DTPaymentMethodPaysafecard; + +// reka alternative identifiers +extern NSString* const DTPaymentMethodRekaRail; +extern NSString* const DTPaymentMethodRekaLunch; + +// Supercard alternative identifiers +extern NSString* const DTPaymentMethodSupercardVisa; +extern NSString* const DTPaymentMethodSupercardPrepaid; +extern NSString* const DTPaymentMethodSupercardMastercard; diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodInfo.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodInfo.h new file mode 100644 index 0000000..81b0222 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentMethodInfo.h @@ -0,0 +1,62 @@ +// +// DTPaymentMethodInfo.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 9/1/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +@class DTPaymentOptions; + +typedef enum { + DTPaymentMethodCreditCard = 1 << 0, + DTPaymentMethodNeedsCardExpiration = 1 << 1, + DTPaymentMethodNeedsCardVerification = 1 << 2, + DTPaymentMethodNeedsCardholder = 1 << 3, + DTPaymentMethodHasTransparentBackground = 1 << 4, + DTPaymentMethodWebPayment = 1 << 5, + DTPaymentMethodHasCardScan = 1 << 6, + DTPaymentMethodWebPaymentExternal = 1 << 7, + DTPaymentMethodNoLogoShadow = 1 << 8, +} DTPaymentMethodFlags; + +@interface DTPaymentMethodInfo : NSObject + +- (nullable instancetype)initWithIdentifier:(nullable NSString *)identifier; + +@property (nonatomic, readonly) BOOL isCreditCard; +@property (nonatomic, readonly) BOOL isWebPayment; +@property (nonatomic, readonly) BOOL isWebPaymentExternal; +@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) 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) NSRange creditCardVerificationLengthRange; +@property (nonatomic, readonly) NSRange creditCardNumberLengthRange; +@property (nonatomic, readonly) NSArray* _Nullable creditCardNumberPrefixes; +@property (nonatomic, readonly) NSArray* _Nullable creditCardNumberSpaces; + +- (nullable NSString *)commonPrefix; + +- (nullable UIImage *)imageForSize:(CGSize)size; + +- (void)updateWithOptions:(nonnull DTPaymentOptions *)options; +- (void)validateOptions:(nonnull DTPaymentOptions *)options isTokenPayment:(BOOL)isTokenPayment; + ++ (nullable DTPaymentMethodInfo *)uniqueMethodInMethods:(nonnull NSArray *)methods forNumberStartingWith:(nonnull NSString *)number; ++ (nonnull NSSet *)methodsInMethods:(nonnull NSArray *)methods forNumberStartingWith:(nonnull NSString *)number; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentModel.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentModel.h new file mode 100644 index 0000000..6ada7e7 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentModel.h @@ -0,0 +1,15 @@ +// +// DTPaymentModel.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 8/31/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +@interface DTPaymentModel : NSObject + ++ (BOOL)creditCardNumberIsValidLuhn:(NSString *)number; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentOptions.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentOptions.h new file mode 100644 index 0000000..6b55026 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentOptions.h @@ -0,0 +1,62 @@ +// +// DTPaymentOptions.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 06.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +typedef enum { + DTPaymentReturnsCreditCardNever = 1, + DTPaymentReturnsCreditCardSelectableDefaultNo, + DTPaymentReturnsCreditCardSelectableDefaultYes, + DTPaymentReturnsCreditCardAlways +} DTPaymentReturnsCreditCard; + +typedef enum { + DTPaymentCardholderHidden = 0, + DTPaymentCardholderOptional, + DTPaymentCardholderRequired +} DTPaymentCardholder; + +@class DTApplePayConfig; +@class DTByjunoPaymentInfo; +@class DTSwissBillingPaymentInfo; +@class DTSwissPassPaymentInfo; +@class DTCustomer; + +@interface DTPaymentOptions : NSObject + +@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; +@property (nonatomic, assign) BOOL useWebELVInput; +@property (nonatomic, copy) NSString* easypayTitle; +@property (nonatomic, copy) NSString* easypayDescription; +@property (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 (nonatomic, copy) NSDictionary* merchantProperties; +@property (nonatomic, copy) NSString* creditCardInputLocalizedDoneButtonTitle; +@property (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 (nonatomic, copy) DTSwissBillingPaymentInfo* swissBillingPaymentInfo; +@property (nonatomic, copy) NSString* appCallbackScheme; +@property (nonatomic, assign) BOOL suppressTransactionErrorDialog; +@property (nonatomic, copy) NSString* applePayMerchantIdentifier; +@property (nonatomic, copy) DTApplePayConfig* applePayConfig; +@property (nonatomic, assign) BOOL skipAuthorizationCompletion; +@property (nonatomic, copy) DTByjunoPaymentInfo* byjunoPaymentInfo; +@property (nonatomic, copy) DTCustomer* customer; +@property (nonatomic, copy) DTSwissPassPaymentInfo* swissPassPaymentInfo; +@property (nonatomic, copy) NSString* paysafecardMerchantClientId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentRequest.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentRequest.h new file mode 100644 index 0000000..dcae9f4 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPaymentRequest.h @@ -0,0 +1,31 @@ +// +// DTPaymentRequest.h +// Datatrans +// +// Created by Kaspar Rohrer on 8/11/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +#pragma mark Payment request + +@interface DTPaymentRequest : NSObject { + NSString* _merchantId; + 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; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h new file mode 100644 index 0000000..78751c3 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h @@ -0,0 +1,12 @@ +// +// DTPostFinanceRequestHandler.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 19/09/19. +// + +#import + +@interface DTPostFinanceRequestHandler : NSObject + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResources.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResources.h new file mode 100644 index 0000000..a8ac2b2 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResources.h @@ -0,0 +1,29 @@ +// +// DTResources.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 09.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +#define DTLocalizedString(key) \ + [DTResources localizedStringForKey:(key)] + +@interface DTResources : NSObject { + +} + ++ (nonnull NSBundle *)bundle; + ++ (nonnull NSBundle *)languageBundle; ++ (nonnull NSBundle *)languageBundleForLanguage:(nullable NSString *)language; + ++ (nonnull NSString *)localizedStringForKey:(nonnull NSString *)key; + ++ (nonnull UIImageView *)viewForIcon:(nonnull UIImage *)icon withColor:(nullable UIColor *)color; + ++ (nullable UIImage *)imageFromPDFNamed:(nonnull NSString *)pdfName forPointSize:(CGSize)size; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResponse.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResponse.h new file mode 100644 index 0000000..2863431 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTResponse.h @@ -0,0 +1,12 @@ +// +// DTResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 20.11.20. +// + +@protocol DTResponse + +@property (nonatomic, copy) NSError* error; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStartTokenRequestResponse.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStartTokenRequestResponse.h new file mode 100644 index 0000000..d3276a2 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStartTokenRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTStartTokenRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTStartTokenRequestResponse : NSObject + +@property (nonatomic, assign) NSInteger responseCode; +@property (nonatomic, copy) NSString* token; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStatusRequestResponse.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStatusRequestResponse.h new file mode 100644 index 0000000..9295a57 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTStatusRequestResponse.h @@ -0,0 +1,15 @@ +// +// DTStatusRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTStatusRequestResponse : NSObject + +@property (nonatomic, assign) BOOL isEnrolled; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h new file mode 100644 index 0000000..9406b4d --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h @@ -0,0 +1,44 @@ +// +// DTSwissBillingPaymentInfo.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// +// +// Class for configuring SwissBilling payments. In the following example a payment is made with basket items: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Good" lastName:@"Customer" street:@"Limmatquai 55" zipCode:@"8001"]; +// address.city = @"Zürich"; +// address.countryCode = @"CH"; +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.address = address; +// customer.phone = @"+41584333034"; +// customer.mailAddress = @"eshop@example.com"; +// customer.birthDate = [[DTDate alloc] initWithYear:1969 month:9 day:19]; +// paymentController.paymentOptions.customer = customer; +// +// DTSwissBillingPaymentInfo* info = [[DTSwissBillingPaymentInfo alloc] init]; +// info.shippingAddress = address; +// +// NSMutableArray* items = [NSMutableArray array]; +// DTBasketItem* item = [[DTBasketItem alloc] initWithId:@"1" name:@"name 1" grossPrice:1000 quantity:1]; +// [items addObject:item]; +// item = [[DTBasketItem alloc] initWithId:@"2" name:@"name 2" grossPrice:500 quantity:2]; +// [items addObject:item]; +// info.basketItems = items; +// +// paymentController.paymentOptions.swissBillingPaymentInfo = info; +// + +#import + +@class DTAddress; + +@interface DTSwissBillingPaymentInfo : NSObject + +@property (nonatomic, assign) NSInteger taxAmount; +@property (nonatomic, copy) DTAddress* shippingAddress; +@property (nonatomic, copy) NSArray* basketItems; // array of DTBasketItem* objects + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h new file mode 100644 index 0000000..5d60d6b --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h @@ -0,0 +1,32 @@ +// +// DTSwissPassPaymentInfo.h +// datatrans-iphone +// +// Created by pschmid on 25/04/19. +// Copyright 2019 ieffects ag. All rights reserved. +// +// +// Class for configuring SwissBilling payments. In the following example a payment is configured: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Anna" lastName:@"Deiss" street:@"SBB Personenverkehr - VS-VE-VS" zipCode:@"3000"]; +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.address = address; +// customer.birthDate = [[DTDate alloc] initWithYear:1980 month:1 day:1]; +// customer.mailAddress = @"anna.deiss@mail.com"; +// customer.phone = @"+41 79 555 44 33"; +// paymentController.paymentOptions.customer = customer; +// +// DTSwissPassPaymentInfo* info = [[DTSwissPassPaymentInfo alloc] initWithSwissPassCardNumber:@"S48681516807" swissPassZipCode:@"3000"]; +// paymentController.paymentOptions.swissPassPaymentInfo = info; +// + +#import + +@interface DTSwissPassPaymentInfo : NSObject + +@property (nonatomic, copy) NSString* swissPassCardNumber; +@property (nonatomic, copy) NSString* swissPassZipCode; + +- (instancetype)initWithSwissPassCardNumber:(NSString *)cardNumber swissPassZipCode:(NSString *)zipCode; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTransactionModel.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTransactionModel.h new file mode 100644 index 0000000..948b5e5 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTransactionModel.h @@ -0,0 +1,14 @@ +#import + +@class DTPaymentMethodToken; +@class DTPaymentMethodInfo; + +@protocol DTTransactionModel + +@property(nullable, copy) DTAliasRequest* aliasRequest; +@property(nonnull, readonly) NSString* mobileToken; +@property(nullable, copy) DTPaymentMethodInfo* paymentMethod; +@property(nullable, copy) DTPaymentMethodToken* paymentMethodToken; +@property(nullable, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTwintProcess.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTwintProcess.h new file mode 100644 index 0000000..6906aaf --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTTwintProcess.h @@ -0,0 +1,31 @@ +// +// DTTwintProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 29.09.20. +// + +@class DTAliasRequest; +@class DTErrorHandler; +@class DTNetworking; +@class DTPaymentRequest; +@protocol DTLockScreenPresenter; +@protocol DTTransactionModel; + +@protocol DTTwintProcessDelegate + +- (void)aliasRegistrationDidFinish; +- (void)paymentDidFinish; +- (void)transactionWasCancelled; + +@end + +@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)loaderPresenter lockScreenPresenter:(nonnull id)lockScreenPresenter options:(nonnull DTPaymentOptions *)options delegate:(nonnull id)delegate; + +- (void)startWithPaymentRequest:(nonnull DTPaymentRequest *)request paymentModel:(nonnull id)model; +- (void)startWithAliasRequest:(nonnull DTAliasRequest *)aliasRequest paymentModel:(nonnull id)model; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTUrls.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTUrls.h new file mode 100644 index 0000000..ba6f4e0 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTUrls.h @@ -0,0 +1,30 @@ +// +// DTUrls.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + + +@interface DTUrls : NSObject + +- (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 *)getAuthorizationUrl; +- (nonnull NSString *)getAuthorizationSplitUrl; +- (nonnull NSString *)getCancelUrl; +- (nonnull NSString *)getInitialTransactionRequestUrl; +- (nonnull NSString *)getPaymentPostUrl:(BOOL)isResumed; +- (nonnull NSString *)getTWINTRegistrationUrl; +- (nonnull NSString *)getTWINTStatusUrl; + +- (nonnull NSArray *)getHosts; +- (void)switchUrl; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTVersion.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTVersion.h new file mode 100644 index 0000000..5f36f49 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTVersion.h @@ -0,0 +1,25 @@ +// +// DTVersion.h +// datatrans-iphone +// +// Created by Basil Achermann on 5/31/12. +// Copyright 2012 iEffects GmbH. All rights reserved. +// + +#import + + +@interface DTVersion : NSObject { +} + ++ (void)printIfTestOnly; + ++ (NSString *)libraryName; + ++ (uint32_t)libraryVersion; ++ (NSString *)libraryVersionString; ++ (NSString *)libraryVersionStringWithDeviceType; + ++ (NSMutableDictionary *)statsProperties; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbackUrls.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbackUrls.h new file mode 100644 index 0000000..f3ecdf4 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbackUrls.h @@ -0,0 +1,18 @@ +// +// DTWebCallbackUrls.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 05.10.20. +// + +@interface DTWebCallbackUrls : NSObject + +- (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 diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbacks.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbacks.h new file mode 100644 index 0000000..e9ebfe6 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebCallbacks.h @@ -0,0 +1,34 @@ +// +// DTWebCallback.h +// datatrans-iphone +// +// Created by Basil Achermann on 29.01.18. +// + +#import + +@protocol DTRequestHandler; +@protocol DTWebProcess; +@protocol DTWebProcessDelegate; +@class DTWebCallbackUrls; +@class DTWebProcessViewController; + +@interface DTWebCallbacks : NSObject + +- (nonnull instancetype)initWithCallbackUrls:(nonnull DTWebCallbackUrls *)urls; + +- (void)addRequestHandler:(nonnull id)handler; + +- (BOOL)canHandleRequest:(nonnull NSURLRequest *)request; +- (BOOL)handleRequest:(nonnull NSURLRequest *)request webProcess:(nonnull id)webProcess notificationDelegate:(nullable id)delegate; + +@end + +#pragma mark - + +@protocol DTRequestHandler + +- (BOOL)canHandleRequest:(nonnull NSURLRequest *)request; +- (void)handleRequest:(nonnull NSURLRequest *)request webProcess:(nonnull id)process notificationDelegate:(nullable id)delegate; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebProcess.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebProcess.h new file mode 100644 index 0000000..889de0e --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebProcess.h @@ -0,0 +1,19 @@ +#import + +@protocol DTWebProcess +@end + +@protocol DTWebProcessDelegate + +- (void)webProcessDidFail:(nonnull id)webProcess error:(nonnull NSError *)error transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessDidSucceed:(nonnull id)webProcess transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessAliasCreated:(nonnull id)webProcess method:(nonnull NSString *)method transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessWasCancelled:(nonnull id)webProcess; + +@end + +@protocol DTPostFinanceWebProcessDelegate + +- (void)webProcessDidStartPFEPayment:(nonnull id)webProcess url:(nonnull NSURL *)url; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebRequestFactory.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebRequestFactory.h new file mode 100644 index 0000000..c9e06d5 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/DTWebRequestFactory.h @@ -0,0 +1,29 @@ +// +// DTWebRequestFactory.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 25.09.20. +// + +#import +#import +#import +#import + +@class DTAliasRequest; +@class DTCardToken; +@class DTPaymentOptions; +@class DTWebCallbackUrls; +@protocol DTTransactionModel; + +@interface DTWebRequestFactory : NSObject + +- (nonnull instancetype)initWithPaymentOptions:(nonnull DTPaymentOptions *)options urls:(nonnull DTUrls *)urls callbackUrls:(nonnull DTWebCallbackUrls *)callbackUrls; + +- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id)transactionModel; +- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id)transactionModel params:(nonnull NSDictionary *)params; +- (nonnull NSURLRequest *)authenticate3DRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest creditCard:(nonnull DTCardToken *)creditCard transactionId:(nonnull NSString *)transactionId; +- (nonnull NSURLRequest *)paymentInputRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest transactionModel:(nonnull id)transactionModel; +- (nonnull NSURLRequest *)paymentInputRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest transactionModel:(nonnull id)transactionModel params:(nonnull NSDictionary *)params; + +@end diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans-Swift.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans-Swift.h new file mode 100644 index 0000000..6e459df --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans-Swift.h @@ -0,0 +1,817 @@ +// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +#ifndef DATATRANS_SWIFT_H +#define DATATRANS_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import PassKit; +#endif + +#import + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Datatrans",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +@protocol DTApplePayDelegate; +@class PKPaymentRequest; + +/// Configuration object for Apple Pay transactions. +SWIFT_CLASS_NAMED("ApplePayConfig") +@interface DTApplePayConfig : NSObject +/// Delegate object for callbacks during Apple Pay authorization +@property (nonatomic, weak) id _Nullable delegate; +/// Use this label to configure the final summary of the purchase. The default +/// label is “Total”, but you can also replace it with the name of your shop. +/// The string will then read: PAY YOURSHOP: XX.XX +@property (nonatomic, copy) NSString * _Nullable finalSummaryItemLabel; +/// The request object for further configuration of Apple Pay. Please refer to +/// the official Apple Pay documentation for more information. +@property (nonatomic, readonly, strong) PKPaymentRequest * _Nonnull request; +/// 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. +/// \param supportedNetworks Supported card acquirers. +/// +/// +/// returns: +/// True if Apple Pay is available on the device, false if it is unavailable. ++ (BOOL)hasApplePayWithSupportedNetworks:(NSArray * _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 supportedNetworks Supported card acquirers. +/// +/// \param countryCode Apple Pay country code +/// +- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray * _Nonnull)supportedNetworks countryCode:(NSString * _Nonnull)countryCode OBJC_DESIGNATED_INITIALIZER; +/// :nodoc: +- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray * _Nonnull)supportedNetworks; +/// Refer to the NSCopying 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; + +/// 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 +/// Payment method type, e.g. Visa +@property (nonatomic, readonly) enum DTPaymentMethodType type; +/// This init method initializes a PaymentMethod object with the +/// payment method type. +/// \param type Payment method type, e.g. Visa +/// +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type OBJC_DESIGNATED_INITIALIZER; +/// Refer to the NSCopying 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 + +@class DTCardExpiryDate; + +/// Use this class to process raw card data for payments. You should use +/// this class if your app takes over the user interface for the card input fields. +SWIFT_CLASS_NAMED("Card") +@interface DTCard : DTPaymentMethod +/// Card number +@property (nonatomic, copy) NSString * _Nonnull number; +/// Expiry date +@property (nonatomic, strong) DTCardExpiryDate * _Nonnull expiryDate; +/// Card security code - nil if the card does not have a card security code. +@property (nonatomic, copy) NSString * _Nullable cvv; +/// Cardholder’s name +@property (nonatomic, copy) NSString * _Nullable cardholder; +/// Use this to initialize a card object with the card data. +/// \param type Card type, e.g. Visa or Mastercard +/// +/// \param number Card number +/// +/// \param expiryDate Expiry date +/// +/// \param cvv Card security code - nil if the card does not have a card security code. +/// +/// \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; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE; +@end + + +/// Class to be used to represent the card expiry date (month and year). +SWIFT_CLASS_NAMED("CardExpiryDate") +@interface DTCardExpiryDate : NSObject +/// Card expiry month, [1, 12], e.g. 1 for January or 12 for December +@property (nonatomic) NSInteger month; +/// Card expiry year, 2 or 4 digits, e.g. 30 or 2030 +@property (nonatomic) NSInteger year; +/// Initializes the card expiry date with the given month and year. +/// \param month Card expiry month, [1, 12], e.g. 1 for January or 12 for December +/// +/// \param year Card expiry year, 2 or 4 digits, e.g. 30 or 2030 +/// +- (nonnull instancetype)initWithMonth:(NSInteger)month year:(NSInteger)year OBJC_DESIGNATED_INITIALIZER; +/// Refer to the NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying 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 + + +/// This class is the base token class to gather token information and process +/// recurring payments or fast checkouts with any payment method. This class +/// is sufficient to process payments with tokens of some payment methods +/// (e.g. Twint). More complex payment methods require you to specify some +/// more details in their token subclasses (e.g. card payments, PostFinance, etc.). +/// Please refer to the list below to see if you need to call an additional token +/// subclass for your payments. +///
    +///
  • +/// Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +/// Apple Pay, Byjuno, SwissPass, Powerpay Invoice +///
  • +///
  • +/// Complex payment methods (requiring token subclass): Card payments, +/// PayPal, PostFinance, Reka +///
  • +///
+/// Please refer to the Datatrans documentation to see if you can register a +/// token during payment or require a dedicated registration. +SWIFT_CLASS_NAMED("PaymentMethodToken") +@interface DTPaymentMethodToken : DTPaymentMethod +/// The token that can be used to process recurring payments or fast checkouts. +@property (nonatomic, copy) NSString * _Nonnull token; +/// 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 * _Nullable accessibilityTitle; +/// This init method has to be used to initialize a payment object. +/// \param type Payment method type, e.g. PayPal or Twint +/// +/// \param token The token that can be used to process recurring payments or fast checkouts. +/// +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token OBJC_DESIGNATED_INITIALIZER; +/// Creates a PaymentMethodToken from a JSON string. +/// Note that this function should only be used for iOS 12 and earlier. Use +/// create(data:decoder:) for later versions. +/// \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."); +/// 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 NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE; +@end + + +/// This class contains the token information about a credit or debit card registration +/// from a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction or +/// to display a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful card payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("CardToken") +@interface DTCardToken : DTPaymentMethodToken +/// Expiry date +@property (nonatomic, readonly, strong) DTCardExpiryDate * _Nullable cardExpiryDate; +/// The masked card number you can use to display that specific card in your app. +/// The masked card number shows the first 6 digits and the last 4 digits of the card, +/// e.g. 432930xxxxxx6095. +@property (nonatomic, readonly, copy) NSString * _Nullable maskedCardNumber; +/// Cardholder’s name +@property (nonatomic, copy) NSString * _Nullable cardholder; +/// Initializes a CardToken object with the given card data. +/// \param type Payment method type, e.g. Visa +/// +/// \param token This is the token for the card, also known as alias. +/// This can be used to debit the card without further customer interaction. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the first 6 +/// digits and the last 4 digits of the card, e.g. 432930xxxxxx6095. +/// +/// \param cardholder Cardholder’s name +/// +- (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; +/// A human readable title e.g. ‘•••• 6095’. +@property (nonatomic, readonly, copy) NSString * _Nonnull displayTitle; +/// For VoiceOver this title is used instead of displayTitle. +@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 NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token SWIFT_UNAVAILABLE; +@end + + + + +/// This class contains the token information about a PayPal registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful PayPal payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("PayPalToken") +@interface DTPayPalToken : DTPaymentMethodToken +/// PayPal e-mail address. This will be used for displaying purposes. +@property (nonatomic, copy) NSString * _Nullable payPalEmail; +/// This init method has to be used to initialize a PayPal payment object. +/// \param token Token for a PayPal account. +/// +/// \param payPalEmail PayPal e-mail address. This will be used for displaying purposes. +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token payPalEmail:(NSString * _Nullable)payPalEmail OBJC_DESIGNATED_INITIALIZER; +/// 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 * _Nullable accessibilityTitle; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token SWIFT_UNAVAILABLE; +@end + + + +/// The payment method used during the transaction. +typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", open) { +/// Visa payment method + DTPaymentMethodTypeVisa = 0, +/// MasterCard payment method + DTPaymentMethodTypeMasterCard = 1, +/// Diners Club payment method + DTPaymentMethodTypeDinersClub = 2, +/// American Express payment method + DTPaymentMethodTypeAmericanExpress = 3, +/// JCB payment method + DTPaymentMethodTypeJCB = 4, +/// MyOne payment method + DTPaymentMethodTypeMyOne = 5, +/// UATP payment method + DTPaymentMethodTypeUATP = 6, +/// Discover payment method + DTPaymentMethodTypeDiscover = 7, +/// SUPERCARD payment method + DTPaymentMethodTypeSupercard = 8, +/// PostFinance Card payment method + DTPaymentMethodTypePostFinanceCard = 9, +/// PostFinance E-Finance payment method + DTPaymentMethodTypePostFinanceEFinance = 10, +/// PayPal payment method + DTPaymentMethodTypePayPal = 11, +/// Easypay payment method + DTPaymentMethodTypeEasypay = 12, +/// SEPA (ELV) payment method + DTPaymentMethodTypeSEPA = 13, +/// SwissBilling payment method + DTPaymentMethodTypeSwissBilling = 14, +/// Twint payment method + DTPaymentMethodTypeTwint = 15, +/// Apple Pay payment method + DTPaymentMethodTypeApplePay = 16, +/// Reka payment method + DTPaymentMethodTypeReka = 17, +/// Byjuno payment method + DTPaymentMethodTypeByjuno = 18, +/// SwissPass payment method + DTPaymentMethodTypeSwissPass = 19, +/// Powerpay payment method + DTPaymentMethodTypePowerpay = 20, +/// Paysafecard payment method + DTPaymentMethodTypePaysafecard = 21, +}; + + +/// Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType. +SWIFT_CLASS_NAMED("PaymentMethodTypeMapper") +@interface DTPaymentMethodTypeMapper : NSObject +/// This function returns the PaymentMethodType based on the Datatrans +/// payment method identifier. +/// \param identifier The payment method identifier from Datatrans +/// +/// +/// returns: +/// The payment method type, e.g. Visa ++ (enum DTPaymentMethodType)toTypeWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT; +/// This function returns the payment method identifier based on the +/// PaymentMethodType. +/// \param type The payment method type, e.g. Visa +/// +/// +/// returns: +/// The payment method identifier ++ (NSString * _Nonnull)toIdentifierWithType:(enum DTPaymentMethodType)type SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class contains the token information about a PostFinance Card registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful PostFinance Card payment or +/// with a dedicated registration. +SWIFT_CLASS_NAMED("PostFinanceCardToken") +@interface DTPostFinanceCardToken : DTCardToken +/// This init method has to be used to initialize a PostFinance Card payment object. +/// \param token Token for a PostFinance Card. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the last 4 +/// digits of the card, e.g. **** 1234. +/// +/// \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 NSCopying 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; +@end + + +/// This class contains the token information about a Reka card registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful Reka payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("RekaToken") +@interface DTRekaToken : DTCardToken +/// This init method has to be used to initialize a Reka payment object. +/// \param token Token for a Reka card. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the first 6 +/// digits and the last 4 digits of the card, e.g. 123456xxxxxxxxx1234. +/// +/// \param cardholder Cardholder’s name +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token cardExpiryDate:(DTCardExpiryDate * _Nonnull)cardExpiryDate maskedCardNumber:(NSString * _Nullable)maskedCardNumber cardholder:(NSString * _Nullable)cardholder; +/// Refer to the NSCopying 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; +@end + + +/// This class contains the token information about a SEPA (ELV) registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful SEPA payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("SEPAToken") +@interface DTSEPAToken : DTPaymentMethodToken +/// A bank code (German: Bankleitzahl) is a unique identification code for a +/// particular bank. This is required for tokens created before April 15th 2015. +@property (nonatomic, readonly, copy) NSString * _Nullable bankCode; +/// Token for SEPA (ELV). +@property (nonatomic, copy) NSString * _Nonnull token; +/// This init method has to be used to initialize a SEPA (ELV) payment object. +/// \param token Token for SEPA (ELV). +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token; +/// This init method has to be used with SEPA (ELV) tokens created before April 15th 2015. +/// Please refer to init(token:) for newer tokens. +/// \param token Token for SEPA (ELV). This value was returned for tokens created before April 15th 2015. +/// +/// \param bankCode A bank code (German: Bankleitzahl) is a unique identification +/// code for a particular bank. This is required for tokens created before April 15th 2015. +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token bankCode:(NSString * _Nonnull)bankCode; +/// 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 * _Nullable accessibilityTitle; +/// Refer to the NSCopying 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; +@end + +@class UIColor; + +/// This class gives you options to customize the theme of the library. +/// The library offers by default a theme for light and dark mode. If your app supports +/// both themes too, make sure to use UIColor.init(dynamicProvider:) +/// when creating custom themes. +/// We recommend you to start by customizing linkColor before anything else, +/// as this is often used as a fallback color. +SWIFT_CLASS_NAMED("ThemeConfiguration") +@interface DTThemeConfiguration : NSObject +/// Background color of the navigation bars. If this is not specified, the +/// navigation bars will be transparent. +@property (nonatomic, strong) UIColor * _Nullable barBackgroundColor; +/// Color of the buttons in the navigation bars. If this is not specified, +/// the color will be the color set in linkColor. +@property (nonatomic, strong) UIColor * _Nullable barLinkColor; +/// Color of the title within the navigation bars. If this is not specified, +/// the color will be the text color. +/// The text color is either white or black and cannot be customized. +@property (nonatomic, strong) UIColor * _Nullable barTitleColor; +/// Background color of large buttons, such as the ‘Pay’ button. If this is +/// not specified, the color will be the color set in linkColor. +@property (nonatomic, strong) UIColor * _Nullable buttonColor; +/// Text color of large buttons, such as the ‘Pay’ button. If this is not +/// specified, the color will be set to white. +@property (nonatomic, strong) UIColor * _Nullable buttonTextColor; +/// Color of text-only buttons or links and the text cursor. If this is not +/// specified, the color will be in a blue tone that fits the standard iOS design. +@property (nonatomic, strong) UIColor * _Nullable linkColor; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@protocol DTTransactionDelegate; +@class DTTransactionOptions; +@class UIViewController; + +/// Use this class to start a transaction with a mobileToken that has previously been initialized +/// with a server-to-server init call. This class is the main class to start any operation with the SDK. +/// After the transaction has been completed - regardless if successful or not - delegate will +/// be called with some basic information about the success or failure. +SWIFT_CLASS_NAMED("Transaction") +@interface DTTransaction : NSObject +/// This delegate will be notified after a transaction has been finished, +/// successfully or not. +@property (nonatomic, weak) id _Nullable delegate; +/// The available options for how a transaction is handled by the mobile SDK. +@property (nonatomic, strong) DTTransactionOptions * _Nonnull options; +/// The theme to be used by the SDK. +@property (nonatomic, strong) DTThemeConfiguration * _Nonnull theme; +/// Use this init method to start the SDK with a mobile token obtained after a server-to-server init +/// call. After this class is initialized, you should define its delegate, the options properties +/// and a theme if desired. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken OBJC_DESIGNATED_INITIALIZER; +/// Use this init method to start the SDK with a mobile token just like in init(mobileToken:) +/// and the provided card for the transaction. For this to work, you can only +/// send one payment method in your server-to-server init call. Use this init method if +/// you use your own UI fields for the card information. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +/// \param card Card object used for the transaction. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken card:(DTCard * _Nonnull)card OBJC_DESIGNATED_INITIALIZER; +/// Use this init method to start the SDK with a mobile token obtained after a server-to-server init +/// call and display the selection of one or more saved tokens. The user will then be able to click +/// on their desired saved token to finalize the payment. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +/// \param paymentMethodTokens Specify here the tokens that are +/// available for selection to the user. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken paymentMethodTokens:(NSArray * _Nonnull)paymentMethodTokens OBJC_DESIGNATED_INITIALIZER; +/// Starts the SDK and displays any needed user interface using the +/// provided presentingController. Note that a transaction +/// can only be started once. +/// \param presentingController UIViewController +/// 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. +- (void)didHandleError:(NSError * _Nonnull)error; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +@class DTTransactionSuccess; +@class DTTransactionError; + +/// Implement TransactionDelegate to be notified when a transaction +/// ends. TransactionDelegate will notify you about the success, error +/// or cancel state of the processed transaction. +SWIFT_PROTOCOL_NAMED("TransactionDelegate") +@protocol DTTransactionDelegate +/// This is called after a transaction has been successfully +/// completed. This callback provides details about the transaction. +/// \param transaction The object containing the information +/// of the completed transaction. +/// +/// \param result The object including the information related +/// to the transaction success. +/// +- (void)transactionDidFinish:(DTTransaction * _Nonnull)transaction result:(DTTransactionSuccess * _Nonnull)result; +/// This is called after a transaction fails or encounters an error. +/// Keep in mind that the SDK shows the error to the user before +/// this is invoked. Therefore, this callback can be used to cancel +/// any on-going process involving the transaction. +/// You may also use the error details provided here and display it +/// the way you want when suppressing the error message within +/// the TransactionOptions. +/// \param transaction The object containing the information +/// of the failed transaction. +/// +/// \param error The error that occurred. +/// +- (void)transactionDidFail:(DTTransaction * _Nonnull)transaction error:(DTTransactionError * _Nonnull)error; +@optional +/// This is called after a transaction has been cancelled. This callback +/// can be used to cancel any on-going process involving the transaction. +/// Some payment methods - such as Twint that involves an app-switch - +/// also call this method when a payment error or decline occurs, to +/// prevent showing an error dialog twice, as an error is already +/// displayed in the payment application. +/// \param transaction The object containing the +/// information of the cancelled transaction. +/// +- (void)transactionDidCancel:(DTTransaction * _Nonnull)transaction; +@end + +@class NSNumber; +@class NSCoder; + +/// This class includes the error message and other details of a transaction. +SWIFT_CLASS_NAMED("TransactionError") +@interface DTTransactionError : NSError +/// The payment method used during the transaction. +/// This is for use from Objective-C only. This property wraps the +/// rawValue of a DTPaymentMethodType in an NSNumber. +@property (nonatomic, readonly, strong) NSNumber * _Nullable paymentMethodType; +/// The identifier of the failed transaction +@property (nonatomic, readonly, copy) NSString * _Nullable transactionId; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code userInfo:(NSDictionary * _Nullable)dict OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class can be used to specify miscellaneous options related to the transaction. +SWIFT_CLASS_NAMED("TransactionOptions") +@interface DTTransactionOptions : NSObject +/// Your unique URL scheme to be used by other apps (e.g. Twint) +/// to return to the merchant app. +@property (nonatomic, copy) NSString * _Nullable appCallbackScheme; +/// Specify the ApplePayConfig 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 String. +/// Properties are sent along with the transaction requests and +/// posted to the merchant’s PostURL. +@property (nonatomic, copy) NSDictionary * _Nullable merchantProperties; +/// Use this setting to display or hide critical and transaction errors. +@property (nonatomic) BOOL suppressTransactionErrorDialog; +/// Use this setting to switch from production to sandbox. If not specified, +/// the SDK will call the Datatrans production environment. +@property (nonatomic) BOOL testing; +/// Whether secure connections to datatrans servers require a certificate +/// chain signed with a specific CA private key. The device’s trust settings +/// are explicitly ignored, i.e. custom installed/white-listed certificates +/// and/or CAs will not work. +/// Please be advised that enabling this option will break your app in many +/// corporate networks with anti-malware/-theft/-espionage SSL proxying. +@property (nonatomic) BOOL useCertificatePinning; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class includes the success message and other details of a transaction. +/// You will also obtain a transactionId that you can use for operations +/// after the transaction (e.g. settlement, cancel or refund requests). +SWIFT_CLASS_NAMED("TransactionSuccess") +@interface DTTransactionSuccess : NSObject +/// The payment method used during the transaction. +@property (nonatomic, readonly) enum DTPaymentMethodType paymentMethodType; +/// Object containing the token details of the payment method. +/// The token details are also returned to your webhook and can +/// be accessed with a status server-to-server request. +@property (nonatomic, readonly, strong) DTPaymentMethodToken * _Nullable paymentMethodToken; +/// The transactionId that you can use for operations after the +/// transaction (eg. settlement, cancel or refund requests). +@property (nonatomic, readonly, copy) NSString * _Nonnull transactionId; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans.h b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans.h new file mode 100644 index 0000000..0dfb87e --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Headers/Datatrans.h @@ -0,0 +1,66 @@ +// +// Datatrans.h +// Datatrans +// +// Created by Patrick Fompeyrine on 13.10.20. +// + +#import + +//! Project version number for Datatrans. +FOUNDATION_EXPORT double DatatransVersionNumber; + +//! Project version string for Datatrans. +FOUNDATION_EXPORT const unsigned char DatatransVersionString[]; + +#import + +// Private +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Info.plist b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Info.plist new file mode 100644 index 0000000..579cc2f Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Info.plist differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftdoc b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftdoc new file mode 100644 index 0000000..241ffdb Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftinterface b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftinterface new file mode 100644 index 0000000..d967f22 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64-apple-ios.swiftinterface @@ -0,0 +1,258 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +// 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 Combine +@_exported import Datatrans +import Foundation +import PassKit +import SafariServices +import Swift +import UIKit +import WebKit +@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError { + public var paymentMethodType: Datatrans.PaymentMethodType? { + get + } + @objc(paymentMethodType) public var paymentMethodTypeObjc: Foundation.NSNumber? { + @objc get + } + @objc public var transactionId: Swift.String? { + get + } + @objc override dynamic public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init(domain: Swift.String, code: Swift.Int, userInfo dict: [Swift.String : Any]? = nil) + @objc required dynamic public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc(DTTransactionDelegate) public protocol TransactionDelegate : AnyObject { + @objc func transactionDidFinish(_ transaction: Datatrans.Transaction, result: Datatrans.TransactionSuccess) + @objc func transactionDidFail(_ transaction: Datatrans.Transaction, error: Datatrans.TransactionError) + @objc optional func transactionDidCancel(_ transaction: Datatrans.Transaction) +} +@_hasMissingDesignatedInitializers @objc(DTCard) @objcMembers public class Card : Datatrans.PaymentMethod { + @objc public var number: Swift.String + @objc public var expiryDate: Datatrans.CardExpiryDate + @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 deinit + @objc override public init(type: Datatrans.PaymentMethodType) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTRekaToken) @objcMembers public class RekaToken : Datatrans.CardToken { + @objc convenience public init(token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @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?) +} +@_inheritsConvenienceInitializers @objc(DTTransactionOptions) @objcMembers public class TransactionOptions : ObjectiveC.NSObject { + @objc public var appCallbackScheme: Swift.String? + @objc public var applePayConfig: Datatrans.ApplePayConfig? + @objc public var merchantProperties: [Swift.String : Swift.String]? + @objc public var suppressTransactionErrorDialog: Swift.Bool + @objc public var testing: Swift.Bool + @objc public var useCertificatePinning: Swift.Bool + @objc deinit + @objc override dynamic public init() +} +@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int { + case Visa + case MasterCard + case DinersClub + case AmericanExpress + case JCB + case MyOne + case UATP + case Discover + case Supercard + case PostFinanceCard + case PostFinanceEFinance + case PayPal + case Easypay + case SEPA + case SwissBilling + case Twint + case ApplePay + case Reka + case Byjuno + case SwissPass + case Powerpay + case Paysafecard + public typealias RawValue = Swift.Int + public var rawValue: Swift.Int { + get + } + public init?(rawValue: Swift.Int) +} +@objc(DTTransaction) public class Transaction : ObjectiveC.NSObject, Datatrans.DTErrorHandlerDelegate { + @objc weak public var delegate: Datatrans.TransactionDelegate? + @objc public var options: Datatrans.TransactionOptions + @objc public var theme: Datatrans.ThemeConfiguration + @objc public init(mobileToken: Swift.String) + @objc public init(mobileToken: Swift.String, card: Datatrans.Card) + @objc public init(mobileToken: Swift.String, paymentMethodTokens: [Datatrans.PaymentMethodToken]) + @objc public func start(presentingController: UIKit.UIViewController) + @objc public func didHandleError(_ error: Swift.Error) + @objc deinit + @objc override dynamic public init() +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTSEPAToken) @objcMembers public class SEPAToken : Datatrans.PaymentMethodToken { + @objc public var bankCode: Swift.String? { + @objc get + } + @objc override public var token: Swift.String { + @objc get + @objc set + } + @objc convenience public init(token: Swift.String) + @objc convenience public init(token: Swift.String, bankCode: Swift.String) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) @objcMembers public class PaymentMethodTypeMapper : ObjectiveC.NSObject { + @objc public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType + @objc public static func toIdentifier(type: Datatrans.PaymentMethodType) -> Swift.String + @objc deinit + @objc override dynamic public init() +} +@_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 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?) +} +@_inheritsConvenienceInitializers @objc(DTThemeConfiguration) @objcMembers public class ThemeConfiguration : ObjectiveC.NSObject { + @objc public var barBackgroundColor: UIKit.UIColor? + @objc public var barLinkColor: UIKit.UIColor? + @objc public var barTitleColor: UIKit.UIColor? + @objc public var buttonColor: UIKit.UIColor? + @objc public var buttonTextColor: UIKit.UIColor? + @objc public var linkColor: UIKit.UIColor? + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTTransactionSuccess) @objcMembers public class TransactionSuccess : ObjectiveC.NSObject { + @objc public var paymentMethodType: Datatrans.PaymentMethodType { + @objc get + } + @objc public var paymentMethodToken: Datatrans.PaymentMethodToken? { + @objc get + } + @objc public var transactionId: Swift.String { + @objc get + } + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTCardToken) @objcMembers public class CardToken : Datatrans.PaymentMethodToken { + @objc public var cardExpiryDate: Datatrans.CardExpiryDate? { + get + } + @objc public var maskedCardNumber: Swift.String? { + get + } + @objc public var cardholder: Swift.String? + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func isValid() -> Swift.Bool + override public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @objc deinit +} +@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : ObjectiveC.NSObject, Foundation.NSCopying { + @objc weak public var delegate: Datatrans.DTApplePayDelegate? + @objc public var finalSummaryItemLabel: Swift.String? + @objc public var request: PassKit.PKPaymentRequest { + get + } + @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 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 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 override dynamic public init() + @objc deinit +} +@objc(DTCardExpiryDate) @objcMembers public class CardExpiryDate : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCopying { + @objc public var month: Swift.Int { + @objc get + @objc set + } + @objc public var year: Swift.Int { + @objc get + @objc set + } + @objc public init(month: Swift.Int, year: Swift.Int) + required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPaymentMethodToken) @objcMembers public class PaymentMethodToken : Datatrans.PaymentMethod { + @objc public var token: Swift.String + @objc public var displayTitle: Swift.String { + @objc get + } + @objc public var accessibilityTitle: Swift.String? { + @objc get + } + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @available(iOS 13.0, *) + public class func create(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 func isValid() -> Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType) + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPayPalToken) @objcMembers public class PayPalToken : Datatrans.PaymentMethodToken { + @objc public var payPalEmail: Swift.String? + @objc public init(token: Swift.String, payPalEmail: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +extension Datatrans.PaymentMethodType : Swift.Equatable {} +extension Datatrans.PaymentMethodType : Swift.Hashable {} +extension Datatrans.PaymentMethodType : Swift.RawRepresentable {} diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftdoc b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftdoc new file mode 100644 index 0000000..241ffdb Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftdoc differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftinterface b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftinterface new file mode 100644 index 0000000..d967f22 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/Datatrans.swiftmodule/arm64.swiftinterface @@ -0,0 +1,258 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +// 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 Combine +@_exported import Datatrans +import Foundation +import PassKit +import SafariServices +import Swift +import UIKit +import WebKit +@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError { + public var paymentMethodType: Datatrans.PaymentMethodType? { + get + } + @objc(paymentMethodType) public var paymentMethodTypeObjc: Foundation.NSNumber? { + @objc get + } + @objc public var transactionId: Swift.String? { + get + } + @objc override dynamic public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init(domain: Swift.String, code: Swift.Int, userInfo dict: [Swift.String : Any]? = nil) + @objc required dynamic public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc(DTTransactionDelegate) public protocol TransactionDelegate : AnyObject { + @objc func transactionDidFinish(_ transaction: Datatrans.Transaction, result: Datatrans.TransactionSuccess) + @objc func transactionDidFail(_ transaction: Datatrans.Transaction, error: Datatrans.TransactionError) + @objc optional func transactionDidCancel(_ transaction: Datatrans.Transaction) +} +@_hasMissingDesignatedInitializers @objc(DTCard) @objcMembers public class Card : Datatrans.PaymentMethod { + @objc public var number: Swift.String + @objc public var expiryDate: Datatrans.CardExpiryDate + @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 deinit + @objc override public init(type: Datatrans.PaymentMethodType) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTRekaToken) @objcMembers public class RekaToken : Datatrans.CardToken { + @objc convenience public init(token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @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?) +} +@_inheritsConvenienceInitializers @objc(DTTransactionOptions) @objcMembers public class TransactionOptions : ObjectiveC.NSObject { + @objc public var appCallbackScheme: Swift.String? + @objc public var applePayConfig: Datatrans.ApplePayConfig? + @objc public var merchantProperties: [Swift.String : Swift.String]? + @objc public var suppressTransactionErrorDialog: Swift.Bool + @objc public var testing: Swift.Bool + @objc public var useCertificatePinning: Swift.Bool + @objc deinit + @objc override dynamic public init() +} +@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int { + case Visa + case MasterCard + case DinersClub + case AmericanExpress + case JCB + case MyOne + case UATP + case Discover + case Supercard + case PostFinanceCard + case PostFinanceEFinance + case PayPal + case Easypay + case SEPA + case SwissBilling + case Twint + case ApplePay + case Reka + case Byjuno + case SwissPass + case Powerpay + case Paysafecard + public typealias RawValue = Swift.Int + public var rawValue: Swift.Int { + get + } + public init?(rawValue: Swift.Int) +} +@objc(DTTransaction) public class Transaction : ObjectiveC.NSObject, Datatrans.DTErrorHandlerDelegate { + @objc weak public var delegate: Datatrans.TransactionDelegate? + @objc public var options: Datatrans.TransactionOptions + @objc public var theme: Datatrans.ThemeConfiguration + @objc public init(mobileToken: Swift.String) + @objc public init(mobileToken: Swift.String, card: Datatrans.Card) + @objc public init(mobileToken: Swift.String, paymentMethodTokens: [Datatrans.PaymentMethodToken]) + @objc public func start(presentingController: UIKit.UIViewController) + @objc public func didHandleError(_ error: Swift.Error) + @objc deinit + @objc override dynamic public init() +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTSEPAToken) @objcMembers public class SEPAToken : Datatrans.PaymentMethodToken { + @objc public var bankCode: Swift.String? { + @objc get + } + @objc override public var token: Swift.String { + @objc get + @objc set + } + @objc convenience public init(token: Swift.String) + @objc convenience public init(token: Swift.String, bankCode: Swift.String) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) @objcMembers public class PaymentMethodTypeMapper : ObjectiveC.NSObject { + @objc public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType + @objc public static func toIdentifier(type: Datatrans.PaymentMethodType) -> Swift.String + @objc deinit + @objc override dynamic public init() +} +@_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 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?) +} +@_inheritsConvenienceInitializers @objc(DTThemeConfiguration) @objcMembers public class ThemeConfiguration : ObjectiveC.NSObject { + @objc public var barBackgroundColor: UIKit.UIColor? + @objc public var barLinkColor: UIKit.UIColor? + @objc public var barTitleColor: UIKit.UIColor? + @objc public var buttonColor: UIKit.UIColor? + @objc public var buttonTextColor: UIKit.UIColor? + @objc public var linkColor: UIKit.UIColor? + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTTransactionSuccess) @objcMembers public class TransactionSuccess : ObjectiveC.NSObject { + @objc public var paymentMethodType: Datatrans.PaymentMethodType { + @objc get + } + @objc public var paymentMethodToken: Datatrans.PaymentMethodToken? { + @objc get + } + @objc public var transactionId: Swift.String { + @objc get + } + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTCardToken) @objcMembers public class CardToken : Datatrans.PaymentMethodToken { + @objc public var cardExpiryDate: Datatrans.CardExpiryDate? { + get + } + @objc public var maskedCardNumber: Swift.String? { + get + } + @objc public var cardholder: Swift.String? + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func isValid() -> Swift.Bool + override public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @objc deinit +} +@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : ObjectiveC.NSObject, Foundation.NSCopying { + @objc weak public var delegate: Datatrans.DTApplePayDelegate? + @objc public var finalSummaryItemLabel: Swift.String? + @objc public var request: PassKit.PKPaymentRequest { + get + } + @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 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 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 override dynamic public init() + @objc deinit +} +@objc(DTCardExpiryDate) @objcMembers public class CardExpiryDate : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCopying { + @objc public var month: Swift.Int { + @objc get + @objc set + } + @objc public var year: Swift.Int { + @objc get + @objc set + } + @objc public init(month: Swift.Int, year: Swift.Int) + required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPaymentMethodToken) @objcMembers public class PaymentMethodToken : Datatrans.PaymentMethod { + @objc public var token: Swift.String + @objc public var displayTitle: Swift.String { + @objc get + } + @objc public var accessibilityTitle: Swift.String? { + @objc get + } + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @available(iOS 13.0, *) + public class func create(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 func isValid() -> Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType) + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPayPalToken) @objcMembers public class PayPalToken : Datatrans.PaymentMethodToken { + @objc public var payPalEmail: Swift.String? + @objc public init(token: Swift.String, payPalEmail: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +extension Datatrans.PaymentMethodType : Swift.Equatable {} +extension Datatrans.PaymentMethodType : Swift.Hashable {} +extension Datatrans.PaymentMethodType : Swift.RawRepresentable {} diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/module.modulemap b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/module.modulemap new file mode 100644 index 0000000..b168fd7 --- /dev/null +++ b/Datatrans.xcframework/ios-arm64/Datatrans.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module Datatrans { + umbrella header "Datatrans.h" + + export * + module * { export * } +} + +module Datatrans.Swift { + header "Datatrans-Swift.h" + requires objc +} diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/de.lproj/Localizable.strings b/Datatrans.xcframework/ios-arm64/Datatrans.framework/de.lproj/Localizable.strings new file mode 100644 index 0000000..8559259 Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/de.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/en.lproj/Localizable.strings b/Datatrans.xcframework/ios-arm64/Datatrans.framework/en.lproj/Localizable.strings new file mode 100644 index 0000000..d4379d2 Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/en.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/fr.lproj/Localizable.strings b/Datatrans.xcframework/ios-arm64/Datatrans.framework/fr.lproj/Localizable.strings new file mode 100644 index 0000000..f231172 Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/fr.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/it.lproj/Localizable.strings b/Datatrans.xcframework/ios-arm64/Datatrans.framework/it.lproj/Localizable.strings new file mode 100644 index 0000000..1ae368e Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/it.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-arm64/Datatrans.framework/nl.lproj/Localizable.strings b/Datatrans.xcframework/ios-arm64/Datatrans.framework/nl.lproj/Localizable.strings new file mode 100644 index 0000000..36f044f Binary files /dev/null and b/Datatrans.xcframework/ios-arm64/Datatrans.framework/nl.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Assets.car b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Assets.car new file mode 100644 index 0000000..4e1df4d Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Assets.car differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Datatrans b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Datatrans new file mode 100755 index 0000000..7f49c8e Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Datatrans differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOCreditCardInfo.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOCreditCardInfo.h new file mode 100755 index 0000000..a7e4d87 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOCreditCardInfo.h @@ -0,0 +1,80 @@ +// +// CardIOCreditCardInfo.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import + +/// CardIOCreditCardType Identifies type of card. +typedef NS_ENUM(NSInteger, CardIOCreditCardType) { + /// The card number does not correspond to any recognizable card type. + CardIOCreditCardTypeUnrecognized = 0, + /// The card number corresponds to multiple card types (e.g., when only a few digits have been entered). + CardIOCreditCardTypeAmbiguous = 1, + /// American Express + CardIOCreditCardTypeAmex = '3', + /// Japan Credit Bureau + CardIOCreditCardTypeJCB = 'J', + /// VISA + CardIOCreditCardTypeVisa = '4', + /// MasterCard + CardIOCreditCardTypeMastercard = '5', + /// Discover Card + CardIOCreditCardTypeDiscover = '6' +}; + + +/// Container for the information about a card. +@interface CardIOCreditCardInfo : NSObject + +/// Card number. +@property(nonatomic, copy, readwrite) NSString *cardNumber; + +/// Card number with all but the last four digits obfuscated. +@property(nonatomic, copy, readonly) NSString *redactedCardNumber; + +/// January == 1 +/// @note expiryMonth & expiryYear may be 0, if expiry information was not requested. +@property(nonatomic, assign, readwrite) NSUInteger expiryMonth; + +/// The full four digit year. +/// @note expiryMonth & expiryYear may be 0, if expiry information was not requested. +@property(nonatomic, assign, readwrite) NSUInteger expiryYear; + +/// Security code (aka CSC, CVV, CVV2, etc.) +/// @note May be nil, if security code was not requested. +@property(nonatomic, copy, readwrite) NSString *cvv; + +/// Postal code. Format is country dependent. +/// @note May be nil, if postal code information was not requested. +@property(nonatomic, copy, readwrite) NSString *postalCode; + +/// Was the card number scanned (as opposed to entered manually)? +@property(nonatomic, assign, readwrite) BOOL scanned; + +/// The rectified card image; usually 428x270. +@property(nonatomic, strong, readwrite) UIImage *cardImage; + +/// Derived from cardNumber. +/// @note CardIOCreditInfo objects returned by either of the delegate methods +/// userDidProvideCreditCardInfo:inPaymentViewController: +/// or cardIOView:didScanCard: +/// will never return a cardType of CardIOCreditCardTypeAmbiguous. +@property(nonatomic, assign, readonly) CardIOCreditCardType cardType; + +/// Convenience method which returns a card type string suitable for display (e.g. "Visa", "American Express", "JCB", "MasterCard", or "Discover"). +/// Where appropriate, this string will be translated into the language specified. +/// @param cardType The card type. +/// @param languageOrLocale See CardIOPaymentViewController.h for a detailed explanation of languageOrLocale. +/// @return Card type string suitable for display. ++ (NSString *)displayStringForCardType:(CardIOCreditCardType)cardType usingLanguageOrLocale:(NSString *)languageOrLocale; + +/// Returns a 36x25 credit card logo, at a resolution appropriate for the device. +/// @param cardType The card type. +/// @return 36x25 credit card logo. ++ (UIImage *)logoForCardType:(CardIOCreditCardType)cardType; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIODetectionMode.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIODetectionMode.h new file mode 100755 index 0000000..a119c47 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIODetectionMode.h @@ -0,0 +1,18 @@ +// +// CardIODetectionMode.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// +// + +#ifndef icc_CardIODetectionMode_h +#define icc_CardIODetectionMode_h + +typedef NS_ENUM(NSInteger, CardIODetectionMode) { + CardIODetectionModeCardImageAndNumber = 0, + CardIODetectionModeCardImageOnly, + CardIODetectionModeAutomatic +}; + +#endif diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOUtilities.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOUtilities.h new file mode 100755 index 0000000..765663a --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOUtilities.h @@ -0,0 +1,37 @@ +// +// CardIOUtilities.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import + +@interface CardIOUtilities : NSObject + +/// Please send the output of this method with any technical support requests. +/// @return Human-readable version of this library. ++ (NSString *)libraryVersion; + +/// Determine whether this device supports camera-based card scanning, considering +/// factors such as hardware support and OS version. +/// +/// card.io automatically provides manual entry of cards as a fallback, +/// so it is not typically necessary for your app to check this. +/// +/// @return YES iff the user's device supports camera-based card scanning. ++ (BOOL)canReadCardWithCamera; + +/// The preload method prepares card.io to launch faster. Calling preload is optional but suggested. +/// On an iPhone 5S, for example, preloading makes card.io launch ~400ms faster. +/// The best time to call preload is when displaying a view from which card.io might be launched; +/// e.g., inside your view controller's viewWillAppear: method. +/// preload works in the background; the call to preload returns immediately. ++ (void)preload; + +/// Returns a doubly Gaussian-blurred screenshot, intended for screenshots when backgrounding. +/// @return Blurred screenshot. ++ (UIImageView *)blurredScreenImageView; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOView.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOView.h new file mode 100755 index 0000000..8919923 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOView.h @@ -0,0 +1,125 @@ +// +// CardIOView.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import +#import "CardIOViewDelegate.h" +#import "CardIODetectionMode.h" + +/// CardIOView is one of two main entry points into the card.io SDK. +/// @see CardIOPaymentViewController +@interface CardIOView : UIView + + +#pragma mark - Properties you MUST set + +/// Typically, your view controller will set itself as this delegate. +@property(nonatomic, weak, readwrite) id delegate; + + +#pragma mark - Properties you MAY set + +/// The preferred language for all strings appearing in the user interface. +/// If not set, or if set to nil, defaults to the device's current language setting. +/// +/// Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.). +/// If card.io does not contain localized strings for a specified locale, then it will fall back to the language. E.g., "es_CO" -> "es". +/// If card.io does not contain localized strings for a specified language, then it will fall back to American English. +/// +/// If you specify only a language code, and that code matches the device's currently preferred language, +/// then card.io will attempt to use the device's current region as well. +/// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB". +/// +/// These localizations are currently included: +/// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW. +@property(nonatomic, copy, readwrite) NSString *languageOrLocale; + +/// Alter the card guide (bracket) color. Opaque colors recommended. +/// Defaults to nil; if nil, will use card.io green. +@property(nonatomic, retain, readwrite) UIColor *guideColor; + +/// Set to YES to show the card.io logo over the camera instead of the PayPal logo. Defaults to NO. +@property(nonatomic, assign, readwrite) BOOL useCardIOLogo; + +/// Hide the PayPal or card.io logo in the scan view. Defaults to NO. +@property(nonatomic, assign, readwrite) BOOL hideCardIOLogo; + +/// By default, in camera view the card guide and the buttons always rotate to match the device's orientation. +/// All four orientations are permitted, regardless of any app or viewcontroller constraints. +/// If you wish, the card guide and buttons can instead obey standard iOS constraints, including +/// the UISupportedInterfaceOrientations settings in your app's plist. +/// Set to NO to follow standard iOS constraints. Defaults to YES. (Does not affect the manual entry screen.) +@property(nonatomic, assign, readwrite) BOOL allowFreelyRotatingCardGuide; + +/// Set the scan instruction text. If nil, use the default text. Defaults to nil. +/// Use newlines as desired to control the wrapping of text onto multiple lines. +@property(nonatomic, copy, readwrite) NSString *scanInstructions; + +/// A custom view that will be overlaid atop the entire scan view. Defaults to nil. +/// If you set a scanOverlayView, be sure to: +/// +/// * Consider rotation. Be sure to test on the iPad with rotation both enabled and disabled. +/// To make rotation synchronization easier, whenever a scanOverlayView is set, and card.io does an +/// in-place rotation (rotates its UI elements relative to their containers), card.io will generate +/// rotation notifications; see CardIOScanningOrientationDidChangeNotification +/// and associated userInfo key documentation below. +/// As with UIKit, the initial rotation is always UIInterfaceOrientationPortrait. +/// +/// * Be sure to pass touches through to the superview as appropriate. Note that the entire camera +/// preview responds to touches (triggers refocusing). Test the light button and the toolbar buttons. +/// +/// * Minimize animations, redrawing, or any other CPU/GPU/memory intensive activities +@property(nonatomic, retain, readwrite) UIView *scanOverlayView; + +/// Set to NO if you don't want the camera to try to scan the card expiration. +/// Defaults to YES. +@property(nonatomic, assign, readwrite) BOOL scanExpiry; + +/// CardIODetectionModeCardImageAndNumber: the scanner must successfully identify the card number. +/// CardIODetectionModeCardImageOnly: don't scan the card, just detect a credit-card-shaped card. +/// CardIODetectionModeAutomatic: start as CardIODetectionModeCardImageAndNumber, but fall back to +/// CardIODetectionModeCardImageOnly if scanning has not succeeded within a reasonable time. +/// Defaults to CardIODetectionModeCardImageAndNumber. +/// +/// @note Images returned in CardIODetectionModeCardImageOnly mode may be less focused, to accomodate scanning +/// cards that are dominantly white (e.g., the backs of drivers licenses), and thus +/// hard to calculate accurate focus scores for. +@property(nonatomic, assign, readwrite) CardIODetectionMode detectionMode; + +/// After a successful scan, the CardIOView will briefly display an image of the card with +/// the computed card number superimposed. This property controls how long (in seconds) +/// that image will be displayed. +/// Set this to 0.0 to suppress the display entirely. +/// Defaults to 1.0. +@property(nonatomic, assign, readwrite) CGFloat scannedImageDuration; + +/// Name for orientation change notification. +extern NSString * const CardIOScanningOrientationDidChangeNotification; + +/// userInfo key for orientation change notification, to get the current scanning orientation. +/// +/// Returned as an NSValue wrapping a UIDeviceOrientation. Sample extraction code: +/// @code +/// NSValue *wrappedOrientation = notification.userInfo[CardIOCurrentScanningOrientation]; +/// UIDeviceOrientation scanningOrientation = UIDeviceOrientationPortrait; // set a default value just to be safe +/// [wrappedOrientation getValue:&scanningOrientation]; +/// // use scanningOrientation... +/// @endcode +extern NSString * const CardIOCurrentScanningOrientation; + +/// userInfo key for orientation change notification, to get the duration of the card.io rotation animations. +/// +/// Returned as an NSNumber wrapping an NSTimeInterval (i.e. a double). +extern NSString * const CardIOScanningOrientationAnimationDuration; + + +#pragma mark - Property you MAY get + +/// The actual camera preview area within the CardIOView. Location is relative to the CardIOView's origin. +/// You might want to use this, for example, when adjusting your view controller's view layout. +@property(nonatomic, assign, readonly) CGRect cameraPreviewFrame; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOViewDelegate.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOViewDelegate.h new file mode 100755 index 0000000..9e255aa --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/CardIOViewDelegate.h @@ -0,0 +1,26 @@ +// +// CardIOViewDelegate.h +// Version 5.2.0 +// +// See the file "LICENSE.md" for the full license governing this code. +// + +#import + +@class CardIOCreditCardInfo; +@class CardIOView; + +/// The receiver will be notified when the CardIOView completes it work. +@protocol CardIOViewDelegate + +@required + +/// This method will be called when the CardIOView completes its work. +/// It is up to you to hide or remove the CardIOView. +/// At a minimum, you should give the user an opportunity to confirm that the card information was captured correctly. +/// @param cardIOView The active CardIOView. +/// @param cardInfo The results of the scan. +/// @note cardInfo will be nil if exiting due to a problem (e.g., no available camera). +- (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)cardInfo; + +@end \ No newline at end of file diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAddress.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAddress.h new file mode 100644 index 0000000..05500e2 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAddress.h @@ -0,0 +1,27 @@ +// +// DTAddress.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTAddress : NSObject + +@property (nonatomic, copy) NSString* firstName; +@property (nonatomic, copy) NSString* lastName; +@property (nonatomic, copy) NSString* street; +@property (nonatomic, copy) NSString* zipCode; + +@property (nonatomic, copy) NSString* city; +@property (nonatomic, copy) NSString* countryCode; +@property (nonatomic, copy) NSString* street2; + +- (id)initWithFirstName:(NSString *)firstName + lastName:(NSString *)lastName + street:(NSString *)street + zipCode:(NSString *)zipCode; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h new file mode 100644 index 0000000..5aaae40 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasPaymentAuthorizationRequest.h @@ -0,0 +1,20 @@ + +#import + +@class DTPaymentMethodInfo; +@class DTPaymentRequest; +@class DTPaymentMethodToken; + +@interface DTAliasPaymentAuthorizationRequest : NSObject + +@property (nonatomic, nullable, copy) NSString* cvv; +@property (nonatomic, nullable, copy) NSString* easypayPaymentInfo; +@property (nonatomic, nullable, copy) NSDictionary* merchantProperties; +@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, nullable, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest+Internal.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest+Internal.h new file mode 100644 index 0000000..84a0b9e --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest+Internal.h @@ -0,0 +1,18 @@ +// +// DTAliasRequest+Internal.h +// datatrans-iphone +// +// Created by bacherma on 9/9/14. +// +// + +#import + +@interface DTAliasRequest (Internal) + +@property (nonatomic, readonly) NSString* merchantId; +@property (nonatomic, readonly) NSString* currencyCode; +@property (nonatomic, copy) DTCard* card; +@property (nonatomic, readonly) NSArray* paymentMethodIdents; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest.h new file mode 100644 index 0000000..e56cdb6 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequest.h @@ -0,0 +1,23 @@ +// +// DTAliasRequest.h +// Datatrans +// +// Created by Basil Achermann on 12/27/10. +// Copyright 2010 iEffects GmbH. All rights reserved. +// + +#import + +@class DTCard; + +@interface DTAliasRequest : NSObject + +// 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; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequestResponse.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequestResponse.h new file mode 100644 index 0000000..f5bbdbc --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAliasRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTAliasRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTAliasRequestResponse : NSObject + +@property (nonatomic, copy) NSString* alias; +@property (nonatomic, copy) NSString* maskedCardNumber; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayDelegate.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayDelegate.h new file mode 100644 index 0000000..14ddccc --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayDelegate.h @@ -0,0 +1,53 @@ +// +// DTApplePayDelegate.h +// +// DTApplePayDelegate methods can be implemented to customize Apple Pay payments. All methods have been copied +// verbatim from PKPaymentAuthorizationViewControllerDelegate and are optional. Please refer to the official +// Apple Pay developer documentation for more information. +// + +#import + + +@protocol DTApplePayDelegate + +@optional +// 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: +// didSelectShippingAddress:completion:. +// +// The delegate 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 + didSelectShippingMethod:(PKShippingMethod *)shippingMethod + completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray *summaryItems))completion; + +// 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 *shippingMethods, + NSArray *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 *shippingMethods, + NSArray *summaryItems))completion NS_AVAILABLE_IOS(9_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 *summaryItems))completion NS_AVAILABLE_IOS(9_0); + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayProcess.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayProcess.h new file mode 100644 index 0000000..da07aac --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTApplePayProcess.h @@ -0,0 +1,29 @@ +// +// DTApplePayProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 06.10.20. +// + +@class DTErrorHandler; +@class DTNetworking; +@class DTPaymentOptions; +@class DTPaymentRequest; +@protocol DTTransactionModel; + +@protocol DTApplePayProcessDelegate + +- (void)paymentDidFinish; +- (void)transactionWasCancelled; +- (void)transactionDidFailWithError:(nonnull NSError *)error; + +@end + +@interface DTApplePayProcess : NSObject + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (nonnull instancetype)initWithPresentingController:(nonnull UIViewController *)controller networking:(nonnull DTNetworking *)networking errorHandler:(nonnull DTErrorHandler *)errorHandler options:(nonnull DTPaymentOptions *)options delegate:(nonnull id)delegate; + +- (void)startWithPaymentRequest:(nonnull DTPaymentRequest *)request paymentModel:(nonnull id)model; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h new file mode 100644 index 0000000..e8793f1 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTAuthorizationRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTAuthorizationRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTAuthorizationRequestResponse : NSObject + +@property (nonatomic, assign) NSInteger responseCode; +@property (nonatomic, copy) NSDictionary* responseInfo; // optional info (maskedCC etc.), in case of split authorization +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTBasketItem.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTBasketItem.h new file mode 100644 index 0000000..bfde66c --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTBasketItem.h @@ -0,0 +1,25 @@ +// +// DTBasketItem-h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTBasketItem : NSObject + +@property (nonatomic, copy) NSString* articleId; +@property (nonatomic, copy) NSString* name; +@property (nonatomic, assign) NSInteger grossPrice; +@property (nonatomic, assign) NSInteger quantity; + +@property (nonatomic, copy) NSString* itemDescription; +@property (nonatomic, assign) float_t tax; +@property (nonatomic, assign) NSInteger taxAmount; +@property (nonatomic, copy) NSString* type; // default: "goods" + +- (id)initWithId:(NSString *)articleId name:(NSString *)name grossPrice:(NSInteger)grossPrice quantity:(NSInteger)quantity; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTByjunoPaymentInfo.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTByjunoPaymentInfo.h new file mode 100644 index 0000000..995f76a --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTByjunoPaymentInfo.h @@ -0,0 +1,42 @@ +// +// DTByjunoPaymentInfo.h +// datatrans-iphone +// +// Created by bacherma on 14/08/17. +// Copyright 2017 ieffects ag. All rights reserved. +// +// +// Class for configuring Byjuno payments. In the following example a possible Byjuno payment is configured: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Mark" +// lastName:@"Uber" +// street:@"Amstelstrasse 11" +// zipCode:@"4123"]; +// address.city = @"Allschwil"; +// address.countryCode = @"CH"; +// +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.customerId = @"10067822"; +// customer.type = @"P"; +// customer.gender = @"female"; +// customer.address = address; +// customer.birthDate = [[DTDate alloc] initWithYear:1986 month:5 day:14]; +// customer.language = @"DE"; +// customer.mailAddress = @"h.mustermann@intrum.com"; +// paymentController.paymentOptions.customer = customer; +// +// DTByjunoPaymentInfo* info = [[DTByjunoPaymentInfo alloc] init]; +// info.deviceFingerprintId = @"deviceFingerprintId-test"; +// paymentController.paymentOptions.byjunoPaymentInfo = info; +// + +#import + +@interface DTByjunoPaymentInfo : NSObject + +@property (nonatomic, copy) NSString* deviceFingerprintId; +@property (nonatomic, copy) NSString* verifiedDocument1Number; +@property (nonatomic, copy) NSString* verifiedDocument1Issuer; +@property (nonatomic, copy) NSString* verifiedDocument1Type; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTCustomer.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTCustomer.h new file mode 100644 index 0000000..65e2a1d --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTCustomer.h @@ -0,0 +1,27 @@ +// +// DTCustomer.h +// datatrans-iphone +// +// Created by pschmid on 14/08/17. +// Copyright 2017 ieffects ag. All rights reserved. +// + +#import + +@class DTDate; +@class DTAddress; + +@interface DTCustomer : NSObject + +@property (nonatomic, copy) DTAddress* address; +@property (nonatomic, copy) DTDate* birthDate; +@property (nonatomic, copy) NSString* cellPhone; +@property (nonatomic, copy) NSString* customerId; +@property (nonatomic, copy) NSString* gender; +@property (nonatomic, copy) NSString* ipAddress; +@property (nonatomic, copy) NSString* language; +@property (nonatomic, copy) NSString* mailAddress; +@property (nonatomic, copy) NSString* phone; +@property (nonatomic, copy) NSString* type; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTDate.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTDate.h new file mode 100644 index 0000000..8808167 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTDate.h @@ -0,0 +1,18 @@ +// +// DTDate.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// + +#import + +@interface DTDate : NSObject + +@property (nonatomic, readonly) NSString* dateString; + +- (id)initWithYear:(int)year month:(int)month day:(int)day; +- (id)initWithString:(NSString *)s; // dd.MM.yyyy or yyyy-MM-dd + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandler.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandler.h new file mode 100644 index 0000000..24b6e55 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandler.h @@ -0,0 +1,25 @@ +// +// DTErrorHandler.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 02.10.20. +// + +@protocol DTErrorHandlerDelegate; +@protocol DTErrorPresenter; +@class DTUrls; + +@interface DTErrorHandler : NSObject + +- (nonnull instancetype)initWithDelegate:(nonnull id)delegate errorPresenter:(nonnull id)errorPresenter urls:(nonnull DTUrls *)urls suppressTransactionErrorDialog:(BOOL)suppressTransactionErrorDialog; + +- (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)showAliasRegistrationError:(nonnull NSError *)error returnAuthorizationError:(BOOL)returnAuthorizationError; +- (void)showAuthenticationError:(nonnull NSError *)error; +- (void)showAuthorizationError:(nonnull NSError *)error; +- (void)showCriticalErrorWithTitle:(nonnull NSString *)title message:(nonnull NSString *)message error:(nonnull NSError *)error; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandlerDelegate.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandlerDelegate.h new file mode 100644 index 0000000..291898b --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorHandlerDelegate.h @@ -0,0 +1,12 @@ +// +// DTErrorHandlerDelegate.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 08.10.20. +// + +@protocol DTErrorHandlerDelegate + +- (void)didHandleError:(nonnull NSError *)error; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorPresenter.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorPresenter.h new file mode 100644 index 0000000..65aca2b --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTErrorPresenter.h @@ -0,0 +1,9 @@ +#import + +@protocol DTErrorPresenter + +- (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) + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h new file mode 100644 index 0000000..cf46f60 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTExternalWebAppDelegateProxy.h @@ -0,0 +1,17 @@ +// +// DTExternalWebAppDelegateProxy.h +// datatrans-iphone +// +// Created by Basil Achermann on 25.01.18. +// + +#import + +@interface DTExternalWebAppDelegateProxy : NSObject + +typedef BOOL (^DTExternalWebAppDelegateProxyHandler)(NSURL* url); + +- (id)initWithViewController:(UIViewController *)viewController handler:(DTExternalWebAppDelegateProxyHandler)handler; +- (void)cancel; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h new file mode 100644 index 0000000..bbfc4cb --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTFakePaymentRequestFactory.h @@ -0,0 +1,16 @@ +// +// DTFakePaymentRequestFactory.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 30.09.20. +// + +@class DTAliasRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; + +@interface DTFakePaymentRequestFactory : NSObject + ++ (nonnull DTPaymentRequest *)createFakePayment:(nonnull DTAliasRequest *)aliasRequest options:(nonnull DTPaymentOptions *)options; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransaction.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransaction.h new file mode 100644 index 0000000..a5dc726 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransaction.h @@ -0,0 +1,31 @@ +// +// DTInitialTransaction.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + +@class DTAliasRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; +@class DTPaymentMethodToken; + + +@interface DTInitialTransaction : NSObject + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (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 *)paymentMethods; +- (nonnull DTPaymentRequest *)paymentRequest; +- (nullable DTPaymentMethodToken *)paymentMethodToken; +- (BOOL)isPayment; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransactionProcess.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransactionProcess.h new file mode 100644 index 0000000..a6c7d23 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTInitialTransactionProcess.h @@ -0,0 +1,22 @@ +// +// DTInitialTransactionProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + +@class DTInitialTransaction; +@class DTNetworking; + + +@interface DTInitialTransactionProcess : NSObject + +typedef void (^InitialTransactionCompletion)(DTInitialTransaction * _Nullable transaction, NSError * _Nullable error); + +- (nonnull instancetype)init NS_UNAVAILABLE; +- (nonnull instancetype)initWithNetworking:(nonnull DTNetworking *)networking idempotencyKey:(nonnull NSString *)idempotencyKey; + +- (void)startWithMobileToken:(nonnull NSString *)mobileToken completion:(nonnull InitialTransactionCompletion)completion; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLoaderPresenter.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLoaderPresenter.h new file mode 100644 index 0000000..9b1730d --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLoaderPresenter.h @@ -0,0 +1,13 @@ +// +// DTLoaderPresenter.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 29.09.20. +// + +@protocol DTLoaderPresenter + +- (void)showLoader; +- (void)dismissLoader; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLockScreenPresenter.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLockScreenPresenter.h new file mode 100644 index 0000000..48b7c2a --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTLockScreenPresenter.h @@ -0,0 +1,7 @@ + +@protocol DTLockScreenPresenter + +- (void)showLockScreenWithText:(nonnull NSString *)text; +- (void)dismissLockScreen; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTNetworking.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTNetworking.h new file mode 100644 index 0000000..0206177 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTNetworking.h @@ -0,0 +1,70 @@ +// +// DTNetworking.h +// DTPaymentLib +// +// Created by Basil Achermann on 8/11/10. +// Copyright 2010 iEffects GmbH. All rights reserved. +// + +#import + +@class DTAliasPaymentAuthorizationRequest; +@class DTAliasRequest; +@class DTAliasRequestResponse; +@class DTAuthorizationRequestResponse; +@class DTPaymentAuthorizationRequest; +@class DTPaymentOptions; +@class DTPaymentRequest; +@class DTStartApplePayRequestResponse; +@class DTStartTokenRequestResponse; +@class DTStartTWINTRequestResponse; +@class DTStatusRequestResponse; +@class DTTWINTStatusRequestResponse; +@class DTUrls; + +typedef enum { + DT_ENROLLMENT_STATUS_NOT_ENROLLED, + DT_ENROLLMENT_STATUS_ENROLLED +} DTEnrollmentStatus; + +@protocol DTNWRequest +- (void)cancel; +@end + + +// Datatrans networking API. All requests are asynchronous. Responses are posted to the _main_ thread. +// Errors can be: +// - Technical errors: error codes of Apple internal domains (NSURLErrorDomain, kCFErrorDomainCFNetwork), +// negative error codes of kGDataHTTPFetcherErrorDomain, +// internal and parsing errors of DTNetworkingErrorDomain defined by DTNetworkingErrorCode. +// - Invalid HTTP status codes: positive error codes of domain kGDataHTTPFetcherErrorDomain +// - Transaction errors: all non-technical error codes of DTNetworkingErrorDomain as defined by DTNetworkingErrorCode +@interface DTNetworking : NSObject { +@protected + BOOL _testingEnabled; + DTPaymentOptions* _options; +} + ++ (BOOL)isTechnicalError:(NSError *)error; ++ (BOOL)isSSLError:(NSError *)error; + +- (instancetype)initWithMobileToken:(NSString *)mobileToken options:(DTPaymentOptions *)paymentOptions urls:(DTUrls *)urls; + +- (void)requestInitialTransaction:(NSString *)mobileToken idempotencyKey:(NSString *)idempotencyKey completion:(void (^)(NSData *, NSError *))completion; +- (void)requestAliasForMerchantId:(NSString *)merchantId cardNo:(NSString *)cardNo completion:(void (^)(DTAliasRequestResponse *, NSError *))completion; +- (void)requestStatusForMerchantId:(NSString *)merchantId alias:(NSString *)alias currencyCode:(NSString *)currencyCode isAliasRequest:(BOOL)isAliasRequest completion:(void(^)(DTStatusRequestResponse *, NSError *))completion; +- (void)authorizeAliasPaymentRequest:(DTAliasPaymentAuthorizationRequest *)authorizationRequest completion:(void (^)(DTAuthorizationRequestResponse *, NSError *))completion; +- (void)authorizePaymentRequest:(DTPaymentAuthorizationRequest *)authorizationRequest completion:(void (^)(DTAuthorizationRequestResponse *, NSError *))completion; // split web payment +- (void)startTokenRequest:(DTPaymentRequest *)paymentRequest paymentMethod:(NSString *)paymentMethod completion:(void (^)(DTStartTokenRequestResponse *, NSError *))completion; +- (void)startTokenRequestForAlias:(DTAliasRequest *)aliasRequest paymentMethod:(NSString *)paymentMethod completion:(void (^)(DTStartTokenRequestResponse *, NSError *))completion; +- (void)startTWINTAliasRequest:(DTAliasRequest *)aliasRequest completion:(void (^)(DTStartTWINTRequestResponse *, NSError *))completion; +- (void)TWINTStatusRequestForMerchantId:(NSString *)merchantId transactionId:(NSString *)transactionId completion:(void (^)(DTTWINTStatusRequestResponse *, NSError *))completion; +- (void)cancelRequest:(DTPaymentRequest *)paymentRequest transactionId:(NSString *)transactionId; +- (void)startApplePayRequest:(DTPaymentRequest *)paymentRequest token:(NSString *)token completion:(void (^)(DTStartApplePayRequestResponse *, NSError *))completion; + +#pragma mark - Management +typedef void (^DTManagementCompletion)(NSError* error); +- (void)cancelTransaction:(NSString *)transactionId request:(DTPaymentRequest *)request completion:(DTManagementCompletion)completion; +- (void)cancelCurrentRequest; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPPRiskComponentManager.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPPRiskComponentManager.h new file mode 100644 index 0000000..5c3c1d9 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPPRiskComponentManager.h @@ -0,0 +1,20 @@ +// +// DTPPRiskComponentManager.h +// datatrans-iphone +// +// Created by Basil Achermann on 20.02.18. +// + +#import + + +@interface DTPPRiskComponentManager : NSObject + +// +// The returned instance must be kept while the PP risk component is being used, i.e. during the complete PAP process. +// Release the instance at the end of the process to also dealloc the PP shared component +- (instancetype)initWithPairingId:(NSString *)pairingId; + ++ (NSString *)uniquePairingId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h new file mode 100644 index 0000000..de9ff23 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentAuthorizationRequest.h @@ -0,0 +1,17 @@ + +#import + +@class DTPaymentMethodInfo; + +@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* merchantProperties; +@property (nonatomic, nullable, copy) DTPaymentMethodInfo* paymentMethod; +@property (nonatomic, nonnull, copy) NSString* refno; +@property (nonatomic, nonnull, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentError.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentError.h new file mode 100644 index 0000000..5880ee4 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentError.h @@ -0,0 +1,31 @@ +// +// DTPaymentError.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 06.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +extern NSString* _Nonnull const DTPaymentErrorDomain; +extern NSString* _Nonnull const DTPaymentMethodKey; + +typedef enum { + DTPaymentErrorTechnical, + DTPaymentErrorValidation, + DTPaymentErrorAuthentication, + DTPaymentErrorAuthorization +} DTPaymentErrorCode; + +@interface DTPaymentError : NSError + ++ (nonnull instancetype)paymentErrorTechnical; ++ (nonnull instancetype)paymentErrorTechnical:(nullable NSString *)message; ++ (nonnull instancetype)paymentErrorValidation:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentErrorAuthentication:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentErrorAuthorization:(nullable NSError *)underlyingError; ++ (nonnull instancetype)paymentError:(nonnull NSError *)underlyingError paymentMethod:(nullable NSString *)paymentMethod; + ++ (BOOL)isAuthorizationError:(nonnull NSError *)error; +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h new file mode 100644 index 0000000..dd9be0f --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodIdentifiers.h @@ -0,0 +1,40 @@ +// +// DTPaymentMethodIdentifiers.h +// datatrans-iphone +// +// Created by Patrick Schmid on 02/08/18. +// Copyright 2018 ieffects ag. All rights reserved. +// + +extern NSString* const DTPaymentMethodVisa; +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; +extern NSString* const DTPaymentMethodPostFinanceCard; +extern NSString* const DTPaymentMethodPostFinanceEFinance; +extern NSString* const DTPaymentMethodPayPal; +extern NSString* const DTPaymentMethodEasypay; +extern NSString* const DTPaymentMethodSEPA; +extern NSString* const DTPaymentMethodSwissBilling; +extern NSString* const DTPaymentMethodTwint; +extern NSString* const DTPaymentMethodApplePay; +extern NSString* const DTPaymentMethodReka; +extern NSString* const DTPaymentMethodByjuno; +extern NSString* const DTPaymentMethodByjunoDirectInvoice; +extern NSString* const DTPaymentMethodSwissPass; +extern NSString* const DTPaymentMethodPowerpay; +extern NSString* const DTPaymentMethodPaysafecard; + +// reka alternative identifiers +extern NSString* const DTPaymentMethodRekaRail; +extern NSString* const DTPaymentMethodRekaLunch; + +// Supercard alternative identifiers +extern NSString* const DTPaymentMethodSupercardVisa; +extern NSString* const DTPaymentMethodSupercardPrepaid; +extern NSString* const DTPaymentMethodSupercardMastercard; diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodInfo.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodInfo.h new file mode 100644 index 0000000..81b0222 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentMethodInfo.h @@ -0,0 +1,62 @@ +// +// DTPaymentMethodInfo.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 9/1/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +@class DTPaymentOptions; + +typedef enum { + DTPaymentMethodCreditCard = 1 << 0, + DTPaymentMethodNeedsCardExpiration = 1 << 1, + DTPaymentMethodNeedsCardVerification = 1 << 2, + DTPaymentMethodNeedsCardholder = 1 << 3, + DTPaymentMethodHasTransparentBackground = 1 << 4, + DTPaymentMethodWebPayment = 1 << 5, + DTPaymentMethodHasCardScan = 1 << 6, + DTPaymentMethodWebPaymentExternal = 1 << 7, + DTPaymentMethodNoLogoShadow = 1 << 8, +} DTPaymentMethodFlags; + +@interface DTPaymentMethodInfo : NSObject + +- (nullable instancetype)initWithIdentifier:(nullable NSString *)identifier; + +@property (nonatomic, readonly) BOOL isCreditCard; +@property (nonatomic, readonly) BOOL isWebPayment; +@property (nonatomic, readonly) BOOL isWebPaymentExternal; +@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) 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) NSRange creditCardVerificationLengthRange; +@property (nonatomic, readonly) NSRange creditCardNumberLengthRange; +@property (nonatomic, readonly) NSArray* _Nullable creditCardNumberPrefixes; +@property (nonatomic, readonly) NSArray* _Nullable creditCardNumberSpaces; + +- (nullable NSString *)commonPrefix; + +- (nullable UIImage *)imageForSize:(CGSize)size; + +- (void)updateWithOptions:(nonnull DTPaymentOptions *)options; +- (void)validateOptions:(nonnull DTPaymentOptions *)options isTokenPayment:(BOOL)isTokenPayment; + ++ (nullable DTPaymentMethodInfo *)uniqueMethodInMethods:(nonnull NSArray *)methods forNumberStartingWith:(nonnull NSString *)number; ++ (nonnull NSSet *)methodsInMethods:(nonnull NSArray *)methods forNumberStartingWith:(nonnull NSString *)number; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentModel.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentModel.h new file mode 100644 index 0000000..6ada7e7 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentModel.h @@ -0,0 +1,15 @@ +// +// DTPaymentModel.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 8/31/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +@interface DTPaymentModel : NSObject + ++ (BOOL)creditCardNumberIsValidLuhn:(NSString *)number; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentOptions.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentOptions.h new file mode 100644 index 0000000..6b55026 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentOptions.h @@ -0,0 +1,62 @@ +// +// DTPaymentOptions.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 06.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +typedef enum { + DTPaymentReturnsCreditCardNever = 1, + DTPaymentReturnsCreditCardSelectableDefaultNo, + DTPaymentReturnsCreditCardSelectableDefaultYes, + DTPaymentReturnsCreditCardAlways +} DTPaymentReturnsCreditCard; + +typedef enum { + DTPaymentCardholderHidden = 0, + DTPaymentCardholderOptional, + DTPaymentCardholderRequired +} DTPaymentCardholder; + +@class DTApplePayConfig; +@class DTByjunoPaymentInfo; +@class DTSwissBillingPaymentInfo; +@class DTSwissPassPaymentInfo; +@class DTCustomer; + +@interface DTPaymentOptions : NSObject + +@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; +@property (nonatomic, assign) BOOL useWebELVInput; +@property (nonatomic, copy) NSString* easypayTitle; +@property (nonatomic, copy) NSString* easypayDescription; +@property (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 (nonatomic, copy) NSDictionary* merchantProperties; +@property (nonatomic, copy) NSString* creditCardInputLocalizedDoneButtonTitle; +@property (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 (nonatomic, copy) DTSwissBillingPaymentInfo* swissBillingPaymentInfo; +@property (nonatomic, copy) NSString* appCallbackScheme; +@property (nonatomic, assign) BOOL suppressTransactionErrorDialog; +@property (nonatomic, copy) NSString* applePayMerchantIdentifier; +@property (nonatomic, copy) DTApplePayConfig* applePayConfig; +@property (nonatomic, assign) BOOL skipAuthorizationCompletion; +@property (nonatomic, copy) DTByjunoPaymentInfo* byjunoPaymentInfo; +@property (nonatomic, copy) DTCustomer* customer; +@property (nonatomic, copy) DTSwissPassPaymentInfo* swissPassPaymentInfo; +@property (nonatomic, copy) NSString* paysafecardMerchantClientId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentRequest.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentRequest.h new file mode 100644 index 0000000..dcae9f4 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPaymentRequest.h @@ -0,0 +1,31 @@ +// +// DTPaymentRequest.h +// Datatrans +// +// Created by Kaspar Rohrer on 8/11/10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +#pragma mark Payment request + +@interface DTPaymentRequest : NSObject { + NSString* _merchantId; + 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; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h new file mode 100644 index 0000000..78751c3 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTPostFinanceRequestHandler.h @@ -0,0 +1,12 @@ +// +// DTPostFinanceRequestHandler.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 19/09/19. +// + +#import + +@interface DTPostFinanceRequestHandler : NSObject + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResources.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResources.h new file mode 100644 index 0000000..a8ac2b2 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResources.h @@ -0,0 +1,29 @@ +// +// DTResources.h +// datatrans-iphone +// +// Created by Kaspar Rohrer on 09.09.10. +// Copyright 2010 iEffects. All rights reserved. +// + +#import + +#define DTLocalizedString(key) \ + [DTResources localizedStringForKey:(key)] + +@interface DTResources : NSObject { + +} + ++ (nonnull NSBundle *)bundle; + ++ (nonnull NSBundle *)languageBundle; ++ (nonnull NSBundle *)languageBundleForLanguage:(nullable NSString *)language; + ++ (nonnull NSString *)localizedStringForKey:(nonnull NSString *)key; + ++ (nonnull UIImageView *)viewForIcon:(nonnull UIImage *)icon withColor:(nullable UIColor *)color; + ++ (nullable UIImage *)imageFromPDFNamed:(nonnull NSString *)pdfName forPointSize:(CGSize)size; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResponse.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResponse.h new file mode 100644 index 0000000..2863431 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTResponse.h @@ -0,0 +1,12 @@ +// +// DTResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 20.11.20. +// + +@protocol DTResponse + +@property (nonatomic, copy) NSError* error; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStartTokenRequestResponse.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStartTokenRequestResponse.h new file mode 100644 index 0000000..d3276a2 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStartTokenRequestResponse.h @@ -0,0 +1,16 @@ +// +// DTStartTokenRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTStartTokenRequestResponse : NSObject + +@property (nonatomic, assign) NSInteger responseCode; +@property (nonatomic, copy) NSString* token; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStatusRequestResponse.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStatusRequestResponse.h new file mode 100644 index 0000000..9295a57 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTStatusRequestResponse.h @@ -0,0 +1,15 @@ +// +// DTStatusRequestResponse.h +// Datatrans +// +// Created by Patrick Fompeyrine on 23.11.20. +// + +#import + +@interface DTStatusRequestResponse : NSObject + +@property (nonatomic, assign) BOOL isEnrolled; +@property (nonatomic, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h new file mode 100644 index 0000000..9406b4d --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissBillingPaymentInfo.h @@ -0,0 +1,44 @@ +// +// DTSwissBillingPaymentInfo.h +// datatrans-iphone +// +// Created by bacherma on 06/07/15. +// Copyright 2015 iEffects GmbH. All rights reserved. +// +// +// Class for configuring SwissBilling payments. In the following example a payment is made with basket items: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Good" lastName:@"Customer" street:@"Limmatquai 55" zipCode:@"8001"]; +// address.city = @"Zürich"; +// address.countryCode = @"CH"; +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.address = address; +// customer.phone = @"+41584333034"; +// customer.mailAddress = @"eshop@example.com"; +// customer.birthDate = [[DTDate alloc] initWithYear:1969 month:9 day:19]; +// paymentController.paymentOptions.customer = customer; +// +// DTSwissBillingPaymentInfo* info = [[DTSwissBillingPaymentInfo alloc] init]; +// info.shippingAddress = address; +// +// NSMutableArray* items = [NSMutableArray array]; +// DTBasketItem* item = [[DTBasketItem alloc] initWithId:@"1" name:@"name 1" grossPrice:1000 quantity:1]; +// [items addObject:item]; +// item = [[DTBasketItem alloc] initWithId:@"2" name:@"name 2" grossPrice:500 quantity:2]; +// [items addObject:item]; +// info.basketItems = items; +// +// paymentController.paymentOptions.swissBillingPaymentInfo = info; +// + +#import + +@class DTAddress; + +@interface DTSwissBillingPaymentInfo : NSObject + +@property (nonatomic, assign) NSInteger taxAmount; +@property (nonatomic, copy) DTAddress* shippingAddress; +@property (nonatomic, copy) NSArray* basketItems; // array of DTBasketItem* objects + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h new file mode 100644 index 0000000..5d60d6b --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTSwissPassPaymentInfo.h @@ -0,0 +1,32 @@ +// +// DTSwissPassPaymentInfo.h +// datatrans-iphone +// +// Created by pschmid on 25/04/19. +// Copyright 2019 ieffects ag. All rights reserved. +// +// +// Class for configuring SwissBilling payments. In the following example a payment is configured: +// +// DTAddress* address = [[DTAddress alloc] initWithFirstName:@"Anna" lastName:@"Deiss" street:@"SBB Personenverkehr - VS-VE-VS" zipCode:@"3000"]; +// DTCustomer* customer = [[DTCustomer alloc] init]; +// customer.address = address; +// customer.birthDate = [[DTDate alloc] initWithYear:1980 month:1 day:1]; +// customer.mailAddress = @"anna.deiss@mail.com"; +// customer.phone = @"+41 79 555 44 33"; +// paymentController.paymentOptions.customer = customer; +// +// DTSwissPassPaymentInfo* info = [[DTSwissPassPaymentInfo alloc] initWithSwissPassCardNumber:@"S48681516807" swissPassZipCode:@"3000"]; +// paymentController.paymentOptions.swissPassPaymentInfo = info; +// + +#import + +@interface DTSwissPassPaymentInfo : NSObject + +@property (nonatomic, copy) NSString* swissPassCardNumber; +@property (nonatomic, copy) NSString* swissPassZipCode; + +- (instancetype)initWithSwissPassCardNumber:(NSString *)cardNumber swissPassZipCode:(NSString *)zipCode; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTransactionModel.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTransactionModel.h new file mode 100644 index 0000000..948b5e5 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTransactionModel.h @@ -0,0 +1,14 @@ +#import + +@class DTPaymentMethodToken; +@class DTPaymentMethodInfo; + +@protocol DTTransactionModel + +@property(nullable, copy) DTAliasRequest* aliasRequest; +@property(nonnull, readonly) NSString* mobileToken; +@property(nullable, copy) DTPaymentMethodInfo* paymentMethod; +@property(nullable, copy) DTPaymentMethodToken* paymentMethodToken; +@property(nullable, copy) NSString* transactionId; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTwintProcess.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTwintProcess.h new file mode 100644 index 0000000..6906aaf --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTTwintProcess.h @@ -0,0 +1,31 @@ +// +// DTTwintProcess.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 29.09.20. +// + +@class DTAliasRequest; +@class DTErrorHandler; +@class DTNetworking; +@class DTPaymentRequest; +@protocol DTLockScreenPresenter; +@protocol DTTransactionModel; + +@protocol DTTwintProcessDelegate + +- (void)aliasRegistrationDidFinish; +- (void)paymentDidFinish; +- (void)transactionWasCancelled; + +@end + +@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)loaderPresenter lockScreenPresenter:(nonnull id)lockScreenPresenter options:(nonnull DTPaymentOptions *)options delegate:(nonnull id)delegate; + +- (void)startWithPaymentRequest:(nonnull DTPaymentRequest *)request paymentModel:(nonnull id)model; +- (void)startWithAliasRequest:(nonnull DTAliasRequest *)aliasRequest paymentModel:(nonnull id)model; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTUrls.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTUrls.h new file mode 100644 index 0000000..ba6f4e0 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTUrls.h @@ -0,0 +1,30 @@ +// +// DTUrls.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 6/22/20. +// Copyright 2020 ieffects ag. All rights reserved. +// + + +@interface DTUrls : NSObject + +- (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 *)getAuthorizationUrl; +- (nonnull NSString *)getAuthorizationSplitUrl; +- (nonnull NSString *)getCancelUrl; +- (nonnull NSString *)getInitialTransactionRequestUrl; +- (nonnull NSString *)getPaymentPostUrl:(BOOL)isResumed; +- (nonnull NSString *)getTWINTRegistrationUrl; +- (nonnull NSString *)getTWINTStatusUrl; + +- (nonnull NSArray *)getHosts; +- (void)switchUrl; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTVersion.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTVersion.h new file mode 100644 index 0000000..5f36f49 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTVersion.h @@ -0,0 +1,25 @@ +// +// DTVersion.h +// datatrans-iphone +// +// Created by Basil Achermann on 5/31/12. +// Copyright 2012 iEffects GmbH. All rights reserved. +// + +#import + + +@interface DTVersion : NSObject { +} + ++ (void)printIfTestOnly; + ++ (NSString *)libraryName; + ++ (uint32_t)libraryVersion; ++ (NSString *)libraryVersionString; ++ (NSString *)libraryVersionStringWithDeviceType; + ++ (NSMutableDictionary *)statsProperties; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbackUrls.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbackUrls.h new file mode 100644 index 0000000..f3ecdf4 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbackUrls.h @@ -0,0 +1,18 @@ +// +// DTWebCallbackUrls.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 05.10.20. +// + +@interface DTWebCallbackUrls : NSObject + +- (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 diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbacks.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbacks.h new file mode 100644 index 0000000..e9ebfe6 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebCallbacks.h @@ -0,0 +1,34 @@ +// +// DTWebCallback.h +// datatrans-iphone +// +// Created by Basil Achermann on 29.01.18. +// + +#import + +@protocol DTRequestHandler; +@protocol DTWebProcess; +@protocol DTWebProcessDelegate; +@class DTWebCallbackUrls; +@class DTWebProcessViewController; + +@interface DTWebCallbacks : NSObject + +- (nonnull instancetype)initWithCallbackUrls:(nonnull DTWebCallbackUrls *)urls; + +- (void)addRequestHandler:(nonnull id)handler; + +- (BOOL)canHandleRequest:(nonnull NSURLRequest *)request; +- (BOOL)handleRequest:(nonnull NSURLRequest *)request webProcess:(nonnull id)webProcess notificationDelegate:(nullable id)delegate; + +@end + +#pragma mark - + +@protocol DTRequestHandler + +- (BOOL)canHandleRequest:(nonnull NSURLRequest *)request; +- (void)handleRequest:(nonnull NSURLRequest *)request webProcess:(nonnull id)process notificationDelegate:(nullable id)delegate; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebProcess.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebProcess.h new file mode 100644 index 0000000..889de0e --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebProcess.h @@ -0,0 +1,19 @@ +#import + +@protocol DTWebProcess +@end + +@protocol DTWebProcessDelegate + +- (void)webProcessDidFail:(nonnull id)webProcess error:(nonnull NSError *)error transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessDidSucceed:(nonnull id)webProcess transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessAliasCreated:(nonnull id)webProcess method:(nonnull NSString *)method transactionId:(nullable NSString *)transactionId params:(nonnull NSDictionary *)params; +- (void)webProcessWasCancelled:(nonnull id)webProcess; + +@end + +@protocol DTPostFinanceWebProcessDelegate + +- (void)webProcessDidStartPFEPayment:(nonnull id)webProcess url:(nonnull NSURL *)url; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebRequestFactory.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebRequestFactory.h new file mode 100644 index 0000000..c9e06d5 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/DTWebRequestFactory.h @@ -0,0 +1,29 @@ +// +// DTWebRequestFactory.h +// datatrans-iphone +// +// Created by Patrick Fompeyrine on 25.09.20. +// + +#import +#import +#import +#import + +@class DTAliasRequest; +@class DTCardToken; +@class DTPaymentOptions; +@class DTWebCallbackUrls; +@protocol DTTransactionModel; + +@interface DTWebRequestFactory : NSObject + +- (nonnull instancetype)initWithPaymentOptions:(nonnull DTPaymentOptions *)options urls:(nonnull DTUrls *)urls callbackUrls:(nonnull DTWebCallbackUrls *)callbackUrls; + +- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id)transactionModel; +- (nonnull NSURLRequest *)aliasInputRequestForRequest:(nonnull DTAliasRequest *)aliasRequest transactionModel:(nonnull id)transactionModel params:(nonnull NSDictionary *)params; +- (nonnull NSURLRequest *)authenticate3DRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest creditCard:(nonnull DTCardToken *)creditCard transactionId:(nonnull NSString *)transactionId; +- (nonnull NSURLRequest *)paymentInputRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest transactionModel:(nonnull id)transactionModel; +- (nonnull NSURLRequest *)paymentInputRequestForRequest:(nonnull DTPaymentRequest *)paymentRequest transactionModel:(nonnull id)transactionModel params:(nonnull NSDictionary *)params; + +@end diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans-Swift.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans-Swift.h new file mode 100644 index 0000000..6e459df --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans-Swift.h @@ -0,0 +1,817 @@ +// Generated by Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +#ifndef DATATRANS_SWIFT_H +#define DATATRANS_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import PassKit; +#endif + +#import + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Datatrans",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +@protocol DTApplePayDelegate; +@class PKPaymentRequest; + +/// Configuration object for Apple Pay transactions. +SWIFT_CLASS_NAMED("ApplePayConfig") +@interface DTApplePayConfig : NSObject +/// Delegate object for callbacks during Apple Pay authorization +@property (nonatomic, weak) id _Nullable delegate; +/// Use this label to configure the final summary of the purchase. The default +/// label is “Total”, but you can also replace it with the name of your shop. +/// The string will then read: PAY YOURSHOP: XX.XX +@property (nonatomic, copy) NSString * _Nullable finalSummaryItemLabel; +/// The request object for further configuration of Apple Pay. Please refer to +/// the official Apple Pay documentation for more information. +@property (nonatomic, readonly, strong) PKPaymentRequest * _Nonnull request; +/// 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. +/// \param supportedNetworks Supported card acquirers. +/// +/// +/// returns: +/// True if Apple Pay is available on the device, false if it is unavailable. ++ (BOOL)hasApplePayWithSupportedNetworks:(NSArray * _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 supportedNetworks Supported card acquirers. +/// +/// \param countryCode Apple Pay country code +/// +- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray * _Nonnull)supportedNetworks countryCode:(NSString * _Nonnull)countryCode OBJC_DESIGNATED_INITIALIZER; +/// :nodoc: +- (nonnull instancetype)initWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier supportedNetworks:(NSArray * _Nonnull)supportedNetworks; +/// Refer to the NSCopying 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; + +/// 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 +/// Payment method type, e.g. Visa +@property (nonatomic, readonly) enum DTPaymentMethodType type; +/// This init method initializes a PaymentMethod object with the +/// payment method type. +/// \param type Payment method type, e.g. Visa +/// +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type OBJC_DESIGNATED_INITIALIZER; +/// Refer to the NSCopying 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 + +@class DTCardExpiryDate; + +/// Use this class to process raw card data for payments. You should use +/// this class if your app takes over the user interface for the card input fields. +SWIFT_CLASS_NAMED("Card") +@interface DTCard : DTPaymentMethod +/// Card number +@property (nonatomic, copy) NSString * _Nonnull number; +/// Expiry date +@property (nonatomic, strong) DTCardExpiryDate * _Nonnull expiryDate; +/// Card security code - nil if the card does not have a card security code. +@property (nonatomic, copy) NSString * _Nullable cvv; +/// Cardholder’s name +@property (nonatomic, copy) NSString * _Nullable cardholder; +/// Use this to initialize a card object with the card data. +/// \param type Card type, e.g. Visa or Mastercard +/// +/// \param number Card number +/// +/// \param expiryDate Expiry date +/// +/// \param cvv Card security code - nil if the card does not have a card security code. +/// +/// \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; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE; +@end + + +/// Class to be used to represent the card expiry date (month and year). +SWIFT_CLASS_NAMED("CardExpiryDate") +@interface DTCardExpiryDate : NSObject +/// Card expiry month, [1, 12], e.g. 1 for January or 12 for December +@property (nonatomic) NSInteger month; +/// Card expiry year, 2 or 4 digits, e.g. 30 or 2030 +@property (nonatomic) NSInteger year; +/// Initializes the card expiry date with the given month and year. +/// \param month Card expiry month, [1, 12], e.g. 1 for January or 12 for December +/// +/// \param year Card expiry year, 2 or 4 digits, e.g. 30 or 2030 +/// +- (nonnull instancetype)initWithMonth:(NSInteger)month year:(NSInteger)year OBJC_DESIGNATED_INITIALIZER; +/// Refer to the NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying 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 + + +/// This class is the base token class to gather token information and process +/// recurring payments or fast checkouts with any payment method. This class +/// is sufficient to process payments with tokens of some payment methods +/// (e.g. Twint). More complex payment methods require you to specify some +/// more details in their token subclasses (e.g. card payments, PostFinance, etc.). +/// Please refer to the list below to see if you need to call an additional token +/// subclass for your payments. +///
    +///
  • +/// Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +/// Apple Pay, Byjuno, SwissPass, Powerpay Invoice +///
  • +///
  • +/// Complex payment methods (requiring token subclass): Card payments, +/// PayPal, PostFinance, Reka +///
  • +///
+/// Please refer to the Datatrans documentation to see if you can register a +/// token during payment or require a dedicated registration. +SWIFT_CLASS_NAMED("PaymentMethodToken") +@interface DTPaymentMethodToken : DTPaymentMethod +/// The token that can be used to process recurring payments or fast checkouts. +@property (nonatomic, copy) NSString * _Nonnull token; +/// 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 * _Nullable accessibilityTitle; +/// This init method has to be used to initialize a payment object. +/// \param type Payment method type, e.g. PayPal or Twint +/// +/// \param token The token that can be used to process recurring payments or fast checkouts. +/// +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token OBJC_DESIGNATED_INITIALIZER; +/// Creates a PaymentMethodToken from a JSON string. +/// Note that this function should only be used for iOS 12 and earlier. Use +/// create(data:decoder:) for later versions. +/// \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."); +/// 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 NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type SWIFT_UNAVAILABLE; +@end + + +/// This class contains the token information about a credit or debit card registration +/// from a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction or +/// to display a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful card payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("CardToken") +@interface DTCardToken : DTPaymentMethodToken +/// Expiry date +@property (nonatomic, readonly, strong) DTCardExpiryDate * _Nullable cardExpiryDate; +/// The masked card number you can use to display that specific card in your app. +/// The masked card number shows the first 6 digits and the last 4 digits of the card, +/// e.g. 432930xxxxxx6095. +@property (nonatomic, readonly, copy) NSString * _Nullable maskedCardNumber; +/// Cardholder’s name +@property (nonatomic, copy) NSString * _Nullable cardholder; +/// Initializes a CardToken object with the given card data. +/// \param type Payment method type, e.g. Visa +/// +/// \param token This is the token for the card, also known as alias. +/// This can be used to debit the card without further customer interaction. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the first 6 +/// digits and the last 4 digits of the card, e.g. 432930xxxxxx6095. +/// +/// \param cardholder Cardholder’s name +/// +- (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; +/// A human readable title e.g. ‘•••• 6095’. +@property (nonatomic, readonly, copy) NSString * _Nonnull displayTitle; +/// For VoiceOver this title is used instead of displayTitle. +@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 NSObject protocol +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token SWIFT_UNAVAILABLE; +@end + + + + +/// This class contains the token information about a PayPal registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful PayPal payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("PayPalToken") +@interface DTPayPalToken : DTPaymentMethodToken +/// PayPal e-mail address. This will be used for displaying purposes. +@property (nonatomic, copy) NSString * _Nullable payPalEmail; +/// This init method has to be used to initialize a PayPal payment object. +/// \param token Token for a PayPal account. +/// +/// \param payPalEmail PayPal e-mail address. This will be used for displaying purposes. +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token payPalEmail:(NSString * _Nullable)payPalEmail OBJC_DESIGNATED_INITIALIZER; +/// 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 * _Nullable accessibilityTitle; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithType:(enum DTPaymentMethodType)type token:(NSString * _Nonnull)token SWIFT_UNAVAILABLE; +@end + + + +/// The payment method used during the transaction. +typedef SWIFT_ENUM_NAMED(NSInteger, DTPaymentMethodType, "PaymentMethodType", open) { +/// Visa payment method + DTPaymentMethodTypeVisa = 0, +/// MasterCard payment method + DTPaymentMethodTypeMasterCard = 1, +/// Diners Club payment method + DTPaymentMethodTypeDinersClub = 2, +/// American Express payment method + DTPaymentMethodTypeAmericanExpress = 3, +/// JCB payment method + DTPaymentMethodTypeJCB = 4, +/// MyOne payment method + DTPaymentMethodTypeMyOne = 5, +/// UATP payment method + DTPaymentMethodTypeUATP = 6, +/// Discover payment method + DTPaymentMethodTypeDiscover = 7, +/// SUPERCARD payment method + DTPaymentMethodTypeSupercard = 8, +/// PostFinance Card payment method + DTPaymentMethodTypePostFinanceCard = 9, +/// PostFinance E-Finance payment method + DTPaymentMethodTypePostFinanceEFinance = 10, +/// PayPal payment method + DTPaymentMethodTypePayPal = 11, +/// Easypay payment method + DTPaymentMethodTypeEasypay = 12, +/// SEPA (ELV) payment method + DTPaymentMethodTypeSEPA = 13, +/// SwissBilling payment method + DTPaymentMethodTypeSwissBilling = 14, +/// Twint payment method + DTPaymentMethodTypeTwint = 15, +/// Apple Pay payment method + DTPaymentMethodTypeApplePay = 16, +/// Reka payment method + DTPaymentMethodTypeReka = 17, +/// Byjuno payment method + DTPaymentMethodTypeByjuno = 18, +/// SwissPass payment method + DTPaymentMethodTypeSwissPass = 19, +/// Powerpay payment method + DTPaymentMethodTypePowerpay = 20, +/// Paysafecard payment method + DTPaymentMethodTypePaysafecard = 21, +}; + + +/// Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType. +SWIFT_CLASS_NAMED("PaymentMethodTypeMapper") +@interface DTPaymentMethodTypeMapper : NSObject +/// This function returns the PaymentMethodType based on the Datatrans +/// payment method identifier. +/// \param identifier The payment method identifier from Datatrans +/// +/// +/// returns: +/// The payment method type, e.g. Visa ++ (enum DTPaymentMethodType)toTypeWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT; +/// This function returns the payment method identifier based on the +/// PaymentMethodType. +/// \param type The payment method type, e.g. Visa +/// +/// +/// returns: +/// The payment method identifier ++ (NSString * _Nonnull)toIdentifierWithType:(enum DTPaymentMethodType)type SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class contains the token information about a PostFinance Card registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful PostFinance Card payment or +/// with a dedicated registration. +SWIFT_CLASS_NAMED("PostFinanceCardToken") +@interface DTPostFinanceCardToken : DTCardToken +/// This init method has to be used to initialize a PostFinance Card payment object. +/// \param token Token for a PostFinance Card. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the last 4 +/// digits of the card, e.g. **** 1234. +/// +/// \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 NSCopying 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; +@end + + +/// This class contains the token information about a Reka card registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful Reka payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("RekaToken") +@interface DTRekaToken : DTCardToken +/// This init method has to be used to initialize a Reka payment object. +/// \param token Token for a Reka card. +/// +/// \param cardExpiryDate Expiry date +/// +/// \param maskedCardNumber The masked card number you can use to display +/// that specific card in your app. The masked card number shows the first 6 +/// digits and the last 4 digits of the card, e.g. 123456xxxxxxxxx1234. +/// +/// \param cardholder Cardholder’s name +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token cardExpiryDate:(DTCardExpiryDate * _Nonnull)cardExpiryDate maskedCardNumber:(NSString * _Nullable)maskedCardNumber cardholder:(NSString * _Nullable)cardholder; +/// Refer to the NSCopying 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; +@end + + +/// This class contains the token information about a SEPA (ELV) registration from +/// a previously completed transaction. Just like any other PaymentMethodToken +/// subclass, this class can be used to finalize a payment without user interaction +/// or to show a selection of saved token payments to the user for fast checkouts. +/// A token can be returned after completing a successful SEPA payment or with a +/// dedicated registration. +SWIFT_CLASS_NAMED("SEPAToken") +@interface DTSEPAToken : DTPaymentMethodToken +/// A bank code (German: Bankleitzahl) is a unique identification code for a +/// particular bank. This is required for tokens created before April 15th 2015. +@property (nonatomic, readonly, copy) NSString * _Nullable bankCode; +/// Token for SEPA (ELV). +@property (nonatomic, copy) NSString * _Nonnull token; +/// This init method has to be used to initialize a SEPA (ELV) payment object. +/// \param token Token for SEPA (ELV). +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token; +/// This init method has to be used with SEPA (ELV) tokens created before April 15th 2015. +/// Please refer to init(token:) for newer tokens. +/// \param token Token for SEPA (ELV). This value was returned for tokens created before April 15th 2015. +/// +/// \param bankCode A bank code (German: Bankleitzahl) is a unique identification +/// code for a particular bank. This is required for tokens created before April 15th 2015. +/// +- (nonnull instancetype)initWithToken:(NSString * _Nonnull)token bankCode:(NSString * _Nonnull)bankCode; +/// 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 * _Nullable accessibilityTitle; +/// Refer to the NSCopying 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; +@end + +@class UIColor; + +/// This class gives you options to customize the theme of the library. +/// The library offers by default a theme for light and dark mode. If your app supports +/// both themes too, make sure to use UIColor.init(dynamicProvider:) +/// when creating custom themes. +/// We recommend you to start by customizing linkColor before anything else, +/// as this is often used as a fallback color. +SWIFT_CLASS_NAMED("ThemeConfiguration") +@interface DTThemeConfiguration : NSObject +/// Background color of the navigation bars. If this is not specified, the +/// navigation bars will be transparent. +@property (nonatomic, strong) UIColor * _Nullable barBackgroundColor; +/// Color of the buttons in the navigation bars. If this is not specified, +/// the color will be the color set in linkColor. +@property (nonatomic, strong) UIColor * _Nullable barLinkColor; +/// Color of the title within the navigation bars. If this is not specified, +/// the color will be the text color. +/// The text color is either white or black and cannot be customized. +@property (nonatomic, strong) UIColor * _Nullable barTitleColor; +/// Background color of large buttons, such as the ‘Pay’ button. If this is +/// not specified, the color will be the color set in linkColor. +@property (nonatomic, strong) UIColor * _Nullable buttonColor; +/// Text color of large buttons, such as the ‘Pay’ button. If this is not +/// specified, the color will be set to white. +@property (nonatomic, strong) UIColor * _Nullable buttonTextColor; +/// Color of text-only buttons or links and the text cursor. If this is not +/// specified, the color will be in a blue tone that fits the standard iOS design. +@property (nonatomic, strong) UIColor * _Nullable linkColor; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@protocol DTTransactionDelegate; +@class DTTransactionOptions; +@class UIViewController; + +/// Use this class to start a transaction with a mobileToken that has previously been initialized +/// with a server-to-server init call. This class is the main class to start any operation with the SDK. +/// After the transaction has been completed - regardless if successful or not - delegate will +/// be called with some basic information about the success or failure. +SWIFT_CLASS_NAMED("Transaction") +@interface DTTransaction : NSObject +/// This delegate will be notified after a transaction has been finished, +/// successfully or not. +@property (nonatomic, weak) id _Nullable delegate; +/// The available options for how a transaction is handled by the mobile SDK. +@property (nonatomic, strong) DTTransactionOptions * _Nonnull options; +/// The theme to be used by the SDK. +@property (nonatomic, strong) DTThemeConfiguration * _Nonnull theme; +/// Use this init method to start the SDK with a mobile token obtained after a server-to-server init +/// call. After this class is initialized, you should define its delegate, the options properties +/// and a theme if desired. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken OBJC_DESIGNATED_INITIALIZER; +/// Use this init method to start the SDK with a mobile token just like in init(mobileToken:) +/// and the provided card for the transaction. For this to work, you can only +/// send one payment method in your server-to-server init call. Use this init method if +/// you use your own UI fields for the card information. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +/// \param card Card object used for the transaction. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken card:(DTCard * _Nonnull)card OBJC_DESIGNATED_INITIALIZER; +/// Use this init method to start the SDK with a mobile token obtained after a server-to-server init +/// call and display the selection of one or more saved tokens. The user will then be able to click +/// on their desired saved token to finalize the payment. +/// \param mobileToken The mobileToken that has previously +/// been initialized with a server-to-server init call. +/// +/// \param paymentMethodTokens Specify here the tokens that are +/// available for selection to the user. +/// +- (nonnull instancetype)initWithMobileToken:(NSString * _Nonnull)mobileToken paymentMethodTokens:(NSArray * _Nonnull)paymentMethodTokens OBJC_DESIGNATED_INITIALIZER; +/// Starts the SDK and displays any needed user interface using the +/// provided presentingController. Note that a transaction +/// can only be started once. +/// \param presentingController UIViewController +/// 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. +- (void)didHandleError:(NSError * _Nonnull)error; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +@class DTTransactionSuccess; +@class DTTransactionError; + +/// Implement TransactionDelegate to be notified when a transaction +/// ends. TransactionDelegate will notify you about the success, error +/// or cancel state of the processed transaction. +SWIFT_PROTOCOL_NAMED("TransactionDelegate") +@protocol DTTransactionDelegate +/// This is called after a transaction has been successfully +/// completed. This callback provides details about the transaction. +/// \param transaction The object containing the information +/// of the completed transaction. +/// +/// \param result The object including the information related +/// to the transaction success. +/// +- (void)transactionDidFinish:(DTTransaction * _Nonnull)transaction result:(DTTransactionSuccess * _Nonnull)result; +/// This is called after a transaction fails or encounters an error. +/// Keep in mind that the SDK shows the error to the user before +/// this is invoked. Therefore, this callback can be used to cancel +/// any on-going process involving the transaction. +/// You may also use the error details provided here and display it +/// the way you want when suppressing the error message within +/// the TransactionOptions. +/// \param transaction The object containing the information +/// of the failed transaction. +/// +/// \param error The error that occurred. +/// +- (void)transactionDidFail:(DTTransaction * _Nonnull)transaction error:(DTTransactionError * _Nonnull)error; +@optional +/// This is called after a transaction has been cancelled. This callback +/// can be used to cancel any on-going process involving the transaction. +/// Some payment methods - such as Twint that involves an app-switch - +/// also call this method when a payment error or decline occurs, to +/// prevent showing an error dialog twice, as an error is already +/// displayed in the payment application. +/// \param transaction The object containing the +/// information of the cancelled transaction. +/// +- (void)transactionDidCancel:(DTTransaction * _Nonnull)transaction; +@end + +@class NSNumber; +@class NSCoder; + +/// This class includes the error message and other details of a transaction. +SWIFT_CLASS_NAMED("TransactionError") +@interface DTTransactionError : NSError +/// The payment method used during the transaction. +/// This is for use from Objective-C only. This property wraps the +/// rawValue of a DTPaymentMethodType in an NSNumber. +@property (nonatomic, readonly, strong) NSNumber * _Nullable paymentMethodType; +/// The identifier of the failed transaction +@property (nonatomic, readonly, copy) NSString * _Nullable transactionId; +/// Refer to the NSCopying protocol +- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code userInfo:(NSDictionary * _Nullable)dict OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class can be used to specify miscellaneous options related to the transaction. +SWIFT_CLASS_NAMED("TransactionOptions") +@interface DTTransactionOptions : NSObject +/// Your unique URL scheme to be used by other apps (e.g. Twint) +/// to return to the merchant app. +@property (nonatomic, copy) NSString * _Nullable appCallbackScheme; +/// Specify the ApplePayConfig 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 String. +/// Properties are sent along with the transaction requests and +/// posted to the merchant’s PostURL. +@property (nonatomic, copy) NSDictionary * _Nullable merchantProperties; +/// Use this setting to display or hide critical and transaction errors. +@property (nonatomic) BOOL suppressTransactionErrorDialog; +/// Use this setting to switch from production to sandbox. If not specified, +/// the SDK will call the Datatrans production environment. +@property (nonatomic) BOOL testing; +/// Whether secure connections to datatrans servers require a certificate +/// chain signed with a specific CA private key. The device’s trust settings +/// are explicitly ignored, i.e. custom installed/white-listed certificates +/// and/or CAs will not work. +/// Please be advised that enabling this option will break your app in many +/// corporate networks with anti-malware/-theft/-espionage SSL proxying. +@property (nonatomic) BOOL useCertificatePinning; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// This class includes the success message and other details of a transaction. +/// You will also obtain a transactionId that you can use for operations +/// after the transaction (e.g. settlement, cancel or refund requests). +SWIFT_CLASS_NAMED("TransactionSuccess") +@interface DTTransactionSuccess : NSObject +/// The payment method used during the transaction. +@property (nonatomic, readonly) enum DTPaymentMethodType paymentMethodType; +/// Object containing the token details of the payment method. +/// The token details are also returned to your webhook and can +/// be accessed with a status server-to-server request. +@property (nonatomic, readonly, strong) DTPaymentMethodToken * _Nullable paymentMethodToken; +/// The transactionId that you can use for operations after the +/// transaction (eg. settlement, cancel or refund requests). +@property (nonatomic, readonly, copy) NSString * _Nonnull transactionId; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans.h b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans.h new file mode 100644 index 0000000..0dfb87e --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Headers/Datatrans.h @@ -0,0 +1,66 @@ +// +// Datatrans.h +// Datatrans +// +// Created by Patrick Fompeyrine on 13.10.20. +// + +#import + +//! Project version number for Datatrans. +FOUNDATION_EXPORT double DatatransVersionNumber; + +//! Project version string for Datatrans. +FOUNDATION_EXPORT const unsigned char DatatransVersionString[]; + +#import + +// Private +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Info.plist b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Info.plist new file mode 100644 index 0000000..02636e9 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Info.plist differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftdoc new file mode 100644 index 0000000..5193a78 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftinterface new file mode 100644 index 0000000..4d9cc00 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -0,0 +1,258 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +// 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 Combine +@_exported import Datatrans +import Foundation +import PassKit +import SafariServices +import Swift +import UIKit +import WebKit +@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError { + public var paymentMethodType: Datatrans.PaymentMethodType? { + get + } + @objc(paymentMethodType) public var paymentMethodTypeObjc: Foundation.NSNumber? { + @objc get + } + @objc public var transactionId: Swift.String? { + get + } + @objc override dynamic public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init(domain: Swift.String, code: Swift.Int, userInfo dict: [Swift.String : Any]? = nil) + @objc required dynamic public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc(DTTransactionDelegate) public protocol TransactionDelegate : AnyObject { + @objc func transactionDidFinish(_ transaction: Datatrans.Transaction, result: Datatrans.TransactionSuccess) + @objc func transactionDidFail(_ transaction: Datatrans.Transaction, error: Datatrans.TransactionError) + @objc optional func transactionDidCancel(_ transaction: Datatrans.Transaction) +} +@_hasMissingDesignatedInitializers @objc(DTCard) @objcMembers public class Card : Datatrans.PaymentMethod { + @objc public var number: Swift.String + @objc public var expiryDate: Datatrans.CardExpiryDate + @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 deinit + @objc override public init(type: Datatrans.PaymentMethodType) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTRekaToken) @objcMembers public class RekaToken : Datatrans.CardToken { + @objc convenience public init(token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @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?) +} +@_inheritsConvenienceInitializers @objc(DTTransactionOptions) @objcMembers public class TransactionOptions : ObjectiveC.NSObject { + @objc public var appCallbackScheme: Swift.String? + @objc public var applePayConfig: Datatrans.ApplePayConfig? + @objc public var merchantProperties: [Swift.String : Swift.String]? + @objc public var suppressTransactionErrorDialog: Swift.Bool + @objc public var testing: Swift.Bool + @objc public var useCertificatePinning: Swift.Bool + @objc deinit + @objc override dynamic public init() +} +@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int { + case Visa + case MasterCard + case DinersClub + case AmericanExpress + case JCB + case MyOne + case UATP + case Discover + case Supercard + case PostFinanceCard + case PostFinanceEFinance + case PayPal + case Easypay + case SEPA + case SwissBilling + case Twint + case ApplePay + case Reka + case Byjuno + case SwissPass + case Powerpay + case Paysafecard + public typealias RawValue = Swift.Int + public var rawValue: Swift.Int { + get + } + public init?(rawValue: Swift.Int) +} +@objc(DTTransaction) public class Transaction : ObjectiveC.NSObject, Datatrans.DTErrorHandlerDelegate { + @objc weak public var delegate: Datatrans.TransactionDelegate? + @objc public var options: Datatrans.TransactionOptions + @objc public var theme: Datatrans.ThemeConfiguration + @objc public init(mobileToken: Swift.String) + @objc public init(mobileToken: Swift.String, card: Datatrans.Card) + @objc public init(mobileToken: Swift.String, paymentMethodTokens: [Datatrans.PaymentMethodToken]) + @objc public func start(presentingController: UIKit.UIViewController) + @objc public func didHandleError(_ error: Swift.Error) + @objc deinit + @objc override dynamic public init() +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTSEPAToken) @objcMembers public class SEPAToken : Datatrans.PaymentMethodToken { + @objc public var bankCode: Swift.String? { + @objc get + } + @objc override public var token: Swift.String { + @objc get + @objc set + } + @objc convenience public init(token: Swift.String) + @objc convenience public init(token: Swift.String, bankCode: Swift.String) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) @objcMembers public class PaymentMethodTypeMapper : ObjectiveC.NSObject { + @objc public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType + @objc public static func toIdentifier(type: Datatrans.PaymentMethodType) -> Swift.String + @objc deinit + @objc override dynamic public init() +} +@_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 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?) +} +@_inheritsConvenienceInitializers @objc(DTThemeConfiguration) @objcMembers public class ThemeConfiguration : ObjectiveC.NSObject { + @objc public var barBackgroundColor: UIKit.UIColor? + @objc public var barLinkColor: UIKit.UIColor? + @objc public var barTitleColor: UIKit.UIColor? + @objc public var buttonColor: UIKit.UIColor? + @objc public var buttonTextColor: UIKit.UIColor? + @objc public var linkColor: UIKit.UIColor? + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTTransactionSuccess) @objcMembers public class TransactionSuccess : ObjectiveC.NSObject { + @objc public var paymentMethodType: Datatrans.PaymentMethodType { + @objc get + } + @objc public var paymentMethodToken: Datatrans.PaymentMethodToken? { + @objc get + } + @objc public var transactionId: Swift.String { + @objc get + } + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTCardToken) @objcMembers public class CardToken : Datatrans.PaymentMethodToken { + @objc public var cardExpiryDate: Datatrans.CardExpiryDate? { + get + } + @objc public var maskedCardNumber: Swift.String? { + get + } + @objc public var cardholder: Swift.String? + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func isValid() -> Swift.Bool + override public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @objc deinit +} +@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : ObjectiveC.NSObject, Foundation.NSCopying { + @objc weak public var delegate: Datatrans.DTApplePayDelegate? + @objc public var finalSummaryItemLabel: Swift.String? + @objc public var request: PassKit.PKPaymentRequest { + get + } + @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 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 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 override dynamic public init() + @objc deinit +} +@objc(DTCardExpiryDate) @objcMembers public class CardExpiryDate : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCopying { + @objc public var month: Swift.Int { + @objc get + @objc set + } + @objc public var year: Swift.Int { + @objc get + @objc set + } + @objc public init(month: Swift.Int, year: Swift.Int) + required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPaymentMethodToken) @objcMembers public class PaymentMethodToken : Datatrans.PaymentMethod { + @objc public var token: Swift.String + @objc public var displayTitle: Swift.String { + @objc get + } + @objc public var accessibilityTitle: Swift.String? { + @objc get + } + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @available(iOS 13.0, *) + public class func create(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 func isValid() -> Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType) + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPayPalToken) @objcMembers public class PayPalToken : Datatrans.PaymentMethodToken { + @objc public var payPalEmail: Swift.String? + @objc public init(token: Swift.String, payPalEmail: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +extension Datatrans.PaymentMethodType : Swift.Equatable {} +extension Datatrans.PaymentMethodType : Swift.Hashable {} +extension Datatrans.PaymentMethodType : Swift.RawRepresentable {} diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftdoc b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftdoc new file mode 100644 index 0000000..5193a78 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftdoc differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftinterface b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftinterface new file mode 100644 index 0000000..4d9cc00 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/Datatrans.swiftmodule/x86_64.swiftinterface @@ -0,0 +1,258 @@ +// swift-interface-format-version: 1.0 +// swift-compiler-version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) +// 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 Combine +@_exported import Datatrans +import Foundation +import PassKit +import SafariServices +import Swift +import UIKit +import WebKit +@_inheritsConvenienceInitializers @objc(DTTransactionError) public class TransactionError : Foundation.NSError { + public var paymentMethodType: Datatrans.PaymentMethodType? { + get + } + @objc(paymentMethodType) public var paymentMethodTypeObjc: Foundation.NSNumber? { + @objc get + } + @objc public var transactionId: Swift.String? { + get + } + @objc override dynamic public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init(domain: Swift.String, code: Swift.Int, userInfo dict: [Swift.String : Any]? = nil) + @objc required dynamic public init?(coder: Foundation.NSCoder) + @objc deinit +} +@objc(DTTransactionDelegate) public protocol TransactionDelegate : AnyObject { + @objc func transactionDidFinish(_ transaction: Datatrans.Transaction, result: Datatrans.TransactionSuccess) + @objc func transactionDidFail(_ transaction: Datatrans.Transaction, error: Datatrans.TransactionError) + @objc optional func transactionDidCancel(_ transaction: Datatrans.Transaction) +} +@_hasMissingDesignatedInitializers @objc(DTCard) @objcMembers public class Card : Datatrans.PaymentMethod { + @objc public var number: Swift.String + @objc public var expiryDate: Datatrans.CardExpiryDate + @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 deinit + @objc override public init(type: Datatrans.PaymentMethodType) +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTRekaToken) @objcMembers public class RekaToken : Datatrans.CardToken { + @objc convenience public init(token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @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?) +} +@_inheritsConvenienceInitializers @objc(DTTransactionOptions) @objcMembers public class TransactionOptions : ObjectiveC.NSObject { + @objc public var appCallbackScheme: Swift.String? + @objc public var applePayConfig: Datatrans.ApplePayConfig? + @objc public var merchantProperties: [Swift.String : Swift.String]? + @objc public var suppressTransactionErrorDialog: Swift.Bool + @objc public var testing: Swift.Bool + @objc public var useCertificatePinning: Swift.Bool + @objc deinit + @objc override dynamic public init() +} +@objc(DTPaymentMethodType) public enum PaymentMethodType : Swift.Int { + case Visa + case MasterCard + case DinersClub + case AmericanExpress + case JCB + case MyOne + case UATP + case Discover + case Supercard + case PostFinanceCard + case PostFinanceEFinance + case PayPal + case Easypay + case SEPA + case SwissBilling + case Twint + case ApplePay + case Reka + case Byjuno + case SwissPass + case Powerpay + case Paysafecard + public typealias RawValue = Swift.Int + public var rawValue: Swift.Int { + get + } + public init?(rawValue: Swift.Int) +} +@objc(DTTransaction) public class Transaction : ObjectiveC.NSObject, Datatrans.DTErrorHandlerDelegate { + @objc weak public var delegate: Datatrans.TransactionDelegate? + @objc public var options: Datatrans.TransactionOptions + @objc public var theme: Datatrans.ThemeConfiguration + @objc public init(mobileToken: Swift.String) + @objc public init(mobileToken: Swift.String, card: Datatrans.Card) + @objc public init(mobileToken: Swift.String, paymentMethodTokens: [Datatrans.PaymentMethodToken]) + @objc public func start(presentingController: UIKit.UIViewController) + @objc public func didHandleError(_ error: Swift.Error) + @objc deinit + @objc override dynamic public init() +} +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(DTSEPAToken) @objcMembers public class SEPAToken : Datatrans.PaymentMethodToken { + @objc public var bankCode: Swift.String? { + @objc get + } + @objc override public var token: Swift.String { + @objc get + @objc set + } + @objc convenience public init(token: Swift.String) + @objc convenience public init(token: Swift.String, bankCode: Swift.String) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +@_inheritsConvenienceInitializers @objc(DTPaymentMethodTypeMapper) @objcMembers public class PaymentMethodTypeMapper : ObjectiveC.NSObject { + @objc public static func toType(identifier: Swift.String) -> Datatrans.PaymentMethodType + @objc public static func toIdentifier(type: Datatrans.PaymentMethodType) -> Swift.String + @objc deinit + @objc override dynamic public init() +} +@_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 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?) +} +@_inheritsConvenienceInitializers @objc(DTThemeConfiguration) @objcMembers public class ThemeConfiguration : ObjectiveC.NSObject { + @objc public var barBackgroundColor: UIKit.UIColor? + @objc public var barLinkColor: UIKit.UIColor? + @objc public var barTitleColor: UIKit.UIColor? + @objc public var buttonColor: UIKit.UIColor? + @objc public var buttonTextColor: UIKit.UIColor? + @objc public var linkColor: UIKit.UIColor? + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTTransactionSuccess) @objcMembers public class TransactionSuccess : ObjectiveC.NSObject { + @objc public var paymentMethodType: Datatrans.PaymentMethodType { + @objc get + } + @objc public var paymentMethodToken: Datatrans.PaymentMethodToken? { + @objc get + } + @objc public var transactionId: Swift.String { + @objc get + } + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTCardToken) @objcMembers public class CardToken : Datatrans.PaymentMethodToken { + @objc public var cardExpiryDate: Datatrans.CardExpiryDate? { + get + } + @objc public var maskedCardNumber: Swift.String? { + get + } + @objc public var cardholder: Swift.String? + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String, cardExpiryDate: Datatrans.CardExpiryDate?, maskedCardNumber: Swift.String?, cardholder: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + @objc override public func isValid() -> Swift.Bool + override public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @objc deinit +} +@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : ObjectiveC.NSObject, Foundation.NSCopying { + @objc weak public var delegate: Datatrans.DTApplePayDelegate? + @objc public var finalSummaryItemLabel: Swift.String? + @objc public var request: PassKit.PKPaymentRequest { + get + } + @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 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 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 override dynamic public init() + @objc deinit +} +@objc(DTCardExpiryDate) @objcMembers public class CardExpiryDate : ObjectiveC.NSObject, Swift.Codable, Foundation.NSCopying { + @objc public var month: Swift.Int { + @objc get + @objc set + } + @objc public var year: Swift.Int { + @objc get + @objc set + } + @objc public init(month: Swift.Int, year: Swift.Int) + required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: Swift.Encoder) throws + @objc override dynamic public var description: Swift.String { + @objc get + } + @objc public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override dynamic public init() + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPaymentMethodToken) @objcMembers public class PaymentMethodToken : Datatrans.PaymentMethod { + @objc public var token: Swift.String + @objc public var displayTitle: Swift.String { + @objc get + } + @objc public var accessibilityTitle: Swift.String? { + @objc get + } + @objc public init(type: Datatrans.PaymentMethodType, token: Swift.String) + @available(iOS 13.0, *) + public class func create(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 func isValid() -> Swift.Bool + @objc override dynamic public var description: Swift.String { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc override public init(type: Datatrans.PaymentMethodType) + @objc deinit +} +@_hasMissingDesignatedInitializers @objc(DTPayPalToken) @objcMembers public class PayPalToken : Datatrans.PaymentMethodToken { + @objc public var payPalEmail: Swift.String? + @objc public init(token: Swift.String, payPalEmail: Swift.String?) + @objc override public var displayTitle: Swift.String { + @objc get + } + @objc override public var accessibilityTitle: Swift.String? { + @objc get + } + override public func encode(to encoder: Swift.Encoder) throws + @objc override public func copy(with zone: ObjectiveC.NSZone? = nil) -> Any + @objc deinit + @objc override public init(type: Datatrans.PaymentMethodType, token: Swift.String) +} +extension Datatrans.PaymentMethodType : Swift.Equatable {} +extension Datatrans.PaymentMethodType : Swift.Hashable {} +extension Datatrans.PaymentMethodType : Swift.RawRepresentable {} diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/module.modulemap b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/module.modulemap new file mode 100644 index 0000000..b168fd7 --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module Datatrans { + umbrella header "Datatrans.h" + + export * + module * { export * } +} + +module Datatrans.Swift { + header "Datatrans-Swift.h" + requires objc +} diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/_CodeSignature/CodeResources b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..2f8759b --- /dev/null +++ b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/_CodeSignature/CodeResources @@ -0,0 +1,823 @@ + + + + + files + + Assets.car + + OgB4DM92jyEQ/AT4o1fsDxGmPSI= + + Headers/CardIOCreditCardInfo.h + + 6pDBO5GtU9yybwZAdebzVuHjV0Y= + + Headers/CardIODetectionMode.h + + 0VmZRU+jbPoq+dozCwt2ARRFFdM= + + Headers/CardIOUtilities.h + + s7GTGd5u5RMS8MyUP1UqvU/Q3Lo= + + Headers/CardIOView.h + + hKa4klLYb8yNbBH8LsiSkg0WSqQ= + + Headers/CardIOViewDelegate.h + + ErycEG6ibtqP9cC437R4xIPQEQc= + + Headers/DTAddress.h + + ma7oWGGHGW5pQSc4yNOepokWMMQ= + + Headers/DTAliasPaymentAuthorizationRequest.h + + 4deL0vbTV6BJ7rF2ROGBbI1k26U= + + Headers/DTAliasRequest+Internal.h + + gz9cWV0vWiDfklDVYZvGKsmJpGU= + + Headers/DTAliasRequest.h + + /bfcm6bV3rhVoDKo8ecmZLiQCdI= + + Headers/DTAliasRequestResponse.h + + nmHFbNnmNkTlB3MrbCyygolPpk8= + + Headers/DTApplePayDelegate.h + + VYPKcQEGEDY5cP77sPJdzooeFlY= + + Headers/DTApplePayProcess.h + + ajOms/h2AnN3bKNxCdQbdLnLT3A= + + Headers/DTAuthorizationRequestResponse.h + + YtPCAMMBkAIuenk0dcjYTg7pEbA= + + Headers/DTBasketItem.h + + nSt4Ycvq/OOuoPAKeae4blgP22I= + + Headers/DTByjunoPaymentInfo.h + + Qd31MINUYZuGXgiMwVQDd7aZFv0= + + Headers/DTCustomer.h + + soufWGz8VhgXyCsqKCEuiTw9k2w= + + Headers/DTDate.h + + n+qIT65wp3Oa80vqdFhr3xJqxss= + + Headers/DTErrorHandler.h + + wD1fGf7TksxF17Hj9qdx3iIYeRs= + + Headers/DTErrorHandlerDelegate.h + + 3SgWC/Xrl1YC9iVFOC1Gg0wOUac= + + Headers/DTErrorPresenter.h + + exKW2d3fdPyoHEBm5cq4thStX1g= + + Headers/DTExternalWebAppDelegateProxy.h + + M9mLhsjN3/rUHW586bAuPUht2u4= + + Headers/DTFakePaymentRequestFactory.h + + s9HhCrj+nNOnpLLQOZUee6aupEs= + + Headers/DTInitialTransaction.h + + 7dmfAwxmqgfV8PmX+IqoCo4C5Nw= + + Headers/DTInitialTransactionProcess.h + + dkIz9wQgHKk7q33NIlFVyksY0H4= + + Headers/DTLoaderPresenter.h + + 9zjNpJgify+1vN+fdqAH1XNNnd0= + + Headers/DTLockScreenPresenter.h + + Pzt/HHswNKXWVaViPj3LSRr1N3U= + + Headers/DTNetworking.h + + 39bklEpGv7ggmDAlZfEeK/7ySDQ= + + Headers/DTPPRiskComponentManager.h + + RoYi7erzl9RUrMmcPvatHFnux9w= + + Headers/DTPaymentAuthorizationRequest.h + + dg9ih5GGYFMmejLIwoWstaZC3mw= + + Headers/DTPaymentMethodIdentifiers.h + + gWl+WfvJ1aZurVTdZb2iYqj/xO0= + + Headers/DTPaymentMethodInfo.h + + wy2IxH+o/zVUMiRaQKTdMmJXUaM= + + Headers/DTPaymentModel.h + + F+FRmsYw/Q0/fbDMZ7FaU4Vh3Ng= + + Headers/DTPaymentOptions.h + + gwPJDRbySmUWky5ZNxuDLj4mf84= + + Headers/DTPaymentRequest.h + + N4mPN0UO/LiKGwvSu2gXNT/sYJA= + + Headers/DTPostFinanceRequestHandler.h + + shzOsEScBEg6/YgDXO7Ab8fmc9k= + + Headers/DTResources.h + + 7N59FX+AuD8WNkMOy7OaHfxV5cw= + + Headers/DTResponse.h + + D/xvYFs1d/M/D99u15rUbCXo/5Y= + + Headers/DTStartTokenRequestResponse.h + + mhstRRhgSIfXA57yV4PSQRczu8A= + + Headers/DTStatusRequestResponse.h + + c5eLWkTKXr0Ue1ISv3vSqAx+CyU= + + Headers/DTSwissBillingPaymentInfo.h + + /8vit4Li+AY/j8GssZFOOexzCcs= + + Headers/DTSwissPassPaymentInfo.h + + z3fhJKMn5hXgIV/icxbzBtoyE8g= + + Headers/DTTransactionModel.h + + P6OG+Ax6ufV0KXGdi+fciNo/F5w= + + Headers/DTTwintProcess.h + + 7RjkA9ddoPl+t4Tu/N46pbm8v+8= + + Headers/DTUrls.h + + msW9DHCoqWkr/zkkokZruRlwjrk= + + Headers/DTVersion.h + + k8FwFNi89ECtz6QDD8iJdDOGSx4= + + Headers/DTWebCallbackUrls.h + + g7fkjDL49jLQX4Jr/WBcvHkCZEU= + + Headers/DTWebCallbacks.h + + TDFMHZm4ITfw/CPTpvp961n/BLk= + + Headers/DTWebProcess.h + + Bx8OOqfSGrp9TkscYt8L4+2TCM0= + + Headers/DTWebRequestFactory.h + + kbUgUMxiRSKZ80WSsp2yy/OkcO8= + + Headers/Datatrans-Swift.h + + 79TTv8Pg7kUXFgMjMNTQ47XZATQ= + + Headers/Datatrans.h + + A6WS+W7ZtBTDfp7/uCaZROumeck= + + Info.plist + + iOOppqPOh1CgYZrSnKwJ3JugGYM= + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + f8uJ2x1Rijf4qWDPTQoEGxNXKWM= + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + GIkjjsO1lRMGRHXT8kaObw5+f1U= + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + McGrpkD2/aeAO5TP/wD3zhMpOQ0= + + Modules/Datatrans.swiftmodule/x86_64.swiftdoc + + f8uJ2x1Rijf4qWDPTQoEGxNXKWM= + + Modules/Datatrans.swiftmodule/x86_64.swiftinterface + + GIkjjsO1lRMGRHXT8kaObw5+f1U= + + Modules/Datatrans.swiftmodule/x86_64.swiftmodule + + McGrpkD2/aeAO5TP/wD3zhMpOQ0= + + Modules/module.modulemap + + sse55gfJDLdTUwZp/G1e3H7oNHc= + + de.lproj/Localizable.strings + + hash + + dnzZ+sAdjSlHLX9AiOWgG+5PHp0= + + optional + + + en.lproj/Localizable.strings + + hash + + D58z+X6tWTTOjlcxwFduUgm7p+A= + + optional + + + fr.lproj/Localizable.strings + + hash + + Iia8lg/3jMeH320f+7jIIPga7Y0= + + optional + + + it.lproj/Localizable.strings + + hash + + p5ienwebhyVzelGdkfI4aMC+W90= + + optional + + + + files2 + + Assets.car + + hash2 + + 91ycfmm3oaVvStZJZu5vesX88FV6g65Y/SUOBj5vCPc= + + + Headers/CardIOCreditCardInfo.h + + hash2 + + aIwL6ZgUCrIivM45vsDt+1zTihbPexpNwm3RqXYXOSE= + + + Headers/CardIODetectionMode.h + + hash2 + + fC12oI4r4HV5kKrrN+E3x3LL/W3gyl80aWcWUzPazhE= + + + Headers/CardIOUtilities.h + + hash2 + + hyQX6DSByYOoJIJhsLxluo8da1jbhdIXNs0SefqSt2U= + + + Headers/CardIOView.h + + hash2 + + cT3XFy2MSeRaCWbkNhgqjrBQOdIz37SzPD5Xpv1+VCo= + + + Headers/CardIOViewDelegate.h + + hash2 + + SMq+iIc0WjFFFGTdic+azEdrRiJjKI2OgzmHEVUIk/s= + + + Headers/DTAddress.h + + hash2 + + P04EMDaXK/oURKkEEfE7cIpBVXTYWjBPMvuW/IUUDgQ= + + + Headers/DTAliasPaymentAuthorizationRequest.h + + hash2 + + LD4anpAETjxcvrtVopjPE+ueVNjRoVCeRToWjQ06qcs= + + + Headers/DTAliasRequest+Internal.h + + hash2 + + jXH+s6IxMbW2xhncTSQi5yfJ2jWDK1A90Gv+jfgAyCc= + + + Headers/DTAliasRequest.h + + hash2 + + c1hH9Stb4itJfgKDKORFTN0HRezznKK9G8/maI+XG7M= + + + Headers/DTAliasRequestResponse.h + + hash2 + + zVJQnWM212vJ0FsC6IFPh9FbCIhg7TQSXO8bjj0JUIg= + + + Headers/DTApplePayDelegate.h + + hash2 + + zhpmHzEkuXbsFgnIXy88pWx6Wp1MECkCzUNvKTWoFMs= + + + Headers/DTApplePayProcess.h + + hash2 + + HOVTTnSQQ1fdZI++TdJrVcnXuFW3btWYTiAcn+l712I= + + + Headers/DTAuthorizationRequestResponse.h + + hash2 + + HatI34MuxST4ZfORoKd8iD7tQM7ZekeoOZOM8O81cW0= + + + Headers/DTBasketItem.h + + hash2 + + 1l/06BXAP5KhGgQy+OnYhVqDhRiAzaeEecAAHsmJY84= + + + Headers/DTByjunoPaymentInfo.h + + hash2 + + 10I9mYGDZNn0vfAm7ScFXWJQWwg5zB6viDqHSkwLBI8= + + + Headers/DTCustomer.h + + hash2 + + RomD49i46EZQ/7BfaODFnGpkiU0OvTtjWRpy0cwSHsg= + + + Headers/DTDate.h + + hash2 + + HfpE+PW3+U3LSH8FMhQScOPQ27IDRxYa2++Pbu795jM= + + + Headers/DTErrorHandler.h + + hash2 + + XMYcgYVjDZtCD3LOcJ2pvHIunDoYb11AlULNaz65Ubw= + + + Headers/DTErrorHandlerDelegate.h + + hash2 + + 3dCSfRywASdWGGx7spMXdvCQFDBI7NghIN/v4B0y0yk= + + + Headers/DTErrorPresenter.h + + hash2 + + J957M4yEufoHr63oz6EbGQQA7pfLeZvStUMw/cZ28Q0= + + + Headers/DTExternalWebAppDelegateProxy.h + + hash2 + + jgFk7sRKidLV0Ucqi1eRNH0BrPU7zpzDPdL+O+vOmw0= + + + Headers/DTFakePaymentRequestFactory.h + + hash2 + + +C+A39+7UsqKRxG43Y+6nEIAiMOizwvvNNyF+VTCNx4= + + + Headers/DTInitialTransaction.h + + hash2 + + SnFuIWlNgpp1smAqs7m/UyoDTKjPQA2/GUG/sz0ltr4= + + + Headers/DTInitialTransactionProcess.h + + hash2 + + v3KNt3TOcPPKVTjI/WzMzuos8pgL0Kwr9/jQ/nJXUzk= + + + Headers/DTLoaderPresenter.h + + hash2 + + oSOpG+wYVokzpw5//6NuY45WsKrzKCROz+v5vWIQ/0k= + + + Headers/DTLockScreenPresenter.h + + hash2 + + cg8w8eMjpDx/m03S4gh3nRduQZ0GTKt1aaRNodexMQQ= + + + Headers/DTNetworking.h + + hash2 + + zn9vHOdNUkTBrQ99SoBT+B3I7gRH+6wDRHdHco1bgTs= + + + Headers/DTPPRiskComponentManager.h + + hash2 + + 9okglcu3+roGoKO3WbrwCK3tVaWKuhq83PeSL2KBw9g= + + + Headers/DTPaymentAuthorizationRequest.h + + hash2 + + mi+xRDkFVaAjfSss9dfviv1sQG+2u1qDAr+i/CbVul0= + + + Headers/DTPaymentMethodIdentifiers.h + + hash2 + + RK8XFbjV4wih3LEW+b/T2KA5paRQ1Ak3UvckyMo+y8M= + + + Headers/DTPaymentMethodInfo.h + + hash2 + + RgTRJxBZkqWGt3t+HixIihhA6D/3JnXvRZ87UQHHveg= + + + Headers/DTPaymentModel.h + + hash2 + + NWs6MfRgd8yafUiNLnPLiazuhwRK+Qjf79rp+cPnpUI= + + + Headers/DTPaymentOptions.h + + hash2 + + q+QsFCd0u5lqLDfWd29rWxBzRYCANoFDvO9p+QDmszI= + + + Headers/DTPaymentRequest.h + + hash2 + + 7Wuo35oq71MMsl+Ex8gDqXPpW+PHvhODiE1lXJfW+nA= + + + Headers/DTPostFinanceRequestHandler.h + + hash2 + + jylbXM+bJI5EmI5IKD/N+UoM3zdJfCU2Hvj66ScoYEI= + + + Headers/DTResources.h + + hash2 + + BoykztyS69kkL9RwTiUd5Q9/+F84RK+uykJkG+kcKBQ= + + + Headers/DTResponse.h + + hash2 + + 4YaMP42fUaDKYUTw7UYlR+EXCxfuQkrCOb25h+zgvA8= + + + Headers/DTStartTokenRequestResponse.h + + hash2 + + qu0LFxczRUft1az3p+zb5i3QW+987gog/OofiOeEmdI= + + + Headers/DTStatusRequestResponse.h + + hash2 + + ypq2VyXCUvGcLYfsQgnrRoB4s2LECTPIh4H4P9kd19E= + + + Headers/DTSwissBillingPaymentInfo.h + + hash2 + + 4zNOzv81J1aRIQE9+XamOX1hRXCB5RqfaSTKF59FDrE= + + + Headers/DTSwissPassPaymentInfo.h + + hash2 + + 5PdkUcgk+Rzn0cOwh3+CPMaThffSwt4LrfKW23BCg0A= + + + Headers/DTTransactionModel.h + + hash2 + + tUN0zIlVSnjRU/nlhRfOjp/gY6sTwV5yokH57W/wFQM= + + + Headers/DTTwintProcess.h + + hash2 + + LjBBOJmJjE8qpbj77U49lo22cPXTKmmsnzxxITGCzrw= + + + Headers/DTUrls.h + + hash2 + + enH9U95FFoUoO+bnF2sZfFNGWhX2n0+KlTC2cwWu1og= + + + Headers/DTVersion.h + + hash2 + + taG1Yw6eDQFaMeQ+CFmdVMwbfbTotH2ibtbG/FN4wk0= + + + Headers/DTWebCallbackUrls.h + + hash2 + + U1QCucU0uiLKwoYCn4YD1hM0poH7CbmdJTXgbzlY0Ow= + + + Headers/DTWebCallbacks.h + + hash2 + + qaNUdcuT8VrfMmoxMjRXuRz8RU6dnx4ySyRHwlGOVuw= + + + Headers/DTWebProcess.h + + hash2 + + R9OR1x5uQNDwPS/dyJv/oIfBiirmkM79/R66tjdLWOc= + + + Headers/DTWebRequestFactory.h + + hash2 + + hTI5F3uodGHfvIvUFDBqlDMzcovNCSoVWcNmdDucbGU= + + + Headers/Datatrans-Swift.h + + hash2 + + pYlD/LCOU+FtnqYRoMC8rvEkhg0QHQfuZk0iysd7kOg= + + + Headers/Datatrans.h + + hash2 + + XnDrXHtlTfu2MSjP9BQtJtaontAACh+T+U+aLZSNO5A= + + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftdoc + + hash2 + + KfHl5hwBc9GJ4zoKt0/uMx4u2VE07kLX4vVaxUBe5rE= + + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftinterface + + hash2 + + CjvnV2QS4wXz9PFqdPWo2euwYAsdS6YpzgodUFGxido= + + + Modules/Datatrans.swiftmodule/x86_64-apple-ios-simulator.swiftmodule + + hash2 + + h9tPf1W3YxwIzcD8z287FS6K25+mKGbL/JpdHZtvDKM= + + + Modules/Datatrans.swiftmodule/x86_64.swiftdoc + + hash2 + + KfHl5hwBc9GJ4zoKt0/uMx4u2VE07kLX4vVaxUBe5rE= + + + Modules/Datatrans.swiftmodule/x86_64.swiftinterface + + hash2 + + CjvnV2QS4wXz9PFqdPWo2euwYAsdS6YpzgodUFGxido= + + + Modules/Datatrans.swiftmodule/x86_64.swiftmodule + + hash2 + + h9tPf1W3YxwIzcD8z287FS6K25+mKGbL/JpdHZtvDKM= + + + Modules/module.modulemap + + hash2 + + 7p+OrvkdTNT8JtiV0n0N5IBDfhiyo+zyxBdAJEaJ9sA= + + + de.lproj/Localizable.strings + + hash2 + + ORZ2Pa6IlmR0W4N4oz+ifwng18os0kinw4fqhuNnW7A= + + optional + + + en.lproj/Localizable.strings + + hash2 + + HeS3rCJly7U6hj8bOmu7Xr9KGGANENgYFAhaGcUw0Ug= + + optional + + + fr.lproj/Localizable.strings + + hash2 + + SnAwVQBiEUSOkuWLGdgQqvfeD82mTOKrH56brPF/sbo= + + optional + + + it.lproj/Localizable.strings + + hash2 + + r3mvXj3o5Q6E3QReoGb5TPa0IlXwfyDxSNyhMzgY5xo= + + optional + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/de.lproj/Localizable.strings b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/de.lproj/Localizable.strings new file mode 100644 index 0000000..8559259 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/de.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/en.lproj/Localizable.strings b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/en.lproj/Localizable.strings new file mode 100644 index 0000000..d4379d2 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/en.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/fr.lproj/Localizable.strings b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/fr.lproj/Localizable.strings new file mode 100644 index 0000000..f231172 Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/fr.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/it.lproj/Localizable.strings b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/it.lproj/Localizable.strings new file mode 100644 index 0000000..1ae368e Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/it.lproj/Localizable.strings differ diff --git a/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/nl.lproj/Localizable.strings b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/nl.lproj/Localizable.strings new file mode 100644 index 0000000..36f044f Binary files /dev/null and b/Datatrans.xcframework/ios-x86_64-simulator/Datatrans.framework/nl.lproj/Localizable.strings differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f5699d8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,185 @@ + + +Datatrans iOS SDK uses code from the following open source libraries: + +- GData +- card.io +- OpenCV +- Eigen +- Code by Erica Sadun +- Code by Georg Kitz +- Lambda Alert +- TLCommon +- Openstack +- KeyboardLayoutGuide + + +Licenses: + +* GData (Apache 2.0 License) +GData.framework is developed by Google and licensed under the following Apache License: +_____________________________________________________________________ + +Copyright (c) 2007 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +____________________________________________________________________ + + +* card.io (MIT License) +Copyright (c) 2013-2015 eBay Software Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +* OpenCV (BSD License) +OpenCV is released under a BSD license, it is free for both academic and commercial use. +http://opensource.org/licenses/bsd-license.php + + +* Eigen (MPL2 License) +Eigen is Free Software. Starting from the 3.1.1 version, it is licensed under the MPL2, +which is a simple weak copyleft license. http://www.mozilla.org/MPL/2.0/ +“Covered Software” available at: http://eigen.tuxfamily.org/ + + +* Erica Sadun's iPhone Developer's Cookbook Code Samples and uidevice-extension categories (BSD License) +Copyright (c) 2012, Erica Sadun +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + +* George Kitz's UIDevice-with-UniqueIdentifier-for-iOS-5 (MIT License) +Copyright (C) 2012, Georg Kitz, @gekitz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +* Lambda Alert (MIT License) +Copyright (c) 2010–2011 Tomáš Znamenáček, + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +The software is provided “as is”, without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising from, +out of or in connection with the Software or the use or other dealings in +the Software. + + +* TLCommon (MIT License) +Copyright (c) <2009> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +* Openstack (Apache 2.0 License) +The OpenStack project is provided under the Apache 2.0 license. +http://www.apache.org/licenses/LICENSE-2.0.txt + +* KeyboardLayoutGuide (MIT License) +Copyright (c) 2017 S4cha + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..d06a661 --- /dev/null +++ b/Package.swift @@ -0,0 +1,17 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "Datatrans", + products: [ + .library( + name: "Datatrans", + targets: ["Datatrans"]), + ], + targets: [ + .binaryTarget( + name: "Datatrans", + path: "Datatrans.xcframework") + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..71c1c40 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# **Datatrans iOS SDK** +![Version](https://img.shields.io/badge/Version-1.0.0-5B728F) +[![License](https://img.shields.io/badge/License-Datatrans-lightgrey)](https://raw.githubusercontent.com/datatrans/ios-sdk/master/LICENSE) +[![Platform](https://img.shields.io/badge/platform-ios-0BAF73)](https://github.com/datatrans/ios-sdk) + +Accept payments on your iOS or Android apps: Our mobile SDKs support your entire payment and registration process and simplify the integration of any payment method in your mobile apps. Completely outsource your payment processes to us from inside your native apps. We also take care of redirecting your users to 3D Secure processes and enable smooth app-switches to other payment applications including PayPal, Twint, and PostFinance. + +## **Features** +**Easy Integration**: Integrate many of our payment methods easily to your iOS projects. Smart, modern and secure UI components to master online payments in your apps. + +**Card Scanner**: Let your customers scan their card information easily with our prebuilt card scanner. No time wasted with entering card information. + +**3DS 2.0 / SCA Ready**: The iOS SDK takes over the complexity of the 3DS process. We remain in charge of redirecting users whenever needed to the 3DS process of their bank and back to the SDK. + +**Smooth App-Switch**: Do you offer payment methods like Twint or PayPal that require the user to confirm the payment in a separate mobile app? The library switches smoothly to external apps and back to the SDK. + +**Tokens and Fast Checkouts**: Save your customers' payment information for later use and offer fast checkouts in your app. Delegate the token selection to the library. + +**Theme Support**: Style various items according to your corporate identity if needed. We also support the iOS dark theme. + +## **Requirements** +The Datatrans iOS SDK requires Xcode 12 or later and is compatible with apps targeting iOS 11 or above. + +## **Integration** +Get started with our [integration guide](https://docs.datatrans.ch/docs/mobile-sdk-2) and the [API reference](https://datatrans.github.io/ios-sdk/). diff --git a/docs/Classes/ApplePayConfig.html b/docs/Classes/ApplePayConfig.html new file mode 100644 index 0000000..b4c76ec --- /dev/null +++ b/docs/Classes/ApplePayConfig.html @@ -0,0 +1,402 @@ + + + + ApplePayConfig Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

ApplePayConfig

+
+
+ +
@objc(DTApplePayConfig)
+@objcMembers
+public class ApplePayConfig : NSObject, NSCopying
+ +
+
+

Configuration object for Apple Pay transactions.

+ +
+
+
+
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    Delegate object for callbacks during Apple Pay authorization

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public weak var delegate: DTApplePayDelegate?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + finalSummaryItemLabel + +
    +
    +
    +
    +
    +
    +

    Use this label to configure the final summary of the purchase. The default +label is “Total”, but you can also replace it with the name of your shop. +The string will then read: PAY YOURSHOP: XX.XX

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var finalSummaryItemLabel: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request object for further configuration of Apple Pay. Please refer to +the official Apple Pay documentation for more information.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var request: PKPaymentRequest { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + showLargeButton + +
    +
    +
    +
    +
    +
    +

    Use this option to show Apple Pay as a payment button instead of a +listed payment method.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var showLargeButton: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Although the library automatically hides Apple Pay if no cards are supported, +this shows if Apple Pay is available for the specified card acquirers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func hasApplePay(withSupportedNetworks supportedNetworks: [PKPaymentNetwork]) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + supportedNetworks + + +
    +

    Supported card acquirers.

    +
    +
    +
    +
    +

    Return Value

    +

    True if Apple Pay is available on the device, false if it is unavailable.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(merchantIdentifier: String, supportedNetworks: [PKPaymentNetwork], countryCode: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + merchantIdentifier + + +
    +

    The merchant Identifier for Apple Pay.

    +
    +
    + + supportedNetworks + + +
    +

    Supported card acquirers.

    +
    +
    + + countryCode + + +
    +

    Apple Pay country code

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Card.html b/docs/Classes/Card.html new file mode 100644 index 0000000..7acc79f --- /dev/null +++ b/docs/Classes/Card.html @@ -0,0 +1,344 @@ + + + + Card Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Card

+
+
+ +
@objc(DTCard)
+@objcMembers
+public class Card : PaymentMethod
+ +
+
+

Use this class to process raw card data for payments. You should use +this class if your app takes over the user interface for the card input fields.

+ +
+
+
+
    +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    Card number

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expiryDate + +
    +
    +
    +
    +
    +
    +

    Expiry date

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expiryDate: CardExpiryDate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cvv + +
    +
    +
    +
    +
    +
    +

    Card security code - nil if the card does not have a card security code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cvv: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cardholder + +
    +
    +
    +
    +
    +
    +

    Cardholder’s name

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cardholder: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this to initialize a card object with the card data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, number: String, expiryDate: CardExpiryDate, cvv: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + type + + +
    +

    Card type, e.g. Visa or Mastercard

    +
    +
    + + number + + +
    +

    Card number

    +
    +
    + + expiryDate + + +
    +

    Expiry date

    +
    +
    + + cvv + + +
    +

    Card security code - nil if the card does not have a card security code.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/CardExpiryDate.html b/docs/Classes/CardExpiryDate.html new file mode 100644 index 0000000..852a4e7 --- /dev/null +++ b/docs/Classes/CardExpiryDate.html @@ -0,0 +1,361 @@ + + + + CardExpiryDate Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

CardExpiryDate

+
+
+ +
@objc(DTCardExpiryDate)
+@objcMembers
+public class CardExpiryDate : NSObject, Codable, NSCopying
+ +
+
+

Class to be used to represent the card expiry date (month and year).

+ +
+
+
+
    +
  • +
    + + + + month + +
    +
    +
    +
    +
    +
    +

    Card expiry month, [1, 12], e.g. 1 for January or 12 for December

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var month: Int { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + year + +
    +
    +
    +
    +
    +
    +

    Card expiry year, 2 or 4 digits, e.g. 30 or 2030

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var year: Int { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(month:year:) + +
    +
    +
    +
    +
    +
    +

    Initializes the card expiry date with the given month and year.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(month: Int, year: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + month + + +
    +

    Card expiry month, [1, 12], e.g. 1 for January or 12 for December

    +
    +
    + + year + + +
    +

    Card expiry year, 2 or 4 digits, e.g. 30 or 2030

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Decodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public required init(from decoder: Decoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/CardToken.html b/docs/Classes/CardToken.html new file mode 100644 index 0000000..0564e2e --- /dev/null +++ b/docs/Classes/CardToken.html @@ -0,0 +1,488 @@ + + + + CardToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

CardToken

+
+
+ +
@objc(DTCardToken)
+@objcMembers
+public class CardToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a credit or debit card registration +from a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction or +to display a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful card payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + cardExpiryDate + +
    +
    +
    +
    +
    +
    +

    Expiry date

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var cardExpiryDate: CardExpiryDate? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + maskedCardNumber + +
    +
    +
    +
    +
    +
    +

    The masked card number you can use to display that specific card in your app. +The masked card number shows the first 6 digits and the last 4 digits of the card, +e.g. 432930xxxxxx6095.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var maskedCardNumber: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cardholder + +
    +
    +
    +
    +
    +
    +

    Cardholder’s name

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cardholder: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a CardToken object with the given card data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, token: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. Visa

    +
    +
    + + token + + +
    +

    This is the token for the card, also known as alias. +This can be used to debit the card without further customer interaction.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the first 6 +digits and the last 4 digits of the card, e.g. 432930xxxxxx6095.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title e.g. ‘•••• 6095’.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isValid() + +
    +
    +
    +
    +
    +
    +

    Checks if the expiration date is in the future or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func isValid() -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PayPalToken.html b/docs/Classes/PayPalToken.html new file mode 100644 index 0000000..e306e49 --- /dev/null +++ b/docs/Classes/PayPalToken.html @@ -0,0 +1,339 @@ + + + + PayPalToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PayPalToken

+
+
+ +
@objc(DTPayPalToken)
+@objcMembers
+public class PayPalToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a PayPal registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PayPal payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + payPalEmail + +
    +
    +
    +
    +
    +
    +

    PayPal e-mail address. This will be used for displaying purposes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var payPalEmail: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a PayPal payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(token: String, payPalEmail: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + token + + +
    +

    Token for a PayPal account.

    +
    +
    + + payPalEmail + + +
    +

    PayPal e-mail address. This will be used for displaying purposes.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PaymentMethod.html b/docs/Classes/PaymentMethod.html new file mode 100644 index 0000000..67e64c4 --- /dev/null +++ b/docs/Classes/PaymentMethod.html @@ -0,0 +1,297 @@ + + + + PaymentMethod Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethod

+
+
+ +
@objc(DTPaymentMethod)
+@objcMembers
+public class PaymentMethod : NSObject, Codable, NSCopying
+ +
+
+

This is the base class for payment methods. It contains a type to identify the +payment method, e.g. Visa or Mastercard.

+ +
+
+
+
    +
  • +
    + + + + type + +
    +
    +
    +
    +
    +
    +

    Payment method type, e.g. Visa

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let type: PaymentMethodType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(type:) + +
    +
    +
    +
    +
    +
    +

    This init method initializes a PaymentMethod object with the +payment method type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. Visa

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Decodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public required init(from decoder: Decoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PaymentMethodToken.html b/docs/Classes/PaymentMethodToken.html new file mode 100644 index 0000000..8397996 --- /dev/null +++ b/docs/Classes/PaymentMethodToken.html @@ -0,0 +1,519 @@ + + + + PaymentMethodToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodToken

+
+
+ +
@objc(DTPaymentMethodToken)
+@objcMembers
+public class PaymentMethodToken : PaymentMethod
+ +
+
+

This class is the base token class to gather token information and process +recurring payments or fast checkouts with any payment method. This class +is sufficient to process payments with tokens of some payment methods +(e.g. Twint). More complex payment methods require you to specify some +more details in their token subclasses (e.g. card payments, PostFinance, etc.). +Please refer to the list below to see if you need to call an additional token +subclass for your payments.

+ +
    +
  • Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +Apple Pay, Byjuno, SwissPass, Powerpay Invoice
  • +
  • Complex payment methods (requiring token subclass): Card payments, +PayPal, PostFinance, Reka
  • +
+ +

Please refer to the Datatrans documentation to see if you can register a +token during payment or require a dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + token + +
    +
    +
    +
    +
    +
    +

    The token that can be used to process recurring payments or fast checkouts.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var token: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(type:token:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, token: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. PayPal or Twint

    +
    +
    + + token + + +
    +

    The token that can be used to process recurring payments or fast checkouts.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + create(data:decoder:) + +
    +
    +
    +
    +
    +
    +

    Creates a PaymentMethodToken from encoded data using the given +decoder.

    + +

    Note that this function is only available from iOS 13. Earlier implementations +need to use create(jsonString:).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(iOS 13.0, *)
    +public class func create<T>(data: T.Input, decoder: T) -> PaymentMethodToken? where T : TopLevelDecoder
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    Encoded data, e.g. encoded by JSONEncoder

    +
    +
    + + decoder + + +
    +

    Decoder used for decoding the data, e.g. JSONDecoder

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + create(jsonString:) + +
    +
    +
    +
    +
    +
    +

    Creates a PaymentMethodToken from a JSON string.

    + +

    Note that this function should only be used for iOS 12 and earlier. Use +create(data:decoder:) for later versions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(iOS, deprecated: 13.0, message: "Use create(data:decoder:﹚ instead.")
    +public class func create(jsonString: String) -> PaymentMethodToken?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + jsonString + + +
    +

    String of JSON encoded data

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + isValid() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func isValid() -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PaymentMethodTypeMapper.html b/docs/Classes/PaymentMethodTypeMapper.html new file mode 100644 index 0000000..c364bd4 --- /dev/null +++ b/docs/Classes/PaymentMethodTypeMapper.html @@ -0,0 +1,243 @@ + + + + PaymentMethodTypeMapper Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodTypeMapper

+
+
+ +
@objc(DTPaymentMethodTypeMapper)
+@objcMembers
+public class PaymentMethodTypeMapper : NSObject
+ +
+
+

Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

+ +
+
+
+
    +
  • +
    + + + + toType(identifier:) + +
    +
    +
    +
    +
    +
    +

    This function returns the PaymentMethodType based on the Datatrans +payment method identifier.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func toType(identifier: String) -> PaymentMethodType
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + identifier + + +
    +

    The payment method identifier from Datatrans

    +
    +
    +
    +
    +

    Return Value

    +

    The payment method type, e.g. Visa

    +
    +
    +
    +
  • +
  • +
    + + + + toIdentifier(type:) + +
    +
    +
    +
    +
    +
    +

    This function returns the payment method identifier based on the +PaymentMethodType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func toIdentifier(type: PaymentMethodType) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + type + + +
    +

    The payment method type, e.g. Visa

    +
    +
    +
    +
    +

    Return Value

    +

    The payment method identifier

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PostFinanceCardToken.html b/docs/Classes/PostFinanceCardToken.html new file mode 100644 index 0000000..04ce926 --- /dev/null +++ b/docs/Classes/PostFinanceCardToken.html @@ -0,0 +1,257 @@ + + + + PostFinanceCardToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PostFinanceCardToken

+
+
+ +
@objc(DTPostFinanceCardToken)
+@objcMembers
+public class PostFinanceCardToken : CardToken
+ +
+
+

This class contains the token information about a PostFinance Card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PostFinance Card payment or +with a dedicated registration.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a PostFinance Card payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(token: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + token + + +
    +

    Token for a PostFinance Card.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the last 4 +digits of the card, e.g. **** 1234.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/RekaToken.html b/docs/Classes/RekaToken.html new file mode 100644 index 0000000..b4260fa --- /dev/null +++ b/docs/Classes/RekaToken.html @@ -0,0 +1,257 @@ + + + + RekaToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

RekaToken

+
+
+ +
@objc(DTRekaToken)
+@objcMembers
+public class RekaToken : CardToken
+ +
+
+

This class contains the token information about a Reka card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful Reka payment or with a +dedicated registration.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a Reka payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String, cardExpiryDate: CardExpiryDate, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + token + + +
    +

    Token for a Reka card.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the first 6 +digits and the last 4 digits of the card, e.g. 123456xxxxxxxxx1234.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/SEPAToken.html b/docs/Classes/SEPAToken.html new file mode 100644 index 0000000..6cf50d0 --- /dev/null +++ b/docs/Classes/SEPAToken.html @@ -0,0 +1,388 @@ + + + + SEPAToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

SEPAToken

+
+
+ +
@objc(DTSEPAToken)
+@objcMembers
+public class SEPAToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a SEPA (ELV) registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful SEPA payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + bankCode + +
    +
    +
    +
    +
    +
    +

    A bank code (German: Bankleitzahl) is a unique identification code for a +particular bank. This is required for tokens created before April 15th 2015.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var bankCode: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + token + +
    +
    +
    +
    +
    +
    +

    Token for SEPA (ELV).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var token: String { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(token:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a SEPA (ELV) payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + token + + +
    +

    Token for SEPA (ELV).

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(token:bankCode:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used with SEPA (ELV) tokens created before April 15th 2015. +Please refer to init(token:) for newer tokens.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String, bankCode: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + token + + +
    +

    Token for SEPA (ELV). This value was returned for tokens created before April 15th 2015.

    +
    +
    + + bankCode + + +
    +

    A bank code (German: Bankleitzahl) is a unique identification +code for a particular bank. This is required for tokens created before April 15th 2015.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/ThemeConfiguration.html b/docs/Classes/ThemeConfiguration.html new file mode 100644 index 0000000..e70bac7 --- /dev/null +++ b/docs/Classes/ThemeConfiguration.html @@ -0,0 +1,318 @@ + + + + ThemeConfiguration Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

ThemeConfiguration

+
+
+ +
@objc(DTThemeConfiguration)
+@objcMembers
+public class ThemeConfiguration : NSObject
+ +
+
+

This class gives you options to customize the theme of the library.

+ +

The library offers by default a theme for light and dark mode. If your app supports +both themes too, make sure to use UIColor.init(dynamicProvider:) +when creating custom themes.

+ +

We recommend you to start by customizing linkColor before anything else, +as this is often used as a fallback color.

+ +
+
+
+
    +
  • +
    + + + + barBackgroundColor + +
    +
    +
    +
    +
    +
    +

    Background color of the navigation bars. If this is not specified, the +navigation bars will be transparent.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barBackgroundColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + barLinkColor + +
    +
    +
    +
    +
    +
    +

    Color of the buttons in the navigation bars. If this is not specified, +the color will be the color set in linkColor.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barLinkColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + barTitleColor + +
    +
    +
    +
    +
    +
    +

    Color of the title within the navigation bars. If this is not specified, +the color will be the text color.

    + +

    The text color is either white or black and cannot be customized.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barTitleColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + buttonColor + +
    +
    +
    +
    +
    +
    +

    Background color of large buttons, such as the ‘Pay’ button. If this is +not specified, the color will be the color set in linkColor.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var buttonColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + buttonTextColor + +
    +
    +
    +
    +
    +
    +

    Text color of large buttons, such as the ‘Pay’ button. If this is not +specified, the color will be set to white.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var buttonTextColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + linkColor + +
    +
    +
    +
    +
    +
    +

    Color of text-only buttons or links and the text cursor. If this is not +specified, the color will be in a blue tone that fits the standard iOS design.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var linkColor: UIColor?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Transaction.html b/docs/Classes/Transaction.html new file mode 100644 index 0000000..90b35b3 --- /dev/null +++ b/docs/Classes/Transaction.html @@ -0,0 +1,454 @@ + + + + Transaction Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Transaction

+
+
+ +
@objc(DTTransaction)
+public class Transaction : NSObject, DTErrorHandlerDelegate
+ +
+
+

Use this class to start a transaction with a mobileToken that has previously been initialized +with a server-to-server init call. This class is the main class to start any operation with the SDK. +After the transaction has been completed - regardless if successful or not - delegate will +be called with some basic information about the success or failure.

+ +
+
+
+
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    This delegate will be notified after a transaction has been finished, +successfully or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public weak var delegate: TransactionDelegate?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The available options for how a transaction is handled by the mobile SDK.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var options: TransactionOptions
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + theme + +
    +
    +
    +
    +
    +
    +

    The theme to be used by the SDK.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var theme: ThemeConfiguration
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(mobileToken:) + +
    +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token obtained after a server-to-server init +call. After this class is initialized, you should define its delegate, the options properties +and a theme if desired.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token just like in init(mobileToken:) +and the provided card for the transaction. For this to work, you can only +send one payment method in your server-to-server init call. Use this init method if +you use your own UI fields for the card information.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String, card: Card)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    + + card + + +
    +

    Card object used for the transaction.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token obtained after a server-to-server init +call and display the selection of one or more saved tokens. The user will then be able to click +on their desired saved token to finalize the payment.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String, paymentMethodTokens: [PaymentMethodToken])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    + + paymentMethodTokens + + +
    +

    Specify here the tokens that are +available for selection to the user.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Starts the SDK and displays any needed user interface using the +provided presentingController. Note that a transaction +can only be started once.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public func start(presentingController: UIViewController)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + presentingController + + +
    +

    UIViewController +used to present the user interface during an on-going transaction

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/TransactionError.html b/docs/Classes/TransactionError.html new file mode 100644 index 0000000..32428c4 --- /dev/null +++ b/docs/Classes/TransactionError.html @@ -0,0 +1,253 @@ + + + + TransactionError Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionError

+
+
+ +
@objc(DTTransactionError)
+public class TransactionError : NSError
+ +
+
+

This class includes the error message and other details of a transaction.

+ +
+
+
+
    +
  • +
    + + + + paymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public internal(set) var paymentMethodType: PaymentMethodType? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + paymentMethodTypeObjc + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +

    This is for use from Objective-C only. This property wraps the +rawValue of a DTPaymentMethodType in an NSNumber.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(paymentMethodType)
    +public var paymentMethodTypeObjc: NSNumber? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + transactionId + +
    +
    +
    +
    +
    +
    +

    The identifier of the failed transaction

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public internal(set) var transactionId: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/TransactionOptions.html b/docs/Classes/TransactionOptions.html new file mode 100644 index 0000000..f3180f0 --- /dev/null +++ b/docs/Classes/TransactionOptions.html @@ -0,0 +1,285 @@ + + + + TransactionOptions Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionOptions

+
+
+ +
@objc(DTTransactionOptions)
+@objcMembers
+public class TransactionOptions : NSObject
+ +
+
+

This class can be used to specify miscellaneous options related to the transaction.

+ +
+
+
+
    +
  • +
    + + + + appCallbackScheme + +
    +
    +
    +
    +
    +
    +

    Your unique URL scheme to be used by other apps (e.g. Twint) +to return to the merchant app.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var appCallbackScheme: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + applePayConfig + +
    +
    +
    +
    +
    +
    +

    Specify the ApplePayConfig object here. This is mandatory +for Apple Pay transactions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var applePayConfig: ApplePayConfig?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this setting to display or hide critical and transaction errors.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var suppressTransactionErrorDialog: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testing + +
    +
    +
    +
    +
    +
    +

    Use this setting to switch from production to sandbox. If not specified, +the SDK will call the Datatrans production environment.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testing: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + useCertificatePinning + +
    +
    +
    +
    +
    +
    +

    Whether secure connections to datatrans servers require a certificate +chain signed with a specific CA private key. The device’s trust settings +are explicitly ignored, i.e. custom installed/white-listed certificates +and/or CAs will not work.

    + +

    Please be advised that enabling this option will break your app in many +corporate networks with anti-malware/-theft/-espionage SSL proxying.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var useCertificatePinning: Bool
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/TransactionSuccess.html b/docs/Classes/TransactionSuccess.html new file mode 100644 index 0000000..868ad88 --- /dev/null +++ b/docs/Classes/TransactionSuccess.html @@ -0,0 +1,227 @@ + + + + TransactionSuccess Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionSuccess

+
+
+ +
@objc(DTTransactionSuccess)
+@objcMembers
+public class TransactionSuccess : NSObject
+ +
+
+

This class includes the success message and other details of a transaction. +You will also obtain a transactionId that you can use for operations +after the transaction (e.g. settlement, cancel or refund requests).

+ +
+
+
+
    +
  • +
    + + + + paymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var paymentMethodType: PaymentMethodType { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + paymentMethodToken + +
    +
    +
    +
    +
    +
    +

    Object containing the token details of the payment method. +The token details are also returned to your webhook and can +be accessed with a status server-to-server request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var paymentMethodToken: PaymentMethodToken? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + transactionId + +
    +
    +
    +
    +
    +
    +

    The transactionId that you can use for operations after the +transaction (eg. settlement, cancel or refund requests).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var transactionId: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Enums/PaymentMethodType.html b/docs/Enums/PaymentMethodType.html new file mode 100644 index 0000000..e394548 --- /dev/null +++ b/docs/Enums/PaymentMethodType.html @@ -0,0 +1,734 @@ + + + + PaymentMethodType Enumeration Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodType

+
+
+ +
@objc(DTPaymentMethodType)
+public enum PaymentMethodType : Int
+ +
+
+

The payment method used during the transaction.

+ +
+
+
+
    +
  • +
    + + + + Visa + +
    +
    +
    +
    +
    +
    +

    Visa payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Visa
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MasterCard + +
    +
    +
    +
    +
    +
    +

    MasterCard payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MasterCard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DinersClub + +
    +
    +
    +
    +
    +
    +

    Diners Club payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case DinersClub
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AmericanExpress + +
    +
    +
    +
    +
    +
    +

    American Express payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case AmericanExpress
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + JCB + +
    +
    +
    +
    +
    +
    +

    JCB payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case JCB
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MyOne + +
    +
    +
    +
    +
    +
    +

    MyOne payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MyOne
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + UATP + +
    +
    +
    +
    +
    +
    +

    UATP payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case UATP
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Discover + +
    +
    +
    +
    +
    +
    +

    Discover payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Discover
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Supercard + +
    +
    +
    +
    +
    +
    +

    SUPERCARD payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Supercard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceCard + +
    +
    +
    +
    +
    +
    +

    PostFinance Card payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PostFinanceCard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceEFinance + +
    +
    +
    +
    +
    +
    +

    PostFinance E-Finance payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PostFinanceEFinance
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PayPal + +
    +
    +
    +
    +
    +
    +

    PayPal payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PayPal
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Easypay + +
    +
    +
    +
    +
    +
    +

    Easypay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Easypay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SEPA + +
    +
    +
    +
    +
    +
    +

    SEPA (ELV) payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SEPA
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SwissBilling + +
    +
    +
    +
    +
    +
    +

    SwissBilling payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SwissBilling
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Twint + +
    +
    +
    +
    +
    +
    +

    Twint payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Twint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ApplePay + +
    +
    +
    +
    +
    +
    +

    Apple Pay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case ApplePay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Reka + +
    +
    +
    +
    +
    +
    +

    Reka payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Reka
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Byjuno + +
    +
    +
    +
    +
    +
    +

    Byjuno payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Byjuno
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SwissPass + +
    +
    +
    +
    +
    +
    +

    SwissPass payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SwissPass
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Powerpay + +
    +
    +
    +
    +
    +
    +

    Powerpay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Powerpay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Paysafecard + +
    +
    +
    +
    +
    +
    +

    Paysafecard payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Paysafecard
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Payment Method.html b/docs/Payment Method.html new file mode 100644 index 0000000..2a4f1f4 --- /dev/null +++ b/docs/Payment Method.html @@ -0,0 +1,533 @@ + + + + Payment Method Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Payment Method

+ +
+
+
+
    +
  • +
    + + + + ApplePayConfig + +
    +
    +
    +
    +
    +
    +

    Configuration object for Apple Pay transactions.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTApplePayConfig)
    +@objcMembers
    +public class ApplePayConfig : NSObject, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Card + +
    +
    +
    +
    +
    +
    +

    Use this class to process raw card data for payments. You should use +this class if your app takes over the user interface for the card input fields.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCard)
    +@objcMembers
    +public class Card : PaymentMethod
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CardExpiryDate + +
    +
    +
    +
    +
    +
    +

    Class to be used to represent the card expiry date (month and year).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCardExpiryDate)
    +@objcMembers
    +public class CardExpiryDate : NSObject, Codable, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CardToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a credit or debit card registration +from a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction or +to display a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful card payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCardToken)
    +@objcMembers
    +public class CardToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SEPAToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a SEPA (ELV) registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful SEPA payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTSEPAToken)
    +@objcMembers
    +public class SEPAToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PayPalToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a PayPal registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PayPal payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPayPalToken)
    +@objcMembers
    +public class PayPalToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethod + +
    +
    +
    +
    +
    +
    +

    This is the base class for payment methods. It contains a type to identify the +payment method, e.g. Visa or Mastercard.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethod)
    +@objcMembers
    +public class PaymentMethod : NSObject, Codable, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethodToken + +
    +
    +
    +
    +
    +
    +

    This class is the base token class to gather token information and process +recurring payments or fast checkouts with any payment method. This class +is sufficient to process payments with tokens of some payment methods +(e.g. Twint). More complex payment methods require you to specify some +more details in their token subclasses (e.g. card payments, PostFinance, etc.). +Please refer to the list below to see if you need to call an additional token +subclass for your payments.

    + +
      +
    • Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +Apple Pay, Byjuno, SwissPass, Powerpay Invoice
    • +
    • Complex payment methods (requiring token subclass): Card payments, +PayPal, PostFinance, Reka
    • +
    + +

    Please refer to the Datatrans documentation to see if you can register a +token during payment or require a dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodToken)
    +@objcMembers
    +public class PaymentMethodToken : PaymentMethod
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodType)
    +public enum PaymentMethodType : Int
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodTypeMapper)
    +@objcMembers
    +public class PaymentMethodTypeMapper : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceCardToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a PostFinance Card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PostFinance Card payment or +with a dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPostFinanceCardToken)
    +@objcMembers
    +public class PostFinanceCardToken : CardToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RekaToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a Reka card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful Reka payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTRekaToken)
    +@objcMembers
    +public class RekaToken : CardToken
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Protocols/TransactionDelegate.html b/docs/Protocols/TransactionDelegate.html new file mode 100644 index 0000000..fe95a48 --- /dev/null +++ b/docs/Protocols/TransactionDelegate.html @@ -0,0 +1,323 @@ + + + + TransactionDelegate Protocol Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionDelegate

+
+
+ +
@objc(DTTransactionDelegate)
+public protocol TransactionDelegate : AnyObject
+ +
+
+

Implement TransactionDelegate to be notified when a transaction +ends. TransactionDelegate will notify you about the success, error +or cancel state of the processed transaction.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction has been successfully +completed. This callback provides details about the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func transactionDidFinish(_ transaction: Transaction, result: TransactionSuccess)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + transaction + + +
    +

    The object containing the information +of the completed transaction.

    +
    +
    + + result + + +
    +

    The object including the information related +to the transaction success.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction fails or encounters an error. +Keep in mind that the SDK shows the error to the user before +this is invoked. Therefore, this callback can be used to cancel +any on-going process involving the transaction.

    + +

    You may also use the error details provided here and display it +the way you want when suppressing the error message within +the TransactionOptions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func transactionDidFail(_ transaction: Transaction, error: TransactionError)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + transaction + + +
    +

    The object containing the information +of the failed transaction.

    +
    +
    + + error + + +
    +

    The error that occurred.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction has been cancelled. This callback +can be used to cancel any on-going process involving the transaction.

    + +

    Some payment methods - such as Twint that involves an app-switch - +also call this method when a payment error or decline occurs, to +prevent showing an error dialog twice, as an error is already +displayed in the payment application.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +optional func transactionDidCancel(_ transaction: Transaction)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transaction + + +
    +

    The object containing the +information of the cancelled transaction.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Theme Options.html b/docs/Theme Options.html new file mode 100644 index 0000000..fc68be4 --- /dev/null +++ b/docs/Theme Options.html @@ -0,0 +1,168 @@ + + + + Theme Options Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Theme Options

+ +
+
+
+
    +
  • +
    + + + + ThemeConfiguration + +
    +
    +
    +
    +
    +
    +

    This class gives you options to customize the theme of the library.

    + +

    The library offers by default a theme for light and dark mode. If your app supports +both themes too, make sure to use UIColor.init(dynamicProvider:) +when creating custom themes.

    + +

    We recommend you to start by customizing linkColor before anything else, +as this is often used as a fallback color.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTThemeConfiguration)
    +@objcMembers
    +public class ThemeConfiguration : NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Transaction.html b/docs/Transaction.html new file mode 100644 index 0000000..2e767b9 --- /dev/null +++ b/docs/Transaction.html @@ -0,0 +1,285 @@ + + + + Transaction Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Transaction

+ +
+
+
+
    +
  • +
    + + + + Transaction + +
    +
    +
    +
    +
    +
    +

    Use this class to start a transaction with a mobileToken that has previously been initialized +with a server-to-server init call. This class is the main class to start any operation with the SDK. +After the transaction has been completed - regardless if successful or not - delegate will +be called with some basic information about the success or failure.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransaction)
    +public class Transaction : NSObject, DTErrorHandlerDelegate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionOptions + +
    +
    +
    +
    +
    +
    +

    This class can be used to specify miscellaneous options related to the transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionOptions)
    +@objcMembers
    +public class TransactionOptions : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionDelegate + +
    +
    +
    +
    +
    +
    +

    Implement TransactionDelegate to be notified when a transaction +ends. TransactionDelegate will notify you about the success, error +or cancel state of the processed transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionDelegate)
    +public protocol TransactionDelegate : AnyObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionSuccess + +
    +
    +
    +
    +
    +
    +

    This class includes the success message and other details of a transaction. +You will also obtain a transactionId that you can use for operations +after the transaction (e.g. settlement, cancel or refund requests).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionSuccess)
    +@objcMembers
    +public class TransactionSuccess : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionError + +
    +
    +
    +
    +
    +
    +

    This class includes the error message and other details of a transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionError)
    +public class TransactionError : NSError
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/css/highlight.css b/docs/css/highlight.css new file mode 100644 index 0000000..d0db0e1 --- /dev/null +++ b/docs/css/highlight.css @@ -0,0 +1,200 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/docs/css/jazzy.css b/docs/css/jazzy.css new file mode 100644 index 0000000..5cdffe9 --- /dev/null +++ b/docs/css/jazzy.css @@ -0,0 +1,423 @@ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 21px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 2; + margin-top: 32px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + .item .declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/docs/docsets/Datatrans.docset/Contents/Info.plist b/docs/docsets/Datatrans.docset/Contents/Info.plist new file mode 100644 index 0000000..6a9d919 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleIdentifier + com.jazzy.datatrans + CFBundleName + Datatrans + DocSetPlatformFamily + datatrans + isDashDocset + + dashIndexFilePath + index.html + isJavaScriptEnabled + + DashDocSetFamily + dashtoc + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ApplePayConfig.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ApplePayConfig.html new file mode 100644 index 0000000..b4c76ec --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ApplePayConfig.html @@ -0,0 +1,402 @@ + + + + ApplePayConfig Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

ApplePayConfig

+
+
+ +
@objc(DTApplePayConfig)
+@objcMembers
+public class ApplePayConfig : NSObject, NSCopying
+ +
+
+

Configuration object for Apple Pay transactions.

+ +
+
+
+
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    Delegate object for callbacks during Apple Pay authorization

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public weak var delegate: DTApplePayDelegate?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + finalSummaryItemLabel + +
    +
    +
    +
    +
    +
    +

    Use this label to configure the final summary of the purchase. The default +label is “Total”, but you can also replace it with the name of your shop. +The string will then read: PAY YOURSHOP: XX.XX

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var finalSummaryItemLabel: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request object for further configuration of Apple Pay. Please refer to +the official Apple Pay documentation for more information.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var request: PKPaymentRequest { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + showLargeButton + +
    +
    +
    +
    +
    +
    +

    Use this option to show Apple Pay as a payment button instead of a +listed payment method.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var showLargeButton: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Although the library automatically hides Apple Pay if no cards are supported, +this shows if Apple Pay is available for the specified card acquirers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func hasApplePay(withSupportedNetworks supportedNetworks: [PKPaymentNetwork]) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + supportedNetworks + + +
    +

    Supported card acquirers.

    +
    +
    +
    +
    +

    Return Value

    +

    True if Apple Pay is available on the device, false if it is unavailable.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(merchantIdentifier: String, supportedNetworks: [PKPaymentNetwork], countryCode: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + merchantIdentifier + + +
    +

    The merchant Identifier for Apple Pay.

    +
    +
    + + supportedNetworks + + +
    +

    Supported card acquirers.

    +
    +
    + + countryCode + + +
    +

    Apple Pay country code

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Card.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Card.html new file mode 100644 index 0000000..7acc79f --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Card.html @@ -0,0 +1,344 @@ + + + + Card Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Card

+
+
+ +
@objc(DTCard)
+@objcMembers
+public class Card : PaymentMethod
+ +
+
+

Use this class to process raw card data for payments. You should use +this class if your app takes over the user interface for the card input fields.

+ +
+
+
+
    +
  • +
    + + + + number + +
    +
    +
    +
    +
    +
    +

    Card number

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var number: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + expiryDate + +
    +
    +
    +
    +
    +
    +

    Expiry date

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var expiryDate: CardExpiryDate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cvv + +
    +
    +
    +
    +
    +
    +

    Card security code - nil if the card does not have a card security code.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cvv: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cardholder + +
    +
    +
    +
    +
    +
    +

    Cardholder’s name

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cardholder: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this to initialize a card object with the card data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, number: String, expiryDate: CardExpiryDate, cvv: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + type + + +
    +

    Card type, e.g. Visa or Mastercard

    +
    +
    + + number + + +
    +

    Card number

    +
    +
    + + expiryDate + + +
    +

    Expiry date

    +
    +
    + + cvv + + +
    +

    Card security code - nil if the card does not have a card security code.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardExpiryDate.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardExpiryDate.html new file mode 100644 index 0000000..852a4e7 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardExpiryDate.html @@ -0,0 +1,361 @@ + + + + CardExpiryDate Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

CardExpiryDate

+
+
+ +
@objc(DTCardExpiryDate)
+@objcMembers
+public class CardExpiryDate : NSObject, Codable, NSCopying
+ +
+
+

Class to be used to represent the card expiry date (month and year).

+ +
+
+
+
    +
  • +
    + + + + month + +
    +
    +
    +
    +
    +
    +

    Card expiry month, [1, 12], e.g. 1 for January or 12 for December

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var month: Int { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + year + +
    +
    +
    +
    +
    +
    +

    Card expiry year, 2 or 4 digits, e.g. 30 or 2030

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var year: Int { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(month:year:) + +
    +
    +
    +
    +
    +
    +

    Initializes the card expiry date with the given month and year.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(month: Int, year: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + month + + +
    +

    Card expiry month, [1, 12], e.g. 1 for January or 12 for December

    +
    +
    + + year + + +
    +

    Card expiry year, 2 or 4 digits, e.g. 30 or 2030

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Decodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public required init(from decoder: Decoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardToken.html new file mode 100644 index 0000000..0564e2e --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/CardToken.html @@ -0,0 +1,488 @@ + + + + CardToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

CardToken

+
+
+ +
@objc(DTCardToken)
+@objcMembers
+public class CardToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a credit or debit card registration +from a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction or +to display a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful card payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + cardExpiryDate + +
    +
    +
    +
    +
    +
    +

    Expiry date

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var cardExpiryDate: CardExpiryDate? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + maskedCardNumber + +
    +
    +
    +
    +
    +
    +

    The masked card number you can use to display that specific card in your app. +The masked card number shows the first 6 digits and the last 4 digits of the card, +e.g. 432930xxxxxx6095.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) var maskedCardNumber: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cardholder + +
    +
    +
    +
    +
    +
    +

    Cardholder’s name

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var cardholder: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes a CardToken object with the given card data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, token: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. Visa

    +
    +
    + + token + + +
    +

    This is the token for the card, also known as alias. +This can be used to debit the card without further customer interaction.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the first 6 +digits and the last 4 digits of the card, e.g. 432930xxxxxx6095.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title e.g. ‘•••• 6095’.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isValid() + +
    +
    +
    +
    +
    +
    +

    Checks if the expiration date is in the future or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func isValid() -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PayPalToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PayPalToken.html new file mode 100644 index 0000000..e306e49 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PayPalToken.html @@ -0,0 +1,339 @@ + + + + PayPalToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PayPalToken

+
+
+ +
@objc(DTPayPalToken)
+@objcMembers
+public class PayPalToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a PayPal registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PayPal payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + payPalEmail + +
    +
    +
    +
    +
    +
    +

    PayPal e-mail address. This will be used for displaying purposes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var payPalEmail: String?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a PayPal payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(token: String, payPalEmail: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + token + + +
    +

    Token for a PayPal account.

    +
    +
    + + payPalEmail + + +
    +

    PayPal e-mail address. This will be used for displaying purposes.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethod.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethod.html new file mode 100644 index 0000000..67e64c4 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethod.html @@ -0,0 +1,297 @@ + + + + PaymentMethod Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethod

+
+
+ +
@objc(DTPaymentMethod)
+@objcMembers
+public class PaymentMethod : NSObject, Codable, NSCopying
+ +
+
+

This is the base class for payment methods. It contains a type to identify the +payment method, e.g. Visa or Mastercard.

+ +
+
+
+
    +
  • +
    + + + + type + +
    +
    +
    +
    +
    +
    +

    Payment method type, e.g. Visa

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let type: PaymentMethodType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(type:) + +
    +
    +
    +
    +
    +
    +

    This init method initializes a PaymentMethod object with the +payment method type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. Visa

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(from:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Decodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public required init(from decoder: Decoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodToken.html new file mode 100644 index 0000000..8397996 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodToken.html @@ -0,0 +1,519 @@ + + + + PaymentMethodToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodToken

+
+
+ +
@objc(DTPaymentMethodToken)
+@objcMembers
+public class PaymentMethodToken : PaymentMethod
+ +
+
+

This class is the base token class to gather token information and process +recurring payments or fast checkouts with any payment method. This class +is sufficient to process payments with tokens of some payment methods +(e.g. Twint). More complex payment methods require you to specify some +more details in their token subclasses (e.g. card payments, PostFinance, etc.). +Please refer to the list below to see if you need to call an additional token +subclass for your payments.

+ +
    +
  • Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +Apple Pay, Byjuno, SwissPass, Powerpay Invoice
  • +
  • Complex payment methods (requiring token subclass): Card payments, +PayPal, PostFinance, Reka
  • +
+ +

Please refer to the Datatrans documentation to see if you can register a +token during payment or require a dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + token + +
    +
    +
    +
    +
    +
    +

    The token that can be used to process recurring payments or fast checkouts.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var token: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(type:token:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(type: PaymentMethodType, token: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + type + + +
    +

    Payment method type, e.g. PayPal or Twint

    +
    +
    + + token + + +
    +

    The token that can be used to process recurring payments or fast checkouts.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + create(data:decoder:) + +
    +
    +
    +
    +
    +
    +

    Creates a PaymentMethodToken from encoded data using the given +decoder.

    + +

    Note that this function is only available from iOS 13. Earlier implementations +need to use create(jsonString:).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(iOS 13.0, *)
    +public class func create<T>(data: T.Input, decoder: T) -> PaymentMethodToken? where T : TopLevelDecoder
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    Encoded data, e.g. encoded by JSONEncoder

    +
    +
    + + decoder + + +
    +

    Decoder used for decoding the data, e.g. JSONDecoder

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + create(jsonString:) + +
    +
    +
    +
    +
    +
    +

    Creates a PaymentMethodToken from a JSON string.

    + +

    Note that this function should only be used for iOS 12 and earlier. Use +create(data:decoder:) for later versions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(iOS, deprecated: 13.0, message: "Use create(data:decoder:﹚ instead.")
    +public class func create(jsonString: String) -> PaymentMethodToken?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + jsonString + + +
    +

    String of JSON encoded data

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + isValid() + +
    +
    +
    +
    +
    +
    +

    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.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func isValid() -> Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Refer to the NSObject protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var description: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + encode(to:) + +
    +
    +
    +
    +
    +
    +

    Refer to the Encodable protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func encode(to encoder: Encoder) throws
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodTypeMapper.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodTypeMapper.html new file mode 100644 index 0000000..c364bd4 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PaymentMethodTypeMapper.html @@ -0,0 +1,243 @@ + + + + PaymentMethodTypeMapper Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodTypeMapper

+
+
+ +
@objc(DTPaymentMethodTypeMapper)
+@objcMembers
+public class PaymentMethodTypeMapper : NSObject
+ +
+
+

Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

+ +
+
+
+
    +
  • +
    + + + + toType(identifier:) + +
    +
    +
    +
    +
    +
    +

    This function returns the PaymentMethodType based on the Datatrans +payment method identifier.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func toType(identifier: String) -> PaymentMethodType
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + identifier + + +
    +

    The payment method identifier from Datatrans

    +
    +
    +
    +
    +

    Return Value

    +

    The payment method type, e.g. Visa

    +
    +
    +
    +
  • +
  • +
    + + + + toIdentifier(type:) + +
    +
    +
    +
    +
    +
    +

    This function returns the payment method identifier based on the +PaymentMethodType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func toIdentifier(type: PaymentMethodType) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + type + + +
    +

    The payment method type, e.g. Visa

    +
    +
    +
    +
    +

    Return Value

    +

    The payment method identifier

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PostFinanceCardToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PostFinanceCardToken.html new file mode 100644 index 0000000..04ce926 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/PostFinanceCardToken.html @@ -0,0 +1,257 @@ + + + + PostFinanceCardToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PostFinanceCardToken

+
+
+ +
@objc(DTPostFinanceCardToken)
+@objcMembers
+public class PostFinanceCardToken : CardToken
+ +
+
+

This class contains the token information about a PostFinance Card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PostFinance Card payment or +with a dedicated registration.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a PostFinance Card payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(token: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + token + + +
    +

    Token for a PostFinance Card.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the last 4 +digits of the card, e.g. **** 1234.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/RekaToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/RekaToken.html new file mode 100644 index 0000000..b4260fa --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/RekaToken.html @@ -0,0 +1,257 @@ + + + + RekaToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

RekaToken

+
+
+ +
@objc(DTRekaToken)
+@objcMembers
+public class RekaToken : CardToken
+ +
+
+

This class contains the token information about a Reka card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful Reka payment or with a +dedicated registration.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a Reka payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String, cardExpiryDate: CardExpiryDate, maskedCardNumber: String?, cardholder: String?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + token + + +
    +

    Token for a Reka card.

    +
    +
    + + cardExpiryDate + + +
    +

    Expiry date

    +
    +
    + + maskedCardNumber + + +
    +

    The masked card number you can use to display +that specific card in your app. The masked card number shows the first 6 +digits and the last 4 digits of the card, e.g. 123456xxxxxxxxx1234.

    +
    +
    + + cardholder + + +
    +

    Cardholder’s name

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/SEPAToken.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/SEPAToken.html new file mode 100644 index 0000000..6cf50d0 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/SEPAToken.html @@ -0,0 +1,388 @@ + + + + SEPAToken Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

SEPAToken

+
+
+ +
@objc(DTSEPAToken)
+@objcMembers
+public class SEPAToken : PaymentMethodToken
+ +
+
+

This class contains the token information about a SEPA (ELV) registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful SEPA payment or with a +dedicated registration.

+ +
+
+
+
    +
  • +
    + + + + bankCode + +
    +
    +
    +
    +
    +
    +

    A bank code (German: Bankleitzahl) is a unique identification code for a +particular bank. This is required for tokens created before April 15th 2015.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var bankCode: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + token + +
    +
    +
    +
    +
    +
    +

    Token for SEPA (ELV).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var token: String { get set }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(token:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used to initialize a SEPA (ELV) payment object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + token + + +
    +

    Token for SEPA (ELV).

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(token:bankCode:) + +
    +
    +
    +
    +
    +
    +

    This init method has to be used with SEPA (ELV) tokens created before April 15th 2015. +Please refer to init(token:) for newer tokens.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(token: String, bankCode: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + token + + +
    +

    Token for SEPA (ELV). This value was returned for tokens created before April 15th 2015.

    +
    +
    + + bankCode + + +
    +

    A bank code (German: Bankleitzahl) is a unique identification +code for a particular bank. This is required for tokens created before April 15th 2015.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + displayTitle + +
    +
    +
    +
    +
    +
    +

    A human readable title.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var displayTitle: String { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + accessibilityTitle + +
    +
    +
    +
    +
    +
    +

    For VoiceOver this title is used instead of displayTitle.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public var accessibilityTitle: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ThemeConfiguration.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ThemeConfiguration.html new file mode 100644 index 0000000..e70bac7 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/ThemeConfiguration.html @@ -0,0 +1,318 @@ + + + + ThemeConfiguration Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

ThemeConfiguration

+
+
+ +
@objc(DTThemeConfiguration)
+@objcMembers
+public class ThemeConfiguration : NSObject
+ +
+
+

This class gives you options to customize the theme of the library.

+ +

The library offers by default a theme for light and dark mode. If your app supports +both themes too, make sure to use UIColor.init(dynamicProvider:) +when creating custom themes.

+ +

We recommend you to start by customizing linkColor before anything else, +as this is often used as a fallback color.

+ +
+
+
+
    +
  • +
    + + + + barBackgroundColor + +
    +
    +
    +
    +
    +
    +

    Background color of the navigation bars. If this is not specified, the +navigation bars will be transparent.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barBackgroundColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + barLinkColor + +
    +
    +
    +
    +
    +
    +

    Color of the buttons in the navigation bars. If this is not specified, +the color will be the color set in linkColor.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barLinkColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + barTitleColor + +
    +
    +
    +
    +
    +
    +

    Color of the title within the navigation bars. If this is not specified, +the color will be the text color.

    + +

    The text color is either white or black and cannot be customized.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var barTitleColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + buttonColor + +
    +
    +
    +
    +
    +
    +

    Background color of large buttons, such as the ‘Pay’ button. If this is +not specified, the color will be the color set in linkColor.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var buttonColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + buttonTextColor + +
    +
    +
    +
    +
    +
    +

    Text color of large buttons, such as the ‘Pay’ button. If this is not +specified, the color will be set to white.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var buttonTextColor: UIColor?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + linkColor + +
    +
    +
    +
    +
    +
    +

    Color of text-only buttons or links and the text cursor. If this is not +specified, the color will be in a blue tone that fits the standard iOS design.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var linkColor: UIColor?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Transaction.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Transaction.html new file mode 100644 index 0000000..90b35b3 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/Transaction.html @@ -0,0 +1,454 @@ + + + + Transaction Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Transaction

+
+
+ +
@objc(DTTransaction)
+public class Transaction : NSObject, DTErrorHandlerDelegate
+ +
+
+

Use this class to start a transaction with a mobileToken that has previously been initialized +with a server-to-server init call. This class is the main class to start any operation with the SDK. +After the transaction has been completed - regardless if successful or not - delegate will +be called with some basic information about the success or failure.

+ +
+
+
+
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    This delegate will be notified after a transaction has been finished, +successfully or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public weak var delegate: TransactionDelegate?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The available options for how a transaction is handled by the mobile SDK.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var options: TransactionOptions
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + theme + +
    +
    +
    +
    +
    +
    +

    The theme to be used by the SDK.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public var theme: ThemeConfiguration
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(mobileToken:) + +
    +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token obtained after a server-to-server init +call. After this class is initialized, you should define its delegate, the options properties +and a theme if desired.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token just like in init(mobileToken:) +and the provided card for the transaction. For this to work, you can only +send one payment method in your server-to-server init call. Use this init method if +you use your own UI fields for the card information.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String, card: Card)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    + + card + + +
    +

    Card object used for the transaction.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this init method to start the SDK with a mobile token obtained after a server-to-server init +call and display the selection of one or more saved tokens. The user will then be able to click +on their desired saved token to finalize the payment.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public init(mobileToken: String, paymentMethodTokens: [PaymentMethodToken])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + mobileToken + + +
    +

    The mobileToken that has previously +been initialized with a server-to-server init call.

    +
    +
    + + paymentMethodTokens + + +
    +

    Specify here the tokens that are +available for selection to the user.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Starts the SDK and displays any needed user interface using the +provided presentingController. Note that a transaction +can only be started once.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public func start(presentingController: UIViewController)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + presentingController + + +
    +

    UIViewController +used to present the user interface during an on-going transaction

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionError.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionError.html new file mode 100644 index 0000000..32428c4 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionError.html @@ -0,0 +1,253 @@ + + + + TransactionError Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionError

+
+
+ +
@objc(DTTransactionError)
+public class TransactionError : NSError
+ +
+
+

This class includes the error message and other details of a transaction.

+ +
+
+
+
    +
  • +
    + + + + paymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public internal(set) var paymentMethodType: PaymentMethodType? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + paymentMethodTypeObjc + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +

    This is for use from Objective-C only. This property wraps the +rawValue of a DTPaymentMethodType in an NSNumber.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(paymentMethodType)
    +public var paymentMethodTypeObjc: NSNumber? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + transactionId + +
    +
    +
    +
    +
    +
    +

    The identifier of the failed transaction

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +public internal(set) var transactionId: String? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + copy(with:) + +
    +
    +
    +
    +
    +
    +

    Refer to the NSCopying protocol

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    override public func copy(with zone: NSZone? = nil) -> Any
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionOptions.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionOptions.html new file mode 100644 index 0000000..f3180f0 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionOptions.html @@ -0,0 +1,285 @@ + + + + TransactionOptions Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionOptions

+
+
+ +
@objc(DTTransactionOptions)
+@objcMembers
+public class TransactionOptions : NSObject
+ +
+
+

This class can be used to specify miscellaneous options related to the transaction.

+ +
+
+
+
    +
  • +
    + + + + appCallbackScheme + +
    +
    +
    +
    +
    +
    +

    Your unique URL scheme to be used by other apps (e.g. Twint) +to return to the merchant app.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var appCallbackScheme: String?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + applePayConfig + +
    +
    +
    +
    +
    +
    +

    Specify the ApplePayConfig object here. This is mandatory +for Apple Pay transactions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var applePayConfig: ApplePayConfig?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this setting to display or hide critical and transaction errors.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var suppressTransactionErrorDialog: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + testing + +
    +
    +
    +
    +
    +
    +

    Use this setting to switch from production to sandbox. If not specified, +the SDK will call the Datatrans production environment.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var testing: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + useCertificatePinning + +
    +
    +
    +
    +
    +
    +

    Whether secure connections to datatrans servers require a certificate +chain signed with a specific CA private key. The device’s trust settings +are explicitly ignored, i.e. custom installed/white-listed certificates +and/or CAs will not work.

    + +

    Please be advised that enabling this option will break your app in many +corporate networks with anti-malware/-theft/-espionage SSL proxying.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var useCertificatePinning: Bool
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionSuccess.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionSuccess.html new file mode 100644 index 0000000..868ad88 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Classes/TransactionSuccess.html @@ -0,0 +1,227 @@ + + + + TransactionSuccess Class Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionSuccess

+
+
+ +
@objc(DTTransactionSuccess)
+@objcMembers
+public class TransactionSuccess : NSObject
+ +
+
+

This class includes the success message and other details of a transaction. +You will also obtain a transactionId that you can use for operations +after the transaction (e.g. settlement, cancel or refund requests).

+ +
+
+
+
    +
  • +
    + + + + paymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var paymentMethodType: PaymentMethodType { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + paymentMethodToken + +
    +
    +
    +
    +
    +
    +

    Object containing the token details of the payment method. +The token details are also returned to your webhook and can +be accessed with a status server-to-server request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var paymentMethodToken: PaymentMethodToken? { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + transactionId + +
    +
    +
    +
    +
    +
    +

    The transactionId that you can use for operations after the +transaction (eg. settlement, cancel or refund requests).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var transactionId: String { get }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Enums/PaymentMethodType.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Enums/PaymentMethodType.html new file mode 100644 index 0000000..e394548 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Enums/PaymentMethodType.html @@ -0,0 +1,734 @@ + + + + PaymentMethodType Enumeration Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

PaymentMethodType

+
+
+ +
@objc(DTPaymentMethodType)
+public enum PaymentMethodType : Int
+ +
+
+

The payment method used during the transaction.

+ +
+
+
+
    +
  • +
    + + + + Visa + +
    +
    +
    +
    +
    +
    +

    Visa payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Visa
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MasterCard + +
    +
    +
    +
    +
    +
    +

    MasterCard payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MasterCard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DinersClub + +
    +
    +
    +
    +
    +
    +

    Diners Club payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case DinersClub
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AmericanExpress + +
    +
    +
    +
    +
    +
    +

    American Express payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case AmericanExpress
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + JCB + +
    +
    +
    +
    +
    +
    +

    JCB payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case JCB
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MyOne + +
    +
    +
    +
    +
    +
    +

    MyOne payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MyOne
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + UATP + +
    +
    +
    +
    +
    +
    +

    UATP payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case UATP
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Discover + +
    +
    +
    +
    +
    +
    +

    Discover payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Discover
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Supercard + +
    +
    +
    +
    +
    +
    +

    SUPERCARD payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Supercard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceCard + +
    +
    +
    +
    +
    +
    +

    PostFinance Card payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PostFinanceCard
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceEFinance + +
    +
    +
    +
    +
    +
    +

    PostFinance E-Finance payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PostFinanceEFinance
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PayPal + +
    +
    +
    +
    +
    +
    +

    PayPal payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case PayPal
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Easypay + +
    +
    +
    +
    +
    +
    +

    Easypay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Easypay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SEPA + +
    +
    +
    +
    +
    +
    +

    SEPA (ELV) payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SEPA
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SwissBilling + +
    +
    +
    +
    +
    +
    +

    SwissBilling payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SwissBilling
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Twint + +
    +
    +
    +
    +
    +
    +

    Twint payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Twint
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ApplePay + +
    +
    +
    +
    +
    +
    +

    Apple Pay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case ApplePay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Reka + +
    +
    +
    +
    +
    +
    +

    Reka payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Reka
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Byjuno + +
    +
    +
    +
    +
    +
    +

    Byjuno payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Byjuno
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SwissPass + +
    +
    +
    +
    +
    +
    +

    SwissPass payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SwissPass
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Powerpay + +
    +
    +
    +
    +
    +
    +

    Powerpay payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Powerpay
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Paysafecard + +
    +
    +
    +
    +
    +
    +

    Paysafecard payment method

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Paysafecard
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Payment Method.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Payment Method.html new file mode 100644 index 0000000..2a4f1f4 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Payment Method.html @@ -0,0 +1,533 @@ + + + + Payment Method Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Payment Method

+ +
+
+
+
    +
  • +
    + + + + ApplePayConfig + +
    +
    +
    +
    +
    +
    +

    Configuration object for Apple Pay transactions.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTApplePayConfig)
    +@objcMembers
    +public class ApplePayConfig : NSObject, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Card + +
    +
    +
    +
    +
    +
    +

    Use this class to process raw card data for payments. You should use +this class if your app takes over the user interface for the card input fields.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCard)
    +@objcMembers
    +public class Card : PaymentMethod
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CardExpiryDate + +
    +
    +
    +
    +
    +
    +

    Class to be used to represent the card expiry date (month and year).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCardExpiryDate)
    +@objcMembers
    +public class CardExpiryDate : NSObject, Codable, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CardToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a credit or debit card registration +from a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction or +to display a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful card payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTCardToken)
    +@objcMembers
    +public class CardToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SEPAToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a SEPA (ELV) registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful SEPA payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTSEPAToken)
    +@objcMembers
    +public class SEPAToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PayPalToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a PayPal registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PayPal payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPayPalToken)
    +@objcMembers
    +public class PayPalToken : PaymentMethodToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethod + +
    +
    +
    +
    +
    +
    +

    This is the base class for payment methods. It contains a type to identify the +payment method, e.g. Visa or Mastercard.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethod)
    +@objcMembers
    +public class PaymentMethod : NSObject, Codable, NSCopying
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethodToken + +
    +
    +
    +
    +
    +
    +

    This class is the base token class to gather token information and process +recurring payments or fast checkouts with any payment method. This class +is sufficient to process payments with tokens of some payment methods +(e.g. Twint). More complex payment methods require you to specify some +more details in their token subclasses (e.g. card payments, PostFinance, etc.). +Please refer to the list below to see if you need to call an additional token +subclass for your payments.

    + +
      +
    • Easy payment methods: Swisscom Easypay, SEPA (ELV), Twint, +Apple Pay, Byjuno, SwissPass, Powerpay Invoice
    • +
    • Complex payment methods (requiring token subclass): Card payments, +PayPal, PostFinance, Reka
    • +
    + +

    Please refer to the Datatrans documentation to see if you can register a +token during payment or require a dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodToken)
    +@objcMembers
    +public class PaymentMethodToken : PaymentMethod
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PaymentMethodType + +
    +
    +
    +
    +
    +
    +

    The payment method used during the transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodType)
    +public enum PaymentMethodType : Int
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPaymentMethodTypeMapper)
    +@objcMembers
    +public class PaymentMethodTypeMapper : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PostFinanceCardToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a PostFinance Card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful PostFinance Card payment or +with a dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTPostFinanceCardToken)
    +@objcMembers
    +public class PostFinanceCardToken : CardToken
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RekaToken + +
    +
    +
    +
    +
    +
    +

    This class contains the token information about a Reka card registration from +a previously completed transaction. Just like any other PaymentMethodToken +subclass, this class can be used to finalize a payment without user interaction +or to show a selection of saved token payments to the user for fast checkouts. +A token can be returned after completing a successful Reka payment or with a +dedicated registration.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTRekaToken)
    +@objcMembers
    +public class RekaToken : CardToken
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Protocols/TransactionDelegate.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Protocols/TransactionDelegate.html new file mode 100644 index 0000000..fe95a48 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Protocols/TransactionDelegate.html @@ -0,0 +1,323 @@ + + + + TransactionDelegate Protocol Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

TransactionDelegate

+
+
+ +
@objc(DTTransactionDelegate)
+public protocol TransactionDelegate : AnyObject
+ +
+
+

Implement TransactionDelegate to be notified when a transaction +ends. TransactionDelegate will notify you about the success, error +or cancel state of the processed transaction.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction has been successfully +completed. This callback provides details about the transaction.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func transactionDidFinish(_ transaction: Transaction, result: TransactionSuccess)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + transaction + + +
    +

    The object containing the information +of the completed transaction.

    +
    +
    + + result + + +
    +

    The object including the information related +to the transaction success.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction fails or encounters an error. +Keep in mind that the SDK shows the error to the user before +this is invoked. Therefore, this callback can be used to cancel +any on-going process involving the transaction.

    + +

    You may also use the error details provided here and display it +the way you want when suppressing the error message within +the TransactionOptions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func transactionDidFail(_ transaction: Transaction, error: TransactionError)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + transaction + + +
    +

    The object containing the information +of the failed transaction.

    +
    +
    + + error + + +
    +

    The error that occurred.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    This is called after a transaction has been cancelled. This callback +can be used to cancel any on-going process involving the transaction.

    + +

    Some payment methods - such as Twint that involves an app-switch - +also call this method when a payment error or decline occurs, to +prevent showing an error dialog twice, as an error is already +displayed in the payment application.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc
    +optional func transactionDidCancel(_ transaction: Transaction)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transaction + + +
    +

    The object containing the +information of the cancelled transaction.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Theme Options.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Theme Options.html new file mode 100644 index 0000000..fc68be4 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Theme Options.html @@ -0,0 +1,168 @@ + + + + Theme Options Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Theme Options

+ +
+
+
+
    +
  • +
    + + + + ThemeConfiguration + +
    +
    +
    +
    +
    +
    +

    This class gives you options to customize the theme of the library.

    + +

    The library offers by default a theme for light and dark mode. If your app supports +both themes too, make sure to use UIColor.init(dynamicProvider:) +when creating custom themes.

    + +

    We recommend you to start by customizing linkColor before anything else, +as this is often used as a fallback color.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTThemeConfiguration)
    +@objcMembers
    +public class ThemeConfiguration : NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Transaction.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Transaction.html new file mode 100644 index 0000000..2e767b9 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/Transaction.html @@ -0,0 +1,285 @@ + + + + Transaction Reference + + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+

Transaction

+ +
+
+
+
    +
  • +
    + + + + Transaction + +
    +
    +
    +
    +
    +
    +

    Use this class to start a transaction with a mobileToken that has previously been initialized +with a server-to-server init call. This class is the main class to start any operation with the SDK. +After the transaction has been completed - regardless if successful or not - delegate will +be called with some basic information about the success or failure.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransaction)
    +public class Transaction : NSObject, DTErrorHandlerDelegate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionOptions + +
    +
    +
    +
    +
    +
    +

    This class can be used to specify miscellaneous options related to the transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionOptions)
    +@objcMembers
    +public class TransactionOptions : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionDelegate + +
    +
    +
    +
    +
    +
    +

    Implement TransactionDelegate to be notified when a transaction +ends. TransactionDelegate will notify you about the success, error +or cancel state of the processed transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionDelegate)
    +public protocol TransactionDelegate : AnyObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionSuccess + +
    +
    +
    +
    +
    +
    +

    This class includes the success message and other details of a transaction. +You will also obtain a transactionId that you can use for operations +after the transaction (e.g. settlement, cancel or refund requests).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionSuccess)
    +@objcMembers
    +public class TransactionSuccess : NSObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TransactionError + +
    +
    +
    +
    +
    +
    +

    This class includes the error message and other details of a transaction.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @objc(DTTransactionError)
    +public class TransactionError : NSError
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/highlight.css b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/highlight.css new file mode 100644 index 0000000..d0db0e1 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/highlight.css @@ -0,0 +1,200 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/jazzy.css b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/jazzy.css new file mode 100644 index 0000000..5cdffe9 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/css/jazzy.css @@ -0,0 +1,423 @@ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h4 { + font-size: 13px; + line-height: 1.5; + margin-top: 21px; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +.section-name { + color: gray; + display: block; + font-family: Helvetica; + font-size: 22px; + font-weight: 100; + margin-bottom: 15px; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +pre > code { + padding: 0; } + +a { + color: #0088cc; + text-decoration: none; } + a code { + color: inherit; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 32px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 3; } + header img { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 21px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 2; + margin-top: 32px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; + white-space: nowrap; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 20px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + .main-content section .heading:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .main-content .section-name p { + margin-bottom: inherit; + line-height: inherit; } + .main-content .section-name code { + background-color: inherit; + padding: inherit; + color: inherit; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + margin-top: 10px; + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + +.section-name-container { + position: relative; + display: inline-block; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 35px; + font-size: 11.9px; + transition: all 300ms; } + .item .token-open { + margin-left: 20px; } + .item .discouraged { + text-decoration: line-through; } + .item .declaration-note { + font-size: .85em; + color: gray; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4b8afb; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: relative; + top: 10px; + bottom: 0px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } + +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } + +html.dash .height-container { + display: block; } + +html.dash .item .token { + margin-left: 0; } + +html.dash .content-wrapper { + width: auto; } + +html.dash #footer { + position: static; } + +form[role=search] { + float: right; } + form[role=search] input { + font: Helvetica, freesans, Arial, sans-serif; + margin-top: 6px; + font-size: 13px; + line-height: 20px; + padding: 0px 10px; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fff; + color: #333; + border: 1px solid #e2e2e2; + z-index: 4; } + form[role=search] .tt-highlight { + font-weight: bold; } + form[role=search] .tt-suggestion { + font: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + form[role=search] .tt-suggestion:hover, + form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + form[role=search] .tt-suggestion:hover .doc-parent-name, + form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/carat.png b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/carat.png new file mode 100755 index 0000000..29d2f7f Binary files /dev/null and b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/carat.png differ diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/dash.png b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/dash.png new file mode 100755 index 0000000..6f694c7 Binary files /dev/null and b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/dash.png differ diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/gh.png b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/gh.png new file mode 100755 index 0000000..628da97 Binary files /dev/null and b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/gh.png differ diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/spinner.gif b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/spinner.gif new file mode 100644 index 0000000..e3038d0 Binary files /dev/null and b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/img/spinner.gif differ diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/index.html b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/index.html new file mode 100644 index 0000000..7c10dd0 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/index.html @@ -0,0 +1,150 @@ + + + + Datatrans Reference + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+ +

Datatrans iOS SDK

+ +

Version +License +Platform

+ +

Accept payments on your iOS or Android apps: Our mobile SDKs support your entire payment and registration process and simplify the integration of any payment method in your mobile apps. Completely outsource your payment processes to us from inside your native apps. We also take care of redirecting your users to 3D Secure processes and enable smooth app-switches to other payment applications including PayPal, Twint, and PostFinance.

+

Features

+ +

Easy Integration: Integrate many of our payment methods easily to your iOS projects. Smart, modern and secure UI components to master online payments in your apps.

+ +

Card Scanner: Let your customers scan their card information easily with our prebuilt card scanner. No time wasted with entering card information.

+ +

3DS 2.0 / SCA Ready: The iOS SDK takes over the complexity of the 3DS process. We remain in charge of redirecting users whenever needed to the 3DS process of their bank and back to the SDK.

+ +

Smooth App-Switch: Do you offer payment methods like Twint or PayPal that require the user to confirm the payment in a separate mobile app? The library switches smoothly to external apps and back to the SDK.

+ +

Tokens and Fast Checkouts: Save your customers’ payment information for later use and offer fast checkouts in your app. Delegate the token selection to the library.

+ +

Theme Support: Style various items according to your corporate identity if needed. We also support the iOS dark theme.

+

Requirements

+ +

The Datatrans iOS SDK requires Xcode 12 or later and is compatible with apps targeting iOS 11 or above.

+

Integration

+ +

Get started with our integration guide and the API reference.

+ +
+
+ +
+
+ + + diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.js b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.js new file mode 100755 index 0000000..1e55d6e --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.js @@ -0,0 +1,70 @@ +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targetted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.search.js b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.search.js new file mode 100644 index 0000000..e3d1ab9 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jazzy.search.js @@ -0,0 +1,70 @@ +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jquery.min.js b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jquery.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/typeahead.jquery.js new file mode 100644 index 0000000..3a2d2ab --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/js/typeahead.jquery.js @@ -0,0 +1,1694 @@ +/*! + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/search.json b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/search.json new file mode 100644 index 0000000..942ebf3 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/search.json @@ -0,0 +1 @@ +{"Classes/RekaToken.html#/c:@M@Datatrans@objc(cs)DTRekaToken(im)initWithToken:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

This init method has to be used to initialize a Reka payment object.

","parent_name":"RekaToken"},"Classes/RekaToken.html#/c:@M@Datatrans@objc(cs)DTRekaToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"RekaToken"},"Classes/PostFinanceCardToken.html#/c:@M@Datatrans@objc(cs)DTPostFinanceCardToken(im)initWithToken:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

This init method has to be used to initialize a PostFinance Card payment object.

","parent_name":"PostFinanceCardToken"},"Classes/PostFinanceCardToken.html#/c:@M@Datatrans@objc(cs)DTPostFinanceCardToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PostFinanceCardToken"},"Classes/PaymentMethodTypeMapper.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodTypeMapper(cm)toTypeWithIdentifier:":{"name":"toType(identifier:)","abstract":"

This function returns the PaymentMethodType based on the Datatrans","parent_name":"PaymentMethodTypeMapper"},"Classes/PaymentMethodTypeMapper.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodTypeMapper(cm)toIdentifierWithType:":{"name":"toIdentifier(type:)","abstract":"

This function returns the payment method identifier based on the","parent_name":"PaymentMethodTypeMapper"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeVisa":{"name":"Visa","abstract":"

Visa payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeMasterCard":{"name":"MasterCard","abstract":"

MasterCard payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeDinersClub":{"name":"DinersClub","abstract":"

Diners Club payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeAmericanExpress":{"name":"AmericanExpress","abstract":"

American Express payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeJCB":{"name":"JCB","abstract":"

JCB payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeMyOne":{"name":"MyOne","abstract":"

MyOne payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeUATP":{"name":"UATP","abstract":"

UATP payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeDiscover":{"name":"Discover","abstract":"

Discover payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSupercard":{"name":"Supercard","abstract":"

SUPERCARD payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePostFinanceCard":{"name":"PostFinanceCard","abstract":"

PostFinance Card payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePostFinanceEFinance":{"name":"PostFinanceEFinance","abstract":"

PostFinance E-Finance payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePayPal":{"name":"PayPal","abstract":"

PayPal payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeEasypay":{"name":"Easypay","abstract":"

Easypay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSEPA":{"name":"SEPA","abstract":"

SEPA (ELV) payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSwissBilling":{"name":"SwissBilling","abstract":"

SwissBilling payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeTwint":{"name":"Twint","abstract":"

Twint payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeApplePay":{"name":"ApplePay","abstract":"

Apple Pay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeReka":{"name":"Reka","abstract":"

Reka payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeByjuno":{"name":"Byjuno","abstract":"

Byjuno payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSwissPass":{"name":"SwissPass","abstract":"

SwissPass payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePowerpay":{"name":"Powerpay","abstract":"

Powerpay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePaysafecard":{"name":"Paysafecard","abstract":"

Paysafecard payment method

","parent_name":"PaymentMethodType"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)token":{"name":"token","abstract":"

The token that can be used to process recurring payments or fast checkouts.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)initWithType:token:":{"name":"init(type:token:)","abstract":"

This init method has to be used to initialize a payment object.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/s:9Datatrans18PaymentMethodTokenC6create4data7decoderACSg5InputQz_xt7Combine15TopLevelDecoderRzlFZ":{"name":"create(data:decoder:)","abstract":"

Creates a PaymentMethodToken from encoded data using the given","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(cm)createWithJsonString:":{"name":"create(jsonString:)","abstract":"

Creates a PaymentMethodToken from a JSON string.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)isValid":{"name":"isValid()","abstract":"

This function checks if the payment method token is valid. This function","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/s:9Datatrans18PaymentMethodTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(py)type":{"name":"type","abstract":"

Payment method type, e.g. Visa

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(im)initWithType:":{"name":"init(type:)","abstract":"

This init method initializes a PaymentMethod object with the","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/s:9Datatrans13PaymentMethodC4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

Refer to the Decodable protocol

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/s:9Datatrans13PaymentMethodC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PaymentMethod"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)payPalEmail":{"name":"payPalEmail","abstract":"

PayPal e-mail address. This will be used for displaying purposes.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(im)initWithToken:payPalEmail:":{"name":"init(token:payPalEmail:)","abstract":"

This init method has to be used to initialize a PayPal payment object.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/s:9Datatrans11PayPalTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PayPalToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)bankCode":{"name":"bankCode","abstract":"

A bank code (German: Bankleitzahl) is a unique identification code for a","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)token":{"name":"token","abstract":"

Token for SEPA (ELV).

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)initWithToken:":{"name":"init(token:)","abstract":"

This init method has to be used to initialize a SEPA (ELV) payment object.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)initWithToken:bankCode:":{"name":"init(token:bankCode:)","abstract":"

This init method has to be used with SEPA (ELV) tokens created before April 15th 2015.","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"SEPAToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)cardExpiryDate":{"name":"cardExpiryDate","abstract":"

Expiry date

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)maskedCardNumber":{"name":"maskedCardNumber","abstract":"

The masked card number you can use to display that specific card in your app.","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)cardholder":{"name":"cardholder","abstract":"

Cardholder’s name

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)initWithType:token:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(type:token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

Initializes a CardToken object with the given card data.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title e.g. ‘•••• 6095’.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)isValid":{"name":"isValid()","abstract":"

Checks if the expiration date is in the future or not.

","parent_name":"CardToken"},"Classes/CardToken.html#/s:9Datatrans9CardTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"CardToken"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)month":{"name":"month","abstract":"

Card expiry month, [1, 12], e.g. 1 for January or 12 for December

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)year":{"name":"year","abstract":"

Card expiry year, 2 or 4 digits, e.g. 30 or 2030

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(im)initWithMonth:year:":{"name":"init(month:year:)","abstract":"

Initializes the card expiry date with the given month and year.

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/s:9Datatrans14CardExpiryDateC4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

Refer to the Decodable protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/s:9Datatrans14CardExpiryDateC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"CardExpiryDate"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)number":{"name":"number","abstract":"

Card number

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)expiryDate":{"name":"expiryDate","abstract":"

Expiry date

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)cvv":{"name":"cvv","abstract":"

Card security code - nil if the card does not have a card security code.

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)cardholder":{"name":"cardholder","abstract":"

Cardholder’s name

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(im)initWithType:number:expiryDate:cvv:cardholder:":{"name":"init(type:number:expiryDate:cvv:cardholder:)","abstract":"

Use this to initialize a card object with the card data.

","parent_name":"Card"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)delegate":{"name":"delegate","abstract":"

Delegate object for callbacks during Apple Pay authorization

","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)finalSummaryItemLabel":{"name":"finalSummaryItemLabel","abstract":"

Use this label to configure the final summary of the purchase. The default","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)request":{"name":"request","abstract":"

The request object for further configuration of Apple Pay. Please refer to","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)showLargeButton":{"name":"showLargeButton","abstract":"

Use this option to show Apple Pay as a payment button instead of a","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(cm)hasApplePayWithSupportedNetworks:":{"name":"hasApplePay(withSupportedNetworks:)","abstract":"

Although the library automatically hides Apple Pay if no cards are supported,","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(im)initWithMerchantIdentifier:supportedNetworks:countryCode:":{"name":"init(merchantIdentifier:supportedNetworks:countryCode:)","abstract":"

Creates a new Apple Pay configuration object with an Apple Pay country code.","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html":{"name":"ApplePayConfig","abstract":"

Configuration object for Apple Pay transactions.

"},"Classes/Card.html":{"name":"Card","abstract":"

Use this class to process raw card data for payments. You should use"},"Classes/CardExpiryDate.html":{"name":"CardExpiryDate","abstract":"

Class to be used to represent the card expiry date (month and year).

"},"Classes/CardToken.html":{"name":"CardToken","abstract":"

This class contains the token information about a credit or debit card registration"},"Classes/SEPAToken.html":{"name":"SEPAToken","abstract":"

This class contains the token information about a SEPA (ELV) registration from"},"Classes/PayPalToken.html":{"name":"PayPalToken","abstract":"

This class contains the token information about a PayPal registration from"},"Classes/PaymentMethod.html":{"name":"PaymentMethod","abstract":"

This is the base class for payment methods. It contains a type to identify the"},"Classes/PaymentMethodToken.html":{"name":"PaymentMethodToken","abstract":"

This class is the base token class to gather token information and process"},"Enums/PaymentMethodType.html":{"name":"PaymentMethodType","abstract":"

The payment method used during the transaction.

"},"Classes/PaymentMethodTypeMapper.html":{"name":"PaymentMethodTypeMapper","abstract":"

Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

"},"Classes/PostFinanceCardToken.html":{"name":"PostFinanceCardToken","abstract":"

This class contains the token information about a PostFinance Card registration from"},"Classes/RekaToken.html":{"name":"RekaToken","abstract":"

This class contains the token information about a Reka card registration from"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barBackgroundColor":{"name":"barBackgroundColor","abstract":"

Background color of the navigation bars. If this is not specified, the","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barLinkColor":{"name":"barLinkColor","abstract":"

Color of the buttons in the navigation bars. If this is not specified,","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barTitleColor":{"name":"barTitleColor","abstract":"

Color of the title within the navigation bars. If this is not specified,","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)buttonColor":{"name":"buttonColor","abstract":"

Background color of large buttons, such as the ‘Pay’ button. If this is","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)buttonTextColor":{"name":"buttonTextColor","abstract":"

Text color of large buttons, such as the ‘Pay’ button. If this is not","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)linkColor":{"name":"linkColor","abstract":"

Color of text-only buttons or links and the text cursor. If this is not","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html":{"name":"ThemeConfiguration","abstract":"

This class gives you options to customize the theme of the library.

"},"Classes/TransactionError.html#/s:9Datatrans16TransactionErrorC17paymentMethodTypeAA07PaymenteF0OSgvp":{"name":"paymentMethodType","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(py)paymentMethodType":{"name":"paymentMethodTypeObjc","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(py)transactionId":{"name":"transactionId","abstract":"

The identifier of the failed transaction

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"TransactionError"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)paymentMethodType":{"name":"paymentMethodType","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionSuccess"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)paymentMethodToken":{"name":"paymentMethodToken","abstract":"

Object containing the token details of the payment method.","parent_name":"TransactionSuccess"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)transactionId":{"name":"transactionId","abstract":"

The transactionId that you can use for operations after the","parent_name":"TransactionSuccess"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidFinish:result:":{"name":"transactionDidFinish(_:result:)","abstract":"

This is called after a transaction has been successfully","parent_name":"TransactionDelegate"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidFail:error:":{"name":"transactionDidFail(_:error:)","abstract":"

This is called after a transaction fails or encounters an error.","parent_name":"TransactionDelegate"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidCancel:":{"name":"transactionDidCancel(_:)","abstract":"

This is called after a transaction has been cancelled. This callback","parent_name":"TransactionDelegate"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)appCallbackScheme":{"name":"appCallbackScheme","abstract":"

Your unique URL scheme to be used by other apps (e.g. Twint)","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)applePayConfig":{"name":"applePayConfig","abstract":"

Specify the ApplePayConfig object here. This is mandatory","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)suppressTransactionErrorDialog":{"name":"suppressTransactionErrorDialog","abstract":"

Use this setting to display or hide critical and transaction errors.

","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)testing":{"name":"testing","abstract":"

Use this setting to switch from production to sandbox. If not specified,","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)useCertificatePinning":{"name":"useCertificatePinning","abstract":"

Whether secure connections to datatrans servers require a certificate","parent_name":"TransactionOptions"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)delegate":{"name":"delegate","abstract":"

This delegate will be notified after a transaction has been finished,","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)options":{"name":"options","abstract":"

The available options for how a transaction is handled by the mobile SDK.

","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)theme":{"name":"theme","abstract":"

The theme to be used by the SDK.

","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:":{"name":"init(mobileToken:)","abstract":"

Use this init method to start the SDK with a mobile token obtained after a server-to-server init","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:card:":{"name":"init(mobileToken:card:)","abstract":"

Use this init method to start the SDK with a mobile token just like in init(mobileToken:)","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:paymentMethodTokens:":{"name":"init(mobileToken:paymentMethodTokens:)","abstract":"

Use this init method to start the SDK with a mobile token obtained after a server-to-server init","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)startWithPresentingController:":{"name":"start(presentingController:)","abstract":"

Starts the SDK and displays any needed user interface using the","parent_name":"Transaction"},"Classes/Transaction.html":{"name":"Transaction","abstract":"

Use this class to start a transaction with a mobileToken that has previously been initialized"},"Classes/TransactionOptions.html":{"name":"TransactionOptions","abstract":"

This class can be used to specify miscellaneous options related to the transaction.

"},"Protocols/TransactionDelegate.html":{"name":"TransactionDelegate","abstract":"

Implement TransactionDelegate to be notified when a transaction"},"Classes/TransactionSuccess.html":{"name":"TransactionSuccess","abstract":"

This class includes the success message and other details of a transaction."},"Classes/TransactionError.html":{"name":"TransactionError","abstract":"

This class includes the error message and other details of a transaction.

"},"Transaction.html":{"name":"Transaction"},"Theme%20Options.html":{"name":"Theme Options"},"Payment%20Method.html":{"name":"Payment Method"}} \ No newline at end of file diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/Documents/undocumented.json b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/undocumented.json new file mode 100644 index 0000000..8b09ef6 --- /dev/null +++ b/docs/docsets/Datatrans.docset/Contents/Resources/Documents/undocumented.json @@ -0,0 +1,6 @@ +{ + "warnings": [ + + ], + "source_directory": "/Volumes/Development/datatrans/iOS/datatrans-iphone" +} \ No newline at end of file diff --git a/docs/docsets/Datatrans.docset/Contents/Resources/docSet.dsidx b/docs/docsets/Datatrans.docset/Contents/Resources/docSet.dsidx new file mode 100644 index 0000000..5e51bd0 Binary files /dev/null and b/docs/docsets/Datatrans.docset/Contents/Resources/docSet.dsidx differ diff --git a/docs/docsets/Datatrans.tgz b/docs/docsets/Datatrans.tgz new file mode 100644 index 0000000..1391460 Binary files /dev/null and b/docs/docsets/Datatrans.tgz differ diff --git a/docs/img/carat.png b/docs/img/carat.png new file mode 100755 index 0000000..29d2f7f Binary files /dev/null and b/docs/img/carat.png differ diff --git a/docs/img/dash.png b/docs/img/dash.png new file mode 100755 index 0000000..6f694c7 Binary files /dev/null and b/docs/img/dash.png differ diff --git a/docs/img/gh.png b/docs/img/gh.png new file mode 100755 index 0000000..628da97 Binary files /dev/null and b/docs/img/gh.png differ diff --git a/docs/img/spinner.gif b/docs/img/spinner.gif new file mode 100644 index 0000000..e3038d0 Binary files /dev/null and b/docs/img/spinner.gif differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..7c10dd0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,150 @@ + + + + Datatrans Reference + + + + + + + + + + + + +
+
+

Datatrans Docs

+

View on GitHub

+

+

+ +
+

+
+
+
+ +
+
+ +
+
+
+ +

Datatrans iOS SDK

+ +

Version +License +Platform

+ +

Accept payments on your iOS or Android apps: Our mobile SDKs support your entire payment and registration process and simplify the integration of any payment method in your mobile apps. Completely outsource your payment processes to us from inside your native apps. We also take care of redirecting your users to 3D Secure processes and enable smooth app-switches to other payment applications including PayPal, Twint, and PostFinance.

+

Features

+ +

Easy Integration: Integrate many of our payment methods easily to your iOS projects. Smart, modern and secure UI components to master online payments in your apps.

+ +

Card Scanner: Let your customers scan their card information easily with our prebuilt card scanner. No time wasted with entering card information.

+ +

3DS 2.0 / SCA Ready: The iOS SDK takes over the complexity of the 3DS process. We remain in charge of redirecting users whenever needed to the 3DS process of their bank and back to the SDK.

+ +

Smooth App-Switch: Do you offer payment methods like Twint or PayPal that require the user to confirm the payment in a separate mobile app? The library switches smoothly to external apps and back to the SDK.

+ +

Tokens and Fast Checkouts: Save your customers’ payment information for later use and offer fast checkouts in your app. Delegate the token selection to the library.

+ +

Theme Support: Style various items according to your corporate identity if needed. We also support the iOS dark theme.

+

Requirements

+ +

The Datatrans iOS SDK requires Xcode 12 or later and is compatible with apps targeting iOS 11 or above.

+

Integration

+ +

Get started with our integration guide and the API reference.

+ +
+
+ +
+
+ +
+ diff --git a/docs/js/jazzy.js b/docs/js/jazzy.js new file mode 100755 index 0000000..1e55d6e --- /dev/null +++ b/docs/js/jazzy.js @@ -0,0 +1,70 @@ +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targetted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/js/jazzy.search.js b/docs/js/jazzy.search.js new file mode 100644 index 0000000..e3d1ab9 --- /dev/null +++ b/docs/js/jazzy.search.js @@ -0,0 +1,70 @@ +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/docs/js/jquery.min.js b/docs/js/jquery.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/docs/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/js/typeahead.jquery.js b/docs/js/typeahead.jquery.js new file mode 100644 index 0000000..3a2d2ab --- /dev/null +++ b/docs/js/typeahead.jquery.js @@ -0,0 +1,1694 @@ +/*! + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/docs/search.json b/docs/search.json new file mode 100644 index 0000000..942ebf3 --- /dev/null +++ b/docs/search.json @@ -0,0 +1 @@ +{"Classes/RekaToken.html#/c:@M@Datatrans@objc(cs)DTRekaToken(im)initWithToken:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

This init method has to be used to initialize a Reka payment object.

","parent_name":"RekaToken"},"Classes/RekaToken.html#/c:@M@Datatrans@objc(cs)DTRekaToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"RekaToken"},"Classes/PostFinanceCardToken.html#/c:@M@Datatrans@objc(cs)DTPostFinanceCardToken(im)initWithToken:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

This init method has to be used to initialize a PostFinance Card payment object.

","parent_name":"PostFinanceCardToken"},"Classes/PostFinanceCardToken.html#/c:@M@Datatrans@objc(cs)DTPostFinanceCardToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PostFinanceCardToken"},"Classes/PaymentMethodTypeMapper.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodTypeMapper(cm)toTypeWithIdentifier:":{"name":"toType(identifier:)","abstract":"

This function returns the PaymentMethodType based on the Datatrans","parent_name":"PaymentMethodTypeMapper"},"Classes/PaymentMethodTypeMapper.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodTypeMapper(cm)toIdentifierWithType:":{"name":"toIdentifier(type:)","abstract":"

This function returns the payment method identifier based on the","parent_name":"PaymentMethodTypeMapper"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeVisa":{"name":"Visa","abstract":"

Visa payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeMasterCard":{"name":"MasterCard","abstract":"

MasterCard payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeDinersClub":{"name":"DinersClub","abstract":"

Diners Club payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeAmericanExpress":{"name":"AmericanExpress","abstract":"

American Express payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeJCB":{"name":"JCB","abstract":"

JCB payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeMyOne":{"name":"MyOne","abstract":"

MyOne payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeUATP":{"name":"UATP","abstract":"

UATP payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeDiscover":{"name":"Discover","abstract":"

Discover payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSupercard":{"name":"Supercard","abstract":"

SUPERCARD payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePostFinanceCard":{"name":"PostFinanceCard","abstract":"

PostFinance Card payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePostFinanceEFinance":{"name":"PostFinanceEFinance","abstract":"

PostFinance E-Finance payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePayPal":{"name":"PayPal","abstract":"

PayPal payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeEasypay":{"name":"Easypay","abstract":"

Easypay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSEPA":{"name":"SEPA","abstract":"

SEPA (ELV) payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSwissBilling":{"name":"SwissBilling","abstract":"

SwissBilling payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeTwint":{"name":"Twint","abstract":"

Twint payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeApplePay":{"name":"ApplePay","abstract":"

Apple Pay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeReka":{"name":"Reka","abstract":"

Reka payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeByjuno":{"name":"Byjuno","abstract":"

Byjuno payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypeSwissPass":{"name":"SwissPass","abstract":"

SwissPass payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePowerpay":{"name":"Powerpay","abstract":"

Powerpay payment method

","parent_name":"PaymentMethodType"},"Enums/PaymentMethodType.html#/c:@M@Datatrans@E@DTPaymentMethodType@DTPaymentMethodTypePaysafecard":{"name":"Paysafecard","abstract":"

Paysafecard payment method

","parent_name":"PaymentMethodType"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)token":{"name":"token","abstract":"

The token that can be used to process recurring payments or fast checkouts.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)initWithType:token:":{"name":"init(type:token:)","abstract":"

This init method has to be used to initialize a payment object.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/s:9Datatrans18PaymentMethodTokenC6create4data7decoderACSg5InputQz_xt7Combine15TopLevelDecoderRzlFZ":{"name":"create(data:decoder:)","abstract":"

Creates a PaymentMethodToken from encoded data using the given","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(cm)createWithJsonString:":{"name":"create(jsonString:)","abstract":"

Creates a PaymentMethodToken from a JSON string.

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)isValid":{"name":"isValid()","abstract":"

This function checks if the payment method token is valid. This function","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/s:9Datatrans18PaymentMethodTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethodToken.html#/c:@M@Datatrans@objc(cs)DTPaymentMethodToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PaymentMethodToken"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(py)type":{"name":"type","abstract":"

Payment method type, e.g. Visa

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(im)initWithType:":{"name":"init(type:)","abstract":"

This init method initializes a PaymentMethod object with the","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/s:9Datatrans13PaymentMethodC4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

Refer to the Decodable protocol

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/s:9Datatrans13PaymentMethodC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PaymentMethod"},"Classes/PaymentMethod.html#/c:@M@Datatrans@objc(cs)DTPaymentMethod(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PaymentMethod"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)payPalEmail":{"name":"payPalEmail","abstract":"

PayPal e-mail address. This will be used for displaying purposes.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(im)initWithToken:payPalEmail:":{"name":"init(token:payPalEmail:)","abstract":"

This init method has to be used to initialize a PayPal payment object.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/s:9Datatrans11PayPalTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"PayPalToken"},"Classes/PayPalToken.html#/c:@M@Datatrans@objc(cs)DTPayPalToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"PayPalToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)bankCode":{"name":"bankCode","abstract":"

A bank code (German: Bankleitzahl) is a unique identification code for a","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)token":{"name":"token","abstract":"

Token for SEPA (ELV).

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)initWithToken:":{"name":"init(token:)","abstract":"

This init method has to be used to initialize a SEPA (ELV) payment object.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)initWithToken:bankCode:":{"name":"init(token:bankCode:)","abstract":"

This init method has to be used with SEPA (ELV) tokens created before April 15th 2015.","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"SEPAToken"},"Classes/SEPAToken.html#/c:@M@Datatrans@objc(cs)DTSEPAToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"SEPAToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)cardExpiryDate":{"name":"cardExpiryDate","abstract":"

Expiry date

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)maskedCardNumber":{"name":"maskedCardNumber","abstract":"

The masked card number you can use to display that specific card in your app.","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)cardholder":{"name":"cardholder","abstract":"

Cardholder’s name

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)initWithType:token:cardExpiryDate:maskedCardNumber:cardholder:":{"name":"init(type:token:cardExpiryDate:maskedCardNumber:cardholder:)","abstract":"

Initializes a CardToken object with the given card data.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)displayTitle":{"name":"displayTitle","abstract":"

A human readable title e.g. ‘•••• 6095’.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)accessibilityTitle":{"name":"accessibilityTitle","abstract":"

For VoiceOver this title is used instead of displayTitle.

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)isValid":{"name":"isValid()","abstract":"

Checks if the expiration date is in the future or not.

","parent_name":"CardToken"},"Classes/CardToken.html#/s:9Datatrans9CardTokenC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"CardToken"},"Classes/CardToken.html#/c:@M@Datatrans@objc(cs)DTCardToken(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"CardToken"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)month":{"name":"month","abstract":"

Card expiry month, [1, 12], e.g. 1 for January or 12 for December

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)year":{"name":"year","abstract":"

Card expiry year, 2 or 4 digits, e.g. 30 or 2030

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(im)initWithMonth:year:":{"name":"init(month:year:)","abstract":"

Initializes the card expiry date with the given month and year.

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/s:9Datatrans14CardExpiryDateC4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

Refer to the Decodable protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/s:9Datatrans14CardExpiryDateC6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","abstract":"

Refer to the Encodable protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(py)description":{"name":"description","abstract":"

Refer to the NSObject protocol

","parent_name":"CardExpiryDate"},"Classes/CardExpiryDate.html#/c:@M@Datatrans@objc(cs)DTCardExpiryDate(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"CardExpiryDate"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)number":{"name":"number","abstract":"

Card number

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)expiryDate":{"name":"expiryDate","abstract":"

Expiry date

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)cvv":{"name":"cvv","abstract":"

Card security code - nil if the card does not have a card security code.

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(py)cardholder":{"name":"cardholder","abstract":"

Cardholder’s name

","parent_name":"Card"},"Classes/Card.html#/c:@M@Datatrans@objc(cs)DTCard(im)initWithType:number:expiryDate:cvv:cardholder:":{"name":"init(type:number:expiryDate:cvv:cardholder:)","abstract":"

Use this to initialize a card object with the card data.

","parent_name":"Card"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)delegate":{"name":"delegate","abstract":"

Delegate object for callbacks during Apple Pay authorization

","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)finalSummaryItemLabel":{"name":"finalSummaryItemLabel","abstract":"

Use this label to configure the final summary of the purchase. The default","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)request":{"name":"request","abstract":"

The request object for further configuration of Apple Pay. Please refer to","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(py)showLargeButton":{"name":"showLargeButton","abstract":"

Use this option to show Apple Pay as a payment button instead of a","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(cm)hasApplePayWithSupportedNetworks:":{"name":"hasApplePay(withSupportedNetworks:)","abstract":"

Although the library automatically hides Apple Pay if no cards are supported,","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(im)initWithMerchantIdentifier:supportedNetworks:countryCode:":{"name":"init(merchantIdentifier:supportedNetworks:countryCode:)","abstract":"

Creates a new Apple Pay configuration object with an Apple Pay country code.","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html#/c:@M@Datatrans@objc(cs)DTApplePayConfig(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"ApplePayConfig"},"Classes/ApplePayConfig.html":{"name":"ApplePayConfig","abstract":"

Configuration object for Apple Pay transactions.

"},"Classes/Card.html":{"name":"Card","abstract":"

Use this class to process raw card data for payments. You should use"},"Classes/CardExpiryDate.html":{"name":"CardExpiryDate","abstract":"

Class to be used to represent the card expiry date (month and year).

"},"Classes/CardToken.html":{"name":"CardToken","abstract":"

This class contains the token information about a credit or debit card registration"},"Classes/SEPAToken.html":{"name":"SEPAToken","abstract":"

This class contains the token information about a SEPA (ELV) registration from"},"Classes/PayPalToken.html":{"name":"PayPalToken","abstract":"

This class contains the token information about a PayPal registration from"},"Classes/PaymentMethod.html":{"name":"PaymentMethod","abstract":"

This is the base class for payment methods. It contains a type to identify the"},"Classes/PaymentMethodToken.html":{"name":"PaymentMethodToken","abstract":"

This class is the base token class to gather token information and process"},"Enums/PaymentMethodType.html":{"name":"PaymentMethodType","abstract":"

The payment method used during the transaction.

"},"Classes/PaymentMethodTypeMapper.html":{"name":"PaymentMethodTypeMapper","abstract":"

Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

"},"Classes/PostFinanceCardToken.html":{"name":"PostFinanceCardToken","abstract":"

This class contains the token information about a PostFinance Card registration from"},"Classes/RekaToken.html":{"name":"RekaToken","abstract":"

This class contains the token information about a Reka card registration from"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barBackgroundColor":{"name":"barBackgroundColor","abstract":"

Background color of the navigation bars. If this is not specified, the","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barLinkColor":{"name":"barLinkColor","abstract":"

Color of the buttons in the navigation bars. If this is not specified,","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)barTitleColor":{"name":"barTitleColor","abstract":"

Color of the title within the navigation bars. If this is not specified,","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)buttonColor":{"name":"buttonColor","abstract":"

Background color of large buttons, such as the ‘Pay’ button. If this is","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)buttonTextColor":{"name":"buttonTextColor","abstract":"

Text color of large buttons, such as the ‘Pay’ button. If this is not","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html#/c:@M@Datatrans@objc(cs)DTThemeConfiguration(py)linkColor":{"name":"linkColor","abstract":"

Color of text-only buttons or links and the text cursor. If this is not","parent_name":"ThemeConfiguration"},"Classes/ThemeConfiguration.html":{"name":"ThemeConfiguration","abstract":"

This class gives you options to customize the theme of the library.

"},"Classes/TransactionError.html#/s:9Datatrans16TransactionErrorC17paymentMethodTypeAA07PaymenteF0OSgvp":{"name":"paymentMethodType","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(py)paymentMethodType":{"name":"paymentMethodTypeObjc","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(py)transactionId":{"name":"transactionId","abstract":"

The identifier of the failed transaction

","parent_name":"TransactionError"},"Classes/TransactionError.html#/c:@M@Datatrans@objc(cs)DTTransactionError(im)copyWithZone:":{"name":"copy(with:)","abstract":"

Refer to the NSCopying protocol

","parent_name":"TransactionError"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)paymentMethodType":{"name":"paymentMethodType","abstract":"

The payment method used during the transaction.

","parent_name":"TransactionSuccess"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)paymentMethodToken":{"name":"paymentMethodToken","abstract":"

Object containing the token details of the payment method.","parent_name":"TransactionSuccess"},"Classes/TransactionSuccess.html#/c:@M@Datatrans@objc(cs)DTTransactionSuccess(py)transactionId":{"name":"transactionId","abstract":"

The transactionId that you can use for operations after the","parent_name":"TransactionSuccess"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidFinish:result:":{"name":"transactionDidFinish(_:result:)","abstract":"

This is called after a transaction has been successfully","parent_name":"TransactionDelegate"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidFail:error:":{"name":"transactionDidFail(_:error:)","abstract":"

This is called after a transaction fails or encounters an error.","parent_name":"TransactionDelegate"},"Protocols/TransactionDelegate.html#/c:@M@Datatrans@objc(pl)DTTransactionDelegate(im)transactionDidCancel:":{"name":"transactionDidCancel(_:)","abstract":"

This is called after a transaction has been cancelled. This callback","parent_name":"TransactionDelegate"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)appCallbackScheme":{"name":"appCallbackScheme","abstract":"

Your unique URL scheme to be used by other apps (e.g. Twint)","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)applePayConfig":{"name":"applePayConfig","abstract":"

Specify the ApplePayConfig object here. This is mandatory","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)suppressTransactionErrorDialog":{"name":"suppressTransactionErrorDialog","abstract":"

Use this setting to display or hide critical and transaction errors.

","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)testing":{"name":"testing","abstract":"

Use this setting to switch from production to sandbox. If not specified,","parent_name":"TransactionOptions"},"Classes/TransactionOptions.html#/c:@M@Datatrans@objc(cs)DTTransactionOptions(py)useCertificatePinning":{"name":"useCertificatePinning","abstract":"

Whether secure connections to datatrans servers require a certificate","parent_name":"TransactionOptions"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)delegate":{"name":"delegate","abstract":"

This delegate will be notified after a transaction has been finished,","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)options":{"name":"options","abstract":"

The available options for how a transaction is handled by the mobile SDK.

","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(py)theme":{"name":"theme","abstract":"

The theme to be used by the SDK.

","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:":{"name":"init(mobileToken:)","abstract":"

Use this init method to start the SDK with a mobile token obtained after a server-to-server init","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:card:":{"name":"init(mobileToken:card:)","abstract":"

Use this init method to start the SDK with a mobile token just like in init(mobileToken:)","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)initWithMobileToken:paymentMethodTokens:":{"name":"init(mobileToken:paymentMethodTokens:)","abstract":"

Use this init method to start the SDK with a mobile token obtained after a server-to-server init","parent_name":"Transaction"},"Classes/Transaction.html#/c:@M@Datatrans@objc(cs)DTTransaction(im)startWithPresentingController:":{"name":"start(presentingController:)","abstract":"

Starts the SDK and displays any needed user interface using the","parent_name":"Transaction"},"Classes/Transaction.html":{"name":"Transaction","abstract":"

Use this class to start a transaction with a mobileToken that has previously been initialized"},"Classes/TransactionOptions.html":{"name":"TransactionOptions","abstract":"

This class can be used to specify miscellaneous options related to the transaction.

"},"Protocols/TransactionDelegate.html":{"name":"TransactionDelegate","abstract":"

Implement TransactionDelegate to be notified when a transaction"},"Classes/TransactionSuccess.html":{"name":"TransactionSuccess","abstract":"

This class includes the success message and other details of a transaction."},"Classes/TransactionError.html":{"name":"TransactionError","abstract":"

This class includes the error message and other details of a transaction.

"},"Transaction.html":{"name":"Transaction"},"Theme%20Options.html":{"name":"Theme Options"},"Payment%20Method.html":{"name":"Payment Method"}} \ No newline at end of file diff --git a/docs/undocumented.json b/docs/undocumented.json new file mode 100644 index 0000000..8b09ef6 --- /dev/null +++ b/docs/undocumented.json @@ -0,0 +1,6 @@ +{ + "warnings": [ + + ], + "source_directory": "/Volumes/Development/datatrans/iOS/datatrans-iphone" +} \ No newline at end of file