-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from iZettle/sdk-release-v2.3.2
SDK Release v2.3.2
- Loading branch information
Showing
44 changed files
with
156 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
macos: | ||
xcode: "10.3.0" | ||
|
||
steps: | ||
- checkout | ||
- run: | ||
name: Build and run tests | ||
command: xcodebuild -project Example/iZettleSDKSample.xcodeproj clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
...ttlePayments.framework/IZAccountListController.storyboardc/B0i-qj-2h3-view-fCt-r3-PgZ.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...tlePayments.framework/IZAccountListController.storyboardc/UIViewController-B0i-qj-2h3.nib
Binary file not shown.
Binary file modified
BIN
-4 Bytes
(100%)
...ayments.framework/IZCaseMailComposerController.storyboardc/Jaw-h2-QAp-view-TPg-LM-5hM.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...yments.framework/IZCaseMailComposerController.storyboardc/UIViewController-Jaw-h2-QAp.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s.framework/IZReaderWizard.storyboardc/IZReaderWizardViewController.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ayments.framework/IZReaderWizard.storyboardc/IZReaderWizardViewController.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+3 Bytes
(100%)
...nts.framework/IZReaderWizard.storyboardc/t4r-fZ-kmI-view-R2h-js-jQM.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
-8 Bytes
(100%)
...ePayments.framework/IZReaderWizard.storyboardc/t4r-fZ-kmI-view-R2h-js-jQM.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
...yments.framework/PairingFlow.storyboardc/87D-Le-jN0-view-WUB-ha-t1R.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
-9 Bytes
(100%)
...ttlePayments.framework/PairingFlow.storyboardc/87D-Le-jN0-view-WUB-ha-t1R.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ramework/PairingFlow.storyboardc/IZConnectingToReaderViewController.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ents.framework/PairingFlow.storyboardc/IZConnectingToReaderViewController.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ettlePayments.framework/PairingFlow.storyboardc/IZNumericComparison.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...SDK/iZettlePayments.framework/PairingFlow.storyboardc/IZNumericComparison.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...iZettlePayments.framework/PairingFlow.storyboardc/IZPairingFinished.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...leSDK/iZettlePayments.framework/PairingFlow.storyboardc/IZPairingFinished.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s.framework/PairingFlow.storyboardc/IZReaderDiscoveryViewController.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ayments.framework/PairingFlow.storyboardc/IZReaderDiscoveryViewController.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(100%)
...yments.framework/PairingFlow.storyboardc/Sy7-nH-3z7-view-e0t-gv-8X0.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+23 Bytes
(100%)
...ttlePayments.framework/PairingFlow.storyboardc/Sy7-nH-3z7-view-e0t-gv-8X0.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+17 Bytes
(100%)
...yments.framework/PairingFlow.storyboardc/oqQ-Q2-6KL-view-OI7-dD-LrC.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...ttlePayments.framework/PairingFlow.storyboardc/oqQ-Q2-6KL-view-OI7-dD-LrC.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+9 Bytes
(100%)
...yments.framework/PairingFlow.storyboardc/xVJ-PQ-Jsg-view-Bvo-9O-5lf.nib/objects-11.0+.nib
Binary file not shown.
Binary file modified
BIN
-3 Bytes
(100%)
...ttlePayments.framework/PairingFlow.storyboardc/xVJ-PQ-Jsg-view-Bvo-9O-5lf.nib/runtime.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
iZettleSDK/iZettlePayments.framework/Purchase-ipad.storyboardc/signature.nib
Binary file not shown.
Binary file modified
BIN
-4 Bytes
(100%)
...tleSDK/iZettlePayments.framework/Purchase-ipad.storyboardc/yUS-3p-5ys-view-aWd-Jm-hU7.nib
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
...eSDK/iZettlePayments.framework/Purchase-iphone.storyboardc/phZ-az-Plb-view-G5N-jM-cNR.nib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
iZettleSDK/iZettlePayments.framework/Purchase-iphone.storyboardc/signature.nib
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// | ||
// iZettleSDK.h | ||
// | ||
// Copyright (c) 2014 iZettle. All rights reserved. | ||
|
||
@import UIKit; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@class iZettleSDKPaymentInfo; | ||
|
||
/// SDK error domain | ||
extern NSErrorDomain const IZSDKErrorDomain; | ||
|
||
/** | ||
Defines SDK errors | ||
*/ | ||
typedef NS_ERROR_ENUM(IZSDKErrorDomain, IZSDKErrorCode) { | ||
IZSDKErrorCodeUserNotLoggedIn = -1, | ||
IZSDKErrorCodePaymentNotFound = -100, | ||
IZSDKErrorCodeReferenceTooLong = -101, | ||
IZSDKErrorCodeOperationAlreadyInProgress = -300, | ||
}; | ||
|
||
typedef void(^iZettleSDKOperationCompletion)(iZettleSDKPaymentInfo * _Nullable paymentInfo, NSError * _Nullable error); | ||
|
||
@interface iZettleSDK : NSObject | ||
|
||
@property (nonatomic, readonly) NSString *version; | ||
|
||
+ (iZettleSDK *)shared; | ||
- (void)startWithAPIKey:(NSString *)APIKey | ||
NS_SWIFT_NAME(start(with:)); | ||
|
||
/// If set only an iZettle user with this account will be allowed to be logged in. | ||
@property (nonatomic, copy, nullable) NSString *enforcedUserAccount; | ||
|
||
@end | ||
|
||
@interface iZettleSDK (Operations) | ||
|
||
/** | ||
Logout current account | ||
*/ | ||
- (void)logout; | ||
|
||
/** | ||
Perform a payment with an amount and a reference. | ||
@param amount The amount to be charged in the logged in users currency | ||
@param enableTipping Enable tipping flow | ||
@param reference The payment reference. Used to identify an iZettle payment, used when retrieving payment | ||
information at a later time or performing a refund. Max length 128. (Optional) | ||
@param viewController A controller from which iZettle will present its UI | ||
@param completion Completion handler that will be called when the operation finishes | ||
@remark Enabling tipping does not guarantee that tipping flow will be displayed. Tipping flow will only be displayed | ||
for logged in account and active reader supports tipping. | ||
*/ | ||
- (void)chargeAmount:(NSDecimalNumber *)amount | ||
enableTipping:(BOOL)enableTipping | ||
reference:(nullable NSString *)reference | ||
presentFromViewController:(UIViewController *)viewController | ||
completion:(iZettleSDKOperationCompletion)completion | ||
NS_SWIFT_NAME(charge(amount:enableTipping:reference:presentFrom:completion:)); | ||
|
||
/// Refund an amount from a payment with a given reference. | ||
/// @param amount: The amount to be refunded from the payment (Optional, `nil` will refund full amount of original payment) | ||
/// @param reference: The reference of the payment that is to be refunded. | ||
/// @param refundReference: The reference of the refund. Max length 128. (Optional) | ||
/// @param viewController: A controller from which iZettle will present its UI. | ||
/// @param completion: Completion handler that will be called when the operation finishes. | ||
- (void)refundAmount:(nullable NSDecimalNumber *)amount | ||
ofPaymentWithReference:(NSString *)reference | ||
refundReference:(nullable NSString *)refundReference | ||
presentFromViewController:(UIViewController *)viewController | ||
completion:(iZettleSDKOperationCompletion)completion | ||
NS_SWIFT_NAME(refund(amount:ofPayment:withRefundReference:presentFrom:completion:));; | ||
|
||
/// Query iZettle for payment information of a payment with a given reference. | ||
/// @param reference: The payment reference to query. | ||
/// @param viewController: A controller from which iZettle will present its UI. | ||
/// @param completion: Completion handler that will be called when the operation finishes. | ||
- (void)retrievePaymentInfoForReference:(NSString *)reference | ||
presentFromViewController:(UIViewController *)viewController | ||
completion:(iZettleSDKOperationCompletion)completion | ||
NS_SWIFT_NAME(retrievePaymentInfo(for:presentFrom:completion:)); | ||
|
||
/// Query iZettle for payment information of a payment with a given reference. | ||
/// @param reference: The payment reference to query. | ||
/// @param completion: Completion handler that will be called when the operation finishes. | ||
- (void)retrievePaymentInfoForReference:(NSString *)reference | ||
completion:(iZettleSDKOperationCompletion)completion | ||
NS_SWIFT_NAME(retrievePaymentInfo(for:completion:)); | ||
|
||
/// Present iZettle settings view. The user can switch account, access the iZettle FAQ, view card reader settings etc. | ||
/// @param viewController: A controller from which iZettle will present its UI. | ||
- (void)presentSettingsFromViewController:(UIViewController *)viewController | ||
NS_SWIFT_NAME(presentSettings(from:)); | ||
|
||
/// Attempt aborting the ongoing operation. Only use this if absolutely necessary. The state of the payment will be unknown to the user after this call. | ||
- (void)abortOperation; | ||
|
||
@end | ||
|
||
@interface iZettleSDKPaymentInfo : NSObject | ||
|
||
@property (nonatomic, readonly) NSDictionary<NSString *, id> *dictionary; // Dictionary representation of the payment information | ||
|
||
@property (nonatomic, readonly) NSDecimalNumber *amount; // Paid amount (including gratuityAmount) | ||
@property (nonatomic, readonly, nullable) NSDecimalNumber *gratuityAmount; // The amount of gratuity paid | ||
|
||
@property (nonatomic, readonly) NSString *referenceNumber; // iZettles reference to the payment | ||
@property (nonatomic, readonly) NSString *entryMode; // EMV, CONTACTLESS_EMV, MAGSTRIPE_CONTACTLESS, MAGSTRIPE etc | ||
@property (nonatomic, readonly) NSString *authorizationCode; | ||
|
||
@property (nonatomic, readonly) NSString *obfuscatedPan; // **** **** **** 1111 | ||
@property (nonatomic, readonly) NSString *panHash; // Hash sum of the plain pan | ||
@property (nonatomic, readonly) NSString *cardBrand; | ||
|
||
@property (nonatomic, readonly, nullable) NSString *AID; | ||
@property (nonatomic, readonly, nullable) NSString *TSI; | ||
@property (nonatomic, readonly, nullable) NSString *TVR; | ||
@property (nonatomic, readonly, nullable) NSString *applicationName; | ||
|
||
// Only used for certain markets | ||
@property (nonatomic, readonly, nullable) NSNumber *numberOfInstallments; | ||
@property (nonatomic, readonly, nullable) NSDecimalNumber *installmentAmount; | ||
|
||
// Only used for Mexico | ||
@property (nonatomic, readonly, nullable) NSString *mxFIID; | ||
@property (nonatomic, readonly, nullable) NSString *mxCardType; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
framework module iZettleSDK { | ||
umbrella header "iZettleSDK.h" | ||
|
||
export * | ||
module * { export * } | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.