-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
395efeb
commit 1706f17
Showing
9 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
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,20 @@ | ||
// | ||
// BBPOS.h | ||
// BBPOS | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
//! Project version number for BBPOS. | ||
FOUNDATION_EXPORT double BBPOSVersionNumber; | ||
|
||
//! Project version string for BBPOS. | ||
FOUNDATION_EXPORT const unsigned char BBPOSVersionString[]; | ||
|
||
// In this header, you should import all the public headers of | ||
// your framework using statements like #import <BBPOS/PublicHeader.h> | ||
|
||
#import "BBPOSTerminalControllerFactory.h" | ||
#import "BBPOSTerminalController.h" | ||
#import "BBPOSMacros.h" | ||
#import "BBPOSEnums.h" |
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,149 @@ | ||
// | ||
// BBPOSEnums.h | ||
// BBPOS | ||
// | ||
|
||
#ifndef BBPOSEnums_h | ||
#define BBPOSEnums_h | ||
|
||
typedef NS_ENUM(NSUInteger, BBPOSCardDataType) | ||
{ | ||
CARD_DATA_TYPE_TRANSACTION_PAYMENT | ||
}; | ||
|
||
/* Progress Message */ | ||
typedef NS_ENUM(NSUInteger, BBPOSProgressMessageType) | ||
{ | ||
BBPOS_PROGRESS_MESSAGE_PLEASE_INSERT_CARD, | ||
BBPOS_PROGRESS_MESSAGE_TRY_ANOTHER_INTERFACE, | ||
BBPOS_PROGRESS_MESSAGE_PLEASE_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_SWIPE_DETECTED, | ||
BBPOS_PROGRESS_MESSAGE_WAITING_FOR_CARD_SWIPE, | ||
BBPOS_PROGRESS_MESSAGE_WAITING_FOR_DEVICE, | ||
BBPOS_PROGRESS_MESSAGE_DECODING_STARTED, | ||
BBPOS_PROGRESS_MESSAGE_COMMAND_SENT, | ||
BBPOS_PROGRESS_MESSAGE_ICC_ERROR_SWIPE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_SWIPE_ERROR_RESWIPE, | ||
BBPOS_PROGRESS_MESSAGE_MAG_CARD_DATA_INSERT_CARD, | ||
BBPOS_PROGRESS_MESSAGE_CARD_INSERTED, | ||
BBPOS_PROGRESS_MESSAGE_CARD_READ_ERROR, | ||
BBPOS_PROGRESS_MESSAGE_UNKNOWN, | ||
BBPOS_PROGRESS_MESSAGE_APPLICATION_SELECTION_STARTED, | ||
BBPOS_PROGRESS_MESSAGE_APPLICATION_SELECTION_COMPLETED, | ||
BBPOS_PROGRESS_MESSAGE_CARD_HOLDER_PRESSED_CANCEL_KEY, | ||
BBPOS_PROGRESS_MESSAGE_CONTACTLESS_TRANSACTION_REVERTED_TO_CONTACT, | ||
BBPOS_PROGRESS_MESSAGE_DEVICE_BUSY, | ||
BBPOS_PROGRESS_MESSAGE_FIRST_PIN_ENTRY_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_ERROR_READING_CONTACTLESS_CARD, | ||
BBPOS_PROGRESS_MESSAGE_LAST_PIN_ENTRY_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_MULTIPLE_CONTACTLESS_CARDS_DETECTED, | ||
BBPOS_PROGRESS_MESSAGE_PIN_ENTRY_FAILED, | ||
BBPOS_PROGRESS_MESSAGE_PIN_ENTRY_IN_PROGRESS, | ||
BBPOS_PROGRESS_MESSAGE_PIN_ENTRY_SUCCESSFUL, | ||
BBPOS_PROGRESS_MESSAGE_RETRY_PIN_ENTRY_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_SWIPE_ERROR_RESWIPE_MAG_STRIPE, | ||
BBPOS_PROGRESS_MESSAGE_UPDATING_FIRMWARE, | ||
BBPOS_PROGRESS_MESSAGE_TAP_DETECTED, | ||
BBPOS_PROGRESS_MESSAGE_CONTACTLESS_CARD_STILL_IN_FIELD, | ||
BBPOS_PROGRESS_MESSAGE_FIRST_ENTER_NEW_PIN_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_VALIDATE_NEW_PIN_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_RETRY_ENTER_NEW_PIN_PROMPT, | ||
BBPOS_PROGRESS_MESSAGE_PIN_CHANGE_FAILED, | ||
BBPOS_PROGRESS_MESSAGE_PIN_CHANGE_ENDED, | ||
BBPOS_PROGRESS_MESSAGE_PLEASE_SEE_PHONE, | ||
BBPOS_PROGRESS_MESSAGE_CONTACTLESS_INTERFACE_FAILED_TRY_CONTACT, | ||
BBPOS_PROGRESS_MESSAGE_PRESENT_CARD_AGAIN, | ||
BBPOS_PROGRESS_MESSAGE_CARD_REMOVED, | ||
BBPOS_PROGRESS_MESSAGE_CARD_BLOCKED, | ||
BBPOS_PROGRESS_MESSAGE_NOT_AUTHORIZED, | ||
BBPOS_PROGRESS_MESSAGE_COMPLETE_CARD_REMOVE, | ||
BBPOS_PROGRESS_MESSAGE_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_INSERT_OR_SWIPE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_TRANSACTION_VOID, | ||
BBPOS_PROGRESS_MESSAGE_CARD_READ_OK_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_PROCESSING_TRANSACTION, | ||
BBPOS_PROGRESS_MESSAGE_CARD_HOLDER_BYPASSED_PIN, | ||
BBPOS_PROGRESS_MESSAGE_NOT_ACCEPTED, | ||
BBPOS_PROGRESS_MESSAGE_PROCESSING_DO_NOT_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_AUTHORIZING, | ||
BBPOS_PROGRESS_MESSAGE_NOT_ACCEPTED_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_CARD_ERROR, | ||
BBPOS_PROGRESS_MESSAGE_CARD_ERROR_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_CANCELLED, | ||
BBPOS_PROGRESS_MESSAGE_CANCELLED_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_TRANSACTION_VOID_REMOVE_CARD, | ||
BBPOS_PROGRESS_MESSAGE_UNKNOWN_AID | ||
}; | ||
|
||
/* Card Reader Error */ | ||
typedef NS_ENUM(NSUInteger, BBPOSTerminalError) | ||
{ | ||
BBPOS_TERMINAL_ERROR_BATTERYLOW, | ||
BBPOS_TERMINAL_ERROR_NO_READERS, | ||
BBPOS_TERMINAL_ERROR_BT_TIMEOUT, | ||
BBPOS_TERMINAL_ERROR_CAPK_NO_UPDATED, | ||
BBPOS_TERMINAL_ERROR_NO_CARD, | ||
BBPOS_TERMINAL_ERROR_NOT_ICC_CARD, | ||
BBPOS_TERMINAL_ERROR_BAD_SWIPE, | ||
BBPOS_TERMINAL_ERROR_MAG_HEAD_FAIL, | ||
BBPOS_TERMINAL_ERROR_NO_AMOUNT, | ||
BBPOS_TERMINAL_ERROR_SWIPED_ICC_CARD, | ||
BBPOS_TERMINAL_ERROR_NOT_IMPLEMENTED, | ||
BBPOS_TERMINAL_ERROR_NO_TAP_ALLOWED, | ||
BBPOS_TERMINAL_ERROR_REINSERT_CARD, | ||
BBPOS_TERMINAL_ERROR_COMM_LINK_INITIALIZED, | ||
BBPOS_TERMINAL_ERROR_UNKNOWN, | ||
}; | ||
|
||
/* Reader Display Messages */ | ||
typedef NS_ENUM(NSInteger, TerminalsDisplayMessage) | ||
{ | ||
TERMINAL_DISPLAY_MESSAGE_APPROVED, | ||
TERMINAL_DISPLAY_MESSAGE_CALL_YOUR_BANK, | ||
TERMINAL_DISPLAY_MESSAGE_DECLINED, | ||
TERMINAL_DISPLAY_MESSAGE_ENTER_AMOUNT, | ||
TERMINAL_DISPLAY_MESSAGE_ENTER_PIN, | ||
TERMINAL_DISPLAY_MESSAGE_INCORRECT_PIN, | ||
TERMINAL_DISPLAY_MESSAGE_NOT_ACCEPTED, | ||
TERMINAL_DISPLAY_MESSAGE_PIN_OK, | ||
TERMINAL_DISPLAY_MESSAGE_PLEASE_WAIT, | ||
TERMINAL_DISPLAY_MESSAGE_REMOVE_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_USE_MAG_STRIPE, | ||
TERMINAL_DISPLAY_MESSAGE_TRY_AGAIN, | ||
TERMINAL_DISPLAY_MESSAGE_REFER_TO_YOUR_PAYMENT_DEVICE, | ||
TERMINAL_DISPLAY_MESSAGE_TRANSACTION_TERMINATED, | ||
TERMINAL_DISPLAY_MESSAGE_PROCESSING, | ||
TERMINAL_DISPLAY_MESSAGE_LAST_PIN_TRY, | ||
TERMINAL_DISPLAY_MESSAGE_SELECT_AMOUNT, | ||
TERMINAL_DISPLAY_MESSAGE_PRESENT_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_APPROVED_PLEASE_SIGN, | ||
TERMINAL_DISPLAY_MESSAGE_PRESENT_CARD_AGAIN, | ||
TERMINAL_DISPLAY_MESSAGE_AUTHORISING, | ||
TERMINAL_DISPLAY_MESSAGE_INSERT_SWIPE_OR_TRY_ANOTHER_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_INSERT_OR_SWIPE_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_MULTIPLE_CARDS_DETECTED, | ||
TERMINAL_DISPLAY_MESSAGE_TIMEOUT, | ||
TERMINAL_DISPLAY_MESSAGE_APPLICATION_EXPIRED, | ||
TERMINAL_DISPLAY_MESSAGE_FINAL_CONFIRM, | ||
TERMINAL_DISPLAY_MESSAGE_SHOW_THANK_YOU, | ||
TERMINAL_DISPLAY_MESSAGE_PIN_TRY_LIMIT_EXCEEDED, | ||
TERMINAL_DISPLAY_MESSAGE_NOT_ICC_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_CARD_INSERTED, | ||
TERMINAL_DISPLAY_MESSAGE_CARD_REMOVED, | ||
TERMINAL_DISPLAY_MESSAGE_NO_EMV_APPS, | ||
TERMINAL_DISPLAY_MESSAGE_INSERT_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_SWIPE_OR_INSERT_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_INSERT_OR_TAP_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_SWIPE_OR_INSERT_OR_TAP_CARD, | ||
TERMINAL_DISPLAY_MESSAGE_ERROR, | ||
TERMINAL_DISPLAY_MESSAGE_REQUEST_BLUETOOTH, | ||
TERMINAL_DISPLAY_MESSAGE_CARD_ALREADY_INSERTED, | ||
TERMINAL_DISPLAY_MESSAGE_CARD_A_STOP_CARD_READER, | ||
TERMINAL_DISPLAY_MESSAGE_DEBUG, | ||
TERMINAL_DISPLAY_MESSAGE_RESULT_MESSAGE, | ||
TERMINAL_DISPLAY_MESSAGE_SHOW, | ||
TERMINAL_DISPLAY_MESSAGE_BATTERY_LOW, | ||
TERMINAL_DISPLAY_MESSAGE_BATTERY_CRITICALLY_LOW | ||
}; | ||
|
||
#endif /* BBPOSEnums_h */ |
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,15 @@ | ||
// | ||
// BBPOSMacros.h | ||
// BBPOS | ||
// | ||
|
||
#ifndef BBPOSMacros_h | ||
#define BBPOSMacros_h | ||
|
||
#if DEBUG | ||
#define ENABLE_TERMINAL_LOGS YES | ||
#else | ||
#define ENABLE_TERMINAL_LOGS NO | ||
#endif | ||
|
||
#endif /* BBPOSMacros_h */ |
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,27 @@ | ||
// | ||
// BBPOSTerminalController.h | ||
// BBPOS | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <EMVCore/TerminalControllerProtocol.h> | ||
#import <EMVCore/TerminalDelegate.h> | ||
|
||
@class TransactionConfiguration; | ||
|
||
@interface BBPOSTerminalController : NSObject<TerminalControllerProtocol, TerminalDelegate> | ||
|
||
#pragma mark - Properties | ||
|
||
@property (nonatomic, strong) TerminalRequest *terminalRequest; | ||
|
||
#pragma mark - Methods | ||
|
||
- (instancetype)init NS_UNAVAILABLE; | ||
+ (instancetype)sharedInstance; | ||
- (id<TerminalControllerProtocol>)initializeWith:(TerminalType)terminalType | ||
withTerminal:(TerminalConfiguration *)terminalConfiguration | ||
andConfig:(TransactionConfiguration *)transactionConfig | ||
withDelegate:(id<TerminalDelegate>)delegate; | ||
|
||
@end |
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,15 @@ | ||
// | ||
// BBPOSTerminalControllerFactory.h | ||
// BBPOS | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <EMVCore/EMVCore.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface BBPOSTerminalControllerFactory : NSObject<TerminalControllerFactory> | ||
|
||
@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 BBPOS { | ||
umbrella header "BBPOS.h" | ||
|
||
export * | ||
module * { export * } | ||
} |