├── docs ├── img │ ├── gh.png │ ├── carat.png │ └── dash.png ├── docsets │ ├── goSellSDK.tgz │ └── goSellSDK.docset │ │ └── Contents │ │ ├── Resources │ │ ├── docSet.dsidx │ │ └── Documents │ │ │ ├── img │ │ │ ├── gh.png │ │ │ ├── carat.png │ │ │ └── dash.png │ │ │ └── badge.svg │ │ └── Info.plist └── badge.svg ├── sar-Regular.ttf ├── Example ├── goSellSDKExample │ ├── Resources │ │ └── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ ├── gosell_icon_20.png │ │ │ ├── gosell_icon_29.png │ │ │ ├── gosell_icon_40.png │ │ │ ├── gosell_icon_58.png │ │ │ ├── gosell_icon_60.png │ │ │ ├── gosell_icon_76.png │ │ │ ├── gosell_icon_80.png │ │ │ ├── gosell_icon_87.png │ │ │ ├── gosell_icon_1024.png │ │ │ ├── gosell_icon_120.png │ │ │ ├── gosell_icon_152.png │ │ │ ├── gosell_icon_167.png │ │ │ ├── gosell_icon_180.png │ │ │ ├── gosell_icon_40-1.png │ │ │ ├── gosell_icon_40-2.png │ │ │ ├── gosell_icon_58-1.png │ │ │ ├── gosell_icon_80-1.png │ │ │ └── gosell_icon_120-1.png │ │ │ ├── ic_checkmark.imageset │ │ │ ├── ic_checkmark.png │ │ │ ├── ic_checkmark@2x.png │ │ │ ├── ic_checkmark@3x.png │ │ │ └── Contents.json │ │ │ └── background.imageset │ │ │ ├── 5840375-nissan-gtr-iphone-6-wallpaper.jpg │ │ │ └── Contents.json │ ├── Protocols │ │ ├── TaxViewControllerDelegate.swift │ │ ├── SettingsTableViewControllerDelegate.swift │ │ ├── ShippingViewControllerDelegate.swift │ │ ├── CustomerViewControllerDelegate.swift │ │ ├── DestinationViewControllerDelegate.swift │ │ ├── PaymentItemViewControllerDelegate.swift │ │ ├── CaseSelectionTableViewControllerDelegate.swift │ │ ├── CustomersListViewControllerDelegate.swift │ │ └── SeguePresenter.swift │ ├── goSellSDKExample.entitlements │ ├── Models │ │ ├── TableViewCellModel.swift │ │ ├── GroupHeaderCellModel.swift │ │ ├── PaymentItemTableViewCellModel.swift │ │ └── Settings │ │ │ └── GlobalSettings.swift │ ├── Cells │ │ ├── FontTableViewCell.swift │ │ ├── ColorTableViewCell.swift │ │ ├── TitleTableViewCell.swift │ │ ├── GroupHeaderCell.swift │ │ ├── SelectableCell.swift │ │ ├── ShippingTableViewCell.swift │ │ ├── DestinationTableViewCell.swift │ │ └── TaxTableViewCell.swift │ ├── Extensions │ │ ├── Currency+Additions.swift │ │ ├── Encodable+Additions.swift │ │ ├── Decodable+Additions.swift │ │ └── Measurement+Additions.swift │ └── Utils │ │ └── SerializationHelper.swift ├── goSellSDKExample.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── goSellSDKExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Podfile ├── Gemfile ├── goSellSDK ├── Core │ ├── UI │ │ ├── Internal │ │ │ ├── Resources │ │ │ │ ├── Colors.xcassets │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── AsyncLabelColors.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── DefaultCellColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── OTPHolderColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── SaveCardLabelColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── CardInputTextFieldColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── CurrencyHolderViewColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── DefaultCardSeparatorColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── DefaultSeparatorCellColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── SaveCardSwitchTintColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── SavedCardCellBackgroundColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Images.xcassets │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── ic_bill.imageset │ │ │ │ │ │ ├── ic_bill.png │ │ │ │ │ │ ├── ic_bill@2x.png │ │ │ │ │ │ ├── ic_bill@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_close.imageset │ │ │ │ │ │ ├── ic_close.png │ │ │ │ │ │ ├── ic_close@2x.png │ │ │ │ │ │ ├── ic_close@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_x_red.imageset │ │ │ │ │ │ ├── ic_x_red.png │ │ │ │ │ │ ├── ic_x_red@2x.png │ │ │ │ │ │ ├── ic_x_red@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── btn_scan_icon.imageset │ │ │ │ │ │ ├── btn_scan_icon.png │ │ │ │ │ │ ├── btn_scan_icon@2x.png │ │ │ │ │ │ ├── btn_scan_icon@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── btn_security.imageset │ │ │ │ │ │ ├── btn_security.png │ │ │ │ │ │ ├── btn_security@2x.png │ │ │ │ │ │ ├── btn_security@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_arrow_left.imageset │ │ │ │ │ │ ├── ic_arrow_left.png │ │ │ │ │ │ ├── ic_arrow_left@2x.png │ │ │ │ │ │ ├── ic_arrow_left@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_checkmark.imageset │ │ │ │ │ │ ├── ic_checkmark.png │ │ │ │ │ │ ├── ic_checkmark@2x.png │ │ │ │ │ │ ├── ic_checkmark@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_close_otp.imageset │ │ │ │ │ │ ├── ic_close_otp.png │ │ │ │ │ │ ├── ic_close_otp@2x.png │ │ │ │ │ │ ├── ic_close_otp@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── btn_scan_frame.imageset │ │ │ │ │ │ ├── btn_scan_frame.png │ │ │ │ │ │ ├── btn_scan_frame@2x.png │ │ │ │ │ │ ├── btn_scan_frame@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_arrow_right.imageset │ │ │ │ │ │ ├── ic_arrow_right.png │ │ │ │ │ │ ├── ic_arrow_right@2x.png │ │ │ │ │ │ ├── ic_arrow_right@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ApplePaySetUp.imageset │ │ │ │ │ │ ├── ApplePay-SetUp_2x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── delete_card_icon.imageset │ │ │ │ │ │ ├── delete_card_icon.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ApplePayMark.imageset │ │ │ │ │ │ ├── Apple_Pay_Mark Copy 3@2x.png │ │ │ │ │ │ ├── Apple_Pay_Mark Copy 3@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_checkmark_green.imageset │ │ │ │ │ │ ├── ic_checkmark_green.png │ │ │ │ │ │ ├── ic_checkmark_green@2x.png │ │ │ │ │ │ ├── ic_checkmark_green@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── ic_checkmark_green_small.imageset │ │ │ │ │ │ ├── ic_checkmark_green_small.png │ │ │ │ │ │ ├── ic_checkmark_green_small@2x.png │ │ │ │ │ │ ├── ic_checkmark_green_small@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── SetupApplePaySplash.imageset │ │ │ │ │ │ ├── 4.Setup Apple PayPay_Splash_2@2x.png │ │ │ │ │ │ ├── 4.Setup Apple PayPay_Splash_2@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── ic_merchant_logo_placeholder.imageset │ │ │ │ │ │ ├── ic_merchant_logo_placeholder.png │ │ │ │ │ │ ├── ic_merchant_logo_placeholder@2x.png │ │ │ │ │ │ ├── ic_merchant_logo_placeholder@3x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ └── sar-Regular.ttf │ │ │ ├── View Models │ │ │ │ ├── ViewModel.swift │ │ │ │ ├── CardInputTableViewCellModel+AddressInput.swift │ │ │ │ ├── CellViewModel.swift │ │ │ │ ├── CollectionViewCellViewModel.swift │ │ │ │ ├── EmptyTableViewCellModel.swift │ │ │ │ ├── GroupTableViewCellModel.swift │ │ │ │ ├── TableViewCellViewModel.swift │ │ │ │ └── GroupWithButtonTableViewCellModel.swift │ │ │ ├── Enums │ │ │ │ ├── TextInputType.swift │ │ │ │ ├── ViewControllerOperation.swift │ │ │ │ ├── OTPTimerState.swift │ │ │ │ ├── ValidationType.swift │ │ │ │ ├── Image.swift │ │ │ │ ├── StatusBarStyle.swift │ │ │ │ ├── PaymentStatus.swift │ │ │ │ ├── AppearanceMode.swift │ │ │ │ └── LocalizedTextAlignment.swift │ │ │ ├── Protocols │ │ │ │ ├── SortableByOrder.swift │ │ │ │ ├── Transformable.swift │ │ │ │ ├── Filterable.swift │ │ │ │ ├── FilterableByCurrency.swift │ │ │ │ ├── InternalSessionProtocol.swift │ │ │ │ ├── Singleton.swift │ │ │ │ ├── ListValue.swift │ │ │ │ ├── NavigationContentViewController.swift │ │ │ │ ├── TextInputDataValidation.swift │ │ │ │ ├── InteractivePopViewController.swift │ │ │ │ ├── CardAddressDataStorage.swift │ │ │ │ ├── CountrySelectionViewControllerDelegate.swift │ │ │ │ ├── CurrencySelectionViewControllerDelegate.swift │ │ │ │ ├── ViewControllerLayoutListener.swift │ │ │ │ ├── CardValidatorDelegate.swift │ │ │ │ ├── PopupPresentationSupport.swift │ │ │ │ ├── AddressFieldsDataManagerLoadingListener.swift │ │ │ │ ├── CardBrandChangeReporting.swift │ │ │ │ ├── DataValidation.swift │ │ │ │ ├── BindingWithModelCell.swift │ │ │ │ ├── WebPaymentContentViewControllerDelegate.swift │ │ │ │ ├── CardScannerViewControllerDelegate.swift │ │ │ │ ├── LoadingWithModelCell.swift │ │ │ │ ├── TapButtonDelegate.swift │ │ │ │ ├── OTPViewControllerDelegate.swift │ │ │ │ ├── CardAddressInputListener.swift │ │ │ │ ├── StaticlyDestroyable.swift │ │ │ │ ├── PaymentOptionCellViewModel.swift │ │ │ │ ├── PopupOverlaySupport.swift │ │ │ │ ├── ThemeObserver.swift │ │ │ │ ├── LocalizationObserver.swift │ │ │ │ ├── InstantiatableFromStoryboard.swift │ │ │ │ ├── CardCollectionViewCellLoading.swift │ │ │ │ ├── SetupApplePayViewControllerDelegate.swift │ │ │ │ ├── TextLabelInputDataValidation.swift │ │ │ │ ├── DataManagerWithFilteredData.swift │ │ │ │ └── LayoutDirectionObserver.swift │ │ │ ├── Extensions │ │ │ │ ├── Equatable+Additions.swift │ │ │ │ ├── Comparable+Additions.swift │ │ │ │ ├── UIImage+Additions.swift │ │ │ │ ├── UIWindow.Level+Additions.swift │ │ │ │ ├── String+Additions.swift │ │ │ │ ├── TapSearchView+Additions.swift │ │ │ │ ├── AddressType+Additions.swift │ │ │ │ ├── NSTextAlignment+Additions.swift │ │ │ │ ├── UIButton+Additions.swift │ │ │ │ ├── UIEdgeInsets+Additions.swift │ │ │ │ ├── UIColor+Additions.swift │ │ │ │ ├── AmountedCurrency+Additions.swift │ │ │ │ ├── Bundle+Additions.swift │ │ │ │ ├── UIView+Additions.swift │ │ │ │ ├── EditableTextInsetsTextField+Additions.swift │ │ │ │ ├── UILabel+Additions.swift │ │ │ │ ├── BillingAddressField+Additions.swift │ │ │ │ └── UIStoryboard+Additions.swift │ │ │ ├── Views │ │ │ │ ├── MaskedWindow │ │ │ │ │ ├── MaskedWindowContentProvider.swift │ │ │ │ │ └── MaskedWindow.swift │ │ │ │ ├── OTPInputView │ │ │ │ │ └── OTPInputViewDelegate.swift │ │ │ │ ├── TapNavigationView │ │ │ │ │ ├── TapNavigationViewDataSource.swift │ │ │ │ │ └── TapNavigationViewDelegate.swift │ │ │ │ └── LoadingView │ │ │ │ │ └── LoadingViewSupport.swift │ │ │ ├── Theme │ │ │ │ ├── ThemesContainer.swift │ │ │ │ ├── WebCellStyle.swift │ │ │ │ ├── GroupCellStyle.swift │ │ │ │ ├── KeyboardAppearance.swift │ │ │ │ ├── SavedCardStyle.swift │ │ │ │ ├── IconStyle.swift │ │ │ │ ├── GroupWithButtonCellStyle.swift │ │ │ │ ├── BlurSettings.swift │ │ │ │ ├── GlowStyle.swift │ │ │ │ ├── CaseSelectionCellStyle.swift │ │ │ │ ├── ResourceImage.swift │ │ │ │ ├── SearchBarStyle.swift │ │ │ │ ├── CommonImages.swift │ │ │ │ ├── CurrencySelectionCellStyle.swift │ │ │ │ ├── StatusPopupStyle.swift │ │ │ │ ├── SaveCardStyle.swift │ │ │ │ ├── HexColor.swift │ │ │ │ ├── CardCellStyle.swift │ │ │ │ ├── NavigationBarStyle.swift │ │ │ │ ├── AppearanceStyle.swift │ │ │ │ ├── TapButtonStyle.swift │ │ │ │ ├── PaymentOptionCellsStyle.swift │ │ │ │ ├── CommonStyle.swift │ │ │ │ └── TextStyle.swift │ │ │ ├── Utils │ │ │ │ ├── WeaklyWrapped.swift │ │ │ │ ├── WrappedAndTypeErased.swift │ │ │ │ ├── LocalizedParagraphStyle.swift │ │ │ │ ├── BrandWithScheme.swift │ │ │ │ └── TapEdgeInsets.swift │ │ │ ├── Process │ │ │ │ ├── ProcessHandlerInterface.swift │ │ │ │ ├── ProcessMode.swift │ │ │ │ ├── Process.Wrapped.swift │ │ │ │ └── Process.AddressInputHandler.swift │ │ │ ├── Cells │ │ │ │ ├── Table View │ │ │ │ │ ├── EmptyTableViewCell.swift │ │ │ │ │ ├── PaymentCellSeprator.swift │ │ │ │ │ ├── PaymentCardCellSeprator.swift │ │ │ │ │ └── GroupTableViewCell.swift │ │ │ │ └── Collection View │ │ │ │ │ └── BaseCollectionViewCell.swift │ │ │ └── Data │ │ │ │ └── WebPaymentURLDecision.swift │ │ └── Public │ │ │ ├── Protocols │ │ │ └── SessionProtocol.swift │ │ │ ├── Enums │ │ │ ├── SDKLightDarkMode.swift │ │ │ └── SDKAppearanceMode.swift │ │ │ └── Extensions │ │ │ ├── SeparateWindowRootViewController+Additions.swift │ │ │ └── TapFont+Additions.swift │ └── API │ │ ├── Public │ │ ├── Models │ │ │ ├── Metadata.swift │ │ │ ├── Acquirer.swift │ │ │ ├── AuthorizeActionResponse.swift │ │ │ ├── Transfer.swift │ │ │ └── SecretKey.swift │ │ └── Enums │ │ │ ├── SDKMode.swift │ │ │ └── cardType.swift │ │ └── Internal │ │ ├── Protocols │ │ ├── EmptyInitializable.swift │ │ ├── CreateTokenRequest.swift │ │ ├── InitializableWithString.swift │ │ ├── Retrievable.swift │ │ ├── AuthorizeProtocol.swift │ │ ├── OptionallyIdentifiableWithString.swift │ │ ├── ProportionalToOrigin.swift │ │ ├── Authenticatable.swift │ │ └── IdentifiableWithString.swift │ │ ├── Enums │ │ ├── InitializationStatus.swift │ │ ├── AddressFormat.swift │ │ ├── ErrorAction.swift │ │ ├── InternalError.swift │ │ ├── TapSerializationError.swift │ │ ├── CardScheme.swift │ │ └── CardType.swift │ │ ├── Models │ │ ├── BillingAddressFormat.swift │ │ ├── SDKSettings.swift │ │ ├── DeleteCardResponse.swift │ │ ├── Order.swift │ │ ├── ListCardsResponse.swift │ │ ├── AddressField.swift │ │ ├── CreateCardRequest.swift │ │ ├── AuthenticationRequest.swift │ │ ├── BillingAddressField.swift │ │ ├── Merchant.swift │ │ ├── CreateTokenApplePay.swift │ │ ├── CreateTokenWithCardDataRequest.swift │ │ ├── TopupChargeModel.swift │ │ ├── InternalSDKSettings.swift │ │ ├── CreateTokenWithSavedCardRequest.swift │ │ ├── CreateCardVerificationRequest.swift │ │ └── CreateTokenSavedCard.swift │ │ ├── Client │ │ └── APIClient+Retrievable.swift │ │ └── Utils │ │ └── ErrorUtils.swift ├── ErrorReporting │ └── Internal │ │ └── Extensions │ │ ├── ErrorAction+ErrorReporting.swift │ │ └── InterfaceOrientationManager+ErrorReporting.swift ├── goSellSDK.h └── Info.plist ├── .jazzy.yaml ├── goSellSDK.xcodeproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── goSellSDK.xcworkspace ├── xcshareddata │ ├── WorkspaceSettings.xcsettings │ └── IDEWorkspaceChecks.plist └── contents.xcworkspacedata ├── Podfile └── LICENSE /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/img/gh.png -------------------------------------------------------------------------------- /sar-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/sar-Regular.ttf -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/docsets/goSellSDK.tgz -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '1.7.0.beta.3' 4 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/sar-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/sar-Regular.ttf -------------------------------------------------------------------------------- /.jazzy.yaml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - "Example" 3 | min_acl: public 4 | xcodebuild_arguments: 5 | - clean 6 | - -workspace 7 | - goSellSDK.xcworkspace 8 | - -scheme 9 | - goSellSDK -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/docsets/goSellSDK.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/docs/docsets/goSellSDK.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/ic_bill@3x.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_20.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_29.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_58.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_60.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_76.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_80.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_87.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/ic_close@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/ic_x_red@3x.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_1024.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_120.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_152.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_167.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_180.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40-1.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_40-2.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_58-1.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_80-1.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/AppIcon.appiconset/gosell_icon_120-1.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark@2x.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/ic_checkmark@3x.png -------------------------------------------------------------------------------- /goSellSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/btn_security@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/ic_checkmark@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/ic_close_otp@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/ViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Base view model. 9 | internal class ViewModel {} 10 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Public/Models/Metadata.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Metadata.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Metadata object. 9 | public typealias Metadata = [String: String] 10 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePaySetUp.imageset/ApplePay-SetUp_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePaySetUp.imageset/ApplePay-SetUp_2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/btn_scan_frame@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/btn_scan_icon@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/ic_arrow_left@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/ic_arrow_right@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/delete_card_icon.imageset/delete_card_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/delete_card_icon.imageset/delete_card_icon.png -------------------------------------------------------------------------------- /Example/goSellSDKExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /goSellSDK.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePayMark.imageset/Apple_Pay_Mark Copy 3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePayMark.imageset/Apple_Pay_Mark Copy 3@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePayMark.imageset/Apple_Pay_Mark Copy 3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePayMark.imageset/Apple_Pay_Mark Copy 3@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/ic_checkmark_green@3x.png -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/background.imageset/5840375-nissan-gtr-iphone-6-wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/Example/goSellSDKExample/Resources/Assets.xcassets/background.imageset/5840375-nissan-gtr-iphone-6-wallpaper.jpg -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/EmptyInitializable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyInitializable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol EmptyInitializable { 9 | 10 | init() 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/TextInputType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextInputType.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum TextInputType { 9 | 10 | case text 11 | case digits 12 | } 13 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/SortableByOrder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SortableByOrder.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol SortableByOrder { 9 | 10 | var orderBy: Int { get } 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/Transformable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Transformable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol Transformable { 9 | 10 | init?(untransformedValue: Any?) 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/SetupApplePaySplash.imageset/4.Setup Apple PayPay_Splash_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/SetupApplePaySplash.imageset/4.Setup Apple PayPay_Splash_2@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/SetupApplePaySplash.imageset/4.Setup Apple PayPay_Splash_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/SetupApplePaySplash.imageset/4.Setup Apple PayPay_Splash_2@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/ic_checkmark_green_small@3x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/Filterable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Filterable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol Filterable { 9 | 10 | func matchesFilter(_ filterText: String) -> Bool 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder.png -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/CreateTokenRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateTokenRequest.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol CreateTokenRequest: Encodable { 9 | 10 | var route: Route { get } 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/InitializableWithString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InitializableWithString.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol InitializableWithString { 9 | 10 | init?(string: String) 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder@2x.png -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tap-Payments/goSellSDK-iOS/HEAD/goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/ic_merchant_logo_placeholder@3x.png -------------------------------------------------------------------------------- /goSellSDK.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/ViewControllerOperation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewControllerOperation.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum ViewControllerOperation { 9 | 10 | case presentation 11 | case dismissal 12 | } 13 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/FilterableByCurrency.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FilterableByCurrency.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol FilterableByCurrency { 9 | 10 | var supportedCurrencies: [Currency] { get } 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/Retrievable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Retrievable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol Retrievable: IdentifiableWithString, Decodable { 9 | 10 | static var retrieveRoute: Route { get } 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/CardInputTableViewCellModel+AddressInput.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardInputTableViewCellModel+AddressInput.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension CardInputTableViewCellModel { 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/OTPTimerState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OTPTimerState.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum OTPTimerState { 9 | 10 | case ticking(TimeInterval) 11 | case notTicking 12 | case attemptsFinished 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/ErrorReporting/Internal/Extensions/ErrorAction+ErrorReporting.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorAction+ErrorReporting.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension ErrorAction { 9 | 10 | static let report = ErrorAction(rawValue: 1 << 3) 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Enums/InitializationStatus.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InitializationStatus.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum InitializationStatus { 9 | 10 | case notInitiated 11 | case initiated 12 | case succeed 13 | } 14 | -------------------------------------------------------------------------------- /Example/goSellSDKExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/goSellSDKExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /goSellSDK.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/InternalSessionProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InternalSessionProtocol.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol InternalSessionProtocol: SessionProtocol { 9 | 10 | var externalSession: SessionProtocol { get } 11 | } 12 | -------------------------------------------------------------------------------- /Example/goSellSDKExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/Singleton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Singleton.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol Singleton: ClassProtocol { 11 | 12 | static var shared: Self { get } 13 | } 14 | -------------------------------------------------------------------------------- /Example/goSellSDKExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/AuthorizeProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthorizeProtocol.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol AuthorizeProtocol: ChargeProtocol { 9 | 10 | /// Authorize action. 11 | var authorizeAction: AuthorizeActionResponse { get } 12 | } 13 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/ListValue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListValue.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// List value protocol. 9 | internal protocol ListValue: Filterable { 10 | 11 | var displayValue: String { get } 12 | var displayInTheListValue: String { get } 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/NavigationContentViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationContentViewController.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | internal protocol NavigationContentViewController { 11 | 12 | var contentTopOffset: CGFloat { get } 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/ValidationType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ValidationType.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum ValidationType { 9 | 10 | case cardNumber 11 | case expirationDate 12 | case cvv 13 | case nameOnCard 14 | case addressOnCard 15 | case saveCard 16 | } 17 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/TextInputDataValidation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextInputDataValidation.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol TextInputDataValidation: DataValidation { 9 | 10 | var textInputFieldText: String { get } 11 | func updateSpecificInputFieldAttributes() 12 | } 13 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/InteractivePopViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InteractivePopViewController.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | @objc internal protocol InteractivePopViewController { 9 | 10 | var interactivePopTransition: UINavigationControllerPopInteractionController? { get } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/Equatable+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Equatable+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension Equatable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Methods 12 | 13 | func tap_isIn(_ array: [Self]) -> Bool { 14 | 15 | return array.contains(self) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardAddressDataStorage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardAddressDataStorage.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CardAddressDataStorage: ClassProtocol { 11 | 12 | func cardInputData(for field: BillingAddressField) -> Any? 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/goSellSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // goSellSDK.h 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | @import Foundation.NSObjCRuntime; 9 | 10 | //! Project version number for goSellSDK. 11 | FOUNDATION_EXPORT double goSellSDKVersionNumber; 12 | 13 | //! Project version string for goSellSDK. 14 | FOUNDATION_EXPORT const unsigned char goSellSDKVersionString[]; 15 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/TaxViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TaxViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.Tax 9 | 10 | internal protocol TaxViewControllerDelegate: class { 11 | 12 | func taxViewController(_ controller: TaxViewController, didFinishWith tax: Tax) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/Comparable+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Comparable+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension Comparable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Methods 12 | 13 | func tap_isIn(_ range: ClosedRange) -> Bool { 14 | 15 | return range.contains(self) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /goSellSDK/ErrorReporting/Internal/Extensions/InterfaceOrientationManager+ErrorReporting.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceOrientationManager+ErrorReporting.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapErrorReportingV2.OrientationHandler 9 | 10 | // MARK: - OrientationHandler 11 | extension InterfaceOrientationManager: OrientationHandler {} 12 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/SettingsTableViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsTableViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol SettingsTableViewControlerDelegate: class { 9 | 10 | func settingsViewController(_ controller: SettingsTableViewController, didFinishWith settings: Settings) 11 | } 12 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/goSellSDKExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.in-app-payments 6 | 7 | merchant.tap.ApplePayTemplate 8 | merchant.tap.gosell 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Views/MaskedWindow/MaskedWindowContentProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskedWindowContentProvider.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import class UIKit.UIView.UIView 10 | 11 | internal protocol MaskedWindowContentProvider: ClassProtocol { 12 | 13 | var mask: UIView { get } 14 | } 15 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Enums/AddressFormat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddressFormat.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Address format enum. 9 | /// 10 | /// - a: Format A. 11 | /// - b: Format B. 12 | /// - c: Format C. 13 | internal enum AddressFormat: String, Codable { 14 | 15 | case a = "FORMAT_A" 16 | case b = "FORMAT_B" 17 | case c = "FORMAT_C" 18 | } 19 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/ShippingViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShippingViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.Shipping 9 | 10 | internal protocol ShippingViewControllerDelegate: class { 11 | 12 | func shippingViewController(_ controller: ShippingViewController, didFinishWith shipping: Shipping) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Views/OTPInputView/OTPInputViewDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OTPInputViewDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol OTPInputViewDelegate: ClassProtocol { 11 | 12 | func otpInputView(_ otpInputView: OTPInputView, inputStateChanged valid: Bool, wholeOTPAtOnce: Bool) 13 | } 14 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/CustomerViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomerViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.Customer 9 | 10 | internal protocol CustomerViewControllerDelegate: class { 11 | 12 | func customerViewController(_ controller: CustomerViewController, didFinishWith customer: EnvironmentCustomer) 13 | } 14 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/DestinationViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DestinationViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.Destination 9 | 10 | internal protocol DestinationViewControllerDelegate: class { 11 | 12 | func destinationViewController(_ controller: DestinationViewController, didFinishWith destination: Destination) 13 | } 14 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/PaymentItemViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentItemViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.PaymentItem 9 | 10 | internal protocol PaymentItemViewControllerDelegate: class { 11 | 12 | func paymentItemViewController(_ controller: PaymentItemViewController, didFinishWith item: PaymentItem) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIImage+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIImage.UIImage 9 | 10 | internal extension UIImage { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | var tap_asResourceImage: ResourceImage { 16 | 17 | return ResourceImage(data: self.tap_pngData!, scale: scale)! 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/CaseSelectionTableViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CaseSelectionTableViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol CaseSelectionTableViewControllerDelegate: class { 9 | 10 | func caseSelectionViewController(_ controller: CaseSelectionTableViewController, didFinishWith value: CaseSelectionTableViewController.Value) 11 | } 12 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CountrySelectionViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CountrySelectionViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CountrySelectionViewControllerDelegate: ClassProtocol { 11 | 12 | func countriesSelectionViewControllerDidFinish(with country: Country, changed: Bool) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/ThemesContainer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThemesContainer.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct ThemesContainer: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let themes: [Theme] 14 | 15 | // MARK: - Private - 16 | 17 | private enum CodingKeys: String, CodingKey { 18 | 19 | case themes = "themes" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/WebCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct WebCellStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let titleStyle: TextStyle 14 | 15 | // MARK: - Private - 16 | 17 | private enum CodingKeys: String, CodingKey { 18 | 19 | case titleStyle = "title_style" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/CustomersListViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomersListViewControllerDelegate.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.Customer 9 | 10 | internal protocol CustomersListViewControllerDelegate: class { 11 | 12 | func customersListViewController(_ controller: CustomersListViewController, didFinishWith customer: EnvironmentCustomer?) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CurrencySelectionViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CurrencySelectionViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CurrencySelectionViewControllerDelegate: ClassProtocol { 11 | 12 | func currencySelectionViewControllerDidFinish(with currency: AmountedCurrency, changed: Bool) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePaySetUp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ApplePay-SetUp_2x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/delete_card_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "delete_card_icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/GroupCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct GroupCellStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let titleStyle: TextStyle 14 | 15 | // MARK: - Private - 16 | 17 | private enum CodingKeys: String, CodingKey { 18 | 19 | case titleStyle = "title_style" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/OptionallyIdentifiableWithString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OptionallyIdentifiableWithString.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// All models that have identifier are conforming to this protocol. 9 | internal protocol OptionallyIdentifiableWithString { 10 | 11 | // MARK: Properties 12 | 13 | /// Unique identifier of an object. 14 | var identifier: String? { get } 15 | } 16 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/ViewControllerLayoutListener.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewControllerLayoutListener.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import class UIKit.UIViewController.UIViewController 10 | 11 | internal protocol ViewControllerLayoutListener: ClassProtocol { 12 | 13 | func viewControllerViewDidLayoutSubviews(_ viewController: UIViewController) 14 | } 15 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/BillingAddressFormat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BillingAddressFormat.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct BillingAddressFormat: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | /// Address format name. 14 | internal let name: AddressFormat 15 | 16 | /// Address fields. 17 | internal let fields: [BillingAddressField] 18 | } 19 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "5840375-nissan-gtr-iphone-6-wallpaper.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardValidatorDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardValidatorDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CardValidatorDelegate: ClassProtocol { 11 | 12 | func validationStateChanged(to valid: Bool, on type: ValidationType) 13 | 14 | func cardValidator(_ validator: CardValidator, inputDataChanged data: Any?) 15 | } 16 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/PopupPresentationSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PopupPresentationSupport.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.NSLayoutConstraint.NSLayoutConstraint 9 | import class UIKit.UIView.UIView 10 | 11 | internal protocol PopupPresentationSupport { 12 | 13 | var presentationAnimationAnimatingConstraint: NSLayoutConstraint? { get } 14 | var viewToLayout: UIView { get } 15 | } 16 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/ProportionalToOrigin.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProportionalToOrigin.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol ProportionalToOrigin { 9 | 10 | var inUnitsOfOrigin: Decimal { get } 11 | } 12 | 13 | internal extension ProportionalToOrigin { 14 | 15 | func `in`(_ another: Self) -> Decimal { 16 | 17 | return another.inUnitsOfOrigin / self.inUnitsOfOrigin 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/Image.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Image.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIImage.UIImage 9 | 10 | /// Enum representing image with the source to load from. 11 | /// 12 | /// - named: Local image with `name` from `bundle` 13 | /// - remote: Remote image with source url. 14 | internal enum Image: Equatable { 15 | 16 | case named(String, Bundle) 17 | case ready(UIImage) 18 | case remote(URL) 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/AddressFieldsDataManagerLoadingListener.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddressFieldsDataManagerLoadingListener.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol AddressFieldsDataManagerLoadingListener: ClassProtocol { 11 | 12 | func addressFieldsDataManagerDidStartLoadingFormats() 13 | func addressFieldsDataManagerDidStopLoadingFormats() 14 | } 15 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Public/Protocols/SessionProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionProtocol.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Session interface. 9 | @objc public protocol SessionProtocol { 10 | 11 | /// Session data source. 12 | var dataSource: SessionDataSource? { get set } 13 | 14 | /// Session delegate. 15 | var delegate: SessionDelegate? { get set } 16 | 17 | /// Session appearance. 18 | var appearance: SessionAppearance? { get set } 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardBrandChangeReporting.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardBrandChangeReporting.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CardBrandChangeReporting: ClassProtocol { 11 | 12 | func cardNumberValidator(_ validator: CardNumberValidator, cardNumberInputChanged cardNumber: String) 13 | func recognizedCardBrandChanged(_ definedCardBrand: BrandWithScheme) 14 | } 15 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/DataValidation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataValidation.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import class UIKit.UITextField.UITextField 10 | 11 | /// Data validation protocol. 12 | internal protocol DataValidation: ClassProtocol { 13 | 14 | var validationType: ValidationType { get } 15 | 16 | var isDataValid: Bool { get } 17 | 18 | func validate() 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/Authenticatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Authenticatable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol Authenticatable: Decodable { 9 | 10 | /// Unique object identifier. 11 | var identifier: String { get } 12 | 13 | /// Charge authentication if required. 14 | var authentication: Authentication? { get } 15 | 16 | /// Authentication route. 17 | static var authenticationRoute: Route { get } 18 | } 19 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Utils/WeaklyWrapped.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WeaklyWrapped.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal class WeaklyWrapped { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal private(set) weak var object: Object? 16 | 17 | // MARK: Methods 18 | 19 | internal init(_ object: Object) { 20 | 21 | self.object = object 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Process/ProcessHandlerInterface.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProcessHandlerInterface.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol ProcessHandlerInterface: ClassProtocol { 11 | 12 | associatedtype Mode 13 | associatedtype ProcessClass: ProcessGenericInterface where ProcessClass.HandlerMode == Self.Mode 14 | 15 | var process: ProcessClass { get } 16 | 17 | init(process: ProcessClass) 18 | } 19 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/BindingWithModelCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BindingWithModelCell.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol BindingWithModelCell: LoadingWithModelCell { 9 | 10 | var isContentBinded: Bool { get } 11 | 12 | /// Binds cell's content with the model (e.g. setting up table view data source with the model ). 13 | func bindContent() 14 | 15 | /// Unbinds cell's content from the model. 16 | func unbindContent() 17 | } 18 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/WebPaymentContentViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebPaymentContentViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import struct CoreGraphics.CGGeometry.CGPoint 9 | import protocol TapAdditionsKitV2.ClassProtocol 10 | 11 | internal protocol WebPaymentContentViewControllerDelegate: ClassProtocol { 12 | 13 | func webPaymentContentViewControllerRequestedDismissal(_ controller: WebPaymentContentViewController) 14 | } 15 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ApplePayMark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Apple_Pay_Mark Copy 3@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "Apple_Pay_Mark Copy 3@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardScannerViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardScannerViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol CardScannerViewControllerDelegate: ClassProtocol { 11 | 12 | func cardScannerController(_ scannerController: CardScannerViewController, didScan cardNumber: String?, expirationDate: ExpirationDate?, cvv: String?, cardholderName: String?) 13 | } 14 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_bill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_bill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_bill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_bill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_close.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_close@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_close@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_x_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_x_red.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_x_red@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_x_red@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Utils/WrappedAndTypeErased.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WrappedAndTypeErased.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal final class WrappedAndTypeErased { 9 | 10 | internal func unwrapped() -> T? { 11 | 12 | return self.erasedTypeObject as? T 13 | } 14 | 15 | internal init(_ object: T) { 16 | 17 | self.erasedTypeObject = object 18 | } 19 | 20 | // MARK: - Private - 21 | // MARK: Properties 22 | 23 | private let erasedTypeObject: Any 24 | } 25 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Models/TableViewCellModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewCellModel.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UITableViewCell.UITableViewCell 9 | 10 | internal class TableViewCellModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal var isSelected = false 16 | 17 | internal class var cellClass: UITableViewCell.Type { 18 | 19 | return UITableViewCell.self 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/SDKSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SDKSettings.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// goSell SDK Settings model. 9 | internal class SDKSettings: Decodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Data. 15 | internal var data: SDKSettingsData? 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case data = "data" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/FontTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIFont.UIFont 9 | 10 | internal class FontTableViewCell: TitleTableViewCell { 11 | 12 | // MARK: - Internal - 13 | // MARK: Methods 14 | 15 | internal func setFont(_ font: String) { 16 | 17 | let uiFont = UIFont(name: font, size: 17.0)! 18 | self.setTitle(uiFont.familyName) 19 | 20 | self.titleTextLabel?.font = uiFont 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/CellViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CellViewModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UITableView.UITableView 9 | 10 | internal class CellViewModel: ViewModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal var indexPath: IndexPath 16 | 17 | // MARK: Methods 18 | 19 | internal init(indexPath: IndexPath) { 20 | 21 | self.indexPath = indexPath 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Extensions/Currency+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Currency+Additions.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import Foundation 9 | import class goSellSDK.Currency 10 | 11 | internal extension Currency { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | var localizedSymbol: String { 17 | 18 | return (Locale.current as NSLocale).displayName(forKey: .currencySymbol, value: self.isoCode) ?? self.isoCode 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Resources/Assets.xcassets/ic_checkmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_checkmark.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_checkmark@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_checkmark@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/SetupApplePaySplash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "4.Setup Apple PayPay_Splash_2@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "4.Setup Apple PayPay_Splash_2@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_security.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "btn_security.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "btn_security@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "btn_security@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_checkmark.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_checkmark@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_checkmark@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_close_otp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_close_otp.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_close_otp@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_close_otp@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/KeyboardAppearance.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardAppearance.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import enum UIKit.UITextInputTraits.UIKeyboardAppearance 9 | 10 | internal enum KeyboardAppearance: String, Decodable { 11 | 12 | case light = "light" 13 | 14 | // MARK: - Internal - 15 | // MARK: Properties 16 | 17 | internal var uiKeyboardAppearance: UIKeyboardAppearance { 18 | 19 | switch self { 20 | 21 | case .light: return .light 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIWindow.Level+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow.Level+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIWindow.UIWindow 9 | 10 | #if !swift(>=4.2) 11 | import var UIKit.UIWindow.UIWindowLevelStatusBar 12 | #endif 13 | 14 | internal extension UIWindow.Level { 15 | 16 | static var tap_statusBar: UIWindow.Level { 17 | 18 | #if swift(>=4.2) 19 | return .statusBar 20 | #else 21 | return UIWindowLevelStatusBar 22 | #endif 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "btn_scan_icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "btn_scan_icon@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "btn_scan_icon@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_left.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_arrow_left.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_arrow_left@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_arrow_left@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/btn_scan_frame.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "btn_scan_frame.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "btn_scan_frame@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "btn_scan_frame@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_arrow_right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_arrow_right.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_arrow_right@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_arrow_right@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/LoadingWithModelCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingWithModelCell.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol LoadingWithModelCell: ClassProtocol { 11 | 12 | associatedtype ModelType = CellViewModel 13 | 14 | /// Reference to the model. 15 | var model: ModelType? { get set } 16 | 17 | /// Updates content of the receiver, optionally animated. 18 | func updateContent(animated: Bool) 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/TapButtonDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapButtonDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol TapButtonDelegate: ClassProtocol { 11 | 12 | // MARK: Properties 13 | 14 | var canBeHighlighted: Bool { get } 15 | 16 | // MARK: Methods 17 | 18 | func buttonTouchUpInside() 19 | 20 | func securityButtonTouchUpInside() 21 | 22 | func disabledButtonTouchUpInside() 23 | } 24 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/SavedCardStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SavedCardStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct SavedCardStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let cardNumber: TextStyle 14 | 15 | internal let checkmarkIcon: ResourceImage 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case cardNumber = "number_style" 22 | case checkmarkIcon = "checkmark_icon" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/OTPViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OTPViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol OTPViewControllerDelegate: ClassProtocol { 11 | 12 | func otpViewControllerResendButtonTouchUpInside(_ controller: OTPViewController) 13 | func otpViewController(_ controller: OTPViewController, didEnter code: String) 14 | func otpViewControllerDidCancel(_ controller: OTPViewController) 15 | } 16 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_checkmark_green.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_checkmark_green@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_checkmark_green@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Enums/ErrorAction.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorAction.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Error action. 9 | internal struct ErrorAction: OptionSet { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | internal let rawValue: Int 15 | 16 | internal static let retry = ErrorAction(rawValue: 1 ) 17 | internal static let alert = ErrorAction(rawValue: 1 << 1) 18 | internal static let closePayment = ErrorAction(rawValue: 1 << 2) 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/IconStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IconStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | internal struct IconStyle: Decodable { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal let placeholder: ResourceImage? 16 | 17 | internal let cornerRadius: CGFloat 18 | 19 | // MARK: - Private - 20 | 21 | private enum CodingKeys: String, CodingKey { 22 | 23 | case placeholder = "placeholder" 24 | case cornerRadius = "corner_radius" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Public/Models/Acquirer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Acquirer.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Acquirer information class. 9 | @objcMembers public final class Acquirer: NSObject, Decodable { 10 | 11 | // MARK: - Public - 12 | // MARK: Properties 13 | 14 | /// Acquirer response. 15 | public private(set) var response: Response? 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case response = "response" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/StatusBarStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusBarStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import enum UIKit.UIApplication.UIStatusBarStyle 9 | 10 | internal enum StatusBarStyle: String, Decodable { 11 | 12 | case light = "light" 13 | case dark = "dark" 14 | 15 | // MARK: - Internal - 16 | // MARK: Properties 17 | 18 | internal var uiStatusBarStyle: UIStatusBarStyle { 19 | 20 | switch self { 21 | 22 | case .light: return .lightContent 23 | case .dark: return .default 24 | 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_checkmark_green_small.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_checkmark_green_small.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_checkmark_green_small@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_checkmark_green_small@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/GroupWithButtonCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupWithButtonCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct GroupWithButtonCellStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let titleStyle: TextStyle 14 | 15 | internal let buttonTitleStyle: TextStyle 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case titleStyle = "title_style" 22 | case buttonTitleStyle = "button_title_style" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/DeleteCardResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteCardResponse.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct DeleteCardResponse: IdentifiableWithString, Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let isDeleted: Bool 14 | internal let identifier: String 15 | 16 | // MARK: - Private - 17 | 18 | private enum CodingKeys: String, CodingKey { 19 | 20 | case isDeleted = "deleted" 21 | case identifier = "id" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Images.xcassets/ic_merchant_logo_placeholder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_merchant_logo_placeholder.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_merchant_logo_placeholder@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_merchant_logo_placeholder@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/PaymentStatus.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentStatus.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum PaymentStatus { 9 | 10 | case cancelled 11 | case successfulCharge(Charge) 12 | case successfulAuthorize(Authorize) 13 | case successfulCardSave(CardVerification) 14 | case successfulCardTokenize(Token, Bool) 15 | case chargeFailure(Charge?, TapSDKError?) 16 | case authorizationFailure(Authorize?, TapSDKError?) 17 | case cardSaveFailure(CardVerification?, TapSDKError?) 18 | case cardTokenizeFailure(TapSDKError) 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Process/ProcessMode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProcessMode.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal protocol ProcessMode {} 9 | internal protocol Payment: ProcessMode {} 10 | internal protocol CardSaving: ProcessMode {} 11 | internal protocol CardTokenization: ProcessMode {} 12 | 13 | internal class ProcessModeClass: ProcessMode {} 14 | 15 | internal class PaymentClass: ProcessModeClass, Payment {} 16 | internal class CardSavingClass: ProcessModeClass, CardSaving {} 17 | internal class CardTokenizationClass: ProcessModeClass, CardTokenization {} 18 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/BlurSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BlurSettings.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | import enum TapVisualEffectViewV2.TapBlurEffectStyle 10 | 11 | internal struct BlurSettings: Decodable { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | internal var style: TapBlurEffectStyle 17 | 18 | internal var progress: CGFloat 19 | 20 | // MARK: - Private - 21 | 22 | private enum CodingKeys: String, CodingKey { 23 | 24 | case style = "style" 25 | case progress = "progress" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/String+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | // MARK: - Transformable 9 | extension String: Transformable { 10 | 11 | internal init?(untransformedValue: Any?) { 12 | 13 | guard let stringValue = untransformedValue as? String else { return nil } 14 | self.init(stringValue) 15 | } 16 | 17 | internal func trunc(length: Int, trailing: String = "…") -> String { 18 | return (self.count > length) ? self.prefix(length) + trailing : self 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardAddressInputListener.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardAddressInputListener.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | /// Protocol to listen to input changes. 11 | internal protocol CardAddressInputListener: ClassProtocol { 12 | 13 | /// Notifies the receiver that input has changed in a given field. 14 | /// 15 | /// - Parameters: 16 | /// - field: Input field. 17 | /// - value: Input value. 18 | func inputChanged(in field: BillingAddressField, to value: Any?) 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/GlowStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GlowStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | internal struct GlowStyle: Decodable { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal let color: HexColor 16 | internal let radius: CGFloat 17 | internal let animationDuration: TimeInterval 18 | 19 | // MARK: - Private - 20 | 21 | private enum CodingKeys: String, CodingKey { 22 | 23 | case color = "color" 24 | case radius = "radius" 25 | case animationDuration = "duration" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/ColorTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColorTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIView.UIView 9 | 10 | internal final class ColorTableViewCell: TitleTableViewCell { 11 | 12 | // MARK: - Internal - 13 | // MARK: Methods 14 | 15 | internal func setColor(_ color: Color) { 16 | 17 | self.setTitle(color.description) 18 | 19 | self.colorView?.backgroundColor = color.asUIColor 20 | } 21 | 22 | // MARK: - Private - 23 | // MARK: Properties 24 | 25 | @IBOutlet private weak var colorView: UIView? 26 | } 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/Order.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Order.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct Order: IdentifiableWithString, Encodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let identifier: String 14 | 15 | // MARK: Methods 16 | 17 | internal init(identifier: String) { 18 | 19 | self.identifier = identifier 20 | } 21 | 22 | // MARK: - Private - 23 | 24 | private enum CodingKeys: String, CodingKey { 25 | 26 | case identifier = "id" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Protocols/SeguePresenter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SeguePresenter.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class Dispatch.DispatchQueue 9 | import class UIKit.UIViewController.UIViewController 10 | 11 | internal protocol SeguePresenter where Self: UIViewController { } 12 | 13 | internal extension SeguePresenter { 14 | 15 | func show(_ controller: UIViewController.Type) { 16 | 17 | DispatchQueue.main.async { 18 | 19 | self.performSegue(withIdentifier: "\(controller.tap_className)Segue", sender: self) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/TapSearchView+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapSearchView+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class TapSearchViewV2.TapSearchView 9 | 10 | internal extension TapSearchView { 11 | 12 | // MARK: - Internal - 13 | // MARK: Methods 14 | 15 | func setStyle(_ style: SearchBarStyle) { 16 | self.searchField.setTextStyle(style.text, style.placeholder) 17 | self.searchHolderBackgroundColor = style.searchHolderBackgroundColor.color 18 | } 19 | 20 | func setBackGround(_ color: UIColor) { 21 | self.backgroundColor = color 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/CaseSelectionCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CaseSelectionCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct CaseSelectionCellStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let title: TextStyle 14 | 15 | internal let value: TextStyle 16 | 17 | internal let separator: AppearanceStyle 18 | 19 | // MARK: - Private - 20 | 21 | private enum CodingKeys: String, CodingKey { 22 | 23 | case title = "title_style" 24 | case value = "value_style" 25 | case separator = "separator_color" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/TitleTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TitleTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal class TitleTableViewCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | @IBOutlet internal private(set) weak var titleTextLabel: UILabel? 17 | 18 | // MARK: Methods 19 | 20 | internal func setTitle(_ title: CustomStringConvertible) { 21 | 22 | self.titleTextLabel?.text = title.description.capitalized 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/ResourceImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResourceImage.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIImage.UIImage 9 | 10 | internal final class ResourceImage: UIImage, Decodable { 11 | 12 | required internal convenience init(from decoder: Decoder) throws { 13 | 14 | let container = try decoder.singleValueContainer() 15 | let imageName = try container.decode(String.self) 16 | 17 | let image = UIImage(named: imageName, in: .goSellSDKResources, compatibleWith: nil)! 18 | let imageData = image.tap_pngData! 19 | 20 | self.init(data: imageData, scale: image.scale)! 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/GroupHeaderCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupHeaderCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal final class GroupHeaderCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | internal func setGroupTitle(_ groupTitle: String) { 17 | 18 | self.groupTitleLabel?.text = groupTitle 19 | } 20 | 21 | // MARK: - Private - 22 | // MARK: Properties 23 | 24 | @IBOutlet private weak var groupTitleLabel: UILabel? 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/CollectionViewCellViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewCellViewModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UICollectionView.UICollectionView 9 | 10 | internal class CollectionViewCellViewModel: CellViewModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal weak var collectionView: UICollectionView? 16 | 17 | // MARK: Methods 18 | 19 | internal func collectionViewDidSelectCell(_ sender: UICollectionView) { } 20 | 21 | internal func collectionViewDidDeselectCell(_ sender: UICollectionView) { } 22 | } 23 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Views/TapNavigationView/TapNavigationViewDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapNavigationViewDataSource.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol TapNavigationViewDataSource: ClassProtocol { 11 | 12 | func navigationViewCanGoBack(_ navigationView: TapNavigationView) -> Bool 13 | 14 | func navigationViewIconPlaceholder(for navigationView: TapNavigationView) -> Image? 15 | 16 | func navigationViewIcon(for navigationView: TapNavigationView) -> Image? 17 | 18 | func navigationViewTitle(for navigationView: TapNavigationView) -> String? 19 | } 20 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/AddressType+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddressType+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | extension AddressType: Transformable { 9 | 10 | internal init?(untransformedValue: Any?) { 11 | 12 | if let stringValue = untransformedValue as? String { 13 | 14 | try? self.init(string: stringValue) 15 | } 16 | else if let addressType = untransformedValue as? AddressType { 17 | 18 | self.init(rawValue: addressType.rawValue) 19 | } 20 | else { 21 | 22 | return nil 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Enums/InternalError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InternalError.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal enum InternalError: Int { 9 | 10 | case invalidCountryCode = 1 11 | case invalidAddressType 12 | case invalidAmountModificatorType 13 | case invalidAuthorizeActionType 14 | case invalidCurrency 15 | case invalidCustomerInfo 16 | case invalidTokenType 17 | case customerAlreadyExists 18 | case cardAlreadyExists 19 | case invalidEmail 20 | case invalidISDNumber 21 | case invalidPhoneNumber 22 | case invalidUnitOfMeasurement 23 | case invalidMeasurement 24 | case invalidEnumValue 25 | case noMerchantData 26 | } 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Cells/Table View/EmptyTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyTableViewCell.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal class EmptyTableViewCell: BaseTableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | internal weak var model: EmptyTableViewCellModel? 17 | } 18 | 19 | // MARK: - LoadingWithModelCell 20 | extension EmptyTableViewCell: LoadingWithModelCell { 21 | 22 | internal func updateContent(animated: Bool) { 23 | self.backgroundColor = UIColor.clear 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/NSTextAlignment+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSTextAlignment+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import enum UIKit.NSText.NSTextAlignment 9 | 10 | internal extension NSTextAlignment { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | var tap_localizedTextAlignment: LocalizedTextAlignment { 16 | 17 | switch self { 18 | 19 | case .left: return .left 20 | case .center: return .center 21 | case .right: return .right 22 | case .natural: return .natural 23 | case .justified: return .justified 24 | 25 | @unknown default: return .left 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIButton+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class TapAdditionsKitV2.UIButton 9 | 10 | internal extension UIButton { 11 | 12 | func setTitleStyle(_ style: TextStyle) { 13 | 14 | self.titleLabel?.font = style.font.localized 15 | self.titleLabel?.textAlignment = style.alignment.textAlignment 16 | self.titleLabel?.textColor = style.color.color 17 | } 18 | } 19 | 20 | // MARK: - SingleLocalizable 21 | extension UIButton: SingleLocalizable { 22 | 23 | internal func setLocalized(text: String?) { 24 | 25 | self.tap_title = text 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/StaticlyDestroyable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StaticlyDestroyable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import struct TapAdditionsKitV2.TypeAlias 10 | 11 | internal protocol StaticlyDestroyable: ClassProtocol { 12 | 13 | static var hasAliveInstance: Bool { get } 14 | } 15 | 16 | internal protocol ImmediatelyDestroyable: StaticlyDestroyable { 17 | 18 | static func destroyInstance() 19 | } 20 | 21 | internal protocol DelayedDestroyable: StaticlyDestroyable { 22 | 23 | static func destroyInstance(_ completion: TypeAlias.ArgumentlessClosure?) 24 | } 25 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Models/GroupHeaderCellModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupHeaderCellModel.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UITableViewCell.UITableViewCell 9 | 10 | internal class GroupHeaderCellModel: TableViewCellModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal let title: String 16 | 17 | internal override class var cellClass: UITableViewCell.Type { 18 | 19 | return GroupHeaderCell.self 20 | } 21 | 22 | // MARK: Methods 23 | 24 | internal init(title: String) { 25 | 26 | self.title = title 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Process/Process.Wrapped.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Process.ImplementationWrapper.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension Process { 9 | 10 | final class Wrapped { 11 | 12 | internal func implementation() -> Implementation? { 13 | 14 | return self.erasedTypeImplementation as? Process.Implementation 15 | } 16 | 17 | internal init(_ implementation: Process.Implementation) { 18 | 19 | self.erasedTypeImplementation = implementation 20 | } 21 | 22 | // MARK: - Private - 23 | // MARK: Properties 24 | 25 | private let erasedTypeImplementation: Any 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Public/Models/AuthorizeActionResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthorizeActionResponse.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Authorize action response class. 9 | @objcMembers public final class AuthorizeActionResponse: AuthorizeAction { 10 | 11 | // MARK: - Public - 12 | // MARK: Properties 13 | 14 | /// Authorize action status. 15 | public private(set) var status: AuthorizeActionStatus = .failed 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case type = "type" 22 | case time = "time" 23 | case status = "status" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/SearchBarStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchBarStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct SearchBarStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | internal var searchHolderBackgroundColor: HexColor 13 | 14 | internal let placeholder: TextStyle 15 | 16 | internal let text: TextStyle 17 | 18 | // MARK: - Private - 19 | 20 | private enum CodingKeys: String, CodingKey { 21 | 22 | case placeholder = "placeholder_style" 23 | case text = "text_style" 24 | case searchHolderBackgroundColor = "search_holder_background_color" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/docsets/goSellSDK.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.gosellsdk 7 | CFBundleName 8 | goSellSDK 9 | DocSetPlatformFamily 10 | gosellsdk 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/CommonImages.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CommonImages.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct CommonImages: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let arrowRight: ResourceImage 14 | internal let arrowLeft: ResourceImage 15 | internal let checkmarkImage: ResourceImage 16 | internal let closeImage: ResourceImage 17 | 18 | // MARK: - Private - 19 | 20 | private enum CodingKeys: String, CodingKey { 21 | 22 | case arrowRight = "arrow_right" 23 | case arrowLeft = "arrow_left" 24 | case checkmarkImage = "checkmark" 25 | case closeImage = "close" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Utils/LocalizedParagraphStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocalizedParagraphStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.NSParagraphStyle.NSMutableParagraphStyle 9 | import enum UIKit.NSText.NSTextAlignment 10 | 11 | internal class LocalizedParagraphStyle: NSMutableParagraphStyle { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | internal override var alignment: NSTextAlignment { 17 | 18 | get { 19 | 20 | return self.localizedAlignment.textAlignment 21 | } 22 | set { 23 | 24 | super.alignment = newValue 25 | } 26 | } 27 | 28 | internal var localizedAlignment: LocalizedTextAlignment = .left 29 | } 30 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Extensions/Encodable+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Encodable+Additions.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import Foundation 9 | 10 | internal extension Encodable { 11 | 12 | var dictionaryRepresentation: [String: Any]? { 13 | 14 | guard let data = try? JSONEncoder().encode(self) else { return nil } 15 | let object = try? JSONSerialization.jsonObject(with: data, options: []) 16 | 17 | if let dictionaryObject = object as? [String: Any] { 18 | 19 | return dictionaryObject 20 | } 21 | else { 22 | 23 | return nil 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIEdgeInsets+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIEdgeInsets+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import struct UIKit.UIGeometry.UIEdgeInsets 9 | 10 | internal extension UIEdgeInsets { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | var tap_localized: UIEdgeInsets { 16 | 17 | switch LocalizationManager.shared.layoutDirection { 18 | 19 | case .leftToRight: return self 20 | case .rightToLeft: return self.tap_mirrored 21 | 22 | @unknown default: 23 | 24 | print("Unknown layout direction to localize edge insets: \(LocalizationManager.shared.layoutDirection)") 25 | return self 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/ListCardsResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListCardsResponse.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Response object for List All Cards API. 9 | internal struct ListCardsResponse: Decodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Object type. 15 | internal let object: String 16 | 17 | /// Defines if there are more cards to load. 18 | internal let hasMore: Bool 19 | 20 | /// Cards. 21 | internal let cards: [SavedCard] 22 | 23 | // MARK: - Private - 24 | 25 | private enum CodingKeys: String, CodingKey { 26 | 27 | case object = "object" 28 | case hasMore = "has_more" 29 | case cards = "data" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Public/Enums/SDKMode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SDKMode.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Enum defining SDK mode. 9 | @objc public enum SDKMode: Int, CaseIterable { 10 | 11 | /// Sandbox mode. 12 | @objc(Sandbox) case sandbox 13 | 14 | /// Production mode. 15 | @objc(Production) case production 16 | } 17 | 18 | // MARK: - CustomStringConvertible 19 | extension SDKMode: CustomStringConvertible { 20 | 21 | public var description: String { 22 | 23 | switch self { 24 | 25 | case .sandbox: return "Sandbox" 26 | case .production: return "Production" 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/CurrencySelectionCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CurrencySelectionCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct CurrencySelectionCellStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let billIcon: ResourceImage 14 | internal let transactionCurrencyTextStyle: TextStyle 15 | internal let selectedCurrencyTextStyle: TextStyle 16 | 17 | // MARK: - Private - 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | 21 | case billIcon = "icon" 22 | case transactionCurrencyTextStyle = "transaction_text_style" 23 | case selectedCurrencyTextStyle = "selected_text_style" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIColor+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Additions.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 21/01/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | internal extension UIColor 12 | { 13 | func loadCompatibleDarkModeColor(forColorNamed:String)->UIColor 14 | { 15 | 16 | if #available(iOS 13.0, *), Process.shared.externalSession?.dataSource?.uiModeDisplay?.userInterface == .dark { 17 | 18 | if let color = UIColor(named: forColorNamed, in: .goSellSDKResources, compatibleWith: nil) 19 | { 20 | return color 21 | } 22 | } 23 | return self 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Extensions/Decodable+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Decodable+Additions.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import Foundation 9 | 10 | internal extension Decodable { 11 | 12 | // MARK: - Internal - 13 | // MARK: Methods 14 | 15 | init?(dictionaryRepresentation: [String: Any]) { 16 | 17 | guard let jsonData = try? JSONSerialization.data(withJSONObject: dictionaryRepresentation, options: []) else { return nil } 18 | 19 | do { 20 | 21 | self = try JSONDecoder().decode(Self.self, from: jsonData) 22 | } 23 | catch let error { 24 | 25 | print("Error retrieving settings: \(error)") 26 | return nil 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/StatusPopupStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusPopupStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct StatusPopupStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal let titleStyle: TextStyle 14 | 15 | internal let subtitleStyle: TextStyle 16 | 17 | internal let successImage: ResourceImage 18 | 19 | internal let failureImage: ResourceImage 20 | 21 | // MARK: - Private - 22 | 23 | private enum CodingKeys: String, CodingKey { 24 | 25 | case titleStyle = "title_style" 26 | case subtitleStyle = "subtitle_style" 27 | case successImage = "success_icon" 28 | case failureImage = "failure_icon" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/EmptyTableViewCellModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyTableViewCellModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal class EmptyTableViewCellModel: TableViewCellViewModel { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal weak var cell: EmptyTableViewCell? 14 | 15 | internal let identifier: String 16 | 17 | // MARK: Methods 18 | 19 | internal init(indexPath: IndexPath, identifier: String) { 20 | 21 | self.identifier = identifier 22 | super.init(indexPath: indexPath) 23 | } 24 | } 25 | 26 | // MARK: - SingleCellModel 27 | extension EmptyTableViewCellModel: SingleCellModel {} 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Data/WebPaymentURLDecision.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebPaymentURLDecision.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Web Payment URL decision. 9 | internal struct WebPaymentURLDecision { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Defines if URL should be loaded. 15 | internal let shouldLoad: Bool 16 | 17 | /// Defines if web payment screen should be closed. 18 | internal let shouldCloseWebPaymentScreen: Bool 19 | 20 | /// Defines if web payment flow redirections are finished. 21 | internal let redirectionFinished: Bool 22 | 23 | /// Charge or authorize identifier. 24 | internal let tapID: String? 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/PaymentOptionCellViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentOptionCellViewModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol PaymentOptionCellViewModel: ClassProtocol { 11 | 12 | // MARK: Properties 13 | 14 | var paymentOption: PaymentOption? { get } 15 | 16 | var isSelected: Bool { get set } 17 | 18 | var indexPathOfCellToSelect: IndexPath? { get } 19 | 20 | var isReadyForPayment: Bool { get } 21 | 22 | var affectsPayButtonState: Bool { get } 23 | 24 | var initiatesPaymentOnSelection: Bool { get } 25 | 26 | var errorCode: ErrorCode? { get } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/SelectableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SelectableCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIImageView.UIImageView 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal class SelectableCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | internal override func setSelected(_ selected: Bool, animated: Bool) { 17 | 18 | super.setSelected(selected, animated: animated) 19 | self.checkmarkImageView?.isHidden = !selected 20 | } 21 | 22 | // MARK: - Private - 23 | // MARK: Properties 24 | 25 | @IBOutlet private weak var checkmarkImageView: UIImageView? 26 | } 27 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '13.0' 2 | use_frameworks! 3 | 4 | source 'https://github.com/CocoaPods/Specs.git' 5 | 6 | target 'goSellSDKExample' do 7 | 8 | pod 'Crashlytics' 9 | pod 'Fabric' 10 | pod 'TapApplePayKit-iOS' 11 | pod 'goSellSDK', :path => '../' 12 | # pod 'goSellSDK/ErrorReporting', :path => '../' 13 | 14 | end 15 | 16 | post_install do |installer| 17 | 18 | installer.pods_project.targets.each do |target| 19 | 20 | target.build_configurations.each do |config| 21 | 22 | if config.name.include?("Debug") 23 | 24 | config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone' 25 | 26 | end 27 | 28 | end 29 | 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '11.0' 2 | use_frameworks! 3 | 4 | source 'https://github.com/CocoaPods/Specs.git' 5 | 6 | def shared_pods 7 | 8 | pod 'EditableTextInsetsTextFieldV2' 9 | pod 'TapAdditionsKitV2' 10 | pod 'TapAlertViewControllerV2' 11 | pod 'TapApplicationV2' 12 | pod 'TapBundleLocalizationV2' 13 | pod 'TapCardVlidatorKit-iOS' 14 | pod 'TapEditableViewV2' 15 | pod 'TapErrorReportingV2' 16 | pod 'TapFontsKitV2' 17 | pod 'TapGLKitV2' 18 | pod 'TapKeychainV2' 19 | pod 'TapNetworkManagerV2' 20 | pod 'TapNibViewV2' 21 | pod 'TapResponderChainInputViewV2' 22 | pod 'TapSearchViewV2' 23 | pod 'TapVisualEffectViewV2' 24 | pod 'SwiftyRSA' 25 | 26 | end 27 | 28 | target 'goSellSDK' do 29 | 30 | shared_pods 31 | 32 | end 33 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Cells/Table View/PaymentCellSeprator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentCellSeprator.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 21/01/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class PaymentCellSeprator: UIView { 12 | 13 | override init(frame: CGRect) { 14 | super.init(frame: frame) 15 | fillBackGroundColor() 16 | } 17 | 18 | required init?(coder: NSCoder) { 19 | super.init(coder: coder) 20 | fillBackGroundColor() 21 | } 22 | 23 | 24 | func fillBackGroundColor() 25 | { 26 | self.backgroundColor = UIColor.init(tap_hex: "E1E1E1")?.loadCompatibleDarkModeColor(forColorNamed: "DefaultSeparatorCellColor") 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Views/TapNavigationView/TapNavigationViewDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapNavigationViewDelegate.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | /// Delegate for TapNavigationView class. 11 | internal protocol TapNavigationViewDelegate: ClassProtocol { 12 | 13 | /// Notifies the receiver that back button was clicked. 14 | /// 15 | /// - Parameter navigationView: Sender. 16 | func navigationViewBackButtonClicked(_ navigationView: TapNavigationView) 17 | 18 | /// Notifies the receiver that close button was clicked. 19 | /// 20 | /// - Parameter navigationView: Sender. 21 | func navigationViewCloseButtonClicked(_ navigationView: TapNavigationView) 22 | } 23 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/PopupOverlaySupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PopupOverlaySupport.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import struct TapAdditionsKitV2.TypeAlias 10 | import class UIKit.NSLayoutConstraint.NSLayoutConstraint 11 | import class UIKit.UIView.UIView 12 | 13 | internal protocol PopupOverlaySupport: ClassProtocol { 14 | 15 | var topOffsetOverlayConstraint: NSLayoutConstraint? { get } 16 | var bottomOffsetOverlayConstraint: NSLayoutConstraint? { get } 17 | var bottomOverlayView: UIView? { get } 18 | var layoutView: UIView { get } 19 | 20 | func additionalAnimations(for operation: ViewControllerOperation) -> TypeAlias.ArgumentlessClosure 21 | } 22 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Extensions/Measurement+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Measurement+Additions.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import enum goSellSDK.Measurement 9 | 10 | internal extension Measurement { 11 | 12 | static var allCategoriesWithDefaultUnitsOfMeasurement: [Measurement] { 13 | 14 | return [ 15 | 16 | .area(.squareMeters), 17 | .duration(.seconds), 18 | .electricCharge(.ampereHours), 19 | .electricCurrent(.amperes), 20 | .energy(.joules), 21 | .length(.meters), 22 | .mass(.kilograms), 23 | .power(.watts), 24 | .volume(.cubicMeters), 25 | .units 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Public/Enums/cardType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // cardType.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 01/03/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | 10 | /// Enum defining SDK mode. 11 | @objc public enum cardTypes: Int, CaseIterable { 12 | 13 | @objc(Credit) case Credit 14 | @objc(Debit) case Debit 15 | @objc(All) case All 16 | } 17 | 18 | // MARK: - CustomStringConvertible 19 | extension cardTypes: CustomStringConvertible { 20 | 21 | public var description: String { 22 | 23 | switch self { 24 | case .Credit: return "Credit" 25 | case .Debit: return "Debit" 26 | case .All: return "All" 27 | } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Cells/Table View/PaymentCardCellSeprator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentCardCellSeprator.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 27/01/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class PaymentCardCellSeprator: UIView { 12 | 13 | override init(frame: CGRect) { 14 | super.init(frame: frame) 15 | fillBackGroundColor() 16 | } 17 | 18 | required init?(coder: NSCoder) { 19 | super.init(coder: coder) 20 | fillBackGroundColor() 21 | } 22 | 23 | 24 | func fillBackGroundColor() 25 | { 26 | self.backgroundColor = UIColor.init(tap_hex: "E1E1E1")?.loadCompatibleDarkModeColor(forColorNamed: "DefaultCardSeparatorColor") 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/SaveCardStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SaveCardStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct SaveCardStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal var textStyle: TextStyle 14 | 15 | internal var switchOnTintColor: HexColor? 16 | 17 | internal var switchOffTintColor: HexColor? 18 | 19 | internal var switchThumbTintColor: HexColor? 20 | 21 | // MARK: - Private - 22 | 23 | private enum CodingKeys: String, CodingKey { 24 | 25 | case textStyle = "text_style" 26 | case switchOnTintColor = "switch_on_tint_color" 27 | case switchOffTintColor = "switch_off_tint_color" 28 | case switchThumbTintColor = "switch_thumb_tint_color" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Utils/BrandWithScheme.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BrandWithScheme.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import enum TapCardVlidatorKit_iOS.CardBrand 9 | import enum TapCardVlidatorKit_iOS.CardValidationState 10 | 11 | internal struct BrandWithScheme { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | let brand: CardBrand 17 | let scheme: CardScheme? 18 | let validationState: CardValidationState 19 | } 20 | 21 | extension BrandWithScheme: Equatable { 22 | 23 | internal static func == (lhs: BrandWithScheme, rhs: BrandWithScheme) -> Bool { 24 | 25 | return lhs.validationState == rhs.validationState && lhs.brand == rhs.brand && lhs.scheme == rhs.scheme 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/GroupTableViewCellModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GroupTableViewCellModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import struct TapBundleLocalizationV2.LocalizationKey 9 | 10 | internal class GroupTableViewCellModel: TableViewCellViewModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal let key: LocalizationKey 16 | 17 | internal weak var cell: GroupTableViewCell? 18 | 19 | // MARK: Methods 20 | 21 | internal init(indexPath: IndexPath, key: LocalizationKey) { 22 | 23 | self.key = key 24 | 25 | super.init(indexPath: indexPath) 26 | } 27 | } 28 | 29 | // MARK: - SingleCellModel 30 | extension GroupTableViewCellModel: SingleCellModel {} 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/AddressField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddressField.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Address field model. 9 | internal struct AddressField: Decodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Field name. 15 | internal let name: String 16 | 17 | /// Field input type. 18 | internal let type: AddressFieldInputType 19 | 20 | /// Placeholder text. 21 | internal let placeholder: String 22 | 23 | // MARK: - Private - 24 | 25 | private enum CodingKeys: String, CodingKey { 26 | 27 | case name = "name" 28 | case type = "type" 29 | case placeholder = "place_holder" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/ShippingTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShippingTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal final class ShippingTableViewCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | internal func setTitleText(_ titleText: String, amountText: String) { 17 | 18 | self.titleLabel?.text = titleText 19 | self.amountLabel?.text = amountText 20 | } 21 | 22 | // MARK: - Private - 23 | // MARK: Properties 24 | 25 | @IBOutlet private weak var titleLabel: UILabel? 26 | @IBOutlet private weak var amountLabel: UILabel? 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/HexColor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HexColor.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIColor.UIColor 9 | 10 | internal struct HexColor { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal let color: UIColor 16 | 17 | // MARK: Methods 18 | 19 | internal init(hex: String) { 20 | 21 | self.init(color: UIColor(tap_hex: hex)!) 22 | } 23 | 24 | internal init(color: UIColor) { 25 | 26 | self.color = color 27 | } 28 | } 29 | 30 | extension HexColor: Decodable { 31 | 32 | internal init(from decoder: Decoder) throws { 33 | 34 | let container = try decoder.singleValueContainer() 35 | let hex = try container.decode(String.self) 36 | 37 | self.init(hex: hex) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Models/PaymentItemTableViewCellModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PaymentItemTableViewCellModel.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class goSellSDK.PaymentItem 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal class PaymentItemTableViewCellModel: TableViewCellModel { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | internal let paymentItem: PaymentItem 17 | 18 | internal override class var cellClass: UITableViewCell.Type { 19 | 20 | return PaymentItemTableViewCell.self 21 | } 22 | 23 | // MARK: Methods 24 | 25 | internal init(paymentItem: PaymentItem) { 26 | 27 | self.paymentItem = paymentItem 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/CreateCardRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CreateCardRequest.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Request body for Create Card API. 9 | internal struct CreateCardRequest: Encodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Card source identifier (token identifier). 15 | internal let source: String 16 | 17 | // MARK: Methods 18 | 19 | /// Initializes create card request from the source of the card. 20 | /// 21 | /// - Parameter source: Card source identifier. 22 | internal init(_ source: Source) { 23 | 24 | self.source = source.identifier 25 | } 26 | 27 | // MARK: - Private - 28 | 29 | private enum CodingKeys: String, CodingKey { 30 | 31 | case source = "source" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Enums/AppearanceMode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppearanceMode.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Internal SDK appearance mode. 9 | /// 10 | /// - fullscreen: Fullscreen mode. 11 | /// - windowed: Windowed mode. 12 | internal enum AppearanceMode: String, Decodable { 13 | 14 | case fullscreen 15 | case windowed 16 | 17 | // MARK: - Internal - 18 | // MARK: Methods 19 | 20 | internal init(publicAppearance: SDKAppearanceMode, transactionMode: TransactionMode) { 21 | 22 | switch publicAppearance { 23 | 24 | case .fullscreen: self = .fullscreen 25 | case .windowed: self = .windowed 26 | case .default: self = (transactionMode == .cardSaving || transactionMode == .cardTokenization) ? .windowed : .fullscreen 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Protocols/IdentifiableWithString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IdentifiableWithString.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// All models that have identifier are conforming to this protocol. 9 | internal protocol IdentifiableWithString { 10 | 11 | // MARK: Properties 12 | 13 | /// Unique identifier of an object. 14 | var identifier: String { get } 15 | } 16 | 17 | 18 | extension Array where Element: Hashable { 19 | func removingDuplicates() -> [Element] { 20 | var addedDict = [Element: Bool]() 21 | 22 | return filter { 23 | addedDict.updateValue(true, forKey: $0) == nil 24 | } 25 | } 26 | 27 | mutating func removeDuplicates() { 28 | self = self.removingDuplicates() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/AmountedCurrency+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AmountedCurrency+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension AmountedCurrency { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | var displayValue: String { 14 | 15 | return CurrencyFormatter.shared.format(self) 16 | } 17 | 18 | var readableCurrencyName: String { 19 | 20 | let locale = LocalizationManager.shared.selectedLocale 21 | 22 | if let currencyName = locale.localizedString(forCurrencyCode: self.currency.isoCode) { 23 | 24 | return currencyName.prefix(1).capitalized + currencyName.dropFirst() 25 | } 26 | else { 27 | 28 | return self.currency.isoCode 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Views/LoadingView/LoadingViewSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingViewSupport.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import struct TapAdditionsKitV2.TypeAlias 9 | import class UIKit.UIView.UIView 10 | 11 | internal protocol LoadingViewSupport { 12 | 13 | var loadingViewContainer: UIView { get } 14 | } 15 | 16 | extension LoadingViewSupport { 17 | 18 | internal func hideLoader(_ completion: TypeAlias.ArgumentlessClosure? = nil) { 19 | 20 | if let loadingController = self as? LoadingViewController { 21 | 22 | loadingController.hide(animated: true, async: true, fromDestroyInstance: false, completion: completion) 23 | } 24 | else { 25 | 26 | LoadingView.remove(from: self, animated: true, completion: completion) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/Bundle+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bundle+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal extension Bundle { 9 | 10 | static let goSellSDKResources: Bundle = { 11 | 12 | guard let result = Bundle(for: PaymentContentViewController.self).tap_childBundle(named: Constants.goSellSDKResourcesBundleName) else { 13 | 14 | fatalError("There is no \(Constants.goSellSDKResourcesBundleName) bundle.") 15 | } 16 | 17 | return result 18 | }() 19 | 20 | private struct Constants { 21 | 22 | fileprivate static let goSellSDKResourcesBundleName = "goSellSDKResources" 23 | 24 | //@available(*, unavailable) private init() { } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/CardCellStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardCellStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIImage.UIImage 9 | 10 | internal struct CardCellStyle: Decodable { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal var scanIconFrame: ResourceImage 16 | 17 | internal var scanIconIcon: ResourceImage 18 | 19 | internal var scanIcon: UIImage? 20 | 21 | internal var textInput: TextInputStyle 22 | 23 | internal var saveCard: SaveCardStyle 24 | 25 | // MARK: - Private - 26 | 27 | private enum CodingKeys: String, CodingKey { 28 | 29 | case scanIconFrame = "scan_icon_frame" 30 | case scanIconIcon = "scan_icon_icon" 31 | case textInput = "input_styles" 32 | case saveCard = "save_card" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/UIView+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import struct TapAdditionsKitV2.TypeAlias 9 | import enum UIKit.UIView.UISemanticContentAttribute 10 | import class UIKit.UIView.UIView 11 | 12 | internal extension UIView { 13 | 14 | // MARK: - Internal - 15 | // MARK: Methods 16 | 17 | func tap_updateLayoutDirectionIfRequired() { 18 | 19 | if #available(iOS 9.0, *) { 20 | 21 | let requiredContentAttribute: UISemanticContentAttribute = LocalizationManager.shared.layoutDirection == .rightToLeft ? .forceRightToLeft : .forceLeftToRight 22 | if requiredContentAttribute != self.semanticContentAttribute { 23 | 24 | self.tap_applySemanticContentAttribute(requiredContentAttribute) 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/ThemeObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThemeObserver.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol ThemeObserver: ClassProtocol { 11 | 12 | func themeChanged() 13 | } 14 | 15 | internal extension ThemeObserver { 16 | 17 | func startMonitoringThemeChanges() -> NSObjectProtocol { 18 | 19 | return NotificationCenter.default.addObserver(forName: .tap_sdkThemeChanged, object: nil, queue: .main) { [weak self] _ in 20 | 21 | self?.themeChanged() 22 | } 23 | } 24 | 25 | func stopMonitoringThemeChanges(_ observation: Any?) { 26 | 27 | if let nonnullObservation = observation { 28 | 29 | NotificationCenter.default.removeObserver(nonnullObservation, name: .tap_sdkThemeChanged, object: nil) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/DestinationTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DestinationTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal final class DestinationTableViewCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | internal func setIdentifier(_ identifier: String, amount: String, currency: String) { 17 | 18 | self.identiferLabel?.text = identifier 19 | self.amountLabel?.text = amount 20 | self.currencyLabel?.text = currency 21 | } 22 | 23 | // MARK: - Private - 24 | // MARK: Properties 25 | 26 | @IBOutlet private weak var identiferLabel: UILabel? 27 | @IBOutlet private weak var amountLabel: UILabel? 28 | @IBOutlet private weak var currencyLabel: UILabel? 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/LocalizationObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocalizationObserver.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol LocalizationObserver: ClassProtocol { 11 | 12 | func localizationChanged() 13 | } 14 | 15 | internal extension LocalizationObserver { 16 | 17 | func startMonitoringLocalizationChanges() -> NSObjectProtocol { 18 | 19 | return NotificationCenter.default.addObserver(forName: .tap_sdkLanguageChanged, object: nil, queue: .main) { [weak self] _ in 20 | 21 | self?.localizationChanged() 22 | } 23 | } 24 | 25 | func stopMonitoringLocalizationChanges(_ observation: Any?) { 26 | 27 | if let nonnullObservation = observation { 28 | 29 | NotificationCenter.default.removeObserver(nonnullObservation) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Public/Enums/SDKLightDarkMode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SDKLightDarkMode.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 21/01/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /// SDK loght dark mode for iOS 13+ 12 | /// 13 | /// - light: The normal light mode 14 | /// - dark: The default dark mode 15 | /// - default: Default mode is light 16 | @objc public enum SDKLightDarkMode: Int, CaseIterable { 17 | 18 | /// Dark mode. 19 | @objc(DarkMode) case darkMode 20 | 21 | /// Light mode. 22 | @objc(LightMode) case lightMode 23 | } 24 | 25 | // MARK: - CustomStringConvertible 26 | extension SDKLightDarkMode: CustomStringConvertible { 27 | 28 | public var description: String { 29 | 30 | switch self { 31 | 32 | case .darkMode : return "DarkMode" 33 | case .lightMode: return "LightMode" 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/AuthenticationRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthenticationRequest.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Structure to authenticate the charge. 9 | internal struct AuthenticationRequest: Encodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Authentication type. 15 | internal let type: AuthenticationType 16 | 17 | /// Authentication value. 18 | internal let value: String 19 | 20 | // MARK: Methods 21 | 22 | internal init(type: AuthenticationType, value: String) { 23 | 24 | self.type = type 25 | self.value = value 26 | } 27 | 28 | // MARK: - Private - 29 | 30 | private enum CodingKeys: String, CodingKey { 31 | 32 | case type = "type" 33 | case value = "value" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/AsyncLabelColors.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.325", 13 | "alpha" : "1.000", 14 | "blue" : "0.325", 15 | "green" : "0.325" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "1.000", 31 | "alpha" : "1.000", 32 | "blue" : "1.000", 33 | "green" : "1.000" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/DefaultCellColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "1.000", 14 | "blue" : "1.000", 15 | "green" : "1.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.318", 31 | "alpha" : "1.000", 32 | "blue" : "0.318", 33 | "green" : "0.318" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/OTPHolderColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "0.360", 14 | "blue" : "1.000", 15 | "green" : "1.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.082", 31 | "alpha" : "0.000", 32 | "blue" : "0.082", 33 | "green" : "0.082" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Enums/TapSerializationError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapSerializationError.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Serialization error. 9 | /// 10 | /// - wrongData: Wrong data to serialize/deserialize. 11 | internal enum TapSerializationError: Int, Error { 12 | 13 | /// Wrong data to serialize/deserialize. 14 | case wrongData 15 | 16 | // MARK: - Private - 17 | // MARK: Properties 18 | 19 | private var readableType: String { 20 | 21 | switch self { 22 | 23 | case .wrongData: 24 | 25 | return "Wrong data" 26 | } 27 | } 28 | } 29 | 30 | // MARK: - CustomStringConvertible 31 | extension TapSerializationError: CustomStringConvertible { 32 | 33 | public var description: String { 34 | 35 | return self.readableType 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/SaveCardLabelColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.361", 13 | "alpha" : "1.000", 14 | "blue" : "0.361", 15 | "green" : "0.361" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.898", 31 | "alpha" : "1.000", 32 | "blue" : "0.898", 33 | "green" : "0.898" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/InstantiatableFromStoryboard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InstantiatableFromStoryboard.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UIStoryboard.UIStoryboard 9 | import class UIKit.UIViewController.UIViewController 10 | 11 | internal protocol InstantiatableFromStoryboard where Self: UIViewController { 12 | 13 | static var hostingStoryboard: UIStoryboard { get } 14 | } 15 | 16 | internal extension InstantiatableFromStoryboard { 17 | 18 | static func instantiate() -> Self { 19 | 20 | let identifier = self.tap_className 21 | guard let result = self.hostingStoryboard.instantiateViewController(withIdentifier: identifier) as? Self else { 22 | 23 | fatalError("Unable to load \(identifier) from storyboard.") 24 | } 25 | 26 | return result 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/CardInputTextFieldColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.000", 13 | "alpha" : "1.000", 14 | "blue" : "0.000", 15 | "green" : "0.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "1.000", 31 | "alpha" : "1.000", 32 | "blue" : "1.000", 33 | "green" : "1.000" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/CurrencyHolderViewColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.969", 13 | "alpha" : "1.000", 14 | "blue" : "0.969", 15 | "green" : "0.969" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.082", 31 | "alpha" : "1.000", 32 | "blue" : "0.082", 33 | "green" : "0.082" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/DefaultCardSeparatorColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.882", 13 | "alpha" : "1.000", 14 | "blue" : "0.882", 15 | "green" : "0.882" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.063", 31 | "alpha" : "0.500", 32 | "blue" : "0.063", 33 | "green" : "0.063" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/DefaultSeparatorCellColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.882", 13 | "alpha" : "1.000", 14 | "blue" : "0.882", 15 | "green" : "0.882" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.475", 31 | "alpha" : "1.000", 32 | "blue" : "0.471", 33 | "green" : "0.471" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/SaveCardSwitchTintColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.165", 13 | "alpha" : "1.000", 14 | "blue" : "0.000", 15 | "green" : "0.808" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.882", 31 | "alpha" : "1.000", 32 | "blue" : "0.882", 33 | "green" : "0.882" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/CardCollectionViewCellLoading.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardCollectionViewCellLoading.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | import class UIKit.UIImage.UIImage 10 | 11 | internal protocol CardCollectionViewCellLoading: ClassProtocol { 12 | 13 | var isSelected: Bool { get } 14 | var smallImage: UIImage? { get } 15 | var bigImage: UIImage { get } 16 | var checkmarkImage: UIImage { get } 17 | var currencyLabelText: String { get } 18 | var cardNumberText: String { get } 19 | 20 | var deleteCardImage: UIImage { get } 21 | 22 | var isDeleteCellMode: Bool { get } 23 | 24 | func cellTapDetected() 25 | 26 | func cellLongPressDetected() 27 | 28 | func deleteCardButtonClicked() 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Resources/Colors.xcassets/SavedCardCellBackgroundColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "1.000", 14 | "blue" : "1.000", 15 | "green" : "1.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "1.000", 31 | "alpha" : "0.701", 32 | "blue" : "1.000", 33 | "green" : "1.000" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/goSellSDKExample/Cells/TaxTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TaxTableViewCell.swift 3 | // goSellSDKExample 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | import class UIKit.UITableViewCell.UITableViewCell 10 | 11 | internal final class TaxTableViewCell: UITableViewCell { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | internal func setTitle(_ title: String?, descriptionText: String?, valueText: String?) { 17 | 18 | self.titleTextLabel?.text = title 19 | self.descriptionTextLabel?.text = descriptionText 20 | self.valueLabel?.text = valueText 21 | } 22 | 23 | // MARK: - Private - 24 | // MARK: Properties 25 | 26 | @IBOutlet private weak var titleTextLabel: UILabel? 27 | @IBOutlet private weak var descriptionTextLabel: UILabel? 28 | @IBOutlet private weak var valueLabel: UILabel? 29 | } 30 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Client/APIClient+Retrievable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // APIClient+Retrievable.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class TapNetworkManagerV2.TapNetworkRequestOperation 9 | import enum TapNetworkManagerV2.TapURLModel 10 | 11 | internal extension APIClient { 12 | 13 | // MARK: - Internal - 14 | // MARK: Methods 15 | 16 | func retrieveObject(with identifier: String, completion: @escaping Completion) { 17 | 18 | let urlModel = TapURLModel.array(parameters: [identifier]) 19 | let route = T.retrieveRoute 20 | 21 | let operation = TapNetworkRequestOperation(path: route.rawValue, method: .GET, headers: self.staticHTTPHeaders, urlModel: urlModel, bodyModel: nil, responseType: .json) 22 | 23 | self.performRequest(operation, using: route.decoder, completion: completion) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/SetupApplePayViewControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SetupApplePayViewControllerDelegate.swift 3 | // goSellSDK 4 | // 5 | // Created by Osama Rabie on 09/01/2020. 6 | // Copyright © 2020 Tap Payments. All rights reserved. 7 | // 8 | 9 | 10 | import protocol TapAdditionsKitV2.ClassProtocol 11 | 12 | internal protocol SetupApplePayViewControllerDelegate: ClassProtocol { 13 | /** 14 | Method to get notified when the user wants to setup his apple pay 15 | - Parameter controller: The current visible setup apple view controller 16 | */ 17 | func setupApplePayViewControllerSetpButtonTouchUpInside(_ controller: SetupApplePayViewController) 18 | /** 19 | Method to get notified when the user wants to cancel setup his apple pay 20 | - Parameter controller: The current visible setup apple view controller 21 | */ 22 | func setupApplePayViewControllerDidCancel(_ controller: SetupApplePayViewController) 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /goSellSDK/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | goSellSDK 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/TextLabelInputDataValidation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextLabelInputDataValidation.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UILabel.UILabel 9 | 10 | internal protocol TextLabelInputDataValidation: TextInputDataValidation { 11 | 12 | var labelField: UILabel { get } 13 | } 14 | 15 | internal extension TextLabelInputDataValidation { 16 | 17 | func updateInputFieldTextAndAttributes() { 18 | 19 | let cardInputStyle = Theme.current.paymentOptionsCellStyle.card.textInput 20 | let textSettings = cardInputStyle[self.isDataValid ? .valid : .invalid] 21 | let textAttributes = textSettings.asStringAttributes 22 | 23 | self.labelField.attributedText = NSAttributedString(string: self.textInputFieldText, attributes: textAttributes) 24 | 25 | self.updateSpecificInputFieldAttributes() 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /goSellSDK/Core/API/Internal/Models/BillingAddressField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BillingAddressField.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | /// Address field. 9 | internal struct BillingAddressField: Decodable { 10 | 11 | // MARK: - Internal - 12 | // MARK: Properties 13 | 14 | /// Address field name. 15 | internal let name: String 16 | 17 | /// Defines if the field is required 18 | internal let isRequired: Bool 19 | 20 | /// Field input order. 21 | internal let inputOrder: Int 22 | 23 | /// Field display order. 24 | internal let displayOrder: Int 25 | 26 | // MARK: - Private - 27 | 28 | private enum CodingKeys: String, CodingKey { 29 | 30 | case name = "name" 31 | case isRequired = "required" 32 | case inputOrder = "order_by" 33 | case displayOrder = "display_order" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/View Models/TableViewCellViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewCellViewModel.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class UIKit.UITableView.UITableView 9 | 10 | internal class TableViewCellViewModel: CellViewModel { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | internal weak var tableView: UITableView? 16 | 17 | internal var indexPathOfCellToSelect: IndexPath? { 18 | 19 | return nil 20 | } 21 | 22 | // MARK: Methods 23 | 24 | internal func tableViewDidSelectCell(_ sender: UITableView) { } 25 | 26 | internal func tableViewDidDeselectCell(_ sender: UITableView) { } 27 | 28 | internal func manuallySelectCellAndCallTableViewDelegate() { 29 | 30 | self.tableView?.tap_selectRow(at: self.indexPath, animated: true, scrollPosition: .none, callDelegate: true) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Utils/TapEdgeInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapEdgeInsets.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import CoreGraphics 9 | import struct UIKit.UIGeometry.UIEdgeInsets 10 | 11 | internal struct TapEdgeInsets: Decodable { 12 | 13 | // MARK: - Internal - 14 | // MARK: Properties 15 | 16 | internal let top: CGFloat 17 | 18 | internal let left: CGFloat 19 | 20 | internal let bottom: CGFloat 21 | 22 | internal let right: CGFloat 23 | 24 | // MARK: Methods 25 | 26 | internal init(_ uiEdgeInsets: UIEdgeInsets) { 27 | 28 | self.top = uiEdgeInsets.top 29 | self.left = uiEdgeInsets.left 30 | self.bottom = uiEdgeInsets.bottom 31 | self.right = uiEdgeInsets.right 32 | } 33 | 34 | // MARK: - Private - 35 | 36 | private enum CodingKeys: String, CodingKey { 37 | 38 | case top = "top" 39 | case left = "left" 40 | case bottom = "bottom" 41 | case right = "right" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/NavigationBarStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationBarStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct NavigationBarStyle: Decodable { 9 | 10 | // MARK: - Internal - 11 | // MARK: Properties 12 | 13 | internal var backgroundColor: HexColor 14 | 15 | internal let backIcon: ResourceImage 16 | 17 | internal var titleStyle: TextStyle 18 | 19 | internal var cancelNormalStyle: TextStyle 20 | 21 | internal var cancelHighlightedStyle: TextStyle 22 | 23 | internal let iconStyle: IconStyle? 24 | 25 | // MARK: - Private - 26 | 27 | private enum CodingKeys: String, CodingKey { 28 | 29 | case backgroundColor = "background_color" 30 | case backIcon = "back_icon" 31 | case titleStyle = "title_style" 32 | case cancelNormalStyle = "cancel_normal_style" 33 | case cancelHighlightedStyle = "cancel_highlighted_style" 34 | case iconStyle = "icon_style" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Protocols/DataManagerWithFilteredData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataManagerWithFilteredData.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import protocol TapAdditionsKitV2.ClassProtocol 9 | 10 | internal protocol DataManagerWithFilteredData: ClassProtocol { 11 | 12 | associatedtype DataModel: Filterable 13 | 14 | var filterQuery: String? { get set } 15 | 16 | var allData: [DataModel] { get } 17 | var filteredData: [DataModel] { get set } 18 | } 19 | 20 | internal extension DataManagerWithFilteredData { 21 | 22 | func setFilter(_ query: String?) { 23 | 24 | self.filterQuery = query 25 | 26 | if let nonnullQuery = query, !nonnullQuery.isEmpty { 27 | 28 | self.filteredData = self.allData.filter { $0.matchesFilter(nonnullQuery) } 29 | } 30 | else { 31 | 32 | self.filteredData = self.allData 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Public/Extensions/SeparateWindowRootViewController+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SeparateWindowViewController+Additions.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class TapAdditionsKitV2.SeparateWindowRootViewController 9 | import class UIKit.UIApplication.UIApplication 10 | import enum UIKit.UIApplication.UIStatusBarStyle 11 | 12 | public extension SeparateWindowRootViewController { 13 | 14 | // MARK: - Public - 15 | // MARK: Properties 16 | 17 | /// Preferred status bar style. 18 | override var preferredStatusBarStyle: UIStatusBarStyle { 19 | 20 | return UIApplication.shared.statusBarStyle 21 | } 22 | 23 | /// Defines if modal presentation of the receiver captures status bar appearance. 24 | override var modalPresentationCapturesStatusBarAppearance: Bool { 25 | 26 | get { 27 | 28 | return false 29 | } 30 | set { 31 | 32 | super.modalPresentationCapturesStatusBarAppearance = false 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Extensions/EditableTextInsetsTextField+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EditableTextInsetsTextFieldV2.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | import class EditableTextInsetsTextFieldV2.EditableTextInsetsTextField 9 | 10 | internal extension EditableTextInsetsTextField { 11 | 12 | // MARK: - Internal - 13 | // MARK: Properties 14 | 15 | var localizedClearButtonPosition: EditableTextInsetsTextField.ClearButtonPosition { 16 | 17 | get { 18 | 19 | return self.clearButtonPosition 20 | } 21 | set { 22 | 23 | let ltr = LocalizationManager.shared.layoutDirection == .leftToRight 24 | 25 | var desiredPosition: EditableTextInsetsTextField.ClearButtonPosition 26 | 27 | switch newValue { 28 | 29 | case .left: desiredPosition = ltr ? .left : .right 30 | case .right: desiredPosition = ltr ? .right : .left 31 | 32 | } 33 | 34 | self.clearButtonPosition = desiredPosition 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /goSellSDK/Core/UI/Internal/Theme/AppearanceStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppearanceStyle.swift 3 | // goSellSDK 4 | // 5 | // Copyright © 2019 Tap Payments. All rights reserved. 6 | // 7 | 8 | internal struct AppearanceStyle