├── .gitignore ├── Lobby-Boy WatchKit App ├── Base.lproj │ └── Interface.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-24@2x.png │ │ ├── Icon-27.5@2x.png │ │ ├── Icon-29@2x.png │ │ ├── Icon-29@3x.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-44@2x.png │ │ ├── Icon-86@2x.png │ │ └── Icon-98@2x.png └── Info.plist ├── Lobby-Boy WatchKit Extension ├── Images.xcassets │ └── README__ignoredByTemplate__ ├── Info.plist ├── InterfaceController.h ├── InterfaceController.m ├── LBProductImageTableRowController.h ├── LBProductImageTableRowController.m ├── LBProductLabelTableRowController.h ├── LBProductLabelTableRowController.m ├── NotificationController.h ├── NotificationController.m ├── PushNotificationPayload.apns ├── WKInterfaceImage+ParentLoad.h ├── WKInterfaceImage+ParentLoad.m └── hat.png ├── Lobby-Boy.xcodeproj ├── project.pbxproj ├── project.pbxproj.orig ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── Lobby-Boy.xccheckout │ └── xcuserdata │ │ └── jeanj.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── jeanj.xcuserdatad │ └── xcschemes │ │ ├── Lobby-Boy WatchKit App.xcscheme │ │ ├── Lobby-Boy.xcscheme │ │ ├── Notification - Lobby-Boy WatchKit App.xcscheme │ │ └── xcschememanagement.plist │ └── mgozzo.xcuserdatad │ └── xcschemes │ ├── Lobby-Boy.xcscheme │ └── xcschememanagement.plist ├── Lobby-Boy.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ ├── jeanj.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── mgozzo.xcuserdatad │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── Lobby-Boy ├── AppDelegate.h ├── AppDelegate.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── LBRootViewController.h ├── LBRootViewController.m ├── LBRootViewController.xib ├── LBStripeCharger.h ├── LBStripeCharger.m ├── LBUserInfoViewController.h ├── LBUserInfoViewController.m ├── LBUserInfoViewController.xib ├── Lobby-Boy.entitlements ├── Resources │ ├── Arvil_Sans.ttf │ ├── Icon-60.png │ ├── Icon-60@2x.png │ ├── Icon-60@3x.png │ ├── Icon-72.png │ ├── Icon-72@2x.png │ ├── Icon-76.png │ ├── Icon-76@2x.png │ ├── Icon-Small-40.png │ ├── Icon-Small-40@2x.png │ ├── Icon-Small-40@3x.png │ ├── Icon-Small-50.png │ ├── Icon-Small-50@2x.png │ ├── Icon-Small.png │ ├── Icon-Small@2x.png │ ├── Icon-Small@3x.png │ ├── Icon.png │ ├── Icon@2x.png │ ├── iTunesArtwork@2x.png │ ├── lobby-boy@2x.png │ ├── lobby-logo-1@2x.png │ └── register@2x.png ├── StripeCharger.m ├── ThirdParty │ ├── OnboardingContentViewController.h │ ├── OnboardingContentViewController.m │ ├── OnboardingViewController.h │ └── OnboardingViewController.m └── main.m ├── Lobby-BoyTests ├── Info.plist └── Lobby_BoyTests.m ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ ├── PaymentKit │ │ │ ├── PTKAddressZip.h │ │ │ ├── PTKCard.h │ │ │ ├── PTKCardCVC.h │ │ │ ├── PTKCardExpiry.h │ │ │ ├── PTKCardNumber.h │ │ │ ├── PTKCardType.h │ │ │ ├── PTKComponent.h │ │ │ ├── PTKTextField.h │ │ │ ├── PTKUSAddressZip.h │ │ │ └── PTKView.h │ │ └── SupportKit │ │ │ ├── SKTConversation.h │ │ │ ├── SKTMessage.h │ │ │ ├── SKTSettings.h │ │ │ ├── SKTUser.h │ │ │ └── SupportKit.h │ └── Public │ │ ├── MBProgressHUD │ │ └── MBProgressHUD.h │ │ ├── PaymentKit │ │ ├── PTKAddressZip.h │ │ ├── PTKCard.h │ │ ├── PTKCardCVC.h │ │ ├── PTKCardExpiry.h │ │ ├── PTKCardNumber.h │ │ ├── PTKCardType.h │ │ ├── PTKComponent.h │ │ ├── PTKTextField.h │ │ ├── PTKUSAddressZip.h │ │ └── PTKView.h │ │ └── Stripe │ │ ├── STPAPIClient.h │ │ ├── STPBankAccount.h │ │ ├── STPCard.h │ │ ├── STPCheckoutOptions.h │ │ ├── STPCheckoutViewController.h │ │ ├── STPToken.h │ │ ├── Stripe.h │ │ └── StripeError.h ├── MBProgressHUD │ ├── LICENSE │ ├── MBProgressHUD.h │ ├── MBProgressHUD.m │ └── README.mdown ├── Manifest.lock ├── PaymentKit │ ├── LICENSE │ ├── PaymentKit │ │ ├── PTKAddressZip.h │ │ ├── PTKAddressZip.m │ │ ├── PTKCard.h │ │ ├── PTKCard.m │ │ ├── PTKCardCVC.h │ │ ├── PTKCardCVC.m │ │ ├── PTKCardExpiry.h │ │ ├── PTKCardExpiry.m │ │ ├── PTKCardNumber.h │ │ ├── PTKCardNumber.m │ │ ├── PTKCardType.h │ │ ├── PTKComponent.h │ │ ├── PTKComponent.m │ │ ├── PTKTextField.h │ │ ├── PTKTextField.m │ │ ├── PTKUSAddressZip.h │ │ ├── PTKUSAddressZip.m │ │ ├── PTKView.h │ │ ├── PTKView.m │ │ └── Resources │ │ │ ├── Cards │ │ │ ├── amex.png │ │ │ ├── amex@2x.png │ │ │ ├── cvc-amex.png │ │ │ ├── cvc-amex@2x.png │ │ │ ├── cvc.png │ │ │ ├── cvc@2x.png │ │ │ ├── diners.png │ │ │ ├── diners@2x.png │ │ │ ├── discover.png │ │ │ ├── discover@2x.png │ │ │ ├── jcb.png │ │ │ ├── jcb@2x.png │ │ │ ├── mastercard.png │ │ │ ├── mastercard@2x.png │ │ │ ├── placeholder.png │ │ │ ├── placeholder@2x.png │ │ │ ├── visa.png │ │ │ └── visa@2x.png │ │ │ ├── gradient@2x.png │ │ │ ├── textfield.png │ │ │ └── textfield@2x.png │ └── README.md ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ ├── jeanj.xcuserdatad │ │ └── xcschemes │ │ │ ├── Pods-PaymentKit.xcscheme │ │ │ ├── Pods-SupportKit.xcscheme │ │ │ ├── Pods.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── mgozzo.xcuserdatad │ │ └── xcschemes │ │ ├── Pods-PaymentKit.xcscheme │ │ ├── Pods-SupportKit.xcscheme │ │ ├── Pods.xcscheme │ │ └── xcschememanagement.plist ├── Stripe │ ├── LICENSE │ ├── README.md │ └── Stripe │ │ ├── Checkout │ │ ├── STPCheckoutDelegate.h │ │ ├── STPCheckoutInternalUIWebViewController.h │ │ ├── STPCheckoutInternalUIWebViewController.m │ │ ├── STPCheckoutOptions.m │ │ ├── STPCheckoutViewController.m │ │ ├── STPCheckoutWebViewAdapter.h │ │ ├── STPColorUtils.h │ │ ├── STPColorUtils.m │ │ ├── STPIOSCheckoutWebViewAdapter.h │ │ ├── STPIOSCheckoutWebViewAdapter.m │ │ ├── STPOSXCheckoutWebViewAdapter.h │ │ ├── STPOSXCheckoutWebViewAdapter.m │ │ ├── STPStrictURLProtocol.h │ │ └── STPStrictURLProtocol.m │ │ ├── PublicHeaders │ │ ├── Checkout │ │ │ ├── STPCheckoutOptions.h │ │ │ └── STPCheckoutViewController.h │ │ ├── STPAPIClient.h │ │ ├── STPBankAccount.h │ │ ├── STPCard.h │ │ ├── STPToken.h │ │ ├── Stripe.h │ │ └── StripeError.h │ │ ├── STPAPIClient.m │ │ ├── STPAPIConnection.h │ │ ├── STPAPIConnection.m │ │ ├── STPBankAccount.m │ │ ├── STPCard.m │ │ ├── STPFormEncoder.h │ │ ├── STPFormEncoder.m │ │ ├── STPToken.m │ │ └── StripeError.m └── Target Support Files │ ├── Pods-MBProgressHUD │ ├── Pods-MBProgressHUD-Private.xcconfig │ ├── Pods-MBProgressHUD-dummy.m │ ├── Pods-MBProgressHUD-prefix.pch │ └── Pods-MBProgressHUD.xcconfig │ ├── Pods-PaymentKit │ ├── Pods-PaymentKit-Private.xcconfig │ ├── Pods-PaymentKit-dummy.m │ ├── Pods-PaymentKit-prefix.pch │ └── Pods-PaymentKit.xcconfig │ ├── Pods-Stripe │ ├── Pods-Stripe-Private.xcconfig │ ├── Pods-Stripe-dummy.m │ ├── Pods-Stripe-prefix.pch │ └── Pods-Stripe.xcconfig │ ├── Pods-SupportKit │ └── Pods-SupportKit-Private.xcconfig │ └── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-environment.h │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig ├── Readme.md ├── SupportKit.bundle ├── Info.plist ├── ar.lproj │ └── SupportKitLocalizable.strings ├── bubble.png ├── bubble@2x.png ├── bubble@3x.png ├── de.lproj │ └── SupportKitLocalizable.strings ├── defaultAvatar.png ├── defaultAvatar@2x.png ├── defaultAvatar@3x.png ├── en.lproj │ └── SupportKitLocalizable.strings ├── es.lproj │ └── SupportKitLocalizable.strings ├── fa.lproj │ └── SupportKitLocalizable.strings ├── fi.lproj │ └── SupportKitLocalizable.strings ├── fr.lproj │ └── SupportKitLocalizable.strings ├── hand.png ├── hand@2x.png ├── hand@3x.png ├── ios7-icon.ttf ├── ja.lproj │ └── SupportKitLocalizable.strings ├── recommendation_failed.png ├── recommendation_failed@2x.png ├── recommendation_failed@3x.png ├── recommendation_placeholder.png └── zh-Hant.lproj │ └── SupportKitLocalizable.strings └── SupportKit.framework ├── Headers ├── SupportKit └── Versions ├── A ├── Headers │ ├── SKTConversation.h │ ├── SKTMessage.h │ ├── SKTMessageBuyInfo.h │ ├── SKTSettings.h │ ├── SKTUser.h │ └── SupportKit.h └── SupportKit └── Current /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "24x24", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "filename" : "Icon-24@2x.png", 8 | "role" : "notificationCenter", 9 | "subtype" : "38mm" 10 | }, 11 | { 12 | "size" : "27.5x27.5", 13 | "idiom" : "watch", 14 | "scale" : "2x", 15 | "filename" : "Icon-27.5@2x.png", 16 | "role" : "notificationCenter", 17 | "subtype" : "42mm" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "watch", 22 | "filename" : "Icon-29@2x.png", 23 | "role" : "companionSettings", 24 | "scale" : "2x" 25 | }, 26 | { 27 | "size" : "29x29", 28 | "idiom" : "watch", 29 | "filename" : "Icon-29@3x.png", 30 | "role" : "companionSettings", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "watch", 36 | "scale" : "2x", 37 | "filename" : "Icon-40@2x.png", 38 | "role" : "appLauncher", 39 | "subtype" : "38mm" 40 | }, 41 | { 42 | "size" : "44x44", 43 | "idiom" : "watch", 44 | "scale" : "2x", 45 | "filename" : "Icon-44@2x.png", 46 | "role" : "longLook", 47 | "subtype" : "42mm" 48 | }, 49 | { 50 | "size" : "86x86", 51 | "idiom" : "watch", 52 | "scale" : "2x", 53 | "filename" : "Icon-86@2x.png", 54 | "role" : "quickLook", 55 | "subtype" : "38mm" 56 | }, 57 | { 58 | "size" : "98x98", 59 | "idiom" : "watch", 60 | "scale" : "2x", 61 | "filename" : "Icon-98@2x.png", 62 | "role" : "quickLook", 63 | "subtype" : "42mm" 64 | } 65 | ], 66 | "info" : { 67 | "version" : 1, 68 | "author" : "xcode" 69 | } 70 | } -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-24@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-27.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-27.5@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-44@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-44@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-86@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-86@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-98@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit App/Images.xcassets/AppIcon.appiconset/Icon-98@2x.png -------------------------------------------------------------------------------- /Lobby-Boy WatchKit App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Lobby-Boy 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | io.supportkit.Lobby-Boy.watchkitapp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | UISupportedInterfaceOrientations 26 | 27 | UIInterfaceOrientationPortrait 28 | UIInterfaceOrientationPortraitUpsideDown 29 | 30 | WKCompanionAppBundleIdentifier 31 | io.supportkit.Lobby-Boy 32 | WKWatchKitApp 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/Images.xcassets/README__ignoredByTemplate__: -------------------------------------------------------------------------------- 1 | Did you know that git does not support storing empty directories? 2 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Lobby-Boy WatchKit Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | io.supportkit.Lobby-Boy.watchkitextension 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | WKAppBundleIdentifier 30 | io.supportkit.Lobby-Boy.watchkitapp 31 | 32 | NSExtensionPointIdentifier 33 | com.apple.watchkit 34 | 35 | RemoteInterfacePrincipalClass 36 | InterfaceController 37 | 38 | 39 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/InterfaceController.h: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.h 3 | // Lobby-Boy WatchKit Extension 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface InterfaceController : WKInterfaceController 13 | 14 | @property (weak, nonatomic) IBOutlet WKInterfaceTable *table; 15 | 16 | - (IBAction)buyButtonAction; 17 | 18 | @property (weak, nonatomic) IBOutlet WKInterfaceButton* buyButton; 19 | 20 | @property NSNumber* currentItemPrice; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/InterfaceController.m: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.m 3 | // Lobby-Boy WatchKit Extension 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "InterfaceController.h" 10 | #import "LBProductImageTableRowController.h" 11 | #import "LBProductLabelTableRowController.h" 12 | #import "WKInterfaceImage+ParentLoad.h" 13 | 14 | 15 | 16 | @interface InterfaceController() 17 | 18 | @end 19 | 20 | 21 | @implementation InterfaceController 22 | 23 | - (void)awakeWithContext:(id)context { 24 | [super awakeWithContext:context]; 25 | 26 | [self.table setRowTypes:@[@"product-image",@"product-label"]]; 27 | 28 | LBProductImageTableRowController *row1 = [self.table rowControllerAtIndex:0]; 29 | [row1.image setImage:[UIImage imageNamed:@"hat"]]; 30 | 31 | LBProductLabelTableRowController *row2 = [self.table rowControllerAtIndex:1]; 32 | 33 | [row2.label setText:@"Messages from Lobby Boy will show up here"]; 34 | 35 | [row2.price setText:@""]; 36 | [self.buyButton setHidden:YES]; 37 | [row2.price setHidden:NO]; 38 | } 39 | 40 | - (void)willActivate { 41 | // This method is called when watch view controller is about to be visible to user 42 | [super willActivate]; 43 | } 44 | 45 | - (void)didDeactivate { 46 | // This method is called when watch view controller is no longer visible 47 | [super didDeactivate]; 48 | } 49 | 50 | - (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)remoteNotification{ 51 | NSDictionary * offer = [remoteNotification valueForKey:@"offer"]; 52 | NSString* imageUrl = [offer valueForKey:@"image-url"]; 53 | 54 | NSString* productName = [offer valueForKey:@"product-name"]; 55 | NSString* productPrice = [offer valueForKey:@"product-price"]; 56 | 57 | LBProductImageTableRowController *row1 = [self.table rowControllerAtIndex:0]; 58 | [row1.image loadImageWithURLString:imageUrl placeholder:nil]; 59 | 60 | LBProductLabelTableRowController *row2 = [self.table rowControllerAtIndex:1]; 61 | 62 | [row2.label setText:productName]; 63 | 64 | [row2.price setText:[NSString stringWithFormat:@"$%@",productPrice]]; 65 | 66 | NSNumberFormatter *f = [[NSNumberFormatter alloc] init]; 67 | f.numberStyle = NSNumberFormatterDecimalStyle; 68 | 69 | self.currentItemPrice = [f numberFromString:productPrice]; 70 | [self.buyButton setHidden:NO]; 71 | [self.buyButton setEnabled:YES]; 72 | } 73 | 74 | - (IBAction)buyButtonAction { 75 | NSLog(@"Pressed the buy button"); 76 | 77 | [self.buyButton setEnabled:NO]; 78 | 79 | [WKInterfaceController openParentApplication:@{@"key":@"buy", @"price":self.currentItemPrice} reply:^(NSDictionary *replyInfo, NSError *error) { 80 | LBProductLabelTableRowController *row2 = [self.table rowControllerAtIndex:1]; 81 | [row2.price setHidden:YES]; 82 | NSString* message = replyInfo[@"message"]; 83 | if ([message isEqualToString:@"error"]) { 84 | [row2.label setText:@"Error happended!"]; 85 | }else{ 86 | [row2.label setText:@"Purchased"]; 87 | } 88 | }]; 89 | } 90 | 91 | @end 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/LBProductImageTableRowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LBProductImageTableRowController.h 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LBProductImageTableRowController : NSObject 13 | 14 | 15 | @property (weak, nonatomic) IBOutlet WKInterfaceImage *image; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/LBProductImageTableRowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LBProductImageTableRowController.m 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "LBProductImageTableRowController.h" 10 | 11 | @implementation LBProductImageTableRowController 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/LBProductLabelTableRowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LBProductLabelTableRowController.h 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | 14 | @interface LBProductLabelTableRowController : NSObject 15 | 16 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *label; 17 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *price; 18 | 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/LBProductLabelTableRowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LBProductLabelTableRowController.m 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "LBProductLabelTableRowController.h" 10 | 11 | @implementation LBProductLabelTableRowController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/NotificationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationController.h 3 | // Lobby-Boy WatchKit Extension 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NotificationController : WKUserNotificationInterfaceController 13 | 14 | 15 | @property (weak, nonatomic) IBOutlet WKInterfaceImage *image; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/NotificationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationController.m 3 | // Lobby-Boy WatchKit Extension 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "NotificationController.h" 10 | #import "WKInterfaceImage+ParentLoad.h" 11 | 12 | 13 | @interface NotificationController() 14 | 15 | @end 16 | 17 | 18 | @implementation NotificationController 19 | 20 | - (instancetype)init { 21 | self = [super init]; 22 | if (self){ 23 | // Initialize variables here. 24 | // Configure interface objects here. 25 | 26 | } 27 | return self; 28 | } 29 | 30 | - (void)willActivate { 31 | // This method is called when watch view controller is about to be visible to user 32 | [super willActivate]; 33 | } 34 | 35 | - (void)didDeactivate { 36 | // This method is called when watch view controller is no longer visible 37 | [super didDeactivate]; 38 | } 39 | 40 | /* 41 | - (void)didReceiveLocalNotification:(UILocalNotification *)localNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler { 42 | // This method is called when a local notification needs to be presented. 43 | // Implement it if you use a dynamic notification interface. 44 | // Populate your dynamic notification interface as quickly as possible. 45 | // 46 | // After populating your dynamic notification interface call the completion block. 47 | completionHandler(WKUserNotificationInterfaceTypeCustom); 48 | } 49 | */ 50 | 51 | 52 | //- (void)didReceiveRemoteNotification:(NSDictionary *)remoteNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler { 53 | // // This method is called when a remote notification needs to be presented. 54 | // // Implement it if you use a dynamic notification interface. 55 | // // Populate your dynamic notification interface as quickly as possible. 56 | // // 57 | // // After populating your dynamic notification interface call the completion block. 58 | // [_image loadImageWithURLString:@"http://www.raywenderlich.com/wp-content/themes/raywenderlich/images/tutorial-team/57019.jpg" placeholder:nil withCompletion:completionHandler]; 59 | //} 60 | 61 | 62 | @end 63 | 64 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/PushNotificationPayload.apns: -------------------------------------------------------------------------------- 1 | { 2 | "aps": { 3 | "alert": { 4 | "body": "Found something for you", 5 | "title": "Optional title" 6 | }, 7 | "category": "myCategory" 8 | }, 9 | 10 | "WatchKit Simulator Actions": [ 11 | { 12 | "title": "Show me", 13 | "identifier": "firstButtonAction" 14 | } 15 | ], 16 | 17 | "offer" : { 18 | "image-url" : "https://dl.dropboxusercontent.com/u/2393867/pasted_image_at_2015_04_24_11_16_am.png", 19 | "product-name" : "L'AIR de PANACHE", 20 | "product-price" : "49.99" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/WKInterfaceImage+ParentLoad.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKInterfaceImage+ParentLoad.h 3 | // WatchDemo 4 | // 5 | // Created by Wee Tom on 15/3/19. 6 | // Copyright (c) 2015年 Mingdao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WKInterfaceImage (ParentLoad) 12 | - (void)loadImageWithURLString:(NSString *)urlString placeholder:(UIImage *)image; 13 | @end 14 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/WKInterfaceImage+ParentLoad.m: -------------------------------------------------------------------------------- 1 | // 2 | // WKInterfaceImage+ParentLoad.m 3 | // WatchDemo 4 | // 5 | // Created by Wee Tom on 15/3/19. 6 | // Copyright (c) 2015年 Mingdao. All rights reserved. 7 | // 8 | 9 | #import "WKInterfaceImage+ParentLoad.h" 10 | 11 | @implementation WKInterfaceImage (ParentLoad) 12 | - (void)loadImageWithURLString:(NSString *)urlString placeholder:(UIImage *)image 13 | { 14 | [self setImage:image]; 15 | if (!urlString) { 16 | return; 17 | } 18 | [WKInterfaceController openParentApplication:@{@"key":@"loadImage", @"urlString":urlString} reply:^(NSDictionary *replyInfo, NSError *error) { 19 | NSData *data = replyInfo[@"result"]; 20 | [self setImageData:data]; 21 | }]; 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /Lobby-Boy WatchKit Extension/hat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy WatchKit Extension/hat.png -------------------------------------------------------------------------------- /Lobby-Boy.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lobby-Boy.xcodeproj/project.xcworkspace/xcshareddata/Lobby-Boy.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 008053A8-1D25-44B4-8B59-4F81A896C832 9 | IDESourceControlProjectName 10 | Lobby-Boy 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 9E511148451DB82B91F3324B7CC79C4A8C199EC6 14 | github.personal:radialpoint/lobby-boy.git 15 | 16 | IDESourceControlProjectPath 17 | Lobby-Boy.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 9E511148451DB82B91F3324B7CC79C4A8C199EC6 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.personal:radialpoint/lobby-boy.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 9E511148451DB82B91F3324B7CC79C4A8C199EC6 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 9E511148451DB82B91F3324B7CC79C4A8C199EC6 36 | IDESourceControlWCCName 37 | lobby-boy 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Lobby-Boy.xcodeproj/project.xcworkspace/xcuserdata/jeanj.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy.xcodeproj/project.xcworkspace/xcuserdata/jeanj.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Lobby-Boy.xcodeproj/xcuserdata/jeanj.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Lobby-Boy WatchKit App.xcscheme 8 | 9 | orderHint 10 | 4 11 | 12 | Lobby-Boy.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | Notification - Lobby-Boy WatchKit App.xcscheme 18 | 19 | orderHint 20 | 5 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 9F301B571AE9707300324DA4 26 | 27 | primary 28 | 29 | 30 | F50AB57E1AE9415900C3DB23 31 | 32 | primary 33 | 34 | 35 | F50AB5971AE9415A00C3DB23 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Lobby-Boy.xcodeproj/xcuserdata/mgozzo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Lobby-Boy WatchKit App.xcscheme 8 | 9 | orderHint 10 | 4 11 | 12 | Lobby-Boy.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | Notification - Lobby-Boy WatchKit App.xcscheme 18 | 19 | orderHint 20 | 5 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 9F301B571AE9707300324DA4 26 | 27 | primary 28 | 29 | 30 | F50AB57E1AE9415900C3DB23 31 | 32 | primary 33 | 34 | 35 | F50AB5971AE9415A00C3DB23 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Lobby-Boy.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Lobby-Boy.xcworkspace/xcuserdata/jeanj.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy.xcworkspace/xcuserdata/jeanj.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Lobby-Boy.xcworkspace/xcuserdata/jeanj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Lobby-Boy.xcworkspace/xcuserdata/mgozzo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Lobby-Boy/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Lobby-Boy 4 | // 5 | // Created by Mike on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const kStripePublishableKey; 12 | extern NSString * const kSupportKitAppToken; 13 | extern NSString * const kSetupCompleteKey; 14 | extern NSString * const kPaymentServerBaseUrl; 15 | extern NSString * const kCustomerTokenKey; 16 | 17 | @interface AppDelegate : UIResponder 18 | @property (strong, nonatomic) UIWindow *window; 19 | 20 | -(void)showDefaultRoot; 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Lobby-Boy/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Lobby-Boy/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | LobbyBoy 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | io.supportkit.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UIAppFonts 28 | 29 | Arvil_Sans.ttf 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Lobby-Boy/LBRootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LBRootViewController.h 3 | // Lobby-Boy 4 | // 5 | // Created by Mike on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LBRootViewController : UIViewController < SKTConversationDelegate > 13 | 14 | @property(nonatomic, strong) IBOutlet UIButton* talkButton; 15 | 16 | -(IBAction)talkAction:(id)sender; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Lobby-Boy/LBRootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LBRootViewController.m 3 | // Lobby-Boy 4 | // 5 | // Created by Mike on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "LBRootViewController.h" 10 | #import 11 | #import "AppDelegate.h" 12 | #import "MBProgressHud.h" 13 | #import "LBStripeCharger.h" 14 | 15 | @implementation LBRootViewController 16 | 17 | -(void)viewDidAppear:(BOOL)animated 18 | { 19 | [super viewDidAppear:animated]; 20 | 21 | [SupportKit conversation].delegate = self; 22 | } 23 | 24 | -(IBAction)talkAction:(id)sender 25 | { 26 | [SupportKit showConversation]; 27 | } 28 | 29 | -(void)conversation:(SKTConversation *)conversation didSelectBuyWithInfo:(SKTMessageBuyInfo*)buyInfo completion:(void (^)(BOOL))completion { 30 | [MBProgressHUD showHUDAddedTo:self.presentedViewController.view animated:YES]; 31 | 32 | [LBStripeCharger change:@(buyInfo.price) withCompletionHandler:^(NSURLResponse *response, 33 | NSData *data, 34 | NSError *error) { 35 | [MBProgressHUD hideHUDForView:self.presentedViewController.view animated:YES]; 36 | 37 | if (error) { 38 | [[[UIAlertView alloc] initWithTitle:@"Purchase Failed" message:[error description] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil] show]; 39 | } else { 40 | [SupportKit track:@"Purchase"]; 41 | [conversation sendMessage:[[SKTMessage alloc] initWithText:[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]]]; 42 | } 43 | completion(error == nil); 44 | }]; 45 | } 46 | 47 | -(void)conversation:(SKTConversation *)conversation didSelectMoreInfo:(SKTMessageBuyInfo*)buyInfo { 48 | NSURL *url = [NSURL URLWithString:buyInfo.moreInfoUrl]; 49 | 50 | [SupportKit track:@"More Info"]; 51 | if (![[UIApplication sharedApplication] openURL:url]) { 52 | NSLog(@"%@%@",@"Failed to open url:",[url description]); 53 | } 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Lobby-Boy/LBStripeCharger.h: -------------------------------------------------------------------------------- 1 | // 2 | // LBStripeCharger.h 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-24. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LBStripeCharger : NSObject 12 | 13 | +(void)change:(NSNumber*)price withCompletionHandler:(void (^)(NSURLResponse* response, NSData* data, NSError* connectionError)) handler; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Lobby-Boy/LBStripeCharger.m: -------------------------------------------------------------------------------- 1 | // 2 | // LBStripeCharger.m 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-24. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import "LBStripeCharger.h" 10 | 11 | NSString * const kPaymentServerBaseUrl = @"https://lobbyboy.herokuapp.com"; 12 | NSString * const kStripePublishableKey = @"pk_test_XMVpxPrQVvXdN8x98LKZ1m8y"; 13 | NSString * const kSupportKitAppToken = @"7l7ldpc0cyir8jgqw7eimped4"; 14 | NSString * const kSetupCompleteKey = @"setupComplete"; 15 | NSString * const kCustomerTokenKey = @"kCustomerTokenKey"; 16 | 17 | @implementation LBStripeCharger 18 | 19 | +(void)change:(NSNumber*)price withCompletionHandler:(void (^)(NSURLResponse* response, NSData* data, NSError* connectionError)) handler{ 20 | NSNumber* priceInCents = @([price intValue] * 100.0); 21 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/charge", kPaymentServerBaseUrl]]; 22 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; 23 | request.HTTPMethod = @"POST"; 24 | NSString *body = [NSString stringWithFormat:@"customerId=%@&amount=%ld", [[NSUserDefaults standardUserDefaults] objectForKey:kCustomerTokenKey], [priceInCents longValue]]; 25 | request.HTTPBody = [body dataUsingEncoding:NSUTF8StringEncoding]; 26 | 27 | 28 | [NSURLConnection sendAsynchronousRequest:request 29 | queue:[NSOperationQueue mainQueue] 30 | completionHandler:^(NSURLResponse *response, 31 | NSData *data, 32 | NSError *error) { 33 | 34 | if (error) { 35 | NSLog(@"%@", [error description]); 36 | } 37 | handler(response,data,error); 38 | }]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Lobby-Boy/LBUserInfoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LBUserInfoViewController.h 3 | // Lobby-Boy 4 | // 5 | // Created by Mike on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LBUserInfoViewController : UIViewController 13 | 14 | @property(nonatomic, strong) PTKView* paymentView; 15 | 16 | @property(nonatomic, strong) IBOutlet UIView* paymentViewContainer; 17 | @property(nonatomic, strong) IBOutlet UITextField* firstNameField; 18 | @property(nonatomic, strong) IBOutlet UITextField* lastNameField; 19 | @property(nonatomic, strong) IBOutlet UITextField* emailField; 20 | 21 | @property(nonatomic, strong) IBOutlet UILabel* ccInfoLabel; 22 | @property(nonatomic, strong) IBOutlet UIButton* saveButton; 23 | 24 | -(IBAction)buttonTapped:(id)sender; 25 | -(IBAction)propertyFieldChanged:(id)sender; 26 | @end 27 | -------------------------------------------------------------------------------- /Lobby-Boy/Lobby-Boy.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.io.supportkit.lobby-boy 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Arvil_Sans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Arvil_Sans.ttf -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-60.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-72.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-72@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-76.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small-50.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/Icon@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/lobby-boy@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/lobby-boy@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/lobby-logo-1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/lobby-logo-1@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/Resources/register@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Lobby-Boy/Resources/register@2x.png -------------------------------------------------------------------------------- /Lobby-Boy/StripeCharger.m: -------------------------------------------------------------------------------- 1 | // 2 | // StripeCharger.m 3 | // Lobby-Boy 4 | // 5 | // Created by Jean-Philippe Joyal on 2015-04-24. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | -------------------------------------------------------------------------------- /Lobby-Boy/ThirdParty/OnboardingContentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingContentViewController.h 3 | // Onboard 4 | // 5 | // Created by Mike on 8/17/14. 6 | // Copyright (c) 2014 Mike Amaral. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class OnboardingViewController; 12 | 13 | @interface OnboardingContentViewController : UIViewController { 14 | NSString *_titleText; 15 | NSString *_body; 16 | UIImage *_image; 17 | NSString *_buttonText; 18 | dispatch_block_t _actionHandler; 19 | 20 | UIImageView *_imageView; 21 | UILabel *_mainTextLabel; 22 | UILabel *_subTextLabel; 23 | UIButton *_actionButton; 24 | } 25 | 26 | @property (nonatomic) OnboardingViewController *delegate; 27 | 28 | @property (nonatomic) BOOL movesToNextViewController; 29 | 30 | @property (nonatomic) CGFloat iconHeight; 31 | @property (nonatomic) CGFloat iconWidth; 32 | 33 | @property (nonatomic, strong) UIColor *titleTextColor; 34 | @property (nonatomic, strong) UIColor *bodyTextColor; 35 | @property (nonatomic, strong) UIColor *buttonTextColor; 36 | 37 | @property (nonatomic, strong) NSString *titleFontName; 38 | @property (nonatomic) CGFloat titleFontSize; 39 | 40 | @property (nonatomic, strong) NSString *bodyFontName; 41 | @property (nonatomic) CGFloat bodyFontSize; 42 | 43 | @property (nonatomic, strong) NSString *buttonFontName; 44 | @property (nonatomic) CGFloat buttonFontSize; 45 | 46 | @property (nonatomic) CGFloat topPadding; 47 | @property (nonatomic) CGFloat underIconPadding; 48 | @property (nonatomic) CGFloat underTitlePadding; 49 | @property (nonatomic) CGFloat bottomPadding; 50 | 51 | @property (nonatomic, copy) dispatch_block_t viewWillAppearBlock; 52 | @property (nonatomic, copy) dispatch_block_t viewDidAppearBlock; 53 | 54 | + (instancetype)contentWithTitle:(NSString *)title body:(NSString *)body image:(UIImage *)image buttonText:(NSString *)buttonText action:(dispatch_block_t)action; 55 | - (instancetype)initWithTitle:(NSString *)title body:(NSString *)body image:(UIImage *)image buttonText:(NSString *)buttonText action:(dispatch_block_t)action; 56 | 57 | - (void)updateAlphas:(CGFloat)newAlpha; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Lobby-Boy/ThirdParty/OnboardingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingViewController.h 3 | // Onboard 4 | // 5 | // Created by Mike on 8/17/14. 6 | // Copyright (c) 2014 Mike Amaral. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OnboardingContentViewController.h" 11 | @import MediaPlayer; 12 | 13 | @interface OnboardingViewController : UIViewController 14 | 15 | // View controllers and background image 16 | @property (nonatomic, strong) NSArray *viewControllers; 17 | @property (nonatomic, strong) UIImage *backgroundImage; 18 | 19 | // Masking, blurring, fading, etc. 20 | @property (nonatomic) BOOL shouldMaskBackground; 21 | @property (nonatomic) BOOL shouldBlurBackground; 22 | @property (nonatomic) BOOL shouldFadeTransitions; 23 | @property (nonatomic) BOOL fadePageControlOnLastPage; 24 | 25 | // Skipping 26 | @property (nonatomic) BOOL allowSkipping; 27 | @property (nonatomic, strong) dispatch_block_t skipHandler; 28 | 29 | // Swiping 30 | @property (nonatomic) BOOL swipingEnabled; 31 | 32 | // Page Control 33 | @property (nonatomic) BOOL hidePageControl; 34 | @property (nonatomic, strong) UIPageControl *pageControl; 35 | 36 | // Skip Button 37 | @property (nonatomic, strong) UIButton *skipButton; 38 | 39 | // Movie player 40 | @property (nonatomic) MPMoviePlayerController *moviePlayerController; 41 | 42 | // Initializers 43 | + (instancetype)onboardWithBackgroundImage:(UIImage *)backgroundImage contents:(NSArray *)contents; 44 | - (instancetype)initWithBackgroundImage:(UIImage *)backgroundImage contents:(NSArray *)contents; 45 | 46 | + (instancetype)onboardWithBackgroundVideoURL:(NSURL *)backgroundVideoURL contents:(NSArray *)contents; 47 | - (instancetype)initWithBackgroundVideoURL:(NSURL *)backgroundVideoURL contents:(NSArray *)contents; 48 | 49 | // Manually moving to next page 50 | - (void)moveNextPage; 51 | 52 | //////////////////////////////////////////////////////////////////// 53 | // These are convenience properties for content view customization, so you 54 | // can set these properties on the master onboarding view controller and 55 | // it will make sure they trickle down to each content view controller, 56 | // rather than having to individually set the same values on each 57 | 58 | @property (nonatomic) CGFloat iconSize; // set this if you want the icon to have the same width and height for all contents 59 | @property (nonatomic) CGFloat iconHeight; 60 | @property (nonatomic) CGFloat iconWidth; 61 | 62 | @property (nonatomic, strong) UIColor *titleTextColor; 63 | @property (nonatomic, strong) UIColor *bodyTextColor; 64 | @property (nonatomic, strong) UIColor *buttonTextColor; 65 | 66 | @property (nonatomic, strong) NSString *fontName; // to set the same font for everything 67 | 68 | @property (nonatomic, strong) NSString *titleFontName; 69 | @property (nonatomic) CGFloat titleFontSize; 70 | 71 | @property (nonatomic, strong) NSString *bodyFontName; 72 | @property (nonatomic) CGFloat bodyFontSize; 73 | 74 | @property (nonatomic, strong) NSString *buttonFontName; 75 | @property (nonatomic) CGFloat buttonFontSize; 76 | 77 | @property (nonatomic) CGFloat topPadding; 78 | @property (nonatomic) CGFloat underIconPadding; 79 | @property (nonatomic) CGFloat underTitlePadding; 80 | @property (nonatomic) CGFloat bottomPadding; 81 | 82 | //////////////////////////////////////////////////////////////////// 83 | 84 | 85 | //////////////////////////////////////////////////////////////////// 86 | // Delegate methods for internal use. 87 | - (void)setCurrentPage:(OnboardingContentViewController *)currentPage; 88 | - (void)setNextPage:(OnboardingContentViewController *)nextPage; 89 | //////////////////////////////////////////////////////////////////// 90 | 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /Lobby-Boy/main.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // main.m 4 | // Lobby-Boy 5 | // 6 | // Created by Mike on 2015-04-23. 7 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 8 | // 9 | 10 | #import 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Lobby-BoyTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.supportkit.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Lobby-BoyTests/Lobby_BoyTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // Lobby_BoyTests.m 3 | // Lobby-BoyTests 4 | // 5 | // Created by Mike on 2015-04-23. 6 | // Copyright (c) 2015 SupportKit.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface Lobby_BoyTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation Lobby_BoyTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | pod 'PaymentKit' 2 | pod 'Stripe' 3 | pod 'MBProgressHUD' 4 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MBProgressHUD (0.9.1) 3 | - PaymentKit (1.1.1) 4 | - Stripe (3.1.0): 5 | - Stripe/Core (= 3.1.0) 6 | - Stripe/Core (3.1.0) 7 | 8 | DEPENDENCIES: 9 | - MBProgressHUD 10 | - PaymentKit 11 | - Stripe 12 | 13 | SPEC CHECKSUMS: 14 | MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad 15 | PaymentKit: 323c25233af5060880daa0c31366d4b688c34487 16 | Stripe: 8a456332f4db97bd0b8457fc8cce1e1a69ac0cd1 17 | 18 | COCOAPODS: 0.36.4 19 | -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKAddressZip.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKAddressZip.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKCard.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCard.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKCardCVC.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardCVC.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKCardExpiry.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardExpiry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKCardNumber.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardNumber.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKCardType.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardType.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKComponent.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKComponent.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKTextField.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKTextField.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKUSAddressZip.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKUSAddressZip.h -------------------------------------------------------------------------------- /Pods/Headers/Private/PaymentKit/PTKView.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SupportKit/SKTConversation.h: -------------------------------------------------------------------------------- 1 | ../../../SupportKit/SupportKit.framework/Versions/A/Headers/SKTConversation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SupportKit/SKTMessage.h: -------------------------------------------------------------------------------- 1 | ../../../SupportKit/SupportKit.framework/Versions/A/Headers/SKTMessage.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SupportKit/SKTSettings.h: -------------------------------------------------------------------------------- 1 | ../../../SupportKit/SupportKit.framework/Versions/A/Headers/SKTSettings.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SupportKit/SKTUser.h: -------------------------------------------------------------------------------- 1 | ../../../SupportKit/SupportKit.framework/Versions/A/Headers/SKTUser.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SupportKit/SupportKit.h: -------------------------------------------------------------------------------- 1 | ../../../SupportKit/SupportKit.framework/Versions/A/Headers/SupportKit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../../MBProgressHUD/MBProgressHUD.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKAddressZip.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKAddressZip.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKCard.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCard.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKCardCVC.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardCVC.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKCardExpiry.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardExpiry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKCardNumber.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardNumber.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKCardType.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKCardType.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKComponent.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKComponent.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKTextField.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKTextField.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKUSAddressZip.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKUSAddressZip.h -------------------------------------------------------------------------------- /Pods/Headers/Public/PaymentKit/PTKView.h: -------------------------------------------------------------------------------- 1 | ../../../PaymentKit/PaymentKit/PTKView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPAPIClient.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/STPAPIClient.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPBankAccount.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/STPBankAccount.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPCard.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/STPCard.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPCheckoutOptions.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/Checkout/STPCheckoutOptions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPCheckoutViewController.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/Checkout/STPCheckoutViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/STPToken.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/STPToken.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/Stripe.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/Stripe.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Stripe/StripeError.h: -------------------------------------------------------------------------------- 1 | ../../../Stripe/Stripe/PublicHeaders/StripeError.h -------------------------------------------------------------------------------- /Pods/MBProgressHUD/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2015 Matej Bukovinski 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MBProgressHUD (0.9.1) 3 | - PaymentKit (1.1.1) 4 | - Stripe (3.1.0): 5 | - Stripe/Core (= 3.1.0) 6 | - Stripe/Core (3.1.0) 7 | 8 | DEPENDENCIES: 9 | - MBProgressHUD 10 | - PaymentKit 11 | - Stripe 12 | 13 | SPEC CHECKSUMS: 14 | MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad 15 | PaymentKit: 323c25233af5060880daa0c31366d4b688c34487 16 | Stripe: 8a456332f4db97bd0b8457fc8cce1e1a69ac0cd1 17 | 18 | COCOAPODS: 0.36.4 19 | -------------------------------------------------------------------------------- /Pods/PaymentKit/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013- Stripe, Inc. (https://stripe.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKAddressZip.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKZip.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 2/1/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKComponent.h" 11 | 12 | @interface PTKAddressZip : PTKComponent { 13 | @protected 14 | NSString *_zip; 15 | } 16 | 17 | @property (nonatomic, readonly) NSString *string; 18 | 19 | + (instancetype)addressZipWithString:(NSString *)string; 20 | - (instancetype)initWithString:(NSString *)string; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKAddressZip.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKZip.m 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 2/1/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import "PTKAddressZip.h" 10 | 11 | @implementation PTKAddressZip 12 | 13 | + (instancetype)addressZipWithString:(NSString *)string 14 | { 15 | return [[self alloc] initWithString:string]; 16 | } 17 | 18 | - (instancetype)initWithString:(NSString *)string 19 | { 20 | if (self = [super init]) { 21 | _zip = [string copy]; 22 | } 23 | return self; 24 | } 25 | 26 | - (NSString *)string 27 | { 28 | return _zip; 29 | } 30 | 31 | - (BOOL)isValid 32 | { 33 | NSString *stripped = [_zip stringByReplacingOccurrencesOfString:@"\\s" 34 | withString:@"" 35 | options:NSRegularExpressionSearch 36 | range:NSMakeRange(0, _zip.length)]; 37 | 38 | return stripped.length > 2; 39 | } 40 | 41 | - (BOOL)isPartiallyValid 42 | { 43 | return _zip.length < 10; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCard.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCard.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/31/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PTKCard : NSObject 12 | 13 | @property (nonatomic, copy) NSString *number; 14 | @property (nonatomic, copy) NSString *cvc; 15 | @property (nonatomic, copy) NSString *addressZip; 16 | @property (nonatomic, assign) NSUInteger expMonth; 17 | @property (nonatomic, assign) NSUInteger expYear; 18 | 19 | @property (nonatomic, readonly) NSString *last4; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCard.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCard.m 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/31/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import "PTKCard.h" 10 | 11 | @implementation PTKCard 12 | 13 | - (NSString *)last4 14 | { 15 | if (_number.length >= 4) { 16 | return [_number substringFromIndex:([_number length] - 4)]; 17 | } else { 18 | return nil; 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCardCVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCardCVC.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKCardType.h" 11 | #import "PTKComponent.h" 12 | 13 | @interface PTKCardCVC : PTKComponent 14 | 15 | @property (nonatomic, readonly) NSString *string; 16 | 17 | + (instancetype)cardCVCWithString:(NSString *)string; 18 | - (BOOL)isValidWithType:(PTKCardType)type; 19 | - (BOOL)isPartiallyValidWithType:(PTKCardType)type; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCardCVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCardCVC.m 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import "PTKCardCVC.h" 10 | 11 | @implementation PTKCardCVC { 12 | @private 13 | NSString *_cvc; 14 | } 15 | 16 | + (instancetype)cardCVCWithString:(NSString *)string 17 | { 18 | return [[self alloc] initWithString:string]; 19 | } 20 | 21 | - (instancetype)initWithString:(NSString *)string 22 | { 23 | if (self = [super init]) { 24 | // Strip non-digits 25 | if (string) { 26 | _cvc = [string stringByReplacingOccurrencesOfString:@"\\D" 27 | withString:@"" 28 | options:NSRegularExpressionSearch 29 | range:NSMakeRange(0, string.length)]; 30 | } else { 31 | _cvc = [NSString string]; 32 | } 33 | } 34 | return self; 35 | } 36 | 37 | - (NSString *)string 38 | { 39 | return _cvc; 40 | } 41 | 42 | - (BOOL)isValid 43 | { 44 | return _cvc.length >= 3 && _cvc.length <= 4; 45 | } 46 | 47 | - (BOOL)isValidWithType:(PTKCardType)type 48 | { 49 | if (type == PTKCardTypeAmex) { 50 | return _cvc.length == 4; 51 | } else { 52 | return _cvc.length == 3; 53 | } 54 | } 55 | 56 | - (BOOL)isPartiallyValid 57 | { 58 | return _cvc.length <= 4; 59 | } 60 | 61 | - (BOOL)isPartiallyValidWithType:(PTKCardType)type 62 | { 63 | if (type == PTKCardTypeAmex) { 64 | return _cvc.length <= 4; 65 | } else { 66 | return _cvc.length <= 3; 67 | } 68 | } 69 | @end 70 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCardExpiry.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCardExpiry.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKComponent.h" 11 | 12 | @interface PTKCardExpiry : PTKComponent 13 | 14 | @property (nonatomic, readonly) NSUInteger month; 15 | @property (nonatomic, readonly) NSUInteger year; 16 | @property (nonatomic, readonly) NSString *formattedString; 17 | @property (nonatomic, readonly) NSString *formattedStringWithTrail; 18 | 19 | + (instancetype)cardExpiryWithString:(NSString *)string; 20 | - (instancetype)initWithString:(NSString *)string; 21 | - (BOOL)isValidLength; 22 | - (BOOL)isValidDate; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCardNumber.h: -------------------------------------------------------------------------------- 1 | // 2 | // CardNumber.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKCardType.h" 11 | #import "PTKComponent.h" 12 | 13 | @interface PTKCardNumber : PTKComponent 14 | 15 | @property (nonatomic, readonly) PTKCardType cardType; 16 | @property (nonatomic, readonly) NSString *last4; 17 | @property (nonatomic, readonly) NSString *lastGroup; 18 | @property (nonatomic, readonly) NSString *string; 19 | @property (nonatomic, readonly) NSString *formattedString; 20 | @property (nonatomic, readonly) NSString *formattedStringWithTrail; 21 | 22 | @property (nonatomic, readonly, getter = isValid) BOOL valid; 23 | @property (nonatomic, readonly, getter = isValidLength) BOOL validLength; 24 | @property (nonatomic, readonly, getter = isValidLuhn) BOOL validLuhn; 25 | @property (nonatomic, readonly, getter = isPartiallyValid) BOOL partiallyValid; 26 | 27 | + (instancetype)cardNumberWithString:(NSString *)string; 28 | - (instancetype)initWithString:(NSString *)string; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKCardType.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKCardType.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #ifndef PTKCardType_h 10 | #define PTKCardType_h 11 | 12 | typedef enum { 13 | PTKCardTypeVisa, 14 | PTKCardTypeMasterCard, 15 | PTKCardTypeAmex, 16 | PTKCardTypeDiscover, 17 | PTKCardTypeJCB, 18 | PTKCardTypeDinersClub, 19 | PTKCardTypeUnknown 20 | } PTKCardType; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKComponent.h 3 | // Stripe 4 | // 5 | // Created by Phil Cohen on 12/18/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | // Abstract class; represents a component of a credit card. 12 | @interface PTKComponent : NSObject 13 | 14 | - (id)initWithString:(NSString *)string; 15 | - (NSString *)string; 16 | - (NSString *)formattedString; 17 | - (BOOL)isValid; 18 | 19 | // Whether the value is valid so far, even if incomplete (useful for as-you-type validation). 20 | - (BOOL)isPartiallyValid; 21 | 22 | // The formatted value with trailing spaces inserted as needed (such as after groups in the credit card number). 23 | - (NSString *)formattedStringWithTrail; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKComponent.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKComponent.m 3 | // Stripe 4 | // 5 | // Created by Phil Cohen on 12/18/13. 6 | // 7 | // 8 | 9 | #import "PTKComponent.h" 10 | 11 | @implementation PTKComponent 12 | 13 | - (id)initWithString:(NSString *)string 14 | { 15 | return (self = [super init]); 16 | } 17 | 18 | - (NSString *)string 19 | { 20 | @throw [NSException exceptionWithName:NSInternalInconsistencyException 21 | reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)] 22 | userInfo:nil]; 23 | } 24 | 25 | - (BOOL)isValid 26 | { 27 | @throw [NSException exceptionWithName:NSInternalInconsistencyException 28 | reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)] 29 | userInfo:nil]; 30 | } 31 | 32 | - (BOOL)isPartiallyValid 33 | { 34 | @throw [NSException exceptionWithName:NSInternalInconsistencyException 35 | reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)] 36 | userInfo:nil]; 37 | } 38 | 39 | - (NSString *)formattedString 40 | { 41 | return [self string]; 42 | } 43 | 44 | - (NSString *)formattedStringWithTrail 45 | { 46 | return [self string]; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKTextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKTextField.h 3 | // PaymentKit Example 4 | // 5 | // Created by Michaël Villar on 3/20/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class PTKTextField; 12 | 13 | @protocol PTKTextFieldDelegate 14 | 15 | @optional 16 | 17 | - (void)pkTextFieldDidBackSpaceWhileTextIsEmpty:(PTKTextField *)textField; 18 | 19 | @end 20 | 21 | @interface PTKTextField : UITextField 22 | 23 | + (NSString*)textByRemovingUselessSpacesFromString:(NSString*)string; 24 | 25 | @property (nonatomic, weak) id delegate; 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKTextField.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKTextField.m 3 | // PaymentKit Example 4 | // 5 | // Created by Michaël Villar on 3/20/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import "PTKTextField.h" 10 | 11 | #define kPTKTextFieldSpaceChar @"\u200B" 12 | 13 | @implementation PTKTextField 14 | 15 | + (NSString *)textByRemovingUselessSpacesFromString:(NSString *)string 16 | { 17 | return [string stringByReplacingOccurrencesOfString:kPTKTextFieldSpaceChar withString:@""]; 18 | } 19 | 20 | - (id)initWithFrame:(CGRect)frame 21 | { 22 | self = [super initWithFrame:frame]; 23 | if (self) { 24 | self.text = kPTKTextFieldSpaceChar; 25 | [self addObserver:self forKeyPath:@"text" options:0 context:NULL]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)dealloc 31 | { 32 | [self removeObserver:self forKeyPath:@"text"]; 33 | } 34 | 35 | - (void)drawPlaceholderInRect:(CGRect)rect 36 | { 37 | 38 | } 39 | 40 | - (void)drawRect:(CGRect)rect 41 | { 42 | if (self.text.length == 0 || [self.text isEqualToString:kPTKTextFieldSpaceChar]) { 43 | CGRect placeholderRect = self.bounds; 44 | placeholderRect.origin.y += 0.5; 45 | [super drawPlaceholderInRect:placeholderRect]; 46 | } 47 | else 48 | [super drawRect:rect]; 49 | } 50 | 51 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object 52 | change:(NSDictionary *)change context:(void *)context 53 | { 54 | if ([keyPath isEqualToString:@"text"] && object == self) { 55 | if (self.text.length == 0) { 56 | if ([self.delegate respondsToSelector:@selector(pkTextFieldDidBackSpaceWhileTextIsEmpty:)]) 57 | [self.delegate performSelector:@selector(pkTextFieldDidBackSpaceWhileTextIsEmpty:) 58 | withObject:self]; 59 | self.text = kPTKTextFieldSpaceChar; 60 | } 61 | [self setNeedsDisplay]; 62 | } 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKUSAddressZip.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKUSAddressZip.h 3 | // PaymentKit Example 4 | // 5 | // Created by Alex MacCaw on 2/17/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKAddressZip.h" 11 | 12 | @interface PTKUSAddressZip : PTKAddressZip 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKUSAddressZip.m: -------------------------------------------------------------------------------- 1 | // 2 | // PTKUSAddressZip.m 3 | // PaymentKit Example 4 | // 5 | // Created by Alex MacCaw on 2/17/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import "PTKUSAddressZip.h" 10 | 11 | @implementation PTKUSAddressZip 12 | 13 | - (id)initWithString:(NSString *)string 14 | { 15 | if (self = [super init]) { 16 | // Strip non-digits 17 | _zip = [string stringByReplacingOccurrencesOfString:@"\\D" 18 | withString:@"" 19 | options:NSRegularExpressionSearch 20 | range:NSMakeRange(0, string.length)]; 21 | } 22 | return self; 23 | } 24 | 25 | - (BOOL)isValid 26 | { 27 | return _zip.length == 5; 28 | } 29 | 30 | - (BOOL)isPartiallyValid 31 | { 32 | return _zip.length <= 5; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/PTKView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PTKPaymentField.h 3 | // PTKPayment Example 4 | // 5 | // Created by Alex MacCaw on 1/22/13. 6 | // Copyright (c) 2013 Stripe. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PTKCard.h" 11 | #import "PTKCardNumber.h" 12 | #import "PTKCardExpiry.h" 13 | #import "PTKCardCVC.h" 14 | #import "PTKAddressZip.h" 15 | #import "PTKUSAddressZip.h" 16 | 17 | @class PTKView, PTKTextField; 18 | 19 | @protocol PTKViewDelegate 20 | @optional 21 | - (void)paymentView:(PTKView *)paymentView withCard:(PTKCard *)card isValid:(BOOL)valid; 22 | @end 23 | 24 | @interface PTKView : UIView 25 | 26 | - (BOOL)isValid; 27 | 28 | @property (nonatomic, readonly) UIView *opaqueOverGradientView; 29 | @property (nonatomic, readonly) PTKCardNumber *cardNumber; 30 | @property (nonatomic, readonly) PTKCardExpiry *cardExpiry; 31 | @property (nonatomic, readonly) PTKCardCVC *cardCVC; 32 | @property (nonatomic, readonly) PTKAddressZip *addressZip; 33 | 34 | @property IBOutlet UIView *innerView; 35 | @property IBOutlet UIView *clipView; 36 | @property IBOutlet PTKTextField *cardNumberField; 37 | @property IBOutlet PTKTextField *cardExpiryField; 38 | @property IBOutlet PTKTextField *cardCVCField; 39 | @property IBOutlet UIImageView *placeholderView; 40 | @property (nonatomic, weak) id delegate; 41 | @property (readonly) PTKCard *card; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/amex.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/amex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/amex@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/cvc-amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/cvc-amex.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/cvc-amex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/cvc-amex@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/cvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/cvc.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/cvc@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/cvc@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/diners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/diners.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/diners@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/diners@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/discover.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/discover@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/discover@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/jcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/jcb.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/jcb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/jcb@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/mastercard.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/mastercard@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/mastercard@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/placeholder.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/placeholder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/placeholder@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/visa.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/Cards/visa@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/Cards/visa@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/gradient@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/gradient@2x.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/textfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/textfield.png -------------------------------------------------------------------------------- /Pods/PaymentKit/PaymentKit/Resources/textfield@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/PaymentKit/PaymentKit/Resources/textfield@2x.png -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/jeanj.xcuserdatad/xcschemes/Pods-PaymentKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/jeanj.xcuserdatad/xcschemes/Pods-SupportKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/jeanj.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/jeanj.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-MBProgressHUD.xcscheme 8 | 9 | orderHint 10 | 6 11 | 12 | Pods-PaymentKit.xcscheme 13 | 14 | isShown 15 | 16 | orderHint 17 | 2 18 | 19 | Pods-Stripe.xcscheme 20 | 21 | orderHint 22 | 7 23 | 24 | Pods-SupportKit.xcscheme 25 | 26 | isShown 27 | 28 | orderHint 29 | 3 30 | 31 | Pods.xcscheme 32 | 33 | isShown 34 | 35 | orderHint 36 | 1 37 | 38 | 39 | SuppressBuildableAutocreation 40 | 41 | 0A22CAA3F420F82AFE05A919 42 | 43 | primary 44 | 45 | 46 | 1A1434D3AC24BC01D5B3386F 47 | 48 | primary 49 | 50 | 51 | 3D5A27E7FCDFAB898CCCFD5C 52 | 53 | primary 54 | 55 | 56 | 465F6E8784848CC0FE327E1C 57 | 58 | primary 59 | 60 | 61 | 6D482DE1A7716063247E6F54 62 | 63 | primary 64 | 65 | 66 | 766347FBBC70151CD6FE93C0 67 | 68 | primary 69 | 70 | 71 | E68F7037F4C1E07F40FC7508 72 | 73 | primary 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/mgozzo.xcuserdatad/xcschemes/Pods-PaymentKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/mgozzo.xcuserdatad/xcschemes/Pods-SupportKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/mgozzo.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/mgozzo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-MBProgressHUD.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 6 13 | 14 | Pods-PaymentKit.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 2 20 | 21 | Pods-Stripe.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 7 27 | 28 | Pods-SupportKit.xcscheme 29 | 30 | isShown 31 | 32 | orderHint 33 | 3 34 | 35 | Pods.xcscheme 36 | 37 | isShown 38 | 39 | orderHint 40 | 1 41 | 42 | 43 | SuppressBuildableAutocreation 44 | 45 | 0A22CAA3F420F82AFE05A919 46 | 47 | primary 48 | 49 | 50 | 465F6E8784848CC0FE327E1C 51 | 52 | primary 53 | 54 | 55 | 629F20612B148885480FBF62 56 | 57 | primary 58 | 59 | 60 | 6D482DE1A7716063247E6F54 61 | 62 | primary 63 | 64 | 65 | 766347FBBC70151CD6FE93C0 66 | 67 | primary 68 | 69 | 70 | 7A9397A832D7C450B0416C75 71 | 72 | primary 73 | 74 | 75 | 95BAFF72D93DC5DBE6CF9A56 76 | 77 | primary 78 | 79 | 80 | BD654FDCFD7BEFA9200FC94D 81 | 82 | primary 83 | 84 | 85 | DB095F1D80A2B55476A99F4F 86 | 87 | primary 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /Pods/Stripe/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011- Stripe, Inc. (https://stripe.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPCheckoutDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutDelegate.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol STPCheckoutWebViewAdapter; 12 | @protocol STPCheckoutDelegate 13 | - (void)checkoutAdapterDidStartLoad:(id)adapter; 14 | - (void)checkoutAdapterDidFinishLoad:(id)adapter; 15 | - (void)checkoutAdapter:(id)adapter didTriggerEvent:(NSString *)event withPayload:(NSDictionary *)payload; 16 | - (void)checkoutAdapter:(id)adapter didError:(NSError *)error; 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPCheckoutInternalUIWebViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutInternalUIWebViewController.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | 13 | #import 14 | #import "STPCheckoutDelegate.h" 15 | #import "STPCheckoutViewController.h" 16 | 17 | @interface STPCheckoutInternalUIWebViewController : UIViewController 18 | 19 | - (instancetype)initWithCheckoutViewController:(STPCheckoutViewController *)checkoutViewController; 20 | 21 | @property (weak, nonatomic, readonly) STPCheckoutViewController *checkoutController; 22 | @property (weak, nonatomic) UIView *webView; 23 | @property (nonatomic) id adapter; 24 | @property (weak, nonatomic) UIActivityIndicatorView *activityIndicator; 25 | @property (weak, nonatomic) UIView *headerBackground; 26 | @property (nonatomic) STPCheckoutOptions *options; 27 | @property (nonatomic) NSURL *logoURL; 28 | @property (nonatomic) NSURL *url; 29 | @property (nonatomic, weak) id delegate; 30 | @property (nonatomic) BOOL backendChargeSuccessful; 31 | @property (nonatomic) NSError *backendChargeError; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPCheckoutOptions.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutOptions.m 3 | // StripeExample 4 | // 5 | // Created by Jack Flintermann on 10/6/14. 6 | // 7 | 8 | #import "Stripe.h" 9 | #import "STPCheckoutOptions.h" 10 | #import "STPColorUtils.h" 11 | 12 | @implementation STPCheckoutOptions 13 | 14 | - (instancetype)init { 15 | self = [super init]; 16 | if (self) { 17 | _publishableKey = [Stripe defaultPublishableKey]; 18 | _companyName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"]; 19 | _purchaseCurrency = @"USD"; 20 | } 21 | return self; 22 | } 23 | 24 | - (NSString *)stringifiedJSONRepresentation { 25 | NSMutableDictionary *values = [NSMutableDictionary dictionary]; 26 | if (self.publishableKey) { 27 | values[@"publishableKey"] = self.publishableKey; 28 | } 29 | if (self.logoURL) { 30 | values[@"logoURL"] = [self.logoURL absoluteString]; 31 | } 32 | if (self.logoColor) { 33 | values[@"logoColor"] = [STPColorUtils hexCodeForColor:self.logoColor]; 34 | } 35 | if (self.companyName) { 36 | values[@"companyName"] = self.companyName; 37 | } 38 | if (self.purchaseDescription) { 39 | values[@"purchaseDescription"] = self.purchaseDescription; 40 | } 41 | if (self.purchaseAmount != 0) { 42 | values[@"purchaseAmount"] = @(self.purchaseAmount); 43 | } 44 | if (self.customerEmail) { 45 | values[@"customerEmail"] = self.customerEmail; 46 | } 47 | if (self.purchaseLabel) { 48 | values[@"purchaseLabel"] = self.purchaseLabel; 49 | } 50 | if (self.purchaseCurrency) { 51 | values[@"purchaseCurrency"] = [self.purchaseCurrency uppercaseString]; 52 | } 53 | if (self.enableRememberMe) { 54 | values[@"enableRememberMe"] = self.enableRememberMe; 55 | } 56 | if (self.enablePostalCode) { 57 | values[@"enablePostalCode"] = self.enablePostalCode; 58 | } 59 | if (self.requireBillingAddress) { 60 | values[@"requireBillingAddress"] = self.requireBillingAddress; 61 | } 62 | 63 | return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:values options:0 error:nil] encoding:NSUTF8StringEncoding]; 64 | } 65 | 66 | #pragma mark - NSCopying 67 | 68 | - (id)copyWithZone:(__unused NSZone *)zone { 69 | STPCheckoutOptions *options = [[[self class] alloc] init]; 70 | options.publishableKey = self.publishableKey; 71 | options.appleMerchantId = self.appleMerchantId; 72 | options.logoURL = self.logoURL; 73 | options.logoImage = self.logoImage; 74 | options.logoColor = self.logoColor; 75 | options.companyName = self.companyName; 76 | options.purchaseDescription = self.purchaseDescription; 77 | options.purchaseAmount = self.purchaseAmount; 78 | options.customerEmail = self.customerEmail; 79 | options.purchaseLabel = self.purchaseLabel; 80 | options.purchaseCurrency = self.purchaseCurrency; 81 | options.enableRememberMe = self.enableRememberMe; 82 | options.enablePostalCode = self.enablePostalCode; 83 | options.requireBillingAddress = self.requireBillingAddress; 84 | return options; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPCheckoutWebViewAdapter.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutWebViewAdapter.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | #define STP_VIEW_CLASS UIView 13 | #import 14 | #else 15 | #define STP_VIEW_CLASS NSView 16 | #import 17 | #endif 18 | 19 | static NSString *const checkoutOptionsGlobal = @"StripeCheckoutOptions"; 20 | static NSString *const checkoutRedirectPrefix = @"/-/"; 21 | static NSString *const checkoutUserAgent = @"Stripe"; 22 | static NSString *const checkoutRPCScheme = @"stripecheckout"; 23 | 24 | static NSString *const checkoutHost = @"checkout.stripe.com"; 25 | static NSString *const checkoutURLString = @"https://checkout.stripe.com/v3/ios/index.html"; 26 | 27 | static NSString *const STPCheckoutEventOpen = @"CheckoutDidOpen"; 28 | static NSString *const STPCheckoutEventTokenize = @"CheckoutDidTokenize"; 29 | static NSString *const STPCheckoutEventCancel = @"CheckoutDidCancel"; 30 | static NSString *const STPCheckoutEventFinish = @"CheckoutDidFinish"; 31 | static NSString *const STPCheckoutEventError = @"CheckoutDidError"; 32 | 33 | @protocol STPCheckoutDelegate; 34 | @protocol STPCheckoutWebViewAdapter 35 | @property (nonatomic, weak) id delegate; 36 | @property (nonatomic, readonly) STP_VIEW_CLASS *webView; 37 | - (void)loadRequest:(NSURLRequest *)request; 38 | - (void)evaluateJavaScript:(NSString *)js; 39 | - (void)cleanup; 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPColorUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPColorUtils.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 11/3/14. 6 | // 7 | // 8 | 9 | #import 10 | #if TARGET_OS_IPHONE 11 | #import 12 | #define STP_COLOR_CLASS UIColor 13 | #else 14 | #import 15 | #define STP_COLOR_CLASS NSColor 16 | #endif 17 | 18 | @interface STPColorUtils : NSObject 19 | 20 | + (BOOL)colorIsLight:(STP_COLOR_CLASS *)color; 21 | 22 | + (STP_COLOR_CLASS *)colorForHexCode:(NSString *)hexCode; 23 | + (NSString *)hexCodeForColor:(STP_COLOR_CLASS *)color; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPColorUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPColorUtils.m 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 11/3/14. 6 | // 7 | // 8 | 9 | #import "STPColorUtils.h" 10 | 11 | @implementation STPColorUtils 12 | 13 | // Some of this code is adapted from https://github.com/nicklockwood/ColorUtils 14 | 15 | + (BOOL)colorIsLight:(STP_COLOR_CLASS *)color { 16 | CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(color.CGColor)); 17 | const CGFloat *components = CGColorGetComponents(color.CGColor); 18 | switch (model) { 19 | case kCGColorSpaceModelMonochrome: { 20 | return components[1] > 0.5; 21 | } 22 | case kCGColorSpaceModelRGB: { 23 | CGFloat colorBrightness = ((components[0] * 299) + (components[1] * 587) + (components[2] * 114)) / 1000; 24 | return colorBrightness > 0.5; 25 | } 26 | default: { return YES; } 27 | } 28 | } 29 | 30 | + (STP_COLOR_CLASS *)colorForHexCode:(NSString *)aHexCode { 31 | NSString *hexCode = [aHexCode stringByReplacingOccurrencesOfString:@"#" withString:@""]; 32 | if (hexCode.length != 6) { 33 | return [STP_COLOR_CLASS blackColor]; 34 | } 35 | uint32_t rgb; 36 | NSScanner *scanner = [NSScanner scannerWithString:hexCode]; 37 | [scanner scanHexInt:&rgb]; 38 | CGFloat red = ((rgb & 0xFF0000) >> 16) / 255.0f; 39 | CGFloat green = ((rgb & 0x00FF00) >> 8) / 255.0f; 40 | CGFloat blue = (rgb & 0x0000FF) / 255.0f; 41 | return [STP_COLOR_CLASS colorWithRed:red green:green blue:blue alpha:1.0f]; 42 | } 43 | 44 | + (NSString *)hexCodeForColor:(STP_COLOR_CLASS *)color { 45 | uint8_t rgb[3]; 46 | CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(color.CGColor)); 47 | const CGFloat *components = CGColorGetComponents(color.CGColor); 48 | switch (model) { 49 | case kCGColorSpaceModelMonochrome: { 50 | rgb[0] = (uint8_t)(components[0] * 255); 51 | rgb[1] = (uint8_t)(components[0] * 255); 52 | rgb[2] = (uint8_t)(components[0] * 255); 53 | break; 54 | } 55 | case kCGColorSpaceModelRGB: { 56 | rgb[0] = (uint8_t)(components[0] * 255); 57 | rgb[1] = (uint8_t)(components[1] * 255); 58 | rgb[2] = (uint8_t)(components[2] * 255); 59 | break; 60 | } 61 | default: { 62 | rgb[0] = 0; 63 | rgb[1] = 0; 64 | rgb[2] = 0; 65 | break; 66 | } 67 | } 68 | unsigned long rgbValue = (unsigned long)((rgb[0] << 16) + (rgb[1] << 8) + rgb[2]); 69 | return [NSString stringWithFormat:@"#%.6lx", rgbValue]; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPIOSCheckoutWebViewAdapter.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPIOSCheckoutWebViewAdapter.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | 13 | #import 14 | #import "STPCheckoutWebViewAdapter.h" 15 | 16 | @interface STPIOSCheckoutWebViewAdapter : NSObject 17 | @property (nonatomic) UIWebView *webView; 18 | @end 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPIOSCheckoutWebViewAdapter.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPIOSCheckoutWebViewAdapter.m 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | 13 | #import "STPIOSCheckoutWebViewAdapter.h" 14 | #import "STPStrictURLProtocol.h" 15 | #import "STPCheckoutDelegate.h" 16 | 17 | @implementation STPIOSCheckoutWebViewAdapter 18 | 19 | @synthesize delegate; 20 | 21 | - (instancetype)init { 22 | self = [super init]; 23 | if (self) { 24 | _webView = [[UIWebView alloc] initWithFrame:CGRectZero]; 25 | _webView.delegate = self; 26 | _webView.keyboardDisplayRequiresUserAction = NO; 27 | static dispatch_once_t onceToken; 28 | dispatch_once(&onceToken, ^{ [NSURLProtocol registerClass:[STPStrictURLProtocol class]]; }); 29 | } 30 | return self; 31 | } 32 | 33 | - (void)dealloc { 34 | _webView.delegate = nil; 35 | } 36 | 37 | - (void)loadRequest:(NSURLRequest *)request { 38 | [self.webView loadRequest:request]; 39 | } 40 | 41 | - (void)evaluateJavaScript:(NSString *)js { 42 | [self.webView stringByEvaluatingJavaScriptFromString:js]; 43 | } 44 | 45 | - (void)cleanup { 46 | if ([self.webView isLoading]) { 47 | [self.webView stopLoading]; 48 | } 49 | } 50 | 51 | #pragma mark - UIWebViewDelegate 52 | 53 | - (void)webViewDidStartLoad:(__unused UIWebView *)webView { 54 | [self.delegate checkoutAdapterDidStartLoad:self]; 55 | } 56 | 57 | - (BOOL)webView:(__unused UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { 58 | NSURL *url = request.URL; 59 | switch (navigationType) { 60 | case UIWebViewNavigationTypeLinkClicked: { 61 | if ([url.host isEqualToString:checkoutHost]) { 62 | if ([url.path rangeOfString:checkoutRedirectPrefix].location == 0) { 63 | [[UIApplication sharedApplication] openURL:url]; 64 | return NO; 65 | } 66 | return YES; 67 | } 68 | return NO; 69 | } 70 | case UIWebViewNavigationTypeOther: { 71 | if ([url.scheme isEqualToString:checkoutRPCScheme]) { 72 | NSString *event = url.host; 73 | NSString *path = [url.path componentsSeparatedByString:@"/"][1]; 74 | NSDictionary *payload = nil; 75 | if (path != nil) { 76 | payload = [NSJSONSerialization JSONObjectWithData:[path dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil]; 77 | } 78 | [self.delegate checkoutAdapter:self didTriggerEvent:event withPayload:payload]; 79 | return NO; 80 | } 81 | return YES; 82 | } 83 | default: 84 | // add tracking 85 | return NO; 86 | } 87 | } 88 | 89 | - (void)webViewDidFinishLoad:(__unused UIWebView *)webView { 90 | [self.delegate checkoutAdapterDidFinishLoad:self]; 91 | } 92 | 93 | - (void)webView:(__unused UIWebView *)webView didFailLoadWithError:(NSError *)error { 94 | [self.delegate checkoutAdapter:self didError:error]; 95 | } 96 | 97 | @end 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPOSXCheckoutWebViewAdapter.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPOSXCheckoutWebViewAdapter.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if !TARGET_OS_IPHONE 12 | 13 | #import "STPCheckoutWebViewAdapter.h" 14 | #import 15 | 16 | @interface STPOSXCheckoutWebViewAdapter : NSObject 17 | @property (nonatomic) WebView *webView; 18 | @end 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPStrictURLProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPStrictURLProtocol.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static NSString *const STPStrictURLProtocolRequestKey = @"STPStrictURLProtocolRequestKey"; 12 | 13 | /** 14 | * This URL protocol treats any non-20x or 30x response from checkout as an error (unlike the default UIWebView behavior, which e.g. displays a 404 page). 15 | */ 16 | @interface STPStrictURLProtocol : NSURLProtocol 17 | @property (nonatomic, strong) NSURLConnection *connection; 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/Checkout/STPStrictURLProtocol.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPStrictURLProtocol.m 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/7/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import "STPStrictURLProtocol.h" 10 | #import "StripeError.h" 11 | 12 | @interface STPStrictURLProtocol() 13 | @end 14 | 15 | @implementation STPStrictURLProtocol 16 | 17 | + (BOOL)canInitWithRequest:(NSURLRequest *)request { 18 | return [self propertyForKey:STPStrictURLProtocolRequestKey inRequest:request] != nil; 19 | } 20 | 21 | + (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { 22 | return request; 23 | } 24 | 25 | - (void)startLoading { 26 | NSMutableURLRequest *newRequest = [self.request mutableCopy]; 27 | [self.class removePropertyForKey:STPStrictURLProtocolRequestKey inRequest:newRequest]; 28 | self.connection = [NSURLConnection connectionWithRequest:[newRequest copy] delegate:self]; 29 | } 30 | 31 | - (void)stopLoading { 32 | [self.connection cancel]; 33 | self.connection = nil; 34 | } 35 | 36 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 37 | if ([response isKindOfClass:[NSHTTPURLResponse class]]) { 38 | NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; 39 | // 30x redirects are automatically followed and will not reach here, 40 | // so we only need to check for successful 20x status codes. 41 | if (httpResponse.statusCode / 100 != 2 && httpResponse.statusCode != 301) { 42 | NSError *error = [[NSError alloc] initWithDomain:StripeDomain 43 | code:STPConnectionError 44 | userInfo:@{ 45 | NSLocalizedDescriptionKey: STPUnexpectedError, 46 | STPErrorMessageKey: @"Stripe Checkout couldn't open. Please check your internet connection and try " 47 | @"again. If the problem persists, please contact support@stripe.com." 48 | }]; 49 | [self.client URLProtocol:self didFailWithError:error]; 50 | [connection cancel]; 51 | self.connection = nil; 52 | return; 53 | } 54 | } 55 | [self.client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; 56 | } 57 | 58 | - (void)connection:(__unused NSURLConnection *)connection didReceiveData:(NSData *)data { 59 | [self.client URLProtocol:self didLoadData:data]; 60 | } 61 | 62 | - (void)connectionDidFinishLoading:(__unused NSURLConnection *)connection { 63 | [self.client URLProtocolDidFinishLoading:self]; 64 | } 65 | 66 | - (void)connection:(__unused NSURLConnection *)connection didFailWithError:(NSError *)error { 67 | [self.client URLProtocol:self didFailWithError:error]; 68 | } 69 | 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/Checkout/STPCheckoutOptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutOptions.h 3 | // StripeExample 4 | // 5 | // Created by Jack Flintermann on 10/6/14. 6 | // 7 | 8 | #import 9 | #if TARGET_OS_IPHONE 10 | #import 11 | #else 12 | #import 13 | #endif 14 | 15 | /** 16 | * This class represents a configurable set of options that you can pass to an STPCheckoutViewController or an STPPaymentPresenter to control the appearance of 17 | * Stripe Checkout. For more information on how these properties behave, see https://stripe.com/docs/checkout#integration-custom 18 | */ 19 | @interface STPCheckoutOptions : NSObject 20 | 21 | #pragma mark - Required options 22 | 23 | /** 24 | * The Stripe publishable key to use for your Checkout requests. Defaults to [Stripe defaultPublishableKey]. Required. 25 | */ 26 | @property (nonatomic, copy) NSString *publishableKey; 27 | 28 | #pragma mark - Strongly recommended options 29 | 30 | /** 31 | * The merchant ID that you've obtained from Apple while creating your Apple Pay certificate. If you haven't done this, you can learn how at 32 | * https://stripe.com/docs/mobile/apple-pay . This property needs to be set in order to use Apple Pay with STPPaymentPresenter. 33 | */ 34 | @property (nonatomic, copy) NSString *appleMerchantId; 35 | 36 | /** 37 | * This can be an external image URL that will load in the header of Stripe Checkout. This takes precedent over the logoImage property. The recommended minimum 38 | * size for this image is 128x128px. 39 | */ 40 | @property (nonatomic, copy) NSURL *logoURL; 41 | 42 | /** 43 | * You can also specify a local UIImage to be used as the Checkout logo header (see logoURL). 44 | */ 45 | #if TARGET_OS_IPHONE 46 | @property (nonatomic) UIImage *logoImage; 47 | #else 48 | @property (nonatomic) NSImage *logoImage; 49 | #endif 50 | 51 | /** 52 | * This specifies the color of the header shown in Stripe Checkout. If you specify a logoURL (but not a logoImage) and leave this property nil, Checkout will 53 | * auto-detect the background color of the image you point to and use that as the header color. 54 | */ 55 | #if TARGET_OS_IPHONE 56 | @property (nonatomic, copy) UIColor *logoColor; 57 | #else 58 | @property (nonatomic, copy) NSColor *logoColor; 59 | #endif 60 | 61 | /** 62 | * The name of your company or website. Displayed in the header. Defaults to your app's name. This property needs to be set in order to use Apple Pay with 63 | * STPPaymentPresenter. 64 | */ 65 | @property (nonatomic, copy) NSString *companyName; 66 | 67 | /** 68 | * A description of the product or service being purchased. Appears in the header. 69 | */ 70 | @property (nonatomic, copy) NSString *purchaseDescription; 71 | 72 | /** 73 | * The amount (in cents) that's shown to the user. Note that this is for display purposes only; you will still have to explicitly specify the amount when you 74 | * create a charge using the Stripe API. This property needs to be set in order to use Apple Pay with STPPaymentPresenter. 75 | * @warning don't forget this is in cents! So for a $10 charge, specify 1000 here. 76 | */ 77 | @property (nonatomic) NSUInteger purchaseAmount; 78 | 79 | /** 80 | * If you already know the email address of your user, you can provide it to Checkout to be pre-filled. 81 | */ 82 | @property (nonatomic, copy) NSString *customerEmail; 83 | 84 | #pragma mark - Additional options 85 | 86 | /** 87 | * The label of the payment button in the Checkout form (e.g. “Subscribe”, “Pay {{amount}}”, etc.). If you include {{amount}}, it will be replaced by the 88 | * provided amount. Otherwise, the amount will be appended to the end of your label. Defaults to "Pay {{amount}}". 89 | */ 90 | @property (nonatomic, copy) NSString *purchaseLabel; 91 | 92 | /** 93 | * The currency of the amount (3-letter ISO code). The default is "USD". 94 | */ 95 | @property (nonatomic, copy) NSString *purchaseCurrency; 96 | 97 | /** 98 | * Specify whether to include the option to "Remember Me" for future purchases (true or false). The default is true. 99 | */ 100 | @property (nonatomic, copy) NSNumber *enableRememberMe; 101 | 102 | /** 103 | * Specify whether Checkout should validate your user's billing ZIP code (true or false). The default is false. 104 | */ 105 | @property (nonatomic, copy) NSNumber *enablePostalCode; 106 | 107 | /** 108 | * Specify whether Checkout should require the user to enter their billing address. The default is false. 109 | */ 110 | @property (nonatomic, copy) NSNumber *requireBillingAddress; 111 | 112 | /** 113 | * Used internally by Stripe Checkout. 114 | * 115 | * @return a JSON string representing the options. 116 | */ 117 | - (NSString *)stringifiedJSONRepresentation; 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/Checkout/STPCheckoutViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCheckoutViewController.h 3 | // StripeExample 4 | // 5 | // Created by Jack Flintermann on 9/15/14. 6 | // 7 | 8 | #import 9 | 10 | #if TARGET_OS_IPHONE 11 | #import 12 | #else 13 | #import 14 | #endif 15 | 16 | typedef NS_ENUM(NSInteger, STPPaymentStatus) { 17 | STPPaymentStatusSuccess, // The transaction was a success. 18 | STPPaymentStatusError, // The transaction failed. 19 | STPPaymentStatusUserCancelled, // The user Cancelled the payment sheet. 20 | }; 21 | 22 | @class STPCheckoutOptions, STPToken; 23 | @protocol STPCheckoutViewControllerDelegate; 24 | 25 | /** 26 | Controls a UIWebView that loads an iOS-optimized version of Stripe Checkout that you can present modally. Note 27 | that if you're using an STPPaymentPresenter to collect your user's payment details (highly recommended), you do not have to use this class directly. 28 | */ 29 | #if TARGET_OS_IPHONE 30 | @interface STPCheckoutViewController : UINavigationController 31 | #else 32 | @interface STPCheckoutViewController : NSViewController 33 | #endif 34 | 35 | /** 36 | * Creates an STPCheckoutViewController with the desired options. The options are copied at this step, so changing any of their values after instantiating an 37 | *STPCheckoutViewController will have no effect. 38 | * 39 | * @param options A configuration object that describes how to display Stripe Checkout. 40 | * 41 | */ 42 | - (instancetype)initWithOptions:(STPCheckoutOptions *)options NS_DESIGNATED_INITIALIZER; 43 | @property (nonatomic, readonly, copy) STPCheckoutOptions *options; 44 | 45 | /** 46 | * Note: you must set a delegate before showing an STPViewController. 47 | */ 48 | @property (nonatomic, weak) id checkoutDelegate; 49 | 50 | @end 51 | 52 | @protocol STPCheckoutViewControllerDelegate 53 | 54 | /** 55 | * Called when the checkout view controller has finished displaying the "success" or "error" animation. At this point, the controller is done with its work. 56 | * You should dismiss the view controller at this point, probably by calling `dismissViewControllerAnimated:completion:`. 57 | * 58 | * @param controller the checkout view controller that has finished. 59 | * @param status the result of the payment (success, failure, or cancelled by the user). You should use this to determine whether to proceed to the success 60 | *state, for example. 61 | * @param error the returned error, if it exists. Can be nil. 62 | */ 63 | - (void)checkoutController:(STPCheckoutViewController *)controller didFinishWithStatus:(STPPaymentStatus)status error:(NSError *)error; 64 | 65 | /** 66 | * Use these options to inform Stripe Checkout of the success or failure of your backend charge. 67 | */ 68 | typedef NS_ENUM(NSInteger, STPBackendChargeResult) { 69 | STPBackendChargeResultSuccess, // Passing this value will display a "success" animation in the payment button. 70 | STPBackendChargeResultFailure, // Passing this value will display an "error" animation in the payment button. 71 | }; 72 | 73 | typedef void (^STPTokenSubmissionHandler)(STPBackendChargeResult status, NSError *error); 74 | 75 | /** 76 | * After the user has provided valid credit card information and pressed the "pay" button, Checkout will communicate with Stripe and obtain a tokenized version 77 | of their credit card. 78 | 79 | At this point, you should submit this token to your backend, which should use this token to create a charge. For more information on this, see 80 | // The delegate must call completion with an appropriate authorization status, as may be determined 81 | // by submitting the payment credential to a processing gateway for payment authorization. 82 | * 83 | * @param controller the checkout controller being presented 84 | * @param token a Stripe token 85 | * @param completion call this function with STPBackendChargeResultSuccess/Failure when you're done charging your user 86 | */ 87 | - (void)checkoutController:(STPCheckoutViewController *)controller didCreateToken:(STPToken *)token completion:(STPTokenSubmissionHandler)completion; 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/STPBankAccount.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPBankAccount.h 3 | // Stripe 4 | // 5 | // Created by Charles Scalesse on 10/1/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Representation of a user's credit card details. You can assemble these with information that your user enters and 13 | * then create Stripe tokens with them using an STPAPIClient. @see https://stripe.com/docs/api#create_bank_account_token 14 | */ 15 | @interface STPBankAccount : NSObject 16 | 17 | /** 18 | * The account number for the bank account. Currently must be a checking account. 19 | */ 20 | @property (nonatomic, copy) NSString *accountNumber; 21 | 22 | /** 23 | * The routing number for the bank account. This should be the ACH routing number, not the wire routing number. 24 | */ 25 | @property (nonatomic, copy) NSString *routingNumber; 26 | 27 | /** 28 | * The country the bank account is in. Currently, only US is supported. 29 | */ 30 | @property (nonatomic, copy) NSString *country; 31 | 32 | #pragma mark - These fields are only present on objects returned from the Stripe API. 33 | /** 34 | * The Stripe ID for the bank account. 35 | */ 36 | @property (nonatomic, readonly) NSString *bankAccountId; 37 | 38 | /** 39 | * The last 4 digits of the account number. 40 | */ 41 | @property (nonatomic, readonly) NSString *last4; 42 | 43 | /** 44 | * The name of the bank that owns the account. 45 | */ 46 | @property (nonatomic, readonly) NSString *bankName; 47 | 48 | /** 49 | * A proxy for the account number, this uniquely identifies the account and can be used to compare equality of different bank accounts. 50 | */ 51 | @property (nonatomic, readonly) NSString *fingerprint; 52 | 53 | /** 54 | * The default currency for the bank account. 55 | */ 56 | @property (nonatomic, readonly) NSString *currency; 57 | 58 | /** 59 | * Whether or not the bank account has been validated via microdeposits or other means. 60 | */ 61 | @property (nonatomic, readonly) BOOL validated; 62 | 63 | /** 64 | * Whether or not the bank account is currently disabled. 65 | */ 66 | @property (nonatomic, readonly) BOOL disabled; 67 | 68 | @end 69 | 70 | 71 | // This method is used internally by Stripe to deserialize API responses and exposed here for convenience and testing purposes only. You should not use it in your own code. 72 | @interface STPBankAccount (PrivateMethods) 73 | 74 | - (instancetype)initWithAttributeDictionary:(NSDictionary *)attributeDictionary; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/STPCard.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPCard.h 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 11/2/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, STPCardFundingType) { 12 | STPCardFundingTypeDebit, 13 | STPCardFundingTypeCredit, 14 | STPCardFundingTypePrepaid, 15 | STPCardFundingTypeOther, 16 | }; 17 | 18 | typedef NS_ENUM(NSInteger, STPCardBrand) { 19 | STPCardBrandVisa, 20 | STPCardBrandAmex, 21 | STPCardBrandMasterCard, 22 | STPCardBrandDiscover, 23 | STPCardBrandJCB, 24 | STPCardBrandDinersClub, 25 | STPCardBrandUnknown, 26 | }; 27 | 28 | /** 29 | * Representation of a user's credit card details. You can assemble these with information that your user enters and 30 | * then create Stripe tokens with them using an STPAPIClient. @see https://stripe.com/docs/api#cards 31 | */ 32 | @interface STPCard : NSObject 33 | 34 | /** 35 | * The card's number. This will be nil for cards retrieved from the Stripe API. 36 | */ 37 | @property (nonatomic, copy) NSString *number; 38 | 39 | /** 40 | * The last 4 digits of the card. Unlike number, this will be present on cards retrieved from the Stripe API. 41 | */ 42 | @property (nonatomic, readonly) NSString *last4; 43 | 44 | /** 45 | * The card's expiration month. 46 | */ 47 | @property (nonatomic) NSUInteger expMonth; 48 | 49 | /** 50 | * The card's expiration month. 51 | */ 52 | @property (nonatomic) NSUInteger expYear; 53 | 54 | /** 55 | * The card's security code, found on the back. This will be nil for cards retrieved from the Stripe API. 56 | */ 57 | @property (nonatomic, copy) NSString *cvc; 58 | 59 | /** 60 | * The cardholder's name. 61 | */ 62 | @property (nonatomic, copy) NSString *name; 63 | 64 | /** 65 | * The cardholder's address. 66 | */ 67 | @property (nonatomic, copy) NSString *addressLine1; 68 | @property (nonatomic, copy) NSString *addressLine2; 69 | @property (nonatomic, copy) NSString *addressCity; 70 | @property (nonatomic, copy) NSString *addressState; 71 | @property (nonatomic, copy) NSString *addressZip; 72 | @property (nonatomic, copy) NSString *addressCountry; 73 | 74 | /** 75 | * The Stripe ID for the card. 76 | */ 77 | @property (nonatomic, readonly) NSString *cardId; 78 | 79 | /** 80 | * The issuer of the card. 81 | */ 82 | @property (nonatomic, readonly) STPCardBrand brand; 83 | 84 | /** 85 | * The issuer of the card. 86 | * Can be one of "Visa", "American Express", "MasterCard", "Discover", "JCB", "Diners Club", or "Unknown" 87 | * @deprecated use "brand" instead. 88 | */ 89 | @property (nonatomic, readonly) NSString *type __attribute__((deprecated)); 90 | 91 | /** 92 | * The funding source for the card (credit, debit, prepaid, or other) 93 | */ 94 | @property (nonatomic, readonly) STPCardFundingType funding; 95 | 96 | /** 97 | * A proxy for the card's number, this uniquely identifies the credit card and can be used to compare different cards. 98 | */ 99 | @property (nonatomic, readonly) NSString *fingerprint; 100 | 101 | /** 102 | * Two-letter ISO code representing the issuing country of the card. 103 | */ 104 | @property (nonatomic, readonly) NSString *country; 105 | 106 | // These validation methods work as described in 107 | // http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/Validation.html#//apple_ref/doc/uid/20002173-CJBDBHCB 108 | 109 | - (BOOL)validateNumber:(id *)ioValue error:(NSError **)outError; 110 | - (BOOL)validateCvc:(id *)ioValue error:(NSError **)outError; 111 | - (BOOL)validateExpMonth:(id *)ioValue error:(NSError **)outError; 112 | - (BOOL)validateExpYear:(id *)ioValue error:(NSError **)outError; 113 | 114 | /** 115 | * This validates a fully populated card to check for all errors, including ones that come about 116 | * from the interaction of more than one property. It will also do all the validations on individual 117 | * properties, so if you only want to call one method on your card to validate it after setting all the 118 | * properties, call this one 119 | * 120 | * @param outError a pointer to an NSError that, after calling this method, will be populated with an error if the card is not valid. See StripeError.h for 121 | possible values 122 | * 123 | * @return whether or not the card is valid. 124 | */ 125 | - (BOOL)validateCardReturningError:(NSError **)outError; 126 | 127 | @end 128 | 129 | // This method is used internally by Stripe to deserialize API responses and exposed here for convenience and testing purposes only. You should not use it in 130 | // your own code. 131 | @interface STPCard (PrivateMethods) 132 | - (instancetype)initWithAttributeDictionary:(NSDictionary *)attributeDictionary; 133 | @end 134 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/STPToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPToken.h 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 11/5/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @class STPCard; 12 | @class STPBankAccount; 13 | 14 | /** 15 | * A token returned from submitting payment details to the Stripe API. You should not have to instantiate one of these directly. 16 | */ 17 | @interface STPToken : NSObject 18 | 19 | /** 20 | * The value of the token. You can store this value on your server and use it to make charges and customers. @see 21 | * https://stripe.com/docs/mobile/ios#sending-tokens 22 | */ 23 | @property (nonatomic, readonly) NSString *tokenId; 24 | 25 | /** 26 | * Whether or not this token was created in livemode. Will be YES if you used your Live Publishable Key, and NO if you used your Test Publishable Key. 27 | */ 28 | @property (nonatomic, readonly) BOOL livemode; 29 | 30 | /** 31 | * The credit card details that were used to create the token. Will only be set if the token was created via a credit card or Apple Pay, otherwise it will be 32 | * nil. 33 | */ 34 | @property (nonatomic, readonly) STPCard *card; 35 | 36 | /** 37 | * The bank account details that were used to create the token. Will only be set if the token was created with a bank account, otherwise it will be nil. 38 | */ 39 | @property (nonatomic, readonly) STPBankAccount *bankAccount; 40 | 41 | /** 42 | * When the token was created. 43 | */ 44 | @property (nonatomic, readonly) NSDate *created; 45 | 46 | typedef void (^STPCardServerResponseCallback)(NSURLResponse *response, NSData *data, NSError *error); 47 | 48 | /** 49 | * Form-encode the token and post those parameters to your backend URL. 50 | * 51 | * @param url the URL to upload the token details to 52 | * @param params optional parameters to additionally include in the POST body 53 | * @param handler code to execute with your server's response 54 | * @deprecated you should write your own networking code to talk to your server. 55 | */ 56 | - (void)postToURL:(NSURL *)url withParams:(NSDictionary *)params completion:(STPCardServerResponseCallback)handler __attribute((deprecated)); 57 | 58 | @end 59 | 60 | // This method is used internally by Stripe to deserialize API responses and exposed here for convenience and testing purposes only. You should not use it in 61 | // your own code. 62 | @interface STPToken (PrivateMethods) 63 | 64 | - (instancetype)initWithAttributeDictionary:(NSDictionary *)attributeDictionary; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/Stripe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Stripe.h 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 10/30/12. 6 | // Copyright (c) 2012 Stripe. All rights reserved. 7 | // 8 | 9 | #import "STPAPIClient.h" 10 | #import "StripeError.h" 11 | #import "STPBankAccount.h" 12 | #import "STPCard.h" 13 | #import "STPToken.h" 14 | #import "STPCheckoutOptions.h" 15 | #import "STPCheckoutViewController.h" 16 | 17 | #if __has_include("Stripe+ApplePay.h") && TARGET_OS_IPHONE 18 | #import "Stripe+ApplePay.h" 19 | #import "STPAPIClient+ApplePay.h" 20 | #import "STPPaymentPresenter.h" 21 | #endif 22 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/PublicHeaders/StripeError.h: -------------------------------------------------------------------------------- 1 | // 2 | // StripeError.h 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 11/4/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * All Stripe iOS errors will be under this domain. 13 | */ 14 | FOUNDATION_EXPORT NSString *const StripeDomain; 15 | 16 | typedef NS_ENUM(NSInteger, STPErrorCode) { 17 | STPConnectionError = 40, // Trouble connecting to Stripe. 18 | STPInvalidRequestError = 50, // Your request had invalid parameters. 19 | STPAPIError = 60, // General-purpose API error (should be rare). 20 | STPCardError = 70, // Something was wrong with the given card (most common). 21 | STPCheckoutError = 80, // Stripe Checkout encountered an error. 22 | }; 23 | 24 | #pragma mark userInfo keys 25 | 26 | // A developer-friendly error message that explains what went wrong. You probably 27 | // shouldn't show this to your users, but might want to use it yourself. 28 | FOUNDATION_EXPORT NSString *const STPErrorMessageKey; 29 | 30 | // What went wrong with your STPCard (e.g., STPInvalidCVC. See below for full list). 31 | FOUNDATION_EXPORT NSString *const STPCardErrorCodeKey; 32 | 33 | // Which parameter on the STPCard had an error (e.g., "cvc"). Useful for marking up the 34 | // right UI element. 35 | FOUNDATION_EXPORT NSString *const STPErrorParameterKey; 36 | 37 | #pragma mark STPCardErrorCodeKeys 38 | 39 | // (Usually determined locally:) 40 | FOUNDATION_EXPORT NSString *const STPInvalidNumber; 41 | FOUNDATION_EXPORT NSString *const STPInvalidExpMonth; 42 | FOUNDATION_EXPORT NSString *const STPInvalidExpYear; 43 | FOUNDATION_EXPORT NSString *const STPInvalidCVC; 44 | 45 | // (Usually sent from the server:) 46 | FOUNDATION_EXPORT NSString *const STPIncorrectNumber; 47 | FOUNDATION_EXPORT NSString *const STPExpiredCard; 48 | FOUNDATION_EXPORT NSString *const STPCardDeclined; 49 | FOUNDATION_EXPORT NSString *const STPProcessingError; 50 | FOUNDATION_EXPORT NSString *const STPIncorrectCVC; 51 | 52 | #pragma mark Strings 53 | 54 | #define STPCardErrorInvalidNumberUserMessage NSLocalizedString(@"Your card's number is invalid", @"Error when the card number is not valid") 55 | #define STPCardErrorInvalidCVCUserMessage NSLocalizedString(@"Your card's security code is invalid", @"Error when the card's CVC is not valid") 56 | #define STPCardErrorInvalidExpMonthUserMessage \ 57 | NSLocalizedString(@"Your card's expiration month is invalid", @"Error when the card's expiration month is not valid") 58 | #define STPCardErrorInvalidExpYearUserMessage \ 59 | NSLocalizedString(@"Your card's expiration year is invalid", @"Error when the card's expiration year is not valid") 60 | #define STPCardErrorExpiredCardUserMessage NSLocalizedString(@"Your card has expired", @"Error when the card has already expired") 61 | #define STPCardErrorDeclinedUserMessage NSLocalizedString(@"Your card was declined", @"Error when the card was declined by the credit card networks") 62 | #define STPUnexpectedError \ 63 | NSLocalizedString(@"There was an unexpected error -- try again in a few seconds", @"Unexpected error, such as a 500 from Stripe or a JSON parse error") 64 | #define STPCardErrorProcessingErrorUserMessage \ 65 | NSLocalizedString(@"There was an error processing your card -- try again in a few seconds", @"Error when there is a problem processing the credit card") 66 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/STPAPIConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPAPIConnection.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/8/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void (^STPAPIConnectionCompletionBlock)(NSURLResponse *response, NSData *body, NSError *requestError); 12 | 13 | // Like NSURLConnection but verifies that the server isn't using a revoked certificate. 14 | @interface STPAPIConnection : NSObject 15 | 16 | - (instancetype)initWithRequest:(NSURLRequest *)request; 17 | - (void)runOnOperationQueue:(NSOperationQueue *)queue completion:(STPAPIConnectionCompletionBlock)handler; 18 | 19 | @property (nonatomic) BOOL started; 20 | @property (nonatomic, copy) NSURLRequest *request; 21 | @property (nonatomic, strong) NSURLConnection *connection; 22 | @property (nonatomic, strong) NSMutableData *receivedData; 23 | @property (nonatomic, strong) NSURLResponse *receivedResponse; 24 | @property (nonatomic, strong) NSError *overrideError; // Replaces the request's error 25 | @property (nonatomic, copy) STPAPIConnectionCompletionBlock completionBlock; 26 | 27 | // utility methods 28 | + (NSString *)SHA1FingerprintOfData:(NSData *)data; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/STPBankAccount.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPBankAccount.m 3 | // Stripe 4 | // 5 | // Created by Charles Scalesse on 10/1/14. 6 | // 7 | // 8 | 9 | #import "STPBankAccount.h" 10 | 11 | @interface STPBankAccount () 12 | 13 | @property (nonatomic, readwrite) NSString *bankAccountId; 14 | @property (nonatomic, readwrite) NSString *last4; 15 | @property (nonatomic, readwrite) NSString *bankName; 16 | @property (nonatomic, readwrite) NSString *fingerprint; 17 | @property (nonatomic, readwrite) NSString *currency; 18 | @property (nonatomic, readwrite) BOOL validated; 19 | @property (nonatomic, readwrite) BOOL disabled; 20 | 21 | @end 22 | 23 | @implementation STPBankAccount 24 | 25 | #pragma mark - Getters 26 | 27 | - (NSString *)last4 { 28 | if (_last4) { 29 | return _last4; 30 | } else if (self.accountNumber && self.accountNumber.length >= 4) { 31 | return [self.accountNumber substringFromIndex:(self.accountNumber.length - 4)]; 32 | } else { 33 | return nil; 34 | } 35 | } 36 | 37 | #pragma mark - Equality 38 | 39 | - (BOOL)isEqual:(STPBankAccount *)bankAccount { 40 | return [self isEqualToBankAccount:bankAccount]; 41 | } 42 | 43 | - (NSUInteger)hash { 44 | return [self.fingerprint hash]; 45 | } 46 | 47 | - (BOOL)isEqualToBankAccount:(STPBankAccount *)bankAccount { 48 | if (self == bankAccount) { 49 | return YES; 50 | } 51 | 52 | if (!bankAccount || ![bankAccount isKindOfClass:self.class]) { 53 | return NO; 54 | } 55 | 56 | return [self.accountNumber ?: @"" isEqualToString:bankAccount.accountNumber ?: @""] && 57 | [self.routingNumber ?: @"" isEqualToString:bankAccount.routingNumber ?: @""] && 58 | [self.country ?: @"" isEqualToString:bankAccount.country ?: @""] && [self.last4 ?: @"" isEqualToString:bankAccount.last4 ?: @""] && 59 | [self.bankName ?: @"" isEqualToString:bankAccount.bankName ?: @""] && [self.currency ?: @"" isEqualToString:bankAccount.currency ?: @""]; 60 | } 61 | 62 | @end 63 | 64 | @implementation STPBankAccount (PrivateMethods) 65 | 66 | - (instancetype)initWithAttributeDictionary:(NSDictionary *)attributeDictionary { 67 | self = [self init]; 68 | if (self) { 69 | // sanitize NSNull 70 | NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; 71 | [attributeDictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, __unused BOOL *stop) { 72 | if (obj != [NSNull null]) { 73 | dictionary[key] = obj; 74 | } 75 | }]; 76 | 77 | _bankAccountId = dictionary[@"id"]; 78 | _last4 = dictionary[@"last4"]; 79 | _bankName = dictionary[@"bank_name"]; 80 | _country = dictionary[@"country"]; 81 | _fingerprint = dictionary[@"fingerprint"]; 82 | _currency = dictionary[@"currency"]; 83 | _validated = [dictionary[@"validated"] boolValue]; 84 | _disabled = [dictionary[@"disabled"] boolValue]; 85 | } 86 | return self; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/STPFormEncoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPFormEncoder.h 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/8/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STPBankAccount, STPCard; 12 | 13 | @interface STPFormEncoder : NSObject 14 | 15 | + (NSData *)formEncodedDataForBankAccount:(STPBankAccount *)bankAccount; 16 | 17 | + (NSData *)formEncodedDataForCard:(STPCard *)card; 18 | 19 | + (NSString *)stringByURLEncoding:(NSString *)string; 20 | 21 | + (NSString *)stringByReplacingSnakeCaseWithCamelCase:(NSString *)input; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/STPFormEncoder.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPFormEncoder.m 3 | // Stripe 4 | // 5 | // Created by Jack Flintermann on 1/8/15. 6 | // Copyright (c) 2015 Stripe, Inc. All rights reserved. 7 | // 8 | 9 | #import "STPFormEncoder.h" 10 | #import "STPBankAccount.h" 11 | #import "STPCard.h" 12 | 13 | @implementation STPFormEncoder 14 | 15 | + (NSData *)formEncodedDataForBankAccount:(STPBankAccount *)bankAccount { 16 | NSCAssert(bankAccount != nil, @"Cannot create a token with a nil bank account."); 17 | NSMutableDictionary *params = [NSMutableDictionary dictionary]; 18 | NSMutableArray *parts = [NSMutableArray array]; 19 | 20 | if (bankAccount.accountNumber) { 21 | params[@"account_number"] = bankAccount.accountNumber; 22 | } 23 | if (bankAccount.routingNumber) { 24 | params[@"routing_number"] = bankAccount.routingNumber; 25 | } 26 | if (bankAccount.country) { 27 | params[@"country"] = bankAccount.country; 28 | } 29 | 30 | [params enumerateKeysAndObjectsUsingBlock:^(id key, id val, __unused BOOL *stop) { 31 | [parts addObject:[NSString stringWithFormat:@"bank_account[%@]=%@", key, [self.class stringByURLEncoding:val]]]; 32 | }]; 33 | 34 | return [[parts componentsJoinedByString:@"&"] dataUsingEncoding:NSUTF8StringEncoding]; 35 | } 36 | 37 | + (NSData *)formEncodedDataForCard:(STPCard *)card { 38 | NSCAssert(card != nil, @"Cannot create a token with a nil card."); 39 | NSMutableDictionary *params = [NSMutableDictionary dictionary]; 40 | 41 | if (card.number) { 42 | params[@"number"] = card.number; 43 | } 44 | if (card.cvc) { 45 | params[@"cvc"] = card.cvc; 46 | } 47 | if (card.name) { 48 | params[@"name"] = card.name; 49 | } 50 | if (card.addressLine1) { 51 | params[@"address_line1"] = card.addressLine1; 52 | } 53 | if (card.addressLine2) { 54 | params[@"address_line2"] = card.addressLine2; 55 | } 56 | if (card.addressCity) { 57 | params[@"address_city"] = card.addressCity; 58 | } 59 | if (card.addressState) { 60 | params[@"address_state"] = card.addressState; 61 | } 62 | if (card.addressZip) { 63 | params[@"address_zip"] = card.addressZip; 64 | } 65 | if (card.addressCountry) { 66 | params[@"address_country"] = card.addressCountry; 67 | } 68 | if (card.expMonth) { 69 | params[@"exp_month"] = @(card.expMonth).stringValue; 70 | } 71 | if (card.expYear) { 72 | params[@"exp_year"] = @(card.expYear).stringValue; 73 | } 74 | 75 | NSMutableArray *parts = [NSMutableArray array]; 76 | 77 | [params enumerateKeysAndObjectsUsingBlock:^(id key, id val, __unused BOOL *stop) { 78 | [parts addObject:[NSString stringWithFormat:@"card[%@]=%@", key, [self.class stringByURLEncoding:val]]]; 79 | 80 | }]; 81 | 82 | return [[parts componentsJoinedByString:@"&"] dataUsingEncoding:NSUTF8StringEncoding]; 83 | } 84 | 85 | /* This code is adapted from the code by David DeLong in this StackOverflow post: 86 | http://stackoverflow.com/questions/3423545/objective-c-iphone-percent-encode-a-string . It is protected under the terms of a Creative Commons 87 | license: http://creativecommons.org/licenses/by-sa/3.0/ 88 | */ 89 | + (NSString *)stringByURLEncoding:(NSString *)string { 90 | NSMutableString *output = [NSMutableString string]; 91 | const unsigned char *source = (const unsigned char *)[string UTF8String]; 92 | NSInteger sourceLen = strlen((const char *)source); 93 | for (int i = 0; i < sourceLen; ++i) { 94 | const unsigned char thisChar = source[i]; 95 | if (thisChar == ' ') { 96 | [output appendString:@"+"]; 97 | } else if (thisChar == '.' || thisChar == '-' || thisChar == '_' || thisChar == '~' || (thisChar >= 'a' && thisChar <= 'z') || 98 | (thisChar >= 'A' && thisChar <= 'Z') || (thisChar >= '0' && thisChar <= '9')) { 99 | [output appendFormat:@"%c", thisChar]; 100 | } else { 101 | [output appendFormat:@"%%%02X", thisChar]; 102 | } 103 | } 104 | return output; 105 | } 106 | 107 | + (NSString *)stringByReplacingSnakeCaseWithCamelCase:(NSString *)input { 108 | NSArray *parts = [input componentsSeparatedByString:@"_"]; 109 | NSMutableString *camelCaseParam = [NSMutableString string]; 110 | [parts enumerateObjectsUsingBlock:^(NSString *part, NSUInteger idx, __unused BOOL *stop) { 111 | [camelCaseParam appendString:(idx == 0 ? part : [part capitalizedString])]; 112 | }]; 113 | 114 | return [camelCaseParam copy]; 115 | } 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/STPToken.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPToken.m 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 11/5/12. 6 | // 7 | // 8 | 9 | #import "STPToken.h" 10 | #import "STPCard.h" 11 | #import "STPBankAccount.h" 12 | 13 | @implementation STPToken 14 | 15 | - (instancetype)initWithAttributeDictionary:(NSDictionary *)attributeDictionary { 16 | self = [super init]; 17 | 18 | if (self) { 19 | _tokenId = attributeDictionary[@"id"]; 20 | _livemode = [attributeDictionary[@"livemode"] boolValue]; 21 | _created = [NSDate dateWithTimeIntervalSince1970:[attributeDictionary[@"created"] doubleValue]]; 22 | 23 | NSDictionary *cardDictionary = attributeDictionary[@"card"]; 24 | if (cardDictionary) { 25 | _card = [[STPCard alloc] initWithAttributeDictionary:cardDictionary]; 26 | } 27 | 28 | NSDictionary *bankAccountDictionary = attributeDictionary[@"bank_account"]; 29 | if (bankAccountDictionary) { 30 | _bankAccount = [[STPBankAccount alloc] initWithAttributeDictionary:bankAccountDictionary]; 31 | } 32 | } 33 | 34 | return self; 35 | } 36 | 37 | - (NSString *)description { 38 | NSString *token = self.tokenId ?: @"Unknown token"; 39 | NSString *livemode = self.livemode ? @"live mode" : @"test mode"; 40 | 41 | return [NSString stringWithFormat:@"%@ (%@)", token, livemode]; 42 | } 43 | 44 | - (void)postToURL:(NSURL *)url withParams:(NSMutableDictionary *)params completion:(STPCardServerResponseCallback)handler { 45 | NSMutableString *body = [NSMutableString stringWithFormat:@"stripeToken=%@", self.tokenId]; 46 | 47 | [params enumerateKeysAndObjectsUsingBlock:^(id key, id obj, __unused BOOL *stop) { [body appendFormat:@"&%@=%@", key, obj]; }]; 48 | 49 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; 50 | request.HTTPMethod = @"POST"; 51 | request.HTTPBody = [body dataUsingEncoding:NSUTF8StringEncoding]; 52 | 53 | [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:handler]; 54 | } 55 | 56 | - (BOOL)isEqual:(id)object { 57 | return [self isEqualToToken:object]; 58 | } 59 | 60 | - (NSUInteger)hash { 61 | return [self.tokenId hash]; 62 | } 63 | 64 | - (BOOL)isEqualToToken:(STPToken *)object { 65 | if (self == object) { 66 | return YES; 67 | } 68 | 69 | if (!object || ![object isKindOfClass:self.class]) { 70 | return NO; 71 | } 72 | 73 | if ((self.card || object.card) && (![self.card isEqual:object.card])) { 74 | return NO; 75 | } 76 | 77 | if ((self.bankAccount || object.bankAccount) && (![self.bankAccount isEqual:object.bankAccount])) { 78 | return NO; 79 | } 80 | 81 | return self.livemode == object.livemode && [self.tokenId isEqualToString:object.tokenId] && [self.created isEqualToDate:object.created] && 82 | [self.card isEqual:object.card] && [self.tokenId isEqualToString:object.tokenId] && [self.created isEqualToDate:object.created]; 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Pods/Stripe/Stripe/StripeError.m: -------------------------------------------------------------------------------- 1 | // 2 | // StripeError.m 3 | // Stripe 4 | // 5 | // Created by Saikat Chakrabarti on 11/4/12. 6 | // 7 | // 8 | 9 | #import "StripeError.h" 10 | 11 | NSString *const StripeDomain = @"com.stripe.lib"; 12 | NSString *const STPCardErrorCodeKey = @"com.stripe.lib:CardErrorCodeKey"; 13 | NSString *const STPErrorMessageKey = @"com.stripe.lib:ErrorMessageKey"; 14 | NSString *const STPErrorParameterKey = @"com.stripe.lib:ErrorParameterKey"; 15 | NSString *const STPInvalidNumber = @"com.stripe.lib:InvalidNumber"; 16 | NSString *const STPInvalidExpMonth = @"com.stripe.lib:InvalidExpiryMonth"; 17 | NSString *const STPInvalidExpYear = @"com.stripe.lib:InvalidExpiryYear"; 18 | NSString *const STPInvalidCVC = @"com.stripe.lib:InvalidCVC"; 19 | NSString *const STPIncorrectNumber = @"com.stripe.lib:IncorrectNumber"; 20 | NSString *const STPExpiredCard = @"com.stripe.lib:ExpiredCard"; 21 | NSString *const STPCardDeclined = @"com.stripe.lib:CardDeclined"; 22 | NSString *const STPProcessingError = @"com.stripe.lib:ProcessingError"; 23 | NSString *const STPIncorrectCVC = @"com.stripe.lib:IncorrectCVC"; 24 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MBProgressHUD/Pods-MBProgressHUD-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-MBProgressHUD.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/MBProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/Stripe" 4 | OTHER_LDFLAGS = ${PODS_MBPROGRESSHUD_OTHER_LDFLAGS} -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MBProgressHUD/Pods-MBProgressHUD-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MBProgressHUD : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MBProgressHUD 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MBProgressHUD/Pods-MBProgressHUD-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MBProgressHUD/Pods-MBProgressHUD.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_MBPROGRESSHUD_OTHER_LDFLAGS = -framework "CoreGraphics" -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-PaymentKit/Pods-PaymentKit-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-PaymentKit.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/PaymentKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/Stripe" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-PaymentKit/Pods-PaymentKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_PaymentKit : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_PaymentKit 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-PaymentKit/Pods-PaymentKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-PaymentKit/Pods-PaymentKit.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/Pods/Target Support Files/Pods-PaymentKit/Pods-PaymentKit.xcconfig -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Stripe/Pods-Stripe-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-Stripe.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/Stripe" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/Stripe" 4 | OTHER_LDFLAGS = ${PODS_STRIPE_OTHER_LDFLAGS} -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Stripe/Pods-Stripe-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Stripe : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Stripe 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Stripe/Pods-Stripe-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Stripe/Pods-Stripe.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_STRIPE_OTHER_LDFLAGS = -framework "Foundation" -framework "Security" -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SupportKit/Pods-SupportKit-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-SupportKit.xcconfig" 2 | FRAMEWORK_SEARCH_PATHS = ${PODS_SUPPORTKIT_FRAMEWORK_SEARCH_PATHS} 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SupportKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/SupportKit" 5 | OTHER_LDFLAGS = ${PODS_SUPPORTKIT_OTHER_LDFLAGS} -ObjC 6 | PODS_ROOT = ${SRCROOT} 7 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MBProgressHUD 5 | 6 | Copyright (c) 2009-2015 Matej Bukovinski 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | ## PaymentKit 27 | 28 | The MIT License 29 | 30 | Copyright (c) 2013- Stripe, Inc. (https://stripe.com) 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a copy 33 | of this software and associated documentation files (the "Software"), to deal 34 | in the Software without restriction, including without limitation the rights 35 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 36 | copies of the Software, and to permit persons to whom the Software is 37 | furnished to do so, subject to the following conditions: 38 | 39 | The above copyright notice and this permission notice shall be included in 40 | all copies or substantial portions of the Software. 41 | 42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 48 | THE SOFTWARE. 49 | 50 | 51 | ## Stripe 52 | 53 | The MIT License 54 | 55 | Copyright (c) 2011- Stripe, Inc. (https://stripe.com) 56 | 57 | Permission is hereby granted, free of charge, to any person obtaining a copy 58 | of this software and associated documentation files (the "Software"), to deal 59 | in the Software without restriction, including without limitation the rights 60 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 61 | copies of the Software, and to permit persons to whom the Software is 62 | furnished to do so, subject to the following conditions: 63 | 64 | The above copyright notice and this permission notice shall be included in 65 | all copies or substantial portions of the Software. 66 | 67 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 68 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 69 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 70 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 71 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 72 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 73 | THE SOFTWARE. 74 | Generated by CocoaPods - http://cocoapods.org 75 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // MBProgressHUD 10 | #define COCOAPODS_POD_AVAILABLE_MBProgressHUD 11 | #define COCOAPODS_VERSION_MAJOR_MBProgressHUD 0 12 | #define COCOAPODS_VERSION_MINOR_MBProgressHUD 9 13 | #define COCOAPODS_VERSION_PATCH_MBProgressHUD 1 14 | 15 | // PaymentKit 16 | #define COCOAPODS_POD_AVAILABLE_PaymentKit 17 | #define COCOAPODS_VERSION_MAJOR_PaymentKit 1 18 | #define COCOAPODS_VERSION_MINOR_PaymentKit 1 19 | #define COCOAPODS_VERSION_PATCH_PaymentKit 1 20 | 21 | // Stripe 22 | #define COCOAPODS_POD_AVAILABLE_Stripe 23 | #define COCOAPODS_VERSION_MAJOR_Stripe 3 24 | #define COCOAPODS_VERSION_MINOR_Stripe 1 25 | #define COCOAPODS_VERSION_PATCH_Stripe 0 26 | 27 | // Stripe/Core 28 | #define COCOAPODS_POD_AVAILABLE_Stripe_Core 29 | #define COCOAPODS_VERSION_MAJOR_Stripe_Core 3 30 | #define COCOAPODS_VERSION_MINOR_Stripe_Core 1 31 | #define COCOAPODS_VERSION_PATCH_Stripe_Core 0 32 | 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/Stripe" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/PaymentKit" -isystem "${PODS_ROOT}/Headers/Public/Stripe" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-MBProgressHUD" -l"Pods-PaymentKit" -l"Pods-Stripe" -framework "CoreGraphics" -framework "Foundation" -framework "Security" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/PaymentKit" "${PODS_ROOT}/Headers/Public/Stripe" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/PaymentKit" -isystem "${PODS_ROOT}/Headers/Public/Stripe" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-MBProgressHUD" -l"Pods-PaymentKit" -l"Pods-Stripe" -framework "CoreGraphics" -framework "Foundation" -framework "Security" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Lobby Boy 2 | 3 | An open-source project that demonstrates how you can use [SupportKit](http://supportkit.io) to offer products and services to your users through messaging. 4 | 5 | When you offer a product or service to your users this way, the offer is displayed in an interactive chat bubble in the messaging UI. With a single tap on the bubble's "Buy" button you can charge a credit card and take an order. It's effortless. 6 | 7 | Lobby Boy demonstrates a simple workflow modelled after services like Magic, Cloe, Ask Alexis and more. It even works with Stripe to process payments! You can use Lobby Boy "out of the box" to build your own on-demand, conversational commerce business in minutes. 8 | 9 | ## Configuring Lobby Boy 10 | 11 | You can compile Lobby Boy from source and chat with members of the team who hacked on it. (However, we won't actually be able to ship you anything or process real credit cards!) 12 | 13 | If you want to configure Lobby Boy for your own uses, it only takes a few minutes. You'll only need to modify a few constants in LBStripeCharger.m 14 | 15 | 1. Sign up for an account at [SupportKit.io](https://app.supportkit.io/signup) 16 | 2. Set kSupportKitAppToken (in LBStripeCharger.m) to the app token you got in step 1. 17 | 3. Sign up for a Stripe account and get set your publishable key as the constant kStripePublishableKey. 18 | 4. Hop over to our [backend repository](https://github.com/supportkit/lobby-boy-stripe-backend) and hit the "Deploy to Heroku" button to instantly configure and launch the Lobby Boy backend with your Stripe secret key. 19 | 5. Specify the URL of your newly deployed backend as the value of the constant kPaymentServerBaseUrl. 20 | 21 | You're ready to go! We'd love to hear your feedback, reach us [@supportkit](http://twitter.com/supportkit) or hello@supportkit.io 22 | 23 | ## Offering a product or service 24 | 25 | Offering a product or service to your users is easy, just use the `!offer` command in Slack and your offer will appear in the user's conversation with the option to buy or view more info. 26 | 27 | 1. Configure a [Slack integration](http://docs.supportkit.io/#slack) for your SupportKit app. 28 | 2. When speaking to one of your users, use the `/sk !offer` command with the following syntax: `/sk !offer [price] [image-url] [product-info-url] [product name]` For example: `!offer 129.99 http://www.selectism.com/files/2014/03/budapest-nose-2014-01-630x420.jpg http://google.com Air de Panache` 29 | -------------------------------------------------------------------------------- /SupportKit.bundle/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/Info.plist -------------------------------------------------------------------------------- /SupportKit.bundle/ar.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "بحث في مساعدة %@"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "إغلاق"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "إلغاء"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "الدردشة"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "هذه هي بداية محادثتك مع فريق %@. سوف نبقى على اتصال معك لتتمكن من تحقيق الاستفادة القصوى من التطبيق.\nاترك لنا رسالة إن أردت، عن أي شيء يدور في خلدك. سوف نرد على أسئلتك أو اقتراحاتك أو أي شيء آخر في أقرب وقت نستطيع."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "لا يوجد اتصال بالإنترنت"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "تعذَّر الاتصال بالملقم"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "هل تواجهك مشاكل مع %@؟ اتصل بنا وسوف نقدم لك المساعدة."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "موصَى به لأجلك"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "تعذَّرت إعادة نتائج البحث"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "لم يتم العثور على نتائج."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "فريق %@"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "إعادة تحميل"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "تعذَّر فتح الصفحة لأن جهازك غير متصل بالإنترنت."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "تلميحة سريعة"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "امسح إلى أسفل بإصبعين للحصول على المساعدة من أي مكان. جربها بأعلاه."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "تخطي"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "خطأ"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "موافق"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "إرسال"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "اكتب رسالة..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "تم"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "تعذَّر تسليم الرسالة. انقر لإعادة المحاولة."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "إرسال..."; -------------------------------------------------------------------------------- /SupportKit.bundle/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/bubble.png -------------------------------------------------------------------------------- /SupportKit.bundle/bubble@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/bubble@2x.png -------------------------------------------------------------------------------- /SupportKit.bundle/bubble@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/bubble@3x.png -------------------------------------------------------------------------------- /SupportKit.bundle/de.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "%@ Hilfe durchsuchen"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "Schließen"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "Abbrechen"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "Nachrichten"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "Dies ist der Start deines Gesprächs mit dem Team %@. Wir werden in Kontakt bleiben, um dir dabei zu helfen, das Beste aus deiner App herauszuholen.\nZögere dich nicht, uns eine Nachricht über alles, was dir am Herzen liegt, hinterzulassen. Wir antworten auf deine Fragen, Anregungen oder sonstige Wünsche möglichst schnell."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "Keine Internetverbindung"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "Die Verbindung mit dem Server war nicht möglich"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "Haben Sie Probleme mit %@ ? Kontaktiere uns und wir helfen dir."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "Empfohlen für dich"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "Keine Suchergebnisse"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "Keine Ergebnisse"; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "%@ Team"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "Erneut laden"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "Seite konnte nicht geöffnet werden, da dein Gerät nicht mit dem Internet verbunden ist"; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "Schneller Tipp"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "Ziehe mit zwei Fingern nach unten, um Hilfe von allen möglichen Stellen zu bekommen. Probiere es mal oben."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "Überspr."; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "Fehler"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "OK"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "Gesendet"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "Nachricht tippen..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "Fertig"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "Nachricht wurde nicht geliefert. Antippen, um erneut zu versuchen."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "Versendung..."; -------------------------------------------------------------------------------- /SupportKit.bundle/defaultAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/defaultAvatar.png -------------------------------------------------------------------------------- /SupportKit.bundle/defaultAvatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/defaultAvatar@2x.png -------------------------------------------------------------------------------- /SupportKit.bundle/defaultAvatar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/defaultAvatar@3x.png -------------------------------------------------------------------------------- /SupportKit.bundle/en.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "Search %@ Help"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "Close"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "Cancel"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "Messages"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "No Internet connection"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "Could not connect to server"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "Having trouble with %@? Reach out and we'll help."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "Recommended For You"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "Cannot return search results"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "No results found."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "%@ Team"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "Reload"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "Cannot open the page because your device is not connected to the Internet."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "Quick Tip"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "Swipe down with two fingers to get help from anywhere. Try it above."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "Skip"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "Error"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "Okay"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "Send"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "Type a message..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "Done"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "Message not delivered. Tap to retry."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "Sending..."; -------------------------------------------------------------------------------- /SupportKit.bundle/es.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "Buscar ayuda sobre %@"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "Cerrar"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "Cancelar"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "Chat"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "Has comenzado una conversación con el equipo de %@. Estaremos en contacto para ayudarte a sacar el máximo partido de tu app.\nNo dudes en dejarnos un mensaje sobre cualquier cosa que se te ocurra. Responderemos a tus preguntas, sugerencias y demás cuestiones en cuanto podamos."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "No hay conexión a Internet"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "Fallo de conexión con el servidor"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "¿Tienes problemas con %@? Cuéntanoslo y te ayudaremos."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "Te recomendamos"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "No se puede volver a los resultados de la búsqueda"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "No se han encontrado resultados."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "Equipo de %@"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "Actualizar"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "No se puede abrir la página porque tu dispositivo no está conectado a Internet."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "Consejo"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "Desliza hacia abajo con dos dedos para obtener ayuda desde cualquier lugar. Inténtalo más arriba."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "Saltar"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "Error"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "OK"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "Enviar"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "Escribe un mensaje..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "Listo"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "Mensaje no entregado. Toca para intentarlo de nuevo."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "Envío..."; -------------------------------------------------------------------------------- /SupportKit.bundle/fa.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "جستجو در راهنمای %@"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "بستن"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "لغو"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "چت"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "این شروع مکالمه شما با تیم %@ است. ما با شما در تماس خواهیم ماند تا به شما کمک کنیم که از برنامه‌تان بیشترین بهره را ببرید.\nاگر چیزی در ذهن خود دارید، لطفاً برای ما پیامی بگذارید. ما در اسرع وقت به سؤالات، پیشنهادات یا سایر اظهارات شما رسیدگی خواهیم کرد."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "عدم اتصال به اینترنت"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "اتصال به سرور امکان‌پذیر نبود"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "با %@ مشکلی دارید؟ درخواست راهنمایی کنید و ما پاسخ خواهیم داد."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "برای شما پیشنهاد شده است"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "امکان بازگردانی نتایج جستجو وجود ندارد"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "هیچ نتیجه‌ای در بر نداشت."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "تیم %@"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "بارگیری مجدد"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "امکان باز کردن صفحه وجود ندارد، زیرا دستگاه شما به اینترنت متصل نیست."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "راهنمای سریع"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "برای دریافت راهنمایی از هرجا، دو انگشت خود را روی صفحه به پایین بکشید. این کار را در بالا امتحان کنید."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "پرش"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "خطا"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "تأیید"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "ارسال"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "پیامی را تایپ کنید..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "انجام شد"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "پیام تحویل داده نشد. برای ارسال مجدد، ضربه بزنید."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "ارسال..."; -------------------------------------------------------------------------------- /SupportKit.bundle/fi.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "Etsi %@ Apua"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "Sulje"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "Peruuta"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "Viestit"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "Tästä voit aloittaa keskustelun %@ tiimin kanssa. Olemme sinuun yhteydessä saadaksesi kaiken irti sovelluksestasi.\nJätä meille viesti jos jokin asia vaivaa mieltäsi. Vastaamme kysymyksiisi, ehdotuksiisi ja muihin asioihisi heti kun voimme."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "Ei Internet yhteyttä"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "Palvelimeen ei voitu yhdistää"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "Onko sinulla ongelmia tuotteen %@ kanssa? Ota yhteyttä ja me autamme."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "Suositeltu Sinulle"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "Hakutuloksia ei voitu näyttää"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "Ei tuloksia."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "%@ Tiimi"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "Lataa uudelleen"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "Sivua ei voitu avata koska laitteesi ei ole yhteydessä Internetiin."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "Vihje"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "Pyyhkäise alaspäin kahdella sormella saadaksesi apua mistä vain. Kokeile tätä yläpuolella."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "Ohita"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "Virhe"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "Selvä"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "Lähetä"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "Kirjoita viesti..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "Valmis"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "Viestiä ei voitu lähettää. Kosketa yrittääksesi uudelleen."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "Lähettäminen..."; -------------------------------------------------------------------------------- /SupportKit.bundle/fr.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "Chercher dans l'aide de %@"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "Fermer"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "Annuler"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "Discussion"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "Ceci est le début de votre conversation avec l'équipe de %@. Nous garderons le contact pour vous aider à tirer le maximum de votre appli.\nN'hésitez pas à nous envoyer un message à propos de tout ce qui vous traverse l'esprit. Nous répondrons à vos questions, vos suggestions ou toute autre chose aussi vite que possible."; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "Aucune connexion à internet"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "Impossible de se connecter au serveur"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "Avez-vous des problèmes avec %@ ? Contactez-nous et nous vous aiderons."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "Recommandé pour vous"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "Impossible de retourner les résultats de recherche"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "Aucun résultat trouvé."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "Équipe de %@"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "Recharger"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "Impossible d'ouvrir la page, car votre appareil n'est pas connecté à internet."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "Astuce rapide"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "Glissez vers le bas avec deux doigts pour obtenir de l'aide depuis partout. Essayez ci-dessous."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "Passer"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "Erreur"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "OK"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "Envoyer"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "Rédigez un message..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "Terminé"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "Message non livré. Touchez pour réessayer."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "Envoi..."; -------------------------------------------------------------------------------- /SupportKit.bundle/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/hand.png -------------------------------------------------------------------------------- /SupportKit.bundle/hand@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/hand@2x.png -------------------------------------------------------------------------------- /SupportKit.bundle/hand@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/hand@3x.png -------------------------------------------------------------------------------- /SupportKit.bundle/ios7-icon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/ios7-icon.ttf -------------------------------------------------------------------------------- /SupportKit.bundle/ja.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "%@ ヘルプを検索"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "閉じる"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "キャンセル"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "チャット"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "こちらより %@ チームとの会が開始されます。アプリを最大限ご利用いただけるように、いつでもご連絡いただけます。\n何かご不明な点がありましたら、いつでもお気軽にメッセージをお送りください。ご連絡いただいたお問い合わせ、ご提案などについて、可能な限り早急に折り返しご連絡いたします。"; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "インターネット接続がありません"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "サーバーに接続できませんでした"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "%@ についてお困りですか? ご連絡いただければお手伝いいたします。"; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "あなたへのオススメ"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "検索結果を取得できませんでした"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "該当する結果がありませんでした。"; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "%@ チーム"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "更新"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "お手持ちのデバイスがインターネットに接続していないため、ページを開けませんでした。"; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "クイックヒント"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "指 2 本で下方向へスワイプすると、どの画面からでもヘルプを開けます。さっそく試してみましょう。"; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "スキップ"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "エラー"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "OK"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "送信"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "メッセージを入力…"; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "完了"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "メッセージが送信されませんでした。タップで再試行します。"; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "送信..."; -------------------------------------------------------------------------------- /SupportKit.bundle/recommendation_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/recommendation_failed.png -------------------------------------------------------------------------------- /SupportKit.bundle/recommendation_failed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/recommendation_failed@2x.png -------------------------------------------------------------------------------- /SupportKit.bundle/recommendation_failed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/recommendation_failed@3x.png -------------------------------------------------------------------------------- /SupportKit.bundle/recommendation_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.bundle/recommendation_placeholder.png -------------------------------------------------------------------------------- /SupportKit.bundle/zh-Hant.lproj/SupportKitLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | SupportKitLocalizable.strings 3 | SupportKit 4 | 5 | Copyright (c) 2014 Radialpoint. All rights reserved. 6 | */ 7 | 8 | /* Search bar placeholder */ 9 | "Search %@ Help" = "搜尋 %@ 常見問題"; 10 | 11 | /* Nav bar left button */ 12 | "Close" = "關閉"; 13 | 14 | /* Nav bar right button */ 15 | "Cancel" = "取消"; 16 | 17 | /* Messages button and Conversation title */ 18 | "Messages" = "訊息"; 19 | 20 | /* Conversation header. Uses CFBundleDisplayName */ 21 | "This is the start of your conversation with the %@ team. We'll stay in touch to help you get the most out of your app.\nFeel free to leave us a message about anything that’s on your mind. We’ll get back to your questions, suggestions or anything else as soon as we can." = "您可以在這裡與 %@ 製作團隊直接溝通。我們將會協助您充份利用這支App。您也可以留下任何問題或是您的寶貴意見,我們將會盡快回覆您。"; 22 | 23 | /* Error message shown in conversation view */ 24 | "No Internet connection" = "沒有網路服務"; 25 | 26 | /* Error message shown in conversation view */ 27 | "Could not connect to server" = "無法連接至伺服器"; 28 | 29 | /* Local notification text. Uses CFBundleDisplayName */ 30 | "Having trouble with %@? Reach out and we'll help." = "關於 %@ 有任何問題或建議嗎? 請與我們聯絡."; 31 | 32 | /* Recommendation title */ 33 | "Recommended For You" = "建議您"; 34 | 35 | /* Error displayed in the search result table view */ 36 | "Cannot return search results" = "搜尋失敗"; 37 | 38 | /* Error displayed in the search result table view */ 39 | "No results found." = "找不到相關的結果."; 40 | 41 | /* Fallback used by the in app notification when no message author name is found */ 42 | "%@ Team" = "%@ 團隊"; 43 | 44 | /* Button label for the no network message in web view */ 45 | "Reload" = "重新讀取"; 46 | 47 | /* No network message in web view */ 48 | "Cannot open the page because your device is not connected to the Internet." = "無法讀取網頁,請檢查您的網路連線."; 49 | 50 | /* Two fingers gesture hint title */ 51 | "Quick Tip" = "小提醒"; 52 | 53 | /* Two fingers gesture hint instructions */ 54 | "Swipe down with two fingers to get help from anywhere. Try it above." = "試試看,您可以在任何時候使用兩指下滑取得協助."; 55 | 56 | /* Two fingers gesture hint skip button */ 57 | "Skip" = "略過"; 58 | 59 | /* webview didFailLoadWithError Alert view title */ 60 | "Error" = "錯誤"; 61 | 62 | /* webview didFailLoadWithError Alert view button */ 63 | "Okay" = "確定"; 64 | 65 | /* Conversation send button */ 66 | "Send" = "送出"; 67 | 68 | /* Conversation text input place holder */ 69 | "Type a message..." = "請輸入文字..."; 70 | 71 | /* Conversation nav bar left button */ 72 | "Done" = "完成"; 73 | 74 | /* Failure text for chat messages that fail to upload */ 75 | "Message not delivered. Tap to retry." = "訊息未成功送出,請點撃重送."; 76 | 77 | /* Status text for chat messages */ 78 | "Sending..." = "發出..."; -------------------------------------------------------------------------------- /SupportKit.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /SupportKit.framework/SupportKit: -------------------------------------------------------------------------------- 1 | Versions/Current/SupportKit -------------------------------------------------------------------------------- /SupportKit.framework/Versions/A/Headers/SKTMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTMessage.h 3 | // SupportKit 4 | // 5 | // Copyright (c) 2015 Radialpoint. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /** 11 | * @abstract Notification that is fired when a message fails to upload. 12 | */ 13 | extern NSString* const SKTMessageUploadFailedNotification; 14 | 15 | /** 16 | * @abstract Notification that is fired when a message uploads successfully. 17 | */ 18 | extern NSString* const SKTMessageUploadCompletedNotification; 19 | 20 | /** 21 | * @discussion Upload status of an SKTMessage. 22 | * 23 | * @see SKTMessage 24 | */ 25 | typedef NS_ENUM(NSInteger, SKTMessageUploadStatus) { 26 | /** 27 | * A user message that has not yet finished uploading. 28 | */ 29 | SKTMessageUploadStatusUnsent, 30 | /** 31 | * A user message that failed to upload. 32 | */ 33 | SKTMessageUploadStatusFailed, 34 | /** 35 | * A user message that was successfully uploaded. 36 | */ 37 | SKTMessageUploadStatusSent, 38 | /** 39 | * A message that did not originate from the current user. 40 | */ 41 | SKTMessageUploadStatusNotUserMessage 42 | }; 43 | 44 | @interface SKTMessage : NSObject 45 | 46 | /** 47 | * @abstract Create a message with the given text. The message will be owned by the current user. 48 | */ 49 | -(instancetype)initWithText:(NSString*)text; 50 | 51 | /** 52 | * @abstract The text content of the message. 53 | */ 54 | @property(readonly) NSString* text; 55 | 56 | /** 57 | * @abstract The name of the author. This property may be nil if no name could be determined. 58 | */ 59 | @property(readonly) NSString* name; 60 | 61 | /** 62 | * @abstract The url for the author's avatar image. 63 | */ 64 | @property(readonly) NSString* avatarUrl; 65 | 66 | /** 67 | * @abstract The date and time the message was sent. 68 | */ 69 | @property(readonly) NSDate *date; 70 | 71 | /** 72 | * @abstract Returns YES if the message was generated by a Whisper. 73 | */ 74 | @property(readonly) BOOL isWhisper; 75 | 76 | /** 77 | * @abstract Returns YES if the message originated from the user, or NO if the message comes from the app team. 78 | */ 79 | @property(readonly) BOOL isFromCurrentUser; 80 | 81 | /** 82 | * @abstract The upload status of the message. 83 | * 84 | * @see SKTMessageStatus 85 | */ 86 | @property(readonly) SKTMessageUploadStatus uploadStatus; 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /SupportKit.framework/Versions/A/Headers/SKTMessageBuyInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTMessageBuyInfo.h 3 | // SupportKit 4 | // 5 | // Created by Mike Spensieri on 2015-04-23. 6 | // Copyright (c) 2015 Radialpoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SKTMessageBuyInfo : NSObject 12 | 13 | @property NSString* imageUrl; 14 | @property NSString* moreInfoUrl; 15 | @property NSString* productName; 16 | @property float price; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SupportKit.framework/Versions/A/Headers/SKTSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTSettings.h 3 | // SupportKit 4 | // 5 | // Copyright (c) 2015 Radialpoint. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /** 11 | * @discussion Filtering mode to use with the -excludeSearchResultsIf:categories:sections: API of SKTSettings. 12 | * 13 | * @see SKTSettings 14 | */ 15 | typedef NS_ENUM(NSUInteger, SKTSearchResultsFilterMode) { 16 | /** 17 | * Filter out search results if they belong to any of the passed section ids. 18 | */ 19 | SKTSearchResultIsIn, 20 | /** 21 | * Filter out search results if they do not belong to any of the passed section ids. 22 | */ 23 | SKTSearchResultIsNotIn 24 | }; 25 | 26 | @interface SKTSettings : NSObject 27 | 28 | /** 29 | * @abstract Initializes a settings object with the given app token. 30 | * 31 | * @param appToken A valid app token retrieved from the SupportKit web portal. 32 | */ 33 | +(instancetype)settingsWithAppToken:(NSString*)appToken; 34 | 35 | /** 36 | * @abstract Sets the filtering policy applied to user search results based on the given filter mode. 37 | * 38 | * @discussion Filtering may only be configured once, and configuration must be done at init time or no filtering will be applied. 39 | * 40 | * Filtering by category id is only possible for Zendesk instances that are using HelpCenter. 41 | * 42 | * @see SKTSearchResultsFilterMode 43 | * 44 | * @param filterMode The filter mode to use. 45 | * @param categories Array of category ids on which to filter search results. Can be objects of type NSString or NSNumber. 46 | * @param sections Array of section ids on which to filter search results. Can be objects of type NSString or NSNumber. 47 | */ 48 | -(void)excludeSearchResultsIf:(SKTSearchResultsFilterMode)filterMode categories:(NSArray*)categories sections:(NSArray*)sections; 49 | 50 | /** 51 | * @abstract The app token corresponding to your application. 52 | * 53 | * @discussion App tokens are issued on the SupportKit web portal. This value may only be set once, and must be set at init time. 54 | */ 55 | @property(nonatomic, copy) NSString* appToken; 56 | 57 | /** 58 | * @abstract The base URL of your Zendesk knowledge base, to be used in constructing the search endpoint. 59 | * 60 | * @discussion This value may only be set once. If the knowledgeBaseURL is not specified at init time, search is disabled. 61 | * 62 | * The URL must be fully qualified, including http or https (ex: "https://supportkit.zendesk.com"). 63 | * 64 | * The default value is nil. 65 | */ 66 | @property(nonatomic, copy) NSString* knowledgeBaseURL; 67 | 68 | /** 69 | * @abstract A boolean property that indicates whether to enable the app-wide gesture (two-finger swipe down) to present the SupportKit UI. 70 | * 71 | * @discussion Use option shift (⌥⇧) drag to perform the gesture on the simulator. 72 | * 73 | * The default value is YES. 74 | */ 75 | @property BOOL enableAppWideGesture; 76 | 77 | /** 78 | * @abstract A boolean property that indicates whether to show a hint on how to perform the app-wide gesture when SupportKit is launched for the first time (without using the gesture). 79 | * 80 | * @discussion The default value is YES. 81 | */ 82 | @property BOOL enableGestureHintOnFirstLaunch; 83 | 84 | /** 85 | * @abstract A Boolean property that indicates whether to show a local OS notification that brings your user into the conversation page once tapped. 86 | * 87 | * @discussion The local OS notification is only shown if a user searched for help and left the app within 20 seconds, but without reading any KB articles or attempting to start a conversation. 88 | * 89 | * The default value is YES. 90 | */ 91 | @property BOOL enableLocalNotification; 92 | 93 | /** 94 | * @abstract The accent color for the conversation screen. 95 | * 96 | * @discussion Used as the color of user message bubbles, as well as the color of the send button and text input caret. 97 | * 98 | * The default value is #00B0FF. 99 | */ 100 | @property UIColor* conversationAccentColor; 101 | 102 | /** 103 | * @abstract The status bar style to use on the conversation screen. 104 | * 105 | * @discussion You should use this property if your app uses UIAppearance to style UINavigationBar, and your styling requires a specific status bar color. 106 | * 107 | * The default value is UIStatusBarStyleDefault. 108 | */ 109 | @property UIStatusBarStyle conversationStatusBarStyle; 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /SupportKit.framework/Versions/A/Headers/SKTUser.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTUser.h 3 | // SupportKit 4 | // 5 | // Copyright (c) 2015 Radialpoint. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SKTUser : NSObject 11 | 12 | /** 13 | * @abstract Returns the object representing the current user. 14 | */ 15 | +(instancetype)currentUser; 16 | 17 | /** 18 | * @abstract Adds custom properties to the user. This info is used to provide more context around who a user is. 19 | * 20 | * @discussion Keys must be of type NSString, and values must be of type NSString, NSNumber, or NSDate; any other type will be converted to NSString using the -description method. 21 | * 22 | * Example: 23 | * 24 | * `[user addProperties:@{ @"nickname" : @"Lil' Big Daddy Slim", @"weight" : @650, @"premiumUser" : @YES }];` 25 | * 26 | * Changes to user properties are uploaded in batches every 60 seconds, or when the app is sent to the background. 27 | * 28 | * This API is additive, and subsequent calls will override values for the provided keys. 29 | * 30 | * @param properties The properties to set for the current user. 31 | */ 32 | -(void)addProperties:(NSDictionary*)properties; 33 | 34 | /** 35 | * @abstract The user's first name, to be used as part of the display name when sending messages. 36 | */ 37 | @property(copy) NSString* firstName; 38 | 39 | /** 40 | * @abstract The user's last name, to be used as part of the display name when sending messages. 41 | */ 42 | @property(copy) NSString* lastName; 43 | 44 | /** 45 | * @abstract The user's email, to be used to display a gravatar. 46 | */ 47 | @property(copy) NSString* email; 48 | 49 | /** 50 | * @abstract The date the user started using your service. This can be used to create Whispers for user onboarding. 51 | */ 52 | @property(copy) NSDate* signedUpAt; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /SupportKit.framework/Versions/A/SupportKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/supportkit/lobby-boy/b476790a483cee0c974f04894c75510e2dc2d7ab/SupportKit.framework/Versions/A/SupportKit -------------------------------------------------------------------------------- /SupportKit.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A --------------------------------------------------------------------------------