diff --git a/.gitignore b/.gitignore index 67847ad5..be75b6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,3 @@ -# System -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate - -# npm -# node_modules/ - -# editors -# -jsconfig.json -.vscode/* - -# project -# -coverage +npm-debug.log +lerna-debug.log diff --git a/.travis.yml b/.travis.yml index dbd585f2..def138b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: node_js node_js: - "node" -script: - - yarn test -- --verbose --coverage \ No newline at end of file +env: + - TEST_DIR=packages/react-native-payments +script: cd $TEST_DIR && yarn && yarn test -- --verbose --coverage \ No newline at end of file diff --git a/README.md b/README.md index 1cd56a6e..13fbeba7 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,8 @@ __Features__ - __Simple.__ No more checkout forms. - __Effective__. Faster checkouts that increase conversion. - __Future-proof__. Use a W3C Standards API, supported by companies like Google, Firefox and others. -- __Cross-platform.__ Share payments code between your iOS and web apps. -- __Payment Processor Support__. Process payments with payment processors like Braintree and Stripe. - +- __Cross-platform__. Share payments code between your iOS and web apps. +- __Add-ons__. Easily enable support for Stripe or Braintree via add-ons. @@ -24,7 +23,7 @@ __Features__ - [Demo](#demo) - [Installation](#installation) - [Usage](#usage) -- [Payment Processors](#payment-processors) +- [Add-ons](#add-ons) - [API](#api) - [Resources](#resources) - [License](#license) @@ -59,6 +58,8 @@ $ react-native link react-native-payments - [Requesting Contact Information](#requesting-contact-information) - [Requesting a Shipping Address](#requesting-a-shipping-address) - [Processing Payments](#processing-payments) +- [Dismissing the Payment Request](#dismissing-the-payment-request) + ### Registering as a Merchant Before you can start accepting payments with Apple Pay, there are a few steps you'll need to go through: @@ -301,14 +302,6 @@ paymentRequest.show() You can learn more about server-side decrypting of Payment Tokens on Apple's [Payment Token Format Reference](https://developer.apple.com/library/content/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html) documentation. #### Processing Payments with a Payment Processor -React Native Payments also supports processing payments with payment processors. There are three parts to setting up a payment processor: - -1. Creating an Apple Pay certificate -2. Adding and Linking the Payment Processor's SDK -3. Adding your Payment Processor's Tokens - -_NOTE: For payment processor specific documentation, see the [Payment Processors](#payment-processors) section._ - When using a payment processor, you'll receive a `paymentToken` field within the `details` of the `PaymentResponse`. Use this token to charge customers with your payment processor. ```es6 @@ -328,97 +321,24 @@ paymentRequest.show() }); ``` -## Payment Processors -- [Stripe](#stripe) -- [Braintree](#braintree) - -### Stripe -#### Creating an Apple Pay certificate -Follow Stripe's [documentation](https://stripe.com/docs/apple-pay/apps#csr) on how to create and upload the Apple Pay certificate back to Stripe. - -#### Adding and Linking the Stripe SDK -Next, you'll need to add Stripe's SDK to your project. You can install it by following one of the methods [listed in Stripe's documentation](https://stripe.com/docs/mobile/ios#getting-started). - -Finally, in Xcode: -1. Select the `ReactNativePayments` project from the left sidebar (under Libraries) -2. Select `Build Settings` and search for `Framework Search Paths` -3. Then add the path to where you added the Framework (remember, it's relative to `/node_modules/react-native-payments/lib/ios`) +For a list of supported payment processors and how to enable them, see the [Add-ons](#add-ons) section. -xcode-stripe - -#### Adding your Stripe Config -Now that you've added Stripe's SDK to your app, you're setup to use Stripe as a payment processor. - -In order to do so, you'll need to define a `paymentMethodTokenizationParameters` on your `PaymentMethodData` with Stripe specific parameters. Here's an example of what Stripe `paramaters` look like: - -```diff - const supportedMethods = [ - { - supportedMethods: ['apple-pay'], - data: { - merchantIdentifier: 'merchant.com.your-app.namespace', - supportedNetworks: ['visa', 'mastercard'], - countryCode: 'US', - currencyCode: 'USD', -+ paymentMethodTokenizationParameters: { -+ parameters: { -+ 'gateway': 'stripe', -+ 'stripe:publishableKey': 'your-publishable-key' -+ } -+ } - } - } - ]; -``` - -Now you're all set to receive Stripe payment tokens in your `PaymentResponse`. - -### Braintree -#### Creating an Apple Pay certificate -Follow Braintree's [documentation](https://developers.braintreepayments.com/guides/apple-pay/configuration/ios/v4#apple-pay-certificate-request-and-provisioning) on how to create and upload the Apple Pay certificate back to Braintree. - -#### Adding and Linking the Braintree SDK -Next, you'll need to add Braintree's SDK to your project. You can install it by following one of the methods [listed in Braintree's documentation](https://github.com/braintree/braintree_ios#installation). - -Finally, in Xcode: -1. Select the `ReactNativePayments` project from the left sidebar (under Libraries) -2. Select `Build Settings` and search for `Header Search Paths` -3. Then add the path to where you added the Library (remember, it's relative to `/node_modules/react-native-payments/lib/ios`) - -xcode-braintree - - -#### Adding your Braintree Config -Now that you've added Braintree's SDK to your app, you're setup to use Braintree as a payment processor. - -In order to do so, you'll need to define a `paymentMethodTokenizationParameters` on your `PaymentMethodData` with Braintree specific parameters. Here's an example of what Braintree `paramaters` look like: +### Dismissing the Payment Request +Dismissing the Payment Request is as simple as calling the `complete` method on of the `PaymentResponse`. -```diff - const supportedMethods = [ - { - supportedMethods: ['apple-pay'], - data: { - merchantIdentifier: 'merchant.com.your-app.namespace', - supportedNetworks: ['visa', 'mastercard'], - countryCode: 'US', - currencyCode: 'USD', -+ paymentMethodTokenizationParameters: { -+ parameters: { -+ 'gateway': 'braintree', -+ 'braintree:tokenizationKey': 'your-tokenization-key' -+ } -+ } - } - } - ]; +```es6 +paymentResponse.complete('success'); // Alternatively, you can call it with `fail` or `unknown` ``` -Now you're all set to receive Braintree payment tokens in your `PaymentResponse`. +## Add-ons +Here's a list of Payment Processors that you can enable via add-ons: +- [Stripe](https://github.com/naoufal/react-native-payments/blob/master/cli/packages/react-native-payments-addon-stripe) +- [Braintree](https://github.com/naoufal/react-native-payments/blob/master/cli/packages/react-native-payments-addon-braintree) ## API -### [PaymentRequest](https://github.com/naoufal/react-native-payments/tree/master/docs/PaymentRequest.md) -### [PaymentRequestUpdateEvent](https://github.com/naoufal/react-native-payments/tree/master/docs/PaymentRequestUpdateEvent.md) -### [PaymentResponse](https://github.com/naoufal/react-native-payments/tree/master/docs/PaymentResponse.md) +### [PaymentRequest](https://github.com/naoufal/react-native-payments/blob/master/cli/packages/react-native-payments/docs/PaymentRequest.md) +### [PaymentRequestUpdateEvent](https://github.com/naoufal/react-native-payments/blob/master/cli/packages/react-native-payments/docs/PaymentRequestUpdateEvent.md) +### [PaymentResponse](https://github.com/naoufal/react-native-payments/blob/master/cli/packages/react-native-payments/docs/PaymentResponse.md) ## Resources ### Payment Request @@ -434,15 +354,6 @@ Now you're all set to receive Braintree payment tokens in your `PaymentResponse` - [Processing Payments](https://developer.apple.com/library/content/ApplePay_Guide/ProcessPayment.html#//apple_ref/doc/uid/TP40014764-CH5-SW4) - [Payment Token Format Reference](https://developer.apple.com/library/content/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html#//apple_ref/doc/uid/TP40014929) -### Gateways -#### Stripe -- [Creating a new Apple Pay certificate](https://stripe.com/docs/apple-pay/apps#csr) -- [Installing the Stripe SDK](https://stripe.com/docs/mobile/ios#getting-started) - -#### Braintree -- [Creating a new Apple Pay certificate](https://developers.braintreepayments.com/guides/apple-pay/configuration/ios/v4#apple-pay-certificate-request-and-provisioning) -- [Installing the Braintree SDK](https://github.com/braintree/braintree_ios#installation) - # License Licensed under the MIT License, Copyright © 2017, [Naoufal Kadhom](https://twitter.com/naoufal). diff --git a/examples/braintree/ios/Frameworks/Braintree/.gitattributes b/examples/braintree/ios/Frameworks/Braintree/.gitattributes deleted file mode 100755 index 12b3bcba..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.strings text diff --git a/examples/braintree/ios/Frameworks/Braintree/.github/issue_template.md b/examples/braintree/ios/Frameworks/Braintree/.github/issue_template.md deleted file mode 100755 index 6099fc16..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.github/issue_template.md +++ /dev/null @@ -1,10 +0,0 @@ -### General information - -* SDK/Library version: -* Environment: -* iOS Version and Device: -* Integration type and version: - -### Issue description - - diff --git a/examples/braintree/ios/Frameworks/Braintree/.gitignore b/examples/braintree/ios/Frameworks/Braintree/.gitignore deleted file mode 100755 index aec21916..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# OS X -.DS_Store - -# Xcode -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -profile -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcscmblueprint - -# CocoaPods -Pods - -appledocs - -# This file is needed for signing the ipa with our enterprise cert; -# you can get it from the iOS Developer Center. -EverybodyVenmo.mobileprovision - -# This file should contain your HockeyApp auth -# token from https://rink.hockeyapp.net/manage/auth_tokens -.hockeyapp - -*.pid diff --git a/examples/braintree/ios/Frameworks/Braintree/.ruby-gemset b/examples/braintree/ios/Frameworks/Braintree/.ruby-gemset deleted file mode 100755 index 01d61f70..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -braintree-ios diff --git a/examples/braintree/ios/Frameworks/Braintree/.ruby-version b/examples/braintree/ios/Frameworks/Braintree/.ruby-version deleted file mode 100755 index b1b25a5f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.2.2 diff --git a/examples/braintree/ios/Frameworks/Braintree/.swift-version b/examples/braintree/ios/Frameworks/Braintree/.swift-version deleted file mode 100755 index bb576dbd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.swift-version +++ /dev/null @@ -1 +0,0 @@ -2.3 diff --git a/examples/braintree/ios/Frameworks/Braintree/.travis.yml b/examples/braintree/ios/Frameworks/Braintree/.travis.yml deleted file mode 100755 index cccad4cb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -sudo: true -language: objective-c -cache: - - bundler - #- cocoapods -osx_image: xcode8.3 - -before_install: - - brew update || brew update - - brew outdated xctool || brew upgrade xctool - - SIMULATOR_ID=$(xcrun instruments -s | grep -o "iPhone 6 (10.1) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/") - -install: - - bundle install - #- bundle exec pod repo update --silent - - bundle exec pod install || { rm -rf ./Pods; bundle exec pod install; } - -script: - - echo $SIMULATOR_ID - - open -a "simulator" --args -CurrentDeviceUDID $SIMULATOR_ID - - travis_wait 30 set -o pipefail && xcodebuild test -workspace Braintree.xcworkspace -scheme "UnitTests" -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.1' | xcpretty -c - - travis_wait set -o pipefail && xcodebuild test -workspace Braintree.xcworkspace -scheme "IntegrationTests" -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.1' | xcpretty -c - #- travis_wait bundle exec rake spec:unit - #- bundle exec rake spec:api:integration -notifications: - email: - - team-ios@getbraintree.com diff --git a/examples/braintree/ios/Frameworks/Braintree/ACKNOWLEDGEMENTS.md b/examples/braintree/ios/Frameworks/Braintree/ACKNOWLEDGEMENTS.md deleted file mode 100755 index 4fa54142..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/ACKNOWLEDGEMENTS.md +++ /dev/null @@ -1,17 +0,0 @@ -Acknowledgements ----------------- - -The Braintree SDK uses code from the following libraries: - -* [NSURL+QueryDictionary](https://github.com/itsthejb/NSURL-QueryDictionary), MIT License -* [AFNetworking](https://github.com/AFNetworking/AFNetworking), MIT License -* [CardIO](https://github.com/card-io/card.io-iOS-SDK), MIT License -* [FLEX](https://github.com/Flipboard/FLEX), BSD License -* [HockeySDK](https://github.com/bitstadium/HockeySDK-iOS), MIT License -* [InAppSettingsKit](https://github.com/futuretap/InAppSettingsKit), BSD License -* [PureLayout](https://github.com/PureLayout/PureLayout), MIT License -* [iOS-Slide-Menu](https://github.com/aryaxt/iOS-Slide-Menu), MIT License -* [Specta](https://github.com/specta/specta), MIT License -* [Expecta](https://github.com/specta/expecta), MIT License -* [OCMock](https://github.com/erikdoe/ocmock), Apache License 2.0 -* [OHHTTPStubs](https://github.com/AliSoftware/OHHTTPStubs), MIT License diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.podspec b/examples/braintree/ios/Frameworks/Braintree/Braintree.podspec deleted file mode 100755 index fdfd7f2d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.podspec +++ /dev/null @@ -1,121 +0,0 @@ -Pod::Spec.new do |s| - s.name = "Braintree" - s.version = "4.8.4" - s.summary = "Braintree v.zero: A modern foundation for accepting payments" - s.description = <<-DESC - Braintree is a full-stack payments platform for developers - - This CocoaPod will help you accept payments in your iOS app. - - Check out our development portal at https://developers.braintreepayments.com. - DESC - s.homepage = "https://www.braintreepayments.com/how-braintree-works" - s.documentation_url = "https://developers.braintreepayments.com/ios/start/hello-client" - s.screenshots = "https://raw.githubusercontent.com/braintree/braintree_ios/master/screenshot.png" - s.license = "MIT" - s.author = { "Braintree" => "code@getbraintree.com" } - s.source = { :git => "https://github.com/braintree/braintree_ios.git", :tag => s.version.to_s } - s.social_media_url = "https://twitter.com/braintree" - - s.platform = :ios, "7.0" - s.requires_arc = true - s.compiler_flags = "-Wall -Werror -Wextra" - - s.default_subspecs = %w[Core Card PayPal UI] - - s.subspec "Core" do |s| - s.source_files = "BraintreeCore/**/*.{h,m}" - s.public_header_files = "BraintreeCore/Public/*.h" - s.frameworks = "AddressBook" - s.weak_frameworks = "Contacts" - end - - s.subspec "Apple-Pay" do |s| - s.source_files = "BraintreeApplePay/**/*.{h,m}" - s.public_header_files = "BraintreeApplePay/Public/*.h" - s.dependency "Braintree/Core" - s.frameworks = "PassKit" - end - - s.subspec "Card" do |s| - s.source_files = "BraintreeCard/**/*.{h,m}" - s.public_header_files = "BraintreeCard/Public/*.h" - s.dependency "Braintree/Core" - end - - s.subspec "DataCollector" do |s| - s.source_files = "BraintreeDataCollector/**/*.{h,m}" - s.public_header_files = "BraintreeDataCollector/Public/*.h" - s.vendored_library = "BraintreeDataCollector/Kount/libDeviceCollectorLibrary.a" - s.dependency "Braintree/Core" - end - - s.subspec "PayPal" do |s| - s.source_files = "BraintreePayPal/*.{h,m}", "BraintreePayPal/Public/*.h" - s.public_header_files = "BraintreePayPal/Public/*.h" - s.dependency "Braintree/Core" - s.dependency "Braintree/PayPalOneTouch" - end - - s.subspec "Venmo" do |s| - s.source_files = "BraintreeVenmo/**/*.{h,m}" - s.public_header_files = "BraintreeVenmo/Public/*.h" - s.dependency "Braintree/Core" - s.dependency "Braintree/PayPalDataCollector" - end - - s.subspec "UI" do |s| - s.source_files = "BraintreeUI/**/*.{h,m}" - s.public_header_files = "BraintreeUI/Public/*.h" - s.frameworks = "UIKit" - s.resource_bundles = { - "Braintree-UI-Localization" => ["BraintreeUI/Localization/*.lproj"], - "Braintree-Drop-In-Localization" => ["BraintreeUI/Drop-In/Localization/*.lproj"] } - s.dependency "Braintree/Card" - s.dependency "Braintree/Core" - end - - s.subspec "UnionPay" do |s| - s.source_files = "BraintreeUnionPay/**/*.{h,m}" - s.public_header_files = "BraintreeUnionPay/Public/*.h" - s.frameworks = "UIKit" - s.dependency "Braintree/Card" - s.dependency "Braintree/Core" - end - - s.subspec "3D-Secure" do |s| - s.source_files = "Braintree3DSecure/**/*.{h,m}" - s.public_header_files = "Braintree3DSecure/Public/*.h" - s.frameworks = "UIKit" - s.dependency "Braintree/Card" - s.dependency "Braintree/Core" - s.resource_bundle = { "Braintree-3D-Secure-Localization" => "Braintree3DSecure/Localization/*.lproj" } - end - - s.subspec "PayPalOneTouch" do |s| - s.source_files = "BraintreePayPal/PayPalOneTouch/**/*.{h,m}" - s.public_header_files = "BraintreePayPal/PayPalOneTouch/Public/*.h" - s.frameworks = "UIKit" - s.weak_frameworks = "SafariServices" - s.xcconfig = { "OTHER_LDFLAGS" => "-ObjC -lc++" } - s.dependency "Braintree/Core" - s.dependency "Braintree/PayPalDataCollector" - s.dependency "Braintree/PayPalUtils" - end - - s.subspec "PayPalDataCollector" do |s| - s.source_files = "BraintreePayPal/PayPalDataCollector/**/*.{h,m}" - s.public_header_files = "BraintreePayPal/PayPalDataCollector/Public/*.h", "BraintreePayPal/PayPalDataCollector/Risk/*.h" - s.frameworks = "MessageUI", "SystemConfiguration", "CoreLocation", "UIKit" - s.vendored_library = "BraintreePayPal/PayPalDataCollector/Risk/libPPRiskComponent.a" - s.dependency "Braintree/Core" - s.dependency "Braintree/PayPalUtils" - end - - s.subspec "PayPalUtils" do |s| - s.source_files = "BraintreePayPal/PayPalUtils/**/*.{h,m}" - s.public_header_files = "BraintreePayPal/PayPalUtils/Public/*.h" - s.frameworks = "MessageUI", "SystemConfiguration", "CoreLocation", "UIKit" - end -end - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/project.pbxproj b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/project.pbxproj deleted file mode 100755 index a5cfc1fa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/project.pbxproj +++ /dev/null @@ -1,7492 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 031B94C41C34822800F136C8 /* BTUI_UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94BB1C34822800F136C8 /* BTUI_UIColor.m */; }; - 031B94CC1C3482CC00F136C8 /* BTUICardExpirationValidatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94BC1C34822800F136C8 /* BTUICardExpirationValidatorSpec.m */; }; - 031B94CD1C3483E600F136C8 /* BTUICardExpiryFormatterSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94BD1C34822800F136C8 /* BTUICardExpiryFormatterSpec.m */; }; - 031B94CF1C34844700F136C8 /* BTUICardTypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94BF1C34822800F136C8 /* BTUICardTypeSpec.m */; }; - 031B94D01C3485ED00F136C8 /* EXPMatchers+haveKerning.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94C31C34822800F136C8 /* EXPMatchers+haveKerning.m */; }; - 031B94D11C34863200F136C8 /* BTUISpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 031B94C01C34822800F136C8 /* BTUISpec.m */; }; - 0325AC241C289B5F00E90999 /* BraintreeThreeDSecure_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0325AC231C289B5F00E90999 /* BraintreeThreeDSecure_UITests.swift */; }; - 032C26881DDEEB5000BBC1C2 /* BTDropInUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032C26871DDEEB5000BBC1C2 /* BTDropInUtil_Tests.swift */; }; - 032D3A721C580B09000E5F6B /* PPDataCollectorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 032D3A711C580B09000E5F6B /* PPDataCollectorTest.m */; }; - 033800101C248B9C00CFF1D9 /* BraintreeDropInLegacy_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0338000F1C248B9C00CFF1D9 /* BraintreeDropInLegacy_UITests.swift */; }; - 035945571BE96345002116BB /* BTUIVenmoMonogramCardView.h in Headers */ = {isa = PBXBuildFile; fileRef = 035945551BE96345002116BB /* BTUIVenmoMonogramCardView.h */; }; - 035945581BE96345002116BB /* BTUIVenmoMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 035945561BE96345002116BB /* BTUIVenmoMonogramCardView.m */; }; - 0371D13C1CBECACD006A0B5D /* BTUIPayPalWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A70241B81C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m */; }; - 0371D13D1CBECAEE006A0B5D /* BTUIPayPalCompactButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A70241BC1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m */; }; - 0384E94D1C23BAFF001A3380 /* BraintreePayPal_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0384E94C1C23BAFF001A3380 /* BraintreePayPal_UITests.swift */; }; - 0384E94F1C23C108001A3380 /* BTUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0384E94E1C23C108001A3380 /* BTUITest.swift */; }; - 03B368B31CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B368B21CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.m */; }; - 03CFEF301CD30B15006D2DA5 /* PPOTDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF261CD30B15006D2DA5 /* PPOTDevice.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF311CD30B15006D2DA5 /* PPOTEncryptionHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF271CD30B15006D2DA5 /* PPOTEncryptionHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF321CD30B15006D2DA5 /* PPOTJSONHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF281CD30B15006D2DA5 /* PPOTJSONHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF331CD30B15006D2DA5 /* PPOTMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF291CD30B15006D2DA5 /* PPOTMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF341CD30B15006D2DA5 /* PPOTPinnedCertificates.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2A1CD30B15006D2DA5 /* PPOTPinnedCertificates.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF351CD30B15006D2DA5 /* PPOTSimpleKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2B1CD30B15006D2DA5 /* PPOTSimpleKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF361CD30B15006D2DA5 /* PPOTString.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2C1CD30B15006D2DA5 /* PPOTString.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF371CD30B15006D2DA5 /* PPOTTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2D1CD30B15006D2DA5 /* PPOTTime.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF381CD30B15006D2DA5 /* PPOTURLSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2E1CD30B15006D2DA5 /* PPOTURLSession.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF391CD30B15006D2DA5 /* PPOTVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF2F1CD30B15006D2DA5 /* PPOTVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03CFEF3B1CD30C28006D2DA5 /* PayPalUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFEF3A1CD30C28006D2DA5 /* PayPalUtils.h */; }; - 03CFEF3E1CD3124F006D2DA5 /* PayPalUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; }; - 03D294FF1BE835C8004F90DA /* BTVenmoAccountNonce_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D294FE1BE835C8004F90DA /* BTVenmoAccountNonce_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 03EF62061DB4A90C004F4090 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 03EF62071DB4A90C004F4090 /* BraintreeCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF620A1DB4A90C004F4090 /* BraintreePayPal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; }; - 03EF620B1DB4A90C004F4090 /* BraintreePayPal.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF620E1DB4A90C004F4090 /* Braintree3DSecure.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */; }; - 03EF620F1DB4A90C004F4090 /* Braintree3DSecure.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF62121DB4A90C004F4090 /* BraintreeApplePay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */; }; - 03EF62131DB4A90C004F4090 /* BraintreeApplePay.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF62161DB4A90C004F4090 /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - 03EF62171DB4A90C004F4090 /* BraintreeCard.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF621A1DB4A90C004F4090 /* BraintreeVenmo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */; }; - 03EF621B1DB4A90C004F4090 /* BraintreeVenmo.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF621E1DB4A90C004F4090 /* BraintreeUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77344F71B7A93A10083EC8D /* BraintreeUI.framework */; }; - 03EF621F1DB4A90C004F4090 /* BraintreeUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A77344F71B7A93A10083EC8D /* BraintreeUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF62221DB4A90C004F4090 /* BraintreeDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; }; - 03EF62231DB4A90C004F4090 /* BraintreeDataCollector.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF62261DB4A90C004F4090 /* PayPalOneTouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; }; - 03EF62271DB4A90C004F4090 /* PayPalOneTouch.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF622A1DB4A90D004F4090 /* PayPalDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */; }; - 03EF622B1DB4A90D004F4090 /* PayPalDataCollector.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF622E1DB4A90D004F4090 /* PayPalUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; }; - 03EF622F1DB4A90D004F4090 /* PayPalUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03EF62321DB4A90D004F4090 /* BraintreeUnionPay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */; }; - 03EF62331DB4A90D004F4090 /* BraintreeUnionPay.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 03F54E121C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03F54E111C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.m */; }; - 16CD2E9F1B4077FC00E68495 /* BTJSON_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16CD2E9E1B4077FC00E68495 /* BTJSON_Tests.swift */; }; - 2D941D3B1B59C76A0016EFB4 /* BraintreePayPal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D941D3A1B59C76A0016EFB4 /* BraintreePayPal.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D411B59C8E60016EFB4 /* BTPayPalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E17D261B3DFA0F0024F9AB /* BTPayPalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D421B59C8E60016EFB4 /* BTPayPalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E17D271B3DFA0F0024F9AB /* BTPayPalRequest.m */; }; - 2D941D431B59C8E60016EFB4 /* BTPayPalDriver_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A734D95E1B4C4C0700FE0E1B /* BTPayPalDriver_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2D941D441B59C8E60016EFB4 /* BTPayPalDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 16C42B6C1B3DE0550028A3B4 /* BTPayPalDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D451B59C8E60016EFB4 /* BTPayPalDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C42B6D1B3DE0550028A3B4 /* BTPayPalDriver.m */; }; - 2D941D461B59C8E60016EFB4 /* BTPayPalRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A734D95A1B4C4B1000FE0E1B /* BTPayPalRequestFactory.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2D941D471B59C8E60016EFB4 /* BTPayPalRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A734D95B1B4C4B1000FE0E1B /* BTPayPalRequestFactory.m */; }; - 2D941D4B1B59C8E60016EFB4 /* BTPayPalAccountNonce_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7102E191B5085BB0007D40A /* BTPayPalAccountNonce_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2D941D4C1B59C8E60016EFB4 /* BTPayPalAccountNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E17D1A1B3DE4570024F9AB /* BTPayPalAccountNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D4D1B59C8E60016EFB4 /* BTPayPalAccountNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E17D1B1B3DE4580024F9AB /* BTPayPalAccountNonce.m */; }; - 2D941D5B1B5D5F170016EFB4 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 2D941D8B1B5D9E8C0016EFB4 /* Braintree3DSecure.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D941D8A1B5D9E8C0016EFB4 /* Braintree3DSecure.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D901B5D9EB40016EFB4 /* Three-D-Secure.strings in Resources */ = {isa = PBXBuildFile; fileRef = A79AFA4A1B56F822007B1DF1 /* Three-D-Secure.strings */; }; - 2D941D911B5D9F200016EFB4 /* BTThreeDSecureAuthenticationViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA401B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.h */; }; - 2D941D921B5D9F200016EFB4 /* BTThreeDSecureAuthenticationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA411B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.m */; }; - 2D941D931B5D9F200016EFB4 /* BTThreeDSecureDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA7E1B56FEE4007B1DF1 /* BTThreeDSecureDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D941B5D9F200016EFB4 /* BTThreeDSecureDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA7F1B56FEE4007B1DF1 /* BTThreeDSecureDriver.m */; }; - 2D941D951B5D9F200016EFB4 /* BTThreeDSecureErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA3B1B56F822007B1DF1 /* BTThreeDSecureErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D961B5D9F200016EFB4 /* BTThreeDSecureErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA421B56F822007B1DF1 /* BTThreeDSecureErrors.m */; }; - 2D941D971B5D9F200016EFB4 /* BTThreeDSecureLookupResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA7A1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.h */; }; - 2D941D981B5D9F200016EFB4 /* BTThreeDSecureLookupResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA7B1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.m */; }; - 2D941D991B5D9F200016EFB4 /* BTThreeDSecureResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA3D1B56F822007B1DF1 /* BTThreeDSecureResponse.h */; }; - 2D941D9A1B5D9F200016EFB4 /* BTThreeDSecureResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA441B56F822007B1DF1 /* BTThreeDSecureResponse.m */; }; - 2D941D9B1B5D9F200016EFB4 /* BTThreeDSecureCardNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA761B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D941D9C1B5D9F200016EFB4 /* BTThreeDSecureCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA771B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.m */; }; - 2D941D9D1B5D9F200016EFB4 /* BTWebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA451B56F822007B1DF1 /* BTWebViewController.h */; }; - 2D941D9E1B5D9F200016EFB4 /* BTWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA461B56F822007B1DF1 /* BTWebViewController.m */; }; - 2D941D9F1B5D9F200016EFB4 /* BTThreeDSecureLocalizedString.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA481B56F822007B1DF1 /* BTThreeDSecureLocalizedString.h */; }; - 2D941DA01B5D9F200016EFB4 /* BTThreeDSecureLocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA491B56F822007B1DF1 /* BTThreeDSecureLocalizedString.m */; }; - 2D941DA61B5D9F7F0016EFB4 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 2DE12F421B59C36900EA1BCF /* BraintreeCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DE12F0B1B59BE0100EA1BCF /* BraintreeCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F431B59C36900EA1BCF /* BTAnalyticsMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD3E1B445550008857E1 /* BTAnalyticsMetadata.h */; }; - 2DE12F441B59C36900EA1BCF /* BTAnalyticsMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD3F1B445550008857E1 /* BTAnalyticsMetadata.m */; }; - 2DE12F451B59C36900EA1BCF /* BTAPIClient_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD2C1B431B75008857E1 /* BTAPIClient_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2DE12F461B59C36900EA1BCF /* BTAPIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 16C42B681B3DDFE00028A3B4 /* BTAPIClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F471B59C36900EA1BCF /* BTAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C42B691B3DDFE00028A3B4 /* BTAPIClient.m */; }; - 2DE12F481B59C36900EA1BCF /* BTAPIPinnedCertificates.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD4A1B445A29008857E1 /* BTAPIPinnedCertificates.h */; }; - 2DE12F491B59C36900EA1BCF /* BTAPIPinnedCertificates.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD4B1B445A29008857E1 /* BTAPIPinnedCertificates.m */; }; - 2DE12F4A1B59C36900EA1BCF /* BTClientMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A72E134F1B446DED002703DD /* BTClientMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F4B1B59C36900EA1BCF /* BTClientMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A72E13501B446DED002703DD /* BTClientMetadata.m */; }; - 2DE12F4C1B59C36900EA1BCF /* BTHTTP.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD401B445550008857E1 /* BTHTTP.h */; }; - 2DE12F4D1B59C36900EA1BCF /* BTHTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD411B445550008857E1 /* BTHTTP.m */; }; - 2DE12F4E1B59C36900EA1BCF /* BTHTTPErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = A79AFA841B5721A2007B1DF1 /* BTHTTPErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F4F1B59C36900EA1BCF /* BTHTTPErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA861B5721F6007B1DF1 /* BTHTTPErrors.m */; }; - 2DE12F501B59C36900EA1BCF /* BTJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A79033A51B4AF360004C8234 /* BTJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F511B59C36900EA1BCF /* BTJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = A79033A61B4AF360004C8234 /* BTJSON.m */; }; - 2DE12F521B59C36900EA1BCF /* BTKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD4C1B445A29008857E1 /* BTKeychain.h */; }; - 2DE12F531B59C36900EA1BCF /* BTKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD4D1B445A29008857E1 /* BTKeychain.m */; }; - 2DE12F541B59C36900EA1BCF /* BTLogger_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD131B4312DC008857E1 /* BTLogger_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 2DE12F551B59C36900EA1BCF /* BTLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A6DD141B4312DC008857E1 /* BTLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F561B59C36900EA1BCF /* BTLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD151B4312DC008857E1 /* BTLogger.m */; }; - 2DE12F581B59C36900EA1BCF /* BTPostalAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = A72E134B1B44630C002703DD /* BTPostalAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F591B59C36900EA1BCF /* BTPostalAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = A72E134C1B44630C002703DD /* BTPostalAddress.m */; }; - 2DE12F5A1B59C36900EA1BCF /* BTPaymentMethodNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E17D061B3DE3B40024F9AB /* BTPaymentMethodNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DE12F5C1B59C36900EA1BCF /* BTURLUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD511B445A29008857E1 /* BTURLUtils.m */; }; - 3E8581A0B6B678AFED359FA5 /* libPods-Tests-UnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD5B458BFE02563982017D5E /* libPods-Tests-UnitTests.a */; }; - 4107EB231C88C75000F32D81 /* BTUICardPhoneNumberField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4107EB211C88C75000F32D81 /* BTUICardPhoneNumberField.h */; }; - 4107EB241C88C75000F32D81 /* BTUICardPhoneNumberField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4107EB221C88C75000F32D81 /* BTUICardPhoneNumberField.m */; }; - 411D1C001BB0B528000E7D8C /* Braintree3DSecure.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */; }; - 411D1C011BB0B528000E7D8C /* BraintreeApplePay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */; }; - 411D1C021BB0B528000E7D8C /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - 411D1C031BB0B528000E7D8C /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 411D1C041BB0B528000E7D8C /* BraintreePayPal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; }; - 411D1C051BB0B528000E7D8C /* BraintreeUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77344F71B7A93A10083EC8D /* BraintreeUI.framework */; }; - 411D1C061BB0B528000E7D8C /* BraintreeVenmo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */; }; - 411D1C071BB0B56E000E7D8C /* Braintree3DSecure.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */; }; - 411D1C081BB0B56E000E7D8C /* BraintreeApplePay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */; }; - 411D1C091BB0B56E000E7D8C /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - 411D1C0A1BB0B56E000E7D8C /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 411D1C0B1BB0B56E000E7D8C /* BraintreePayPal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; }; - 411D1C0D1BB0B56E000E7D8C /* BraintreeVenmo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */; }; - 41211EF81BA0E45300DB1705 /* BTPaymentMethodNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = 41211EF61BA0E45300DB1705 /* BTPaymentMethodNonce.m */; }; - 412FE0571B9799EE008AAABE /* BTApplePayClient_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 412FE0561B9799EE008AAABE /* BTApplePayClient_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 412FE05B1B97B03B008AAABE /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 413616EB1C1217F000D4C4A5 /* BTUIVenmoMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 035945561BE96345002116BB /* BTUIVenmoMonogramCardView.m */; }; - 413CDF4F1C779ED400B89FCA /* BTDataCollector_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 413CDF4E1C779ED400B89FCA /* BTDataCollector_Internal.h */; }; - 41472F941CB6D52200AFA75C /* BTConfiguration+UnionPay.m in Sources */ = {isa = PBXBuildFile; fileRef = 41472F921CB6D52200AFA75C /* BTConfiguration+UnionPay.m */; }; - 41472F951CB6D52200AFA75C /* BTConfiguration+UnionPay.m in Sources */ = {isa = PBXBuildFile; fileRef = 41472F921CB6D52200AFA75C /* BTConfiguration+UnionPay.m */; }; - 41472F971CB6D53400AFA75C /* BTConfiguration+UnionPay.h in Headers */ = {isa = PBXBuildFile; fileRef = 41472F961CB6D53400AFA75C /* BTConfiguration+UnionPay.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4149C91D1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4149C91C1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift */; }; - 415924B21BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 415924B01BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m */; }; - 415924B41BA0F2D800C095F6 /* BTPaymentMethodNonceParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 415924B31BA0F2D800C095F6 /* BTPaymentMethodNonceParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4164B99E1C9B658E006AE861 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 4164B9B01C9B6690006AE861 /* BraintreeUnionPay.h in Headers */ = {isa = PBXBuildFile; fileRef = 4164B9AF1C9B6690006AE861 /* BraintreeUnionPay.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4164B9B11C9B68CC006AE861 /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - 4164B9BA1C9B6988006AE861 /* BTCardClient+UnionPay.h in Headers */ = {isa = PBXBuildFile; fileRef = 4164B9B81C9B6988006AE861 /* BTCardClient+UnionPay.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4164B9BB1C9B6988006AE861 /* BTCardClient+UnionPay.m in Sources */ = {isa = PBXBuildFile; fileRef = 4164B9B91C9B6988006AE861 /* BTCardClient+UnionPay.m */; }; - 4164B9C01C9B74D4006AE861 /* BTCardClient+UnionPay.m in Sources */ = {isa = PBXBuildFile; fileRef = 4164B9B91C9B6988006AE861 /* BTCardClient+UnionPay.m */; }; - 4169A8F11CAB10680051DDAF /* BraintreeUnionPay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */; }; - 4169A8F81CAB11300051DDAF /* BraintreeUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77344F71B7A93A10083EC8D /* BraintreeUI.framework */; }; - 4169A8F91CAB11300051DDAF /* BraintreeUnionPay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */; }; - 4169A8FA1CAB11300051DDAF /* PayPalOneTouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; }; - 417404531BB08526008A5DEA /* BTThreeDSecureLocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA491B56F822007B1DF1 /* BTThreeDSecureLocalizedString.m */; }; - 417404591BB08526008A5DEA /* BTThreeDSecureAuthenticationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA411B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.m */; }; - 4174045A1BB08526008A5DEA /* BTThreeDSecureDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA7F1B56FEE4007B1DF1 /* BTThreeDSecureDriver.m */; }; - 4174045B1BB08526008A5DEA /* BTThreeDSecureErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA421B56F822007B1DF1 /* BTThreeDSecureErrors.m */; }; - 4174045D1BB08526008A5DEA /* BTThreeDSecureLookupResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA7B1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.m */; }; - 4174045F1BB08526008A5DEA /* BTThreeDSecureResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA441B56F822007B1DF1 /* BTThreeDSecureResponse.m */; }; - 417404601BB08526008A5DEA /* BTThreeDSecureCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA771B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.m */; }; - 417404641BB08526008A5DEA /* BTWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA461B56F822007B1DF1 /* BTWebViewController.m */; }; - 4174046A1BB08530008A5DEA /* BTApplePayClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8897D1B5EF62C007A0E9C /* BTApplePayClient.m */; }; - 4174046C1BB08530008A5DEA /* BTConfiguration+ApplePay.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C14E1B66E46900ED063C /* BTConfiguration+ApplePay.m */; }; - 4174046D1BB08530008A5DEA /* BTApplePayCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8897F1B5EF62C007A0E9C /* BTApplePayCardNonce.m */; }; - 417404741BB085F1008A5DEA /* BTCardClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8899D1B5F0471007A0E9C /* BTCardClient.m */; }; - 417404751BB085F1008A5DEA /* BTCard.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889A01B5F0471007A0E9C /* BTCard.m */; }; - 417404771BB085F1008A5DEA /* BTCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889A21B5F0471007A0E9C /* BTCardNonce.m */; }; - 4174047D1BB08629008A5DEA /* BTAnalyticsMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD3F1B445550008857E1 /* BTAnalyticsMetadata.m */; }; - 4174047F1BB08629008A5DEA /* BTAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C42B691B3DDFE00028A3B4 /* BTAPIClient.m */; }; - 417404811BB08629008A5DEA /* BTAPIPinnedCertificates.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD4B1B445A29008857E1 /* BTAPIPinnedCertificates.m */; }; - 417404821BB08629008A5DEA /* BTAppSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1521B66F79900ED063C /* BTAppSwitch.m */; }; - 417404831BB08629008A5DEA /* BTClientMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A72E13501B446DED002703DD /* BTClientMetadata.m */; }; - 417404841BB08629008A5DEA /* BTClientToken.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D674721B84FDB400ED6C00 /* BTClientToken.m */; }; - 417404851BB08629008A5DEA /* BTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1421B66B3D000ED063C /* BTConfiguration.m */; }; - 417404871BB08629008A5DEA /* BTErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A77346231B7AA4D50083EC8D /* BTErrors.m */; }; - 4174048A1BB08629008A5DEA /* BTHTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD411B445550008857E1 /* BTHTTP.m */; }; - 4174048B1BB08629008A5DEA /* BTHTTPErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AFA861B5721F6007B1DF1 /* BTHTTPErrors.m */; }; - 4174048C1BB08629008A5DEA /* BTJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = A79033A61B4AF360004C8234 /* BTJSON.m */; }; - 4174048E1BB08629008A5DEA /* BTKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD4D1B445A29008857E1 /* BTKeychain.m */; }; - 417404901BB08629008A5DEA /* BTLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD151B4312DC008857E1 /* BTLogger.m */; }; - 417404911BB08629008A5DEA /* BTPostalAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = A72E134C1B44630C002703DD /* BTPostalAddress.m */; }; - 417404941BB08629008A5DEA /* BTPaymentMethodNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = 41211EF61BA0E45300DB1705 /* BTPaymentMethodNonce.m */; }; - 417404951BB08629008A5DEA /* BTTokenizationService.m in Sources */ = {isa = PBXBuildFile; fileRef = A773462F1B7BB1A70083EC8D /* BTTokenizationService.m */; }; - 417404961BB08629008A5DEA /* BTPaymentMethodNonceParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 415924B01BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m */; }; - 417404971BB08629008A5DEA /* BTURLUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD511B445A29008857E1 /* BTURLUtils.m */; }; - 417404B71BB0864F008A5DEA /* BTConfiguration+PayPal.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C14A1B66E11C00ED063C /* BTConfiguration+PayPal.m */; }; - 417404B81BB0864F008A5DEA /* BTPayPalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E17D271B3DFA0F0024F9AB /* BTPayPalRequest.m */; }; - 417404B91BB0864F008A5DEA /* BTPayPalDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C42B6D1B3DE0550028A3B4 /* BTPayPalDriver.m */; }; - 417404BC1BB0864F008A5DEA /* BTPayPalRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A734D95B1B4C4B1000FE0E1B /* BTPayPalRequestFactory.m */; }; - 417404BF1BB0864F008A5DEA /* BTPayPalAccountNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E17D1B1B3DE4580024F9AB /* BTPayPalAccountNonce.m */; }; - 417404C71BB08658008A5DEA /* BTConfiguration+Venmo.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1461B66D94600ED063C /* BTConfiguration+Venmo.m */; }; - 417404C91BB08658008A5DEA /* BTVenmoAppSwitchRequestURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D0B1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.m */; }; - 417404CB1BB08658008A5DEA /* BTVenmoAppSwitchReturnURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D0D1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.m */; }; - 417404CC1BB08658008A5DEA /* BTVenmoDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889FB1B5F0C00007A0E9C /* BTVenmoDriver.m */; }; - 417404CE1BB08658008A5DEA /* BTVenmoAccountNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D071B6043B7005A4A09 /* BTVenmoAccountNonce.m */; }; - 417404D31BB0869C008A5DEA /* BTDropInLocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345FB1B7A9E340083EC8D /* BTDropInLocalizedString.m */; }; - 417404D51BB0869C008A5DEA /* BTDropInContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345EC1B7A9E340083EC8D /* BTDropInContentView.m */; }; - 417404D71BB0869C008A5DEA /* BTDropInErrorAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345EE1B7A9E340083EC8D /* BTDropInErrorAlert.m */; }; - 417404D91BB0869C008A5DEA /* BTDropInErrorState.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F01B7A9E340083EC8D /* BTDropInErrorState.m */; }; - 417404DB1BB0869C008A5DEA /* BTDropInSelectPaymentMethodViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F21B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m */; }; - 417404DD1BB0869C008A5DEA /* BTDropInUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F41B7A9E340083EC8D /* BTDropInUtil.m */; }; - 417404DE1BB0869C008A5DEA /* BTDropInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F61B7A9E340083EC8D /* BTDropInViewController.m */; }; - 417404DF1BB0869C008A5DEA /* BTPaymentButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F81B7A9E340083EC8D /* BTPaymentButton.m */; }; - 417404E11BB0869C008A5DEA /* BTUILocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345081B7A93D00083EC8D /* BTUILocalizedString.m */; }; - 417404E31BB0869C008A5DEA /* BTUICardExpirationValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345211B7A93D00083EC8D /* BTUICardExpirationValidator.m */; }; - 417404E51BB0869C008A5DEA /* BTUICardExpiryFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345231B7A93D00083EC8D /* BTUICardExpiryFormat.m */; }; - 417404E71BB0869C008A5DEA /* BTUICardType.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345251B7A93D00083EC8D /* BTUICardType.m */; }; - 417404E91BB0869C008A5DEA /* BTUIUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345271B7A93D00083EC8D /* BTUIUtil.m */; }; - 417404F81BB0869C008A5DEA /* BTUI.m in Sources */ = {isa = PBXBuildFile; fileRef = A773452B1B7A93D00083EC8D /* BTUI.m */; }; - 417404F91BB0869C008A5DEA /* UIColor+BTUI.m in Sources */ = {isa = PBXBuildFile; fileRef = A773452D1B7A93D00083EC8D /* UIColor+BTUI.m */; }; - 417404FB1BB0869C008A5DEA /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345381B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m */; }; - 417404FD1BB0869C008A5DEA /* BTUIHorizontalButtonStackSeparatorLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453A1B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m */; }; - 417404FF1BB0869C008A5DEA /* BTUIPaymentButtonCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453C1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m */; }; - 417405011BB0869C008A5DEA /* BTUIFloatLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453F1B7A93D00083EC8D /* BTUIFloatLabel.m */; }; - 417405031BB0869C008A5DEA /* BTUIFormField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345411B7A93D00083EC8D /* BTUIFormField.m */; }; - 417405061BB0869C008A5DEA /* BTUIScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345441B7A93D00083EC8D /* BTUIScrollView.m */; }; - 417405081BB0869C008A5DEA /* BTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345461B7A93D00083EC8D /* BTUITextField.m */; }; - 4174050A1BB0869C008A5DEA /* BTUIThemedView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345481B7A93D00083EC8D /* BTUIThemedView.m */; }; - 4174050C1BB0869C008A5DEA /* BTUIVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454A1B7A93D00083EC8D /* BTUIVectorArtView.m */; }; - 4174050E1BB0869C008A5DEA /* BTUICardCvvField.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454D1B7A93D00083EC8D /* BTUICardCvvField.m */; }; - 417405101BB0869C008A5DEA /* BTUICardExpiryField.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454F1B7A93D00083EC8D /* BTUICardExpiryField.m */; }; - 417405121BB0869D008A5DEA /* BTUICardNumberField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345511B7A93D00083EC8D /* BTUICardNumberField.m */; }; - 417405141BB0869D008A5DEA /* BTUICardPostalCodeField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345531B7A93D00083EC8D /* BTUICardPostalCodeField.m */; }; - 417405151BB0869D008A5DEA /* BTUICardFormView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345561B7A93D00083EC8D /* BTUICardFormView.m */; }; - 417405161BB0869D008A5DEA /* BTUICTAControl.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455D1B7A93D00083EC8D /* BTUICTAControl.m */; }; - 417405171BB0869D008A5DEA /* BTUICardHint.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345591B7A93D00083EC8D /* BTUICardHint.m */; }; - 417405181BB0869D008A5DEA /* BTUICoinbaseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455B1B7A93D00083EC8D /* BTUICoinbaseButton.m */; }; - 417405191BB0869D008A5DEA /* BTUIPayPalButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345611B7A93D00083EC8D /* BTUIPayPalButton.m */; }; - 4174051A1BB0869D008A5DEA /* BTUIPaymentMethodView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455F1B7A93D00083EC8D /* BTUIPaymentMethodView.m */; }; - 4174051B1BB0869D008A5DEA /* BTUISummaryView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345631B7A93D00083EC8D /* BTUISummaryView.m */; }; - 4174051C1BB0869D008A5DEA /* BTUIVenmoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345651B7A93D00083EC8D /* BTUIVenmoButton.m */; }; - 4174051E1BB0869D008A5DEA /* BTUIAmExVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345681B7A93D00083EC8D /* BTUIAmExVectorArtView.m */; }; - 417405201BB0869D008A5DEA /* BTUICVVBackVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345701B7A93D00083EC8D /* BTUICVVBackVectorArtView.m */; }; - 417405221BB0869D008A5DEA /* BTUICVVFrontVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345721B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m */; }; - 417405241BB0869D008A5DEA /* BTUICardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456A1B7A93D00083EC8D /* BTUICardVectorArtView.m */; }; - 417405261BB0869D008A5DEA /* BTUICoinbaseMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456C1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m */; }; - 417405281BB0869D008A5DEA /* BTUICoinbaseWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456E1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m */; }; - 4174052A1BB0869D008A5DEA /* BTUIDinersClubVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345741B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m */; }; - 4174052C1BB086B3008A5DEA /* BTUIDiscoverVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345761B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m */; }; - 4174052E1BB086B3008A5DEA /* BTUIJCBVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345781B7A93D00083EC8D /* BTUIJCBVectorArtView.m */; }; - 417405301BB086B3008A5DEA /* BTUIMaestroVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457A1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m */; }; - 417405321BB086B3008A5DEA /* BTUIMasterCardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457C1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m */; }; - 417405341BB086B3008A5DEA /* BTUIPayPalMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457E1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m */; }; - 417405361BB086B3008A5DEA /* BTUIPayPalWordmarkCompactVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345801B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m */; }; - 417405381BB086B3008A5DEA /* BTUIUnknownCardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345821B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m */; }; - 4174053A1BB086B3008A5DEA /* BTUIVenmoWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345841B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m */; }; - 4174053C1BB086B3008A5DEA /* BTUIVisaVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345861B7A93D00083EC8D /* BTUIVisaVectorArtView.m */; }; - 4174053E1BB086B3008A5DEA /* BTUIViewUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345351B7A93D00083EC8D /* BTUIViewUtil.m */; }; - 418456E81BE42F1600C32391 /* BTViewControllerPresentingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 418456E71BE42F0B00C32391 /* BTViewControllerPresentingDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 41913D9F1BB9D504004EF1BB /* BTUIPaymentOptionType.h in Headers */ = {isa = PBXBuildFile; fileRef = 41913D9D1BB9D503004EF1BB /* BTUIPaymentOptionType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 41913DA01BB9D504004EF1BB /* BTUIThemedView.h in Headers */ = {isa = PBXBuildFile; fileRef = 41913D9E1BB9D503004EF1BB /* BTUIThemedView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 41935DE61D528B25008D48FB /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 41B787BD1BAA20DB001AD351 /* BTDropInViewController_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B787BC1BAA20DB001AD351 /* BTDropInViewController_Tests.swift */; }; - 41BC340D1BF695FC00161106 /* BTPaymentRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F179FD1BE98E0E00E91646 /* BTPaymentRequest.m */; }; - 41D54D301C7F97750051C96B /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - 41D6E2A71B8D12CD00A3C2AE /* FakePayPalClasses.m in Sources */ = {isa = PBXBuildFile; fileRef = 41D6E2A61B8D12CD00A3C2AE /* FakePayPalClasses.m */; }; - 41F1D1FB1CAA005500DA34CB /* BTCardClient_UnionPayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41F1D1FA1CAA005500DA34CB /* BTCardClient_UnionPayTests.swift */; }; - 46E2F09F1CF47CF700A5789D /* BTUICardPhoneNumberField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4107EB221C88C75000F32D81 /* BTUICardPhoneNumberField.m */; }; - 46E2F0A01CF47D3300A5789D /* BTUIUnionPayVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A78422721C98920500D3EBFF /* BTUIUnionPayVectorArtView.m */; }; - 68178D54CF930DF9D5BC76FB /* libPods-Demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D9C499891AB1363F3E1290 /* libPods-Demo.a */; }; - 7EDE474E1CD2C3D00005E22B /* PPOTSimpleKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632A1C3DA73300048423 /* PPOTSimpleKeychain.m */; }; - 7EDE474F1CD2C3D00005E22B /* PPOTDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463201C3DA73300048423 /* PPOTDevice.m */; }; - 7EDE47501CD2C3D00005E22B /* PPOTString.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632C1C3DA73300048423 /* PPOTString.m */; }; - 7EDE47511CD2C3D00005E22B /* PPOTEncryptionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463221C3DA73300048423 /* PPOTEncryptionHelper.m */; }; - 7EDE47521CD2C3D00005E22B /* PPOTJSONHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463241C3DA73300048423 /* PPOTJSONHelper.m */; }; - 7EDE47531CD2C3D00005E22B /* PPOTURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463301C3DA73300048423 /* PPOTURLSession.m */; }; - 7EDE47541CD2C3D00005E22B /* PPOTPinnedCertificates.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463281C3DA73300048423 /* PPOTPinnedCertificates.m */; }; - 7EDE47561CD2C3D00005E22B /* PPOTMacros.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463261C3DA73300048423 /* PPOTMacros.m */; }; - 7EDE47571CD2C3D00005E22B /* PPOTTime.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632E1C3DA73300048423 /* PPOTTime.m */; }; - 7EDE47591CD2C3D00005E22B /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD281B43145D008857E1 /* SystemConfiguration.framework */; }; - 7EDE475A1CD2C3D00005E22B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3BC41C1B3F1500612D90 /* UIKit.framework */; }; - 7EDE475B1CD2C3D00005E22B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD261B431453008857E1 /* CoreLocation.framework */; }; - 7EDE475C1CD2C3D00005E22B /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD241B43144D008857E1 /* MessageUI.framework */; }; - 7EDE47721CD2C51C0005E22B /* PayPalUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; }; - 7EDE47731CD2C5270005E22B /* PayPalUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; }; - 841CDCC21BCDBC1500A06B21 /* BraintreeDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; }; - 842B68F11BCF083E0039634F /* BTAPIClient_SwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842B68F01BCF083E0039634F /* BTAPIClient_SwiftTests.swift */; }; - 844ED5E71BCC3F0B002B590C /* BTDataCollector_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844ED5E61BCC3F0B002B590C /* BTDataCollector_Tests.swift */; }; - 848470E21BE81893009B12AE /* BTFakeHTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = 848470E11BE81893009B12AE /* BTFakeHTTP.m */; }; - 8498EC1B1BB46D4B007FFDEC /* BTCardClient_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 8498EC1A1BB46D4B007FFDEC /* BTCardClient_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A50C3AF31C19F07B00612D90 /* PPOTCore.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A50C3AA01C19E6A200612D90 /* PPOTCore.h */; }; - A50C3AF41C19F07B00612D90 /* PPOTResult.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A50C3AA11C19E6A200612D90 /* PPOTResult.h */; }; - A50C3AF51C19F07B00612D90 /* PPOTRequest.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A50C3AA21C19E6A200612D90 /* PPOTRequest.h */; }; - A50C3AF61C19F07B00612D90 /* PPOTRequestFactory.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A50C3AA31C19E6A200612D90 /* PPOTRequestFactory.h */; }; - A50C3B111C19F6C200612D90 /* libPayPalDataCollector-StaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B051C19F55C00612D90 /* libPayPalDataCollector-StaticLibrary.a */; }; - A50C3B3A1C1A1CDD00612D90 /* PPOTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AD01C19E7F500612D90 /* PPOTConfiguration.m */; }; - A50C3B3B1C1A1CDD00612D90 /* PPOTAppSwitchResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B131C19F7FC00612D90 /* PPOTAppSwitchResponse.m */; }; - A50C3B3C1C1A1CDD00612D90 /* PPOTAppSwitchUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B151C19F7FC00612D90 /* PPOTAppSwitchUtil.m */; }; - A50C3B3D1C1A1CDD00612D90 /* PPOTCheckoutAppSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B171C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.m */; }; - A50C3B3E1C1A1CDD00612D90 /* PPOTCheckoutBrowserSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B191C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.m */; }; - A50C3B3F1C1A1CDD00612D90 /* PPOTCheckoutSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1B1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.m */; }; - A50C3B401C1A1CDD00612D90 /* PPOTError.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1D1C19F7FC00612D90 /* PPOTError.m */; }; - A50C3B411C1A1CDD00612D90 /* PPOTOAuth2AppSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1F1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.m */; }; - A50C3B421C1A1CDD00612D90 /* PPOTOAuth2BrowserSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B211C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.m */; }; - A50C3B431C1A1CDD00612D90 /* PPOTOAuth2SwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B231C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.m */; }; - A50C3B441C1A1CDD00612D90 /* PPOTPersistentRequestData.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B251C19F7FC00612D90 /* PPOTPersistentRequestData.m */; }; - A50C3B451C1A1CDD00612D90 /* PPOTSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B271C19F7FC00612D90 /* PPOTSwitchRequest.m */; }; - A50C3B461C1A1CDD00612D90 /* PPOTAuthorizationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABA1C19E6EE00612D90 /* PPOTAuthorizationRequest.m */; }; - A50C3B471C1A1CDD00612D90 /* PPOTBillingAgreementRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABB1C19E6EE00612D90 /* PPOTBillingAgreementRequest.m */; }; - A50C3B481C1A1CDD00612D90 /* PPOTCheckoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABD1C19E6EE00612D90 /* PPOTCheckoutRequest.m */; }; - A50C3B491C1A1CDD00612D90 /* PPOTCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABF1C19E6EE00612D90 /* PPOTCore.m */; }; - A50C3B4A1C1A1CDD00612D90 /* PPOTResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC11C19E6EE00612D90 /* PPOTResult.m */; }; - A50C3B4B1C1A1CDD00612D90 /* PPOTRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC41C19E6EE00612D90 /* PPOTRequestFactory.m */; }; - A50C3B4C1C1A1CFC00612D90 /* PPOTRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC31C19E6EE00612D90 /* PPOTRequest.m */; }; - A50C3B571C1A1CFC00612D90 /* PPOTAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A981C19E65700612D90 /* PPOTAnalyticsTracker.m */; }; - A50C3B581C1A1D1A00612D90 /* PPFPTIData.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A931C19E65700612D90 /* PPFPTIData.m */; }; - A50C3B591C1A1D1A00612D90 /* PPFPTITracker.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A951C19E65700612D90 /* PPFPTITracker.m */; }; - A50C3B771C1A2A3E00612D90 /* PPOTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AD01C19E7F500612D90 /* PPOTConfiguration.m */; }; - A50C3B781C1A2A3E00612D90 /* PPOTAppSwitchResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B131C19F7FC00612D90 /* PPOTAppSwitchResponse.m */; }; - A50C3B791C1A2A3E00612D90 /* PPOTAppSwitchUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B151C19F7FC00612D90 /* PPOTAppSwitchUtil.m */; }; - A50C3B7A1C1A2A3E00612D90 /* PPOTCheckoutAppSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B171C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.m */; }; - A50C3B7B1C1A2A3E00612D90 /* PPOTCheckoutBrowserSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B191C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.m */; }; - A50C3B7C1C1A2A3E00612D90 /* PPOTCheckoutSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1B1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.m */; }; - A50C3B7D1C1A2A3E00612D90 /* PPOTError.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1D1C19F7FC00612D90 /* PPOTError.m */; }; - A50C3B7E1C1A2A3E00612D90 /* PPOTOAuth2AppSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B1F1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.m */; }; - A50C3B7F1C1A2A3E00612D90 /* PPOTOAuth2BrowserSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B211C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.m */; }; - A50C3B801C1A2A3E00612D90 /* PPOTOAuth2SwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B231C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.m */; }; - A50C3B811C1A2A3E00612D90 /* PPOTPersistentRequestData.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B251C19F7FC00612D90 /* PPOTPersistentRequestData.m */; }; - A50C3B821C1A2A3E00612D90 /* PPOTSwitchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3B271C19F7FC00612D90 /* PPOTSwitchRequest.m */; }; - A50C3B831C1A2A3E00612D90 /* PPOTAuthorizationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABA1C19E6EE00612D90 /* PPOTAuthorizationRequest.m */; }; - A50C3B841C1A2A3E00612D90 /* PPOTBillingAgreementRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABB1C19E6EE00612D90 /* PPOTBillingAgreementRequest.m */; }; - A50C3B851C1A2A3E00612D90 /* PPOTCheckoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABD1C19E6EE00612D90 /* PPOTCheckoutRequest.m */; }; - A50C3B861C1A2A3E00612D90 /* PPOTCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3ABF1C19E6EE00612D90 /* PPOTCore.m */; }; - A50C3B871C1A2A3E00612D90 /* PPOTResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC11C19E6EE00612D90 /* PPOTResult.m */; }; - A50C3B881C1A2A3E00612D90 /* PPOTRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC31C19E6EE00612D90 /* PPOTRequest.m */; }; - A50C3B931C1A2A3E00612D90 /* PPFPTIData.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A931C19E65700612D90 /* PPFPTIData.m */; }; - A50C3B941C1A2A3E00612D90 /* PPFPTITracker.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A951C19E65700612D90 /* PPFPTITracker.m */; }; - A50C3B951C1A2A3E00612D90 /* PPOTAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3A981C19E65700612D90 /* PPOTAnalyticsTracker.m */; }; - A50C3B961C1A2AB000612D90 /* PPOTRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A50C3AC41C19E6EE00612D90 /* PPOTRequestFactory.m */; }; - A50C3B981C1A2AD700612D90 /* PPOTCore.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AA01C19E6A200612D90 /* PPOTCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A50C3B991C1A2AD700612D90 /* PPOTResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AA11C19E6A200612D90 /* PPOTResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A50C3B9A1C1A2AD700612D90 /* PPOTRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AA21C19E6A200612D90 /* PPOTRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A50C3B9B1C1A2AD700612D90 /* PPOTRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AA31C19E6A200612D90 /* PPOTRequestFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A50C3BCF1C1B453500612D90 /* PayPalOneTouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; }; - A51527331D9C3DC600FF3F77 /* KDataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = A51527321D9C3DC600FF3F77 /* KDataCollector.h */; }; - A51527381D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A51527371D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.m */; }; - A5CEBBB11D8890A20064FD29 /* BTConfiguration+DataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = B61F677F1CE4C20F0051A3BD /* BTConfiguration+DataCollector.m */; }; - A5D3A5761C20975F003A25A1 /* PPFPTIDataTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5D3A56E1C20975F003A25A1 /* PPFPTIDataTest.m */; }; - A5D3A5771C20975F003A25A1 /* PPFPTITrackerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5D3A56F1C20975F003A25A1 /* PPFPTITrackerTest.m */; }; - A5D3A5A41C20BEE1003A25A1 /* PayPalOneTouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; }; - A5F444AE1E89906700B2B4F7 /* BTPayPalCreditFinancing.h in Headers */ = {isa = PBXBuildFile; fileRef = A5F444AD1E89903E00B2B4F7 /* BTPayPalCreditFinancing.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A5FE18311E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m in Sources */ = {isa = PBXBuildFile; fileRef = A5FE18301E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m */; }; - A5FE18331E79A05D00CBE9C7 /* BTPayPalCreditFinancing.m in Sources */ = {isa = PBXBuildFile; fileRef = A5FE18301E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m */; }; - A5FE18351E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m in Sources */ = {isa = PBXBuildFile; fileRef = A5FE18341E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m */; }; - A5FE18361E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m in Sources */ = {isa = PBXBuildFile; fileRef = A5FE18341E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m */; }; - A5FE183D1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A5FE183C1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.m */; }; - A70241B91C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A70241B71C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.h */; }; - A70241BA1C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A70241B81C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m */; }; - A70241BD1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A70241BB1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.h */; }; - A70241BE1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A70241BC1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m */; }; - A71559421B729297007DE6F0 /* BTIntegrationTestsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A71559411B729297007DE6F0 /* BTIntegrationTestsHelper.m */; }; - A71559481B72B085007DE6F0 /* BraintreeApplePay_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A71559471B72B085007DE6F0 /* BraintreeApplePay_IntegrationTests.m */; }; - A71754301BDEF1EC00002676 /* BTURLUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = A717542F1BDEF1EC00002676 /* BTURLUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A71F7DE41B616BA0005DA1B0 /* BTVenmoAppSwitchReturnURLSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A71F7DDF1B616BA0005DA1B0 /* BTVenmoAppSwitchReturnURLSpec.m */; }; - A71F7DE51B616BA0005DA1B0 /* BTVenmoAppSwitchURLSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A71F7DE01B616BA0005DA1B0 /* BTVenmoAppSwitchURLSpec.m */; }; - A71F7DE71B6180A3005DA1B0 /* BTVenmoDriver_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71F7DE61B6180A3005DA1B0 /* BTVenmoDriver_Tests.swift */; }; - A726BFE21B56D5E900B5C8F0 /* BTAnalyticsMetadataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A726BFE11B56D5E900B5C8F0 /* BTAnalyticsMetadataSpec.m */; }; - A73012831BEBE0C50074C118 /* BTPaymentButton_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A73012821BEBE0C50074C118 /* BTPaymentButton_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A73088361B86872C009487BA /* BraintreeDemoThreeDSecureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19D71B79708900452CFA /* BraintreeDemoThreeDSecureViewController.m */; }; - A7334F251BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A7334F241BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.m */; }; - A734A98E1B8797FD00D2461B /* BTClientTokenSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A734A98D1B8797FD00D2461B /* BTClientTokenSpec.m */; }; - A734A9911B87989400D2461B /* BTTestClientTokenFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = A734A9901B87989400D2461B /* BTTestClientTokenFactory.m */; }; - A743CD211B449D8400757C9B /* BTAPIClient_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A743CD201B449D8400757C9B /* BTAPIClient_Tests.m */; }; - A74BCF031BE14C7000DC1CAE /* BTThreeDSecureDriver_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74BCF021BE14C7000DC1CAE /* BTThreeDSecureDriver_Tests.swift */; }; - A74BEE3F1C58005300DDAB52 /* BTAnalyticsService.m in Sources */ = {isa = PBXBuildFile; fileRef = A74BF1C41C57F25F0049E149 /* BTAnalyticsService.m */; }; - A74BF1C51C57F25F0049E149 /* BTAnalyticsService.h in Headers */ = {isa = PBXBuildFile; fileRef = A74BF1C31C57F25F0049E149 /* BTAnalyticsService.h */; }; - A74BF1C61C57F25F0049E149 /* BTAnalyticsService.m in Sources */ = {isa = PBXBuildFile; fileRef = A74BF1C41C57F25F0049E149 /* BTAnalyticsService.m */; }; - A74BF1C81C57FBED0049E149 /* BTAnalyticsService_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A74BF1C71C57FBED0049E149 /* BTAnalyticsService_Tests.m */; }; - A75147E11B4217A00005BBBA /* BTCardClient_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75147E01B4217A00005BBBA /* BTCardClient_Tests.swift */; }; - A751CAAC1CAC464C008603E5 /* BTCardRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A751CAAA1CAC464C008603E5 /* BTCardRequest.m */; }; - A751CAAD1CAC464C008603E5 /* BTCardRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A751CAAA1CAC464C008603E5 /* BTCardRequest.m */; }; - A751CAAF1CAC4667008603E5 /* BTCardRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A751CAAE1CAC4667008603E5 /* BTCardRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A76B1A0B1B79708A00452CFA /* Braintree-Demo.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = A76B19A31B79708900452CFA /* Braintree-Demo.entitlements */; }; - A76B1A0C1B79708A00452CFA /* BraintreeDemoBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19A71B79708900452CFA /* BraintreeDemoBaseViewController.m */; }; - A76B1A0F1B79708A00452CFA /* BraintreeDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19AD1B79708900452CFA /* BraintreeDemoAppDelegate.m */; }; - A76B1A101B79708A00452CFA /* BraintreeDemoDemoContainmentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19AF1B79708900452CFA /* BraintreeDemoDemoContainmentViewController.m */; }; - A76B1A111B79708A00452CFA /* BraintreeDemoIntegrationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19B11B79708900452CFA /* BraintreeDemoIntegrationViewController.m */; }; - A76B1A121B79708A00452CFA /* BraintreeDemoSlideNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19B31B79708900452CFA /* BraintreeDemoSlideNavigationController.m */; }; - A76B1A131B79708A00452CFA /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A76B19B51B79708900452CFA /* Launch Screen.storyboard */; }; - A76B1A141B79708A00452CFA /* BraintreeDemoSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19B81B79708900452CFA /* BraintreeDemoSettings.m */; }; - A76B1A151B79708A00452CFA /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A76B19B91B79708900452CFA /* Settings.bundle */; }; - A76B1A1E1B79708A00452CFA /* BraintreeDemoCardTokenizationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A76B19D41B79708900452CFA /* BraintreeDemoCardTokenizationViewController.xib */; }; - A76B1A291B79708A00452CFA /* BraintreeDemoCreditCardEntryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A76B19F21B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.xib */; }; - A76B1A2C1B79708A00452CFA /* UI.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A76B19F71B79708900452CFA /* UI.storyboard */; }; - A76B1A2F1B79708A00452CFA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A76B19FE1B79708A00452CFA /* Images.xcassets */; }; - A76B1A301B79708A00452CFA /* BraintreeDemoMerchantAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B1A011B79708A00452CFA /* BraintreeDemoMerchantAPI.m */; }; - A76B1A331B79708A00452CFA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A76B1A061B79708A00452CFA /* InfoPlist.strings */; }; - A76B1A341B79708A00452CFA /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = A76B1A081B79708A00452CFA /* Main.strings */; }; - A76B1A351B79708A00452CFA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B1A0A1B79708A00452CFA /* main.m */; }; - A76B99191C3EF48600A584F6 /* PPDataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4635F1C3DBEFE00048423 /* PPDataCollector.m */; }; - A76B991A1C3EF48E00A584F6 /* libPPRiskComponent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3AFB1C19F52C00612D90 /* libPPRiskComponent.a */; }; - A76B991B1C3EF49600A584F6 /* PPRCClientMetadataIDProvider.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A50C3AFC1C19F52C00612D90 /* PPRCClientMetadataIDProvider.h */; }; - A76B991C1C3EF4A000A584F6 /* PayPalDataCollector.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A7B463631C3DBF5E00048423 /* PayPalDataCollector.h */; }; - A76B991D1C3EF4A400A584F6 /* PPDataCollector.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A7B463641C3DBF5E00048423 /* PPDataCollector.h */; }; - A76B99301C3EF8DB00A584F6 /* PPOTDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463201C3DA73300048423 /* PPOTDevice.m */; }; - A76B99311C3EF8DC00A584F6 /* PPOTDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463201C3DA73300048423 /* PPOTDevice.m */; }; - A76B99321C3EF8DF00A584F6 /* PPOTEncryptionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463221C3DA73300048423 /* PPOTEncryptionHelper.m */; }; - A76B99331C3EF8E000A584F6 /* PPOTEncryptionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463221C3DA73300048423 /* PPOTEncryptionHelper.m */; }; - A76B99341C3EF8E300A584F6 /* PPOTJSONHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463241C3DA73300048423 /* PPOTJSONHelper.m */; }; - A76B99351C3EF8E400A584F6 /* PPOTJSONHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463241C3DA73300048423 /* PPOTJSONHelper.m */; }; - A76B99361C3EF8E800A584F6 /* PPOTMacros.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463261C3DA73300048423 /* PPOTMacros.m */; }; - A76B99371C3EF8E900A584F6 /* PPOTMacros.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463261C3DA73300048423 /* PPOTMacros.m */; }; - A76B99381C3EF8EF00A584F6 /* PPOTPinnedCertificates.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463281C3DA73300048423 /* PPOTPinnedCertificates.m */; }; - A76B99391C3EF8EF00A584F6 /* PPOTSimpleKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632A1C3DA73300048423 /* PPOTSimpleKeychain.m */; }; - A76B993A1C3EF8EF00A584F6 /* PPOTString.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632C1C3DA73300048423 /* PPOTString.m */; }; - A76B993B1C3EF8EF00A584F6 /* PPOTTime.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632E1C3DA73300048423 /* PPOTTime.m */; }; - A76B993C1C3EF8EF00A584F6 /* PPOTURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463301C3DA73300048423 /* PPOTURLSession.m */; }; - A76B993D1C3EF8F000A584F6 /* PPOTPinnedCertificates.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463281C3DA73300048423 /* PPOTPinnedCertificates.m */; }; - A76B993E1C3EF8F000A584F6 /* PPOTSimpleKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632A1C3DA73300048423 /* PPOTSimpleKeychain.m */; }; - A76B993F1C3EF8F000A584F6 /* PPOTString.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632C1C3DA73300048423 /* PPOTString.m */; }; - A76B99401C3EF8F000A584F6 /* PPOTTime.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4632E1C3DA73300048423 /* PPOTTime.m */; }; - A76B99411C3EF8F000A584F6 /* PPOTURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B463301C3DA73300048423 /* PPOTURLSession.m */; }; - A76B99421C3F00AC00A584F6 /* PPDefaultConfigurationJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3ACE1C19E7F500612D90 /* PPDefaultConfigurationJSON.h */; }; - A76B99431C3F00AC00A584F6 /* PPFPTIData.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3A921C19E65700612D90 /* PPFPTIData.h */; }; - A76B99441C3F00AC00A584F6 /* PPFPTITracker.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3A941C19E65700612D90 /* PPFPTITracker.h */; }; - A76B99451C3F00AC00A584F6 /* PPOTAnalyticsDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3A961C19E65700612D90 /* PPOTAnalyticsDefines.h */; }; - A76B99461C3F00AC00A584F6 /* PPOTAnalyticsTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3A971C19E65700612D90 /* PPOTAnalyticsTracker.h */; }; - A76D7C201BB1CBD50000FA6A /* BraintreeDataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = A76D7C1E1BB1CBD50000FA6A /* BraintreeDataCollector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A76D7C211BB1CBD50000FA6A /* BTDataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = A76D7C1F1BB1CBD50000FA6A /* BTDataCollector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A76D7C231BB1CBDC0000FA6A /* BTDataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = A76D7C221BB1CBDC0000FA6A /* BTDataCollector.m */; }; - A76D7C2A1BB1D31A0000FA6A /* libDeviceCollectorLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C271BB1D31A0000FA6A /* libDeviceCollectorLibrary.a */; }; - A76D7C2F1BB217EE0000FA6A /* BraintreeDemoBTDataCollectorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19DD1B79708900452CFA /* BraintreeDemoBTDataCollectorViewController.m */; }; - A76D7C341BB21CE90000FA6A /* BraintreeDataCollector_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A76D7C331BB21CE90000FA6A /* BraintreeDataCollector_IntegrationTests.m */; }; - A76D7C391BB318CF0000FA6A /* BraintreeDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; }; - A76D7C3A1BB31A2B0000FA6A /* BTDataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = A76D7C221BB1CBDC0000FA6A /* BTDataCollector.m */; }; - A76D7C3B1BB31A4B0000FA6A /* libDeviceCollectorLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C271BB1D31A0000FA6A /* libDeviceCollectorLibrary.a */; }; - A77120521CD95DD50004FFD3 /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - A77344FA1B7A93A10083EC8D /* BraintreeUI.h in Headers */ = {isa = PBXBuildFile; fileRef = A77344F91B7A93A10083EC8D /* BraintreeUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345891B7A93D00083EC8D /* BTUILocalizedString.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345071B7A93D00083EC8D /* BTUILocalizedString.h */; }; - A773458A1B7A93D00083EC8D /* BTUILocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345081B7A93D00083EC8D /* BTUILocalizedString.m */; }; - A773458B1B7A93D00083EC8D /* UI.strings in Resources */ = {isa = PBXBuildFile; fileRef = A77345091B7A93D00083EC8D /* UI.strings */; }; - A773458C1B7A93D00083EC8D /* BTUICardExpirationValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345201B7A93D00083EC8D /* BTUICardExpirationValidator.h */; }; - A773458D1B7A93D00083EC8D /* BTUICardExpirationValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345211B7A93D00083EC8D /* BTUICardExpirationValidator.m */; }; - A773458E1B7A93D00083EC8D /* BTUICardExpiryFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345221B7A93D00083EC8D /* BTUICardExpiryFormat.h */; }; - A773458F1B7A93D00083EC8D /* BTUICardExpiryFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345231B7A93D00083EC8D /* BTUICardExpiryFormat.m */; }; - A77345901B7A93D00083EC8D /* BTUICardType.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345241B7A93D00083EC8D /* BTUICardType.h */; }; - A77345911B7A93D00083EC8D /* BTUICardType.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345251B7A93D00083EC8D /* BTUICardType.m */; }; - A77345921B7A93D00083EC8D /* BTUIUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345261B7A93D00083EC8D /* BTUIUtil.h */; }; - A77345931B7A93D00083EC8D /* BTUIUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345271B7A93D00083EC8D /* BTUIUtil.m */; }; - A77345951B7A93D00083EC8D /* BTUI.h in Headers */ = {isa = PBXBuildFile; fileRef = A773452A1B7A93D00083EC8D /* BTUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345961B7A93D00083EC8D /* BTUI.m in Sources */ = {isa = PBXBuildFile; fileRef = A773452B1B7A93D00083EC8D /* BTUI.m */; }; - A77345971B7A93D00083EC8D /* UIColor+BTUI.h in Headers */ = {isa = PBXBuildFile; fileRef = A773452C1B7A93D00083EC8D /* UIColor+BTUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345981B7A93D00083EC8D /* UIColor+BTUI.m in Sources */ = {isa = PBXBuildFile; fileRef = A773452D1B7A93D00083EC8D /* UIColor+BTUI.m */; }; - A77345991B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345301B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.h */; }; - A773459A1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345311B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.m */; }; - A773459B1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345321B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.h */; }; - A773459C1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345331B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.m */; }; - A773459D1B7A93D00083EC8D /* BTUIViewUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345341B7A93D00083EC8D /* BTUIViewUtil.h */; }; - A773459E1B7A93D00083EC8D /* BTUIViewUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345351B7A93D00083EC8D /* BTUIViewUtil.m */; }; - A773459F1B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345371B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.h */; }; - A77345A01B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345381B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m */; }; - A77345A11B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345391B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.h */; }; - A77345A21B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453A1B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m */; }; - A77345A31B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = A773453B1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.h */; }; - A77345A41B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453C1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m */; }; - A77345A51B7A93D00083EC8D /* BTUIFloatLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = A773453E1B7A93D00083EC8D /* BTUIFloatLabel.h */; }; - A77345A61B7A93D00083EC8D /* BTUIFloatLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = A773453F1B7A93D00083EC8D /* BTUIFloatLabel.m */; }; - A77345A71B7A93D00083EC8D /* BTUIFormField.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345401B7A93D00083EC8D /* BTUIFormField.h */; }; - A77345A81B7A93D00083EC8D /* BTUIFormField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345411B7A93D00083EC8D /* BTUIFormField.m */; }; - A77345A91B7A93D00083EC8D /* BTUIFormField_Protected.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345421B7A93D00083EC8D /* BTUIFormField_Protected.h */; }; - A77345AA1B7A93D00083EC8D /* BTUIScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345431B7A93D00083EC8D /* BTUIScrollView.h */; }; - A77345AB1B7A93D00083EC8D /* BTUIScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345441B7A93D00083EC8D /* BTUIScrollView.m */; }; - A77345AC1B7A93D00083EC8D /* BTUITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345451B7A93D00083EC8D /* BTUITextField.h */; }; - A77345AD1B7A93D00083EC8D /* BTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345461B7A93D00083EC8D /* BTUITextField.m */; }; - A77345AF1B7A93D00083EC8D /* BTUIThemedView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345481B7A93D00083EC8D /* BTUIThemedView.m */; }; - A77345B01B7A93D00083EC8D /* BTUIVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345491B7A93D00083EC8D /* BTUIVectorArtView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345B11B7A93D00083EC8D /* BTUIVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454A1B7A93D00083EC8D /* BTUIVectorArtView.m */; }; - A77345B21B7A93D00083EC8D /* BTUICardCvvField.h in Headers */ = {isa = PBXBuildFile; fileRef = A773454C1B7A93D00083EC8D /* BTUICardCvvField.h */; }; - A77345B31B7A93D00083EC8D /* BTUICardCvvField.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454D1B7A93D00083EC8D /* BTUICardCvvField.m */; }; - A77345B41B7A93D00083EC8D /* BTUICardExpiryField.h in Headers */ = {isa = PBXBuildFile; fileRef = A773454E1B7A93D00083EC8D /* BTUICardExpiryField.h */; }; - A77345B51B7A93D00083EC8D /* BTUICardExpiryField.m in Sources */ = {isa = PBXBuildFile; fileRef = A773454F1B7A93D00083EC8D /* BTUICardExpiryField.m */; }; - A77345B61B7A93D00083EC8D /* BTUICardNumberField.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345501B7A93D00083EC8D /* BTUICardNumberField.h */; }; - A77345B71B7A93D00083EC8D /* BTUICardNumberField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345511B7A93D00083EC8D /* BTUICardNumberField.m */; }; - A77345B81B7A93D00083EC8D /* BTUICardPostalCodeField.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345521B7A93D00083EC8D /* BTUICardPostalCodeField.h */; }; - A77345B91B7A93D00083EC8D /* BTUICardPostalCodeField.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345531B7A93D00083EC8D /* BTUICardPostalCodeField.m */; }; - A77345BA1B7A93D00083EC8D /* BTUICardFormView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345551B7A93D00083EC8D /* BTUICardFormView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345BB1B7A93D00083EC8D /* BTUICardFormView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345561B7A93D00083EC8D /* BTUICardFormView.m */; }; - A77345BC1B7A93D00083EC8D /* BTUICardHint.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345581B7A93D00083EC8D /* BTUICardHint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345BD1B7A93D00083EC8D /* BTUICardHint.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345591B7A93D00083EC8D /* BTUICardHint.m */; }; - A77345BE1B7A93D00083EC8D /* BTUICoinbaseButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A773455A1B7A93D00083EC8D /* BTUICoinbaseButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345BF1B7A93D00083EC8D /* BTUICoinbaseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455B1B7A93D00083EC8D /* BTUICoinbaseButton.m */; }; - A77345C01B7A93D00083EC8D /* BTUICTAControl.h in Headers */ = {isa = PBXBuildFile; fileRef = A773455C1B7A93D00083EC8D /* BTUICTAControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345C11B7A93D00083EC8D /* BTUICTAControl.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455D1B7A93D00083EC8D /* BTUICTAControl.m */; }; - A77345C21B7A93D00083EC8D /* BTUIPaymentMethodView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773455E1B7A93D00083EC8D /* BTUIPaymentMethodView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345C31B7A93D00083EC8D /* BTUIPaymentMethodView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773455F1B7A93D00083EC8D /* BTUIPaymentMethodView.m */; }; - A77345C41B7A93D00083EC8D /* BTUIPayPalButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345601B7A93D00083EC8D /* BTUIPayPalButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345C51B7A93D00083EC8D /* BTUIPayPalButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345611B7A93D00083EC8D /* BTUIPayPalButton.m */; }; - A77345C61B7A93D00083EC8D /* BTUISummaryView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345621B7A93D00083EC8D /* BTUISummaryView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345C71B7A93D00083EC8D /* BTUISummaryView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345631B7A93D00083EC8D /* BTUISummaryView.m */; }; - A77345C81B7A93D00083EC8D /* BTUIVenmoButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345641B7A93D00083EC8D /* BTUIVenmoButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77345C91B7A93D00083EC8D /* BTUIVenmoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345651B7A93D00083EC8D /* BTUIVenmoButton.m */; }; - A77345CA1B7A93D00083EC8D /* BTUIAmExVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345671B7A93D00083EC8D /* BTUIAmExVectorArtView.h */; }; - A77345CB1B7A93D00083EC8D /* BTUIAmExVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345681B7A93D00083EC8D /* BTUIAmExVectorArtView.m */; }; - A77345CC1B7A93D00083EC8D /* BTUICardVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345691B7A93D00083EC8D /* BTUICardVectorArtView.h */; }; - A77345CD1B7A93D00083EC8D /* BTUICardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456A1B7A93D00083EC8D /* BTUICardVectorArtView.m */; }; - A77345CE1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773456B1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.h */; }; - A77345CF1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456C1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m */; }; - A77345D01B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773456D1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.h */; }; - A77345D11B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773456E1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m */; }; - A77345D21B7A93D00083EC8D /* BTUICVVBackVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773456F1B7A93D00083EC8D /* BTUICVVBackVectorArtView.h */; }; - A77345D31B7A93D00083EC8D /* BTUICVVBackVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345701B7A93D00083EC8D /* BTUICVVBackVectorArtView.m */; }; - A77345D41B7A93D00083EC8D /* BTUICVVFrontVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345711B7A93D00083EC8D /* BTUICVVFrontVectorArtView.h */; }; - A77345D51B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345721B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m */; }; - A77345D61B7A93D00083EC8D /* BTUIDinersClubVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345731B7A93D00083EC8D /* BTUIDinersClubVectorArtView.h */; }; - A77345D71B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345741B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m */; }; - A77345D81B7A93D00083EC8D /* BTUIDiscoverVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345751B7A93D00083EC8D /* BTUIDiscoverVectorArtView.h */; }; - A77345D91B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345761B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m */; }; - A77345DA1B7A93D00083EC8D /* BTUIJCBVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345771B7A93D00083EC8D /* BTUIJCBVectorArtView.h */; }; - A77345DB1B7A93D00083EC8D /* BTUIJCBVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345781B7A93D00083EC8D /* BTUIJCBVectorArtView.m */; }; - A77345DC1B7A93D00083EC8D /* BTUIMaestroVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345791B7A93D00083EC8D /* BTUIMaestroVectorArtView.h */; }; - A77345DD1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457A1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m */; }; - A77345DE1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773457B1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.h */; }; - A77345DF1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457C1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m */; }; - A77345E01B7A93D00083EC8D /* BTUIPayPalMonogramCardView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773457D1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.h */; }; - A77345E11B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = A773457E1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m */; }; - A77345E21B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A773457F1B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.h */; }; - A77345E31B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345801B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m */; }; - A77345E41B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345811B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.h */; }; - A77345E51B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345821B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m */; }; - A77345E61B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345831B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.h */; }; - A77345E71B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345841B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m */; }; - A77345E81B7A93D00083EC8D /* BTUIVisaVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345851B7A93D00083EC8D /* BTUIVisaVectorArtView.h */; }; - A77345E91B7A93D00083EC8D /* BTUIVisaVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345861B7A93D00083EC8D /* BTUIVisaVectorArtView.m */; }; - A77346121B7A9E340083EC8D /* BTDropInContentView.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345EB1B7A9E340083EC8D /* BTDropInContentView.h */; }; - A77346131B7A9E340083EC8D /* BTDropInContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345EC1B7A9E340083EC8D /* BTDropInContentView.m */; }; - A77346141B7A9E340083EC8D /* BTDropInErrorAlert.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345ED1B7A9E340083EC8D /* BTDropInErrorAlert.h */; }; - A77346151B7A9E340083EC8D /* BTDropInErrorAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345EE1B7A9E340083EC8D /* BTDropInErrorAlert.m */; }; - A77346161B7A9E340083EC8D /* BTDropInErrorState.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345EF1B7A9E340083EC8D /* BTDropInErrorState.h */; }; - A77346171B7A9E340083EC8D /* BTDropInErrorState.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F01B7A9E340083EC8D /* BTDropInErrorState.m */; }; - A77346181B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345F11B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.h */; }; - A77346191B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F21B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m */; }; - A773461A1B7A9E340083EC8D /* BTDropInUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345F31B7A9E340083EC8D /* BTDropInUtil.h */; }; - A773461B1B7A9E340083EC8D /* BTDropInUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F41B7A9E340083EC8D /* BTDropInUtil.m */; }; - A773461C1B7A9E340083EC8D /* BTDropInViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345F51B7A9E340083EC8D /* BTDropInViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A773461D1B7A9E340083EC8D /* BTDropInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F61B7A9E340083EC8D /* BTDropInViewController.m */; }; - A773461E1B7A9E340083EC8D /* BTPaymentButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345F71B7A9E340083EC8D /* BTPaymentButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A773461F1B7A9E340083EC8D /* BTPaymentButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345F81B7A9E340083EC8D /* BTPaymentButton.m */; }; - A77346201B7A9E340083EC8D /* BTDropInLocalizedString.h in Headers */ = {isa = PBXBuildFile; fileRef = A77345FA1B7A9E340083EC8D /* BTDropInLocalizedString.h */; }; - A77346211B7A9E340083EC8D /* BTDropInLocalizedString.m in Sources */ = {isa = PBXBuildFile; fileRef = A77345FB1B7A9E340083EC8D /* BTDropInLocalizedString.m */; }; - A77346221B7A9E340083EC8D /* Drop-In.strings in Resources */ = {isa = PBXBuildFile; fileRef = A77345FC1B7A9E340083EC8D /* Drop-In.strings */; }; - A77346241B7AA4D50083EC8D /* BTErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = A77346231B7AA4D50083EC8D /* BTErrors.m */; }; - A77346261B7AA4F10083EC8D /* BTErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = A77346251B7AA4F10083EC8D /* BTErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77346301B7BB1A70083EC8D /* BTTokenizationService.h in Headers */ = {isa = PBXBuildFile; fileRef = A773462E1B7BB1A60083EC8D /* BTTokenizationService.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77346311B7BB1A70083EC8D /* BTTokenizationService.m in Sources */ = {isa = PBXBuildFile; fileRef = A773462F1B7BB1A70083EC8D /* BTTokenizationService.m */; }; - A77426581CA20793003CACBA /* BTCardCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A77426561CA20793003CACBA /* BTCardCapabilities.m */; }; - A774265A1CA207AE003CACBA /* BTCardCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = A77426591CA207AE003CACBA /* BTCardCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A774265B1CA207D2003CACBA /* BTCardCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A77426561CA20793003CACBA /* BTCardCapabilities.m */; }; - A77524611CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A77524601CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.m */; }; - A77AA2A61B618CFB00217B73 /* BTVenmoAppSwitchRequestURL.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F96D0A1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.h */; }; - A77AA2A71B618CFB00217B73 /* BTVenmoAppSwitchRequestURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D0B1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.m */; }; - A77AA2A81B618CFB00217B73 /* BTVenmoAppSwitchReturnURL.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F96D0C1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.h */; }; - A77AA2A91B618CFB00217B73 /* BTVenmoAppSwitchReturnURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D0D1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.m */; }; - A77AA2AA1B618CFB00217B73 /* BraintreeVenmo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889F11B5F0B30007A0E9C /* BraintreeVenmo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77AA2AB1B618CFB00217B73 /* BTVenmoDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889FA1B5F0C00007A0E9C /* BTVenmoDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77AA2AC1B618CFB00217B73 /* BTVenmoDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889FB1B5F0C00007A0E9C /* BTVenmoDriver.m */; }; - A77AA2AD1B618CFB00217B73 /* BTVenmoAccountNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F96D061B6043B7005A4A09 /* BTVenmoAccountNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A77AA2AE1B618CFB00217B73 /* BTVenmoAccountNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F96D071B6043B7005A4A09 /* BTVenmoAccountNonce.m */; }; - A77AA2B31B618D6200217B73 /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - A77AA2B41B618D6200217B73 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - A77AA2B61B61936A00217B73 /* BTVenmoDriver_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A77AA2B51B61936A00217B73 /* BTVenmoDriver_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A78422731C98920500D3EBFF /* BTUIUnionPayVectorArtView.h in Headers */ = {isa = PBXBuildFile; fileRef = A78422711C98920500D3EBFF /* BTUIUnionPayVectorArtView.h */; }; - A78422741C98920500D3EBFF /* BTUIUnionPayVectorArtView.m in Sources */ = {isa = PBXBuildFile; fileRef = A78422721C98920500D3EBFF /* BTUIUnionPayVectorArtView.m */; }; - A784965A1BD962260081531A /* BTCheckoutRequest_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A78496591BD962260081531A /* BTCheckoutRequest_Tests.swift */; }; - A78BF95D1CC6F32100DED8AA /* BraintreeUnionPay_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A78BF95C1CC6F32100DED8AA /* BraintreeUnionPay_IntegrationTests.m */; }; - A79033981B45C968004C8234 /* BTCard_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79033971B45C968004C8234 /* BTCard_Tests.swift */; }; - A790339C1B45E16E004C8234 /* BTCard_Internal_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A790339B1B45E16E004C8234 /* BTCard_Internal_Tests.m */; }; - A79AF9F31B56DB54007B1DF1 /* BTClientMetadataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A79AF9F21B56DB54007B1DF1 /* BTClientMetadataSpec.m */; }; - A79BB5BF1CE501D500CC6F0E /* PPDataCollector_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A79BB5BE1CE501D500CC6F0E /* PPDataCollector_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A79C9C701BE17BC7007EAF73 /* BTThreeDSecureDriver_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A79C9C6F1BE17BBF007EAF73 /* BTThreeDSecureDriver_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7A094F61B8276E500D732CC /* BTCardNonce_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A094F51B8276E500D732CC /* BTCardNonce_Tests.swift */; }; - A7A094F81B828F4600D732CC /* BraintreeDemoBTUIPayPalButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19E01B79708900452CFA /* BraintreeDemoBTUIPayPalButtonViewController.m */; }; - A7A094FA1B82919300D732CC /* BraintreeDemoPaymentButtonBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19A91B79708900452CFA /* BraintreeDemoPaymentButtonBaseViewController.m */; }; - A7A094FB1B8295E000D732CC /* BraintreeDemoCustomPayPalButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19E61B79708900452CFA /* BraintreeDemoCustomPayPalButtonViewController.m */; }; - A7A094FC1B82983300D732CC /* BraintreeDemoPayPalScopesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19EC1B79708900452CFA /* BraintreeDemoPayPalScopesViewController.m */; }; - A7A094FD1B829ACC00D732CC /* BraintreeDemoPayPalOneTimePaymentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19E31B79708900452CFA /* BraintreeDemoPayPalOneTimePaymentViewController.m */; }; - A7A094FF1B839CC900D732CC /* BraintreeDemoApplePayPassKitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19C41B79708900452CFA /* BraintreeDemoApplePayPassKitViewController.m */; }; - A7A6DD071B4308EB008857E1 /* BTPayPalDriver_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A6DD061B4308EB008857E1 /* BTPayPalDriver_Tests.swift */; }; - A7A9C6D01B83C6D600F5EBBA /* BraintreeDemoBTUIVenmoButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19FA1B79708900452CFA /* BraintreeDemoBTUIVenmoButtonViewController.m */; }; - A7A9C6D51B83C98000F5EBBA /* BraintreeDemoCustomVenmoButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19FD1B79708A00452CFA /* BraintreeDemoCustomVenmoButtonViewController.m */; }; - A7A9C6D61B83CC6F00F5EBBA /* BraintreeDemoCardTokenizationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19D31B79708900452CFA /* BraintreeDemoCardTokenizationViewController.m */; }; - A7ABD6791B702FF000A1223C /* BTAPIClient_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7ABD65E1B702FF000A1223C /* BTAPIClient_IntegrationTests.m */; }; - A7ABD67C1B702FF000A1223C /* BTHTTPSSLPinning_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7ABD6611B702FF000A1223C /* BTHTTPSSLPinning_IntegrationTests.m */; }; - A7ABD67E1B702FF000A1223C /* good_root_cert.der in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6631B702FF000A1223C /* good_root_cert.der */; }; - A7ABD67F1B702FF000A1223C /* evil_root_cert.der in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6651B702FF000A1223C /* evil_root_cert.der */; }; - A7ABD6801B702FF000A1223C /* evil_root_cert.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6661B702FF000A1223C /* evil_root_cert.pem */; }; - A7ABD6811B702FF000A1223C /* evil_root_key.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6671B702FF000A1223C /* evil_root_key.pem */; }; - A7ABD6821B702FF000A1223C /* evil_site_cert.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6681B702FF000A1223C /* evil_site_cert.pem */; }; - A7ABD6831B702FF000A1223C /* evil_site_key.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6691B702FF000A1223C /* evil_site_key.pem */; }; - A7ABD6841B702FF000A1223C /* evil_site_request.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66A1B702FF000A1223C /* evil_site_request.pem */; }; - A7ABD6851B702FF000A1223C /* good_root_cert.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66B1B702FF000A1223C /* good_root_cert.pem */; }; - A7ABD6861B702FF000A1223C /* good_root_key.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66C1B702FF000A1223C /* good_root_key.pem */; }; - A7ABD6871B702FF000A1223C /* good_site_cert.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66D1B702FF000A1223C /* good_site_cert.pem */; }; - A7ABD6881B702FF000A1223C /* good_site_key.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66E1B702FF000A1223C /* good_site_key.pem */; }; - A7ABD6891B702FF000A1223C /* good_site_request.pem in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD66F1B702FF000A1223C /* good_site_request.pem */; }; - A7ABD68A1B702FF000A1223C /* https_server.rb in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6701B702FF000A1223C /* https_server.rb */; }; - A7ABD68B1B702FF000A1223C /* make_certs.sh in Resources */ = {isa = PBXBuildFile; fileRef = A7ABD6711B702FF000A1223C /* make_certs.sh */; }; - A7ABD68E1B702FF000A1223C /* BraintreeCard_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7ABD6771B702FF000A1223C /* BraintreeCard_IntegrationTests.m */; }; - A7AF0F601C20E80A00B3ADC6 /* BTThreeDSecureLookupResult_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AF0F5F1C20E80A00B3ADC6 /* BTThreeDSecureLookupResult_Tests.swift */; }; - A7AF0F621C222F9400B3ADC6 /* BTPaymentButton_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AF0F611C222F9400B3ADC6 /* BTPaymentButton_Tests.swift */; }; - A7B1C1431B66B3D000ED063C /* BTConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B1C1411B66B3D000ED063C /* BTConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B1C1441B66B3D000ED063C /* BTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1421B66B3D000ED063C /* BTConfiguration.m */; }; - A7B1C1471B66D94600ED063C /* BTConfiguration+Venmo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B1C1451B66D94600ED063C /* BTConfiguration+Venmo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B1C1481B66D94600ED063C /* BTConfiguration+Venmo.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1461B66D94600ED063C /* BTConfiguration+Venmo.m */; }; - A7B1C14B1B66E11C00ED063C /* BTConfiguration+PayPal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B1C1491B66E11C00ED063C /* BTConfiguration+PayPal.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B1C14C1B66E11C00ED063C /* BTConfiguration+PayPal.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C14A1B66E11C00ED063C /* BTConfiguration+PayPal.m */; }; - A7B1C14F1B66E46900ED063C /* BTConfiguration+ApplePay.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B1C14D1B66E46900ED063C /* BTConfiguration+ApplePay.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B1C1501B66E46900ED063C /* BTConfiguration+ApplePay.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C14E1B66E46900ED063C /* BTConfiguration+ApplePay.m */; }; - A7B1C1531B66F79900ED063C /* BTAppSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B1C1511B66F79900ED063C /* BTAppSwitch.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B1C1541B66F79900ED063C /* BTAppSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1C1521B66F79900ED063C /* BTAppSwitch.m */; }; - A7B4624A1C3C911200048423 /* PPOTAppSwitchResponseTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462441C3C911200048423 /* PPOTAppSwitchResponseTest.m */; }; - A7B4624D1C3C911200048423 /* PPOTAppSwitchUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462451C3C911200048423 /* PPOTAppSwitchUtilTest.m */; }; - A7B462501C3C911200048423 /* PPOTConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462461C3C911200048423 /* PPOTConfigurationTest.m */; }; - A7B462531C3C911200048423 /* PPOTEncryptionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462471C3C911200048423 /* PPOTEncryptionTest.m */; }; - A7B462561C3C911200048423 /* PPOTErrorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462481C3C911200048423 /* PPOTErrorTest.m */; }; - A7B462591C3C911200048423 /* PPOTTimeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B462491C3C911200048423 /* PPOTTimeTest.m */; }; - A7B4625C1C3C93EB00048423 /* libPayPalOneTouch-StaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3AD51C19F00600612D90 /* libPayPalOneTouch-StaticLibrary.a */; }; - A7B4625D1C3C93EB00048423 /* libPayPalDataCollector-StaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3B051C19F55C00612D90 /* libPayPalDataCollector-StaticLibrary.a */; }; - A7B462641C3C967400048423 /* PPOTConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3ACF1C19E7F500612D90 /* PPOTConfiguration.h */; }; - A7B462651C3C967400048423 /* PPOTAppSwitchResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B121C19F7FC00612D90 /* PPOTAppSwitchResponse.h */; }; - A7B462661C3C967400048423 /* PPOTAppSwitchUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B141C19F7FC00612D90 /* PPOTAppSwitchUtil.h */; }; - A7B462671C3C967400048423 /* PPOTAuthorizationRequest_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AB91C19E6EE00612D90 /* PPOTAuthorizationRequest_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7B462681C3C967400048423 /* PPOTCheckoutAppSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B161C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.h */; }; - A7B462691C3C967400048423 /* PPOTCheckoutBrowserSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B181C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.h */; }; - A7B4626A1C3C967400048423 /* PPOTCheckoutRequest_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3ABC1C19E6EE00612D90 /* PPOTCheckoutRequest_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7B4626B1C3C967400048423 /* PPOTCheckoutSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B1A1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.h */; }; - A7B4626C1C3C967400048423 /* PPOTCore_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3ABE1C19E6EE00612D90 /* PPOTCore_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7B4626D1C3C967400048423 /* PPOTResult_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AC01C19E6EE00612D90 /* PPOTResult_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7B4626E1C3C967400048423 /* PPOTError.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B1C1C19F7FC00612D90 /* PPOTError.h */; }; - A7B4626F1C3C967400048423 /* PPOTOAuth2AppSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B1E1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.h */; }; - A7B462701C3C967400048423 /* PPOTOAuth2BrowserSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B201C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.h */; }; - A7B462711C3C967400048423 /* PPOTOAuth2SwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B221C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.h */; }; - A7B462721C3C967400048423 /* PPOTPersistentRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B241C19F7FC00612D90 /* PPOTPersistentRequestData.h */; }; - A7B462731C3C967400048423 /* PPOTRequest_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AC21C19E6EE00612D90 /* PPOTRequest_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7B462741C3C967400048423 /* PPOTSwitchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3B261C19F7FC00612D90 /* PPOTSwitchRequest.h */; }; - A7B462EE1C3D9C2200048423 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD281B43145D008857E1 /* SystemConfiguration.framework */; }; - A7B462EF1C3D9C2200048423 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3BC41C1B3F1500612D90 /* UIKit.framework */; }; - A7B462F01C3D9C2200048423 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD261B431453008857E1 /* CoreLocation.framework */; }; - A7B462F11C3D9C2200048423 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7A6DD241B43144D008857E1 /* MessageUI.framework */; }; - A7B462F21C3D9C2200048423 /* libPPRiskComponent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A50C3AFB1C19F52C00612D90 /* libPPRiskComponent.a */; }; - A7B462FB1C3D9C2200048423 /* PPRCClientMetadataIDProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A50C3AFC1C19F52C00612D90 /* PPRCClientMetadataIDProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B463071C3D9F4D00048423 /* PayPalDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */; }; - A7B463601C3DBEFE00048423 /* PPDataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B4635F1C3DBEFE00048423 /* PPDataCollector.m */; }; - A7B463651C3DBF5E00048423 /* PayPalDataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B463631C3DBF5E00048423 /* PayPalDataCollector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B463661C3DBF5E00048423 /* PPDataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B463641C3DBF5E00048423 /* PPDataCollector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B4638B1C3DCEAD00048423 /* PayPalOneTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4638A1C3DCEAD00048423 /* PayPalOneTouch.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7B4AD571B4EFC76002FB23E /* MockAPIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4AD561B4EFC76002FB23E /* MockAPIClient.swift */; }; - A7B7989C1C233C57001327FA /* BTConfiguration_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B7989B1C233C57001327FA /* BTConfiguration_Tests.swift */; }; - A7B798A01C238FC0001327FA /* BTTokenizationService_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B7989F1C238FC0001327FA /* BTTokenizationService_Tests.swift */; }; - A7B861BF1C24B19300A2422E /* BTVersion_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B861BE1C24B19300A2422E /* BTVersion_Tests.swift */; }; - A7BC50BB1C29E4CD0024C870 /* BTLogger_Internal_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7BC50BA1C29E4CD0024C870 /* BTLogger_Internal_Tests.m */; }; - A7BC50BF1C29F6600024C870 /* BTDropInErrorState_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7BC50BE1C29F6600024C870 /* BTDropInErrorState_Tests.m */; }; - A7C823081B4DA9D7009D45D6 /* BTHTTPSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C823071B4DA9D7009D45D6 /* BTHTTPSpec.m */; }; - A7C8230E1B4DAAB2009D45D6 /* BTSpecHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8230D1B4DAAB2009D45D6 /* BTSpecHelper.m */; }; - A7C889801B5EF62C007A0E9C /* BTApplePayClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C8897C1B5EF62C007A0E9C /* BTApplePayClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889811B5EF62C007A0E9C /* BTApplePayClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8897D1B5EF62C007A0E9C /* BTApplePayClient.m */; }; - A7C889821B5EF62C007A0E9C /* BTApplePayCardNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C8897E1B5EF62C007A0E9C /* BTApplePayCardNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889831B5EF62C007A0E9C /* BTApplePayCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8897F1B5EF62C007A0E9C /* BTApplePayCardNonce.m */; }; - A7C889871B5EF65C007A0E9C /* BraintreeApplePay.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889861B5EF65C007A0E9C /* BraintreeApplePay.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889881B5EF685007A0E9C /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - A7C8898A1B5EF737007A0E9C /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889891B5EF737007A0E9C /* PassKit.framework */; }; - A7C889A31B5F0471007A0E9C /* BTCardClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C8899C1B5F0471007A0E9C /* BTCardClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889A41B5F0471007A0E9C /* BTCardClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C8899D1B5F0471007A0E9C /* BTCardClient.m */; }; - A7C889A51B5F0471007A0E9C /* BTCard_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C8899E1B5F0471007A0E9C /* BTCard_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7C889A61B5F0471007A0E9C /* BTCard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C8899F1B5F0471007A0E9C /* BTCard.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889A71B5F0471007A0E9C /* BTCard.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889A01B5F0471007A0E9C /* BTCard.m */; }; - A7C889A81B5F0471007A0E9C /* BTCardNonce.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889A11B5F0471007A0E9C /* BTCardNonce.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889A91B5F0471007A0E9C /* BTCardNonce.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C889A21B5F0471007A0E9C /* BTCardNonce.m */; }; - A7C889AA1B5F04AE007A0E9C /* BraintreeCard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889921B5F043B007A0E9C /* BraintreeCard.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7C889AB1B5F04E9007A0E9C /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; }; - A7C889D81B5F0ACB007A0E9C /* BTCardNonce_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889D71B5F0ACB007A0E9C /* BTCardNonce_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7C889F91B5F0B6A007A0E9C /* Braintree-Version.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C889F81B5F0B6A007A0E9C /* Braintree-Version.h */; }; - A7C88A2F1B5F10EF007A0E9C /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; }; - A7CB42D31B73E629002CCFDD /* BraintreePayPal_IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7CB42D21B73E629002CCFDD /* BraintreePayPal_IntegrationTests.m */; }; - A7CCE2AE1B67F26C006EA661 /* BTAppSwitch_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CCE2AD1B67F26C006EA661 /* BTAppSwitch_Tests.swift */; }; - A7D4630D1B4B16C100A09C46 /* BTHTTPTestProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D4630C1B4B16C100A09C46 /* BTHTTPTestProtocol.m */; }; - A7D64ABC1B4C93B6005168EF /* BTApplePay_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D64ABB1B4C93B6005168EF /* BTApplePay_Tests.swift */; }; - A7D674681B83E5A100ED6C00 /* BraintreeDemoBTPaymentButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19CD1B79708900452CFA /* BraintreeDemoBTPaymentButtonViewController.m */; }; - A7D674691B83E7F000ED6C00 /* BraintreeDemoCustomMultiPayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A76B19D01B79708900452CFA /* BraintreeDemoCustomMultiPayViewController.m */; }; - A7D6746D1B84073300ED6C00 /* MockDelegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D6746C1B84073300ED6C00 /* MockDelegates.swift */; }; - A7D674731B84FDB400ED6C00 /* BTClientToken.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D674711B84FDB400ED6C00 /* BTClientToken.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7D674741B84FDB400ED6C00 /* BTClientToken.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D674721B84FDB400ED6C00 /* BTClientToken.m */; }; - A7E93E581B601EE900957223 /* BTURLUtils_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E93E571B601EE900957223 /* BTURLUtils_Tests.swift */; }; - A7ECA5E51BEBD34100437A4F /* BTDropInViewController_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7ECA5E41BEBD34100437A4F /* BTDropInViewController_Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A7F179FE1BE98E0E00E91646 /* BTPaymentRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F179FD1BE98E0E00E91646 /* BTPaymentRequest.m */; }; - A7F17A001BE98E1E00E91646 /* BTPaymentRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F179FF1BE98E1E00E91646 /* BTPaymentRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B61F67801CE4C20F0051A3BD /* BTConfiguration+DataCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = B61F677E1CE4C20F0051A3BD /* BTConfiguration+DataCollector.h */; }; - B61F67811CE4C20F0051A3BD /* BTConfiguration+DataCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = B61F677F1CE4C20F0051A3BD /* BTConfiguration+DataCollector.m */; }; - B67F983A1D762177007C1903 /* BTMacroTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B67F98391D762177007C1903 /* BTMacroTests.m */; }; - EEF1DE891E858A8D001BB924 /* BTEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = EEF1DE881E858A31001BB924 /* BTEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FD51728B52E751D1E5DC85F7 /* libPods-Tests-IntegrationTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D242087B7E38C2B838C8866E /* libPods-Tests-IntegrationTests.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 03CFEF3C1CD31242006D2DA5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7EDE474C1CD2C3D00005E22B; - remoteInfo = PayPalUtils; - }; - 03EF62081DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 03EF620C1DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D371B59C76A0016EFB4; - remoteInfo = BraintreePayPal; - }; - 03EF62101DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D871B5D9E8C0016EFB4; - remoteInfo = Braintree3DSecure; - }; - 03EF62141DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C889731B5EF5DE007A0E9C; - remoteInfo = BraintreeApplePay; - }; - 03EF62181DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - 03EF621C1DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77AA29B1B618C7700217B73; - remoteInfo = BraintreeVenmo; - }; - 03EF62201DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77344F61B7A93A10083EC8D; - remoteInfo = BraintreeUI; - }; - 03EF62241DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76D7BFF1BB1CAB00000FA6A; - remoteInfo = BraintreeDataCollector; - }; - 03EF62281DB4A90C004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B6E1C1A29C500612D90; - remoteInfo = PayPalOneTouch; - }; - 03EF622C1DB4A90D004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7B462E01C3D9C2200048423; - remoteInfo = PayPalDataCollector; - }; - 03EF62301DB4A90D004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7EDE474C1CD2C3D00005E22B; - remoteInfo = PayPalUtils; - }; - 03EF62341DB4A90D004F4090 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4164B9951C9B658E006AE861; - remoteInfo = BraintreeUnionPay; - }; - 2D941D591B5D5F140016EFB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 2D941D621B5D6C850016EFB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D371B59C76A0016EFB4; - remoteInfo = BraintreePayPal; - }; - 2D941D661B5D6C940016EFB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 2D941DA11B5D9F470016EFB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D871B5D9E8C0016EFB4; - remoteInfo = Braintree3DSecure; - }; - 2D941DA41B5D9F790016EFB4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 4164B9971C9B658E006AE861 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 4164B9B21C9B68D2006AE861 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - 4169A8EF1CAB10600051DDAF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4164B9951C9B658E006AE861; - remoteInfo = BraintreeUnionPay; - }; - 4169A8F21CAB11110051DDAF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77344F61B7A93A10083EC8D; - remoteInfo = BraintreeUI; - }; - 4169A8F41CAB11110051DDAF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4164B9951C9B658E006AE861; - remoteInfo = BraintreeUnionPay; - }; - 4169A8F61CAB11280051DDAF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B6E1C1A29C500612D90; - remoteInfo = PayPalOneTouch; - }; - 41935DE71D528B2C008D48FB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 41BC343A1BF69D3700161106 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76B198A1B79707700452CFA; - remoteInfo = Demo; - }; - 41D54D2E1C7F97680051C96B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - 41E3B35B1BA386DE0081824E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77344F61B7A93A10083EC8D; - remoteInfo = BraintreeUI; - }; - 7EDE47741CD2C5520005E22B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7EDE474C1CD2C3D00005E22B; - remoteInfo = PayPalUtils; - }; - 7EDE477A1CD2C5D00005E22B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7EDE474C1CD2C3D00005E22B; - remoteInfo = PayPalUtils; - }; - 841CDCC31BCDBC6100A06B21 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76D7BFF1BB1CAB00000FA6A; - remoteInfo = BraintreeDataCollector; - }; - A50C3BB31C1A322800612D90 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B041C19F55C00612D90; - remoteInfo = "PayPalRisk-StaticLibrary"; - }; - A50C3BD01C1B454100612D90 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B6E1C1A29C500612D90; - remoteInfo = PayPalOneTouch; - }; - A5D3A5A01C20BEDC003A25A1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B6E1C1A29C500612D90; - remoteInfo = PayPalOneTouch; - }; - A70FADC11C03BE7A002752C9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C889731B5EF5DE007A0E9C; - remoteInfo = BraintreeApplePay; - }; - A71559551B72C2A7007DE6F0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D871B5D9E8C0016EFB4; - remoteInfo = Braintree3DSecure; - }; - A715595D1B72C2A7007DE6F0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D371B59C76A0016EFB4; - remoteInfo = BraintreePayPal; - }; - A715595F1B72C2A7007DE6F0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77AA29B1B618C7700217B73; - remoteInfo = BraintreeVenmo; - }; - A75319F11B715C4200E27B89 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - A75538381B8BC9C600054F82 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76B198A1B79707700452CFA; - remoteInfo = "Braintree-Demo"; - }; - A76D7C351BB318BF0000FA6A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76D7BFF1BB1CAB00000FA6A; - remoteInfo = BraintreeDataCollector; - }; - A77120501CD95DCE0004FFD3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - A77AA2A41B618CB300217B73 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A77AA29B1B618C7700217B73; - remoteInfo = BraintreeVenmo; - }; - A77AA2AF1B618D5000217B73 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - A77AA2B11B618D5000217B73 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - A7ABD68F1B70304200A1223C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - A7B4623D1C3C742900048423 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A76B198A1B79707700452CFA; - remoteInfo = Demo; - }; - A7B4625E1C3C941D00048423 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3AD41C19F00600612D90; - remoteInfo = "PayPalOneTouch-StaticLibrary"; - }; - A7B462601C3C941D00048423 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A50C3B041C19F55C00612D90; - remoteInfo = "PayPalRisk-StaticLibrary"; - }; - A7B463081C3D9FEE00048423 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7B462E01C3D9C2200048423; - remoteInfo = PayPalDataCollector; - }; - A7B4630B1C3DA21200048423 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - A7C88A271B5F109B007A0E9C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C889731B5EF5DE007A0E9C; - remoteInfo = BraintreeApplePay; - }; - A7C88A291B5F109B007A0E9C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7C8898F1B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - A7F5701D1C1611AA0007D018 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - A7F5701F1C1611B20007D018 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - A7F570211C1611CA0007D018 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2DE12F081B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 413533751BF6C7290005D1BA /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 03EF620F1DB4A90C004F4090 /* Braintree3DSecure.framework in Embed Frameworks */, - 03EF622B1DB4A90D004F4090 /* PayPalDataCollector.framework in Embed Frameworks */, - 03EF621B1DB4A90C004F4090 /* BraintreeVenmo.framework in Embed Frameworks */, - 03EF62231DB4A90C004F4090 /* BraintreeDataCollector.framework in Embed Frameworks */, - 03EF62171DB4A90C004F4090 /* BraintreeCard.framework in Embed Frameworks */, - 03EF621F1DB4A90C004F4090 /* BraintreeUI.framework in Embed Frameworks */, - 03EF62271DB4A90C004F4090 /* PayPalOneTouch.framework in Embed Frameworks */, - 03EF620B1DB4A90C004F4090 /* BraintreePayPal.framework in Embed Frameworks */, - 03EF62071DB4A90C004F4090 /* BraintreeCore.framework in Embed Frameworks */, - 03EF622F1DB4A90D004F4090 /* PayPalUtils.framework in Embed Frameworks */, - 03EF62331DB4A90D004F4090 /* BraintreeUnionPay.framework in Embed Frameworks */, - 03EF62131DB4A90C004F4090 /* BraintreeApplePay.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3AD31C19F00600612D90 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - A50C3AF31C19F07B00612D90 /* PPOTCore.h in CopyFiles */, - A50C3AF41C19F07B00612D90 /* PPOTResult.h in CopyFiles */, - A50C3AF51C19F07B00612D90 /* PPOTRequest.h in CopyFiles */, - A50C3AF61C19F07B00612D90 /* PPOTRequestFactory.h in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B031C19F55C00612D90 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - A76B991C1C3EF4A000A584F6 /* PayPalDataCollector.h in CopyFiles */, - A76B991D1C3EF4A400A584F6 /* PPDataCollector.h in CopyFiles */, - A76B991B1C3EF49600A584F6 /* PPRCClientMetadataIDProvider.h in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 031B94BB1C34822800F136C8 /* BTUI_UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUI_UIColor.m; sourceTree = ""; }; - 031B94BC1C34822800F136C8 /* BTUICardExpirationValidatorSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardExpirationValidatorSpec.m; sourceTree = ""; }; - 031B94BD1C34822800F136C8 /* BTUICardExpiryFormatterSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardExpiryFormatterSpec.m; sourceTree = ""; }; - 031B94BF1C34822800F136C8 /* BTUICardTypeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardTypeSpec.m; sourceTree = ""; }; - 031B94C01C34822800F136C8 /* BTUISpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUISpec.m; sourceTree = ""; }; - 031B94C21C34822800F136C8 /* EXPMatchers+haveKerning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+haveKerning.h"; sourceTree = ""; }; - 031B94C31C34822800F136C8 /* EXPMatchers+haveKerning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "EXPMatchers+haveKerning.m"; sourceTree = ""; }; - 0325AC231C289B5F00E90999 /* BraintreeThreeDSecure_UITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BraintreeThreeDSecure_UITests.swift; sourceTree = ""; }; - 032C26871DDEEB5000BBC1C2 /* BTDropInUtil_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTDropInUtil_Tests.swift; sourceTree = ""; }; - 032D3A711C580B09000E5F6B /* PPDataCollectorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPDataCollectorTest.m; sourceTree = ""; }; - 0338000F1C248B9C00CFF1D9 /* BraintreeDropInLegacy_UITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BraintreeDropInLegacy_UITests.swift; sourceTree = ""; }; - 035945551BE96345002116BB /* BTUIVenmoMonogramCardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIVenmoMonogramCardView.h; sourceTree = ""; }; - 035945561BE96345002116BB /* BTUIVenmoMonogramCardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIVenmoMonogramCardView.m; sourceTree = ""; }; - 0384E94C1C23BAFF001A3380 /* BraintreePayPal_UITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BraintreePayPal_UITests.swift; sourceTree = ""; }; - 0384E94E1C23C108001A3380 /* BTUITest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BTUITest.swift; path = Helpers/BTUITest.swift; sourceTree = ""; }; - 03B368B11CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoDropInLegacyViewController.h; sourceTree = ""; }; - 03B368B21CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoDropInLegacyViewController.m; sourceTree = ""; }; - 03CFEF241CD304B0006D2DA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 03CFEF261CD30B15006D2DA5 /* PPOTDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTDevice.h; sourceTree = ""; }; - 03CFEF271CD30B15006D2DA5 /* PPOTEncryptionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTEncryptionHelper.h; sourceTree = ""; }; - 03CFEF281CD30B15006D2DA5 /* PPOTJSONHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTJSONHelper.h; sourceTree = ""; }; - 03CFEF291CD30B15006D2DA5 /* PPOTMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTMacros.h; sourceTree = ""; }; - 03CFEF2A1CD30B15006D2DA5 /* PPOTPinnedCertificates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTPinnedCertificates.h; sourceTree = ""; }; - 03CFEF2B1CD30B15006D2DA5 /* PPOTSimpleKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTSimpleKeychain.h; sourceTree = ""; }; - 03CFEF2C1CD30B15006D2DA5 /* PPOTString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTString.h; sourceTree = ""; }; - 03CFEF2D1CD30B15006D2DA5 /* PPOTTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTTime.h; sourceTree = ""; }; - 03CFEF2E1CD30B15006D2DA5 /* PPOTURLSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTURLSession.h; sourceTree = ""; }; - 03CFEF2F1CD30B15006D2DA5 /* PPOTVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPOTVersion.h; sourceTree = ""; }; - 03CFEF3A1CD30C28006D2DA5 /* PayPalUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayPalUtils.h; sourceTree = ""; }; - 03D294FE1BE835C8004F90DA /* BTVenmoAccountNonce_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTVenmoAccountNonce_Internal.h; sourceTree = ""; }; - 03F54E101C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPayPalForceFuturePaymentViewController.h; sourceTree = ""; }; - 03F54E111C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoPayPalForceFuturePaymentViewController.m; sourceTree = ""; }; - 03F8B2661C23976000FD184B /* UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 03F8B26A1C23976100FD184B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0CF0BA897F9E79A01D6A2C66 /* Pods-Tests-IntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-IntegrationTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-IntegrationTests/Pods-Tests-IntegrationTests.release.xcconfig"; sourceTree = ""; }; - 10A1F947EB4DC18E4744F5FE /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = ""; }; - 162174E1192D9220008DC35D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 16C42B681B3DDFE00028A3B4 /* BTAPIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTAPIClient.h; sourceTree = ""; }; - 16C42B691B3DDFE00028A3B4 /* BTAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BTAPIClient.m; sourceTree = ""; }; - 16C42B6C1B3DE0550028A3B4 /* BTPayPalDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalDriver.h; sourceTree = ""; }; - 16C42B6D1B3DE0550028A3B4 /* BTPayPalDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalDriver.m; sourceTree = ""; }; - 16CD2E9C1B4077FB00E68495 /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 16CD2E9E1B4077FC00E68495 /* BTJSON_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTJSON_Tests.swift; sourceTree = ""; }; - 16CD2EA01B4077FC00E68495 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 16E17D061B3DE3B40024F9AB /* BTPaymentMethodNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPaymentMethodNonce.h; sourceTree = ""; }; - 16E17D1A1B3DE4570024F9AB /* BTPayPalAccountNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalAccountNonce.h; sourceTree = ""; }; - 16E17D1B1B3DE4580024F9AB /* BTPayPalAccountNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalAccountNonce.m; sourceTree = ""; }; - 16E17D261B3DFA0F0024F9AB /* BTPayPalRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalRequest.h; sourceTree = ""; }; - 16E17D271B3DFA0F0024F9AB /* BTPayPalRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalRequest.m; sourceTree = ""; }; - 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreePayPal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2D941D3A1B59C76A0016EFB4 /* BraintreePayPal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BraintreePayPal.h; sourceTree = ""; }; - 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Braintree3DSecure.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2D941D8A1B5D9E8C0016EFB4 /* Braintree3DSecure.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Braintree3DSecure.h; sourceTree = ""; }; - 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DE12F0B1B59BE0100EA1BCF /* BraintreeCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BraintreeCore.h; sourceTree = ""; }; - 2DE12F0D1B59BE0100EA1BCF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4107EB211C88C75000F32D81 /* BTUICardPhoneNumberField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardPhoneNumberField.h; sourceTree = ""; }; - 4107EB221C88C75000F32D81 /* BTUICardPhoneNumberField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardPhoneNumberField.m; sourceTree = ""; }; - 41211EF61BA0E45300DB1705 /* BTPaymentMethodNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPaymentMethodNonce.m; sourceTree = ""; }; - 41211EF91BA0E47400DB1705 /* BTPaymentMethodNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTPaymentMethodNonce.h; sourceTree = ""; }; - 412FE0561B9799EE008AAABE /* BTApplePayClient_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTApplePayClient_Internal.h; sourceTree = ""; }; - 413CDF4E1C779ED400B89FCA /* BTDataCollector_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDataCollector_Internal.h; sourceTree = ""; }; - 41472F921CB6D52200AFA75C /* BTConfiguration+UnionPay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BTConfiguration+UnionPay.m"; sourceTree = ""; }; - 41472F961CB6D53400AFA75C /* BTConfiguration+UnionPay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTConfiguration+UnionPay.h"; sourceTree = ""; }; - 4149C91C1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonceParser_Tests.swift; sourceTree = ""; }; - 415924B01BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPaymentMethodNonceParser.m; sourceTree = ""; }; - 415924B31BA0F2D800C095F6 /* BTPaymentMethodNonceParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTPaymentMethodNonceParser.h; sourceTree = ""; }; - 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeUnionPay.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4164B9AF1C9B6690006AE861 /* BraintreeUnionPay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeUnionPay.h; sourceTree = ""; }; - 4164B9B81C9B6988006AE861 /* BTCardClient+UnionPay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTCardClient+UnionPay.h"; sourceTree = ""; }; - 4164B9B91C9B6988006AE861 /* BTCardClient+UnionPay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BTCardClient+UnionPay.m"; sourceTree = ""; }; - 417404491BB084D3008A5DEA /* libBraintree.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBraintree.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 417453BE1BCEF9CB00F33B65 /* libPods-Demo-CocoaPods.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-Demo-CocoaPods.a"; path = "Pods/../build/Debug-iphoneos/libPods-Demo-CocoaPods.a"; sourceTree = ""; }; - 418456E71BE42F0B00C32391 /* BTViewControllerPresentingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTViewControllerPresentingDelegate.h; sourceTree = ""; }; - 41913D9D1BB9D503004EF1BB /* BTUIPaymentOptionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPaymentOptionType.h; sourceTree = ""; }; - 41913D9E1BB9D503004EF1BB /* BTUIThemedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIThemedView.h; sourceTree = ""; }; - 41B787BC1BAA20DB001AD351 /* BTDropInViewController_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTDropInViewController_Tests.swift; sourceTree = ""; }; - 41D6E2A51B8D12CD00A3C2AE /* FakePayPalClasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FakePayPalClasses.h; sourceTree = ""; }; - 41D6E2A61B8D12CD00A3C2AE /* FakePayPalClasses.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FakePayPalClasses.m; sourceTree = ""; }; - 41F1D1FA1CAA005500DA34CB /* BTCardClient_UnionPayTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTCardClient_UnionPayTests.swift; sourceTree = ""; }; - 4621B720EE8A9B65FFFE3632 /* Pods-Tests-UnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-UnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-UnitTests/Pods-Tests-UnitTests.release.xcconfig"; sourceTree = ""; }; - 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PayPalUtils.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 842B68F01BCF083E0039634F /* BTAPIClient_SwiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTAPIClient_SwiftTests.swift; sourceTree = ""; }; - 844ED5E61BCC3F0B002B590C /* BTDataCollector_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTDataCollector_Tests.swift; sourceTree = ""; }; - 848470E01BE816DF009B12AE /* BTFakeHTTP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTFakeHTTP.h; sourceTree = ""; }; - 848470E11BE81893009B12AE /* BTFakeHTTP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTFakeHTTP.m; sourceTree = ""; }; - 8498EC1A1BB46D4B007FFDEC /* BTCardClient_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardClient_Internal.h; sourceTree = ""; }; - A3D9C499891AB1363F3E1290 /* libPods-Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A50C3A921C19E65700612D90 /* PPFPTIData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPFPTIData.h; path = BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.h; sourceTree = ""; }; - A50C3A931C19E65700612D90 /* PPFPTIData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPFPTIData.m; path = BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.m; sourceTree = ""; }; - A50C3A941C19E65700612D90 /* PPFPTITracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPFPTITracker.h; path = BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.h; sourceTree = ""; }; - A50C3A951C19E65700612D90 /* PPFPTITracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPFPTITracker.m; path = BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.m; sourceTree = ""; }; - A50C3A961C19E65700612D90 /* PPOTAnalyticsDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTAnalyticsDefines.h; path = BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsDefines.h; sourceTree = ""; }; - A50C3A971C19E65700612D90 /* PPOTAnalyticsTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTAnalyticsTracker.h; path = BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.h; sourceTree = ""; }; - A50C3A981C19E65700612D90 /* PPOTAnalyticsTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTAnalyticsTracker.m; path = BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.m; sourceTree = ""; }; - A50C3AA01C19E6A200612D90 /* PPOTCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTCore.h; path = BraintreePayPal/PayPalOneTouch/Public/PPOTCore.h; sourceTree = ""; }; - A50C3AA11C19E6A200612D90 /* PPOTResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTResult.h; path = BraintreePayPal/PayPalOneTouch/Public/PPOTResult.h; sourceTree = ""; }; - A50C3AA21C19E6A200612D90 /* PPOTRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTRequest.h; path = BraintreePayPal/PayPalOneTouch/Public/PPOTRequest.h; sourceTree = ""; }; - A50C3AA31C19E6A200612D90 /* PPOTRequestFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTRequestFactory.h; path = BraintreePayPal/PayPalOneTouch/Public/PPOTRequestFactory.h; sourceTree = ""; }; - A50C3AB91C19E6EE00612D90 /* PPOTAuthorizationRequest_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTAuthorizationRequest_Internal.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest_Internal.h; sourceTree = ""; }; - A50C3ABA1C19E6EE00612D90 /* PPOTAuthorizationRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTAuthorizationRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest.m; sourceTree = ""; }; - A50C3ABB1C19E6EE00612D90 /* PPOTBillingAgreementRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTBillingAgreementRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTBillingAgreementRequest.m; sourceTree = ""; }; - A50C3ABC1C19E6EE00612D90 /* PPOTCheckoutRequest_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTCheckoutRequest_Internal.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest_Internal.h; sourceTree = ""; }; - A50C3ABD1C19E6EE00612D90 /* PPOTCheckoutRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTCheckoutRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest.m; sourceTree = ""; }; - A50C3ABE1C19E6EE00612D90 /* PPOTCore_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTCore_Internal.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCore_Internal.h; sourceTree = ""; }; - A50C3ABF1C19E6EE00612D90 /* PPOTCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTCore.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCore.m; sourceTree = ""; }; - A50C3AC01C19E6EE00612D90 /* PPOTResult_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTResult_Internal.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTResult_Internal.h; sourceTree = ""; }; - A50C3AC11C19E6EE00612D90 /* PPOTResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTResult.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTResult.m; sourceTree = ""; }; - A50C3AC21C19E6EE00612D90 /* PPOTRequest_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPOTRequest_Internal.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTRequest_Internal.h; sourceTree = ""; }; - A50C3AC31C19E6EE00612D90 /* PPOTRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTRequest.m; sourceTree = ""; }; - A50C3AC41C19E6EE00612D90 /* PPOTRequestFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PPOTRequestFactory.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTRequestFactory.m; sourceTree = ""; }; - A50C3ACD1C19E7F500612D90 /* otc-config.ios.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "otc-config.ios.json"; path = "BraintreePayPal/PayPalOneTouch/Configuration/otc-config.ios.json"; sourceTree = ""; }; - A50C3ACE1C19E7F500612D90 /* PPDefaultConfigurationJSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPDefaultConfigurationJSON.h; path = BraintreePayPal/PayPalOneTouch/Configuration/PPDefaultConfigurationJSON.h; sourceTree = ""; }; - A50C3ACF1C19E7F500612D90 /* PPOTConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTConfiguration.h; path = BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.h; sourceTree = ""; }; - A50C3AD01C19E7F500612D90 /* PPOTConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTConfiguration.m; path = BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.m; sourceTree = ""; }; - A50C3AD51C19F00600612D90 /* libPayPalOneTouch-StaticLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPayPalOneTouch-StaticLibrary.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A50C3AFB1C19F52C00612D90 /* libPPRiskComponent.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libPPRiskComponent.a; sourceTree = ""; }; - A50C3AFC1C19F52C00612D90 /* PPRCClientMetadataIDProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPRCClientMetadataIDProvider.h; sourceTree = ""; }; - A50C3B051C19F55C00612D90 /* libPayPalDataCollector-StaticLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPayPalDataCollector-StaticLibrary.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A50C3B121C19F7FC00612D90 /* PPOTAppSwitchResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTAppSwitchResponse.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.h; sourceTree = ""; }; - A50C3B131C19F7FC00612D90 /* PPOTAppSwitchResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTAppSwitchResponse.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.m; sourceTree = ""; }; - A50C3B141C19F7FC00612D90 /* PPOTAppSwitchUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTAppSwitchUtil.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.h; sourceTree = ""; }; - A50C3B151C19F7FC00612D90 /* PPOTAppSwitchUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTAppSwitchUtil.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.m; sourceTree = ""; }; - A50C3B161C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTCheckoutAppSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.h; sourceTree = ""; }; - A50C3B171C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTCheckoutAppSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.m; sourceTree = ""; }; - A50C3B181C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTCheckoutBrowserSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.h; sourceTree = ""; }; - A50C3B191C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTCheckoutBrowserSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.m; sourceTree = ""; }; - A50C3B1A1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTCheckoutSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.h; sourceTree = ""; }; - A50C3B1B1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTCheckoutSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.m; sourceTree = ""; }; - A50C3B1C1C19F7FC00612D90 /* PPOTError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTError.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTError.h; sourceTree = ""; }; - A50C3B1D1C19F7FC00612D90 /* PPOTError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTError.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTError.m; sourceTree = ""; }; - A50C3B1E1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTOAuth2AppSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.h; sourceTree = ""; }; - A50C3B1F1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTOAuth2AppSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.m; sourceTree = ""; }; - A50C3B201C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTOAuth2BrowserSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.h; sourceTree = ""; }; - A50C3B211C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTOAuth2BrowserSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.m; sourceTree = ""; }; - A50C3B221C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTOAuth2SwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.h; sourceTree = ""; }; - A50C3B231C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTOAuth2SwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.m; sourceTree = ""; }; - A50C3B241C19F7FC00612D90 /* PPOTPersistentRequestData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTPersistentRequestData.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.h; sourceTree = ""; }; - A50C3B251C19F7FC00612D90 /* PPOTPersistentRequestData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTPersistentRequestData.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.m; sourceTree = ""; }; - A50C3B261C19F7FC00612D90 /* PPOTSwitchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PPOTSwitchRequest.h; path = BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.h; sourceTree = ""; }; - A50C3B271C19F7FC00612D90 /* PPOTSwitchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PPOTSwitchRequest.m; path = BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.m; sourceTree = ""; }; - A50C3B631C1A288700612D90 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PayPalOneTouch.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A50C3B731C1A29C500612D90 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = BraintreePayPal/PayPalOneTouch/Info.plist; sourceTree = ""; }; - A50C3BC41C1B3F1500612D90 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - A51527321D9C3DC600FF3F77 /* KDataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KDataCollector.h; sourceTree = ""; }; - A51527361D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoDropInViewController.h; sourceTree = ""; }; - A51527371D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoDropInViewController.m; sourceTree = ""; }; - A5D3A56E1C20975F003A25A1 /* PPFPTIDataTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPFPTIDataTest.m; sourceTree = ""; }; - A5D3A56F1C20975F003A25A1 /* PPFPTITrackerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPFPTITrackerTest.m; sourceTree = ""; }; - A5F444AD1E89903E00B2B4F7 /* BTPayPalCreditFinancing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BTPayPalCreditFinancing.h; sourceTree = ""; }; - A5FE18301E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalCreditFinancing.m; sourceTree = ""; }; - A5FE18341E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalCreditFinancingAmount.m; sourceTree = ""; }; - A5FE183B1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPayPalCreditPaymentViewController.h; sourceTree = ""; }; - A5FE183C1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoPayPalCreditPaymentViewController.m; sourceTree = ""; }; - A70241B71C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPayPalWordmarkVectorArtView.h; sourceTree = ""; }; - A70241B81C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPayPalWordmarkVectorArtView.m; sourceTree = ""; }; - A70241BB1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BTUIPayPalCompactButton.h; path = "../Views/Payments Components/BTUIPayPalCompactButton.h"; sourceTree = ""; }; - A70241BC1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPayPalCompactButton.m; sourceTree = ""; }; - A7102E191B5085BB0007D40A /* BTPayPalAccountNonce_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalAccountNonce_Internal.h; sourceTree = ""; }; - A71559401B729297007DE6F0 /* BTIntegrationTestsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTIntegrationTestsHelper.h; sourceTree = ""; }; - A71559411B729297007DE6F0 /* BTIntegrationTestsHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTIntegrationTestsHelper.m; sourceTree = ""; }; - A71559471B72B085007DE6F0 /* BraintreeApplePay_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeApplePay_IntegrationTests.m; sourceTree = ""; }; - A717542F1BDEF1EC00002676 /* BTURLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTURLUtils.h; sourceTree = ""; }; - A71F7DDF1B616BA0005DA1B0 /* BTVenmoAppSwitchReturnURLSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAppSwitchReturnURLSpec.m; sourceTree = ""; }; - A71F7DE01B616BA0005DA1B0 /* BTVenmoAppSwitchURLSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAppSwitchURLSpec.m; sourceTree = ""; }; - A71F7DE61B6180A3005DA1B0 /* BTVenmoDriver_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTVenmoDriver_Tests.swift; sourceTree = ""; }; - A726BFE11B56D5E900B5C8F0 /* BTAnalyticsMetadataSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAnalyticsMetadataSpec.m; sourceTree = ""; }; - A72E134B1B44630C002703DD /* BTPostalAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTPostalAddress.h; sourceTree = ""; }; - A72E134C1B44630C002703DD /* BTPostalAddress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPostalAddress.m; sourceTree = ""; }; - A72E134F1B446DED002703DD /* BTClientMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTClientMetadata.h; sourceTree = ""; }; - A72E13501B446DED002703DD /* BTClientMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTClientMetadata.m; sourceTree = ""; }; - A73012821BEBE0C50074C118 /* BTPaymentButton_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPaymentButton_Internal.h; sourceTree = ""; }; - A7334F231BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPayPalBillingAgreementViewController.h; sourceTree = ""; }; - A7334F241BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoPayPalBillingAgreementViewController.m; sourceTree = ""; }; - A734A98D1B8797FD00D2461B /* BTClientTokenSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTClientTokenSpec.m; sourceTree = ""; }; - A734A98F1B87989400D2461B /* BTTestClientTokenFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTTestClientTokenFactory.h; sourceTree = ""; }; - A734A9901B87989400D2461B /* BTTestClientTokenFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTTestClientTokenFactory.m; sourceTree = ""; }; - A734D95A1B4C4B1000FE0E1B /* BTPayPalRequestFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalRequestFactory.h; sourceTree = ""; }; - A734D95B1B4C4B1000FE0E1B /* BTPayPalRequestFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPayPalRequestFactory.m; sourceTree = ""; }; - A734D95E1B4C4C0700FE0E1B /* BTPayPalDriver_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPayPalDriver_Internal.h; sourceTree = ""; }; - A743CD201B449D8400757C9B /* BTAPIClient_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BTAPIClient_Tests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A74BCF021BE14C7000DC1CAE /* BTThreeDSecureDriver_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureDriver_Tests.swift; sourceTree = ""; }; - A74BF1C31C57F25F0049E149 /* BTAnalyticsService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTAnalyticsService.h; sourceTree = ""; }; - A74BF1C41C57F25F0049E149 /* BTAnalyticsService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAnalyticsService.m; sourceTree = ""; }; - A74BF1C71C57FBED0049E149 /* BTAnalyticsService_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAnalyticsService_Tests.m; sourceTree = ""; }; - A75147E01B4217A00005BBBA /* BTCardClient_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTCardClient_Tests.swift; sourceTree = ""; }; - A751CAAA1CAC464C008603E5 /* BTCardRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCardRequest.m; sourceTree = ""; }; - A751CAAE1CAC4667008603E5 /* BTCardRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardRequest.h; sourceTree = ""; }; - A75BAC671C1F691C00D66FB5 /* BTIntegrationTestsConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTIntegrationTestsConstants.h; sourceTree = ""; }; - A75BAC681C1F69A300D66FB5 /* IntegrationTests.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IntegrationTests.pch; sourceTree = ""; }; - A75DA3541921394200D997A2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - A75DA3621921394200D997A2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - A75DA3651921394200D997A2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - A76B198B1B79707700452CFA /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A76B19A31B79708900452CFA /* Braintree-Demo.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Braintree-Demo.entitlements"; sourceTree = ""; }; - A76B19A61B79708900452CFA /* BraintreeDemoBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BraintreeDemoBaseViewController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - A76B19A71B79708900452CFA /* BraintreeDemoBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoBaseViewController.m; sourceTree = ""; }; - A76B19A81B79708900452CFA /* BraintreeDemoPaymentButtonBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPaymentButtonBaseViewController.h; sourceTree = ""; }; - A76B19A91B79708900452CFA /* BraintreeDemoPaymentButtonBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreeDemoPaymentButtonBaseViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A76B19AC1B79708900452CFA /* BraintreeDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoAppDelegate.h; sourceTree = ""; }; - A76B19AD1B79708900452CFA /* BraintreeDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoAppDelegate.m; sourceTree = ""; }; - A76B19AE1B79708900452CFA /* BraintreeDemoDemoContainmentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoDemoContainmentViewController.h; sourceTree = ""; }; - A76B19AF1B79708900452CFA /* BraintreeDemoDemoContainmentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreeDemoDemoContainmentViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A76B19B01B79708900452CFA /* BraintreeDemoIntegrationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoIntegrationViewController.h; sourceTree = ""; }; - A76B19B11B79708900452CFA /* BraintreeDemoIntegrationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoIntegrationViewController.m; sourceTree = ""; }; - A76B19B21B79708900452CFA /* BraintreeDemoSlideNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoSlideNavigationController.h; sourceTree = ""; }; - A76B19B31B79708900452CFA /* BraintreeDemoSlideNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoSlideNavigationController.m; sourceTree = ""; }; - A76B19B51B79708900452CFA /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; - A76B19B71B79708900452CFA /* BraintreeDemoSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoSettings.h; sourceTree = ""; }; - A76B19B81B79708900452CFA /* BraintreeDemoSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoSettings.m; sourceTree = ""; }; - A76B19B91B79708900452CFA /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; - A76B19C31B79708900452CFA /* BraintreeDemoApplePayPassKitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoApplePayPassKitViewController.h; sourceTree = ""; }; - A76B19C41B79708900452CFA /* BraintreeDemoApplePayPassKitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoApplePayPassKitViewController.m; sourceTree = ""; }; - A76B19CC1B79708900452CFA /* BraintreeDemoBTPaymentButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoBTPaymentButtonViewController.h; sourceTree = ""; }; - A76B19CD1B79708900452CFA /* BraintreeDemoBTPaymentButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoBTPaymentButtonViewController.m; sourceTree = ""; }; - A76B19CF1B79708900452CFA /* BraintreeDemoCustomMultiPayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCustomMultiPayViewController.h; sourceTree = ""; }; - A76B19D01B79708900452CFA /* BraintreeDemoCustomMultiPayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCustomMultiPayViewController.m; sourceTree = ""; }; - A76B19D21B79708900452CFA /* BraintreeDemoCardTokenizationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCardTokenizationViewController.h; sourceTree = ""; }; - A76B19D31B79708900452CFA /* BraintreeDemoCardTokenizationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCardTokenizationViewController.m; sourceTree = ""; }; - A76B19D41B79708900452CFA /* BraintreeDemoCardTokenizationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BraintreeDemoCardTokenizationViewController.xib; sourceTree = ""; }; - A76B19D61B79708900452CFA /* BraintreeDemoThreeDSecureViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoThreeDSecureViewController.h; sourceTree = ""; }; - A76B19D71B79708900452CFA /* BraintreeDemoThreeDSecureViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreeDemoThreeDSecureViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A76B19DC1B79708900452CFA /* BraintreeDemoBTDataCollectorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoBTDataCollectorViewController.h; sourceTree = ""; }; - A76B19DD1B79708900452CFA /* BraintreeDemoBTDataCollectorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoBTDataCollectorViewController.m; sourceTree = ""; }; - A76B19DF1B79708900452CFA /* BraintreeDemoBTUIPayPalButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoBTUIPayPalButtonViewController.h; sourceTree = ""; }; - A76B19E01B79708900452CFA /* BraintreeDemoBTUIPayPalButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoBTUIPayPalButtonViewController.m; sourceTree = ""; }; - A76B19E21B79708900452CFA /* BraintreeDemoPayPalOneTimePaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPayPalOneTimePaymentViewController.h; sourceTree = ""; }; - A76B19E31B79708900452CFA /* BraintreeDemoPayPalOneTimePaymentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoPayPalOneTimePaymentViewController.m; sourceTree = ""; }; - A76B19E51B79708900452CFA /* BraintreeDemoCustomPayPalButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCustomPayPalButtonViewController.h; sourceTree = ""; }; - A76B19E61B79708900452CFA /* BraintreeDemoCustomPayPalButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCustomPayPalButtonViewController.m; sourceTree = ""; }; - A76B19EB1B79708900452CFA /* BraintreeDemoPayPalScopesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoPayPalScopesViewController.h; sourceTree = ""; }; - A76B19EC1B79708900452CFA /* BraintreeDemoPayPalScopesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoPayPalScopesViewController.m; sourceTree = ""; }; - A76B19EE1B79708900452CFA /* BraintreeDemoCardHintViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCardHintViewController.h; sourceTree = ""; }; - A76B19EF1B79708900452CFA /* BraintreeDemoCardHintViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCardHintViewController.m; sourceTree = ""; }; - A76B19F01B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCreditCardEntryViewController.h; sourceTree = ""; }; - A76B19F11B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCreditCardEntryViewController.m; sourceTree = ""; }; - A76B19F21B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BraintreeDemoCreditCardEntryViewController.xib; sourceTree = ""; }; - A76B19F31B79708900452CFA /* BraintreeDemoPaymentsUIComponentsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BraintreeDemoPaymentsUIComponentsViewController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - A76B19F41B79708900452CFA /* BraintreeDemoPaymentsUIComponentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreeDemoPaymentsUIComponentsViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A76B19F51B79708900452CFA /* BraintreeDemoUIWidgetsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoUIWidgetsViewController.h; sourceTree = ""; }; - A76B19F61B79708900452CFA /* BraintreeDemoUIWidgetsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoUIWidgetsViewController.m; sourceTree = ""; }; - A76B19F71B79708900452CFA /* UI.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = UI.storyboard; sourceTree = ""; }; - A76B19F91B79708900452CFA /* BraintreeDemoBTUIVenmoButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoBTUIVenmoButtonViewController.h; sourceTree = ""; }; - A76B19FA1B79708900452CFA /* BraintreeDemoBTUIVenmoButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoBTUIVenmoButtonViewController.m; sourceTree = ""; }; - A76B19FC1B79708A00452CFA /* BraintreeDemoCustomVenmoButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoCustomVenmoButtonViewController.h; sourceTree = ""; }; - A76B19FD1B79708A00452CFA /* BraintreeDemoCustomVenmoButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoCustomVenmoButtonViewController.m; sourceTree = ""; }; - A76B19FE1B79708A00452CFA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - A76B1A001B79708A00452CFA /* BraintreeDemoMerchantAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoMerchantAPI.h; sourceTree = ""; }; - A76B1A011B79708A00452CFA /* BraintreeDemoMerchantAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoMerchantAPI.m; sourceTree = ""; }; - A76B1A021B79708A00452CFA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - A76B1A041B79708A00452CFA /* Braintree-Demo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Braintree-Demo-Info.plist"; sourceTree = ""; }; - A76B1A051B79708A00452CFA /* Braintree-Demo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Braintree-Demo-Prefix.pch"; sourceTree = ""; }; - A76B1A071B79708A00452CFA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - A76B1A091B79708A00452CFA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; - A76B1A0A1B79708A00452CFA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - A76B991E1C3EF59000A584F6 /* libFLEX.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFLEX.a; path = "Pods/../build/Debug-iphoneos/libFLEX.a"; sourceTree = ""; }; - A76B99201C3EF5D300A584F6 /* libPods-Demo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-Demo.a"; path = "Pods/../build/Debug-iphoneos/libPods-Demo.a"; sourceTree = ""; }; - A76B99211C3EF5D300A584F6 /* libPods-Test-Deps.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-Test-Deps.a"; path = "Pods/../build/Debug-iphoneos/libPods-Test-Deps.a"; sourceTree = ""; }; - A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeDataCollector.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A76D7C1E1BB1CBD50000FA6A /* BraintreeDataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDataCollector.h; sourceTree = ""; }; - A76D7C1F1BB1CBD50000FA6A /* BTDataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDataCollector.h; sourceTree = ""; }; - A76D7C221BB1CBDC0000FA6A /* BTDataCollector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDataCollector.m; sourceTree = ""; }; - A76D7C271BB1D31A0000FA6A /* libDeviceCollectorLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libDeviceCollectorLibrary.a; sourceTree = ""; }; - A76D7C2C1BB1D35A0000FA6A /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - A76D7C331BB21CE90000FA6A /* BraintreeDataCollector_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDataCollector_IntegrationTests.m; sourceTree = ""; }; - A77344F71B7A93A10083EC8D /* BraintreeUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A77344F91B7A93A10083EC8D /* BraintreeUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BraintreeUI.h; sourceTree = ""; }; - A77345071B7A93D00083EC8D /* BTUILocalizedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUILocalizedString.h; sourceTree = ""; }; - A77345081B7A93D00083EC8D /* BTUILocalizedString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUILocalizedString.m; sourceTree = ""; }; - A773450A1B7A93D00083EC8D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/UI.strings; sourceTree = ""; }; - A773450B1B7A93D00083EC8D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/UI.strings; sourceTree = ""; }; - A773450C1B7A93D00083EC8D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/UI.strings; sourceTree = ""; }; - A773450D1B7A93D00083EC8D /* en_AU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_AU; path = en_AU.lproj/UI.strings; sourceTree = ""; }; - A773450E1B7A93D00083EC8D /* en_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_CA; path = en_CA.lproj/UI.strings; sourceTree = ""; }; - A773450F1B7A93D00083EC8D /* en_GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_GB; path = en_GB.lproj/UI.strings; sourceTree = ""; }; - A77345101B7A93D00083EC8D /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/UI.strings; sourceTree = ""; }; - A77345111B7A93D00083EC8D /* es_ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es_ES; path = es_ES.lproj/UI.strings; sourceTree = ""; }; - A77345121B7A93D00083EC8D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UI.strings; sourceTree = ""; }; - A77345131B7A93D00083EC8D /* fr_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_CA; path = fr_CA.lproj/UI.strings; sourceTree = ""; }; - A77345141B7A93D00083EC8D /* fr_FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_FR; path = fr_FR.lproj/UI.strings; sourceTree = ""; }; - A77345151B7A93D00083EC8D /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/UI.strings; sourceTree = ""; }; - A77345161B7A93D00083EC8D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/UI.strings; sourceTree = ""; }; - A77345171B7A93D00083EC8D /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/UI.strings; sourceTree = ""; }; - A77345181B7A93D00083EC8D /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/UI.strings; sourceTree = ""; }; - A77345191B7A93D00083EC8D /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/UI.strings; sourceTree = ""; }; - A773451A1B7A93D00083EC8D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/UI.strings; sourceTree = ""; }; - A773451B1B7A93D00083EC8D /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/UI.strings; sourceTree = ""; }; - A773451C1B7A93D00083EC8D /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/UI.strings; sourceTree = ""; }; - A773451D1B7A93D00083EC8D /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/UI.strings; sourceTree = ""; }; - A773451E1B7A93D00083EC8D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/UI.strings"; sourceTree = ""; }; - A77345201B7A93D00083EC8D /* BTUICardExpirationValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardExpirationValidator.h; sourceTree = ""; }; - A77345211B7A93D00083EC8D /* BTUICardExpirationValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardExpirationValidator.m; sourceTree = ""; }; - A77345221B7A93D00083EC8D /* BTUICardExpiryFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardExpiryFormat.h; sourceTree = ""; }; - A77345231B7A93D00083EC8D /* BTUICardExpiryFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardExpiryFormat.m; sourceTree = ""; }; - A77345241B7A93D00083EC8D /* BTUICardType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardType.h; sourceTree = ""; }; - A77345251B7A93D00083EC8D /* BTUICardType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardType.m; sourceTree = ""; }; - A77345261B7A93D00083EC8D /* BTUIUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIUtil.h; sourceTree = ""; }; - A77345271B7A93D00083EC8D /* BTUIUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIUtil.m; sourceTree = ""; }; - A77345281B7A93D00083EC8D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - A773452A1B7A93D00083EC8D /* BTUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUI.h; sourceTree = ""; }; - A773452B1B7A93D00083EC8D /* BTUI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUI.m; sourceTree = ""; }; - A773452C1B7A93D00083EC8D /* UIColor+BTUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+BTUI.h"; sourceTree = ""; }; - A773452D1B7A93D00083EC8D /* UIColor+BTUI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+BTUI.m"; sourceTree = ""; }; - A77345301B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTMockApplePayPaymentAuthorizationView.h; sourceTree = ""; }; - A77345311B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTMockApplePayPaymentAuthorizationView.m; sourceTree = ""; }; - A77345321B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTMockApplePayPaymentAuthorizationViewController.h; sourceTree = ""; }; - A77345331B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTMockApplePayPaymentAuthorizationViewController.m; sourceTree = ""; }; - A77345341B7A93D00083EC8D /* BTUIViewUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIViewUtil.h; sourceTree = ""; }; - A77345351B7A93D00083EC8D /* BTUIViewUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIViewUtil.m; sourceTree = ""; }; - A77345371B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIHorizontalButtonStackCollectionViewFlowLayout.h; sourceTree = ""; }; - A77345381B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIHorizontalButtonStackCollectionViewFlowLayout.m; sourceTree = ""; }; - A77345391B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIHorizontalButtonStackSeparatorLineView.h; sourceTree = ""; }; - A773453A1B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIHorizontalButtonStackSeparatorLineView.m; sourceTree = ""; }; - A773453B1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPaymentButtonCollectionViewCell.h; sourceTree = ""; }; - A773453C1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPaymentButtonCollectionViewCell.m; sourceTree = ""; }; - A773453E1B7A93D00083EC8D /* BTUIFloatLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIFloatLabel.h; sourceTree = ""; }; - A773453F1B7A93D00083EC8D /* BTUIFloatLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIFloatLabel.m; sourceTree = ""; }; - A77345401B7A93D00083EC8D /* BTUIFormField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIFormField.h; sourceTree = ""; }; - A77345411B7A93D00083EC8D /* BTUIFormField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIFormField.m; sourceTree = ""; }; - A77345421B7A93D00083EC8D /* BTUIFormField_Protected.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIFormField_Protected.h; sourceTree = ""; }; - A77345431B7A93D00083EC8D /* BTUIScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIScrollView.h; sourceTree = ""; }; - A77345441B7A93D00083EC8D /* BTUIScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIScrollView.m; sourceTree = ""; }; - A77345451B7A93D00083EC8D /* BTUITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUITextField.h; sourceTree = ""; }; - A77345461B7A93D00083EC8D /* BTUITextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUITextField.m; sourceTree = ""; }; - A77345481B7A93D00083EC8D /* BTUIThemedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIThemedView.m; sourceTree = ""; }; - A77345491B7A93D00083EC8D /* BTUIVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIVectorArtView.h; sourceTree = ""; }; - A773454A1B7A93D00083EC8D /* BTUIVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIVectorArtView.m; sourceTree = ""; }; - A773454C1B7A93D00083EC8D /* BTUICardCvvField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardCvvField.h; sourceTree = ""; }; - A773454D1B7A93D00083EC8D /* BTUICardCvvField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardCvvField.m; sourceTree = ""; }; - A773454E1B7A93D00083EC8D /* BTUICardExpiryField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardExpiryField.h; sourceTree = ""; }; - A773454F1B7A93D00083EC8D /* BTUICardExpiryField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardExpiryField.m; sourceTree = ""; }; - A77345501B7A93D00083EC8D /* BTUICardNumberField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardNumberField.h; sourceTree = ""; }; - A77345511B7A93D00083EC8D /* BTUICardNumberField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardNumberField.m; sourceTree = ""; }; - A77345521B7A93D00083EC8D /* BTUICardPostalCodeField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardPostalCodeField.h; sourceTree = ""; }; - A77345531B7A93D00083EC8D /* BTUICardPostalCodeField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardPostalCodeField.m; sourceTree = ""; }; - A77345551B7A93D00083EC8D /* BTUICardFormView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardFormView.h; sourceTree = ""; }; - A77345561B7A93D00083EC8D /* BTUICardFormView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardFormView.m; sourceTree = ""; }; - A77345581B7A93D00083EC8D /* BTUICardHint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardHint.h; sourceTree = ""; }; - A77345591B7A93D00083EC8D /* BTUICardHint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardHint.m; sourceTree = ""; }; - A773455A1B7A93D00083EC8D /* BTUICoinbaseButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICoinbaseButton.h; sourceTree = ""; }; - A773455B1B7A93D00083EC8D /* BTUICoinbaseButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICoinbaseButton.m; sourceTree = ""; }; - A773455C1B7A93D00083EC8D /* BTUICTAControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICTAControl.h; sourceTree = ""; }; - A773455D1B7A93D00083EC8D /* BTUICTAControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICTAControl.m; sourceTree = ""; }; - A773455E1B7A93D00083EC8D /* BTUIPaymentMethodView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPaymentMethodView.h; sourceTree = ""; }; - A773455F1B7A93D00083EC8D /* BTUIPaymentMethodView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPaymentMethodView.m; sourceTree = ""; }; - A77345601B7A93D00083EC8D /* BTUIPayPalButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPayPalButton.h; sourceTree = ""; }; - A77345611B7A93D00083EC8D /* BTUIPayPalButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPayPalButton.m; sourceTree = ""; }; - A77345621B7A93D00083EC8D /* BTUISummaryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUISummaryView.h; sourceTree = ""; }; - A77345631B7A93D00083EC8D /* BTUISummaryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUISummaryView.m; sourceTree = ""; }; - A77345641B7A93D00083EC8D /* BTUIVenmoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIVenmoButton.h; sourceTree = ""; }; - A77345651B7A93D00083EC8D /* BTUIVenmoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIVenmoButton.m; sourceTree = ""; }; - A77345671B7A93D00083EC8D /* BTUIAmExVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIAmExVectorArtView.h; sourceTree = ""; }; - A77345681B7A93D00083EC8D /* BTUIAmExVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIAmExVectorArtView.m; sourceTree = ""; }; - A77345691B7A93D00083EC8D /* BTUICardVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICardVectorArtView.h; sourceTree = ""; }; - A773456A1B7A93D00083EC8D /* BTUICardVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICardVectorArtView.m; sourceTree = ""; }; - A773456B1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICoinbaseMonogramCardView.h; sourceTree = ""; }; - A773456C1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICoinbaseMonogramCardView.m; sourceTree = ""; }; - A773456D1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICoinbaseWordmarkVectorArtView.h; sourceTree = ""; }; - A773456E1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICoinbaseWordmarkVectorArtView.m; sourceTree = ""; }; - A773456F1B7A93D00083EC8D /* BTUICVVBackVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICVVBackVectorArtView.h; sourceTree = ""; }; - A77345701B7A93D00083EC8D /* BTUICVVBackVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICVVBackVectorArtView.m; sourceTree = ""; }; - A77345711B7A93D00083EC8D /* BTUICVVFrontVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUICVVFrontVectorArtView.h; sourceTree = ""; }; - A77345721B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUICVVFrontVectorArtView.m; sourceTree = ""; }; - A77345731B7A93D00083EC8D /* BTUIDinersClubVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIDinersClubVectorArtView.h; sourceTree = ""; }; - A77345741B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIDinersClubVectorArtView.m; sourceTree = ""; }; - A77345751B7A93D00083EC8D /* BTUIDiscoverVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIDiscoverVectorArtView.h; sourceTree = ""; }; - A77345761B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIDiscoverVectorArtView.m; sourceTree = ""; }; - A77345771B7A93D00083EC8D /* BTUIJCBVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIJCBVectorArtView.h; sourceTree = ""; }; - A77345781B7A93D00083EC8D /* BTUIJCBVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIJCBVectorArtView.m; sourceTree = ""; }; - A77345791B7A93D00083EC8D /* BTUIMaestroVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIMaestroVectorArtView.h; sourceTree = ""; }; - A773457A1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIMaestroVectorArtView.m; sourceTree = ""; }; - A773457B1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIMasterCardVectorArtView.h; sourceTree = ""; }; - A773457C1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIMasterCardVectorArtView.m; sourceTree = ""; }; - A773457D1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPayPalMonogramCardView.h; sourceTree = ""; }; - A773457E1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPayPalMonogramCardView.m; sourceTree = ""; }; - A773457F1B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIPayPalWordmarkCompactVectorArtView.h; sourceTree = ""; }; - A77345801B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIPayPalWordmarkCompactVectorArtView.m; sourceTree = ""; }; - A77345811B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIUnknownCardVectorArtView.h; sourceTree = ""; }; - A77345821B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIUnknownCardVectorArtView.m; sourceTree = ""; }; - A77345831B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIVenmoWordmarkVectorArtView.h; sourceTree = ""; }; - A77345841B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIVenmoWordmarkVectorArtView.m; sourceTree = ""; }; - A77345851B7A93D00083EC8D /* BTUIVisaVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIVisaVectorArtView.h; sourceTree = ""; }; - A77345861B7A93D00083EC8D /* BTUIVisaVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIVisaVectorArtView.m; sourceTree = ""; }; - A77345EB1B7A9E340083EC8D /* BTDropInContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInContentView.h; sourceTree = ""; }; - A77345EC1B7A9E340083EC8D /* BTDropInContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInContentView.m; sourceTree = ""; }; - A77345ED1B7A9E340083EC8D /* BTDropInErrorAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTDropInErrorAlert.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - A77345EE1B7A9E340083EC8D /* BTDropInErrorAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInErrorAlert.m; sourceTree = ""; }; - A77345EF1B7A9E340083EC8D /* BTDropInErrorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInErrorState.h; sourceTree = ""; }; - A77345F01B7A9E340083EC8D /* BTDropInErrorState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInErrorState.m; sourceTree = ""; }; - A77345F11B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInSelectPaymentMethodViewController.h; sourceTree = ""; }; - A77345F21B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInSelectPaymentMethodViewController.m; sourceTree = ""; }; - A77345F31B7A9E340083EC8D /* BTDropInUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInUtil.h; sourceTree = ""; }; - A77345F41B7A9E340083EC8D /* BTDropInUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInUtil.m; sourceTree = ""; }; - A77345F51B7A9E340083EC8D /* BTDropInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInViewController.h; sourceTree = ""; }; - A77345F61B7A9E340083EC8D /* BTDropInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BTDropInViewController.m; sourceTree = ""; }; - A77345F71B7A9E340083EC8D /* BTPaymentButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPaymentButton.h; sourceTree = ""; }; - A77345F81B7A9E340083EC8D /* BTPaymentButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPaymentButton.m; sourceTree = ""; }; - A77345FA1B7A9E340083EC8D /* BTDropInLocalizedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInLocalizedString.h; sourceTree = ""; }; - A77345FB1B7A9E340083EC8D /* BTDropInLocalizedString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInLocalizedString.m; sourceTree = ""; }; - A77345FD1B7A9E340083EC8D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = "da.lproj/Drop-In.strings"; sourceTree = ""; }; - A77345FE1B7A9E340083EC8D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = "de.lproj/Drop-In.strings"; sourceTree = ""; }; - A77345FF1B7A9E340083EC8D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = "en.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346001B7A9E340083EC8D /* en_AU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_AU; path = "en_AU.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346011B7A9E340083EC8D /* en_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_CA; path = "en_CA.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346021B7A9E340083EC8D /* en_GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_GB; path = "en_GB.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346031B7A9E340083EC8D /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = "es.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346041B7A9E340083EC8D /* es_ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es_ES; path = "es_ES.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346051B7A9E340083EC8D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346061B7A9E340083EC8D /* fr_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_CA; path = "fr_CA.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346071B7A9E340083EC8D /* fr_FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_FR; path = "fr_FR.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346081B7A9E340083EC8D /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = "he.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346091B7A9E340083EC8D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = "it.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460A1B7A9E340083EC8D /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = "nb.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460B1B7A9E340083EC8D /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = "nl.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460C1B7A9E340083EC8D /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = "pl.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460D1B7A9E340083EC8D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = "pt.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460E1B7A9E340083EC8D /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = "ru.lproj/Drop-In.strings"; sourceTree = ""; }; - A773460F1B7A9E340083EC8D /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = "sv.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346101B7A9E340083EC8D /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = "tr.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346111B7A9E340083EC8D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Drop-In.strings"; sourceTree = ""; }; - A77346231B7AA4D50083EC8D /* BTErrors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTErrors.m; sourceTree = ""; }; - A77346251B7AA4F10083EC8D /* BTErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTErrors.h; sourceTree = ""; }; - A773462E1B7BB1A60083EC8D /* BTTokenizationService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTTokenizationService.h; sourceTree = ""; }; - A773462F1B7BB1A70083EC8D /* BTTokenizationService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTTokenizationService.m; sourceTree = ""; }; - A77426561CA20793003CACBA /* BTCardCapabilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCardCapabilities.m; sourceTree = ""; }; - A77426591CA207AE003CACBA /* BTCardCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardCapabilities.h; sourceTree = ""; }; - A775245F1CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeDemoUnionPayViewController.h; sourceTree = ""; }; - A77524601CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeDemoUnionPayViewController.m; sourceTree = ""; }; - A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeVenmo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A77AA2B51B61936A00217B73 /* BTVenmoDriver_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTVenmoDriver_Internal.h; sourceTree = ""; }; - A78422711C98920500D3EBFF /* BTUIUnionPayVectorArtView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTUIUnionPayVectorArtView.h; sourceTree = ""; }; - A78422721C98920500D3EBFF /* BTUIUnionPayVectorArtView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTUIUnionPayVectorArtView.m; sourceTree = ""; }; - A78496591BD962260081531A /* BTCheckoutRequest_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTCheckoutRequest_Tests.swift; sourceTree = ""; }; - A78BF95C1CC6F32100DED8AA /* BraintreeUnionPay_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BraintreeUnionPay_IntegrationTests.m; sourceTree = ""; }; - A79033971B45C968004C8234 /* BTCard_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTCard_Tests.swift; sourceTree = ""; }; - A790339B1B45E16E004C8234 /* BTCard_Internal_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCard_Internal_Tests.m; sourceTree = ""; }; - A79033A51B4AF360004C8234 /* BTJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTJSON.h; sourceTree = ""; }; - A79033A61B4AF360004C8234 /* BTJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTJSON.m; sourceTree = ""; }; - A79AF9B31B56D67D007B1DF1 /* BTSpecDependencies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTSpecDependencies.h; sourceTree = ""; }; - A79AF9F21B56DB54007B1DF1 /* BTClientMetadataSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTClientMetadataSpec.m; sourceTree = ""; }; - A79AFA3B1B56F822007B1DF1 /* BTThreeDSecureErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureErrors.h; sourceTree = ""; }; - A79AFA3D1B56F822007B1DF1 /* BTThreeDSecureResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureResponse.h; sourceTree = ""; }; - A79AFA401B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureAuthenticationViewController.h; sourceTree = ""; }; - A79AFA411B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureAuthenticationViewController.m; sourceTree = ""; }; - A79AFA421B56F822007B1DF1 /* BTThreeDSecureErrors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureErrors.m; sourceTree = ""; }; - A79AFA441B56F822007B1DF1 /* BTThreeDSecureResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureResponse.m; sourceTree = ""; }; - A79AFA451B56F822007B1DF1 /* BTWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTWebViewController.h; sourceTree = ""; }; - A79AFA461B56F822007B1DF1 /* BTWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTWebViewController.m; sourceTree = ""; }; - A79AFA481B56F822007B1DF1 /* BTThreeDSecureLocalizedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureLocalizedString.h; sourceTree = ""; }; - A79AFA491B56F822007B1DF1 /* BTThreeDSecureLocalizedString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureLocalizedString.m; sourceTree = ""; }; - A79AFA4B1B56F822007B1DF1 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = "da.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA4C1B56F822007B1DF1 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = "de.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA4D1B56F822007B1DF1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = "en.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA4E1B56F822007B1DF1 /* en_AU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_AU; path = "en_AU.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA4F1B56F822007B1DF1 /* en_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_CA; path = "en_CA.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA501B56F822007B1DF1 /* en_GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_GB; path = "en_GB.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA511B56F822007B1DF1 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = "es.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA521B56F822007B1DF1 /* es_ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es_ES; path = "es_ES.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA531B56F822007B1DF1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA541B56F822007B1DF1 /* fr_CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_CA; path = "fr_CA.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA551B56F822007B1DF1 /* fr_FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr_FR; path = "fr_FR.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA561B56F822007B1DF1 /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = "he.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA571B56F822007B1DF1 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = "it.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA581B56F822007B1DF1 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = "nb.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA591B56F822007B1DF1 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = "nl.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5A1B56F822007B1DF1 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = "pl.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5B1B56F822007B1DF1 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = "pt.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5C1B56F823007B1DF1 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = "ru.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5D1B56F823007B1DF1 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = "sv.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5E1B56F823007B1DF1 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = "tr.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA5F1B56F823007B1DF1 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Three-D-Secure.strings"; sourceTree = ""; }; - A79AFA761B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureCardNonce.h; sourceTree = ""; }; - A79AFA771B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureCardNonce.m; sourceTree = ""; }; - A79AFA7A1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureLookupResult.h; sourceTree = ""; }; - A79AFA7B1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureLookupResult.m; sourceTree = ""; }; - A79AFA7E1B56FEE4007B1DF1 /* BTThreeDSecureDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureDriver.h; sourceTree = ""; }; - A79AFA7F1B56FEE4007B1DF1 /* BTThreeDSecureDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTThreeDSecureDriver.m; sourceTree = ""; }; - A79AFA841B5721A2007B1DF1 /* BTHTTPErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTHTTPErrors.h; sourceTree = ""; }; - A79AFA861B5721F6007B1DF1 /* BTHTTPErrors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTHTTPErrors.m; sourceTree = ""; }; - A79BB5BE1CE501D500CC6F0E /* PPDataCollector_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPDataCollector_Internal.h; sourceTree = ""; }; - A79C9C6F1BE17BBF007EAF73 /* BTThreeDSecureDriver_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BTThreeDSecureDriver_Internal.h; sourceTree = ""; }; - A7A094F51B8276E500D732CC /* BTCardNonce_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTCardNonce_Tests.swift; sourceTree = ""; }; - A7A6DD061B4308EB008857E1 /* BTPayPalDriver_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTPayPalDriver_Tests.swift; sourceTree = ""; }; - A7A6DD131B4312DC008857E1 /* BTLogger_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTLogger_Internal.h; sourceTree = ""; }; - A7A6DD141B4312DC008857E1 /* BTLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTLogger.h; sourceTree = ""; }; - A7A6DD151B4312DC008857E1 /* BTLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTLogger.m; sourceTree = ""; }; - A7A6DD241B43144D008857E1 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; - A7A6DD261B431453008857E1 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; - A7A6DD281B43145D008857E1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - A7A6DD2C1B431B75008857E1 /* BTAPIClient_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTAPIClient_Internal.h; sourceTree = ""; }; - A7A6DD3E1B445550008857E1 /* BTAnalyticsMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTAnalyticsMetadata.h; sourceTree = ""; }; - A7A6DD3F1B445550008857E1 /* BTAnalyticsMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAnalyticsMetadata.m; sourceTree = ""; }; - A7A6DD401B445550008857E1 /* BTHTTP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTHTTP.h; sourceTree = ""; }; - A7A6DD411B445550008857E1 /* BTHTTP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTHTTP.m; sourceTree = ""; }; - A7A6DD4A1B445A29008857E1 /* BTAPIPinnedCertificates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTAPIPinnedCertificates.h; sourceTree = ""; }; - A7A6DD4B1B445A29008857E1 /* BTAPIPinnedCertificates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAPIPinnedCertificates.m; sourceTree = ""; }; - A7A6DD4C1B445A29008857E1 /* BTKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTKeychain.h; sourceTree = ""; }; - A7A6DD4D1B445A29008857E1 /* BTKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTKeychain.m; sourceTree = ""; }; - A7A6DD511B445A29008857E1 /* BTURLUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTURLUtils.m; sourceTree = ""; }; - A7ABD6531B702FD800A1223C /* IntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A7ABD6571B702FD800A1223C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A7ABD65E1B702FF000A1223C /* BTAPIClient_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BTAPIClient_IntegrationTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A7ABD6611B702FF000A1223C /* BTHTTPSSLPinning_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTHTTPSSLPinning_IntegrationTests.m; sourceTree = ""; }; - A7ABD6631B702FF000A1223C /* good_root_cert.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = good_root_cert.der; sourceTree = ""; }; - A7ABD6651B702FF000A1223C /* evil_root_cert.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = evil_root_cert.der; sourceTree = ""; }; - A7ABD6661B702FF000A1223C /* evil_root_cert.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = evil_root_cert.pem; sourceTree = ""; }; - A7ABD6671B702FF000A1223C /* evil_root_key.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = evil_root_key.pem; sourceTree = ""; }; - A7ABD6681B702FF000A1223C /* evil_site_cert.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = evil_site_cert.pem; sourceTree = ""; }; - A7ABD6691B702FF000A1223C /* evil_site_key.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = evil_site_key.pem; sourceTree = ""; }; - A7ABD66A1B702FF000A1223C /* evil_site_request.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = evil_site_request.pem; sourceTree = ""; }; - A7ABD66B1B702FF000A1223C /* good_root_cert.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = good_root_cert.pem; sourceTree = ""; }; - A7ABD66C1B702FF000A1223C /* good_root_key.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = good_root_key.pem; sourceTree = ""; }; - A7ABD66D1B702FF000A1223C /* good_site_cert.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = good_site_cert.pem; sourceTree = ""; }; - A7ABD66E1B702FF000A1223C /* good_site_key.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = good_site_key.pem; sourceTree = ""; }; - A7ABD66F1B702FF000A1223C /* good_site_request.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = good_site_request.pem; sourceTree = ""; }; - A7ABD6701B702FF000A1223C /* https_server.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = https_server.rb; sourceTree = ""; }; - A7ABD6711B702FF000A1223C /* make_certs.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = make_certs.sh; sourceTree = ""; }; - A7ABD6731B702FF000A1223C /* braintree-api-integration-specs-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "braintree-api-integration-specs-Info.plist"; sourceTree = ""; }; - A7ABD6741B702FF000A1223C /* braintree-api-integration-specs-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "braintree-api-integration-specs-Prefix.pch"; sourceTree = ""; }; - A7ABD6761B702FF000A1223C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - A7ABD6771B702FF000A1223C /* BraintreeCard_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreeCard_IntegrationTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A7AF0F5F1C20E80A00B3ADC6 /* BTThreeDSecureLookupResult_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureLookupResult_Tests.swift; sourceTree = ""; }; - A7AF0F611C222F9400B3ADC6 /* BTPaymentButton_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTPaymentButton_Tests.swift; sourceTree = ""; }; - A7B035B519D6273400750F8A /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/PassKit.framework; sourceTree = DEVELOPER_DIR; }; - A7B1C1411B66B3D000ED063C /* BTConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTConfiguration.h; sourceTree = ""; }; - A7B1C1421B66B3D000ED063C /* BTConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTConfiguration.m; sourceTree = ""; }; - A7B1C1451B66D94600ED063C /* BTConfiguration+Venmo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTConfiguration+Venmo.h"; sourceTree = ""; }; - A7B1C1461B66D94600ED063C /* BTConfiguration+Venmo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BTConfiguration+Venmo.m"; sourceTree = ""; }; - A7B1C1491B66E11C00ED063C /* BTConfiguration+PayPal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTConfiguration+PayPal.h"; sourceTree = ""; }; - A7B1C14A1B66E11C00ED063C /* BTConfiguration+PayPal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BTConfiguration+PayPal.m"; sourceTree = ""; }; - A7B1C14D1B66E46900ED063C /* BTConfiguration+ApplePay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTConfiguration+ApplePay.h"; sourceTree = ""; }; - A7B1C14E1B66E46900ED063C /* BTConfiguration+ApplePay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BTConfiguration+ApplePay.m"; sourceTree = ""; }; - A7B1C1511B66F79900ED063C /* BTAppSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTAppSwitch.h; sourceTree = ""; }; - A7B1C1521B66F79900ED063C /* BTAppSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAppSwitch.m; sourceTree = ""; }; - A7B462441C3C911200048423 /* PPOTAppSwitchResponseTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTAppSwitchResponseTest.m; sourceTree = ""; }; - A7B462451C3C911200048423 /* PPOTAppSwitchUtilTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTAppSwitchUtilTest.m; sourceTree = ""; }; - A7B462461C3C911200048423 /* PPOTConfigurationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTConfigurationTest.m; sourceTree = ""; }; - A7B462471C3C911200048423 /* PPOTEncryptionTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTEncryptionTest.m; sourceTree = ""; }; - A7B462481C3C911200048423 /* PPOTErrorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTErrorTest.m; sourceTree = ""; }; - A7B462491C3C911200048423 /* PPOTTimeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTTimeTest.m; sourceTree = ""; }; - A7B462621C3C945600048423 /* libPods-Demo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-Demo.a"; path = "Pods/../build/Debug-iphoneos/libPods-Demo.a"; sourceTree = ""; }; - A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PayPalDataCollector.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A7B463201C3DA73300048423 /* PPOTDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTDevice.m; sourceTree = ""; }; - A7B463221C3DA73300048423 /* PPOTEncryptionHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTEncryptionHelper.m; sourceTree = ""; }; - A7B463241C3DA73300048423 /* PPOTJSONHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTJSONHelper.m; sourceTree = ""; }; - A7B463261C3DA73300048423 /* PPOTMacros.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTMacros.m; sourceTree = ""; }; - A7B463281C3DA73300048423 /* PPOTPinnedCertificates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTPinnedCertificates.m; sourceTree = ""; }; - A7B4632A1C3DA73300048423 /* PPOTSimpleKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTSimpleKeychain.m; sourceTree = ""; }; - A7B4632C1C3DA73300048423 /* PPOTString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTString.m; sourceTree = ""; }; - A7B4632E1C3DA73300048423 /* PPOTTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTTime.m; sourceTree = ""; }; - A7B463301C3DA73300048423 /* PPOTURLSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPOTURLSession.m; sourceTree = ""; }; - A7B4635F1C3DBEFE00048423 /* PPDataCollector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PPDataCollector.m; sourceTree = ""; }; - A7B463631C3DBF5E00048423 /* PayPalDataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayPalDataCollector.h; sourceTree = ""; }; - A7B463641C3DBF5E00048423 /* PPDataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPDataCollector.h; sourceTree = ""; }; - A7B4638A1C3DCEAD00048423 /* PayPalOneTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PayPalOneTouch.h; path = BraintreePayPal/PayPalOneTouch/Public/PayPalOneTouch.h; sourceTree = ""; }; - A7B4AD561B4EFC76002FB23E /* MockAPIClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockAPIClient.swift; sourceTree = ""; }; - A7B7989B1C233C57001327FA /* BTConfiguration_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTConfiguration_Tests.swift; sourceTree = ""; }; - A7B7989F1C238FC0001327FA /* BTTokenizationService_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTTokenizationService_Tests.swift; sourceTree = ""; }; - A7B861BE1C24B19300A2422E /* BTVersion_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTVersion_Tests.swift; sourceTree = ""; }; - A7BC50BA1C29E4CD0024C870 /* BTLogger_Internal_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTLogger_Internal_Tests.m; sourceTree = ""; }; - A7BC50BE1C29F6600024C870 /* BTDropInErrorState_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTDropInErrorState_Tests.m; sourceTree = ""; }; - A7C823071B4DA9D7009D45D6 /* BTHTTPSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BTHTTPSpec.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A7C8230C1B4DAAB2009D45D6 /* BTSpecHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTSpecHelper.h; sourceTree = ""; }; - A7C8230D1B4DAAB2009D45D6 /* BTSpecHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTSpecHelper.m; sourceTree = ""; }; - A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeApplePay.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A7C8897C1B5EF62C007A0E9C /* BTApplePayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTApplePayClient.h; sourceTree = ""; }; - A7C8897D1B5EF62C007A0E9C /* BTApplePayClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTApplePayClient.m; sourceTree = ""; }; - A7C8897E1B5EF62C007A0E9C /* BTApplePayCardNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTApplePayCardNonce.h; sourceTree = ""; }; - A7C8897F1B5EF62C007A0E9C /* BTApplePayCardNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTApplePayCardNonce.m; sourceTree = ""; }; - A7C889861B5EF65C007A0E9C /* BraintreeApplePay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BraintreeApplePay.h; sourceTree = ""; }; - A7C889891B5EF737007A0E9C /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; - A7C889901B5F043B007A0E9C /* BraintreeCard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreeCard.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A7C889921B5F043B007A0E9C /* BraintreeCard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BraintreeCard.h; sourceTree = ""; }; - A7C8899C1B5F0471007A0E9C /* BTCardClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardClient.h; sourceTree = ""; }; - A7C8899D1B5F0471007A0E9C /* BTCardClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCardClient.m; sourceTree = ""; }; - A7C8899E1B5F0471007A0E9C /* BTCard_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCard_Internal.h; sourceTree = ""; }; - A7C8899F1B5F0471007A0E9C /* BTCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCard.h; sourceTree = ""; }; - A7C889A01B5F0471007A0E9C /* BTCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCard.m; sourceTree = ""; }; - A7C889A11B5F0471007A0E9C /* BTCardNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardNonce.h; sourceTree = ""; }; - A7C889A21B5F0471007A0E9C /* BTCardNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTCardNonce.m; sourceTree = ""; }; - A7C889D71B5F0ACB007A0E9C /* BTCardNonce_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTCardNonce_Internal.h; sourceTree = ""; }; - A7C889F11B5F0B30007A0E9C /* BraintreeVenmo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BraintreeVenmo.h; sourceTree = ""; }; - A7C889F81B5F0B6A007A0E9C /* Braintree-Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Braintree-Version.h"; sourceTree = ""; }; - A7C889FA1B5F0C00007A0E9C /* BTVenmoDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTVenmoDriver.h; sourceTree = ""; }; - A7C889FB1B5F0C00007A0E9C /* BTVenmoDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoDriver.m; sourceTree = ""; }; - A7CB42D21B73E629002CCFDD /* BraintreePayPal_IntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BraintreePayPal_IntegrationTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - A7CCE2AD1B67F26C006EA661 /* BTAppSwitch_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTAppSwitch_Tests.swift; sourceTree = ""; }; - A7D4630B1B4B16C100A09C46 /* BTHTTPTestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTHTTPTestProtocol.h; sourceTree = ""; }; - A7D4630C1B4B16C100A09C46 /* BTHTTPTestProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTHTTPTestProtocol.m; sourceTree = ""; }; - A7D64ABB1B4C93B6005168EF /* BTApplePay_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTApplePay_Tests.swift; sourceTree = ""; }; - A7D6746C1B84073300ED6C00 /* MockDelegates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockDelegates.swift; sourceTree = ""; }; - A7D674711B84FDB400ED6C00 /* BTClientToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTClientToken.h; sourceTree = ""; }; - A7D674721B84FDB400ED6C00 /* BTClientToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTClientToken.m; sourceTree = ""; }; - A7E6E8E11B420D0C004CFA95 /* UnitTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnitTests-Bridging-Header.h"; sourceTree = ""; }; - A7E93E571B601EE900957223 /* BTURLUtils_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTURLUtils_Tests.swift; sourceTree = ""; }; - A7ECA5E41BEBD34100437A4F /* BTDropInViewController_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTDropInViewController_Internal.h; sourceTree = ""; }; - A7F179FD1BE98E0E00E91646 /* BTPaymentRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTPaymentRequest.m; sourceTree = ""; }; - A7F179FF1BE98E1E00E91646 /* BTPaymentRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTPaymentRequest.h; sourceTree = ""; }; - A7F96D061B6043B7005A4A09 /* BTVenmoAccountNonce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTVenmoAccountNonce.h; sourceTree = ""; }; - A7F96D071B6043B7005A4A09 /* BTVenmoAccountNonce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAccountNonce.m; sourceTree = ""; }; - A7F96D0A1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BTVenmoAppSwitchRequestURL.h; sourceTree = ""; }; - A7F96D0B1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAppSwitchRequestURL.m; sourceTree = ""; }; - A7F96D0C1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BTVenmoAppSwitchReturnURL.h; sourceTree = ""; }; - A7F96D0D1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAppSwitchReturnURL.m; sourceTree = ""; }; - B61F677E1CE4C20F0051A3BD /* BTConfiguration+DataCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BTConfiguration+DataCollector.h"; sourceTree = ""; }; - B61F677F1CE4C20F0051A3BD /* BTConfiguration+DataCollector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "BTConfiguration+DataCollector.m"; path = "Public/BTConfiguration+DataCollector.m"; sourceTree = ""; }; - B67F98391D762177007C1903 /* BTMacroTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTMacroTests.m; sourceTree = ""; }; - D242087B7E38C2B838C8866E /* libPods-Tests-IntegrationTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests-IntegrationTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D5477E9CCBB2B1B37661129D /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig"; sourceTree = ""; }; - D9AFC14FFCF2029AE39FA3BA /* Pods-Tests-IntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-IntegrationTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-IntegrationTests/Pods-Tests-IntegrationTests.debug.xcconfig"; sourceTree = ""; }; - EEF1DE881E858A31001BB924 /* BTEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BTEnums.h; sourceTree = ""; }; - F856ADC418A9254523A85526 /* Pods-Tests-UnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-UnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests-UnitTests/Pods-Tests-UnitTests.debug.xcconfig"; sourceTree = ""; }; - FD5B458BFE02563982017D5E /* libPods-Tests-UnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests-UnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 03F8B2631C23976000FD184B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16CD2E991B4077FB00E68495 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 03CFEF3E1CD3124F006D2DA5 /* PayPalUtils.framework in Frameworks */, - 4169A8F11CAB10680051DDAF /* BraintreeUnionPay.framework in Frameworks */, - A5D3A5A41C20BEE1003A25A1 /* PayPalOneTouch.framework in Frameworks */, - 841CDCC21BCDBC1500A06B21 /* BraintreeDataCollector.framework in Frameworks */, - 411D1C001BB0B528000E7D8C /* Braintree3DSecure.framework in Frameworks */, - 411D1C011BB0B528000E7D8C /* BraintreeApplePay.framework in Frameworks */, - 411D1C021BB0B528000E7D8C /* BraintreeCard.framework in Frameworks */, - 411D1C031BB0B528000E7D8C /* BraintreeCore.framework in Frameworks */, - 411D1C041BB0B528000E7D8C /* BraintreePayPal.framework in Frameworks */, - 411D1C051BB0B528000E7D8C /* BraintreeUI.framework in Frameworks */, - 411D1C061BB0B528000E7D8C /* BraintreeVenmo.framework in Frameworks */, - 3E8581A0B6B678AFED359FA5 /* libPods-Tests-UnitTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D341B59C76A0016EFB4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D941D5B1B5D5F170016EFB4 /* BraintreeCore.framework in Frameworks */, - A50C3BCF1C1B453500612D90 /* PayPalOneTouch.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D841B5D9E8C0016EFB4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C88A2F1B5F10EF007A0E9C /* BraintreeCard.framework in Frameworks */, - 2D941DA61B5D9F7F0016EFB4 /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DE12F051B59BE0100EA1BCF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4164B99D1C9B658E006AE861 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4164B9B11C9B68CC006AE861 /* BraintreeCard.framework in Frameworks */, - 4164B99E1C9B658E006AE861 /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 417404461BB084D3008A5DEA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A7B4625C1C3C93EB00048423 /* libPayPalOneTouch-StaticLibrary.a in Frameworks */, - A7B4625D1C3C93EB00048423 /* libPayPalDataCollector-StaticLibrary.a in Frameworks */, - A76D7C3B1BB31A4B0000FA6A /* libDeviceCollectorLibrary.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7EDE47581CD2C3D00005E22B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDE47591CD2C3D00005E22B /* SystemConfiguration.framework in Frameworks */, - 7EDE475A1CD2C3D00005E22B /* UIKit.framework in Frameworks */, - 7EDE475B1CD2C3D00005E22B /* CoreLocation.framework in Frameworks */, - 7EDE475C1CD2C3D00005E22B /* MessageUI.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3AD21C19F00600612D90 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A50C3B111C19F6C200612D90 /* libPayPalDataCollector-StaticLibrary.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B021C19F55C00612D90 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A76B991A1C3EF48E00A584F6 /* libPPRiskComponent.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B6B1C1A29C500612D90 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDE47721CD2C51C0005E22B /* PayPalUtils.framework in Frameworks */, - 41D54D301C7F97750051C96B /* BraintreeCore.framework in Frameworks */, - A7B463071C3D9F4D00048423 /* PayPalDataCollector.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76B19881B79707700452CFA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 03EF62061DB4A90C004F4090 /* BraintreeCore.framework in Frameworks */, - 03EF62321DB4A90D004F4090 /* BraintreeUnionPay.framework in Frameworks */, - 03EF62121DB4A90C004F4090 /* BraintreeApplePay.framework in Frameworks */, - 03EF621A1DB4A90C004F4090 /* BraintreeVenmo.framework in Frameworks */, - 03EF621E1DB4A90C004F4090 /* BraintreeUI.framework in Frameworks */, - 03EF620E1DB4A90C004F4090 /* Braintree3DSecure.framework in Frameworks */, - 03EF622E1DB4A90D004F4090 /* PayPalUtils.framework in Frameworks */, - 03EF62161DB4A90C004F4090 /* BraintreeCard.framework in Frameworks */, - 03EF62221DB4A90C004F4090 /* BraintreeDataCollector.framework in Frameworks */, - 03EF622A1DB4A90D004F4090 /* PayPalDataCollector.framework in Frameworks */, - 03EF620A1DB4A90C004F4090 /* BraintreePayPal.framework in Frameworks */, - 03EF62261DB4A90C004F4090 /* PayPalOneTouch.framework in Frameworks */, - 68178D54CF930DF9D5BC76FB /* libPods-Demo.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76D7BFC1BB1CAB00000FA6A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 41935DE61D528B25008D48FB /* BraintreeCore.framework in Frameworks */, - A76D7C2A1BB1D31A0000FA6A /* libDeviceCollectorLibrary.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77344F31B7A93A10083EC8D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A77120521CD95DD50004FFD3 /* BraintreeCard.framework in Frameworks */, - 412FE05B1B97B03B008AAABE /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77AA2981B618C7700217B73 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A77AA2B31B618D6200217B73 /* BraintreeCard.framework in Frameworks */, - A77AA2B41B618D6200217B73 /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7ABD6501B702FD800A1223C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4169A8F81CAB11300051DDAF /* BraintreeUI.framework in Frameworks */, - 4169A8F91CAB11300051DDAF /* BraintreeUnionPay.framework in Frameworks */, - 4169A8FA1CAB11300051DDAF /* PayPalOneTouch.framework in Frameworks */, - A76D7C391BB318CF0000FA6A /* BraintreeDataCollector.framework in Frameworks */, - 411D1C071BB0B56E000E7D8C /* Braintree3DSecure.framework in Frameworks */, - 411D1C081BB0B56E000E7D8C /* BraintreeApplePay.framework in Frameworks */, - 411D1C091BB0B56E000E7D8C /* BraintreeCard.framework in Frameworks */, - 411D1C0A1BB0B56E000E7D8C /* BraintreeCore.framework in Frameworks */, - 411D1C0B1BB0B56E000E7D8C /* BraintreePayPal.framework in Frameworks */, - 411D1C0D1BB0B56E000E7D8C /* BraintreeVenmo.framework in Frameworks */, - FD51728B52E751D1E5DC85F7 /* libPods-Tests-IntegrationTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7B462ED1C3D9C2200048423 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDE47731CD2C5270005E22B /* PayPalUtils.framework in Frameworks */, - A7B462EE1C3D9C2200048423 /* SystemConfiguration.framework in Frameworks */, - A7B462EF1C3D9C2200048423 /* UIKit.framework in Frameworks */, - A7B462F01C3D9C2200048423 /* CoreLocation.framework in Frameworks */, - A7B462F11C3D9C2200048423 /* MessageUI.framework in Frameworks */, - A7B462F21C3D9C2200048423 /* libPPRiskComponent.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C889701B5EF5DE007A0E9C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C8898A1B5EF737007A0E9C /* PassKit.framework in Frameworks */, - A7C889881B5EF685007A0E9C /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C8898C1B5F043B007A0E9C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C889AB1B5F04E9007A0E9C /* BraintreeCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 031B94BA1C34822800F136C8 /* Braintree-UI-Specs */ = { - isa = PBXGroup; - children = ( - 031B94BB1C34822800F136C8 /* BTUI_UIColor.m */, - 031B94BC1C34822800F136C8 /* BTUICardExpirationValidatorSpec.m */, - 031B94BD1C34822800F136C8 /* BTUICardExpiryFormatterSpec.m */, - 031B94BF1C34822800F136C8 /* BTUICardTypeSpec.m */, - 031B94C01C34822800F136C8 /* BTUISpec.m */, - 031B94C21C34822800F136C8 /* EXPMatchers+haveKerning.h */, - 031B94C31C34822800F136C8 /* EXPMatchers+haveKerning.m */, - ); - path = "Braintree-UI-Specs"; - sourceTree = ""; - }; - 0384E9501C23C111001A3380 /* Helpers */ = { - isa = PBXGroup; - children = ( - 0384E94E1C23C108001A3380 /* BTUITest.swift */, - ); - name = Helpers; - sourceTree = ""; - }; - 03B368B01CAD95D300CDFC9C /* Drop In Old */ = { - isa = PBXGroup; - children = ( - 03B368B11CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.h */, - 03B368B21CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.m */, - ); - path = "Drop In Old"; - sourceTree = ""; - }; - 03CFEF251CD30B15006D2DA5 /* Public */ = { - isa = PBXGroup; - children = ( - 03CFEF261CD30B15006D2DA5 /* PPOTDevice.h */, - 03CFEF271CD30B15006D2DA5 /* PPOTEncryptionHelper.h */, - 03CFEF281CD30B15006D2DA5 /* PPOTJSONHelper.h */, - 03CFEF291CD30B15006D2DA5 /* PPOTMacros.h */, - 03CFEF2A1CD30B15006D2DA5 /* PPOTPinnedCertificates.h */, - 03CFEF2B1CD30B15006D2DA5 /* PPOTSimpleKeychain.h */, - 03CFEF2C1CD30B15006D2DA5 /* PPOTString.h */, - 03CFEF2D1CD30B15006D2DA5 /* PPOTTime.h */, - 03CFEF2E1CD30B15006D2DA5 /* PPOTURLSession.h */, - 03CFEF2F1CD30B15006D2DA5 /* PPOTVersion.h */, - 03CFEF3A1CD30C28006D2DA5 /* PayPalUtils.h */, - ); - path = Public; - sourceTree = ""; - }; - 03F54E0F1C499E1200F11033 /* PayPal - Force Future Payment */ = { - isa = PBXGroup; - children = ( - 03F54E101C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.h */, - 03F54E111C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.m */, - ); - path = "PayPal - Force Future Payment"; - sourceTree = ""; - }; - 03F8B2671C23976000FD184B /* UITests */ = { - isa = PBXGroup; - children = ( - 0338000F1C248B9C00CFF1D9 /* BraintreeDropInLegacy_UITests.swift */, - 0384E94C1C23BAFF001A3380 /* BraintreePayPal_UITests.swift */, - 0325AC231C289B5F00E90999 /* BraintreeThreeDSecure_UITests.swift */, - 0384E9501C23C111001A3380 /* Helpers */, - 03F8B26A1C23976100FD184B /* Info.plist */, - ); - path = UITests; - sourceTree = ""; - }; - 16CD2E9D1B4077FC00E68495 /* UnitTests */ = { - isa = PBXGroup; - children = ( - B67F983B1D7622D9007C1903 /* Braintree-Dropin */, - 031B94BA1C34822800F136C8 /* Braintree-UI-Specs */, - A726BFE11B56D5E900B5C8F0 /* BTAnalyticsMetadataSpec.m */, - A74BF1C71C57FBED0049E149 /* BTAnalyticsService_Tests.m */, - 842B68F01BCF083E0039634F /* BTAPIClient_SwiftTests.swift */, - A743CD201B449D8400757C9B /* BTAPIClient_Tests.m */, - A7D64ABB1B4C93B6005168EF /* BTApplePay_Tests.swift */, - A7CCE2AD1B67F26C006EA661 /* BTAppSwitch_Tests.swift */, - A790339B1B45E16E004C8234 /* BTCard_Internal_Tests.m */, - A79033971B45C968004C8234 /* BTCard_Tests.swift */, - A75147E01B4217A00005BBBA /* BTCardClient_Tests.swift */, - 41F1D1FA1CAA005500DA34CB /* BTCardClient_UnionPayTests.swift */, - A7A094F51B8276E500D732CC /* BTCardNonce_Tests.swift */, - A78496591BD962260081531A /* BTCheckoutRequest_Tests.swift */, - A79AF9F21B56DB54007B1DF1 /* BTClientMetadataSpec.m */, - A734A98D1B8797FD00D2461B /* BTClientTokenSpec.m */, - A7B7989B1C233C57001327FA /* BTConfiguration_Tests.swift */, - 844ED5E61BCC3F0B002B590C /* BTDataCollector_Tests.swift */, - A7BC50BE1C29F6600024C870 /* BTDropInErrorState_Tests.m */, - 032C26871DDEEB5000BBC1C2 /* BTDropInUtil_Tests.swift */, - 41B787BC1BAA20DB001AD351 /* BTDropInViewController_Tests.swift */, - A7C823071B4DA9D7009D45D6 /* BTHTTPSpec.m */, - 16CD2E9E1B4077FC00E68495 /* BTJSON_Tests.swift */, - A7BC50BA1C29E4CD0024C870 /* BTLogger_Internal_Tests.m */, - B67F98391D762177007C1903 /* BTMacroTests.m */, - A7AF0F611C222F9400B3ADC6 /* BTPaymentButton_Tests.swift */, - 4149C91C1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift */, - A7A6DD061B4308EB008857E1 /* BTPayPalDriver_Tests.swift */, - A74BCF021BE14C7000DC1CAE /* BTThreeDSecureDriver_Tests.swift */, - A7AF0F5F1C20E80A00B3ADC6 /* BTThreeDSecureLookupResult_Tests.swift */, - A7B7989F1C238FC0001327FA /* BTTokenizationService_Tests.swift */, - A7E93E571B601EE900957223 /* BTURLUtils_Tests.swift */, - A71F7DDF1B616BA0005DA1B0 /* BTVenmoAppSwitchReturnURLSpec.m */, - A71F7DE01B616BA0005DA1B0 /* BTVenmoAppSwitchURLSpec.m */, - A71F7DE61B6180A3005DA1B0 /* BTVenmoDriver_Tests.swift */, - A7B861BE1C24B19300A2422E /* BTVersion_Tests.swift */, - A7C8230F1B4DAAFB009D45D6 /* Helpers */, - 16CD2EA01B4077FC00E68495 /* Info.plist */, - A7B462431C3C90DB00048423 /* PayPalOneTouch */, - A7E6E8E11B420D0C004CFA95 /* UnitTests-Bridging-Header.h */, - ); - path = UnitTests; - sourceTree = ""; - }; - 2D941D391B59C76A0016EFB4 /* BraintreePayPal */ = { - isa = PBXGroup; - children = ( - A7B1C14A1B66E11C00ED063C /* BTConfiguration+PayPal.m */, - A7102E191B5085BB0007D40A /* BTPayPalAccountNonce_Internal.h */, - 16E17D1B1B3DE4580024F9AB /* BTPayPalAccountNonce.m */, - A5FE18301E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m */, - A5FE18341E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m */, - A734D95E1B4C4C0700FE0E1B /* BTPayPalDriver_Internal.h */, - 16C42B6D1B3DE0550028A3B4 /* BTPayPalDriver.m */, - 16E17D271B3DFA0F0024F9AB /* BTPayPalRequest.m */, - A734D95A1B4C4B1000FE0E1B /* BTPayPalRequestFactory.h */, - A734D95B1B4C4B1000FE0E1B /* BTPayPalRequestFactory.m */, - A50C3AF81C19F14D00612D90 /* PayPalDataCollector */, - A50C3A8C1C19E4F300612D90 /* PayPalOneTouch */, - A7B4628C1C3D9B6700048423 /* PayPalUtils */, - 41777D461B8D02050026F987 /* Public */, - ); - path = BraintreePayPal; - sourceTree = ""; - }; - 2D941D891B5D9E8C0016EFB4 /* Braintree3DSecure */ = { - isa = PBXGroup; - children = ( - A79AFA401B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.h */, - A79AFA411B56F822007B1DF1 /* BTThreeDSecureAuthenticationViewController.m */, - A79C9C6F1BE17BBF007EAF73 /* BTThreeDSecureDriver_Internal.h */, - A79AFA7F1B56FEE4007B1DF1 /* BTThreeDSecureDriver.m */, - A79AFA421B56F822007B1DF1 /* BTThreeDSecureErrors.m */, - A79AFA7A1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.h */, - A79AFA7B1B56FBD1007B1DF1 /* BTThreeDSecureLookupResult.m */, - A79AFA3D1B56F822007B1DF1 /* BTThreeDSecureResponse.h */, - A79AFA441B56F822007B1DF1 /* BTThreeDSecureResponse.m */, - A79AFA771B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.m */, - A79AFA451B56F822007B1DF1 /* BTWebViewController.h */, - A79AFA461B56F822007B1DF1 /* BTWebViewController.m */, - A79AFA471B56F822007B1DF1 /* Localization */, - 41D6E2A91B8D24A400A3C2AE /* Public */, - ); - path = Braintree3DSecure; - sourceTree = ""; - }; - 2DE12F0A1B59BE0100EA1BCF /* BraintreeCore */ = { - isa = PBXGroup; - children = ( - A7C889F81B5F0B6A007A0E9C /* Braintree-Version.h */, - A7A6DD3E1B445550008857E1 /* BTAnalyticsMetadata.h */, - A7A6DD3F1B445550008857E1 /* BTAnalyticsMetadata.m */, - A74BF1C31C57F25F0049E149 /* BTAnalyticsService.h */, - A74BF1C41C57F25F0049E149 /* BTAnalyticsService.m */, - A7A6DD2C1B431B75008857E1 /* BTAPIClient_Internal.h */, - 16C42B691B3DDFE00028A3B4 /* BTAPIClient.m */, - A7A6DD4A1B445A29008857E1 /* BTAPIPinnedCertificates.h */, - A7A6DD4B1B445A29008857E1 /* BTAPIPinnedCertificates.m */, - A7B1C1521B66F79900ED063C /* BTAppSwitch.m */, - A72E13501B446DED002703DD /* BTClientMetadata.m */, - A7D674721B84FDB400ED6C00 /* BTClientToken.m */, - A7B1C1421B66B3D000ED063C /* BTConfiguration.m */, - A77346231B7AA4D50083EC8D /* BTErrors.m */, - A7A6DD401B445550008857E1 /* BTHTTP.h */, - A7A6DD411B445550008857E1 /* BTHTTP.m */, - A79AFA861B5721F6007B1DF1 /* BTHTTPErrors.m */, - A79033A61B4AF360004C8234 /* BTJSON.m */, - A7A6DD4C1B445A29008857E1 /* BTKeychain.h */, - A7A6DD4D1B445A29008857E1 /* BTKeychain.m */, - A7A6DD131B4312DC008857E1 /* BTLogger_Internal.h */, - A7A6DD151B4312DC008857E1 /* BTLogger.m */, - 41211EF61BA0E45300DB1705 /* BTPaymentMethodNonce.m */, - 415924B01BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m */, - A72E134C1B44630C002703DD /* BTPostalAddress.m */, - A773462F1B7BB1A70083EC8D /* BTTokenizationService.m */, - A717542F1BDEF1EC00002676 /* BTURLUtils.h */, - A7A6DD511B445A29008857E1 /* BTURLUtils.m */, - 2DE12F0D1B59BE0100EA1BCF /* Info.plist */, - 41777D441B8CFEE60026F987 /* Public */, - ); - path = BraintreeCore; - sourceTree = ""; - }; - 412FE0581B97A7F6008AAABE /* Public */ = { - isa = PBXGroup; - children = ( - A77344F91B7A93A10083EC8D /* BraintreeUI.h */, - A77345F51B7A9E340083EC8D /* BTDropInViewController.h */, - A77345F71B7A9E340083EC8D /* BTPaymentButton.h */, - A7F179FF1BE98E1E00E91646 /* BTPaymentRequest.h */, - A773452A1B7A93D00083EC8D /* BTUI.h */, - A77345551B7A93D00083EC8D /* BTUICardFormView.h */, - A77345581B7A93D00083EC8D /* BTUICardHint.h */, - A773455A1B7A93D00083EC8D /* BTUICoinbaseButton.h */, - A773455C1B7A93D00083EC8D /* BTUICTAControl.h */, - A773455E1B7A93D00083EC8D /* BTUIPaymentMethodView.h */, - 41913D9D1BB9D503004EF1BB /* BTUIPaymentOptionType.h */, - A70241BB1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.h */, - A77345601B7A93D00083EC8D /* BTUIPayPalButton.h */, - A77345621B7A93D00083EC8D /* BTUISummaryView.h */, - 41913D9E1BB9D503004EF1BB /* BTUIThemedView.h */, - A77345491B7A93D00083EC8D /* BTUIVectorArtView.h */, - A77345641B7A93D00083EC8D /* BTUIVenmoButton.h */, - A773452C1B7A93D00083EC8D /* UIColor+BTUI.h */, - ); - path = Public; - sourceTree = ""; - }; - 4164B9891C9B6553006AE861 /* BraintreeUnionPay */ = { - isa = PBXGroup; - children = ( - A77426561CA20793003CACBA /* BTCardCapabilities.m */, - 4164B9B91C9B6988006AE861 /* BTCardClient+UnionPay.m */, - 41472F921CB6D52200AFA75C /* BTConfiguration+UnionPay.m */, - 4164B9AE1C9B665D006AE861 /* Public */, - ); - path = BraintreeUnionPay; - sourceTree = ""; - }; - 4164B9AE1C9B665D006AE861 /* Public */ = { - isa = PBXGroup; - children = ( - 4164B9AF1C9B6690006AE861 /* BraintreeUnionPay.h */, - A77426591CA207AE003CACBA /* BTCardCapabilities.h */, - 4164B9B81C9B6988006AE861 /* BTCardClient+UnionPay.h */, - 41472F961CB6D53400AFA75C /* BTConfiguration+UnionPay.h */, - ); - path = Public; - sourceTree = ""; - }; - 41777D441B8CFEE60026F987 /* Public */ = { - isa = PBXGroup; - children = ( - 2DE12F0B1B59BE0100EA1BCF /* BraintreeCore.h */, - 16C42B681B3DDFE00028A3B4 /* BTAPIClient.h */, - A7B1C1511B66F79900ED063C /* BTAppSwitch.h */, - A72E134F1B446DED002703DD /* BTClientMetadata.h */, - A7D674711B84FDB400ED6C00 /* BTClientToken.h */, - A7B1C1411B66B3D000ED063C /* BTConfiguration.h */, - EEF1DE881E858A31001BB924 /* BTEnums.h */, - A77346251B7AA4F10083EC8D /* BTErrors.h */, - A79AFA841B5721A2007B1DF1 /* BTHTTPErrors.h */, - A79033A51B4AF360004C8234 /* BTJSON.h */, - A7A6DD141B4312DC008857E1 /* BTLogger.h */, - 41211EF91BA0E47400DB1705 /* BTPaymentMethodNonce.h */, - 415924B31BA0F2D800C095F6 /* BTPaymentMethodNonceParser.h */, - A72E134B1B44630C002703DD /* BTPostalAddress.h */, - A773462E1B7BB1A60083EC8D /* BTTokenizationService.h */, - 418456E71BE42F0B00C32391 /* BTViewControllerPresentingDelegate.h */, - 16E17D061B3DE3B40024F9AB /* BTPaymentMethodNonce.h */, - ); - path = Public; - sourceTree = ""; - }; - 41777D451B8D01510026F987 /* Public */ = { - isa = PBXGroup; - children = ( - A7C889921B5F043B007A0E9C /* BraintreeCard.h */, - A7C8899F1B5F0471007A0E9C /* BTCard.h */, - A7C8899C1B5F0471007A0E9C /* BTCardClient.h */, - A7C889A11B5F0471007A0E9C /* BTCardNonce.h */, - A751CAAE1CAC4667008603E5 /* BTCardRequest.h */, - ); - path = Public; - sourceTree = ""; - }; - 41777D461B8D02050026F987 /* Public */ = { - isa = PBXGroup; - children = ( - A7B1C1491B66E11C00ED063C /* BTConfiguration+PayPal.h */, - 16E17D261B3DFA0F0024F9AB /* BTPayPalRequest.h */, - 16C42B6C1B3DE0550028A3B4 /* BTPayPalDriver.h */, - 16E17D1A1B3DE4570024F9AB /* BTPayPalAccountNonce.h */, - 2D941D3A1B59C76A0016EFB4 /* BraintreePayPal.h */, - A5F444AD1E89903E00B2B4F7 /* BTPayPalCreditFinancing.h */, - ); - path = Public; - sourceTree = ""; - }; - 41777D471B8D028C0026F987 /* Public */ = { - isa = PBXGroup; - children = ( - A7B1C1451B66D94600ED063C /* BTConfiguration+Venmo.h */, - A7C889FA1B5F0C00007A0E9C /* BTVenmoDriver.h */, - A7F96D061B6043B7005A4A09 /* BTVenmoAccountNonce.h */, - A7C889F11B5F0B30007A0E9C /* BraintreeVenmo.h */, - ); - path = Public; - sourceTree = ""; - }; - 41D6E2A81B8D242B00A3C2AE /* Public */ = { - isa = PBXGroup; - children = ( - A7C8897C1B5EF62C007A0E9C /* BTApplePayClient.h */, - A7B1C14D1B66E46900ED063C /* BTConfiguration+ApplePay.h */, - A7C8897E1B5EF62C007A0E9C /* BTApplePayCardNonce.h */, - A7C889861B5EF65C007A0E9C /* BraintreeApplePay.h */, - ); - path = Public; - sourceTree = ""; - }; - 41D6E2A91B8D24A400A3C2AE /* Public */ = { - isa = PBXGroup; - children = ( - A79AFA7E1B56FEE4007B1DF1 /* BTThreeDSecureDriver.h */, - A79AFA3B1B56F822007B1DF1 /* BTThreeDSecureErrors.h */, - A79AFA761B56F8C3007B1DF1 /* BTThreeDSecureCardNonce.h */, - 2D941D8A1B5D9E8C0016EFB4 /* Braintree3DSecure.h */, - ); - path = Public; - sourceTree = ""; - }; - 8D5C7770654B085D5D85F6A9 /* Pods */ = { - isa = PBXGroup; - children = ( - 10A1F947EB4DC18E4744F5FE /* Pods-Demo.debug.xcconfig */, - D5477E9CCBB2B1B37661129D /* Pods-Demo.release.xcconfig */, - D9AFC14FFCF2029AE39FA3BA /* Pods-Tests-IntegrationTests.debug.xcconfig */, - 0CF0BA897F9E79A01D6A2C66 /* Pods-Tests-IntegrationTests.release.xcconfig */, - F856ADC418A9254523A85526 /* Pods-Tests-UnitTests.debug.xcconfig */, - 4621B720EE8A9B65FFFE3632 /* Pods-Tests-UnitTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - A50C3A8C1C19E4F300612D90 /* PayPalOneTouch */ = { - isa = PBXGroup; - children = ( - A50C3B731C1A29C500612D90 /* Info.plist */, - A50C3ACC1C19E78D00612D90 /* Configuration */, - A50C3A9F1C19E67A00612D90 /* Models */, - A50C3A9D1C19E66600612D90 /* Public */, - A50C3A9C1C19E65C00612D90 /* Analytics */, - ); - name = PayPalOneTouch; - path = ..; - sourceTree = ""; - }; - A50C3A9C1C19E65C00612D90 /* Analytics */ = { - isa = PBXGroup; - children = ( - A50C3A921C19E65700612D90 /* PPFPTIData.h */, - A50C3A931C19E65700612D90 /* PPFPTIData.m */, - A50C3A941C19E65700612D90 /* PPFPTITracker.h */, - A50C3A951C19E65700612D90 /* PPFPTITracker.m */, - A50C3A961C19E65700612D90 /* PPOTAnalyticsDefines.h */, - A50C3A971C19E65700612D90 /* PPOTAnalyticsTracker.h */, - A50C3A981C19E65700612D90 /* PPOTAnalyticsTracker.m */, - ); - name = Analytics; - sourceTree = ""; - }; - A50C3A9D1C19E66600612D90 /* Public */ = { - isa = PBXGroup; - children = ( - A7B4638A1C3DCEAD00048423 /* PayPalOneTouch.h */, - A50C3AA01C19E6A200612D90 /* PPOTCore.h */, - A50C3AA11C19E6A200612D90 /* PPOTResult.h */, - A50C3AA21C19E6A200612D90 /* PPOTRequest.h */, - A50C3AA31C19E6A200612D90 /* PPOTRequestFactory.h */, - ); - name = Public; - sourceTree = ""; - }; - A50C3A9F1C19E67A00612D90 /* Models */ = { - isa = PBXGroup; - children = ( - A50C3B121C19F7FC00612D90 /* PPOTAppSwitchResponse.h */, - A50C3B131C19F7FC00612D90 /* PPOTAppSwitchResponse.m */, - A50C3B141C19F7FC00612D90 /* PPOTAppSwitchUtil.h */, - A50C3B151C19F7FC00612D90 /* PPOTAppSwitchUtil.m */, - A50C3AB91C19E6EE00612D90 /* PPOTAuthorizationRequest_Internal.h */, - A50C3ABA1C19E6EE00612D90 /* PPOTAuthorizationRequest.m */, - A50C3ABB1C19E6EE00612D90 /* PPOTBillingAgreementRequest.m */, - A50C3B161C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.h */, - A50C3B171C19F7FC00612D90 /* PPOTCheckoutAppSwitchRequest.m */, - A50C3B181C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.h */, - A50C3B191C19F7FC00612D90 /* PPOTCheckoutBrowserSwitchRequest.m */, - A50C3ABC1C19E6EE00612D90 /* PPOTCheckoutRequest_Internal.h */, - A50C3ABD1C19E6EE00612D90 /* PPOTCheckoutRequest.m */, - A50C3B1A1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.h */, - A50C3B1B1C19F7FC00612D90 /* PPOTCheckoutSwitchRequest.m */, - A50C3ABE1C19E6EE00612D90 /* PPOTCore_Internal.h */, - A50C3ABF1C19E6EE00612D90 /* PPOTCore.m */, - A50C3AC01C19E6EE00612D90 /* PPOTResult_Internal.h */, - A50C3AC11C19E6EE00612D90 /* PPOTResult.m */, - A50C3B1C1C19F7FC00612D90 /* PPOTError.h */, - A50C3B1D1C19F7FC00612D90 /* PPOTError.m */, - A50C3B1E1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.h */, - A50C3B1F1C19F7FC00612D90 /* PPOTOAuth2AppSwitchRequest.m */, - A50C3B201C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.h */, - A50C3B211C19F7FC00612D90 /* PPOTOAuth2BrowserSwitchRequest.m */, - A50C3B221C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.h */, - A50C3B231C19F7FC00612D90 /* PPOTOAuth2SwitchRequest.m */, - A50C3B241C19F7FC00612D90 /* PPOTPersistentRequestData.h */, - A50C3B251C19F7FC00612D90 /* PPOTPersistentRequestData.m */, - A50C3AC21C19E6EE00612D90 /* PPOTRequest_Internal.h */, - A50C3AC31C19E6EE00612D90 /* PPOTRequest.m */, - A50C3AC41C19E6EE00612D90 /* PPOTRequestFactory.m */, - A50C3B261C19F7FC00612D90 /* PPOTSwitchRequest.h */, - A50C3B271C19F7FC00612D90 /* PPOTSwitchRequest.m */, - ); - name = Models; - sourceTree = ""; - }; - A50C3ACC1C19E78D00612D90 /* Configuration */ = { - isa = PBXGroup; - children = ( - A50C3ACD1C19E7F500612D90 /* otc-config.ios.json */, - A50C3ACE1C19E7F500612D90 /* PPDefaultConfigurationJSON.h */, - A50C3ACF1C19E7F500612D90 /* PPOTConfiguration.h */, - A50C3AD01C19E7F500612D90 /* PPOTConfiguration.m */, - ); - name = Configuration; - sourceTree = ""; - }; - A50C3AF81C19F14D00612D90 /* PayPalDataCollector */ = { - isa = PBXGroup; - children = ( - A50C3B631C1A288700612D90 /* Info.plist */, - A79BB5BE1CE501D500CC6F0E /* PPDataCollector_Internal.h */, - A7B4635F1C3DBEFE00048423 /* PPDataCollector.m */, - A7B4635C1C3DA7DF00048423 /* Public */, - A50C3AF91C19F27A00612D90 /* Risk */, - ); - path = PayPalDataCollector; - sourceTree = ""; - }; - A50C3AF91C19F27A00612D90 /* Risk */ = { - isa = PBXGroup; - children = ( - A50C3AFB1C19F52C00612D90 /* libPPRiskComponent.a */, - A50C3AFC1C19F52C00612D90 /* PPRCClientMetadataIDProvider.h */, - ); - path = Risk; - sourceTree = ""; - }; - A51527351D9EEFCF00FF3F77 /* Drop In */ = { - isa = PBXGroup; - children = ( - A51527361D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.h */, - A51527371D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.m */, - ); - path = "Drop In"; - sourceTree = ""; - }; - A5FE18371E79D57F00CBE9C7 /* PayPal - Credit */ = { - isa = PBXGroup; - children = ( - A5FE183B1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.h */, - A5FE183C1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.m */, - ); - path = "PayPal - Credit"; - sourceTree = ""; - }; - A715593F1B729297007DE6F0 /* Helpers */ = { - isa = PBXGroup; - children = ( - A71559401B729297007DE6F0 /* BTIntegrationTestsHelper.h */, - A71559411B729297007DE6F0 /* BTIntegrationTestsHelper.m */, - A75BAC671C1F691C00D66FB5 /* BTIntegrationTestsConstants.h */, - ); - path = Helpers; - sourceTree = ""; - }; - A7334F221BA38AF50083C411 /* PayPal - Billing Agreement */ = { - isa = PBXGroup; - children = ( - A7334F231BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.h */, - A7334F241BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.m */, - ); - path = "PayPal - Billing Agreement"; - sourceTree = ""; - }; - A75DA343192138F000D997A2 = { - isa = PBXGroup; - children = ( - 2D941D891B5D9E8C0016EFB4 /* Braintree3DSecure */, - A7C889751B5EF5DE007A0E9C /* BraintreeApplePay */, - A7C889911B5F043B007A0E9C /* BraintreeCard */, - 2DE12F0A1B59BE0100EA1BCF /* BraintreeCore */, - A76D7C011BB1CAB00000FA6A /* BraintreeDataCollector */, - 2D941D391B59C76A0016EFB4 /* BraintreePayPal */, - A77344F81B7A93A10083EC8D /* BraintreeUI */, - 4164B9891C9B6553006AE861 /* BraintreeUnionPay */, - A7C889F01B5F0B30007A0E9C /* BraintreeVenmo */, - A76B19A21B79708900452CFA /* Demo */, - A75DA3531921394200D997A2 /* Frameworks */, - A7ABD6541B702FD800A1223C /* IntegrationTests */, - A75DA3521921394200D997A2 /* Products */, - 03F8B2671C23976000FD184B /* UITests */, - 16CD2E9D1B4077FC00E68495 /* UnitTests */, - 8D5C7770654B085D5D85F6A9 /* Pods */, - ); - sourceTree = ""; - }; - A75DA3521921394200D997A2 /* Products */ = { - isa = PBXGroup; - children = ( - 16CD2E9C1B4077FB00E68495 /* UnitTests.xctest */, - 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */, - 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */, - 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */, - A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */, - A7C889901B5F043B007A0E9C /* BraintreeCard.framework */, - A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */, - A7ABD6531B702FD800A1223C /* IntegrationTests.xctest */, - A76B198B1B79707700452CFA /* Demo.app */, - A77344F71B7A93A10083EC8D /* BraintreeUI.framework */, - 417404491BB084D3008A5DEA /* libBraintree.a */, - A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */, - A50C3AD51C19F00600612D90 /* libPayPalOneTouch-StaticLibrary.a */, - A50C3B051C19F55C00612D90 /* libPayPalDataCollector-StaticLibrary.a */, - A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */, - 03F8B2661C23976000FD184B /* UITests.xctest */, - A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */, - 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */, - 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */, - ); - name = Products; - sourceTree = ""; - }; - A75DA3531921394200D997A2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - A76B99201C3EF5D300A584F6 /* libPods-Demo.a */, - A76B99211C3EF5D300A584F6 /* libPods-Test-Deps.a */, - A76B991E1C3EF59000A584F6 /* libFLEX.a */, - A7B462621C3C945600048423 /* libPods-Demo.a */, - A50C3BC41C1B3F1500612D90 /* UIKit.framework */, - 417453BE1BCEF9CB00F33B65 /* libPods-Demo-CocoaPods.a */, - A7C889891B5EF737007A0E9C /* PassKit.framework */, - A7A6DD281B43145D008857E1 /* SystemConfiguration.framework */, - A7A6DD261B431453008857E1 /* CoreLocation.framework */, - A7A6DD241B43144D008857E1 /* MessageUI.framework */, - A7B035B519D6273400750F8A /* PassKit.framework */, - A75DA3541921394200D997A2 /* Foundation.framework */, - A75DA3621921394200D997A2 /* XCTest.framework */, - A75DA3651921394200D997A2 /* UIKit.framework */, - 162174E1192D9220008DC35D /* CoreGraphics.framework */, - A3D9C499891AB1363F3E1290 /* libPods-Demo.a */, - D242087B7E38C2B838C8866E /* libPods-Tests-IntegrationTests.a */, - FD5B458BFE02563982017D5E /* libPods-Tests-UnitTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - A76B19A21B79708900452CFA /* Demo */ = { - isa = PBXGroup; - children = ( - A76B19A41B79708900452CFA /* Demo Base */, - A76B19BE1B79708900452CFA /* Features */, - A76B19FF1B79708A00452CFA /* Merchant API Client */, - A76B1A031B79708A00452CFA /* Supporting Files */, - A76B19A31B79708900452CFA /* Braintree-Demo.entitlements */, - A76B19FE1B79708A00452CFA /* Images.xcassets */, - A76B1A021B79708A00452CFA /* README.md */, - ); - path = Demo; - sourceTree = ""; - }; - A76B19A41B79708900452CFA /* Demo Base */ = { - isa = PBXGroup; - children = ( - A76B19A51B79708900452CFA /* Base View Controllers */, - A76B19B61B79708900452CFA /* Settings */, - A76B19AC1B79708900452CFA /* BraintreeDemoAppDelegate.h */, - A76B19AD1B79708900452CFA /* BraintreeDemoAppDelegate.m */, - A76B19AE1B79708900452CFA /* BraintreeDemoDemoContainmentViewController.h */, - A76B19AF1B79708900452CFA /* BraintreeDemoDemoContainmentViewController.m */, - A76B19B01B79708900452CFA /* BraintreeDemoIntegrationViewController.h */, - A76B19B11B79708900452CFA /* BraintreeDemoIntegrationViewController.m */, - A76B19B21B79708900452CFA /* BraintreeDemoSlideNavigationController.h */, - A76B19B31B79708900452CFA /* BraintreeDemoSlideNavigationController.m */, - A76B19B51B79708900452CFA /* Launch Screen.storyboard */, - ); - path = "Demo Base"; - sourceTree = ""; - }; - A76B19A51B79708900452CFA /* Base View Controllers */ = { - isa = PBXGroup; - children = ( - A76B19A61B79708900452CFA /* BraintreeDemoBaseViewController.h */, - A76B19A71B79708900452CFA /* BraintreeDemoBaseViewController.m */, - A76B19A81B79708900452CFA /* BraintreeDemoPaymentButtonBaseViewController.h */, - A76B19A91B79708900452CFA /* BraintreeDemoPaymentButtonBaseViewController.m */, - ); - path = "Base View Controllers"; - sourceTree = ""; - }; - A76B19B61B79708900452CFA /* Settings */ = { - isa = PBXGroup; - children = ( - A76B19B71B79708900452CFA /* BraintreeDemoSettings.h */, - A76B19B81B79708900452CFA /* BraintreeDemoSettings.m */, - A76B19B91B79708900452CFA /* Settings.bundle */, - ); - path = Settings; - sourceTree = ""; - }; - A76B19BE1B79708900452CFA /* Features */ = { - isa = PBXGroup; - children = ( - A51527351D9EEFCF00FF3F77 /* Drop In */, - 03B368B01CAD95D300CDFC9C /* Drop In Old */, - A76B19C21B79708900452CFA /* Apple Pay - PassKit */, - A76B19CB1B79708900452CFA /* Combined Button - BTPaymentButton */, - A76B19CE1B79708900452CFA /* Combined Button - Custom Multi-Pay Button */, - A76B19D11B79708900452CFA /* Credit Card Tokenization */, - A76B19D51B79708900452CFA /* Credit Cards - 3D Secure */, - A76B19DB1B79708900452CFA /* Fraud Protection - BTDataCollector */, - A7334F221BA38AF50083C411 /* PayPal - Billing Agreement */, - A76B19DE1B79708900452CFA /* PayPal - BTUIPayPalButton */, - A76B19E11B79708900452CFA /* PayPal - Checkout */, - A5FE18371E79D57F00CBE9C7 /* PayPal - Credit */, - A76B19E41B79708900452CFA /* PayPal - Custom Button */, - 03F54E0F1C499E1200F11033 /* PayPal - Force Future Payment */, - A76B19EA1B79708900452CFA /* PayPal - Scopes */, - A76B19ED1B79708900452CFA /* UI Components */, - A775245E1CC99B53002E4E62 /* UnionPay */, - A76B19F81B79708900452CFA /* Venmo - BTUIVenmoButton */, - A76B19FB1B79708900452CFA /* Venmo - Custom Button */, - ); - path = Features; - sourceTree = ""; - }; - A76B19C21B79708900452CFA /* Apple Pay - PassKit */ = { - isa = PBXGroup; - children = ( - A76B19C31B79708900452CFA /* BraintreeDemoApplePayPassKitViewController.h */, - A76B19C41B79708900452CFA /* BraintreeDemoApplePayPassKitViewController.m */, - ); - path = "Apple Pay - PassKit"; - sourceTree = ""; - }; - A76B19CB1B79708900452CFA /* Combined Button - BTPaymentButton */ = { - isa = PBXGroup; - children = ( - A76B19CC1B79708900452CFA /* BraintreeDemoBTPaymentButtonViewController.h */, - A76B19CD1B79708900452CFA /* BraintreeDemoBTPaymentButtonViewController.m */, - ); - path = "Combined Button - BTPaymentButton"; - sourceTree = ""; - }; - A76B19CE1B79708900452CFA /* Combined Button - Custom Multi-Pay Button */ = { - isa = PBXGroup; - children = ( - A76B19CF1B79708900452CFA /* BraintreeDemoCustomMultiPayViewController.h */, - A76B19D01B79708900452CFA /* BraintreeDemoCustomMultiPayViewController.m */, - ); - path = "Combined Button - Custom Multi-Pay Button"; - sourceTree = ""; - }; - A76B19D11B79708900452CFA /* Credit Card Tokenization */ = { - isa = PBXGroup; - children = ( - A76B19D21B79708900452CFA /* BraintreeDemoCardTokenizationViewController.h */, - A76B19D31B79708900452CFA /* BraintreeDemoCardTokenizationViewController.m */, - A76B19D41B79708900452CFA /* BraintreeDemoCardTokenizationViewController.xib */, - ); - path = "Credit Card Tokenization"; - sourceTree = ""; - }; - A76B19D51B79708900452CFA /* Credit Cards - 3D Secure */ = { - isa = PBXGroup; - children = ( - A76B19D61B79708900452CFA /* BraintreeDemoThreeDSecureViewController.h */, - A76B19D71B79708900452CFA /* BraintreeDemoThreeDSecureViewController.m */, - ); - path = "Credit Cards - 3D Secure"; - sourceTree = ""; - }; - A76B19DB1B79708900452CFA /* Fraud Protection - BTDataCollector */ = { - isa = PBXGroup; - children = ( - A76B19DC1B79708900452CFA /* BraintreeDemoBTDataCollectorViewController.h */, - A76B19DD1B79708900452CFA /* BraintreeDemoBTDataCollectorViewController.m */, - ); - path = "Fraud Protection - BTDataCollector"; - sourceTree = ""; - }; - A76B19DE1B79708900452CFA /* PayPal - BTUIPayPalButton */ = { - isa = PBXGroup; - children = ( - A76B19DF1B79708900452CFA /* BraintreeDemoBTUIPayPalButtonViewController.h */, - A76B19E01B79708900452CFA /* BraintreeDemoBTUIPayPalButtonViewController.m */, - ); - path = "PayPal - BTUIPayPalButton"; - sourceTree = ""; - }; - A76B19E11B79708900452CFA /* PayPal - Checkout */ = { - isa = PBXGroup; - children = ( - A76B19E21B79708900452CFA /* BraintreeDemoPayPalOneTimePaymentViewController.h */, - A76B19E31B79708900452CFA /* BraintreeDemoPayPalOneTimePaymentViewController.m */, - ); - path = "PayPal - Checkout"; - sourceTree = ""; - }; - A76B19E41B79708900452CFA /* PayPal - Custom Button */ = { - isa = PBXGroup; - children = ( - A76B19E51B79708900452CFA /* BraintreeDemoCustomPayPalButtonViewController.h */, - A76B19E61B79708900452CFA /* BraintreeDemoCustomPayPalButtonViewController.m */, - ); - path = "PayPal - Custom Button"; - sourceTree = ""; - }; - A76B19EA1B79708900452CFA /* PayPal - Scopes */ = { - isa = PBXGroup; - children = ( - A76B19EB1B79708900452CFA /* BraintreeDemoPayPalScopesViewController.h */, - A76B19EC1B79708900452CFA /* BraintreeDemoPayPalScopesViewController.m */, - ); - path = "PayPal - Scopes"; - sourceTree = ""; - }; - A76B19ED1B79708900452CFA /* UI Components */ = { - isa = PBXGroup; - children = ( - A76B19EE1B79708900452CFA /* BraintreeDemoCardHintViewController.h */, - A76B19EF1B79708900452CFA /* BraintreeDemoCardHintViewController.m */, - A76B19F01B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.h */, - A76B19F11B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.m */, - A76B19F21B79708900452CFA /* BraintreeDemoCreditCardEntryViewController.xib */, - A76B19F31B79708900452CFA /* BraintreeDemoPaymentsUIComponentsViewController.h */, - A76B19F41B79708900452CFA /* BraintreeDemoPaymentsUIComponentsViewController.m */, - A76B19F51B79708900452CFA /* BraintreeDemoUIWidgetsViewController.h */, - A76B19F61B79708900452CFA /* BraintreeDemoUIWidgetsViewController.m */, - A76B19F71B79708900452CFA /* UI.storyboard */, - ); - path = "UI Components"; - sourceTree = ""; - }; - A76B19F81B79708900452CFA /* Venmo - BTUIVenmoButton */ = { - isa = PBXGroup; - children = ( - A76B19F91B79708900452CFA /* BraintreeDemoBTUIVenmoButtonViewController.h */, - A76B19FA1B79708900452CFA /* BraintreeDemoBTUIVenmoButtonViewController.m */, - ); - path = "Venmo - BTUIVenmoButton"; - sourceTree = ""; - }; - A76B19FB1B79708900452CFA /* Venmo - Custom Button */ = { - isa = PBXGroup; - children = ( - A76B19FC1B79708A00452CFA /* BraintreeDemoCustomVenmoButtonViewController.h */, - A76B19FD1B79708A00452CFA /* BraintreeDemoCustomVenmoButtonViewController.m */, - ); - path = "Venmo - Custom Button"; - sourceTree = ""; - }; - A76B19FF1B79708A00452CFA /* Merchant API Client */ = { - isa = PBXGroup; - children = ( - A76B1A001B79708A00452CFA /* BraintreeDemoMerchantAPI.h */, - A76B1A011B79708A00452CFA /* BraintreeDemoMerchantAPI.m */, - ); - path = "Merchant API Client"; - sourceTree = ""; - }; - A76B1A031B79708A00452CFA /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A76B1A041B79708A00452CFA /* Braintree-Demo-Info.plist */, - A76B1A051B79708A00452CFA /* Braintree-Demo-Prefix.pch */, - A76B1A061B79708A00452CFA /* InfoPlist.strings */, - A76B1A081B79708A00452CFA /* Main.strings */, - A76B1A0A1B79708A00452CFA /* main.m */, - ); - path = "Supporting Files"; - sourceTree = ""; - }; - A76D7C011BB1CAB00000FA6A /* BraintreeDataCollector */ = { - isa = PBXGroup; - children = ( - B61F677F1CE4C20F0051A3BD /* BTConfiguration+DataCollector.m */, - A76D7C221BB1CBDC0000FA6A /* BTDataCollector.m */, - 413CDF4E1C779ED400B89FCA /* BTDataCollector_Internal.h */, - A76D7C251BB1D31A0000FA6A /* Kount */, - A76D7C1D1BB1CBBF0000FA6A /* Public */, - A76D7C2C1BB1D35A0000FA6A /* README.md */, - ); - path = BraintreeDataCollector; - sourceTree = ""; - }; - A76D7C1D1BB1CBBF0000FA6A /* Public */ = { - isa = PBXGroup; - children = ( - B61F677E1CE4C20F0051A3BD /* BTConfiguration+DataCollector.h */, - A76D7C1E1BB1CBD50000FA6A /* BraintreeDataCollector.h */, - A76D7C1F1BB1CBD50000FA6A /* BTDataCollector.h */, - ); - path = Public; - sourceTree = ""; - }; - A76D7C251BB1D31A0000FA6A /* Kount */ = { - isa = PBXGroup; - children = ( - A51527321D9C3DC600FF3F77 /* KDataCollector.h */, - A76D7C271BB1D31A0000FA6A /* libDeviceCollectorLibrary.a */, - ); - path = Kount; - sourceTree = ""; - }; - A77344F81B7A93A10083EC8D /* BraintreeUI */ = { - isa = PBXGroup; - children = ( - A77345EA1B7A9E340083EC8D /* Drop-In */, - A77345061B7A93D00083EC8D /* Localization */, - A773451F1B7A93D00083EC8D /* Models */, - 412FE0581B97A7F6008AAABE /* Public */, - A77345281B7A93D00083EC8D /* README.md */, - A77345291B7A93D00083EC8D /* Theme */, - A773452E1B7A93D00083EC8D /* Views */, - ); - path = BraintreeUI; - sourceTree = ""; - }; - A77345061B7A93D00083EC8D /* Localization */ = { - isa = PBXGroup; - children = ( - A77345071B7A93D00083EC8D /* BTUILocalizedString.h */, - A77345081B7A93D00083EC8D /* BTUILocalizedString.m */, - A77345091B7A93D00083EC8D /* UI.strings */, - ); - path = Localization; - sourceTree = ""; - }; - A773451F1B7A93D00083EC8D /* Models */ = { - isa = PBXGroup; - children = ( - A7F179FD1BE98E0E00E91646 /* BTPaymentRequest.m */, - A77345201B7A93D00083EC8D /* BTUICardExpirationValidator.h */, - A77345211B7A93D00083EC8D /* BTUICardExpirationValidator.m */, - A77345221B7A93D00083EC8D /* BTUICardExpiryFormat.h */, - A77345231B7A93D00083EC8D /* BTUICardExpiryFormat.m */, - A77345241B7A93D00083EC8D /* BTUICardType.h */, - A77345251B7A93D00083EC8D /* BTUICardType.m */, - A77345261B7A93D00083EC8D /* BTUIUtil.h */, - A77345271B7A93D00083EC8D /* BTUIUtil.m */, - ); - path = Models; - sourceTree = ""; - }; - A77345291B7A93D00083EC8D /* Theme */ = { - isa = PBXGroup; - children = ( - A773452B1B7A93D00083EC8D /* BTUI.m */, - A773452D1B7A93D00083EC8D /* UIColor+BTUI.m */, - ); - path = Theme; - sourceTree = ""; - }; - A773452E1B7A93D00083EC8D /* Views */ = { - isa = PBXGroup; - children = ( - A773452F1B7A93D00083EC8D /* Apple Pay */, - A77345361B7A93D00083EC8D /* Collection Views */, - A773453D1B7A93D00083EC8D /* Custom Views */, - A773454B1B7A93D00083EC8D /* Form Fields */, - A77345541B7A93D00083EC8D /* Forms */, - A77345571B7A93D00083EC8D /* Payments Components */, - A77345661B7A93D00083EC8D /* Vector Art */, - A77345341B7A93D00083EC8D /* BTUIViewUtil.h */, - A77345351B7A93D00083EC8D /* BTUIViewUtil.m */, - ); - path = Views; - sourceTree = ""; - }; - A773452F1B7A93D00083EC8D /* Apple Pay */ = { - isa = PBXGroup; - children = ( - A77345301B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.h */, - A77345311B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.m */, - A77345321B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.h */, - A77345331B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.m */, - ); - path = "Apple Pay"; - sourceTree = ""; - }; - A77345361B7A93D00083EC8D /* Collection Views */ = { - isa = PBXGroup; - children = ( - A77345371B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.h */, - A77345381B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m */, - A77345391B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.h */, - A773453A1B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m */, - A773453B1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.h */, - A773453C1B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m */, - ); - path = "Collection Views"; - sourceTree = ""; - }; - A773453D1B7A93D00083EC8D /* Custom Views */ = { - isa = PBXGroup; - children = ( - A773453E1B7A93D00083EC8D /* BTUIFloatLabel.h */, - A773453F1B7A93D00083EC8D /* BTUIFloatLabel.m */, - A77345401B7A93D00083EC8D /* BTUIFormField.h */, - A77345411B7A93D00083EC8D /* BTUIFormField.m */, - A77345421B7A93D00083EC8D /* BTUIFormField_Protected.h */, - A77345431B7A93D00083EC8D /* BTUIScrollView.h */, - A77345441B7A93D00083EC8D /* BTUIScrollView.m */, - A77345451B7A93D00083EC8D /* BTUITextField.h */, - A77345461B7A93D00083EC8D /* BTUITextField.m */, - A77345481B7A93D00083EC8D /* BTUIThemedView.m */, - A773454A1B7A93D00083EC8D /* BTUIVectorArtView.m */, - ); - path = "Custom Views"; - sourceTree = ""; - }; - A773454B1B7A93D00083EC8D /* Form Fields */ = { - isa = PBXGroup; - children = ( - A773454C1B7A93D00083EC8D /* BTUICardCvvField.h */, - A773454D1B7A93D00083EC8D /* BTUICardCvvField.m */, - A773454E1B7A93D00083EC8D /* BTUICardExpiryField.h */, - A773454F1B7A93D00083EC8D /* BTUICardExpiryField.m */, - A77345501B7A93D00083EC8D /* BTUICardNumberField.h */, - A77345511B7A93D00083EC8D /* BTUICardNumberField.m */, - A77345521B7A93D00083EC8D /* BTUICardPostalCodeField.h */, - A77345531B7A93D00083EC8D /* BTUICardPostalCodeField.m */, - 4107EB211C88C75000F32D81 /* BTUICardPhoneNumberField.h */, - 4107EB221C88C75000F32D81 /* BTUICardPhoneNumberField.m */, - ); - path = "Form Fields"; - sourceTree = ""; - }; - A77345541B7A93D00083EC8D /* Forms */ = { - isa = PBXGroup; - children = ( - A77345561B7A93D00083EC8D /* BTUICardFormView.m */, - ); - path = Forms; - sourceTree = ""; - }; - A77345571B7A93D00083EC8D /* Payments Components */ = { - isa = PBXGroup; - children = ( - A773455D1B7A93D00083EC8D /* BTUICTAControl.m */, - A77345591B7A93D00083EC8D /* BTUICardHint.m */, - A773455B1B7A93D00083EC8D /* BTUICoinbaseButton.m */, - A77345611B7A93D00083EC8D /* BTUIPayPalButton.m */, - A773455F1B7A93D00083EC8D /* BTUIPaymentMethodView.m */, - A77345631B7A93D00083EC8D /* BTUISummaryView.m */, - A77345651B7A93D00083EC8D /* BTUIVenmoButton.m */, - A70241BC1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m */, - ); - path = "Payments Components"; - sourceTree = ""; - }; - A77345661B7A93D00083EC8D /* Vector Art */ = { - isa = PBXGroup; - children = ( - A77345671B7A93D00083EC8D /* BTUIAmExVectorArtView.h */, - A77345681B7A93D00083EC8D /* BTUIAmExVectorArtView.m */, - A77345691B7A93D00083EC8D /* BTUICardVectorArtView.h */, - A773456A1B7A93D00083EC8D /* BTUICardVectorArtView.m */, - A773456B1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.h */, - A773456C1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m */, - A773456D1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.h */, - A773456E1B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m */, - A773456F1B7A93D00083EC8D /* BTUICVVBackVectorArtView.h */, - A77345701B7A93D00083EC8D /* BTUICVVBackVectorArtView.m */, - A77345711B7A93D00083EC8D /* BTUICVVFrontVectorArtView.h */, - A77345721B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m */, - A77345731B7A93D00083EC8D /* BTUIDinersClubVectorArtView.h */, - A77345741B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m */, - A77345751B7A93D00083EC8D /* BTUIDiscoverVectorArtView.h */, - A77345761B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m */, - A77345771B7A93D00083EC8D /* BTUIJCBVectorArtView.h */, - A77345781B7A93D00083EC8D /* BTUIJCBVectorArtView.m */, - A77345791B7A93D00083EC8D /* BTUIMaestroVectorArtView.h */, - A773457A1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m */, - A773457B1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.h */, - A773457C1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m */, - A70241B71C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.h */, - A70241B81C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m */, - A773457D1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.h */, - A773457E1B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m */, - A773457F1B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.h */, - A77345801B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m */, - A77345811B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.h */, - A77345821B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m */, - 035945551BE96345002116BB /* BTUIVenmoMonogramCardView.h */, - 035945561BE96345002116BB /* BTUIVenmoMonogramCardView.m */, - A77345831B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.h */, - A77345841B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m */, - A77345851B7A93D00083EC8D /* BTUIVisaVectorArtView.h */, - A77345861B7A93D00083EC8D /* BTUIVisaVectorArtView.m */, - A78422711C98920500D3EBFF /* BTUIUnionPayVectorArtView.h */, - A78422721C98920500D3EBFF /* BTUIUnionPayVectorArtView.m */, - ); - path = "Vector Art"; - sourceTree = ""; - }; - A77345EA1B7A9E340083EC8D /* Drop-In */ = { - isa = PBXGroup; - children = ( - A77345EB1B7A9E340083EC8D /* BTDropInContentView.h */, - A77345EC1B7A9E340083EC8D /* BTDropInContentView.m */, - A77345ED1B7A9E340083EC8D /* BTDropInErrorAlert.h */, - A77345EE1B7A9E340083EC8D /* BTDropInErrorAlert.m */, - A77345EF1B7A9E340083EC8D /* BTDropInErrorState.h */, - A77345F01B7A9E340083EC8D /* BTDropInErrorState.m */, - A77345F11B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.h */, - A77345F21B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m */, - A77345F31B7A9E340083EC8D /* BTDropInUtil.h */, - A77345F41B7A9E340083EC8D /* BTDropInUtil.m */, - A7ECA5E41BEBD34100437A4F /* BTDropInViewController_Internal.h */, - A77345F61B7A9E340083EC8D /* BTDropInViewController.m */, - A73012821BEBE0C50074C118 /* BTPaymentButton_Internal.h */, - A77345F81B7A9E340083EC8D /* BTPaymentButton.m */, - A77345F91B7A9E340083EC8D /* Localization */, - ); - path = "Drop-In"; - sourceTree = ""; - }; - A77345F91B7A9E340083EC8D /* Localization */ = { - isa = PBXGroup; - children = ( - A77345FA1B7A9E340083EC8D /* BTDropInLocalizedString.h */, - A77345FB1B7A9E340083EC8D /* BTDropInLocalizedString.m */, - A77345FC1B7A9E340083EC8D /* Drop-In.strings */, - ); - path = Localization; - sourceTree = ""; - }; - A775245E1CC99B53002E4E62 /* UnionPay */ = { - isa = PBXGroup; - children = ( - A775245F1CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.h */, - A77524601CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.m */, - ); - path = UnionPay; - sourceTree = ""; - }; - A79AFA471B56F822007B1DF1 /* Localization */ = { - isa = PBXGroup; - children = ( - A79AFA481B56F822007B1DF1 /* BTThreeDSecureLocalizedString.h */, - A79AFA491B56F822007B1DF1 /* BTThreeDSecureLocalizedString.m */, - A79AFA4A1B56F822007B1DF1 /* Three-D-Secure.strings */, - ); - path = Localization; - sourceTree = ""; - }; - A7ABD6541B702FD800A1223C /* IntegrationTests */ = { - isa = PBXGroup; - children = ( - A7ABD65D1B702FF000A1223C /* Braintree-API-Integration-Specs */, - A71559471B72B085007DE6F0 /* BraintreeApplePay_IntegrationTests.m */, - A7ABD6771B702FF000A1223C /* BraintreeCard_IntegrationTests.m */, - A76D7C331BB21CE90000FA6A /* BraintreeDataCollector_IntegrationTests.m */, - A7CB42D21B73E629002CCFDD /* BraintreePayPal_IntegrationTests.m */, - A78BF95C1CC6F32100DED8AA /* BraintreeUnionPay_IntegrationTests.m */, - A715593F1B729297007DE6F0 /* Helpers */, - A7ABD6571B702FD800A1223C /* Info.plist */, - A75BAC681C1F69A300D66FB5 /* IntegrationTests.pch */, - ); - path = IntegrationTests; - sourceTree = ""; - }; - A7ABD65D1B702FF000A1223C /* Braintree-API-Integration-Specs */ = { - isa = PBXGroup; - children = ( - A7ABD6641B702FF000A1223C /* SSL */, - A7ABD6721B702FF000A1223C /* Supporting Files */, - A7ABD65E1B702FF000A1223C /* BTAPIClient_IntegrationTests.m */, - A7ABD6611B702FF000A1223C /* BTHTTPSSLPinning_IntegrationTests.m */, - A7ABD6631B702FF000A1223C /* good_root_cert.der */, - ); - path = "Braintree-API-Integration-Specs"; - sourceTree = ""; - }; - A7ABD6641B702FF000A1223C /* SSL */ = { - isa = PBXGroup; - children = ( - A7ABD6651B702FF000A1223C /* evil_root_cert.der */, - A7ABD6661B702FF000A1223C /* evil_root_cert.pem */, - A7ABD6671B702FF000A1223C /* evil_root_key.pem */, - A7ABD6681B702FF000A1223C /* evil_site_cert.pem */, - A7ABD6691B702FF000A1223C /* evil_site_key.pem */, - A7ABD66A1B702FF000A1223C /* evil_site_request.pem */, - A7ABD66B1B702FF000A1223C /* good_root_cert.pem */, - A7ABD66C1B702FF000A1223C /* good_root_key.pem */, - A7ABD66D1B702FF000A1223C /* good_site_cert.pem */, - A7ABD66E1B702FF000A1223C /* good_site_key.pem */, - A7ABD66F1B702FF000A1223C /* good_site_request.pem */, - A7ABD6701B702FF000A1223C /* https_server.rb */, - A7ABD6711B702FF000A1223C /* make_certs.sh */, - ); - path = SSL; - sourceTree = ""; - }; - A7ABD6721B702FF000A1223C /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A7ABD6751B702FF000A1223C /* InfoPlist.strings */, - A7ABD6731B702FF000A1223C /* braintree-api-integration-specs-Info.plist */, - A7ABD6741B702FF000A1223C /* braintree-api-integration-specs-Prefix.pch */, - ); - path = "Supporting Files"; - sourceTree = ""; - }; - A7B462431C3C90DB00048423 /* PayPalOneTouch */ = { - isa = PBXGroup; - children = ( - 032D3A711C580B09000E5F6B /* PPDataCollectorTest.m */, - A5D3A56E1C20975F003A25A1 /* PPFPTIDataTest.m */, - A5D3A56F1C20975F003A25A1 /* PPFPTITrackerTest.m */, - A7B462441C3C911200048423 /* PPOTAppSwitchResponseTest.m */, - A7B462451C3C911200048423 /* PPOTAppSwitchUtilTest.m */, - A7B462461C3C911200048423 /* PPOTConfigurationTest.m */, - A7B462471C3C911200048423 /* PPOTEncryptionTest.m */, - A7B462481C3C911200048423 /* PPOTErrorTest.m */, - A7B462491C3C911200048423 /* PPOTTimeTest.m */, - ); - path = PayPalOneTouch; - sourceTree = ""; - }; - A7B4628C1C3D9B6700048423 /* PayPalUtils */ = { - isa = PBXGroup; - children = ( - 03CFEF241CD304B0006D2DA5 /* Info.plist */, - A7B463201C3DA73300048423 /* PPOTDevice.m */, - A7B463221C3DA73300048423 /* PPOTEncryptionHelper.m */, - A7B463241C3DA73300048423 /* PPOTJSONHelper.m */, - A7B463261C3DA73300048423 /* PPOTMacros.m */, - A7B463281C3DA73300048423 /* PPOTPinnedCertificates.m */, - A7B4632A1C3DA73300048423 /* PPOTSimpleKeychain.m */, - A7B4632C1C3DA73300048423 /* PPOTString.m */, - A7B4632E1C3DA73300048423 /* PPOTTime.m */, - A7B463301C3DA73300048423 /* PPOTURLSession.m */, - 03CFEF251CD30B15006D2DA5 /* Public */, - ); - path = PayPalUtils; - sourceTree = ""; - }; - A7B4635C1C3DA7DF00048423 /* Public */ = { - isa = PBXGroup; - children = ( - A7B463631C3DBF5E00048423 /* PayPalDataCollector.h */, - A7B463641C3DBF5E00048423 /* PPDataCollector.h */, - ); - path = Public; - sourceTree = ""; - }; - A7C8230F1B4DAAFB009D45D6 /* Helpers */ = { - isa = PBXGroup; - children = ( - 848470E01BE816DF009B12AE /* BTFakeHTTP.h */, - 848470E11BE81893009B12AE /* BTFakeHTTP.m */, - A7D4630B1B4B16C100A09C46 /* BTHTTPTestProtocol.h */, - A7D4630C1B4B16C100A09C46 /* BTHTTPTestProtocol.m */, - A79AF9B31B56D67D007B1DF1 /* BTSpecDependencies.h */, - A7C8230C1B4DAAB2009D45D6 /* BTSpecHelper.h */, - A7C8230D1B4DAAB2009D45D6 /* BTSpecHelper.m */, - A734A98F1B87989400D2461B /* BTTestClientTokenFactory.h */, - A734A9901B87989400D2461B /* BTTestClientTokenFactory.m */, - 41D6E2A51B8D12CD00A3C2AE /* FakePayPalClasses.h */, - 41D6E2A61B8D12CD00A3C2AE /* FakePayPalClasses.m */, - A7B4AD561B4EFC76002FB23E /* MockAPIClient.swift */, - A7D6746C1B84073300ED6C00 /* MockDelegates.swift */, - ); - path = Helpers; - sourceTree = ""; - }; - A7C889751B5EF5DE007A0E9C /* BraintreeApplePay */ = { - isa = PBXGroup; - children = ( - 412FE0561B9799EE008AAABE /* BTApplePayClient_Internal.h */, - A7C8897D1B5EF62C007A0E9C /* BTApplePayClient.m */, - A7B1C14E1B66E46900ED063C /* BTConfiguration+ApplePay.m */, - A7C8897F1B5EF62C007A0E9C /* BTApplePayCardNonce.m */, - 41D6E2A81B8D242B00A3C2AE /* Public */, - ); - path = BraintreeApplePay; - sourceTree = ""; - }; - A7C889911B5F043B007A0E9C /* BraintreeCard */ = { - isa = PBXGroup; - children = ( - A7C8899E1B5F0471007A0E9C /* BTCard_Internal.h */, - A7C889A01B5F0471007A0E9C /* BTCard.m */, - 8498EC1A1BB46D4B007FFDEC /* BTCardClient_Internal.h */, - A7C8899D1B5F0471007A0E9C /* BTCardClient.m */, - A7C889D71B5F0ACB007A0E9C /* BTCardNonce_Internal.h */, - A7C889A21B5F0471007A0E9C /* BTCardNonce.m */, - A751CAAA1CAC464C008603E5 /* BTCardRequest.m */, - 41777D451B8D01510026F987 /* Public */, - ); - path = BraintreeCard; - sourceTree = ""; - }; - A7C889F01B5F0B30007A0E9C /* BraintreeVenmo */ = { - isa = PBXGroup; - children = ( - A7B1C1461B66D94600ED063C /* BTConfiguration+Venmo.m */, - 03D294FE1BE835C8004F90DA /* BTVenmoAccountNonce_Internal.h */, - A7F96D071B6043B7005A4A09 /* BTVenmoAccountNonce.m */, - A7F96D0A1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.h */, - A7F96D0B1B604C1C005A4A09 /* BTVenmoAppSwitchRequestURL.m */, - A7F96D0C1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.h */, - A7F96D0D1B604C1C005A4A09 /* BTVenmoAppSwitchReturnURL.m */, - A77AA2B51B61936A00217B73 /* BTVenmoDriver_Internal.h */, - A7C889FB1B5F0C00007A0E9C /* BTVenmoDriver.m */, - 41777D471B8D028C0026F987 /* Public */, - ); - path = BraintreeVenmo; - sourceTree = ""; - }; - B67F983B1D7622D9007C1903 /* Braintree-Dropin */ = { - isa = PBXGroup; - children = ( - ); - name = "Braintree-Dropin"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 2D941D351B59C76A0016EFB4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D941D3B1B59C76A0016EFB4 /* BraintreePayPal.h in Headers */, - A7B1C14B1B66E11C00ED063C /* BTConfiguration+PayPal.h in Headers */, - 2D941D4C1B59C8E60016EFB4 /* BTPayPalAccountNonce.h in Headers */, - 2D941D431B59C8E60016EFB4 /* BTPayPalDriver_Internal.h in Headers */, - 2D941D411B59C8E60016EFB4 /* BTPayPalRequest.h in Headers */, - 2D941D441B59C8E60016EFB4 /* BTPayPalDriver.h in Headers */, - 2D941D4B1B59C8E60016EFB4 /* BTPayPalAccountNonce_Internal.h in Headers */, - A5F444AE1E89906700B2B4F7 /* BTPayPalCreditFinancing.h in Headers */, - 2D941D461B59C8E60016EFB4 /* BTPayPalRequestFactory.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D851B5D9E8C0016EFB4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D941D911B5D9F200016EFB4 /* BTThreeDSecureAuthenticationViewController.h in Headers */, - 2D941D8B1B5D9E8C0016EFB4 /* Braintree3DSecure.h in Headers */, - A79C9C701BE17BC7007EAF73 /* BTThreeDSecureDriver_Internal.h in Headers */, - 2D941D991B5D9F200016EFB4 /* BTThreeDSecureResponse.h in Headers */, - 2D941D9F1B5D9F200016EFB4 /* BTThreeDSecureLocalizedString.h in Headers */, - 2D941D9B1B5D9F200016EFB4 /* BTThreeDSecureCardNonce.h in Headers */, - 2D941D951B5D9F200016EFB4 /* BTThreeDSecureErrors.h in Headers */, - 2D941D971B5D9F200016EFB4 /* BTThreeDSecureLookupResult.h in Headers */, - 2D941D9D1B5D9F200016EFB4 /* BTWebViewController.h in Headers */, - 2D941D931B5D9F200016EFB4 /* BTThreeDSecureDriver.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DE12F061B59BE0100EA1BCF /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DE12F451B59C36900EA1BCF /* BTAPIClient_Internal.h in Headers */, - A7D674731B84FDB400ED6C00 /* BTClientToken.h in Headers */, - 2DE12F431B59C36900EA1BCF /* BTAnalyticsMetadata.h in Headers */, - A77346261B7AA4F10083EC8D /* BTErrors.h in Headers */, - EEF1DE891E858A8D001BB924 /* BTEnums.h in Headers */, - 2DE12F581B59C36900EA1BCF /* BTPostalAddress.h in Headers */, - A7B1C1531B66F79900ED063C /* BTAppSwitch.h in Headers */, - A7B1C1431B66B3D000ED063C /* BTConfiguration.h in Headers */, - 2DE12F541B59C36900EA1BCF /* BTLogger_Internal.h in Headers */, - 2DE12F501B59C36900EA1BCF /* BTJSON.h in Headers */, - 2DE12F461B59C36900EA1BCF /* BTAPIClient.h in Headers */, - 2DE12F5A1B59C36900EA1BCF /* BTPaymentMethodNonce.h in Headers */, - 2DE12F521B59C36900EA1BCF /* BTKeychain.h in Headers */, - 418456E81BE42F1600C32391 /* BTViewControllerPresentingDelegate.h in Headers */, - 415924B41BA0F2D800C095F6 /* BTPaymentMethodNonceParser.h in Headers */, - 2DE12F551B59C36900EA1BCF /* BTLogger.h in Headers */, - A7C889F91B5F0B6A007A0E9C /* Braintree-Version.h in Headers */, - 2DE12F421B59C36900EA1BCF /* BraintreeCore.h in Headers */, - A74BF1C51C57F25F0049E149 /* BTAnalyticsService.h in Headers */, - 2DE12F4A1B59C36900EA1BCF /* BTClientMetadata.h in Headers */, - A77346301B7BB1A70083EC8D /* BTTokenizationService.h in Headers */, - 2DE12F4C1B59C36900EA1BCF /* BTHTTP.h in Headers */, - A71754301BDEF1EC00002676 /* BTURLUtils.h in Headers */, - 2DE12F481B59C36900EA1BCF /* BTAPIPinnedCertificates.h in Headers */, - 2DE12F4E1B59C36900EA1BCF /* BTHTTPErrors.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4164B99F1C9B658E006AE861 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 41472F971CB6D53400AFA75C /* BTConfiguration+UnionPay.h in Headers */, - 4164B9B01C9B6690006AE861 /* BraintreeUnionPay.h in Headers */, - 4164B9BA1C9B6988006AE861 /* BTCardClient+UnionPay.h in Headers */, - A774265A1CA207AE003CACBA /* BTCardCapabilities.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7EDE475E1CD2C3D00005E22B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 03CFEF321CD30B15006D2DA5 /* PPOTJSONHelper.h in Headers */, - 03CFEF361CD30B15006D2DA5 /* PPOTString.h in Headers */, - 03CFEF391CD30B15006D2DA5 /* PPOTVersion.h in Headers */, - 03CFEF381CD30B15006D2DA5 /* PPOTURLSession.h in Headers */, - 03CFEF351CD30B15006D2DA5 /* PPOTSimpleKeychain.h in Headers */, - 03CFEF3B1CD30C28006D2DA5 /* PayPalUtils.h in Headers */, - 03CFEF311CD30B15006D2DA5 /* PPOTEncryptionHelper.h in Headers */, - 03CFEF331CD30B15006D2DA5 /* PPOTMacros.h in Headers */, - 03CFEF341CD30B15006D2DA5 /* PPOTPinnedCertificates.h in Headers */, - 03CFEF301CD30B15006D2DA5 /* PPOTDevice.h in Headers */, - 03CFEF371CD30B15006D2DA5 /* PPOTTime.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B6C1C1A29C500612D90 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A7B462651C3C967400048423 /* PPOTAppSwitchResponse.h in Headers */, - A7B4626B1C3C967400048423 /* PPOTCheckoutSwitchRequest.h in Headers */, - A7B4626C1C3C967400048423 /* PPOTCore_Internal.h in Headers */, - A7B4626A1C3C967400048423 /* PPOTCheckoutRequest_Internal.h in Headers */, - A7B462731C3C967400048423 /* PPOTRequest_Internal.h in Headers */, - A50C3B981C1A2AD700612D90 /* PPOTCore.h in Headers */, - A76B99421C3F00AC00A584F6 /* PPDefaultConfigurationJSON.h in Headers */, - A76B99431C3F00AC00A584F6 /* PPFPTIData.h in Headers */, - A76B99441C3F00AC00A584F6 /* PPFPTITracker.h in Headers */, - A76B99451C3F00AC00A584F6 /* PPOTAnalyticsDefines.h in Headers */, - A76B99461C3F00AC00A584F6 /* PPOTAnalyticsTracker.h in Headers */, - A7B4626F1C3C967400048423 /* PPOTOAuth2AppSwitchRequest.h in Headers */, - A7B462691C3C967400048423 /* PPOTCheckoutBrowserSwitchRequest.h in Headers */, - A7B462741C3C967400048423 /* PPOTSwitchRequest.h in Headers */, - A7B462681C3C967400048423 /* PPOTCheckoutAppSwitchRequest.h in Headers */, - A7B4626D1C3C967400048423 /* PPOTResult_Internal.h in Headers */, - A50C3B991C1A2AD700612D90 /* PPOTResult.h in Headers */, - A50C3B9A1C1A2AD700612D90 /* PPOTRequest.h in Headers */, - A7B4638B1C3DCEAD00048423 /* PayPalOneTouch.h in Headers */, - A7B462671C3C967400048423 /* PPOTAuthorizationRequest_Internal.h in Headers */, - A7B462661C3C967400048423 /* PPOTAppSwitchUtil.h in Headers */, - A7B462701C3C967400048423 /* PPOTOAuth2BrowserSwitchRequest.h in Headers */, - A7B462711C3C967400048423 /* PPOTOAuth2SwitchRequest.h in Headers */, - A7B462721C3C967400048423 /* PPOTPersistentRequestData.h in Headers */, - A7B462641C3C967400048423 /* PPOTConfiguration.h in Headers */, - A7B4626E1C3C967400048423 /* PPOTError.h in Headers */, - A50C3B9B1C1A2AD700612D90 /* PPOTRequestFactory.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76D7BFD1BB1CAB00000FA6A /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A76D7C201BB1CBD50000FA6A /* BraintreeDataCollector.h in Headers */, - B61F67801CE4C20F0051A3BD /* BTConfiguration+DataCollector.h in Headers */, - A76D7C211BB1CBD50000FA6A /* BTDataCollector.h in Headers */, - A51527331D9C3DC600FF3F77 /* KDataCollector.h in Headers */, - 413CDF4F1C779ED400B89FCA /* BTDataCollector_Internal.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77344F41B7A93A10083EC8D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A77345A31B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.h in Headers */, - 41913D9F1BB9D504004EF1BB /* BTUIPaymentOptionType.h in Headers */, - A77345C81B7A93D00083EC8D /* BTUIVenmoButton.h in Headers */, - A77345991B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.h in Headers */, - A77345E81B7A93D00083EC8D /* BTUIVisaVectorArtView.h in Headers */, - A77345BE1B7A93D00083EC8D /* BTUICoinbaseButton.h in Headers */, - A73012831BEBE0C50074C118 /* BTPaymentButton_Internal.h in Headers */, - A77345A71B7A93D00083EC8D /* BTUIFormField.h in Headers */, - 41913DA01BB9D504004EF1BB /* BTUIThemedView.h in Headers */, - A77345AA1B7A93D00083EC8D /* BTUIScrollView.h in Headers */, - A77345B01B7A93D00083EC8D /* BTUIVectorArtView.h in Headers */, - A78422731C98920500D3EBFF /* BTUIUnionPayVectorArtView.h in Headers */, - A77345AC1B7A93D00083EC8D /* BTUITextField.h in Headers */, - A77345B41B7A93D00083EC8D /* BTUICardExpiryField.h in Headers */, - A77345CE1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.h in Headers */, - A77345DC1B7A93D00083EC8D /* BTUIMaestroVectorArtView.h in Headers */, - A70241B91C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.h in Headers */, - A773459B1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.h in Headers */, - A77346121B7A9E340083EC8D /* BTDropInContentView.h in Headers */, - A77345B21B7A93D00083EC8D /* BTUICardCvvField.h in Headers */, - A77345D41B7A93D00083EC8D /* BTUICVVFrontVectorArtView.h in Headers */, - A77345D61B7A93D00083EC8D /* BTUIDinersClubVectorArtView.h in Headers */, - A77345891B7A93D00083EC8D /* BTUILocalizedString.h in Headers */, - A773461A1B7A9E340083EC8D /* BTDropInUtil.h in Headers */, - A77345921B7A93D00083EC8D /* BTUIUtil.h in Headers */, - A77345BC1B7A93D00083EC8D /* BTUICardHint.h in Headers */, - A77346201B7A9E340083EC8D /* BTDropInLocalizedString.h in Headers */, - A77345E41B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.h in Headers */, - A77346141B7A9E340083EC8D /* BTDropInErrorAlert.h in Headers */, - A773458E1B7A93D00083EC8D /* BTUICardExpiryFormat.h in Headers */, - A77345971B7A93D00083EC8D /* UIColor+BTUI.h in Headers */, - A77345CC1B7A93D00083EC8D /* BTUICardVectorArtView.h in Headers */, - A77345A91B7A93D00083EC8D /* BTUIFormField_Protected.h in Headers */, - A773459D1B7A93D00083EC8D /* BTUIViewUtil.h in Headers */, - A77345BA1B7A93D00083EC8D /* BTUICardFormView.h in Headers */, - A773459F1B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.h in Headers */, - A77345A11B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.h in Headers */, - A77345A51B7A93D00083EC8D /* BTUIFloatLabel.h in Headers */, - A77345C41B7A93D00083EC8D /* BTUIPayPalButton.h in Headers */, - A7ECA5E51BEBD34100437A4F /* BTDropInViewController_Internal.h in Headers */, - A77345DE1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.h in Headers */, - A773461C1B7A9E340083EC8D /* BTDropInViewController.h in Headers */, - A77345E61B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.h in Headers */, - A77345E01B7A93D00083EC8D /* BTUIPayPalMonogramCardView.h in Headers */, - A7F17A001BE98E1E00E91646 /* BTPaymentRequest.h in Headers */, - A77345CA1B7A93D00083EC8D /* BTUIAmExVectorArtView.h in Headers */, - A70241BD1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.h in Headers */, - A773458C1B7A93D00083EC8D /* BTUICardExpirationValidator.h in Headers */, - A77345901B7A93D00083EC8D /* BTUICardType.h in Headers */, - A77345C01B7A93D00083EC8D /* BTUICTAControl.h in Headers */, - A77345C21B7A93D00083EC8D /* BTUIPaymentMethodView.h in Headers */, - A773461E1B7A9E340083EC8D /* BTPaymentButton.h in Headers */, - A77345D81B7A93D00083EC8D /* BTUIDiscoverVectorArtView.h in Headers */, - A77345D21B7A93D00083EC8D /* BTUICVVBackVectorArtView.h in Headers */, - 4107EB231C88C75000F32D81 /* BTUICardPhoneNumberField.h in Headers */, - A77346181B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.h in Headers */, - A77344FA1B7A93A10083EC8D /* BraintreeUI.h in Headers */, - 035945571BE96345002116BB /* BTUIVenmoMonogramCardView.h in Headers */, - A77345B61B7A93D00083EC8D /* BTUICardNumberField.h in Headers */, - A77345E21B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.h in Headers */, - A77345B81B7A93D00083EC8D /* BTUICardPostalCodeField.h in Headers */, - A77345DA1B7A93D00083EC8D /* BTUIJCBVectorArtView.h in Headers */, - A77345D01B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.h in Headers */, - A77345C61B7A93D00083EC8D /* BTUISummaryView.h in Headers */, - A77345951B7A93D00083EC8D /* BTUI.h in Headers */, - A77346161B7A9E340083EC8D /* BTDropInErrorState.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77AA2991B618C7700217B73 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A77AA2AD1B618CFB00217B73 /* BTVenmoAccountNonce.h in Headers */, - A7B1C1471B66D94600ED063C /* BTConfiguration+Venmo.h in Headers */, - A77AA2AB1B618CFB00217B73 /* BTVenmoDriver.h in Headers */, - A77AA2A81B618CFB00217B73 /* BTVenmoAppSwitchReturnURL.h in Headers */, - 03D294FF1BE835C8004F90DA /* BTVenmoAccountNonce_Internal.h in Headers */, - A77AA2B61B61936A00217B73 /* BTVenmoDriver_Internal.h in Headers */, - A77AA2A61B618CFB00217B73 /* BTVenmoAppSwitchRequestURL.h in Headers */, - A77AA2AA1B618CFB00217B73 /* BraintreeVenmo.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7B462F31C3D9C2200048423 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A7B463661C3DBF5E00048423 /* PPDataCollector.h in Headers */, - A79BB5BF1CE501D500CC6F0E /* PPDataCollector_Internal.h in Headers */, - A7B462FB1C3D9C2200048423 /* PPRCClientMetadataIDProvider.h in Headers */, - A7B463651C3DBF5E00048423 /* PayPalDataCollector.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C889711B5EF5DE007A0E9C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C889801B5EF62C007A0E9C /* BTApplePayClient.h in Headers */, - A7B1C14F1B66E46900ED063C /* BTConfiguration+ApplePay.h in Headers */, - 412FE0571B9799EE008AAABE /* BTApplePayClient_Internal.h in Headers */, - A7C889821B5EF62C007A0E9C /* BTApplePayCardNonce.h in Headers */, - A7C889871B5EF65C007A0E9C /* BraintreeApplePay.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C8898D1B5F043B007A0E9C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 8498EC1B1BB46D4B007FFDEC /* BTCardClient_Internal.h in Headers */, - A751CAAF1CAC4667008603E5 /* BTCardRequest.h in Headers */, - A7C889AA1B5F04AE007A0E9C /* BraintreeCard.h in Headers */, - A7C889D81B5F0ACB007A0E9C /* BTCardNonce_Internal.h in Headers */, - A7C889A81B5F0471007A0E9C /* BTCardNonce.h in Headers */, - A7C889A51B5F0471007A0E9C /* BTCard_Internal.h in Headers */, - A7C889A31B5F0471007A0E9C /* BTCardClient.h in Headers */, - A7C889A61B5F0471007A0E9C /* BTCard.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 03F8B2651C23976000FD184B /* UITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 03F8B26F1C23976100FD184B /* Build configuration list for PBXNativeTarget "UITests" */; - buildPhases = ( - 03F8B2621C23976000FD184B /* Sources */, - 03F8B2631C23976000FD184B /* Frameworks */, - 03F8B2641C23976000FD184B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A7B4623E1C3C742900048423 /* PBXTargetDependency */, - ); - name = UITests; - productName = UITests; - productReference = 03F8B2661C23976000FD184B /* UITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; - 16CD2E9B1B4077FB00E68495 /* UnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16CD2EA61B4077FC00E68495 /* Build configuration list for PBXNativeTarget "UnitTests" */; - buildPhases = ( - 80EBDB0F9969F80778684056 /* [CP] Check Pods Manifest.lock */, - 5E3DE597128C5D51E21FDBB5 /* [CP] Check Pods Manifest.lock */, - 16CD2E981B4077FB00E68495 /* Sources */, - 16CD2E991B4077FB00E68495 /* Frameworks */, - 16CD2E9A1B4077FB00E68495 /* Resources */, - 1AF31FFFC68A150437CF69D5 /* [CP] Embed Pods Frameworks */, - F178B60F8BB314C6327E6297 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 03CFEF3D1CD31242006D2DA5 /* PBXTargetDependency */, - 4169A8F01CAB10600051DDAF /* PBXTargetDependency */, - A5D3A5A11C20BEDC003A25A1 /* PBXTargetDependency */, - 841CDCC41BCDBC6100A06B21 /* PBXTargetDependency */, - 41E3B35C1BA386DE0081824E /* PBXTargetDependency */, - 2D941D671B5D6C940016EFB4 /* PBXTargetDependency */, - A77AA2A51B618CB300217B73 /* PBXTargetDependency */, - A7C88A281B5F109B007A0E9C /* PBXTargetDependency */, - A7C88A2A1B5F109B007A0E9C /* PBXTargetDependency */, - 2D941DA21B5D9F470016EFB4 /* PBXTargetDependency */, - 2D941D631B5D6C850016EFB4 /* PBXTargetDependency */, - 41BC343B1BF69D3700161106 /* PBXTargetDependency */, - ); - name = UnitTests; - productName = "Braintree Unit Tests"; - productReference = 16CD2E9C1B4077FB00E68495 /* UnitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 2D941D371B59C76A0016EFB4 /* BraintreePayPal */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D941D3D1B59C76A0016EFB4 /* Build configuration list for PBXNativeTarget "BraintreePayPal" */; - buildPhases = ( - 2D941D331B59C76A0016EFB4 /* Sources */, - 2D941D341B59C76A0016EFB4 /* Frameworks */, - 2D941D351B59C76A0016EFB4 /* Headers */, - 2D941D361B59C76A0016EFB4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 2D941D5A1B5D5F140016EFB4 /* PBXTargetDependency */, - A50C3BD11C1B454100612D90 /* PBXTargetDependency */, - ); - name = BraintreePayPal; - productName = BraintreePayPal; - productReference = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; - productType = "com.apple.product-type.framework"; - }; - 2D941D871B5D9E8C0016EFB4 /* Braintree3DSecure */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D941D8F1B5D9E8C0016EFB4 /* Build configuration list for PBXNativeTarget "Braintree3DSecure" */; - buildPhases = ( - 2D941D831B5D9E8C0016EFB4 /* Sources */, - 2D941D841B5D9E8C0016EFB4 /* Frameworks */, - 2D941D851B5D9E8C0016EFB4 /* Headers */, - 2D941D861B5D9E8C0016EFB4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A7B4630C1C3DA21200048423 /* PBXTargetDependency */, - 2D941DA51B5D9F790016EFB4 /* PBXTargetDependency */, - ); - name = Braintree3DSecure; - productName = Braintree3DSecure; - productReference = 2D941D881B5D9E8C0016EFB4 /* Braintree3DSecure.framework */; - productType = "com.apple.product-type.framework"; - }; - 2DE12F081B59BE0100EA1BCF /* BraintreeCore */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2DE12F101B59BE0100EA1BCF /* Build configuration list for PBXNativeTarget "BraintreeCore" */; - buildPhases = ( - 2DE12F041B59BE0100EA1BCF /* Sources */, - 2DE12F051B59BE0100EA1BCF /* Frameworks */, - 2DE12F061B59BE0100EA1BCF /* Headers */, - 2DE12F071B59BE0100EA1BCF /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = BraintreeCore; - productName = BraintreeCore; - productReference = 2DE12F091B59BE0100EA1BCF /* BraintreeCore.framework */; - productType = "com.apple.product-type.framework"; - }; - 4164B9951C9B658E006AE861 /* BraintreeUnionPay */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4164B9A91C9B658E006AE861 /* Build configuration list for PBXNativeTarget "BraintreeUnionPay" */; - buildPhases = ( - 4164B9981C9B658E006AE861 /* Sources */, - 4164B99D1C9B658E006AE861 /* Frameworks */, - 4164B99F1C9B658E006AE861 /* Headers */, - 4164B9A81C9B658E006AE861 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4164B9B31C9B68D2006AE861 /* PBXTargetDependency */, - 4164B9961C9B658E006AE861 /* PBXTargetDependency */, - ); - name = BraintreeUnionPay; - productName = BraintreeCard; - productReference = 4164B9AC1C9B658E006AE861 /* BraintreeUnionPay.framework */; - productType = "com.apple.product-type.framework"; - }; - 417404481BB084D3008A5DEA /* Braintree */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4174044F1BB084D3008A5DEA /* Build configuration list for PBXNativeTarget "Braintree" */; - buildPhases = ( - 417404451BB084D3008A5DEA /* Sources */, - 417404461BB084D3008A5DEA /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - A7B4625F1C3C941D00048423 /* PBXTargetDependency */, - A7B462611C3C941D00048423 /* PBXTargetDependency */, - ); - name = Braintree; - productName = Braintree; - productReference = 417404491BB084D3008A5DEA /* libBraintree.a */; - productType = "com.apple.product-type.library.static"; - }; - 7EDE474C1CD2C3D00005E22B /* PayPalUtils */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7EDE476D1CD2C3D00005E22B /* Build configuration list for PBXNativeTarget "PayPalUtils" */; - buildPhases = ( - 7EDE474D1CD2C3D00005E22B /* Sources */, - 7EDE47581CD2C3D00005E22B /* Frameworks */, - 7EDE475E1CD2C3D00005E22B /* Headers */, - 7EDE476C1CD2C3D00005E22B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PayPalUtils; - productName = PayPalRisk; - productReference = 7EDE47701CD2C3D00005E22B /* PayPalUtils.framework */; - productType = "com.apple.product-type.framework"; - }; - A50C3AD41C19F00600612D90 /* PayPalOneTouch-StaticLibrary */ = { - isa = PBXNativeTarget; - buildConfigurationList = A50C3ADB1C19F00600612D90 /* Build configuration list for PBXNativeTarget "PayPalOneTouch-StaticLibrary" */; - buildPhases = ( - A50C3AD11C19F00600612D90 /* Sources */, - A50C3AD21C19F00600612D90 /* Frameworks */, - A50C3AD31C19F00600612D90 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - A50C3BB41C1A322800612D90 /* PBXTargetDependency */, - ); - name = "PayPalOneTouch-StaticLibrary"; - productName = PayPalOneTouch; - productReference = A50C3AD51C19F00600612D90 /* libPayPalOneTouch-StaticLibrary.a */; - productType = "com.apple.product-type.library.static"; - }; - A50C3B041C19F55C00612D90 /* PayPalDataCollector-StaticLibrary */ = { - isa = PBXNativeTarget; - buildConfigurationList = A50C3B0B1C19F55C00612D90 /* Build configuration list for PBXNativeTarget "PayPalDataCollector-StaticLibrary" */; - buildPhases = ( - A50C3B011C19F55C00612D90 /* Sources */, - A50C3B021C19F55C00612D90 /* Frameworks */, - A50C3B031C19F55C00612D90 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PayPalDataCollector-StaticLibrary"; - productName = PayPalRisk; - productReference = A50C3B051C19F55C00612D90 /* libPayPalDataCollector-StaticLibrary.a */; - productType = "com.apple.product-type.library.static"; - }; - A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */ = { - isa = PBXNativeTarget; - buildConfigurationList = A50C3B741C1A29C500612D90 /* Build configuration list for PBXNativeTarget "PayPalOneTouch" */; - buildPhases = ( - A50C3B6A1C1A29C500612D90 /* Sources */, - A50C3B6B1C1A29C500612D90 /* Frameworks */, - A50C3B6C1C1A29C500612D90 /* Headers */, - A50C3B6D1C1A29C500612D90 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7EDE47751CD2C5520005E22B /* PBXTargetDependency */, - 41D54D2F1C7F97680051C96B /* PBXTargetDependency */, - A7B463091C3D9FEE00048423 /* PBXTargetDependency */, - ); - name = PayPalOneTouch; - productName = PayPalOneTouch; - productReference = A50C3B6F1C1A29C500612D90 /* PayPalOneTouch.framework */; - productType = "com.apple.product-type.framework"; - }; - A76B198A1B79707700452CFA /* Demo */ = { - isa = PBXNativeTarget; - buildConfigurationList = A76B19A11B79707700452CFA /* Build configuration list for PBXNativeTarget "Demo" */; - buildPhases = ( - 813FB4CFB8D5035A45483333 /* [CP] Check Pods Manifest.lock */, - 81778A4B594659FDC565260B /* [CP] Check Pods Manifest.lock */, - A76B19871B79707700452CFA /* Sources */, - A76B19881B79707700452CFA /* Frameworks */, - A76B19891B79707700452CFA /* Resources */, - 413533751BF6C7290005D1BA /* Embed Frameworks */, - BB509ACD43F858A5E24B8434 /* [CP] Embed Pods Frameworks */, - 0E3747A662347DB932BAAA8A /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 03EF62091DB4A90C004F4090 /* PBXTargetDependency */, - 03EF620D1DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62111DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62151DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62191DB4A90C004F4090 /* PBXTargetDependency */, - 03EF621D1DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62211DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62251DB4A90C004F4090 /* PBXTargetDependency */, - 03EF62291DB4A90C004F4090 /* PBXTargetDependency */, - 03EF622D1DB4A90D004F4090 /* PBXTargetDependency */, - 03EF62311DB4A90D004F4090 /* PBXTargetDependency */, - 03EF62351DB4A90D004F4090 /* PBXTargetDependency */, - ); - name = Demo; - productName = "Braintree-Demo"; - productReference = A76B198B1B79707700452CFA /* Demo.app */; - productType = "com.apple.product-type.application"; - }; - A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */ = { - isa = PBXNativeTarget; - buildConfigurationList = A76D7C1B1BB1CAB00000FA6A /* Build configuration list for PBXNativeTarget "BraintreeDataCollector" */; - buildPhases = ( - A76D7BFB1BB1CAB00000FA6A /* Sources */, - A76D7BFC1BB1CAB00000FA6A /* Frameworks */, - A76D7BFD1BB1CAB00000FA6A /* Headers */, - A76D7BFE1BB1CAB00000FA6A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 41935DE81D528B2C008D48FB /* PBXTargetDependency */, - ); - name = BraintreeDataCollector; - productName = BraintreeDataCollector; - productReference = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; - productType = "com.apple.product-type.framework"; - }; - A77344F61B7A93A10083EC8D /* BraintreeUI */ = { - isa = PBXNativeTarget; - buildConfigurationList = A77345021B7A93A10083EC8D /* Build configuration list for PBXNativeTarget "BraintreeUI" */; - buildPhases = ( - A77344F21B7A93A10083EC8D /* Sources */, - A77344F31B7A93A10083EC8D /* Frameworks */, - A77344F41B7A93A10083EC8D /* Headers */, - A77344F51B7A93A10083EC8D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A77120511CD95DCE0004FFD3 /* PBXTargetDependency */, - A7F570221C1611CA0007D018 /* PBXTargetDependency */, - ); - name = BraintreeUI; - productName = BraintreeUI; - productReference = A77344F71B7A93A10083EC8D /* BraintreeUI.framework */; - productType = "com.apple.product-type.framework"; - }; - A77AA29B1B618C7700217B73 /* BraintreeVenmo */ = { - isa = PBXNativeTarget; - buildConfigurationList = A77AA2A11B618C7700217B73 /* Build configuration list for PBXNativeTarget "BraintreeVenmo" */; - buildPhases = ( - A77AA2971B618C7700217B73 /* Sources */, - A77AA2981B618C7700217B73 /* Frameworks */, - A77AA2991B618C7700217B73 /* Headers */, - A77AA29A1B618C7700217B73 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A77AA2B01B618D5000217B73 /* PBXTargetDependency */, - A77AA2B21B618D5000217B73 /* PBXTargetDependency */, - ); - name = BraintreeVenmo; - productName = BraintreeVenmo; - productReference = A77AA29C1B618C7700217B73 /* BraintreeVenmo.framework */; - productType = "com.apple.product-type.framework"; - }; - A7ABD6521B702FD800A1223C /* IntegrationTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = A7ABD65A1B702FD900A1223C /* Build configuration list for PBXNativeTarget "IntegrationTests" */; - buildPhases = ( - 629A6EB8F4008DD3E12EFAD8 /* [CP] Check Pods Manifest.lock */, - 32CEB6D06FB46630148B94D8 /* [CP] Check Pods Manifest.lock */, - A7ABD64F1B702FD800A1223C /* Sources */, - A7ABD6501B702FD800A1223C /* Frameworks */, - A7ABD6511B702FD800A1223C /* Resources */, - 07054A8503384810769C4EE6 /* [CP] Embed Pods Frameworks */, - 93625D459EC36DF23263ED6B /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4169A8F71CAB11280051DDAF /* PBXTargetDependency */, - 4169A8F31CAB11110051DDAF /* PBXTargetDependency */, - 4169A8F51CAB11110051DDAF /* PBXTargetDependency */, - A76D7C361BB318BF0000FA6A /* PBXTargetDependency */, - A71559561B72C2A7007DE6F0 /* PBXTargetDependency */, - A71559581B72C2A7007DE6F0 /* PBXTargetDependency */, - A715595E1B72C2A7007DE6F0 /* PBXTargetDependency */, - A71559601B72C2A7007DE6F0 /* PBXTargetDependency */, - A75319F21B715C4200E27B89 /* PBXTargetDependency */, - A7ABD6901B70304200A1223C /* PBXTargetDependency */, - A75538391B8BC9C600054F82 /* PBXTargetDependency */, - ); - name = IntegrationTests; - productName = BraintreeIntegrationTests; - productReference = A7ABD6531B702FD800A1223C /* IntegrationTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - A7B462E01C3D9C2200048423 /* PayPalDataCollector */ = { - isa = PBXNativeTarget; - buildConfigurationList = A7B463021C3D9C2200048423 /* Build configuration list for PBXNativeTarget "PayPalDataCollector" */; - buildPhases = ( - A7B462E11C3D9C2200048423 /* Sources */, - A7B462ED1C3D9C2200048423 /* Frameworks */, - A7B462F31C3D9C2200048423 /* Headers */, - A7B463011C3D9C2200048423 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7EDE477B1CD2C5D00005E22B /* PBXTargetDependency */, - ); - name = PayPalDataCollector; - productName = PayPalRisk; - productReference = A7B463051C3D9C2200048423 /* PayPalDataCollector.framework */; - productType = "com.apple.product-type.framework"; - }; - A7C889731B5EF5DE007A0E9C /* BraintreeApplePay */ = { - isa = PBXNativeTarget; - buildConfigurationList = A7C889791B5EF5DE007A0E9C /* Build configuration list for PBXNativeTarget "BraintreeApplePay" */; - buildPhases = ( - A7C8896F1B5EF5DE007A0E9C /* Sources */, - A7C889701B5EF5DE007A0E9C /* Frameworks */, - A7C889711B5EF5DE007A0E9C /* Headers */, - A7C889721B5EF5DE007A0E9C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A7F5701E1C1611AA0007D018 /* PBXTargetDependency */, - ); - name = BraintreeApplePay; - productName = BraintreeApplePay; - productReference = A7C889741B5EF5DE007A0E9C /* BraintreeApplePay.framework */; - productType = "com.apple.product-type.framework"; - }; - A7C8898F1B5F043B007A0E9C /* BraintreeCard */ = { - isa = PBXNativeTarget; - buildConfigurationList = A7C889991B5F043B007A0E9C /* Build configuration list for PBXNativeTarget "BraintreeCard" */; - buildPhases = ( - A7C8898B1B5F043B007A0E9C /* Sources */, - A7C8898C1B5F043B007A0E9C /* Frameworks */, - A7C8898D1B5F043B007A0E9C /* Headers */, - A7C8898E1B5F043B007A0E9C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A7F570201C1611B20007D018 /* PBXTargetDependency */, - ); - name = BraintreeCard; - productName = BraintreeCard; - productReference = A7C889901B5F043B007A0E9C /* BraintreeCard.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A75DA344192138F000D997A2 /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = BT; - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0830; - TargetAttributes = { - 03F8B2651C23976000FD184B = { - CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0830; - TestTargetID = A76B198A1B79707700452CFA; - }; - 16CD2E9B1B4077FB00E68495 = { - CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0820; - TestTargetID = A76B198A1B79707700452CFA; - }; - 2D941D371B59C76A0016EFB4 = { - CreatedOnToolsVersion = 7.0; - }; - 2D941D871B5D9E8C0016EFB4 = { - CreatedOnToolsVersion = 7.0; - }; - 2DE12F081B59BE0100EA1BCF = { - CreatedOnToolsVersion = 7.0; - }; - 417404481BB084D3008A5DEA = { - CreatedOnToolsVersion = 7.0; - }; - A50C3AD41C19F00600612D90 = { - CreatedOnToolsVersion = 7.2; - }; - A50C3B041C19F55C00612D90 = { - CreatedOnToolsVersion = 7.2; - }; - A50C3B6E1C1A29C500612D90 = { - CreatedOnToolsVersion = 7.2; - }; - A76B198A1B79707700452CFA = { - CreatedOnToolsVersion = 7.0; - DevelopmentTeam = 43253H4X22; - SystemCapabilities = { - com.apple.OMC = { - enabled = 1; - }; - }; - }; - A76D7BFF1BB1CAB00000FA6A = { - CreatedOnToolsVersion = 7.0; - }; - A77344F61B7A93A10083EC8D = { - CreatedOnToolsVersion = 7.0; - }; - A77AA29B1B618C7700217B73 = { - CreatedOnToolsVersion = 7.0; - }; - A7ABD6521B702FD800A1223C = { - CreatedOnToolsVersion = 7.0; - TestTargetID = A76B198A1B79707700452CFA; - }; - A7C889731B5EF5DE007A0E9C = { - CreatedOnToolsVersion = 7.0; - }; - A7C8898F1B5F043B007A0E9C = { - CreatedOnToolsVersion = 7.0; - }; - }; - }; - buildConfigurationList = A75DA347192138F000D997A2 /* Build configuration list for PBXProject "Braintree" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - en_US, - da_DK, - de_DE, - en_AU, - en_CA, - en_GB, - en_UK, - es_ES, - es_XC, - fr_CA, - fr_FR, - fr_XC, - he_IL, - it_IT, - nl_NL, - no_NO, - pl_PL, - pt_PT, - ru_RU, - sv_SE, - tr_TR, - zh_XC, - da, - de, - es, - fr, - he, - it, - nb, - nl, - pl, - pt, - ru, - sv, - tr, - "zh-Hans", - ); - mainGroup = A75DA343192138F000D997A2; - productRefGroup = A75DA3521921394200D997A2 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A76B198A1B79707700452CFA /* Demo */, - A7ABD6521B702FD800A1223C /* IntegrationTests */, - 16CD2E9B1B4077FB00E68495 /* UnitTests */, - 417404481BB084D3008A5DEA /* Braintree */, - 2D941D871B5D9E8C0016EFB4 /* Braintree3DSecure */, - A7C889731B5EF5DE007A0E9C /* BraintreeApplePay */, - A7C8898F1B5F043B007A0E9C /* BraintreeCard */, - 2DE12F081B59BE0100EA1BCF /* BraintreeCore */, - A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */, - 2D941D371B59C76A0016EFB4 /* BraintreePayPal */, - A77AA29B1B618C7700217B73 /* BraintreeVenmo */, - A77344F61B7A93A10083EC8D /* BraintreeUI */, - 4164B9951C9B658E006AE861 /* BraintreeUnionPay */, - A50C3B041C19F55C00612D90 /* PayPalDataCollector-StaticLibrary */, - A7B462E01C3D9C2200048423 /* PayPalDataCollector */, - A50C3AD41C19F00600612D90 /* PayPalOneTouch-StaticLibrary */, - A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */, - 7EDE474C1CD2C3D00005E22B /* PayPalUtils */, - 03F8B2651C23976000FD184B /* UITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 03F8B2641C23976000FD184B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16CD2E9A1B4077FB00E68495 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D361B59C76A0016EFB4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D861B5D9E8C0016EFB4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D941D901B5D9EB40016EFB4 /* Three-D-Secure.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DE12F071B59BE0100EA1BCF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4164B9A81C9B658E006AE861 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7EDE476C1CD2C3D00005E22B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B6D1C1A29C500612D90 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76B19891B79707700452CFA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A76B1A1E1B79708A00452CFA /* BraintreeDemoCardTokenizationViewController.xib in Resources */, - A76B1A341B79708A00452CFA /* Main.strings in Resources */, - A76B1A2F1B79708A00452CFA /* Images.xcassets in Resources */, - A76B1A151B79708A00452CFA /* Settings.bundle in Resources */, - A76B1A131B79708A00452CFA /* Launch Screen.storyboard in Resources */, - A76B1A0B1B79708A00452CFA /* Braintree-Demo.entitlements in Resources */, - A76B1A2C1B79708A00452CFA /* UI.storyboard in Resources */, - A76B1A291B79708A00452CFA /* BraintreeDemoCreditCardEntryViewController.xib in Resources */, - A76B1A331B79708A00452CFA /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76D7BFE1BB1CAB00000FA6A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77344F51B7A93A10083EC8D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A77346221B7A9E340083EC8D /* Drop-In.strings in Resources */, - A773458B1B7A93D00083EC8D /* UI.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77AA29A1B618C7700217B73 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7ABD6511B702FD800A1223C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A7ABD6881B702FF000A1223C /* good_site_key.pem in Resources */, - A7ABD6821B702FF000A1223C /* evil_site_cert.pem in Resources */, - A7ABD6891B702FF000A1223C /* good_site_request.pem in Resources */, - A7ABD6811B702FF000A1223C /* evil_root_key.pem in Resources */, - A7ABD6801B702FF000A1223C /* evil_root_cert.pem in Resources */, - A7ABD6851B702FF000A1223C /* good_root_cert.pem in Resources */, - A7ABD68A1B702FF000A1223C /* https_server.rb in Resources */, - A7ABD6861B702FF000A1223C /* good_root_key.pem in Resources */, - A7ABD6831B702FF000A1223C /* evil_site_key.pem in Resources */, - A7ABD6871B702FF000A1223C /* good_site_cert.pem in Resources */, - A7ABD68B1B702FF000A1223C /* make_certs.sh in Resources */, - A7ABD6841B702FF000A1223C /* evil_site_request.pem in Resources */, - A7ABD67E1B702FF000A1223C /* good_root_cert.der in Resources */, - A7ABD67F1B702FF000A1223C /* evil_root_cert.der in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7B463011C3D9C2200048423 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C889721B5EF5DE007A0E9C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C8898E1B5F043B007A0E9C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 07054A8503384810769C4EE6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-IntegrationTests/Pods-Tests-IntegrationTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 0E3747A662347DB932BAAA8A /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1AF31FFFC68A150437CF69D5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-UnitTests/Pods-Tests-UnitTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 32CEB6D06FB46630148B94D8 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 5E3DE597128C5D51E21FDBB5 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 629A6EB8F4008DD3E12EFAD8 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 80EBDB0F9969F80778684056 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 813FB4CFB8D5035A45483333 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 81778A4B594659FDC565260B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 93625D459EC36DF23263ED6B /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-IntegrationTests/Pods-Tests-IntegrationTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - BB509ACD43F858A5E24B8434 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F178B60F8BB314C6327E6297 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests-UnitTests/Pods-Tests-UnitTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 03F8B2621C23976000FD184B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 033800101C248B9C00CFF1D9 /* BraintreeDropInLegacy_UITests.swift in Sources */, - 0325AC241C289B5F00E90999 /* BraintreeThreeDSecure_UITests.swift in Sources */, - 0384E94D1C23BAFF001A3380 /* BraintreePayPal_UITests.swift in Sources */, - 0384E94F1C23C108001A3380 /* BTUITest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16CD2E981B4077FB00E68495 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 031B94CD1C3483E600F136C8 /* BTUICardExpiryFormatterSpec.m in Sources */, - 848470E21BE81893009B12AE /* BTFakeHTTP.m in Sources */, - A71F7DE71B6180A3005DA1B0 /* BTVenmoDriver_Tests.swift in Sources */, - 4149C91D1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift in Sources */, - 032C26881DDEEB5000BBC1C2 /* BTDropInUtil_Tests.swift in Sources */, - A7A6DD071B4308EB008857E1 /* BTPayPalDriver_Tests.swift in Sources */, - A74BCF031BE14C7000DC1CAE /* BTThreeDSecureDriver_Tests.swift in Sources */, - 031B94CC1C3482CC00F136C8 /* BTUICardExpirationValidatorSpec.m in Sources */, - A7AF0F601C20E80A00B3ADC6 /* BTThreeDSecureLookupResult_Tests.swift in Sources */, - A743CD211B449D8400757C9B /* BTAPIClient_Tests.m in Sources */, - 842B68F11BCF083E0039634F /* BTAPIClient_SwiftTests.swift in Sources */, - 031B94D11C34863200F136C8 /* BTUISpec.m in Sources */, - 031B94D01C3485ED00F136C8 /* EXPMatchers+haveKerning.m in Sources */, - A7E93E581B601EE900957223 /* BTURLUtils_Tests.swift in Sources */, - A7B462501C3C911200048423 /* PPOTConfigurationTest.m in Sources */, - A79AF9F31B56DB54007B1DF1 /* BTClientMetadataSpec.m in Sources */, - A7C823081B4DA9D7009D45D6 /* BTHTTPSpec.m in Sources */, - A71F7DE51B616BA0005DA1B0 /* BTVenmoAppSwitchURLSpec.m in Sources */, - 032D3A721C580B09000E5F6B /* PPDataCollectorTest.m in Sources */, - A7A094F61B8276E500D732CC /* BTCardNonce_Tests.swift in Sources */, - A7B7989C1C233C57001327FA /* BTConfiguration_Tests.swift in Sources */, - A7B4624D1C3C911200048423 /* PPOTAppSwitchUtilTest.m in Sources */, - A734A9911B87989400D2461B /* BTTestClientTokenFactory.m in Sources */, - A734A98E1B8797FD00D2461B /* BTClientTokenSpec.m in Sources */, - A7D6746D1B84073300ED6C00 /* MockDelegates.swift in Sources */, - A726BFE21B56D5E900B5C8F0 /* BTAnalyticsMetadataSpec.m in Sources */, - A7B798A01C238FC0001327FA /* BTTokenizationService_Tests.swift in Sources */, - A7D4630D1B4B16C100A09C46 /* BTHTTPTestProtocol.m in Sources */, - A7BC50BF1C29F6600024C870 /* BTDropInErrorState_Tests.m in Sources */, - A7B462591C3C911200048423 /* PPOTTimeTest.m in Sources */, - A7B4624A1C3C911200048423 /* PPOTAppSwitchResponseTest.m in Sources */, - 41D6E2A71B8D12CD00A3C2AE /* FakePayPalClasses.m in Sources */, - B67F983A1D762177007C1903 /* BTMacroTests.m in Sources */, - A79033981B45C968004C8234 /* BTCard_Tests.swift in Sources */, - A7AF0F621C222F9400B3ADC6 /* BTPaymentButton_Tests.swift in Sources */, - A7B462561C3C911200048423 /* PPOTErrorTest.m in Sources */, - 16CD2E9F1B4077FC00E68495 /* BTJSON_Tests.swift in Sources */, - 41B787BD1BAA20DB001AD351 /* BTDropInViewController_Tests.swift in Sources */, - A7CCE2AE1B67F26C006EA661 /* BTAppSwitch_Tests.swift in Sources */, - A71F7DE41B616BA0005DA1B0 /* BTVenmoAppSwitchReturnURLSpec.m in Sources */, - A5D3A5761C20975F003A25A1 /* PPFPTIDataTest.m in Sources */, - A7C8230E1B4DAAB2009D45D6 /* BTSpecHelper.m in Sources */, - A7B462531C3C911200048423 /* PPOTEncryptionTest.m in Sources */, - 031B94C41C34822800F136C8 /* BTUI_UIColor.m in Sources */, - 031B94CF1C34844700F136C8 /* BTUICardTypeSpec.m in Sources */, - A7B861BF1C24B19300A2422E /* BTVersion_Tests.swift in Sources */, - A7D64ABC1B4C93B6005168EF /* BTApplePay_Tests.swift in Sources */, - A75147E11B4217A00005BBBA /* BTCardClient_Tests.swift in Sources */, - A7B4AD571B4EFC76002FB23E /* MockAPIClient.swift in Sources */, - A7BC50BB1C29E4CD0024C870 /* BTLogger_Internal_Tests.m in Sources */, - 41F1D1FB1CAA005500DA34CB /* BTCardClient_UnionPayTests.swift in Sources */, - 844ED5E71BCC3F0B002B590C /* BTDataCollector_Tests.swift in Sources */, - A790339C1B45E16E004C8234 /* BTCard_Internal_Tests.m in Sources */, - A784965A1BD962260081531A /* BTCheckoutRequest_Tests.swift in Sources */, - A74BF1C81C57FBED0049E149 /* BTAnalyticsService_Tests.m in Sources */, - A5D3A5771C20975F003A25A1 /* PPFPTITrackerTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D331B59C76A0016EFB4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A5FE18361E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m in Sources */, - A7B1C14C1B66E11C00ED063C /* BTConfiguration+PayPal.m in Sources */, - A5FE18311E799EDF00CBE9C7 /* BTPayPalCreditFinancing.m in Sources */, - 2D941D451B59C8E60016EFB4 /* BTPayPalDriver.m in Sources */, - 2D941D421B59C8E60016EFB4 /* BTPayPalRequest.m in Sources */, - 2D941D4D1B59C8E60016EFB4 /* BTPayPalAccountNonce.m in Sources */, - 2D941D471B59C8E60016EFB4 /* BTPayPalRequestFactory.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D941D831B5D9E8C0016EFB4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D941D961B5D9F200016EFB4 /* BTThreeDSecureErrors.m in Sources */, - 2D941DA01B5D9F200016EFB4 /* BTThreeDSecureLocalizedString.m in Sources */, - 2D941D981B5D9F200016EFB4 /* BTThreeDSecureLookupResult.m in Sources */, - 2D941D9C1B5D9F200016EFB4 /* BTThreeDSecureCardNonce.m in Sources */, - 2D941D941B5D9F200016EFB4 /* BTThreeDSecureDriver.m in Sources */, - 2D941D921B5D9F200016EFB4 /* BTThreeDSecureAuthenticationViewController.m in Sources */, - 2D941D9E1B5D9F200016EFB4 /* BTWebViewController.m in Sources */, - 2D941D9A1B5D9F200016EFB4 /* BTThreeDSecureResponse.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DE12F041B59BE0100EA1BCF /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DE12F4F1B59C36900EA1BCF /* BTHTTPErrors.m in Sources */, - A7B1C1541B66F79900ED063C /* BTAppSwitch.m in Sources */, - 41211EF81BA0E45300DB1705 /* BTPaymentMethodNonce.m in Sources */, - 2DE12F531B59C36900EA1BCF /* BTKeychain.m in Sources */, - 2DE12F5C1B59C36900EA1BCF /* BTURLUtils.m in Sources */, - A74BF1C61C57F25F0049E149 /* BTAnalyticsService.m in Sources */, - A77346311B7BB1A70083EC8D /* BTTokenizationService.m in Sources */, - 2DE12F4D1B59C36900EA1BCF /* BTHTTP.m in Sources */, - 2DE12F511B59C36900EA1BCF /* BTJSON.m in Sources */, - 2DE12F561B59C36900EA1BCF /* BTLogger.m in Sources */, - 2DE12F591B59C36900EA1BCF /* BTPostalAddress.m in Sources */, - A77346241B7AA4D50083EC8D /* BTErrors.m in Sources */, - A7B1C1441B66B3D000ED063C /* BTConfiguration.m in Sources */, - 2DE12F491B59C36900EA1BCF /* BTAPIPinnedCertificates.m in Sources */, - 2DE12F441B59C36900EA1BCF /* BTAnalyticsMetadata.m in Sources */, - 415924B21BA0F2A900C095F6 /* BTPaymentMethodNonceParser.m in Sources */, - 2DE12F471B59C36900EA1BCF /* BTAPIClient.m in Sources */, - A7D674741B84FDB400ED6C00 /* BTClientToken.m in Sources */, - 2DE12F4B1B59C36900EA1BCF /* BTClientMetadata.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4164B9981C9B658E006AE861 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4164B9BB1C9B6988006AE861 /* BTCardClient+UnionPay.m in Sources */, - A77426581CA20793003CACBA /* BTCardCapabilities.m in Sources */, - 41472F951CB6D52200AFA75C /* BTConfiguration+UnionPay.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 417404451BB084D3008A5DEA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4174052C1BB086B3008A5DEA /* BTUIDiscoverVectorArtView.m in Sources */, - 4174052E1BB086B3008A5DEA /* BTUIJCBVectorArtView.m in Sources */, - 417405301BB086B3008A5DEA /* BTUIMaestroVectorArtView.m in Sources */, - 417405321BB086B3008A5DEA /* BTUIMasterCardVectorArtView.m in Sources */, - 41472F941CB6D52200AFA75C /* BTConfiguration+UnionPay.m in Sources */, - 417405341BB086B3008A5DEA /* BTUIPayPalMonogramCardView.m in Sources */, - 417405361BB086B3008A5DEA /* BTUIPayPalWordmarkCompactVectorArtView.m in Sources */, - 417405381BB086B3008A5DEA /* BTUIUnknownCardVectorArtView.m in Sources */, - 4174053A1BB086B3008A5DEA /* BTUIVenmoWordmarkVectorArtView.m in Sources */, - 4174053C1BB086B3008A5DEA /* BTUIVisaVectorArtView.m in Sources */, - 0371D13D1CBECAEE006A0B5D /* BTUIPayPalCompactButton.m in Sources */, - 0371D13C1CBECACD006A0B5D /* BTUIPayPalWordmarkVectorArtView.m in Sources */, - 4174053E1BB086B3008A5DEA /* BTUIViewUtil.m in Sources */, - 417404D31BB0869C008A5DEA /* BTDropInLocalizedString.m in Sources */, - 417404D51BB0869C008A5DEA /* BTDropInContentView.m in Sources */, - A74BEE3F1C58005300DDAB52 /* BTAnalyticsService.m in Sources */, - 417404D71BB0869C008A5DEA /* BTDropInErrorAlert.m in Sources */, - 417404D91BB0869C008A5DEA /* BTDropInErrorState.m in Sources */, - 417404DB1BB0869C008A5DEA /* BTDropInSelectPaymentMethodViewController.m in Sources */, - 417404DD1BB0869C008A5DEA /* BTDropInUtil.m in Sources */, - 417404DE1BB0869C008A5DEA /* BTDropInViewController.m in Sources */, - 417404DF1BB0869C008A5DEA /* BTPaymentButton.m in Sources */, - 417404E11BB0869C008A5DEA /* BTUILocalizedString.m in Sources */, - 417404E31BB0869C008A5DEA /* BTUICardExpirationValidator.m in Sources */, - 417404E51BB0869C008A5DEA /* BTUICardExpiryFormat.m in Sources */, - 417404E71BB0869C008A5DEA /* BTUICardType.m in Sources */, - 417404E91BB0869C008A5DEA /* BTUIUtil.m in Sources */, - 417404F81BB0869C008A5DEA /* BTUI.m in Sources */, - 417404F91BB0869C008A5DEA /* UIColor+BTUI.m in Sources */, - 417404FB1BB0869C008A5DEA /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m in Sources */, - 417404FD1BB0869C008A5DEA /* BTUIHorizontalButtonStackSeparatorLineView.m in Sources */, - 417404FF1BB0869C008A5DEA /* BTUIPaymentButtonCollectionViewCell.m in Sources */, - 417405011BB0869C008A5DEA /* BTUIFloatLabel.m in Sources */, - 417405031BB0869C008A5DEA /* BTUIFormField.m in Sources */, - 417405061BB0869C008A5DEA /* BTUIScrollView.m in Sources */, - 417405081BB0869C008A5DEA /* BTUITextField.m in Sources */, - 4174050A1BB0869C008A5DEA /* BTUIThemedView.m in Sources */, - A76D7C3A1BB31A2B0000FA6A /* BTDataCollector.m in Sources */, - 4174050C1BB0869C008A5DEA /* BTUIVectorArtView.m in Sources */, - A5FE18331E79A05D00CBE9C7 /* BTPayPalCreditFinancing.m in Sources */, - 4174050E1BB0869C008A5DEA /* BTUICardCvvField.m in Sources */, - 417405101BB0869C008A5DEA /* BTUICardExpiryField.m in Sources */, - 417405121BB0869D008A5DEA /* BTUICardNumberField.m in Sources */, - 417405141BB0869D008A5DEA /* BTUICardPostalCodeField.m in Sources */, - 417405151BB0869D008A5DEA /* BTUICardFormView.m in Sources */, - 417405161BB0869D008A5DEA /* BTUICTAControl.m in Sources */, - 417405171BB0869D008A5DEA /* BTUICardHint.m in Sources */, - 417405181BB0869D008A5DEA /* BTUICoinbaseButton.m in Sources */, - 417405191BB0869D008A5DEA /* BTUIPayPalButton.m in Sources */, - 4174051A1BB0869D008A5DEA /* BTUIPaymentMethodView.m in Sources */, - 4174051B1BB0869D008A5DEA /* BTUISummaryView.m in Sources */, - 4174051C1BB0869D008A5DEA /* BTUIVenmoButton.m in Sources */, - A774265B1CA207D2003CACBA /* BTCardCapabilities.m in Sources */, - 4174051E1BB0869D008A5DEA /* BTUIAmExVectorArtView.m in Sources */, - A751CAAC1CAC464C008603E5 /* BTCardRequest.m in Sources */, - 417405201BB0869D008A5DEA /* BTUICVVBackVectorArtView.m in Sources */, - 417405221BB0869D008A5DEA /* BTUICVVFrontVectorArtView.m in Sources */, - 46E2F0A01CF47D3300A5789D /* BTUIUnionPayVectorArtView.m in Sources */, - 41BC340D1BF695FC00161106 /* BTPaymentRequest.m in Sources */, - A5FE18351E79B75500CBE9C7 /* BTPayPalCreditFinancingAmount.m in Sources */, - 417405241BB0869D008A5DEA /* BTUICardVectorArtView.m in Sources */, - 417405261BB0869D008A5DEA /* BTUICoinbaseMonogramCardView.m in Sources */, - 417405281BB0869D008A5DEA /* BTUICoinbaseWordmarkVectorArtView.m in Sources */, - 4174052A1BB0869D008A5DEA /* BTUIDinersClubVectorArtView.m in Sources */, - 417404C71BB08658008A5DEA /* BTConfiguration+Venmo.m in Sources */, - 417404C91BB08658008A5DEA /* BTVenmoAppSwitchRequestURL.m in Sources */, - 417404CB1BB08658008A5DEA /* BTVenmoAppSwitchReturnURL.m in Sources */, - 417404CC1BB08658008A5DEA /* BTVenmoDriver.m in Sources */, - 417404CE1BB08658008A5DEA /* BTVenmoAccountNonce.m in Sources */, - 417404B71BB0864F008A5DEA /* BTConfiguration+PayPal.m in Sources */, - 417404B81BB0864F008A5DEA /* BTPayPalRequest.m in Sources */, - 417404B91BB0864F008A5DEA /* BTPayPalDriver.m in Sources */, - 417404BC1BB0864F008A5DEA /* BTPayPalRequestFactory.m in Sources */, - 417404BF1BB0864F008A5DEA /* BTPayPalAccountNonce.m in Sources */, - 4174047D1BB08629008A5DEA /* BTAnalyticsMetadata.m in Sources */, - 46E2F09F1CF47CF700A5789D /* BTUICardPhoneNumberField.m in Sources */, - 4174047F1BB08629008A5DEA /* BTAPIClient.m in Sources */, - 417404811BB08629008A5DEA /* BTAPIPinnedCertificates.m in Sources */, - 417404821BB08629008A5DEA /* BTAppSwitch.m in Sources */, - 417404831BB08629008A5DEA /* BTClientMetadata.m in Sources */, - 417404841BB08629008A5DEA /* BTClientToken.m in Sources */, - 417404851BB08629008A5DEA /* BTConfiguration.m in Sources */, - 417404871BB08629008A5DEA /* BTErrors.m in Sources */, - 4174048A1BB08629008A5DEA /* BTHTTP.m in Sources */, - 4174048B1BB08629008A5DEA /* BTHTTPErrors.m in Sources */, - 4174048C1BB08629008A5DEA /* BTJSON.m in Sources */, - 4174048E1BB08629008A5DEA /* BTKeychain.m in Sources */, - 417404901BB08629008A5DEA /* BTLogger.m in Sources */, - 417404911BB08629008A5DEA /* BTPostalAddress.m in Sources */, - 417404941BB08629008A5DEA /* BTPaymentMethodNonce.m in Sources */, - 417404951BB08629008A5DEA /* BTTokenizationService.m in Sources */, - 417404961BB08629008A5DEA /* BTPaymentMethodNonceParser.m in Sources */, - 413616EB1C1217F000D4C4A5 /* BTUIVenmoMonogramCardView.m in Sources */, - 417404971BB08629008A5DEA /* BTURLUtils.m in Sources */, - A5CEBBB11D8890A20064FD29 /* BTConfiguration+DataCollector.m in Sources */, - 417404741BB085F1008A5DEA /* BTCardClient.m in Sources */, - 417404751BB085F1008A5DEA /* BTCard.m in Sources */, - 4164B9C01C9B74D4006AE861 /* BTCardClient+UnionPay.m in Sources */, - 417404771BB085F1008A5DEA /* BTCardNonce.m in Sources */, - 4174046A1BB08530008A5DEA /* BTApplePayClient.m in Sources */, - 4174046C1BB08530008A5DEA /* BTConfiguration+ApplePay.m in Sources */, - 4174046D1BB08530008A5DEA /* BTApplePayCardNonce.m in Sources */, - 417404531BB08526008A5DEA /* BTThreeDSecureLocalizedString.m in Sources */, - 417404591BB08526008A5DEA /* BTThreeDSecureAuthenticationViewController.m in Sources */, - 4174045A1BB08526008A5DEA /* BTThreeDSecureDriver.m in Sources */, - 4174045B1BB08526008A5DEA /* BTThreeDSecureErrors.m in Sources */, - 4174045D1BB08526008A5DEA /* BTThreeDSecureLookupResult.m in Sources */, - 4174045F1BB08526008A5DEA /* BTThreeDSecureResponse.m in Sources */, - 417404601BB08526008A5DEA /* BTThreeDSecureCardNonce.m in Sources */, - 417404641BB08526008A5DEA /* BTWebViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7EDE474D1CD2C3D00005E22B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDE474E1CD2C3D00005E22B /* PPOTSimpleKeychain.m in Sources */, - 7EDE474F1CD2C3D00005E22B /* PPOTDevice.m in Sources */, - 7EDE47501CD2C3D00005E22B /* PPOTString.m in Sources */, - 7EDE47511CD2C3D00005E22B /* PPOTEncryptionHelper.m in Sources */, - 7EDE47521CD2C3D00005E22B /* PPOTJSONHelper.m in Sources */, - 7EDE47531CD2C3D00005E22B /* PPOTURLSession.m in Sources */, - 7EDE47541CD2C3D00005E22B /* PPOTPinnedCertificates.m in Sources */, - 7EDE47561CD2C3D00005E22B /* PPOTMacros.m in Sources */, - 7EDE47571CD2C3D00005E22B /* PPOTTime.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3AD11C19F00600612D90 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A50C3B581C1A1D1A00612D90 /* PPFPTIData.m in Sources */, - A50C3B591C1A1D1A00612D90 /* PPFPTITracker.m in Sources */, - A50C3B4C1C1A1CFC00612D90 /* PPOTRequest.m in Sources */, - A50C3B571C1A1CFC00612D90 /* PPOTAnalyticsTracker.m in Sources */, - A76B99351C3EF8E400A584F6 /* PPOTJSONHelper.m in Sources */, - A76B99371C3EF8E900A584F6 /* PPOTMacros.m in Sources */, - A50C3B3A1C1A1CDD00612D90 /* PPOTConfiguration.m in Sources */, - A50C3B3B1C1A1CDD00612D90 /* PPOTAppSwitchResponse.m in Sources */, - A76B993D1C3EF8F000A584F6 /* PPOTPinnedCertificates.m in Sources */, - A50C3B3C1C1A1CDD00612D90 /* PPOTAppSwitchUtil.m in Sources */, - A50C3B3D1C1A1CDD00612D90 /* PPOTCheckoutAppSwitchRequest.m in Sources */, - A50C3B3E1C1A1CDD00612D90 /* PPOTCheckoutBrowserSwitchRequest.m in Sources */, - A76B99311C3EF8DC00A584F6 /* PPOTDevice.m in Sources */, - A50C3B3F1C1A1CDD00612D90 /* PPOTCheckoutSwitchRequest.m in Sources */, - A50C3B401C1A1CDD00612D90 /* PPOTError.m in Sources */, - A50C3B411C1A1CDD00612D90 /* PPOTOAuth2AppSwitchRequest.m in Sources */, - A76B993E1C3EF8F000A584F6 /* PPOTSimpleKeychain.m in Sources */, - A76B993F1C3EF8F000A584F6 /* PPOTString.m in Sources */, - A50C3B421C1A1CDD00612D90 /* PPOTOAuth2BrowserSwitchRequest.m in Sources */, - A50C3B431C1A1CDD00612D90 /* PPOTOAuth2SwitchRequest.m in Sources */, - A76B99331C3EF8E000A584F6 /* PPOTEncryptionHelper.m in Sources */, - A50C3B441C1A1CDD00612D90 /* PPOTPersistentRequestData.m in Sources */, - A50C3B451C1A1CDD00612D90 /* PPOTSwitchRequest.m in Sources */, - A50C3B461C1A1CDD00612D90 /* PPOTAuthorizationRequest.m in Sources */, - A76B99411C3EF8F000A584F6 /* PPOTURLSession.m in Sources */, - A50C3B471C1A1CDD00612D90 /* PPOTBillingAgreementRequest.m in Sources */, - A50C3B481C1A1CDD00612D90 /* PPOTCheckoutRequest.m in Sources */, - A50C3B491C1A1CDD00612D90 /* PPOTCore.m in Sources */, - A50C3B4A1C1A1CDD00612D90 /* PPOTResult.m in Sources */, - A50C3B4B1C1A1CDD00612D90 /* PPOTRequestFactory.m in Sources */, - A76B99401C3EF8F000A584F6 /* PPOTTime.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B011C19F55C00612D90 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A76B99341C3EF8E300A584F6 /* PPOTJSONHelper.m in Sources */, - A76B993A1C3EF8EF00A584F6 /* PPOTString.m in Sources */, - A76B993B1C3EF8EF00A584F6 /* PPOTTime.m in Sources */, - A76B993C1C3EF8EF00A584F6 /* PPOTURLSession.m in Sources */, - A76B99321C3EF8DF00A584F6 /* PPOTEncryptionHelper.m in Sources */, - A76B99391C3EF8EF00A584F6 /* PPOTSimpleKeychain.m in Sources */, - A76B99381C3EF8EF00A584F6 /* PPOTPinnedCertificates.m in Sources */, - A76B99301C3EF8DB00A584F6 /* PPOTDevice.m in Sources */, - A76B99361C3EF8E800A584F6 /* PPOTMacros.m in Sources */, - A76B99191C3EF48600A584F6 /* PPDataCollector.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A50C3B6A1C1A29C500612D90 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A50C3B961C1A2AB000612D90 /* PPOTRequestFactory.m in Sources */, - A50C3B771C1A2A3E00612D90 /* PPOTConfiguration.m in Sources */, - A50C3B781C1A2A3E00612D90 /* PPOTAppSwitchResponse.m in Sources */, - A50C3B791C1A2A3E00612D90 /* PPOTAppSwitchUtil.m in Sources */, - A50C3B7A1C1A2A3E00612D90 /* PPOTCheckoutAppSwitchRequest.m in Sources */, - A50C3B7B1C1A2A3E00612D90 /* PPOTCheckoutBrowserSwitchRequest.m in Sources */, - A50C3B7C1C1A2A3E00612D90 /* PPOTCheckoutSwitchRequest.m in Sources */, - A50C3B7D1C1A2A3E00612D90 /* PPOTError.m in Sources */, - A50C3B7E1C1A2A3E00612D90 /* PPOTOAuth2AppSwitchRequest.m in Sources */, - A50C3B7F1C1A2A3E00612D90 /* PPOTOAuth2BrowserSwitchRequest.m in Sources */, - A50C3B801C1A2A3E00612D90 /* PPOTOAuth2SwitchRequest.m in Sources */, - A50C3B811C1A2A3E00612D90 /* PPOTPersistentRequestData.m in Sources */, - A50C3B821C1A2A3E00612D90 /* PPOTSwitchRequest.m in Sources */, - A50C3B831C1A2A3E00612D90 /* PPOTAuthorizationRequest.m in Sources */, - A50C3B841C1A2A3E00612D90 /* PPOTBillingAgreementRequest.m in Sources */, - A50C3B851C1A2A3E00612D90 /* PPOTCheckoutRequest.m in Sources */, - A50C3B861C1A2A3E00612D90 /* PPOTCore.m in Sources */, - A50C3B871C1A2A3E00612D90 /* PPOTResult.m in Sources */, - A50C3B881C1A2A3E00612D90 /* PPOTRequest.m in Sources */, - A50C3B931C1A2A3E00612D90 /* PPFPTIData.m in Sources */, - A50C3B941C1A2A3E00612D90 /* PPFPTITracker.m in Sources */, - A50C3B951C1A2A3E00612D90 /* PPOTAnalyticsTracker.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76B19871B79707700452CFA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A76B1A101B79708A00452CFA /* BraintreeDemoDemoContainmentViewController.m in Sources */, - A7A9C6D61B83CC6F00F5EBBA /* BraintreeDemoCardTokenizationViewController.m in Sources */, - A7A9C6D51B83C98000F5EBBA /* BraintreeDemoCustomVenmoButtonViewController.m in Sources */, - 03B368B31CAD95D300CDFC9C /* BraintreeDemoDropInLegacyViewController.m in Sources */, - A76B1A121B79708A00452CFA /* BraintreeDemoSlideNavigationController.m in Sources */, - A7A094FF1B839CC900D732CC /* BraintreeDemoApplePayPassKitViewController.m in Sources */, - A7A094FB1B8295E000D732CC /* BraintreeDemoCustomPayPalButtonViewController.m in Sources */, - A7A094FD1B829ACC00D732CC /* BraintreeDemoPayPalOneTimePaymentViewController.m in Sources */, - A7D674691B83E7F000ED6C00 /* BraintreeDemoCustomMultiPayViewController.m in Sources */, - A76B1A351B79708A00452CFA /* main.m in Sources */, - A76B1A111B79708A00452CFA /* BraintreeDemoIntegrationViewController.m in Sources */, - A73088361B86872C009487BA /* BraintreeDemoThreeDSecureViewController.m in Sources */, - A5FE183D1E79D5E700CBE9C7 /* BraintreeDemoPayPalCreditPaymentViewController.m in Sources */, - A76B1A0F1B79708A00452CFA /* BraintreeDemoAppDelegate.m in Sources */, - A7A094F81B828F4600D732CC /* BraintreeDemoBTUIPayPalButtonViewController.m in Sources */, - A76B1A141B79708A00452CFA /* BraintreeDemoSettings.m in Sources */, - A76B1A301B79708A00452CFA /* BraintreeDemoMerchantAPI.m in Sources */, - A51527381D9EEFE800FF3F77 /* BraintreeDemoDropInViewController.m in Sources */, - 03F54E121C499E1200F11033 /* BraintreeDemoPayPalForceFuturePaymentViewController.m in Sources */, - A7A9C6D01B83C6D600F5EBBA /* BraintreeDemoBTUIVenmoButtonViewController.m in Sources */, - A77524611CC99BA3002E4E62 /* BraintreeDemoUnionPayViewController.m in Sources */, - A7A094FC1B82983300D732CC /* BraintreeDemoPayPalScopesViewController.m in Sources */, - A7A094FA1B82919300D732CC /* BraintreeDemoPaymentButtonBaseViewController.m in Sources */, - A76B1A0C1B79708A00452CFA /* BraintreeDemoBaseViewController.m in Sources */, - A76D7C2F1BB217EE0000FA6A /* BraintreeDemoBTDataCollectorViewController.m in Sources */, - A7334F251BA38B0C0083C411 /* BraintreeDemoPayPalBillingAgreementViewController.m in Sources */, - A7D674681B83E5A100ED6C00 /* BraintreeDemoBTPaymentButtonViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A76D7BFB1BB1CAB00000FA6A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A76D7C231BB1CBDC0000FA6A /* BTDataCollector.m in Sources */, - B61F67811CE4C20F0051A3BD /* BTConfiguration+DataCollector.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77344F21B7A93A10083EC8D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A70241BA1C598BA200875DB8 /* BTUIPayPalWordmarkVectorArtView.m in Sources */, - A77345DB1B7A93D00083EC8D /* BTUIJCBVectorArtView.m in Sources */, - A773461F1B7A9E340083EC8D /* BTPaymentButton.m in Sources */, - A77345C91B7A93D00083EC8D /* BTUIVenmoButton.m in Sources */, - A773458F1B7A93D00083EC8D /* BTUICardExpiryFormat.m in Sources */, - A77346131B7A9E340083EC8D /* BTDropInContentView.m in Sources */, - A77345911B7A93D00083EC8D /* BTUICardType.m in Sources */, - A77345D31B7A93D00083EC8D /* BTUICVVBackVectorArtView.m in Sources */, - A77345931B7A93D00083EC8D /* BTUIUtil.m in Sources */, - A77345D91B7A93D00083EC8D /* BTUIDiscoverVectorArtView.m in Sources */, - A70241BE1C5A9A2F00875DB8 /* BTUIPayPalCompactButton.m in Sources */, - A77345C31B7A93D00083EC8D /* BTUIPaymentMethodView.m in Sources */, - A77345B91B7A93D00083EC8D /* BTUICardPostalCodeField.m in Sources */, - A77345E51B7A93D00083EC8D /* BTUIUnknownCardVectorArtView.m in Sources */, - 035945581BE96345002116BB /* BTUIVenmoMonogramCardView.m in Sources */, - A77345C51B7A93D00083EC8D /* BTUIPayPalButton.m in Sources */, - A773459E1B7A93D00083EC8D /* BTUIViewUtil.m in Sources */, - A77345B51B7A93D00083EC8D /* BTUICardExpiryField.m in Sources */, - A773461B1B7A9E340083EC8D /* BTDropInUtil.m in Sources */, - A77346171B7A9E340083EC8D /* BTDropInErrorState.m in Sources */, - A77345E91B7A93D00083EC8D /* BTUIVisaVectorArtView.m in Sources */, - A77345AD1B7A93D00083EC8D /* BTUITextField.m in Sources */, - A77345D71B7A93D00083EC8D /* BTUIDinersClubVectorArtView.m in Sources */, - A77345E11B7A93D00083EC8D /* BTUIPayPalMonogramCardView.m in Sources */, - A77345BF1B7A93D00083EC8D /* BTUICoinbaseButton.m in Sources */, - A77345AF1B7A93D00083EC8D /* BTUIThemedView.m in Sources */, - A77345A41B7A93D00083EC8D /* BTUIPaymentButtonCollectionViewCell.m in Sources */, - A77345A81B7A93D00083EC8D /* BTUIFormField.m in Sources */, - A77345C71B7A93D00083EC8D /* BTUISummaryView.m in Sources */, - A77345CF1B7A93D00083EC8D /* BTUICoinbaseMonogramCardView.m in Sources */, - A77346211B7A9E340083EC8D /* BTDropInLocalizedString.m in Sources */, - A77346151B7A9E340083EC8D /* BTDropInErrorAlert.m in Sources */, - A773461D1B7A9E340083EC8D /* BTDropInViewController.m in Sources */, - A77345BB1B7A93D00083EC8D /* BTUICardFormView.m in Sources */, - A77345D11B7A93D00083EC8D /* BTUICoinbaseWordmarkVectorArtView.m in Sources */, - A773458A1B7A93D00083EC8D /* BTUILocalizedString.m in Sources */, - A77345B71B7A93D00083EC8D /* BTUICardNumberField.m in Sources */, - A78422741C98920500D3EBFF /* BTUIUnionPayVectorArtView.m in Sources */, - A7F179FE1BE98E0E00E91646 /* BTPaymentRequest.m in Sources */, - A77345AB1B7A93D00083EC8D /* BTUIScrollView.m in Sources */, - A77345D51B7A93D00083EC8D /* BTUICVVFrontVectorArtView.m in Sources */, - A77345981B7A93D00083EC8D /* UIColor+BTUI.m in Sources */, - A77345A21B7A93D00083EC8D /* BTUIHorizontalButtonStackSeparatorLineView.m in Sources */, - A77345B31B7A93D00083EC8D /* BTUICardCvvField.m in Sources */, - A773458D1B7A93D00083EC8D /* BTUICardExpirationValidator.m in Sources */, - A77345C11B7A93D00083EC8D /* BTUICTAControl.m in Sources */, - A77346191B7A9E340083EC8D /* BTDropInSelectPaymentMethodViewController.m in Sources */, - A77345CB1B7A93D00083EC8D /* BTUIAmExVectorArtView.m in Sources */, - A77345961B7A93D00083EC8D /* BTUI.m in Sources */, - A77345CD1B7A93D00083EC8D /* BTUICardVectorArtView.m in Sources */, - A77345BD1B7A93D00083EC8D /* BTUICardHint.m in Sources */, - A77345DF1B7A93D00083EC8D /* BTUIMasterCardVectorArtView.m in Sources */, - A77345A61B7A93D00083EC8D /* BTUIFloatLabel.m in Sources */, - A77345E31B7A93D00083EC8D /* BTUIPayPalWordmarkCompactVectorArtView.m in Sources */, - A77345DD1B7A93D00083EC8D /* BTUIMaestroVectorArtView.m in Sources */, - A77345E71B7A93D00083EC8D /* BTUIVenmoWordmarkVectorArtView.m in Sources */, - A773459A1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationView.m in Sources */, - A773459C1B7A93D00083EC8D /* BTMockApplePayPaymentAuthorizationViewController.m in Sources */, - A77345A01B7A93D00083EC8D /* BTUIHorizontalButtonStackCollectionViewFlowLayout.m in Sources */, - 4107EB241C88C75000F32D81 /* BTUICardPhoneNumberField.m in Sources */, - A77345B11B7A93D00083EC8D /* BTUIVectorArtView.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A77AA2971B618C7700217B73 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A77AA2A71B618CFB00217B73 /* BTVenmoAppSwitchRequestURL.m in Sources */, - A77AA2AC1B618CFB00217B73 /* BTVenmoDriver.m in Sources */, - A77AA2A91B618CFB00217B73 /* BTVenmoAppSwitchReturnURL.m in Sources */, - A77AA2AE1B618CFB00217B73 /* BTVenmoAccountNonce.m in Sources */, - A7B1C1481B66D94600ED063C /* BTConfiguration+Venmo.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7ABD64F1B702FD800A1223C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A7ABD68E1B702FF000A1223C /* BraintreeCard_IntegrationTests.m in Sources */, - A7CB42D31B73E629002CCFDD /* BraintreePayPal_IntegrationTests.m in Sources */, - A71559421B729297007DE6F0 /* BTIntegrationTestsHelper.m in Sources */, - A7ABD6791B702FF000A1223C /* BTAPIClient_IntegrationTests.m in Sources */, - A78BF95D1CC6F32100DED8AA /* BraintreeUnionPay_IntegrationTests.m in Sources */, - A71559481B72B085007DE6F0 /* BraintreeApplePay_IntegrationTests.m in Sources */, - A7ABD67C1B702FF000A1223C /* BTHTTPSSLPinning_IntegrationTests.m in Sources */, - A76D7C341BB21CE90000FA6A /* BraintreeDataCollector_IntegrationTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7B462E11C3D9C2200048423 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A7B463601C3DBEFE00048423 /* PPDataCollector.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C8896F1B5EF5DE007A0E9C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C889831B5EF62C007A0E9C /* BTApplePayCardNonce.m in Sources */, - A7B1C1501B66E46900ED063C /* BTConfiguration+ApplePay.m in Sources */, - A7C889811B5EF62C007A0E9C /* BTApplePayClient.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A7C8898B1B5F043B007A0E9C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A7C889A71B5F0471007A0E9C /* BTCard.m in Sources */, - A7C889A91B5F0471007A0E9C /* BTCardNonce.m in Sources */, - A751CAAD1CAC464C008603E5 /* BTCardRequest.m in Sources */, - A7C889A41B5F0471007A0E9C /* BTCardClient.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 03CFEF3D1CD31242006D2DA5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7EDE474C1CD2C3D00005E22B /* PayPalUtils */; - targetProxy = 03CFEF3C1CD31242006D2DA5 /* PBXContainerItemProxy */; - }; - 03EF62091DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 03EF62081DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF620D1DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D371B59C76A0016EFB4 /* BraintreePayPal */; - targetProxy = 03EF620C1DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62111DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D871B5D9E8C0016EFB4 /* Braintree3DSecure */; - targetProxy = 03EF62101DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62151DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C889731B5EF5DE007A0E9C /* BraintreeApplePay */; - targetProxy = 03EF62141DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62191DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = 03EF62181DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF621D1DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77AA29B1B618C7700217B73 /* BraintreeVenmo */; - targetProxy = 03EF621C1DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62211DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77344F61B7A93A10083EC8D /* BraintreeUI */; - targetProxy = 03EF62201DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62251DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */; - targetProxy = 03EF62241DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF62291DB4A90C004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */; - targetProxy = 03EF62281DB4A90C004F4090 /* PBXContainerItemProxy */; - }; - 03EF622D1DB4A90D004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7B462E01C3D9C2200048423 /* PayPalDataCollector */; - targetProxy = 03EF622C1DB4A90D004F4090 /* PBXContainerItemProxy */; - }; - 03EF62311DB4A90D004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7EDE474C1CD2C3D00005E22B /* PayPalUtils */; - targetProxy = 03EF62301DB4A90D004F4090 /* PBXContainerItemProxy */; - }; - 03EF62351DB4A90D004F4090 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4164B9951C9B658E006AE861 /* BraintreeUnionPay */; - targetProxy = 03EF62341DB4A90D004F4090 /* PBXContainerItemProxy */; - }; - 2D941D5A1B5D5F140016EFB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 2D941D591B5D5F140016EFB4 /* PBXContainerItemProxy */; - }; - 2D941D631B5D6C850016EFB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D371B59C76A0016EFB4 /* BraintreePayPal */; - targetProxy = 2D941D621B5D6C850016EFB4 /* PBXContainerItemProxy */; - }; - 2D941D671B5D6C940016EFB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 2D941D661B5D6C940016EFB4 /* PBXContainerItemProxy */; - }; - 2D941DA21B5D9F470016EFB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D871B5D9E8C0016EFB4 /* Braintree3DSecure */; - targetProxy = 2D941DA11B5D9F470016EFB4 /* PBXContainerItemProxy */; - }; - 2D941DA51B5D9F790016EFB4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 2D941DA41B5D9F790016EFB4 /* PBXContainerItemProxy */; - }; - 4164B9961C9B658E006AE861 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 4164B9971C9B658E006AE861 /* PBXContainerItemProxy */; - }; - 4164B9B31C9B68D2006AE861 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = 4164B9B21C9B68D2006AE861 /* PBXContainerItemProxy */; - }; - 4169A8F01CAB10600051DDAF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4164B9951C9B658E006AE861 /* BraintreeUnionPay */; - targetProxy = 4169A8EF1CAB10600051DDAF /* PBXContainerItemProxy */; - }; - 4169A8F31CAB11110051DDAF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77344F61B7A93A10083EC8D /* BraintreeUI */; - targetProxy = 4169A8F21CAB11110051DDAF /* PBXContainerItemProxy */; - }; - 4169A8F51CAB11110051DDAF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4164B9951C9B658E006AE861 /* BraintreeUnionPay */; - targetProxy = 4169A8F41CAB11110051DDAF /* PBXContainerItemProxy */; - }; - 4169A8F71CAB11280051DDAF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */; - targetProxy = 4169A8F61CAB11280051DDAF /* PBXContainerItemProxy */; - }; - 41935DE81D528B2C008D48FB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 41935DE71D528B2C008D48FB /* PBXContainerItemProxy */; - }; - 41BC343B1BF69D3700161106 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76B198A1B79707700452CFA /* Demo */; - targetProxy = 41BC343A1BF69D3700161106 /* PBXContainerItemProxy */; - }; - 41D54D2F1C7F97680051C96B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = 41D54D2E1C7F97680051C96B /* PBXContainerItemProxy */; - }; - 41E3B35C1BA386DE0081824E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77344F61B7A93A10083EC8D /* BraintreeUI */; - targetProxy = 41E3B35B1BA386DE0081824E /* PBXContainerItemProxy */; - }; - 7EDE47751CD2C5520005E22B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7EDE474C1CD2C3D00005E22B /* PayPalUtils */; - targetProxy = 7EDE47741CD2C5520005E22B /* PBXContainerItemProxy */; - }; - 7EDE477B1CD2C5D00005E22B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7EDE474C1CD2C3D00005E22B /* PayPalUtils */; - targetProxy = 7EDE477A1CD2C5D00005E22B /* PBXContainerItemProxy */; - }; - 841CDCC41BCDBC6100A06B21 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */; - targetProxy = 841CDCC31BCDBC6100A06B21 /* PBXContainerItemProxy */; - }; - A50C3BB41C1A322800612D90 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B041C19F55C00612D90 /* PayPalDataCollector-StaticLibrary */; - targetProxy = A50C3BB31C1A322800612D90 /* PBXContainerItemProxy */; - }; - A50C3BD11C1B454100612D90 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */; - targetProxy = A50C3BD01C1B454100612D90 /* PBXContainerItemProxy */; - }; - A5D3A5A11C20BEDC003A25A1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B6E1C1A29C500612D90 /* PayPalOneTouch */; - targetProxy = A5D3A5A01C20BEDC003A25A1 /* PBXContainerItemProxy */; - }; - A71559561B72C2A7007DE6F0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D871B5D9E8C0016EFB4 /* Braintree3DSecure */; - targetProxy = A71559551B72C2A7007DE6F0 /* PBXContainerItemProxy */; - }; - A71559581B72C2A7007DE6F0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C889731B5EF5DE007A0E9C /* BraintreeApplePay */; - targetProxy = A70FADC11C03BE7A002752C9 /* PBXContainerItemProxy */; - }; - A715595E1B72C2A7007DE6F0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D371B59C76A0016EFB4 /* BraintreePayPal */; - targetProxy = A715595D1B72C2A7007DE6F0 /* PBXContainerItemProxy */; - }; - A71559601B72C2A7007DE6F0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77AA29B1B618C7700217B73 /* BraintreeVenmo */; - targetProxy = A715595F1B72C2A7007DE6F0 /* PBXContainerItemProxy */; - }; - A75319F21B715C4200E27B89 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = A75319F11B715C4200E27B89 /* PBXContainerItemProxy */; - }; - A75538391B8BC9C600054F82 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76B198A1B79707700452CFA /* Demo */; - targetProxy = A75538381B8BC9C600054F82 /* PBXContainerItemProxy */; - }; - A76D7C361BB318BF0000FA6A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */; - targetProxy = A76D7C351BB318BF0000FA6A /* PBXContainerItemProxy */; - }; - A77120511CD95DCE0004FFD3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = A77120501CD95DCE0004FFD3 /* PBXContainerItemProxy */; - }; - A77AA2A51B618CB300217B73 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A77AA29B1B618C7700217B73 /* BraintreeVenmo */; - targetProxy = A77AA2A41B618CB300217B73 /* PBXContainerItemProxy */; - }; - A77AA2B01B618D5000217B73 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = A77AA2AF1B618D5000217B73 /* PBXContainerItemProxy */; - }; - A77AA2B21B618D5000217B73 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = A77AA2B11B618D5000217B73 /* PBXContainerItemProxy */; - }; - A7ABD6901B70304200A1223C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = A7ABD68F1B70304200A1223C /* PBXContainerItemProxy */; - }; - A7B4623E1C3C742900048423 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A76B198A1B79707700452CFA /* Demo */; - targetProxy = A7B4623D1C3C742900048423 /* PBXContainerItemProxy */; - }; - A7B4625F1C3C941D00048423 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3AD41C19F00600612D90 /* PayPalOneTouch-StaticLibrary */; - targetProxy = A7B4625E1C3C941D00048423 /* PBXContainerItemProxy */; - }; - A7B462611C3C941D00048423 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A50C3B041C19F55C00612D90 /* PayPalDataCollector-StaticLibrary */; - targetProxy = A7B462601C3C941D00048423 /* PBXContainerItemProxy */; - }; - A7B463091C3D9FEE00048423 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7B462E01C3D9C2200048423 /* PayPalDataCollector */; - targetProxy = A7B463081C3D9FEE00048423 /* PBXContainerItemProxy */; - }; - A7B4630C1C3DA21200048423 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = A7B4630B1C3DA21200048423 /* PBXContainerItemProxy */; - }; - A7C88A281B5F109B007A0E9C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C889731B5EF5DE007A0E9C /* BraintreeApplePay */; - targetProxy = A7C88A271B5F109B007A0E9C /* PBXContainerItemProxy */; - }; - A7C88A2A1B5F109B007A0E9C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A7C8898F1B5F043B007A0E9C /* BraintreeCard */; - targetProxy = A7C88A291B5F109B007A0E9C /* PBXContainerItemProxy */; - }; - A7F5701E1C1611AA0007D018 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = A7F5701D1C1611AA0007D018 /* PBXContainerItemProxy */; - }; - A7F570201C1611B20007D018 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = A7F5701F1C1611B20007D018 /* PBXContainerItemProxy */; - }; - A7F570221C1611CA0007D018 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2DE12F081B59BE0100EA1BCF /* BraintreeCore */; - targetProxy = A7F570211C1611CA0007D018 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - A76B1A061B79708A00452CFA /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - A76B1A071B79708A00452CFA /* en */, - ); - name = InfoPlist.strings; - path = .; - sourceTree = ""; - }; - A76B1A081B79708A00452CFA /* Main.strings */ = { - isa = PBXVariantGroup; - children = ( - A76B1A091B79708A00452CFA /* en */, - ); - name = Main.strings; - path = .; - sourceTree = ""; - }; - A77345091B7A93D00083EC8D /* UI.strings */ = { - isa = PBXVariantGroup; - children = ( - A773450A1B7A93D00083EC8D /* da */, - A773450B1B7A93D00083EC8D /* de */, - A773450C1B7A93D00083EC8D /* en */, - A773450D1B7A93D00083EC8D /* en_AU */, - A773450E1B7A93D00083EC8D /* en_CA */, - A773450F1B7A93D00083EC8D /* en_GB */, - A77345101B7A93D00083EC8D /* es */, - A77345111B7A93D00083EC8D /* es_ES */, - A77345121B7A93D00083EC8D /* fr */, - A77345131B7A93D00083EC8D /* fr_CA */, - A77345141B7A93D00083EC8D /* fr_FR */, - A77345151B7A93D00083EC8D /* he */, - A77345161B7A93D00083EC8D /* it */, - A77345171B7A93D00083EC8D /* nb */, - A77345181B7A93D00083EC8D /* nl */, - A77345191B7A93D00083EC8D /* pl */, - A773451A1B7A93D00083EC8D /* pt */, - A773451B1B7A93D00083EC8D /* ru */, - A773451C1B7A93D00083EC8D /* sv */, - A773451D1B7A93D00083EC8D /* tr */, - A773451E1B7A93D00083EC8D /* zh-Hans */, - ); - name = UI.strings; - path = .; - sourceTree = ""; - }; - A77345FC1B7A9E340083EC8D /* Drop-In.strings */ = { - isa = PBXVariantGroup; - children = ( - A77345FD1B7A9E340083EC8D /* da */, - A77345FE1B7A9E340083EC8D /* de */, - A77345FF1B7A9E340083EC8D /* en */, - A77346001B7A9E340083EC8D /* en_AU */, - A77346011B7A9E340083EC8D /* en_CA */, - A77346021B7A9E340083EC8D /* en_GB */, - A77346031B7A9E340083EC8D /* es */, - A77346041B7A9E340083EC8D /* es_ES */, - A77346051B7A9E340083EC8D /* fr */, - A77346061B7A9E340083EC8D /* fr_CA */, - A77346071B7A9E340083EC8D /* fr_FR */, - A77346081B7A9E340083EC8D /* he */, - A77346091B7A9E340083EC8D /* it */, - A773460A1B7A9E340083EC8D /* nb */, - A773460B1B7A9E340083EC8D /* nl */, - A773460C1B7A9E340083EC8D /* pl */, - A773460D1B7A9E340083EC8D /* pt */, - A773460E1B7A9E340083EC8D /* ru */, - A773460F1B7A9E340083EC8D /* sv */, - A77346101B7A9E340083EC8D /* tr */, - A77346111B7A9E340083EC8D /* zh-Hans */, - ); - name = "Drop-In.strings"; - path = .; - sourceTree = ""; - }; - A79AFA4A1B56F822007B1DF1 /* Three-D-Secure.strings */ = { - isa = PBXVariantGroup; - children = ( - A79AFA4B1B56F822007B1DF1 /* da */, - A79AFA4C1B56F822007B1DF1 /* de */, - A79AFA4D1B56F822007B1DF1 /* en */, - A79AFA4E1B56F822007B1DF1 /* en_AU */, - A79AFA4F1B56F822007B1DF1 /* en_CA */, - A79AFA501B56F822007B1DF1 /* en_GB */, - A79AFA511B56F822007B1DF1 /* es */, - A79AFA521B56F822007B1DF1 /* es_ES */, - A79AFA531B56F822007B1DF1 /* fr */, - A79AFA541B56F822007B1DF1 /* fr_CA */, - A79AFA551B56F822007B1DF1 /* fr_FR */, - A79AFA561B56F822007B1DF1 /* he */, - A79AFA571B56F822007B1DF1 /* it */, - A79AFA581B56F822007B1DF1 /* nb */, - A79AFA591B56F822007B1DF1 /* nl */, - A79AFA5A1B56F822007B1DF1 /* pl */, - A79AFA5B1B56F822007B1DF1 /* pt */, - A79AFA5C1B56F823007B1DF1 /* ru */, - A79AFA5D1B56F823007B1DF1 /* sv */, - A79AFA5E1B56F823007B1DF1 /* tr */, - A79AFA5F1B56F823007B1DF1 /* zh-Hans */, - ); - name = "Three-D-Secure.strings"; - path = .; - sourceTree = ""; - }; - A7ABD6751B702FF000A1223C /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - A7ABD6761B702FF000A1223C /* en */, - ); - name = InfoPlist.strings; - path = .; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 03F8B26D1C23976100FD184B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = UITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.UITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TEST_TARGET_NAME = Demo; - USES_XCTRUNNER = YES; - }; - name = Debug; - }; - 03F8B26E1C23976100FD184B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = UITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.UITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_TARGET_NAME = Demo; - USES_XCTRUNNER = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 16CD2EA41B4077FC00E68495 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F856ADC418A9254523A85526 /* Pods-Tests-UnitTests.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.braintreepayments.Braintree-Unit-Tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; - SRCROOT = "$(PROJECT_DIR)"; - SWIFT_OBJC_BRIDGING_HEADER = "UnitTests/UnitTests-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; - }; - name = Debug; - }; - 16CD2EA51B4077FC00E68495 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4621B720EE8A9B65FFFE3632 /* Pods-Tests-UnitTests.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.braintreepayments.Braintree-Unit-Tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; - SRCROOT = "$(PROJECT_DIR)"; - SWIFT_OBJC_BRIDGING_HEADER = "UnitTests/UnitTests-Bridging-Header.h"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2D941D3E1B59C76A0016EFB4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SOURCE_ROOT)/**"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPal; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2D941D3F1B59C76A0016EFB4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SOURCE_ROOT)/**"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPal; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 2D941D8D1B5D9E8C0016EFB4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.Braintree3DSecure; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2D941D8E1B5D9E8C0016EFB4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.Braintree3DSecure; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 2DE12F0E1B59BE0100EA1BCF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = BraintreeCore/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeCore; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2DE12F0F1B59BE0100EA1BCF /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = BraintreeCore/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeCore; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 4164B9AA1C9B658E006AE861 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeUnionPay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 4164B9AB1C9B658E006AE861 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeUnionPay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 417404501BB084D3008A5DEA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalOneTouchCore", - "$(PROJECT_DIR)/BraintreeDataCollector/Kount", - ); - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 417404511BB084D3008A5DEA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalOneTouchCore", - "$(PROJECT_DIR)/BraintreeDataCollector/Kount", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 7EDE476E1CD2C3D00005E22B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreePayPal/PayPalUtils/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalUtils; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 7EDE476F1CD2C3D00005E22B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreePayPal/PayPalUtils/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalUtils; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A50C3ADC1C19F00600612D90 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - A50C3ADD1C19F00600612D90 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A50C3B0C1C19F55C00612D90 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/PayPalDataCollector/Risk", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - A50C3B0D1C19F55C00612D90 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/PayPalDataCollector/Risk", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A50C3B751C1A29C500612D90 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = BraintreePayPal/PayPalOneTouch/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ""; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalOneTouch; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A50C3B761C1A29C500612D90 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = BraintreePayPal/PayPalOneTouch/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ""; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalOneTouch; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A75DA348192138F000D997A2 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Info.plist"; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - TARGET_TYPE = Specs; - WARNING_CFLAGS = ( - "-Wall", - "-Wextra", - "-Werror", - ); - }; - name = Debug; - }; - A75DA349192138F000D997A2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Info.plist"; - OTHER_CFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGET_TYPE = Specs; - WARNING_CFLAGS = ( - "-Wall", - "-Wextra", - "-Werror", - ); - }; - name = Release; - }; - A76B199F1B79707700452CFA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 10A1F947EB4DC18E4744F5FE /* Pods-Demo.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_ENTITLEMENTS = "Demo/Braintree-Demo.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Demo/Supporting Files/Braintree-Demo-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.Demo; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - A76B19A01B79707700452CFA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D5477E9CCBB2B1B37661129D /* Pods-Demo.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_ENTITLEMENTS = "Demo/Braintree-Demo.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Demo/Supporting Files/Braintree-Demo-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.Demo; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A76D7C171BB1CAB00000FA6A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreeDataCollector/Kount", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeDataCollector; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A76D7C181BB1CAB00000FA6A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreeDataCollector/Kount", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeDataCollector; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A77345001B7A93A10083EC8D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeUI; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A77345011B7A93A10083EC8D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeUI; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A77AA2A21B618C7700217B73 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeVenmo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A77AA2A31B618C7700217B73 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeVenmo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A7ABD65B1B702FD900A1223C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D9AFC14FFCF2029AE39FA3BA /* Pods-Tests-IntegrationTests.debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = "$(PROJECT_DIR)/IntegrationTests/IntegrationTests.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = IntegrationTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.IntegrationTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "IntegrationTests/IntegrationTests-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; - }; - name = Debug; - }; - A7ABD65C1B702FD900A1223C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0CF0BA897F9E79A01D6A2C66 /* Pods-Tests-IntegrationTests.release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = "$(PROJECT_DIR)/IntegrationTests/IntegrationTests.pch"; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = IntegrationTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.IntegrationTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "IntegrationTests/IntegrationTests-Bridging-Header.h"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A7B463031C3D9C2200048423 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreePayPal/PayPalDataCollector/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalDataCollector; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A7B463041C3D9C2200048423 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreePayPal/PayPalDataCollector/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/BraintreePayPal/PayPalDataCollector/Risk", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.paypal.PayPalDataCollector; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A7C8897A1B5EF5DE007A0E9C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeApplePay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A7C8897B1B5EF5DE007A0E9C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeApplePay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A7C8899A1B5F043B007A0E9C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeCard; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A7C8899B1B5F043B007A0E9C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreeCard; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 03F8B26F1C23976100FD184B /* Build configuration list for PBXNativeTarget "UITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 03F8B26D1C23976100FD184B /* Debug */, - 03F8B26E1C23976100FD184B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16CD2EA61B4077FC00E68495 /* Build configuration list for PBXNativeTarget "UnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16CD2EA41B4077FC00E68495 /* Debug */, - 16CD2EA51B4077FC00E68495 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D941D3D1B59C76A0016EFB4 /* Build configuration list for PBXNativeTarget "BraintreePayPal" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D941D3E1B59C76A0016EFB4 /* Debug */, - 2D941D3F1B59C76A0016EFB4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D941D8F1B5D9E8C0016EFB4 /* Build configuration list for PBXNativeTarget "Braintree3DSecure" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D941D8D1B5D9E8C0016EFB4 /* Debug */, - 2D941D8E1B5D9E8C0016EFB4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2DE12F101B59BE0100EA1BCF /* Build configuration list for PBXNativeTarget "BraintreeCore" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2DE12F0E1B59BE0100EA1BCF /* Debug */, - 2DE12F0F1B59BE0100EA1BCF /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4164B9A91C9B658E006AE861 /* Build configuration list for PBXNativeTarget "BraintreeUnionPay" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4164B9AA1C9B658E006AE861 /* Debug */, - 4164B9AB1C9B658E006AE861 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4174044F1BB084D3008A5DEA /* Build configuration list for PBXNativeTarget "Braintree" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 417404501BB084D3008A5DEA /* Debug */, - 417404511BB084D3008A5DEA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7EDE476D1CD2C3D00005E22B /* Build configuration list for PBXNativeTarget "PayPalUtils" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7EDE476E1CD2C3D00005E22B /* Debug */, - 7EDE476F1CD2C3D00005E22B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A50C3ADB1C19F00600612D90 /* Build configuration list for PBXNativeTarget "PayPalOneTouch-StaticLibrary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A50C3ADC1C19F00600612D90 /* Debug */, - A50C3ADD1C19F00600612D90 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A50C3B0B1C19F55C00612D90 /* Build configuration list for PBXNativeTarget "PayPalDataCollector-StaticLibrary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A50C3B0C1C19F55C00612D90 /* Debug */, - A50C3B0D1C19F55C00612D90 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A50C3B741C1A29C500612D90 /* Build configuration list for PBXNativeTarget "PayPalOneTouch" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A50C3B751C1A29C500612D90 /* Debug */, - A50C3B761C1A29C500612D90 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A75DA347192138F000D997A2 /* Build configuration list for PBXProject "Braintree" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A75DA348192138F000D997A2 /* Debug */, - A75DA349192138F000D997A2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A76B19A11B79707700452CFA /* Build configuration list for PBXNativeTarget "Demo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A76B199F1B79707700452CFA /* Debug */, - A76B19A01B79707700452CFA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A76D7C1B1BB1CAB00000FA6A /* Build configuration list for PBXNativeTarget "BraintreeDataCollector" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A76D7C171BB1CAB00000FA6A /* Debug */, - A76D7C181BB1CAB00000FA6A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A77345021B7A93A10083EC8D /* Build configuration list for PBXNativeTarget "BraintreeUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A77345001B7A93A10083EC8D /* Debug */, - A77345011B7A93A10083EC8D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A77AA2A11B618C7700217B73 /* Build configuration list for PBXNativeTarget "BraintreeVenmo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A77AA2A21B618C7700217B73 /* Debug */, - A77AA2A31B618C7700217B73 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A7ABD65A1B702FD900A1223C /* Build configuration list for PBXNativeTarget "IntegrationTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A7ABD65B1B702FD900A1223C /* Debug */, - A7ABD65C1B702FD900A1223C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A7B463021C3D9C2200048423 /* Build configuration list for PBXNativeTarget "PayPalDataCollector" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A7B463031C3D9C2200048423 /* Debug */, - A7B463041C3D9C2200048423 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A7C889791B5EF5DE007A0E9C /* Build configuration list for PBXNativeTarget "BraintreeApplePay" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A7C8897A1B5EF5DE007A0E9C /* Debug */, - A7C8897B1B5EF5DE007A0E9C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A7C889991B5F043B007A0E9C /* Build configuration list for PBXNativeTarget "BraintreeCard" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A7C8899A1B5F043B007A0E9C /* Debug */, - A7C8899B1B5F043B007A0E9C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A75DA344192138F000D997A2 /* Project object */; -} diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/0AC71B63-8A4C-42F9-AD7C-1C7EF957B618.plist b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/0AC71B63-8A4C-42F9-AD7C-1C7EF957B618.plist deleted file mode 100755 index b6a208db..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/0AC71B63-8A4C-42F9-AD7C-1C7EF957B618.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - classNames - - BTAPIClient_SwiftTests - - testAPIClientInitialization_withValidClientToken_performanceMeetsExpectations() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.00704 - baselineIntegrationDisplayName - Local Baseline - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/Info.plist b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/Info.plist deleted file mode 100755 index 369f98ce..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcbaselines/16CD2E9B1B4077FB00E68495.xcbaseline/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - runDestinationsByUUID - - 0AC71B63-8A4C-42F9-AD7C-1C7EF957B618 - - localComputer - - busSpeedInMHz - 100 - cpuCount - 1 - cpuKind - Intel Core i7 - cpuSpeedInMHz - 3100 - logicalCPUCoresPerPackage - 4 - modelCode - MacBookPro12,1 - physicalCPUCoresPerPackage - 2 - platformIdentifier - com.apple.platform.macosx - - targetArchitecture - x86_64 - targetDevice - - modelCode - iPhone9,2 - platformIdentifier - com.apple.platform.iphonesimulator - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree.xcscheme deleted file mode 100755 index fad3e094..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree3DSecure.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree3DSecure.xcscheme deleted file mode 100755 index 047b1069..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Braintree3DSecure.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeApplePay.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeApplePay.xcscheme deleted file mode 100755 index 04aacd19..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeApplePay.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCard.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCard.xcscheme deleted file mode 100755 index 2e078490..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCard.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCore.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCore.xcscheme deleted file mode 100755 index 6e9cac54..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeCore.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeDataCollector.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeDataCollector.xcscheme deleted file mode 100755 index a5456dd5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeDataCollector.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPal.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPal.xcscheme deleted file mode 100755 index 37128d49..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPal.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUI.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUI.xcscheme deleted file mode 100755 index e8659519..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUI.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUnionPay.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUnionPay.xcscheme deleted file mode 100755 index 0ef7f0eb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeUnionPay.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeVenmo.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeVenmo.xcscheme deleted file mode 100755 index 59f3bca9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeVenmo.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme deleted file mode 100755 index 03c97879..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/IntegrationTests.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/IntegrationTests.xcscheme deleted file mode 100755 index 10c126e6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/IntegrationTests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector-StaticLibrary.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector-StaticLibrary.xcscheme deleted file mode 100755 index c148e459..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector-StaticLibrary.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector.xcscheme deleted file mode 100755 index 94094ca7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalDataCollector.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch-StaticLibrary.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch-StaticLibrary.xcscheme deleted file mode 100755 index 2a15814d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch-StaticLibrary.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch.xcscheme deleted file mode 100755 index 8b22318b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalOneTouch.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalUtils.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalUtils.xcscheme deleted file mode 100755 index 8c1b10c4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/PayPalUtils.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme deleted file mode 100755 index db788b8c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme deleted file mode 100755 index c2fb8da0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/contents.xcworkspacedata b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index a633fa2f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100755 index 08de0be8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree/API/@Public/README.md b/examples/braintree/ios/Frameworks/Braintree/Braintree/API/@Public/README.md deleted file mode 100755 index 4d605dd3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree/API/@Public/README.md +++ /dev/null @@ -1,4 +0,0 @@ -[The Braintree iOS SDK 3.x Card header files have moved here.](https://github.com/braintree/braintree_ios/tree/3.x/Braintree/API/@Public) - -Note: Those header files are for an old version of our SDK. We recommend upgrading to [the latest version](https://github.com/braintree/braintree_ios/) at your convenience. - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.h deleted file mode 100755 index 547eaa51..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.h +++ /dev/null @@ -1,106 +0,0 @@ -#import - -#import "BTThreeDSecureLookupResult.h" -#import "BTThreeDSecureErrors.h" -#import "BTThreeDSecureCardNonce.h" -#import "BTWebViewController.h" - -typedef NS_ENUM(NSInteger, BTThreeDSecureViewControllerCompletionStatus) { - BTThreeDSecureViewControllerCompletionStatusFailure = 0, - BTThreeDSecureViewControllerCompletionStatusSuccess, -}; - -@protocol BTThreeDSecureAuthenticationViewControllerDelegate; - -/*! - @brief A view controller that authenticates a cardholder for 3D Secure - - @discussion Initialize this view controller with a BTThreeDSecureLookupResult, which contains the - information that is needed to obtain cardholder authorization via the issuing bank's login - within a web view for a particular card. - - You can perform the prerequisite lookup via the - -[BTThreeDSecureDriver verifyCardWithNonce:amount:completion:] instance method. - - An initialized BTThreeDSecureViewController will challenge the user as soon as it is presented - and cannot be reused. - - On success, the original payment method nonce is consumed, and you will receive a new payment - method nonce. Transactions created with this nonce will be 3D Secure. - - This view controller is not always necessary to achieve a successful 3D Secure verification. Sometimes, - the lookup will consume the original nonce and return an upgraded 3D Secure nonce directly. - - @see BTThreeDSecureDriver - - @note Do not initialize this view controller directly. Instead, use `BTThreeDSecureDriver` to initiate the 3D Secure flow. -*/ -@interface BTThreeDSecureAuthenticationViewController : BTWebViewController - -/*! - @brief Initializes a 3D Secure authentication view controller - - @param lookupResult Contains the result of the 3D Secure lookup - - @return A view controller or nil when authentication is not possible and/or required. -*/ -- (instancetype)initWithLookupResult:(BTThreeDSecureLookupResult *)lookupResult NS_DESIGNATED_INITIALIZER; - -/*! - @discussion The delegate is notified when the 3D Secure authentication flow completes. - This is a strong reference, so to prevent a retain cycle, the delegate must not keep a strong - reference to the BTThreeDSecureAuthenticationViewController. - */ -@property (nonatomic, strong) id delegate; - -@end - -@protocol BTThreeDSecureAuthenticationViewControllerDelegate - -/*! - @brief The delegate will receive this message after the user has successfully authenticated with 3D Secure - - @discussion On Braintree's servers, this nonce will point to both a card and its 3D Secure verification. - - This implementation is responsible for receiving the 3D Secure payment method nonce and transmitting - it to your server for server-side operations. Upon completion, you must call the completionBlock. - - Do *not* dismiss the view controller in this method. See threeDSecureViewControllerDidFinish:. - - @param viewController The 3D Secure view controller - @param tokenizedCard The new payment method that should be used for creating a 3D Secure transaction - @param completionBlock A block that must be called upon completion of any asynchronous work that processes the received card -*/ -- (void)threeDSecureViewController:(BTThreeDSecureAuthenticationViewController *)viewController - didAuthenticateCard:(BTThreeDSecureCardNonce *)tokenizedCard - completion:(void (^)(BTThreeDSecureViewControllerCompletionStatus status))completionBlock; - -/*! - @brief The delegate will receive this message when 3D Secure authentication fails - - @discussion This can occur due to a system error, lack of issuer participation or failed user authentication. - - Do *not* dismiss the view controller in this method. See threeDSecureViewControllerDidFinish:. - - @param viewController The 3D Secure view controller - @param error The error that caused 3D Secure to fail -*/ -- (void)threeDSecureViewController:(BTThreeDSecureAuthenticationViewController *)viewController - didFailWithError:(NSError *)error; - -/*! - @brief The delegate will receive this message upon completion of the 3D Secure flow, possibly including async work that happens in your implementation of threeDSecureViewController:didAuthenticateNonce:completion: - - @discussion This method will be called in both success and failure cases. - - You should dismiss the provided view controller in your implementation. - - @param viewController The 3D Secure view controller -*/ -- (void)threeDSecureViewControllerDidFinish:(BTThreeDSecureAuthenticationViewController *)viewController; - -@optional - -- (void)threeDSecureViewController:(BTThreeDSecureAuthenticationViewController *)viewController didPresentErrorToUserForURLRequest:(NSURLRequest *)request; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.m deleted file mode 100755 index a1cea0e5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureAuthenticationViewController.m +++ /dev/null @@ -1,122 +0,0 @@ -#import "BTThreeDSecureAuthenticationViewController.h" -#import "BTThreeDSecureResponse.h" -#import "BTWebViewController.h" -#import "BTURLUtils.h" -#import "BTCardNonce_Internal.h" - -@interface BTThreeDSecureAuthenticationViewController () -@end - -@implementation BTThreeDSecureAuthenticationViewController - -- (instancetype)initWithLookupResult:(BTThreeDSecureLookupResult *)lookupResult { - if (!lookupResult.requiresUserAuthentication) { - return nil; - } - - NSURLRequest *acsRequest = [self acsRequestForLookupResult:lookupResult]; - return [super initWithRequest:acsRequest]; -} - -- (instancetype)initWithRequest:(NSURLRequest *)request { - return [self initWithRequest:request]; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel - target:self - action:@selector(tappedCancel)]; -} - -- (NSURLRequest *)acsRequestForLookupResult:(BTThreeDSecureLookupResult *)lookupResult { - NSMutableURLRequest *acsRequest = [NSMutableURLRequest requestWithURL:lookupResult.acsURL]; - [acsRequest setHTTPMethod:@"POST"]; - NSDictionary *fields = @{ @"PaReq": lookupResult.PAReq, - @"TermUrl": lookupResult.termURL, - @"MD": lookupResult.MD }; - [acsRequest setHTTPBody:[[BTURLUtils queryStringWithDictionary:fields] dataUsingEncoding:NSUTF8StringEncoding]]; - [acsRequest setAllHTTPHeaderFields:@{ @"Accept": @"text/html", @"Content-Type": @"application/x-www-form-urlencoded"}]; - return acsRequest; -} - -- (void)didCompleteAuthentication:(BTThreeDSecureResponse *)response { - dispatch_async(dispatch_get_main_queue(), ^{ - if (response.success) { - if ([self.delegate respondsToSelector:@selector(threeDSecureViewController:didAuthenticateCard:completion:)]) { - [self.delegate threeDSecureViewController:self - didAuthenticateCard:response.tokenizedCard - completion:^(__unused BTThreeDSecureViewControllerCompletionStatus status) { - if ([self.delegate respondsToSelector:@selector(threeDSecureViewControllerDidFinish:)]) { - [self.delegate threeDSecureViewControllerDidFinish:self]; - } - }]; - } - } else { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithCapacity:2]; - if (response.threeDSecureInfo) { - userInfo[BTThreeDSecureInfoKey] = response.threeDSecureInfo; - } - if (response.errorMessage) { - userInfo[NSLocalizedDescriptionKey] = response.errorMessage; - } - NSError *error = [NSError errorWithDomain:BTThreeDSecureErrorDomain - code:BTThreeDSecureErrorTypeFailedAuthentication - userInfo:userInfo]; - if ([self.delegate respondsToSelector:@selector(threeDSecureViewController:didFailWithError:)]) { - [self.delegate threeDSecureViewController:self didFailWithError:error]; - } else if ([self.delegate respondsToSelector:@selector(threeDSecureViewControllerDidFinish:)]) { - [self.delegate threeDSecureViewControllerDidFinish:self]; - } - } - }); -} - -#pragma mark UIWebViewDelegate - -- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { - if (navigationType == UIWebViewNavigationTypeFormSubmitted && [request.URL.path rangeOfString:@"authentication_complete_frame"].location != NSNotFound) { - - NSString *jsonAuthResponse = [BTURLUtils dictionaryForQueryString:request.URL.query][@"auth_response"]; - BTJSON *authBody = [[BTJSON alloc] initWithValue:[NSJSONSerialization JSONObjectWithData:[jsonAuthResponse dataUsingEncoding:NSUTF8StringEncoding] options:0 error:NULL]]; - - BTThreeDSecureResponse *authResponse = [[BTThreeDSecureResponse alloc] init]; - authResponse.success = [authBody[@"success"] isTrue]; - authResponse.threeDSecureInfo = [authBody[@"threeDSecureInfo"] asDictionary]; - authResponse.tokenizedCard = [BTThreeDSecureCardNonce cardNonceWithJSON:authBody[@"paymentMethod"]]; - authResponse.errorMessage = [authBody[@"error"][@"message"] asString]; - - [self didCompleteAuthentication:authResponse]; - - return NO; - } else { - return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; - } -} - -- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { - if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102) { - // Not a real error; occurs when we return NO from webView:shouldStartLoadWithRequest:navigationType: - return; - } else if ([error.domain isEqualToString:BTThreeDSecureErrorDomain]) { - // Allow delegate to handle 3D Secure authentication errors - [self.delegate threeDSecureViewController:self didFailWithError:error]; - } else { - // Otherwise, allow the WebViewController to display the error to the user - if ([self.delegate respondsToSelector:@selector(threeDSecureViewController:didPresentErrorToUserForURLRequest:)]) { - [self.delegate threeDSecureViewController:self didPresentErrorToUserForURLRequest:webView.request]; - } - [super webView:webView didFailLoadWithError:error]; - } -} - -#pragma mark User Interaction - -- (void)tappedCancel { - if ([self.delegate respondsToSelector:@selector(threeDSecureViewControllerDidFinish:)]) { - [self.delegate threeDSecureViewControllerDidFinish:self]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureCardNonce.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureCardNonce.m deleted file mode 100755 index f1258540..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureCardNonce.m +++ /dev/null @@ -1,45 +0,0 @@ -#import "BTThreeDSecureCardNonce.h" -#if __has_include("BraintreeCard.h") -#import "BTCardNonce_Internal.h" -#else -#import -#endif - - -@interface BTThreeDSecureCardNonce () - -@property (nonatomic, strong) BTJSON *threeDSecureJSON; - -@end - -@implementation BTThreeDSecureCardNonce - -- (instancetype)initWithNonce:(NSString *)nonce - description:(NSString *)description - cardNetwork:(BTCardNetwork)cardNetwork - lastTwo:(NSString *)lastTwo - threeDSecureJSON:(BTJSON *)threeDSecureJSON - isDefault:(BOOL)isDefault -{ - self = [super initWithNonce:nonce description:description cardNetwork:cardNetwork lastTwo:lastTwo isDefault:isDefault]; - if (self) { - _threeDSecureJSON = threeDSecureJSON; - } - return self; -} - -+ (instancetype)cardNonceWithJSON:(BTJSON *)cardJSON { - BTThreeDSecureCardNonce *card = [super cardNonceWithJSON:cardJSON]; - card.threeDSecureJSON = cardJSON[@"threeDSecureInfo"]; - return card; -} - -- (BOOL)liabilityShifted { - return [self.threeDSecureJSON[@"liabilityShifted"] isTrue]; -} - -- (BOOL)liabilityShiftPossible { - return [self.threeDSecureJSON[@"liabilityShiftPossible"] isTrue]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver.m deleted file mode 100755 index c4ad7270..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver.m +++ /dev/null @@ -1,233 +0,0 @@ -#import "BTThreeDSecureDriver_Internal.h" -#if __has_include("BraintreeCore.h") -#import "BTAPIClient_Internal.h" -#else -#import -#endif -#if __has_include("BraintreeCard.h") -#import "BTCardNonce_Internal.h" -#else -#import -#endif -#import "BTLogger_Internal.h" -#import "BTThreeDSecureAuthenticationViewController.h" -#import "BTThreeDSecureDriver.h" -#import "BTThreeDSecureLookupResult.h" -#import "BTThreeDSecureCardNonce.h" - - -@interface BTThreeDSecureDriver () - -@end - -@implementation BTThreeDSecureDriver - -+ (void)load { - if (self == [BTThreeDSecureDriver class]) { - [[BTTokenizationService sharedService] registerType:@"ThreeDSecure" withTokenizationBlock:^(BTAPIClient *apiClient, __unused NSDictionary *options, void (^completionBlock)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error)) { - if (options[BTTokenizationServiceViewPresentingDelegateOption] == nil || - [options[BTTokenizationServiceNonceOption] length] == 0 || - options[BTTokenizationServiceAmountOption] == nil) { - NSError *error = [NSError errorWithDomain:BTTokenizationServiceErrorDomain - code:BTTokenizationServiceErrorTypeNotRegistered - userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Invalid parameters"], - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"BTThreeDSecureDriver has invalid parameters"], - NSLocalizedRecoverySuggestionErrorKey: [NSString stringWithFormat:@"Check options parmeters"] - }]; - completionBlock(nil, error); - } else { - BTThreeDSecureDriver *driver = [[BTThreeDSecureDriver alloc] initWithAPIClient:apiClient delegate:options[BTTokenizationServiceViewPresentingDelegateOption]]; - - [driver verifyCardWithNonce:options[BTTokenizationServiceNonceOption] - amount:options[BTTokenizationServiceAmountOption] - completion:completionBlock]; - } - }]; - } -} - -- (instancetype)init { - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"-init is not available for BTThreeDSecureDriver. Use -initWithAPIClient:delegate: instead." userInfo:nil]; -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient delegate:(id)delegate { - // Defensive programming: apiClient and delegate parameters are annotated as nonnull - if (apiClient == nil || delegate == nil) { - return nil; - } - if (self = [super init]) { - _apiClient = apiClient; - _delegate = delegate; - } - return self; -} - -#pragma mark - Custom accessors - -- (void)setDelegate:(id)delegate { - if (![delegate conformsToProtocol:@protocol(BTViewControllerPresentingDelegate)]) { - [[BTLogger sharedLogger] warning:@"Delegate does not conform to BTViewControllerPresentingDelegate"]; - } - _delegate = delegate; -} - -#pragma mark - Public methods - -- (void)verifyCardWithNonce:(NSString *)nonce - amount:(NSDecimalNumber *)amount - completion:(void (^)(BTThreeDSecureCardNonce *, NSError *))completionBlock -{ - [self lookupThreeDSecureForNonce:nonce - transactionAmount:amount - completion:^(BTThreeDSecureLookupResult *lookupResult, NSError *error) { - if (error) { - completionBlock(nil, error); - return; - } - - if (lookupResult.requiresUserAuthentication) { - self.completionBlockAfterAuthenticating = [completionBlock copy]; - - BTThreeDSecureAuthenticationViewController *authenticationViewController = [[BTThreeDSecureAuthenticationViewController alloc] initWithLookupResult:lookupResult]; - authenticationViewController.delegate = self; - UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:authenticationViewController]; - [self informDelegateRequestsPresentationOfViewController:navigationController]; - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.authentication-start"]; - } else { - completionBlock(lookupResult.tokenizedCard, nil); - } - }]; - -} - -- (void)lookupThreeDSecureForNonce:(NSString *)nonce - transactionAmount:(NSDecimalNumber *)amount - completion:(void (^)(BTThreeDSecureLookupResult *lookupResult, NSError *error))completionBlock -{ - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTThreeDSecureErrorDomain - code:BTThreeDSecureErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTThreeDSecureDriver failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - if (error) { - completionBlock(nil, error); - return; - } - - NSMutableDictionary *requestParameters = [@{ @"amount": amount } mutableCopy]; - - if (configuration.json[@"merchantAccountId"]) { - requestParameters[@"merchant_account_id"] = [configuration.json[@"merchantAccountId"] asString]; - } - NSString *urlSafeNonce = [nonce stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; - [self.apiClient POST:[NSString stringWithFormat:@"v1/payment_methods/%@/three_d_secure/lookup", urlSafeNonce] - parameters:requestParameters - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - - if (error) { - // Provide more context for card validation error when status code 422 - if ([error.domain isEqualToString:BTHTTPErrorDomain] && - error.code == BTHTTPErrorCodeClientError && - ((NSHTTPURLResponse *)error.userInfo[BTHTTPURLResponseKey]).statusCode == 422) { - - NSMutableDictionary *userInfo = [error.userInfo mutableCopy]; - BTJSON *errorBody = error.userInfo[BTHTTPJSONResponseBodyKey]; - - if ([errorBody[@"error"][@"message"] isString]) { - userInfo[NSLocalizedDescriptionKey] = [errorBody[@"error"][@"message"] asString]; - } - if ([errorBody[@"threeDSecureInfo"] isObject]) { - userInfo[BTThreeDSecureInfoKey] = [errorBody[@"threeDSecureInfo"] asDictionary]; - } - if ([errorBody[@"error"] isObject]) { - userInfo[BTThreeDSecureValidationErrorsKey] = [errorBody[@"error"] asDictionary]; - } - - error = [NSError errorWithDomain:BTThreeDSecureErrorDomain - code:BTThreeDSecureErrorTypeFailedLookup - userInfo:userInfo]; - } - - completionBlock(nil, error); - return; - } - - BTJSON *lookupJSON = body[@"lookup"]; - - BTThreeDSecureLookupResult *lookup = [[BTThreeDSecureLookupResult alloc] init]; - lookup.acsURL = [lookupJSON[@"acsUrl"] asURL]; - lookup.PAReq = [lookupJSON[@"pareq"] asString]; - lookup.MD = [lookupJSON[@"md"] asString]; - lookup.termURL = [lookupJSON[@"termUrl"] asURL]; - lookup.tokenizedCard = [BTThreeDSecureCardNonce cardNonceWithJSON:body[@"paymentMethod"]]; - - completionBlock(lookup, nil); - }]; - }]; -} - -#pragma mark BTThreeDSecureAuthenticationViewControllerDelegate - -- (void)threeDSecureViewController:(__unused BTThreeDSecureAuthenticationViewController *)viewController - didAuthenticateCard:(BTThreeDSecureCardNonce *)tokenizedCard - completion:(void (^)(BTThreeDSecureViewControllerCompletionStatus))completionBlock -{ - self.upgradedTokenizedCard = tokenizedCard; - completionBlock(BTThreeDSecureViewControllerCompletionStatusSuccess); - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.authenticated"]; -} - -- (void)threeDSecureViewController:(__unused BTThreeDSecureAuthenticationViewController *)viewController - didFailWithError:(NSError *)error { - if ([error.domain isEqualToString:BTThreeDSecureErrorDomain] && error.code == BTThreeDSecureErrorTypeFailedAuthentication) { - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.error.auth-failure"]; - } else { - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.error.unrecognized-error"]; - } - - self.upgradedTokenizedCard = nil; - self.completionBlockAfterAuthenticating(nil, error); - self.completionBlockAfterAuthenticating = nil; - [self informDelegateRequestsDismissalOfViewController:viewController]; -} - -- (void)threeDSecureViewControllerDidFinish:(BTThreeDSecureAuthenticationViewController *)viewController { - if (self.completionBlockAfterAuthenticating != nil) { - if (self.upgradedTokenizedCard) { - self.completionBlockAfterAuthenticating(self.upgradedTokenizedCard, nil); - } else { - self.completionBlockAfterAuthenticating(nil, nil); - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.canceled"]; - } - - self.completionBlockAfterAuthenticating = nil; - [self informDelegateRequestsDismissalOfViewController:viewController]; - } else { - [self.apiClient sendAnalyticsEvent:@"ios.threedsecure.error.finished-without-handler"]; - } -} - -- (void)threeDSecureViewController:(__unused BTThreeDSecureAuthenticationViewController *)viewController - didPresentErrorForURLRequest:(NSURLRequest *)request { - [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"ios.threedsecure.error.webview-error.%@", request.URL.host]]; -} - -#pragma mark Delegate informer helpers - -- (void)informDelegateRequestsPresentationOfViewController:(UIViewController *)viewController { - if ([self.delegate respondsToSelector:@selector(paymentDriver:requestsPresentationOfViewController:)]) { - [self.delegate paymentDriver:self requestsPresentationOfViewController:viewController]; - } -} - -- (void)informDelegateRequestsDismissalOfViewController:(UIViewController *)viewController { - if ([self.delegate respondsToSelector:@selector(paymentDriver:requestsDismissalOfViewController:)]) { - [self.delegate paymentDriver:self requestsDismissalOfViewController:viewController]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver_Internal.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver_Internal.h deleted file mode 100755 index 13ef3514..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureDriver_Internal.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "BTThreeDSecureDriver.h" - -@class BTThreeDSecureAuthenticationViewController; - -@interface BTThreeDSecureDriver () - -@property (nonatomic, strong) BTAPIClient *apiClient; -@property (nonatomic, strong) BTThreeDSecureCardNonce *upgradedTokenizedCard; -@property (nonatomic, copy) void (^completionBlockAfterAuthenticating)(BTThreeDSecureCardNonce *, NSError *); - -- (void)threeDSecureViewControllerDidFinish:(BTThreeDSecureAuthenticationViewController *)viewController; - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureErrors.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureErrors.m deleted file mode 100755 index 41dfadc7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureErrors.m +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTThreeDSecureErrors.h" - -NSString * const BTThreeDSecureErrorDomain = @"com.braintreepayments.BTThreeDSecureErrorDomain"; -NSString * const BTThreeDSecureInfoKey = @"com.braintreepayments.BTThreeDSecureInfoKey"; -NSString * const BTThreeDSecureValidationErrorsKey = @"com.braintreepayments.BTThreeDSecureValidationErrorsKey"; diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.h deleted file mode 100755 index 88e129ef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.h +++ /dev/null @@ -1,16 +0,0 @@ -#import - -#import "BTThreeDSecureCardNonce.h" - -@interface BTThreeDSecureLookupResult : NSObject - -@property (nonatomic, copy) NSString *PAReq; -@property (nonatomic, copy) NSString *MD; -@property (nonatomic, copy) NSURL *acsURL; -@property (nonatomic, copy) NSURL *termURL; - -@property (nonatomic, strong) BTThreeDSecureCardNonce *tokenizedCard; - -- (BOOL)requiresUserAuthentication; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.m deleted file mode 100755 index 126e6a30..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureLookupResult.m +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTThreeDSecureLookupResult.h" - -@implementation BTThreeDSecureLookupResult - -- (BOOL)requiresUserAuthentication { - return self.acsURL != nil; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.h deleted file mode 100755 index b1fa48b9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import "BTThreeDSecureCardNonce.h" - -@interface BTThreeDSecureResponse : NSObject - -@property (nonatomic, assign) BOOL success; -@property (nonatomic, strong) NSDictionary *threeDSecureInfo; -@property (nonatomic, strong) BTThreeDSecureCardNonce *tokenizedCard; -@property (nonatomic, copy) NSString *errorMessage; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.m deleted file mode 100755 index 99ff0653..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTThreeDSecureResponse.m +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTThreeDSecureResponse.h" - -@implementation BTThreeDSecureResponse - -- (NSString *)debugDescription { - return [NSString stringWithFormat:@"", self, self.success ? @"YES" : @"NO", self.tokenizedCard, self.errorMessage, self.threeDSecureInfo]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.h deleted file mode 100755 index 3e4d92d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.h +++ /dev/null @@ -1,25 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BTWebViewController : UIViewController - -#pragma mark - Designated initializers - -- (nonnull instancetype)initWithRequest:(nonnull NSURLRequest *)request NS_DESIGNATED_INITIALIZER; - -#pragma mark - Undesignated initializers (do not use) - -- (nullable instancetype)initWithCoder:(NSCoder *)decoder __attribute__((unavailable("Please use initWithRequest: instead."))); -- (instancetype)initWithNibName:(nullable NSString *)nibName bundle:(nullable NSBundle *)nibBundle __attribute__((unavailable("Please use initWithRequest: instead."))); - -#pragma mark Override Points for Subclasses - -- (BOOL)webView:(nonnull UIWebView *)webView shouldStartLoadWithRequest:(nonnull NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType __attribute__((objc_requires_super)); -- (void)webViewDidStartLoad:(nonnull UIWebView *)webView __attribute__((objc_requires_super)); -- (void)webViewDidFinishLoad:(nonnull UIWebView *)webView __attribute__((objc_requires_super)); -- (void)webView:(nonnull UIWebView *)webView didFailLoadWithError:(nonnull NSError *)error; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.m deleted file mode 100755 index bf8f5100..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/BTWebViewController.m +++ /dev/null @@ -1,216 +0,0 @@ -#import "BTWebViewController.h" -#import "BTThreeDSecureLocalizedString.h" - -static NSString *BTWebViewControllerPopupOpenDummyURLScheme = @"com.braintreepayments.popup.open"; -static NSString *BTWebViewControllerPopupCloseDummyURLScheme = @"com.braintreepayments.popup.close"; - -@protocol BTThreeDSecurePopupDelegate - -- (void)popupWebViewViewControllerDidFinish:(BTWebViewController *)viewController; - -@end - -@interface BTWebViewController () - -@property (nonatomic, strong) UIWebView *webView; - -@property (nonatomic, weak) id delegate; - -@end - -@implementation BTWebViewController - -- (instancetype)initWithCoder:(__unused NSCoder *)decoder { - @throw [[NSException alloc] initWithName:@"Invalid initializer" reason:@"Use designated initializer" userInfo:nil]; -} - -- (instancetype)initWithNibName:(__unused NSString *)nibName bundle:(__unused NSBundle *)nibBundle { - @throw [[NSException alloc] initWithName:@"Invalid initializer" reason:@"Use designated initializer" userInfo:nil]; -} - -- (instancetype)initWithRequest:(NSURLRequest *)request { - self = [super initWithNibName:nil bundle:nil]; - if (self) { - self.webView = [[UIWebView alloc] init]; - self.webView.accessibilityIdentifier = @"Web View"; - [self.webView loadRequest:request]; - } - return self; -} - -- (instancetype)initWithRequest:(NSURLRequest *)request delegate:(id)delegate { - self = [self initWithRequest:request]; - if (self) { - self.delegate = delegate; - } - return self; -} - -- (void)setDelegate:(id)delegate { - _delegate = delegate; - if (delegate) { - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:BTThreeDSecureLocalizedString(ERROR_ALERT_CANCEL_BUTTON_TEXT) style:UIBarButtonItemStyleDone target:self action:@selector(informDelegateDidFinish)]; - } -} - -- (void)loadView { - self.view = self.webView; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.webView.delegate = self; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [self updateNetworkActivityIndicatorForWebView:self.webView]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - [self.webView stopLoading]; - [self updateNetworkActivityIndicatorForWebView:self.webView]; -} - -- (void)updateNetworkActivityIndicatorForWebView:(UIWebView *)webView { - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:webView.isLoading]; -} - - -#pragma mark Delegate Informers - -- (void)informDelegateDidFinish { - if ([self.delegate respondsToSelector:@selector(popupWebViewViewControllerDidFinish:)]) { - [self.delegate popupWebViewViewControllerDidFinish:self]; - } -} - - -#pragma mark UIWebViewDelegate - -- (BOOL)webView:(__unused UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(__unused UIWebViewNavigationType)navigationType { - NSURL *requestURL = request.URL; - if ([self isURLPopupOpenLink:requestURL]) { - [self openPopupWithURLRequest:request]; - return NO; - } else if ([self isURLPopupCloseLink:requestURL]) { - [self informDelegateDidFinish]; - return NO; - } - - return YES; -} - -- (void)webViewDidStartLoad:(UIWebView *)webView { - [self updateNetworkActivityIndicatorForWebView:webView]; - self.title = [self parseTitleFromWebView:webView];; -} - -- (void)webViewDidFinishLoad:(UIWebView *)webView { - [self updateNetworkActivityIndicatorForWebView:webView]; - [self prepareTargetLinks:webView]; - [self prepareWindowOpenAndClosePopupLinks:webView]; - self.title = [self parseTitleFromWebView:webView]; -} - -- (void)webView:(__unused UIWebView *)webView didFailLoadWithError:(__unused NSError *)error { - if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102) { - // Not a real error; occurs when webView:shouldStartLoadWithRequest:navigationType: returns NO - return; - } else { - if ([UIAlertController class]) { - UIAlertController *alert = [UIAlertController alertControllerWithTitle:error.localizedDescription - message:nil - preferredStyle:UIAlertControllerStyleAlert]; - [alert addAction:[UIAlertAction actionWithTitle:BTThreeDSecureLocalizedString(ERROR_ALERT_OK_BUTTON_TEXT) - style:UIAlertActionStyleCancel - handler:^(__unused UIAlertAction *action) { - }]]; - [self presentViewController:alert animated:YES completion:nil]; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [[[UIAlertView alloc] initWithTitle:error.localizedDescription - message:nil - delegate:nil - cancelButtonTitle:BTThreeDSecureLocalizedString(ERROR_ALERT_OK_BUTTON_TEXT) - otherButtonTitles:nil] show]; -#pragma clang diagnostic pop - } - } -} - - -#pragma mark Web View Inspection - -- (NSString *)parseTitleFromWebView:(UIWebView *)webView { - return [webView stringByEvaluatingJavaScriptFromString:@"document.title"]; -} - - -#pragma mark Web View Popup Links - -- (void)prepareTargetLinks:(UIWebView *)webView { - NSString *js = [NSString stringWithFormat:@"var as = document.getElementsByTagName('a');\ - for (var i = 0; i < as.length; i++) {\ - if (as[i]['target']) { as[i]['href'] = '%@+' + as[i]['href']; }\ - }\ - true;", BTWebViewControllerPopupOpenDummyURLScheme]; - [webView stringByEvaluatingJavaScriptFromString:js]; -} - -- (void)prepareWindowOpenAndClosePopupLinks:(UIWebView *)webView { - NSString *js = [NSString stringWithFormat:@"(function(window) {\ - function FakeWindow () {\ - var fakeWindow = {};\ - for (key in window) {\ - if (typeof window[key] == 'function') {\ - fakeWindow[key] = function() { console.log(\"FakeWindow received method call: \", key); };\ - }\ - }\ - return fakeWindow;\ - }\ - function absoluteUrl (relativeUrl) { var a = document.createElement('a'); a.href = relativeUrl; return a.href; }\ - window.open = function (url) { window.location = '%@+' + absoluteUrl(url); return new FakeWindow(); };\ - window.close = function () { window.location = '%@://'; };\ - })(window)", BTWebViewControllerPopupOpenDummyURLScheme, BTWebViewControllerPopupCloseDummyURLScheme]; - [webView stringByEvaluatingJavaScriptFromString:js]; -} - -- (BOOL)isURLPopupOpenLink:(NSURL *)URL { - NSString *schemePrefix = [[URL.scheme componentsSeparatedByString:@"+"] firstObject]; - return [schemePrefix isEqualToString:BTWebViewControllerPopupOpenDummyURLScheme]; -} - -- (BOOL)isURLPopupCloseLink:(NSURL *)URL { - NSString *schemePrefix = [[URL.scheme componentsSeparatedByString:@"+"] firstObject]; - return [schemePrefix isEqualToString:BTWebViewControllerPopupCloseDummyURLScheme]; -} - -- (NSURL *)extractPopupLinkURL:(NSURL *)URL { - NSURLComponents *c = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - c.scheme = [[URL.scheme componentsSeparatedByString:@"+"] lastObject]; - - return c.URL; -} - -- (void)openPopupWithURLRequest:(NSURLRequest *)request { - NSMutableURLRequest *mutableRequest = request.mutableCopy; - mutableRequest.URL = [self extractPopupLinkURL:request.URL]; - request = mutableRequest.copy; - BTWebViewController *popup = [[BTWebViewController alloc] initWithRequest:request delegate:self]; - UINavigationController *navigationViewController = [[UINavigationController alloc] initWithRootViewController:popup]; - [self presentViewController:navigationViewController animated:YES completion:nil]; -} - - -#pragma mark delegate - -- (void)popupWebViewViewControllerDidFinish:(BTWebViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.h deleted file mode 100755 index b8127e0a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#define BTThreeDSecureLocalizedString(KEY) [BTThreeDSecureLocalizedString KEY] - -@interface BTThreeDSecureLocalizedString : NSObject - -+ (NSString *)ERROR_ALERT_OK_BUTTON_TEXT; -+ (NSString *)ERROR_ALERT_CANCEL_BUTTON_TEXT; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.m b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.m deleted file mode 100755 index 81d21430..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/BTThreeDSecureLocalizedString.m +++ /dev/null @@ -1,29 +0,0 @@ -#import "BTThreeDSecureLocalizedString.h" - -@implementation BTThreeDSecureLocalizedString - -+ (NSBundle *)localizationBundle { - - static NSString * bundleName = @"Braintree-3D-Secure-Localization"; - NSString *localizationBundlePath = [[NSBundle mainBundle] pathForResource:bundleName ofType:@"bundle"]; - if (!localizationBundlePath) { - localizationBundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:bundleName ofType:@"bundle"]; - } - - return localizationBundlePath ? [NSBundle bundleWithPath:localizationBundlePath] : [NSBundle mainBundle]; -} - -+ (NSString *)localizationTable { - return @"Three-D-Secure"; -} - -+ (NSString *)ERROR_ALERT_OK_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_OK_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"OK", @"Button text to indicate acceptance of an alert condition"); -} - - -+ (NSString *)ERROR_ALERT_CANCEL_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_CANCEL_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"Cancel", @"Button text to indicate acceptance of an alert condition"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/da.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/da.lproj/Three-D-Secure.strings deleted file mode 100755 index c9843b0e..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/da.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/de.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/de.lproj/Three-D-Secure.strings deleted file mode 100755 index a85f55cd..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/de.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en.lproj/Three-D-Secure.strings deleted file mode 100755 index 752d686a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_AU.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_AU.lproj/Three-D-Secure.strings deleted file mode 100755 index 752d686a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_AU.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_CA.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_CA.lproj/Three-D-Secure.strings deleted file mode 100755 index 752d686a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_CA.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_GB.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_GB.lproj/Three-D-Secure.strings deleted file mode 100755 index 752d686a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/en_GB.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es.lproj/Three-D-Secure.strings deleted file mode 100755 index 394a3cb1..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es_ES.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es_ES.lproj/Three-D-Secure.strings deleted file mode 100755 index 394a3cb1..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/es_ES.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr.lproj/Three-D-Secure.strings deleted file mode 100755 index 5baa2015..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_CA.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_CA.lproj/Three-D-Secure.strings deleted file mode 100755 index 5baa2015..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_CA.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_FR.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_FR.lproj/Three-D-Secure.strings deleted file mode 100755 index 5baa2015..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/fr_FR.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/he.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/he.lproj/Three-D-Secure.strings deleted file mode 100755 index ae9915c9..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/he.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/it.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/it.lproj/Three-D-Secure.strings deleted file mode 100755 index a010e9b7..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/it.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nb.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nb.lproj/Three-D-Secure.strings deleted file mode 100755 index ddd86aa0..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nb.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nl.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nl.lproj/Three-D-Secure.strings deleted file mode 100755 index b5253716..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/nl.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pl.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pl.lproj/Three-D-Secure.strings deleted file mode 100755 index 0c25116c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pl.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pt.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pt.lproj/Three-D-Secure.strings deleted file mode 100755 index 65c80d5c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/pt.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/ru.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/ru.lproj/Three-D-Secure.strings deleted file mode 100755 index 4a985e50..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/ru.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/sv.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/sv.lproj/Three-D-Secure.strings deleted file mode 100755 index ddd86aa0..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/sv.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/tr.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/tr.lproj/Three-D-Secure.strings deleted file mode 100755 index 0ead55b2..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/tr.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/zh-Hans.lproj/Three-D-Secure.strings b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/zh-Hans.lproj/Three-D-Secure.strings deleted file mode 100755 index aff3a925..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Localization/zh-Hans.lproj/Three-D-Secure.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureCardNonce.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureCardNonce.h deleted file mode 100755 index 11f9b5b1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureCardNonce.h +++ /dev/null @@ -1,25 +0,0 @@ -#if __has_include("BraintreeCard.h") -#import "BTCardNonce.h" -#else -#import -#endif - -NS_ASSUME_NONNULL_BEGIN - -@interface BTThreeDSecureCardNonce : BTCardNonce - -@property (nonatomic, readonly, assign) BOOL liabilityShifted; -@property (nonatomic, readonly, assign) BOOL liabilityShiftPossible; - -#pragma mark - Internal - -- (instancetype)initWithNonce:(NSString *)nonce - description:(nullable NSString *)description - cardNetwork:(BTCardNetwork)cardNetwork - lastTwo:(nullable NSString *)lastTwo - threeDSecureJSON:(BTJSON *)threeDSecureJSON - isDefault:(BOOL)isDefault; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureDriver.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureDriver.h deleted file mode 100755 index 53ebc7fb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureDriver.h +++ /dev/null @@ -1,102 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCard.h" -#import "BraintreeCore.h" -#else -#import -#import -#endif -#import "BTThreeDSecureCardNonce.h" - -NS_ASSUME_NONNULL_BEGIN - -@protocol BTThreeDSecureDriverDelegate; -/*! - @brief 3D Secure Verification Driver - - @discussion 3D Secure is a protocol that enables cardholders and issuers to add a layer of security - to e-commerce transactions via password entry at checkout. - - One of the primary reasons to use 3D Secure is to benefit from a shift in liability from the - merchant to the issuer, which may result in interchange savings. Please read our online - documentation (https://developers.braintreepayments.com/ios/guides/3d-secure) for a full explanation of 3D Secure. - - After initializing this class with a Braintree client and delegate, you may verify Braintree - payment methods via the verifyCardWithNonce:amount: method. During verification, the delegate - may receive a request to present a view controller, as well as a success and failure messages. - - Verification is associated with a transaction amount and your merchant account. To specify a - different merchant account, you will need to specify the merchant account id - when generating a client token (See https://developers.braintreepayments.com/ios/sdk/overview/generate-client-token ). - - Your delegate must implement: - * paymentDriver:requestsPresentationOfViewController: - * paymentDriver:requestsDismissalOfViewController: - - When verification succeeds, the original payment method nonce is consumed, and you will receive - a new payment method nonce, which points to the original payment method, as well as the 3D - Secure Verification. Transactions created with this nonce are eligible for 3D Secure - liability shift. - - When verification fails, the original payment method nonce is not consumed. While you may choose - to proceed with transaction creation, using the original payment method nonce, this transaction - will not be associated with a 3D Secure Verification. - - @note The user authentication view controller is not always necessary to achieve the liabilty - shift. In these cases, your completionBlock will immediately be called. -*/ -@interface BTThreeDSecureDriver : NSObject - -/*! - @brief Initializes a 3D Secure verification manager - - @param apiClient The Braintree API Client - @param delegate The BTViewControllerPresentingDelegate - - @return An initialized instance of BTThreeDSecureDriver -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient delegate:(id)delegate NS_DESIGNATED_INITIALIZER; - -- (instancetype)init __attribute__((unavailable("Please use initWithAPIClient: instead."))); - -/*! - @brief Verify a card for a 3D Secure transaction, referring to the card by raw payment method nonce - - @discussion This method is useful for implementations where 3D Secure verification occurs after generating - a payment method nonce from a vaulted credit card on your backend. - - On success, you will receive an instance of `BTCardNonce`. Typically, an implementation will send this tokenized card to your own - server for further use. - On failure, you will receive an error. - - A failure may occur at any point during tokenization: - - Payment authorization is initiated with an incompatible configuration (e.g. no authorization - mechanism possible for specified provider) - - An authorization provider encounters an error - - A network or gateway error occurs - - The user-provided credentials led to a non-transactable payment method. - - On user cancellation, you will receive `nil` for both parameters. - - @note This method performs an asynchronous operation and may request presentation of a view - controller via the delegate. It is the caller's responsibility to present an activity - indication to the user in the meantime. - - @param nonce A payment method nonce - @param amount The amount of the transaction in the current merchant account's currency - @param completionBlock This completion will be invoked exactly once when authorization is complete, is cancelled, or an error occurs. -*/ -- (void)verifyCardWithNonce:(NSString *)nonce - amount:(NSDecimalNumber *)amount - completion:(void (^)(BTThreeDSecureCardNonce * _Nullable tokenizedCard, NSError * _Nullable error))completionBlock; - -#pragma mark - Delegate - -/*! - @brief A delegate that presents and dismisses a view controller, as necessary, for the 3D Secure verification flow. -*/ -@property (nonatomic, weak) id delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureErrors.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureErrors.h deleted file mode 100755 index 66e2d6df..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/BTThreeDSecureErrors.h +++ /dev/null @@ -1,27 +0,0 @@ -#import - -/*! - @brief An error domain for 3D Secure errors - - @see BTThreeDSecure -*/ -extern NSString * const BTThreeDSecureErrorDomain; -extern NSString * const BTThreeDSecureInfoKey; -extern NSString * const BTThreeDSecureValidationErrorsKey; - -/*! - @brief Error codes that describe errors that occur during 3D Secure -*/ -typedef NS_ENUM(NSInteger, BTThreeDSecureErrorType){ - - BTThreeDSecureErrorTypeUnknown = 0, - - /// 3D Secure failed during the backend card lookup phase; please retry - BTThreeDSecureErrorTypeFailedLookup, - - /// 3D Secure failed during the user-facing authentication phase; please retry - BTThreeDSecureErrorTypeFailedAuthentication, - - /// Braintree SDK is integrated incorrectly - BTThreeDSecureErrorTypeIntegration, -}; diff --git a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/Braintree3DSecure.h b/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/Braintree3DSecure.h deleted file mode 100755 index ed79688e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Braintree3DSecure/Public/Braintree3DSecure.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -FOUNDATION_EXPORT double Braintree3DSecureVersionNumber; - -FOUNDATION_EXPORT const unsigned char Braintree3DSecureVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTThreeDSecureDriver.h" -#import "BTThreeDSecureErrors.h" -#import "BTThreeDSecureCardNonce.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayCardNonce.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayCardNonce.m deleted file mode 100755 index b2cac58b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayCardNonce.m +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTApplePayCardNonce.h" - -@implementation BTApplePayCardNonce - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient.m deleted file mode 100755 index aa3b6559..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient.m +++ /dev/null @@ -1,169 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BTAPIClient_Internal.h" -#import "BTPaymentMethodNonce.h" -#else -#import -#import -#endif -#import "BTApplePayClient_Internal.h" -#import "BTConfiguration+ApplePay.h" - -NSString *const BTApplePayErrorDomain = @"com.braintreepayments.BTApplePayErrorDomain"; - -@interface BTApplePayClient () -@end - -@implementation BTApplePayClient - -#pragma mark - Initialization - -+ (void)load { - if (self == [BTApplePayClient class]) { - [[BTPaymentMethodNonceParser sharedParser] registerType:@"ApplePayCard" withParsingBlock:^BTPaymentMethodNonce * _Nullable(BTJSON * _Nonnull applePayCard) { - NSString *cardType = applePayCard[@"details"][@"cardType"] ? [applePayCard[@"details"][@"cardType"] asString] : @"ApplePayCard"; - return [[BTApplePayCardNonce alloc] initWithNonce:[applePayCard[@"nonce"] asString] localizedDescription:[applePayCard[@"description"] asString] type:cardType]; - }]; - } -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - _apiClient = apiClient; - } - return self; -} - -- (instancetype)init { - return nil; -} - -#pragma mark - Public methods - -- (void)paymentRequest:(void (^)(PKPaymentRequest * _Nullable, NSError * _Nullable))completion { - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTApplePayErrorDomain - code:BTApplePayErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTAPIClient is nil."}]; - [self invokeBlock:completion onMainThreadWithPaymentRequest:nil error:error]; - return; - } - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.configuration"]; - [self invokeBlock:completion onMainThreadWithPaymentRequest:nil error:error]; - return; - } - - if (!configuration.isApplePayEnabled) { - NSError *error = [NSError errorWithDomain:BTApplePayErrorDomain - code:BTApplePayErrorTypeUnsupported - userInfo:@{ NSLocalizedDescriptionKey: @"Apple Pay is not enabled for this merchant. Please ensure that Apple Pay is enabled in the control panel and then try saving an Apple Pay payment method again." }]; - [self invokeBlock:completion onMainThreadWithPaymentRequest:nil error:error]; - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.disabled"]; - return; - } - - PKPaymentRequest *paymentRequest = [[PKPaymentRequest alloc] init]; - paymentRequest.countryCode = configuration.applePayCountryCode; - paymentRequest.currencyCode = configuration.applePayCurrencyCode; - paymentRequest.merchantIdentifier = configuration.applePayMerchantIdentifier; - paymentRequest.supportedNetworks = configuration.applePaySupportedNetworks; - - [self invokeBlock:completion onMainThreadWithPaymentRequest:paymentRequest error:nil]; - }]; -} - -- (void)tokenizeApplePayPayment:(PKPayment *)payment completion:(void (^)(BTApplePayCardNonce *, NSError *))completionBlock { - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTApplePayErrorDomain - code:BTApplePayErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTApplePayClient tokenization failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.start"]; - - if (!payment) { - NSError *error = [NSError errorWithDomain:BTApplePayErrorDomain - code:BTApplePayErrorTypeUnsupported - userInfo:@{NSLocalizedDescriptionKey: @"A valid PKPayment is required."}]; - completionBlock(nil, error); - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.invalid-payment"]; - return; - } - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - if (error) { - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.configuration"]; - completionBlock(nil, error); - return; - } - - if (![configuration.json[@"applePay"][@"status"] isString] || - [[configuration.json[@"applePay"][@"status"] asString] isEqualToString:@"off"]) { - NSError *error = [NSError errorWithDomain:BTApplePayErrorDomain - code:BTApplePayErrorTypeUnsupported - userInfo:@{ NSLocalizedDescriptionKey: @"Apple Pay is not enabled for this merchant. Please ensure that Apple Pay is enabled in the control panel and then try saving an Apple Pay payment method again." }]; - completionBlock(nil, error); - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.disabled"]; - return; - } - - NSMutableDictionary *parameters = [NSMutableDictionary new]; - parameters[@"applePaymentToken"] = [self parametersForPaymentToken:payment.token]; - parameters[@"_meta"] = @{ - @"source" : self.apiClient.metadata.sourceString, - @"integration" : self.apiClient.metadata.integrationString, - @"sessionId" : self.apiClient.metadata.sessionId, - }; - - [self.apiClient POST:@"v1/payment_methods/apple_payment_tokens" - parameters:parameters - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - if (error) { - completionBlock(nil, error); - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.error.tokenization"]; - return; - } - - BTJSON *applePayCard = body[@"applePayCards"][0]; - NSString *cardType = applePayCard[@"details"][@"cardType"] ? [applePayCard[@"details"][@"cardType"] asString] : @"ApplePayCard"; - BTApplePayCardNonce *tokenized = [[BTApplePayCardNonce alloc] initWithNonce:[applePayCard[@"nonce"] asString] localizedDescription:[applePayCard[@"description"] asString] type:cardType]; - - completionBlock(tokenized, nil); - [self.apiClient sendAnalyticsEvent:@"ios.apple-pay.success"]; - }]; - }]; -} - -#pragma mark - Helpers - -- (NSDictionary *)parametersForPaymentToken:(PKPaymentToken *)token { - NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionary]; - - mutableParameters[@"paymentData"] = [token.paymentData base64EncodedStringWithOptions:0]; - mutableParameters[@"transactionIdentifier"] = token.transactionIdentifier; - - if ([PKPaymentMethod class]) { - mutableParameters[@"paymentInstrumentName"] = token.paymentMethod.displayName; - mutableParameters[@"paymentNetwork"] = token.paymentMethod.network; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - mutableParameters[@"paymentInstrumentName"] = token.paymentInstrumentName; - mutableParameters[@"paymentNetwork"] = token.paymentNetwork; -#pragma clang diagnostic pop - } - - return [mutableParameters copy]; -} - -- (void)invokeBlock:(nonnull void (^)(PKPaymentRequest * _Nullable, NSError * _Nullable))completion onMainThreadWithPaymentRequest:(nullable PKPaymentRequest *)paymentRequest error:(nullable NSError *)error { - dispatch_async(dispatch_get_main_queue(), ^{ - completion(paymentRequest, error); - }); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient_Internal.h deleted file mode 100755 index 466e9691..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTApplePayClient_Internal.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTApplePayClient.h" - -@interface BTApplePayClient () -/*! - @brief Exposed for testing to get the instance of BTAPIClient -*/ -@property (nonatomic, strong) BTAPIClient *apiClient; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTConfiguration+ApplePay.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTConfiguration+ApplePay.m deleted file mode 100755 index 0164e33a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/BTConfiguration+ApplePay.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "BTConfiguration+ApplePay.h" -#import - -@implementation BTConfiguration (ApplePay) - -- (BOOL)isApplePayEnabled { - BTJSON *applePayConfiguration = self.json[@"applePay"]; - return [applePayConfiguration[@"status"] isString] && ![[applePayConfiguration[@"status"] asString] isEqualToString:@"off"]; -} - -- (BOOL)canMakeApplePayPayments { - return [PKPaymentAuthorizationViewController canMakePaymentsUsingNetworks:self.applePaySupportedNetworks]; -} - -- (NSString *)applePayCountryCode { - return [self.json[@"applePay"][@"countryCode"] asString]; -} - -- (NSString *)applePayCurrencyCode { - return [self.json[@"applePay"][@"currencyCode"] asString]; -} - -- (NSString *)applePayMerchantIdentifier { - return [self.json[@"applePay"][@"merchantIdentifier"] asString]; -} - -- (NSArray *)applePaySupportedNetworks { - NSArray *gatewaySupportedNetworks = [self.json[@"applePay"][@"supportedNetworks"] asStringArray]; - - NSMutableArray *supportedNetworks = [NSMutableArray new]; - - for (NSString *gatewaySupportedNetwork in gatewaySupportedNetworks) { - if ([gatewaySupportedNetwork localizedCaseInsensitiveCompare:@"visa"] == NSOrderedSame) { - [supportedNetworks addObject:PKPaymentNetworkVisa]; - } else if ([gatewaySupportedNetwork localizedCaseInsensitiveCompare:@"mastercard"] == NSOrderedSame) { - [supportedNetworks addObject:PKPaymentNetworkMasterCard]; - } else if ([gatewaySupportedNetwork localizedCaseInsensitiveCompare:@"amex"] == NSOrderedSame) { - [supportedNetworks addObject:PKPaymentNetworkAmex]; - } else if (&PKPaymentNetworkDiscover != NULL && [gatewaySupportedNetwork localizedCaseInsensitiveCompare:@"discover"] == NSOrderedSame) { // Very important to check that this constant is available first! - [supportedNetworks addObject:PKPaymentNetworkDiscover]; - } - } - - return [supportedNetworks copy]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayCardNonce.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayCardNonce.h deleted file mode 100755 index 94280f0c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayCardNonce.h +++ /dev/null @@ -1,14 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -NS_ASSUME_NONNULL_BEGIN - -@interface BTApplePayCardNonce : BTPaymentMethodNonce - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayClient.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayClient.h deleted file mode 100755 index fe5d1a13..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTApplePayClient.h +++ /dev/null @@ -1,57 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -#import "BTApplePayCardNonce.h" - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTApplePayErrorDomain; -typedef NS_ENUM(NSInteger, BTApplePayErrorType) { - BTApplePayErrorTypeUnknown = 0, - - /// Apple Pay is disabled in the Braintree Control Panel - BTApplePayErrorTypeUnsupported, - - /// Braintree SDK is integrated incorrectly - BTApplePayErrorTypeIntegration, -}; - -@interface BTApplePayClient : NSObject - -/*! - @brief Creates an Apple Pay client. - - @param apiClient An API client -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient NS_DESIGNATED_INITIALIZER; - - -- (instancetype)init __attribute__((unavailable("Please use initWithAPIClient:"))); - -/*! - @brief Creates a `PKPaymentRequest` with values from your Braintree Apple Pay configuration. - - @discussion It populates the following values of `PKPaymentRequest`: `countryCode`, `currencyCode`, `merchantIdentifier`, `supportedNetworks`. - - @param completion A completion block that returns the payment request or an error. This block is invoked on the main thread. -*/ -- (void)paymentRequest:(void (^)(PKPaymentRequest * _Nullable paymentRequest, NSError * _Nullable error))completion; - -/*! - @brief Tokenizes an Apple Pay payment. - - @param payment A `PKPayment` instance, typically obtained by presenting a `PKPaymentAuthorizationViewController` - @param completionBlock A completion block that is invoked when tokenization has completed. If tokenization succeeds, - `tokenizedApplePayPayment` will contain a nonce and `error` will be `nil`; if it fails, - `tokenizedApplePayPayment` will be `nil` and `error` will describe the failure. -*/ -- (void)tokenizeApplePayPayment:(PKPayment *)payment - completion:(void (^)(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error))completionBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTConfiguration+ApplePay.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTConfiguration+ApplePay.h deleted file mode 100755 index 71ee7da2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BTConfiguration+ApplePay.h +++ /dev/null @@ -1,40 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import - -@interface BTConfiguration (ApplePay) - -/*! - @brief Indicates whether Apple Pay is enabled for your merchant account. -*/ -@property (nonatomic, readonly, assign) BOOL isApplePayEnabled; - -/*! - @brief The Apple Pay payment networks supported by your Braintree merchant account. -*/ -@property (nonatomic, readonly, nullable) NSArray *applePaySupportedNetworks; - -/*! - @brief Indicates if the Apple Pay merchant enabled payment networks are supported on this device. -*/ -@property (nonatomic, readonly, assign) BOOL canMakeApplePayPayments; - -/*! - @brief The country code for your Braintree merchant account. -*/ -@property (nonatomic, readonly, nullable) NSString *applePayCountryCode; - -/*! - @brief The Apple Pay currency code supported by your Braintree merchant account. -*/ -@property (nonatomic, readonly, nullable) NSString *applePayCurrencyCode; - -/*! - @brief The Apple Pay merchant identifier associated with your Braintree merchant account. -*/ -@property (nonatomic, readonly, nullable) NSString *applePayMerchantIdentifier; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BraintreeApplePay.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BraintreeApplePay.h deleted file mode 100755 index 58e5bebe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeApplePay/Public/BraintreeApplePay.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -FOUNDATION_EXPORT double BraintreeApplePayVersionNumber; - -FOUNDATION_EXPORT const unsigned char BraintreeApplePayVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTApplePayClient.h" -#import "BTConfiguration+ApplePay.h" -#import "BTApplePayCardNonce.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard.m deleted file mode 100755 index 5980c1d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard.m +++ /dev/null @@ -1,111 +0,0 @@ -#import "BTCard_Internal.h" -#import "BTJSON.h" - -@interface BTCard () -@property (nonatomic, strong) NSMutableDictionary *mutableParameters; -@end - -@implementation BTCard - -- (instancetype)init { - return [self initWithParameters:@{}]; -} - -- (nonnull instancetype)initWithParameters:(NSDictionary *)parameters { - if (self = [super init]) { - _mutableParameters = [parameters mutableCopy]; - _number = parameters[@"number"]; - NSArray *components = [parameters[@"expiration_date"] componentsSeparatedByString:@"/"]; - if (components.count == 2) { - _expirationMonth = components[0]; - _expirationYear = components[1]; - } - _postalCode = parameters[@"billing_address"][@"postal_code"]; - _cvv = parameters[@"cvv"]; - - _streetAddress = parameters[@"billing_address"][@"street_address"]; - _locality = parameters[@"billing_address"][@"locality"]; - _region = parameters[@"billing_address"][@"region"]; - _countryName = parameters[@"billing_address"][@"country_name"]; - _countryCodeAlpha2 = parameters[@"billing_address"][@"country_code_alpha2"]; - _cardholderName = parameters[@"cardholder_name"]; - - _shouldValidate = [parameters[@"options"][@"validate"] boolValue]; - } - return self; -} - -- (instancetype)initWithNumber:(NSString *)number - expirationMonth:(NSString *)expirationMonth - expirationYear:(NSString *)expirationYear - cvv:(NSString *)cvv -{ - if (self = [self initWithParameters:@{}]) { - _number = number; - _expirationMonth = expirationMonth; - _expirationYear = expirationYear; - _cvv = cvv; - } - return self; -} - -#pragma mark - - -- (NSDictionary *)parameters { - NSMutableDictionary *p = [self.mutableParameters mutableCopy]; - if (self.number) { - p[@"number"] = self.number; - } - if (self.expirationMonth && self.expirationYear) { - p[@"expiration_date"] = [NSString stringWithFormat:@"%@/%@", self.expirationMonth, self.expirationYear]; - } - if (self.cvv) { - p[@"cvv"] = self.cvv; - } - if (self.cardholderName) { - p[@"cardholder_name"] = self.cardholderName; - } - - NSMutableDictionary *billingAddressDictionary = [NSMutableDictionary new]; - if ([p[@"billing_address"] isKindOfClass:[NSDictionary class]]) { - [billingAddressDictionary addEntriesFromDictionary:p[@"billing_address"]]; - } - - if (self.postalCode) { - billingAddressDictionary[@"postal_code"] = self.postalCode; - } - - if (self.streetAddress) { - billingAddressDictionary[@"street_address"] = self.streetAddress; - } - - if (self.locality) { - billingAddressDictionary[@"locality"] = self.locality; - } - - if (self.region) { - billingAddressDictionary[@"region"] = self.region; - } - - if (self.countryName) { - billingAddressDictionary[@"country_name"] = self.countryName; - } - - if (self.countryCodeAlpha2) { - billingAddressDictionary[@"country_code_alpha2"] = self.countryCodeAlpha2; - } - - if (billingAddressDictionary.count > 0) { - p[@"billing_address"] = [billingAddressDictionary copy]; - } - - NSMutableDictionary *optionsDictionary = [NSMutableDictionary new]; - if ([p[@"options"] isKindOfClass:[NSDictionary class]]) { - [optionsDictionary addEntriesFromDictionary:p[@"options"]]; - } - optionsDictionary[@"validate"] = @(self.shouldValidate); - p[@"options"] = [optionsDictionary copy]; - return [p copy]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient.m deleted file mode 100755 index 1d6691a7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient.m +++ /dev/null @@ -1,163 +0,0 @@ -#import "BTErrors.h" -#import "BTCardClient_Internal.h" -#import "BTCardNonce_Internal.h" -#import "BTCardRequest.h" -#import "BTClientMetadata.h" -#import "BTHTTP.h" -#import "BTJSON.h" -#import "BTPaymentMethodNonceParser.h" -#import "BTTokenizationService.h" -#if __has_include("BraintreeCore.h") -#import "BTAPIClient_Internal.h" -#import "BTCard_Internal.h" -#else -#import -#import -#endif - -NSString *const BTCardClientErrorDomain = @"com.braintreepayments.BTCardClientErrorDomain"; - -@interface BTCardClient () -@end - -@implementation BTCardClient - -+ (void)load { - if (self == [BTCardClient class]) { - [[BTTokenizationService sharedService] registerType:@"Card" withTokenizationBlock:^(BTAPIClient *apiClient, NSDictionary *options, void (^completionBlock)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error)) { - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - [client tokenizeCard:[[BTCard alloc] initWithParameters:options] completion:completionBlock]; - }]; - - [[BTPaymentMethodNonceParser sharedParser] registerType:@"CreditCard" withParsingBlock:^BTPaymentMethodNonce * _Nullable(BTJSON * _Nonnull creditCard) { - return [BTCardNonce cardNonceWithJSON:creditCard]; - }]; - } -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (!apiClient) { - return nil; - } - if (self = [super init]) { - self.apiClient = apiClient; - } - return self; -} - -- (instancetype)init { - return nil; -} - -- (void)tokenizeCard:(BTCard *)card completion:(void (^)(BTCardNonce *tokenizedCard, NSError *error))completion { - BTCardRequest *request = [[BTCardRequest alloc] initWithCard:card]; - [self tokenizeCard:request options:nil completion:completion]; -} - - -- (void)tokenizeCard:(BTCardRequest *)request options:(NSDictionary *)options completion:(void (^)(BTCardNonce * _Nullable, NSError * _Nullable))completionBlock -{ - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTCardClientErrorDomain - code:BTCardClientErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTCardClient tokenization failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - NSMutableDictionary *parameters = [NSMutableDictionary new]; - if (request.card.parameters) { - NSMutableDictionary *mutableCardParameters = [request.card.parameters mutableCopy]; - - if (request.enrollmentID) { - // Convert the immutable options dictionary so to write to it without overwriting any existing options - NSMutableDictionary *unionPayEnrollment = [NSMutableDictionary new]; - unionPayEnrollment[@"id"] = request.enrollmentID; - if (request.smsCode) { - unionPayEnrollment[@"sms_code"] = request.smsCode; - } - mutableCardParameters[@"options"] = [mutableCardParameters[@"options"] mutableCopy]; - mutableCardParameters[@"options"][@"union_pay_enrollment"] = unionPayEnrollment; - } - - parameters[@"credit_card"] = [mutableCardParameters copy]; - } - parameters[@"_meta"] = @{ - @"source" : self.apiClient.metadata.sourceString, - @"integration" : self.apiClient.metadata.integrationString, - @"sessionId" : self.apiClient.metadata.sessionId, - }; - if (options) { - parameters[@"options"] = options; - } - [self.apiClient POST:@"v1/payment_methods/credit_cards" - parameters:parameters - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) - { - if (error != nil) { - NSHTTPURLResponse *response = error.userInfo[BTHTTPURLResponseKey]; - NSError *callbackError = error; - - if (response.statusCode == 422) { - callbackError = [NSError errorWithDomain:BTCardClientErrorDomain - code:BTCardClientErrorTypeCustomerInputInvalid - userInfo:[self.class validationErrorUserInfo:error.userInfo]]; - } - - if (request.enrollmentID) { - [self sendUnionPayAnalyticsEvent:NO]; - } else { - [self sendAnalyticsEventWithSuccess:NO]; - } - - completionBlock(nil, callbackError); - return; - } - - BTJSON *cardJSON = body[@"creditCards"][0]; - - if (request.enrollmentID) { - [self sendUnionPayAnalyticsEvent:!cardJSON.isError]; - } else { - [self sendAnalyticsEventWithSuccess:!cardJSON.isError]; - } - - // cardNonceWithJSON returns nil when cardJSON is nil, cardJSON.asError is nil when cardJSON is non-nil - completionBlock([BTCardNonce cardNonceWithJSON:cardJSON], cardJSON.asError); - }]; -} - -#pragma mark - Analytics - -- (void)sendAnalyticsEventWithSuccess:(BOOL)success { - NSString *event = [NSString stringWithFormat:@"ios.%@.card.%@", self.apiClient.metadata.integrationString, success ? @"succeeded" : @"failed"]; - [self.apiClient sendAnalyticsEvent:event]; -} - -- (void)sendUnionPayAnalyticsEvent:(BOOL)success { - NSString *event = [NSString stringWithFormat:@"ios.%@.unionpay.nonce-%@", self.apiClient.metadata.integrationString, success ? @"received" : @"failed"]; - [self.apiClient sendAnalyticsEvent:event]; -} - -#pragma mark - Helpers - -+ (NSDictionary *)validationErrorUserInfo:(NSDictionary *)userInfo { - NSMutableDictionary *mutableUserInfo = [userInfo mutableCopy]; - BTJSON *jsonResponse = userInfo[BTHTTPJSONResponseBodyKey]; - if ([jsonResponse asDictionary]) { - mutableUserInfo[BTCustomerInputBraintreeValidationErrorsKey] = [jsonResponse asDictionary]; - - BTJSON *fieldError = [[jsonResponse[@"fieldErrors"] asArray] firstObject]; - NSString *errorMessage = [jsonResponse[@"error"][@"message"] asString]; - if (errorMessage) { - mutableUserInfo[NSLocalizedDescriptionKey] = errorMessage; - } - NSString *firstFieldErrorMessage = [fieldError[@"fieldErrors"] firstObject][@"message"]; - if (firstFieldErrorMessage) { - mutableUserInfo[NSLocalizedFailureReasonErrorKey] = firstFieldErrorMessage; - } - } - return [mutableUserInfo copy]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient_Internal.h deleted file mode 100755 index 799bacb4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardClient_Internal.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "BTCardClient.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface BTCardClient () - -/*! - @brief Exposed for testing to get the instance of BTAPIClient -*/ -@property (nonatomic, strong, readwrite) BTAPIClient *apiClient; - -/*! - @brief Convenience helper method for creating friendlier, more human-readable userInfo dictionaries for 422 HTTP errors -*/ -+ (NSDictionary *)validationErrorUserInfo:(NSDictionary *)userInfo; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce.m deleted file mode 100755 index 429d4d28..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "BTCardNonce_Internal.h" - -@implementation BTCardNonce - -- (instancetype)initWithNonce:(NSString *)nonce - description:(NSString *)description - cardNetwork:(BTCardNetwork)cardNetwork - lastTwo:(NSString *)lastTwo - isDefault:(BOOL)isDefault -{ - self = [super initWithNonce:nonce localizedDescription:description type:[BTCardNonce stringFromCardNetwork:cardNetwork] isDefault:isDefault]; - if (self) { - _cardNetwork = cardNetwork; - _lastTwo = lastTwo; - } - return self; -} - -+ (NSString *)stringFromCardNetwork:(BTCardNetwork)cardNetwork { - switch (cardNetwork) { - case BTCardNetworkAMEX: - return @"AMEX"; - case BTCardNetworkDinersClub: - return @"DinersClub"; - case BTCardNetworkDiscover: - return @"Discover"; - case BTCardNetworkMasterCard: - return @"MasterCard"; - case BTCardNetworkVisa: - return @"Visa"; - case BTCardNetworkJCB: - return @"JCB"; - case BTCardNetworkLaser: - return @"Laser"; - case BTCardNetworkMaestro: - return @"Maestro"; - case BTCardNetworkUnionPay: - return @"UnionPay"; - case BTCardNetworkSolo: - return @"Solo"; - case BTCardNetworkSwitch: - return @"Switch"; - case BTCardNetworkUKMaestro: - return @"UKMaestro"; - case BTCardNetworkUnknown: - default: - return @"Unknown"; - } -} - -+ (instancetype)cardNonceWithJSON:(BTJSON *)cardJSON { - // Normalize the card network string in cardJSON to be lowercase so that our enum mapping is case insensitive - BTJSON *cardType = [[BTJSON alloc] initWithValue:[cardJSON[@"details"][@"cardType"] asString].lowercaseString]; - return [[[self class] alloc] initWithNonce:[cardJSON[@"nonce"] asString] - description:[cardJSON[@"description"] asString] - cardNetwork:[cardType asEnum:@{ - @"american express": @(BTCardNetworkAMEX), - @"diners club": @(BTCardNetworkDinersClub), - @"unionpay": @(BTCardNetworkUnionPay), - @"discover": @(BTCardNetworkDiscover), - @"maestro": @(BTCardNetworkMaestro), - @"mastercard": @(BTCardNetworkMasterCard), - @"jcb": @(BTCardNetworkJCB), - @"laser": @(BTCardNetworkLaser), - @"solo": @(BTCardNetworkSolo), - @"switch": @(BTCardNetworkSwitch), - @"uk maestro": @(BTCardNetworkUKMaestro), - @"visa": @(BTCardNetworkVisa),} - orDefault:BTCardNetworkUnknown] - lastTwo:[cardJSON[@"details"][@"lastTwo"] asString] - isDefault:[cardJSON[@"default"] isTrue]]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce_Internal.h deleted file mode 100755 index 62094092..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardNonce_Internal.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "BTCardNonce.h" -#import "BTJSON.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface BTCardNonce () - -- (instancetype)initWithNonce:(nonnull NSString *)nonce - description:(nullable NSString *)description - cardNetwork:(BTCardNetwork)cardNetwork - lastTwo:(nullable NSString *)lastTwo - isDefault:(BOOL)isDefault; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardRequest.m deleted file mode 100755 index 03d8ed0b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCardRequest.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "BTCardRequest.h" - -@implementation BTCardRequest - -- (instancetype)initWithCard:(BTCard *)card { - if (!card) { - return nil; - } - if (self = [super init]) { - _card = card; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard_Internal.h deleted file mode 100755 index d2f921f4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/BTCard_Internal.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "BTCard.h" -#import "BTJSON.h" - -@interface BTCard () - -- (NSDictionary *)parameters; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCard.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCard.h deleted file mode 100755 index 34422f1c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCard.h +++ /dev/null @@ -1,92 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - @class BTCard - @discussion The card tokenization request represents raw credit or debit card data provided by the customer. Its main purpose is to serve as the input for tokenization. -*/ -@interface BTCard : NSObject - -/*! - @brief A convenience initializer for creating a card tokenization request. -*/ -- (instancetype)initWithNumber:(NSString *)number - expirationMonth:(NSString *)expirationMonth - expirationYear:(NSString *)expirationYear - cvv:(nullable NSString *)cvv; - -- (instancetype)initWithParameters:(NSDictionary *)parameters NS_DESIGNATED_INITIALIZER; - -/*! - @brief The card number -*/ -@property (nonatomic, nullable, copy) NSString *number; - -/*! - @brief The expiration month as a one or two-digit number on the Gregorian calendar -*/ -@property (nonatomic, nullable, copy) NSString *expirationMonth; - -/*! - @brief The expiration year as a two or four-digit number on the Gregorian calendar -*/ -@property (nonatomic, nullable, copy) NSString *expirationYear; - -/*! - @brief The card CVV -*/ -@property (nonatomic, nullable, copy) NSString *cvv; - -/*! - @brief The postal code associated with the card's billing address -*/ - -@property (nonatomic, nullable, copy) NSString *postalCode; - -/*! - @brief Optional: the cardholder's name. -*/ -@property (nonatomic, nullable, copy) NSString *cardholderName; - -/*! - @brief Optional: the street address associated with the card's billing address -*/ -@property (nonatomic, nullable, copy) NSString *streetAddress; - -/*! - @brief Optional: the city associated with the card's billing address -*/ -@property (nonatomic, nullable, copy) NSString *locality; - -/*! - @brief Optional: the state/province associated with the card's billing address -*/ -@property (nonatomic, nullable, copy) NSString *region; - -/*! - @brief Optional: the country name associated with the card's billing address. - - @note Braintree only accepts specific country names. - @see https://developers.braintreepayments.com/reference/general/countries#list-of-countries -*/ -@property (nonatomic, nullable, copy) NSString *countryName; - -/*! - @brief Optional: the ISO 3166-1 alpha-2 country code specified in the card's billing address. - - @note Braintree only accepts specific alpha-2 values. - @see https://developers.braintreepayments.com/reference/general/countries#list-of-countries -*/ -@property (nonatomic, nullable, copy) NSString *countryCodeAlpha2; - -/*! - @brief Controls whether or not to return validations and/or verification results. By default, this is not enabled. - - @note Use this flag with caution. By enabling client-side validation, certain tokenize card requests may result in adding the card to the vault. These semantics are not currently documented. -*/ -@property (nonatomic, assign) BOOL shouldValidate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardClient.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardClient.h deleted file mode 100755 index e1a5f5af..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardClient.h +++ /dev/null @@ -1,64 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTCard.h" -#import "BTCardNonce.h" - -@class BTCardRequest; - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTCardClientErrorDomain; - -typedef NS_ENUM(NSInteger, BTCardClientErrorType) { - BTCardClientErrorTypeUnknown = 0, - - /// Braintree SDK is integrated incorrectly - BTCardClientErrorTypeIntegration, - - /// Payment option (e.g. UnionPay) is not enabled for this merchant account - BTCardClientErrorTypePaymentOptionNotEnabled, - - /// Customer provided invalid input - BTCardClientErrorTypeCustomerInputInvalid, -}; - -@interface BTCardClient : NSObject - -/*! - @brief Creates a card client. - - @param apiClient An API client -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient NS_DESIGNATED_INITIALIZER; - -- (instancetype)init __attribute__((unavailable("Please use initWithAPIClient:"))); - -/*! - @brief Tokenizes a card. - - @param card The card to tokenize. It must have a valid number and expiration date. - @param completion A completion block that is invoked when card tokenization has completed. If tokenization succeeds, - `tokenizedCard` will contain a nonce and `error` will be `nil`; if it fails, `tokenizedCard` will be `nil` and `error` - will describe the failure. -*/ -- (void)tokenizeCard:(BTCard *)card completion:(void (^)(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error))completion; - -/*! - @brief Tokenizes a card. - - @param request A card tokenization request that contains an enrolled card, the enrollment ID from `enrollUnionPayCard:completion:`, - and the enrollment auth code sent to the mobile phone number. - @param options A dictionary containing additional options to send when performing tokenization. Optional. - @param completion A completion block that is invoked when card tokenization has completed. If tokenization succeeds, `tokenizedCard` will contain a nonce and `error` will be `nil`; if it fails, `tokenizedCard` will be `nil` and `error` will describe the failure. -*/ -- (void)tokenizeCard:(BTCardRequest *)request - options:(nullable NSDictionary *)options - completion:(void (^)(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error))completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardNonce.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardNonce.h deleted file mode 100755 index 3edb8e82..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardNonce.h +++ /dev/null @@ -1,31 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -NS_ASSUME_NONNULL_BEGIN - -@interface BTCardNonce : BTPaymentMethodNonce - -/*! - @brief The card network. -*/ -@property (nonatomic, readonly, assign) BTCardNetwork cardNetwork; - -/*! - @brief The last two digits of the card, if available. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *lastTwo; - -#pragma mark - Internal - -/*! - @brief Create a `BTCardNonce` object from JSON. -*/ -+ (instancetype)cardNonceWithJSON:(BTJSON *)cardJSON; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardRequest.h deleted file mode 100755 index 689676fe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BTCardRequest.h +++ /dev/null @@ -1,37 +0,0 @@ -#import "BTCard.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BTCardRequest : NSObject - -- (instancetype)initWithCard:(BTCard *)card; - -@property (nonatomic, strong) BTCard *card; - -#pragma mark - UnionPay properties - -/*! - @brief The mobile phone number to use to verify the enrollment via SMS. -*/ -@property (nonatomic, copy, nullable) NSString *mobilePhoneNumber; - -/*! - @brief The country code for the mobile phone number. This string should only contain digits. - @note By default, this is set to 62. -*/ -@property (nonatomic, copy, nullable) NSString *mobileCountryCode; - -/*! - @brief The enrollment verification code sent via SMS to the mobile phone number. The code is needed to tokenize a UnionPay card that requires enrollment. -*/ -@property (nonatomic, copy, nullable) NSString *smsCode; - -/*! - @brief The UnionPay enrollment ID -*/ -@property (nonatomic, copy, nullable) NSString *enrollmentID; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BraintreeCard.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BraintreeCard.h deleted file mode 100755 index f4160ef2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCard/Public/BraintreeCard.h +++ /dev/null @@ -1,15 +0,0 @@ -#import - -FOUNDATION_EXPORT double BraintreeCardVersionNumber; - -FOUNDATION_EXPORT const unsigned char BraintreeCardVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTCardClient.h" -#import "BTCard.h" -#import "BTCardNonce.h" -#import "BTCardRequest.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient.m deleted file mode 100755 index a89cd07f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient.m +++ /dev/null @@ -1,328 +0,0 @@ -#import "BTAnalyticsMetadata.h" -#import "BTAnalyticsService.h" -#import "BTAPIClient_Internal.h" -#import "BTClientToken.h" -#import "BTLogger_Internal.h" -#import "BTPaymentMethodNonce.h" -#import "BTPaymentMethodNonceParser.h" - -NSString *const BTAPIClientErrorDomain = @"com.braintreepayments.BTAPIClientErrorDomain"; - -@interface BTAPIClient () -@property (nonatomic, strong) dispatch_queue_t configurationQueue; -@end - -@implementation BTAPIClient - -- (nullable instancetype)initWithAuthorization:(NSString *)authorization { - return [self initWithAuthorization:authorization sendAnalyticsEvent:YES]; -} - -- (nullable instancetype)initWithAuthorization:(NSString *)authorization sendAnalyticsEvent:(BOOL)sendAnalyticsEvent { - if(![authorization isKindOfClass:[NSString class]]) { - NSString *reason = @"BTClient could not initialize because the provided authorization was invalid"; - [[BTLogger sharedLogger] error:reason]; - return nil; - } - - if (self = [super init]) { - _metadata = [[BTClientMetadata alloc] init]; - _configurationQueue = dispatch_queue_create("com.braintreepayments.BTAPIClient", DISPATCH_QUEUE_SERIAL); - - NSRegularExpression *isTokenizationKeyRegExp = [NSRegularExpression regularExpressionWithPattern:@"^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$" options:0 error:NULL]; - NSTextCheckingResult *tokenizationKeyMatch = [isTokenizationKeyRegExp firstMatchInString:authorization options:0 range: NSMakeRange(0, authorization.length)]; - - if (tokenizationKeyMatch) { - NSURL *baseURL = [BTAPIClient baseURLFromTokenizationKey:authorization]; - - if (!baseURL) { - NSString *reason = @"BTClient could not initialize because the provided tokenization key was invalid"; - [[BTLogger sharedLogger] error:reason]; - return nil; - } - - _tokenizationKey = authorization; - - _configurationHTTP = [[BTHTTP alloc] initWithBaseURL:baseURL tokenizationKey:authorization]; - - if (sendAnalyticsEvent) { - [self sendAnalyticsEvent:@"ios.started.client-key"]; - } - } else { - NSError *error; - _clientToken = [[BTClientToken alloc] initWithClientToken:authorization error:&error]; - if (error) { [[BTLogger sharedLogger] error:[error localizedDescription]]; } - if (!_clientToken) { - NSString *reason = @"BTClient could not initialize because the provided clientToken was invalid"; - [[BTLogger sharedLogger] error:reason]; - return nil; - } - - _configurationHTTP = [[BTHTTP alloc] initWithClientToken:self.clientToken]; - - if (sendAnalyticsEvent) { - [self sendAnalyticsEvent:@"ios.started.client-token"]; - } - } - - // BTHTTP's default NSURLSession does not cache responses, but we want the BTHTTP instance that fetches configuration to cache aggressively - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - static NSURLCache *configurationCache; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - configurationCache = [[NSURLCache alloc] initWithMemoryCapacity:1 * 1024 * 1024 diskCapacity:0 diskPath:nil]; - }); - configuration.URLCache = configurationCache; - configuration.requestCachePolicy = NSURLRequestReturnCacheDataElseLoad; - _configurationHTTP.session = [NSURLSession sessionWithConfiguration:configuration]; - - // Kickoff the background request to fetch the config - [self fetchOrReturnRemoteConfiguration:^(__unused BTConfiguration * _Nullable configuration, __unused NSError * _Nullable error) { - //noop - }]; - } - - return self; -} - -- (instancetype)copyWithSource:(BTClientMetadataSourceType)source - integration:(BTClientMetadataIntegrationType)integration -{ - BTAPIClient *copiedClient; - - if (self.clientToken) { - copiedClient = [[[self class] alloc] initWithAuthorization:self.clientToken.originalValue sendAnalyticsEvent:NO]; - } else if (self.tokenizationKey) { - copiedClient = [[[self class] alloc] initWithAuthorization:self.tokenizationKey sendAnalyticsEvent:NO]; - } else { - NSAssert(NO, @"Cannot copy an API client that does not specify a client token or tokenization key"); - } - - if (copiedClient) { - BTMutableClientMetadata *mutableMetadata = [self.metadata mutableCopy]; - mutableMetadata.source = source; - mutableMetadata.integration = integration; - copiedClient->_metadata = [mutableMetadata copy]; - } - - return copiedClient; -} - -#pragma mark - Base URL - -/// Gets base URL from tokenization key -/// -/// @param tokenizationKey The tokenization key -/// -/// @return Base URL for environment, or `nil` if tokenization key is invalid -+ (NSURL *)baseURLFromTokenizationKey:(NSString *)tokenizationKey { - NSRegularExpression *regExp = [NSRegularExpression regularExpressionWithPattern:@"([a-zA-Z0-9]+)_[a-zA-Z0-9]+_([a-zA-Z0-9_]+)" options:0 error:NULL]; - - NSArray *results = [regExp matchesInString:tokenizationKey options:0 range:NSMakeRange(0, tokenizationKey.length)]; - - if (results.count != 1 || [[results firstObject] numberOfRanges] != 3) { - return nil; - } - - NSString *environment = [tokenizationKey substringWithRange:[results[0] rangeAtIndex:1]]; - NSString *merchantID = [tokenizationKey substringWithRange:[results[0] rangeAtIndex:2]]; - - NSURLComponents *components = [[NSURLComponents alloc] init]; - components.scheme = [BTAPIClient schemeForEnvironmentString:environment]; - NSString *host = [BTAPIClient hostForEnvironmentString:environment]; - NSArray *hostComponents = [host componentsSeparatedByString:@":"]; - components.host = hostComponents[0]; - if (hostComponents.count > 1) { - components.port = hostComponents[1]; - } - components.path = [BTAPIClient clientApiBasePathForMerchantID:merchantID]; - if (!components.host || !components.path) { - return nil; - } - - return components.URL; -} - -+ (NSString *)schemeForEnvironmentString:(NSString *)environment { - if ([[environment lowercaseString] isEqualToString:@"development"]) { - return @"http"; - } - return @"https"; -} - -+ (NSString *)hostForEnvironmentString:(NSString *)environment { - if ([[environment lowercaseString] isEqualToString:@"sandbox"]) { - return @"sandbox.braintreegateway.com"; - } else if ([[environment lowercaseString] isEqualToString:@"production"]) { - return @"api.braintreegateway.com:443"; - } else if ([[environment lowercaseString] isEqualToString:@"development"]) { - return @"localhost:3000"; - } else { - return nil; - } -} - -+ (NSString *)clientApiBasePathForMerchantID:(NSString *)merchantID { - if (merchantID.length == 0) { - return nil; - } - - return [NSString stringWithFormat:@"/merchants/%@/client_api", merchantID]; -} - -# pragma mark - Payment Methods - -- (void)fetchPaymentMethodNonces:(void (^)(NSArray *, NSError *))completion { - [self fetchPaymentMethodNonces:NO completion:completion]; -} - -- (void)fetchPaymentMethodNonces:(BOOL)defaultFirst completion:(void (^)(NSArray *, NSError *))completion { - if (!self.clientToken) { - NSError *error = [NSError errorWithDomain:BTAPIClientErrorDomain code:BTAPIClientErrorTypeNotAuthorized userInfo:@{ NSLocalizedDescriptionKey : @"Cannot fetch payment method nonces with a tokenization key", NSLocalizedRecoverySuggestionErrorKey : @"This endpoint requires a client token for authorization"}]; - if (completion) { - completion(nil, error); - } - return; - } - - [self GET:@"v1/payment_methods" - parameters:@{@"default_first": @(defaultFirst), - @"session_id": self.metadata.sessionId} - completion:^(BTJSON * _Nullable body, __unused NSHTTPURLResponse * _Nullable response, NSError * _Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^{ - if (completion) { - if (error) { - completion(nil, error); - } else { - NSMutableArray *paymentMethodNonces = [NSMutableArray array]; - for (NSDictionary *paymentInfo in [body[@"paymentMethods"] asArray]) { - BTJSON *paymentInfoJSON = [[BTJSON alloc] initWithValue:paymentInfo]; - BTPaymentMethodNonce *paymentMethodNonce = [[BTPaymentMethodNonceParser sharedParser] parseJSON:paymentInfoJSON withParsingBlockForType:[paymentInfoJSON[@"type"] asString]]; - if (paymentMethodNonce) { - [paymentMethodNonces addObject:paymentMethodNonce]; - } - } - completion(paymentMethodNonces, nil); - } - } - }); - }]; -} - -#pragma mark - Remote Configuration - -- (void)fetchOrReturnRemoteConfiguration:(void (^)(BTConfiguration *, NSError *))completionBlock { - // Guarantee that multiple calls to this method will successfully obtain configuration exactly once. - // - // Rules: - // - If cachedConfiguration is present, return it without a request - // - If cachedConfiguration is not present, fetch it and cache the succesful response - // - If fetching fails, return error and the next queued will try to fetch again - // - // Note: Configuration queue is SERIAL. This helps ensure that each request for configuration - // is processed independently. Thus, the check for cached configuration and the fetch is an - // atomic operation with respect to other calls to this method. - // - // Note: Uses dispatch_semaphore to block the configuration queue when the configuration fetch - // request is waiting to return. In this context, it is OK to block, as the configuration - // queue is a background queue to guarantee atomic access to the remote configuration resource. - dispatch_async(self.configurationQueue, ^{ - __block NSError *fetchError; - - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - __block BTConfiguration *configuration; - NSString *configPath = self.tokenizationKey ? @"v1/configuration" : [self.clientToken.configURL absoluteString]; - [self.configurationHTTP GET:configPath parameters:@{ @"configVersion": @"3" } completion:^(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error) { - if (error) { - fetchError = error; - } else if (response.statusCode != 200) { - NSError *configurationDomainError = - [NSError errorWithDomain:BTAPIClientErrorDomain - code:BTAPIClientErrorTypeConfigurationUnavailable - userInfo:@{ - NSLocalizedFailureReasonErrorKey: @"Unable to fetch remote configuration from Braintree API at this time." - }]; - fetchError = configurationDomainError; - } else { - configuration = [[BTConfiguration alloc] initWithJSON:body]; - if (!_http) { - NSURL *baseURL = [configuration.json[@"clientApiUrl"] asURL]; - if (self.clientToken) { - _http = [[BTHTTP alloc] initWithBaseURL:baseURL authorizationFingerprint:self.clientToken.authorizationFingerprint]; - } else if (self.tokenizationKey) { - _http = [[BTHTTP alloc] initWithBaseURL:baseURL tokenizationKey:self.tokenizationKey]; - } - } - } - - // Important: Unlock semaphore in all cases - dispatch_semaphore_signal(semaphore); - }]; - - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - - dispatch_async(dispatch_get_main_queue(), ^{ - completionBlock(configuration, fetchError); - }); - }); -} - -#pragma mark - Analytics - -/// By default, the `BTAnalyticsService` instance is static/shared so that only one queue of events exists. -/// The "singleton" is managed here because the analytics service depends on `BTAPIClient`. -- (BTAnalyticsService *)analyticsService { - static BTAnalyticsService *analyticsService; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:self]; - analyticsService.flushThreshold = 5; - }); - - // The analytics service may be overridden by unit tests. In that case, return the ivar and not the singleton - if (_analyticsService) return _analyticsService; - - return analyticsService; -} - -- (void)sendAnalyticsEvent:(NSString *)eventKind { - [self.analyticsService sendAnalyticsEvent:eventKind]; -} - -- (NSDictionary *)metaParameters { - NSMutableDictionary *metaParameters = [NSMutableDictionary dictionaryWithDictionary:self.metadata.parameters]; - [metaParameters addEntriesFromDictionary:[BTAnalyticsMetadata metadata]]; - - return [metaParameters copy]; -} - -#pragma mark - HTTP Operations - -- (void)GET:(NSString *)endpoint parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self fetchOrReturnRemoteConfiguration:^(__unused BTConfiguration * _Nullable configuration, __unused NSError * _Nullable error) { - [self.http GET:endpoint parameters:parameters completion:completionBlock]; - }]; -} - -- (void)POST:(NSString *)endpoint parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self fetchOrReturnRemoteConfiguration:^(__unused BTConfiguration * _Nullable configuration, __unused NSError * _Nullable error) { - NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionary]; - mutableParameters[@"_meta"] = [self metaParameters]; - [mutableParameters addEntriesFromDictionary:parameters]; - [self.http POST:endpoint parameters:mutableParameters completion:completionBlock]; - }]; -} - -- (instancetype)init NS_UNAVAILABLE -{ - return nil; -} - -- (void)dealloc -{ - if (self.http && self.http.session) { - [self.http.session finishTasksAndInvalidate]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient_Internal.h deleted file mode 100755 index d4b763a6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIClient_Internal.h +++ /dev/null @@ -1,43 +0,0 @@ -#import "BTAnalyticsService.h" -#import "BTAPIClient.h" -#import "BTClientMetadata.h" -#import "BTClientToken.h" -#import "BTHTTP.h" -#import "BTJSON.h" - -NS_ASSUME_NONNULL_BEGIN - -@class BTPaymentMethodNonce; - -@interface BTAPIClient () - -@property (nonatomic, copy, nullable) NSString *tokenizationKey; -@property (nonatomic, strong, nullable) BTClientToken *clientToken; -@property (nonatomic, strong) BTHTTP *http; -@property (nonatomic, strong) BTHTTP *configurationHTTP; - -/*! - @brief Client metadata that is used for tracking the client session -*/ -@property (nonatomic, readonly, strong) BTClientMetadata *metadata; - -/*! - @brief Exposed for testing analytics -*/ -@property (nonatomic, strong) BTAnalyticsService *analyticsService; - -/*! - @brief Analytics should only be posted by internal clients. -*/ -- (void)sendAnalyticsEvent:(NSString *)eventName; - -/*! - @brief An internal initializer to toggle whether to send an analytics event during initialization. - @discussion This prevents copyWithSource:integration: from sending a duplicate event. It can also be used to suppress excessive network chatter during testing. -*/ - -- (nullable instancetype)initWithAuthorization:(NSString *)authorization sendAnalyticsEvent:(BOOL)sendAnalyticsEvent; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.h deleted file mode 100755 index 8d9f8886..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.h +++ /dev/null @@ -1,21 +0,0 @@ -#import - -// :rotating_light THIS CODE IS GENERATED BY codify_certificates.sh :rotating_light: - -/*! - @class BTAPIPinnedCertificates - @brief Encapsualtes our trusted x509 Certificates for Secure SSL Communication with Braintree's servers. - - @discussion This class consists of code that is generated by the codify_certificates.sh script, which takes - a set of PEM formatted certificates and encodes them in code in order to avoid storing certificates - files in an NSBundle. -*/ -@interface BTAPIPinnedCertificates : NSObject - -/*! - @brief Returns the set of trusted root certificates based on the PEM files located in this directory. - - @return An array of trusted certificates encoded in the DER format, encapsulated in NSData objects. -*/ -+ (NSArray *)trustedCertificates; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.m deleted file mode 100755 index da33f05e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAPIPinnedCertificates.m +++ /dev/null @@ -1,1022 +0,0 @@ -#import "BTAPIPinnedCertificates.h" - -// :rotating_light THIS CODE IS GENERATED BY codify_certificates.sh :rotating_light: -@implementation BTAPIPinnedCertificates - -+ (NSArray *)trustedCertificates { - NSMutableArray *trustedCertificates = [NSMutableArray arrayWithCapacity:15]; - { -/* subject:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA 2 */ -/* issuer :/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA 2 */ -unsigned char XXX_certificate[874]={ -0x30,0x82,0x03,0x66,0x30,0x82,0x02,0x4E,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30, -0x44,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16, -0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73, -0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1D,0x30,0x1B,0x06,0x03,0x55,0x04,0x03,0x13, -0x14,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C, -0x20,0x43,0x41,0x20,0x32,0x30,0x1E,0x17,0x0D,0x30,0x34,0x30,0x33,0x30,0x34,0x30, -0x35,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x31,0x39,0x30,0x33,0x30,0x34,0x30,0x35, -0x30,0x30,0x30,0x30,0x5A,0x30,0x44,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06, -0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47, -0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1D,0x30,0x1B, -0x06,0x03,0x55,0x04,0x03,0x13,0x14,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20, -0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,0x41,0x20,0x32,0x30,0x82,0x01,0x22,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82, -0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xEF,0x3C,0x4D,0x40, -0x3D,0x10,0xDF,0x3B,0x53,0x00,0xE1,0x67,0xFE,0x94,0x60,0x15,0x3E,0x85,0x88,0xF1, -0x89,0x0D,0x90,0xC8,0x28,0x23,0x99,0x05,0xE8,0x2B,0x20,0x9D,0xC6,0xF3,0x60,0x46, -0xD8,0xC1,0xB2,0xD5,0x8C,0x31,0xD9,0xDC,0x20,0x79,0x24,0x81,0xBF,0x35,0x32,0xFC, -0x63,0x69,0xDB,0xB1,0x2A,0x6B,0xEE,0x21,0x58,0xF2,0x08,0xE9,0x78,0xCB,0x6F,0xCB, -0xFC,0x16,0x52,0xC8,0x91,0xC4,0xFF,0x3D,0x73,0xDE,0xB1,0x3E,0xA7,0xC2,0x7D,0x66, -0xC1,0xF5,0x7E,0x52,0x24,0x1A,0xE2,0xD5,0x67,0x91,0xD0,0x82,0x10,0xD7,0x78,0x4B, -0x4F,0x2B,0x42,0x39,0xBD,0x64,0x2D,0x40,0xA0,0xB0,0x10,0xD3,0x38,0x48,0x46,0x88, -0xA1,0x0C,0xBB,0x3A,0x33,0x2A,0x62,0x98,0xFB,0x00,0x9D,0x13,0x59,0x7F,0x6F,0x3B, -0x72,0xAA,0xEE,0xA6,0x0F,0x86,0xF9,0x05,0x61,0xEA,0x67,0x7F,0x0C,0x37,0x96,0x8B, -0xE6,0x69,0x16,0x47,0x11,0xC2,0x27,0x59,0x03,0xB3,0xA6,0x60,0xC2,0x21,0x40,0x56, -0xFA,0xA0,0xC7,0x7D,0x3A,0x13,0xE3,0xEC,0x57,0xC7,0xB3,0xD6,0xAE,0x9D,0x89,0x80, -0xF7,0x01,0xE7,0x2C,0xF6,0x96,0x2B,0x13,0x0D,0x79,0x2C,0xD9,0xC0,0xE4,0x86,0x7B, -0x4B,0x8C,0x0C,0x72,0x82,0x8A,0xFB,0x17,0xCD,0x00,0x6C,0x3A,0x13,0x3C,0xB0,0x84, -0x87,0x4B,0x16,0x7A,0x29,0xB2,0x4F,0xDB,0x1D,0xD4,0x0B,0xF3,0x66,0x37,0xBD,0xD8, -0xF6,0x57,0xBB,0x5E,0x24,0x7A,0xB8,0x3C,0x8B,0xB9,0xFA,0x92,0x1A,0x1A,0x84,0x9E, -0xD8,0x74,0x8F,0xAA,0x1B,0x7F,0x5E,0xF4,0xFE,0x45,0x22,0x21,0x02,0x03,0x01,0x00, -0x01,0xA3,0x63,0x30,0x61,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04, -0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04, -0x14,0x71,0x38,0x36,0xF2,0x02,0x31,0x53,0x47,0x2B,0x6E,0xBA,0x65,0x46,0xA9,0x10, -0x15,0x58,0x20,0x05,0x09,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16, -0x80,0x14,0x71,0x38,0x36,0xF2,0x02,0x31,0x53,0x47,0x2B,0x6E,0xBA,0x65,0x46,0xA9, -0x10,0x15,0x58,0x20,0x05,0x09,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF, -0x04,0x04,0x03,0x02,0x01,0x86,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D, -0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x03,0xF7,0xB5,0x2B,0xAB,0x5D, -0x10,0xFC,0x7B,0xB2,0xB2,0x5E,0xAC,0x9B,0x0E,0x7E,0x53,0x78,0x59,0x3E,0x42,0x04, -0xFE,0x75,0xA3,0xAD,0xAC,0x81,0x4E,0xD7,0x02,0x8B,0x5E,0xC4,0x2D,0xC8,0x52,0x76, -0xC7,0x2C,0x1F,0xFC,0x81,0x32,0x98,0xD1,0x4B,0xC6,0x92,0x93,0x33,0x35,0x31,0x2F, -0xFC,0xD8,0x1D,0x44,0xDD,0xE0,0x81,0x7F,0x9D,0xE9,0x8B,0xE1,0x64,0x91,0x62,0x0B, -0x39,0x08,0x8C,0xAC,0x74,0x9D,0x59,0xD9,0x7A,0x59,0x52,0x97,0x11,0xB9,0x16,0x7B, -0x6F,0x45,0xD3,0x96,0xD9,0x31,0x7D,0x02,0x36,0x0F,0x9C,0x3B,0x6E,0xCF,0x2C,0x0D, -0x03,0x46,0x45,0xEB,0xA0,0xF4,0x7F,0x48,0x44,0xC6,0x08,0x40,0xCC,0xDE,0x1B,0x70, -0xB5,0x29,0xAD,0xBA,0x8B,0x3B,0x34,0x65,0x75,0x1B,0x71,0x21,0x1D,0x2C,0x14,0x0A, -0xB0,0x96,0x95,0xB8,0xD6,0xEA,0xF2,0x65,0xFB,0x29,0xBA,0x4F,0xEA,0x91,0x93,0x74, -0x69,0xB6,0xF2,0xFF,0xE1,0x1A,0xD0,0x0C,0xD1,0x76,0x85,0xCB,0x8A,0x25,0xBD,0x97, -0x5E,0x2C,0x6F,0x15,0x99,0x26,0xE7,0xB6,0x29,0xFF,0x22,0xEC,0xC9,0x02,0xC7,0x56, -0x00,0xCD,0x49,0xB9,0xB3,0x6C,0x7B,0x53,0x04,0x1A,0xE2,0xA8,0xC9,0xAA,0x12,0x05, -0x23,0xC2,0xCE,0xE7,0xBB,0x04,0x02,0xCC,0xC0,0x47,0xA2,0xE4,0xC4,0x29,0x2F,0x5B, -0x45,0x57,0x89,0x51,0xEE,0x3C,0xEB,0x52,0x08,0xFF,0x07,0x35,0x1E,0x9F,0x35,0x6A, -0x47,0x4A,0x56,0x98,0xD1,0x5A,0x85,0x1F,0x8C,0xF5,0x22,0xBF,0xAB,0xCE,0x83,0xF3, -0xE2,0x22,0x29,0xAE,0x7D,0x83,0x40,0xA8,0xBA,0x6C, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA */ -/* issuer :/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA */ -unsigned char XXX_certificate[856]={ -0x30,0x82,0x03,0x54,0x30,0x82,0x02,0x3C,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x02, -0x34,0x56,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05, -0x00,0x30,0x42,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53, -0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72, -0x75,0x73,0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19,0x06,0x03,0x55,0x04, -0x03,0x13,0x12,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62, -0x61,0x6C,0x20,0x43,0x41,0x30,0x1E,0x17,0x0D,0x30,0x32,0x30,0x35,0x32,0x31,0x30, -0x34,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x32,0x32,0x30,0x35,0x32,0x31,0x30,0x34, -0x30,0x30,0x30,0x30,0x5A,0x30,0x42,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06, -0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47, -0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19, -0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20, -0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06, -0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F, -0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xDA,0xCC,0x18,0x63,0x30,0xFD, -0xF4,0x17,0x23,0x1A,0x56,0x7E,0x5B,0xDF,0x3C,0x6C,0x38,0xE4,0x71,0xB7,0x78,0x91, -0xD4,0xBC,0xA1,0xD8,0x4C,0xF8,0xA8,0x43,0xB6,0x03,0xE9,0x4D,0x21,0x07,0x08,0x88, -0xDA,0x58,0x2F,0x66,0x39,0x29,0xBD,0x05,0x78,0x8B,0x9D,0x38,0xE8,0x05,0xB7,0x6A, -0x7E,0x71,0xA4,0xE6,0xC4,0x60,0xA6,0xB0,0xEF,0x80,0xE4,0x89,0x28,0x0F,0x9E,0x25, -0xD6,0xED,0x83,0xF3,0xAD,0xA6,0x91,0xC7,0x98,0xC9,0x42,0x18,0x35,0x14,0x9D,0xAD, -0x98,0x46,0x92,0x2E,0x4F,0xCA,0xF1,0x87,0x43,0xC1,0x16,0x95,0x57,0x2D,0x50,0xEF, -0x89,0x2D,0x80,0x7A,0x57,0xAD,0xF2,0xEE,0x5F,0x6B,0xD2,0x00,0x8D,0xB9,0x14,0xF8, -0x14,0x15,0x35,0xD9,0xC0,0x46,0xA3,0x7B,0x72,0xC8,0x91,0xBF,0xC9,0x55,0x2B,0xCD, -0xD0,0x97,0x3E,0x9C,0x26,0x64,0xCC,0xDF,0xCE,0x83,0x19,0x71,0xCA,0x4E,0xE6,0xD4, -0xD5,0x7B,0xA9,0x19,0xCD,0x55,0xDE,0xC8,0xEC,0xD2,0x5E,0x38,0x53,0xE5,0x5C,0x4F, -0x8C,0x2D,0xFE,0x50,0x23,0x36,0xFC,0x66,0xE6,0xCB,0x8E,0xA4,0x39,0x19,0x00,0xB7, -0x95,0x02,0x39,0x91,0x0B,0x0E,0xFE,0x38,0x2E,0xD1,0x1D,0x05,0x9A,0xF6,0x4D,0x3E, -0x6F,0x0F,0x07,0x1D,0xAF,0x2C,0x1E,0x8F,0x60,0x39,0xE2,0xFA,0x36,0x53,0x13,0x39, -0xD4,0x5E,0x26,0x2B,0xDB,0x3D,0xA8,0x14,0xBD,0x32,0xEB,0x18,0x03,0x28,0x52,0x04, -0x71,0xE5,0xAB,0x33,0x3D,0xE1,0x38,0xBB,0x07,0x36,0x84,0x62,0x9C,0x79,0xEA,0x16, -0x30,0xF4,0x5F,0xC0,0x2B,0xE8,0x71,0x6B,0xE4,0xF9,0x02,0x03,0x01,0x00,0x01,0xA3, -0x53,0x30,0x51,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30, -0x03,0x01,0x01,0xFF,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xC0, -0x7A,0x98,0x68,0x8D,0x89,0xFB,0xAB,0x05,0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65,0xB8, -0xCA,0xCC,0x4E,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14, -0xC0,0x7A,0x98,0x68,0x8D,0x89,0xFB,0xAB,0x05,0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65, -0xB8,0xCA,0xCC,0x4E,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, -0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x35,0xE3,0x29,0x6A,0xE5,0x2F,0x5D,0x54, -0x8E,0x29,0x50,0x94,0x9F,0x99,0x1A,0x14,0xE4,0x8F,0x78,0x2A,0x62,0x94,0xA2,0x27, -0x67,0x9E,0xD0,0xCF,0x1A,0x5E,0x47,0xE9,0xC1,0xB2,0xA4,0xCF,0xDD,0x41,0x1A,0x05, -0x4E,0x9B,0x4B,0xEE,0x4A,0x6F,0x55,0x52,0xB3,0x24,0xA1,0x37,0x0A,0xEB,0x64,0x76, -0x2A,0x2E,0x2C,0xF3,0xFD,0x3B,0x75,0x90,0xBF,0xFA,0x71,0xD8,0xC7,0x3D,0x37,0xD2, -0xB5,0x05,0x95,0x62,0xB9,0xA6,0xDE,0x89,0x3D,0x36,0x7B,0x38,0x77,0x48,0x97,0xAC, -0xA6,0x20,0x8F,0x2E,0xA6,0xC9,0x0C,0xC2,0xB2,0x99,0x45,0x00,0xC7,0xCE,0x11,0x51, -0x22,0x22,0xE0,0xA5,0xEA,0xB6,0x15,0x48,0x09,0x64,0xEA,0x5E,0x4F,0x74,0xF7,0x05, -0x3E,0xC7,0x8A,0x52,0x0C,0xDB,0x15,0xB4,0xBD,0x6D,0x9B,0xE5,0xC6,0xB1,0x54,0x68, -0xA9,0xE3,0x69,0x90,0xB6,0x9A,0xA5,0x0F,0xB8,0xB9,0x3F,0x20,0x7D,0xAE,0x4A,0xB5, -0xB8,0x9C,0xE4,0x1D,0xB6,0xAB,0xE6,0x94,0xA5,0xC1,0xC7,0x83,0xAD,0xDB,0xF5,0x27, -0x87,0x0E,0x04,0x6C,0xD5,0xFF,0xDD,0xA0,0x5D,0xED,0x87,0x52,0xB7,0x2B,0x15,0x02, -0xAE,0x39,0xA6,0x6A,0x74,0xE9,0xDA,0xC4,0xE7,0xBC,0x4D,0x34,0x1E,0xA9,0x5C,0x4D, -0x33,0x5F,0x92,0x09,0x2F,0x88,0x66,0x5D,0x77,0x97,0xC7,0x1D,0x76,0x13,0xA9,0xD5, -0xE5,0xF1,0x16,0x09,0x11,0x35,0xD5,0xAC,0xDB,0x24,0x71,0x70,0x2C,0x98,0x56,0x0B, -0xD9,0x17,0xB4,0xD1,0xE3,0x51,0x2B,0x5E,0x75,0xE8,0xD5,0xD0,0xDC,0x4F,0x34,0xED, -0xC2,0x05,0x66,0x80,0xA1,0xCB,0xE6,0x33, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=GeoTrust Inc./CN=GeoTrust Universal CA 2 */ -/* issuer :/C=US/O=GeoTrust Inc./CN=GeoTrust Universal CA 2 */ -unsigned char XXX_certificate[1392]={ -0x30,0x82,0x05,0x6C,0x30,0x82,0x03,0x54,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30, -0x47,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16, -0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73, -0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x20,0x30,0x1E,0x06,0x03,0x55,0x04,0x03,0x13, -0x17,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x55,0x6E,0x69,0x76,0x65,0x72, -0x73,0x61,0x6C,0x20,0x43,0x41,0x20,0x32,0x30,0x1E,0x17,0x0D,0x30,0x34,0x30,0x33, -0x30,0x34,0x30,0x35,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x32,0x39,0x30,0x33,0x30, -0x34,0x30,0x35,0x30,0x30,0x30,0x30,0x5A,0x30,0x47,0x31,0x0B,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0A, -0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6E,0x63,0x2E,0x31, -0x20,0x30,0x1E,0x06,0x03,0x55,0x04,0x03,0x13,0x17,0x47,0x65,0x6F,0x54,0x72,0x75, -0x73,0x74,0x20,0x55,0x6E,0x69,0x76,0x65,0x72,0x73,0x61,0x6C,0x20,0x43,0x41,0x20, -0x32,0x30,0x82,0x02,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, -0x01,0x01,0x05,0x00,0x03,0x82,0x02,0x0F,0x00,0x30,0x82,0x02,0x0A,0x02,0x82,0x02, -0x01,0x00,0xB3,0x54,0x52,0xC1,0xC9,0x3E,0xF2,0xD9,0xDC,0xB1,0x53,0x1A,0x59,0x29, -0xE7,0xB1,0xC3,0x45,0x28,0xE5,0xD7,0xD1,0xED,0xC5,0xC5,0x4B,0xA1,0xAA,0x74,0x7B, -0x57,0xAF,0x4A,0x26,0xFC,0xD8,0xF5,0x5E,0xA7,0x6E,0x19,0xDB,0x74,0x0C,0x4F,0x35, -0x5B,0x32,0x0B,0x01,0xE3,0xDB,0xEB,0x7A,0x77,0x35,0xEA,0xAA,0x5A,0xE0,0xD6,0xE8, -0xA1,0x57,0x94,0xF0,0x90,0xA3,0x74,0x56,0x94,0x44,0x30,0x03,0x1E,0x5C,0x4E,0x2B, -0x85,0x26,0x74,0x82,0x7A,0x0C,0x76,0xA0,0x6F,0x4D,0xCE,0x41,0x2D,0xA0,0x15,0x06, -0x14,0x5F,0xB7,0x42,0xCD,0x7B,0x8F,0x58,0x61,0x34,0xDC,0x2A,0x08,0xF9,0x2E,0xC3, -0x01,0xA6,0x22,0x44,0x1C,0x4C,0x07,0x82,0xE6,0x5B,0xCE,0xD0,0x4A,0x7C,0x04,0xD3, -0x19,0x73,0x27,0xF0,0xAA,0x98,0x7F,0x2E,0xAF,0x4E,0xEB,0x87,0x1E,0x24,0x77,0x6A, -0x5D,0xB6,0xE8,0x5B,0x45,0xBA,0xDC,0xC3,0xA1,0x05,0x6F,0x56,0x8E,0x8F,0x10,0x26, -0xA5,0x49,0xC3,0x2E,0xD7,0x41,0x87,0x22,0xE0,0x4F,0x86,0xCA,0x60,0xB5,0xEA,0xA1, -0x63,0xC0,0x01,0x97,0x10,0x79,0xBD,0x00,0x3C,0x12,0x6D,0x2B,0x15,0xB1,0xAC,0x4B, -0xB1,0xEE,0x18,0xB9,0x4E,0x96,0xDC,0xDC,0x76,0xFF,0x3B,0xBE,0xCF,0x5F,0x03,0xC0, -0xFC,0x3B,0xE8,0xBE,0x46,0x1B,0xFF,0xDA,0x40,0xC2,0x52,0xF7,0xFE,0xE3,0x3A,0xF7, -0x6A,0x77,0x35,0xD0,0xDA,0x8D,0xEB,0x5E,0x18,0x6A,0x31,0xC7,0x1E,0xBA,0x3C,0x1B, -0x28,0xD6,0x6B,0x54,0xC6,0xAA,0x5B,0xD7,0xA2,0x2C,0x1B,0x19,0xCC,0xA2,0x02,0xF6, -0x9B,0x59,0xBD,0x37,0x6B,0x86,0xB5,0x6D,0x82,0xBA,0xD8,0xEA,0xC9,0x56,0xBC,0xA9, -0x36,0x58,0xFD,0x3E,0x19,0xF3,0xED,0x0C,0x26,0xA9,0x93,0x38,0xF8,0x4F,0xC1,0x5D, -0x22,0x06,0xD0,0x97,0xEA,0xE1,0xAD,0xC6,0x55,0xE0,0x81,0x2B,0x28,0x83,0x3A,0xFA, -0xF4,0x7B,0x21,0x51,0x00,0xBE,0x52,0x38,0xCE,0xCD,0x66,0x79,0xA8,0xF4,0x81,0x56, -0xE2,0xD0,0x83,0x09,0x47,0x51,0x5B,0x50,0x6A,0xCF,0xDB,0x48,0x1A,0x5D,0x3E,0xF7, -0xCB,0xF6,0x65,0xF7,0x6C,0xF1,0x95,0xF8,0x02,0x3B,0x32,0x56,0x82,0x39,0x7A,0x5B, -0xBD,0x2F,0x89,0x1B,0xBF,0xA1,0xB4,0xE8,0xFF,0x7F,0x8D,0x8C,0xDF,0x03,0xF1,0x60, -0x4E,0x58,0x11,0x4C,0xEB,0xA3,0x3F,0x10,0x2B,0x83,0x9A,0x01,0x73,0xD9,0x94,0x6D, -0x84,0x00,0x27,0x66,0xAC,0xF0,0x70,0x40,0x09,0x42,0x92,0xAD,0x4F,0x93,0x0D,0x61, -0x09,0x51,0x24,0xD8,0x92,0xD5,0x0B,0x94,0x61,0xB2,0x87,0xB2,0xED,0xFF,0x9A,0x35, -0xFF,0x85,0x54,0xCA,0xED,0x44,0x43,0xAC,0x1B,0x3C,0x16,0x6B,0x48,0x4A,0x0A,0x1C, -0x40,0x88,0x1F,0x92,0xC2,0x0B,0x00,0x05,0xFF,0xF2,0xC8,0x02,0x4A,0xA4,0xAA,0xA9, -0xCC,0x99,0x96,0x9C,0x2F,0x58,0xE0,0x7D,0xE1,0xBE,0xBB,0x07,0xDC,0x5F,0x04,0x72, -0x5C,0x31,0x34,0xC3,0xEC,0x5F,0x2D,0xE0,0x3D,0x64,0x90,0x22,0xE6,0xD1,0xEC,0xB8, -0x2E,0xDD,0x59,0xAE,0xD9,0xA1,0x37,0xBF,0x54,0x35,0xDC,0x73,0x32,0x4F,0x8C,0x04, -0x1E,0x33,0xB2,0xC9,0x46,0xF1,0xD8,0x5C,0xC8,0x55,0x50,0xC9,0x68,0xBD,0xA8,0xBA, -0x36,0x09,0x02,0x03,0x01,0x00,0x01,0xA3,0x63,0x30,0x61,0x30,0x0F,0x06,0x03,0x55, -0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x1D,0x06,0x03, -0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x76,0xF3,0x55,0xE1,0xFA,0xA4,0x36,0xFB,0xF0, -0x9F,0x5C,0x62,0x71,0xED,0x3C,0xF4,0x47,0x38,0x10,0x2B,0x30,0x1F,0x06,0x03,0x55, -0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x76,0xF3,0x55,0xE1,0xFA,0xA4,0x36,0xFB, -0xF0,0x9F,0x5C,0x62,0x71,0xED,0x3C,0xF4,0x47,0x38,0x10,0x2B,0x30,0x0E,0x06,0x03, -0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x86,0x30,0x0D,0x06,0x09, -0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x02,0x01,0x00, -0x66,0xC1,0xC6,0x23,0xF3,0xD9,0xE0,0x2E,0x6E,0x5F,0xE8,0xCF,0xAE,0xB0,0xB0,0x25, -0x4D,0x2B,0xF8,0x3B,0x58,0x9B,0x40,0x24,0x37,0x5A,0xCB,0xAB,0x16,0x49,0xFF,0xB3, -0x75,0x79,0x33,0xA1,0x2F,0x6D,0x70,0x17,0x34,0x91,0xFE,0x67,0x7E,0x8F,0xEC,0x9B, -0xE5,0x5E,0x82,0xA9,0x55,0x1F,0x2F,0xDC,0xD4,0x51,0x07,0x12,0xFE,0xAC,0x16,0x3E, -0x2C,0x35,0xC6,0x63,0xFC,0xDC,0x10,0xEB,0x0D,0xA3,0xAA,0xD0,0x7C,0xCC,0xD1,0xD0, -0x2F,0x51,0x2E,0xC4,0x14,0x5A,0xDE,0xE8,0x19,0xE1,0x3E,0xC6,0xCC,0xA4,0x29,0xE7, -0x2E,0x84,0xAA,0x06,0x30,0x78,0x76,0x54,0x73,0x28,0x98,0x59,0x38,0xE0,0x00,0x0D, -0x62,0xD3,0x42,0x7D,0x21,0x9F,0xAE,0x3D,0x3A,0x8C,0xD5,0xFA,0x77,0x0D,0x18,0x2B, -0x16,0x0E,0x5F,0x36,0xE1,0xFC,0x2A,0xB5,0x30,0x24,0xCF,0xE0,0x63,0x0C,0x7B,0x58, -0x1A,0xFE,0x99,0xBA,0x42,0x12,0xB1,0x91,0xF4,0x7C,0x68,0xE2,0xC8,0xE8,0xAF,0x2C, -0xEA,0xC9,0x7E,0xAE,0xBB,0x2A,0x3D,0x0D,0x15,0xDC,0x34,0x95,0xB6,0x18,0x74,0xA8, -0x6A,0x0F,0xC7,0xB4,0xF4,0x13,0xC4,0xE4,0x5B,0xED,0x0A,0xD2,0xA4,0x97,0x4C,0x2A, -0xED,0x2F,0x6C,0x12,0x89,0x3D,0xF1,0x27,0x70,0xAA,0x6A,0x03,0x52,0x21,0x9F,0x40, -0xA8,0x67,0x50,0xF2,0xF3,0x5A,0x1F,0xDF,0xDF,0x23,0xF6,0xDC,0x78,0x4E,0xE6,0x98, -0x4F,0x55,0x3A,0x53,0xE3,0xEF,0xF2,0xF4,0x9F,0xC7,0x7C,0xD8,0x58,0xAF,0x29,0x22, -0x97,0xB8,0xE0,0xBD,0x91,0x2E,0xB0,0x76,0xEC,0x57,0x11,0xCF,0xEF,0x29,0x44,0xF3, -0xE9,0x85,0x7A,0x60,0x63,0xE4,0x5D,0x33,0x89,0x17,0xD9,0x31,0xAA,0xDA,0xD6,0xF3, -0x18,0x35,0x72,0xCF,0x87,0x2B,0x2F,0x63,0x23,0x84,0x5D,0x84,0x8C,0x3F,0x57,0xA0, -0x88,0xFC,0x99,0x91,0x28,0x26,0x69,0x99,0xD4,0x8F,0x97,0x44,0xBE,0x8E,0xD5,0x48, -0xB1,0xA4,0x28,0x29,0xF1,0x15,0xB4,0xE1,0xE5,0x9E,0xDD,0xF8,0x8F,0xA6,0x6F,0x26, -0xD7,0x09,0x3C,0x3A,0x1C,0x11,0x0E,0xA6,0x6C,0x37,0xF7,0xAD,0x44,0x87,0x2C,0x28, -0xC7,0xD8,0x74,0x82,0xB3,0xD0,0x6F,0x4A,0x57,0xBB,0x35,0x29,0x27,0xA0,0x8B,0xE8, -0x21,0xA7,0x87,0x64,0x36,0x5D,0xCC,0xD8,0x16,0xAC,0xC7,0xB2,0x27,0x40,0x92,0x55, -0x38,0x28,0x8D,0x51,0x6E,0xDD,0x14,0x67,0x53,0x6C,0x71,0x5C,0x26,0x84,0x4D,0x75, -0x5A,0xB6,0x7E,0x60,0x56,0xA9,0x4D,0xAD,0xFB,0x9B,0x1E,0x97,0xF3,0x0D,0xD9,0xD2, -0x97,0x54,0x77,0xDA,0x3D,0x12,0xB7,0xE0,0x1E,0xEF,0x08,0x06,0xAC,0xF9,0x85,0x87, -0xE9,0xA2,0xDC,0xAF,0x7E,0x18,0x12,0x83,0xFD,0x56,0x17,0x41,0x2E,0xD5,0x29,0x82, -0x7D,0x99,0xF4,0x31,0xF6,0x71,0xA9,0xCF,0x2C,0x01,0x27,0xA5,0x05,0xB9,0xAA,0xB2, -0x48,0x4E,0x2A,0xEF,0x9F,0x93,0x52,0x51,0x95,0x3C,0x52,0x73,0x8E,0x56,0x4C,0x17, -0x40,0xC0,0x09,0x28,0xE4,0x8B,0x6A,0x48,0x53,0xDB,0xEC,0xCD,0x55,0x55,0xF1,0xC6, -0xF8,0xE9,0xA2,0x2C,0x4C,0xA6,0xD1,0x26,0x5F,0x7E,0xAF,0x5A,0x4C,0xDA,0x1F,0xA6, -0xF2,0x1C,0x2C,0x7E,0xAE,0x02,0x16,0xD2,0x56,0xD0,0x2F,0x57,0x53,0x47,0xE8,0x92, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=GeoTrust Inc./CN=GeoTrust Universal CA */ -/* issuer :/C=US/O=GeoTrust Inc./CN=GeoTrust Universal CA */ -unsigned char XXX_certificate[1388]={ -0x30,0x82,0x05,0x68,0x30,0x82,0x03,0x50,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30, -0x45,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16, -0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73, -0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1E,0x30,0x1C,0x06,0x03,0x55,0x04,0x03,0x13, -0x15,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x55,0x6E,0x69,0x76,0x65,0x72, -0x73,0x61,0x6C,0x20,0x43,0x41,0x30,0x1E,0x17,0x0D,0x30,0x34,0x30,0x33,0x30,0x34, -0x30,0x35,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x32,0x39,0x30,0x33,0x30,0x34,0x30, -0x35,0x30,0x30,0x30,0x30,0x5A,0x30,0x45,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04, -0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0A,0x13,0x0D, -0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1E,0x30, -0x1C,0x06,0x03,0x55,0x04,0x03,0x13,0x15,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74, -0x20,0x55,0x6E,0x69,0x76,0x65,0x72,0x73,0x61,0x6C,0x20,0x43,0x41,0x30,0x82,0x02, -0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00, -0x03,0x82,0x02,0x0F,0x00,0x30,0x82,0x02,0x0A,0x02,0x82,0x02,0x01,0x00,0xA6,0x15, -0x55,0xA0,0xA3,0xC6,0xE0,0x1F,0x8C,0x9D,0x21,0x50,0xD7,0xC1,0xBE,0x2B,0x5B,0xB5, -0xA4,0x9E,0xA1,0xD9,0x72,0x58,0xBD,0x00,0x1B,0x4C,0xBF,0x61,0xC9,0x14,0x1D,0x45, -0x82,0xAB,0xC6,0x1D,0x80,0xD6,0x3D,0xEB,0x10,0x9C,0x3A,0xAF,0x6D,0x24,0xF8,0xBC, -0x71,0x01,0x9E,0x06,0xF5,0x7C,0x5F,0x1E,0xC1,0x0E,0x55,0xCA,0x83,0x9A,0x59,0x30, -0xAE,0x19,0xCB,0x30,0x48,0x95,0xED,0x22,0x37,0x8D,0xF4,0x4A,0x9A,0x72,0x66,0x3E, -0xAD,0x95,0xC0,0xE0,0x16,0x00,0xE0,0x10,0x1F,0x2B,0x31,0x0E,0xD7,0x94,0x54,0xD3, -0x42,0x33,0xA0,0x34,0x1D,0x1E,0x45,0x76,0xDD,0x4F,0xCA,0x18,0x37,0xEC,0x85,0x15, -0x7A,0x19,0x08,0xFC,0xD5,0xC7,0x9C,0xF0,0xF2,0xA9,0x2E,0x10,0xA9,0x92,0xE6,0x3D, -0x58,0x3D,0xA9,0x16,0x68,0x3C,0x2F,0x75,0x21,0x18,0x7F,0x28,0x77,0xA5,0xE1,0x61, -0x17,0xB7,0xA6,0xE9,0xF8,0x1E,0x99,0xDB,0x73,0x6E,0xF4,0x0A,0xA2,0x21,0x6C,0xEE, -0xDA,0xAA,0x85,0x92,0x66,0xAF,0xF6,0x7A,0x6B,0x82,0xDA,0xBA,0x22,0x08,0x35,0x0F, -0xCF,0x42,0xF1,0x35,0xFA,0x6A,0xEE,0x7E,0x2B,0x25,0xCC,0x3A,0x11,0xE4,0x6D,0xAF, -0x73,0xB2,0x76,0x1D,0xAD,0xD0,0xB2,0x78,0x67,0x1A,0xA4,0x39,0x1C,0x51,0x0B,0x67, -0x56,0x83,0xFD,0x38,0x5D,0x0D,0xCE,0xDD,0xF0,0xBB,0x2B,0x96,0x1F,0xDE,0x7B,0x32, -0x52,0xFD,0x1D,0xBB,0xB5,0x06,0xA1,0xB2,0x21,0x5E,0xA5,0xD6,0x95,0x68,0x7F,0xF0, -0x99,0x9E,0xDC,0x45,0x08,0x3E,0xE7,0xD2,0x09,0x0D,0x35,0x94,0xDD,0x80,0x4E,0x53, -0x97,0xD7,0xB5,0x09,0x44,0x20,0x64,0x16,0x17,0x03,0x02,0x4C,0x53,0x0D,0x68,0xDE, -0xD5,0xAA,0x72,0x4D,0x93,0x6D,0x82,0x0E,0xDB,0x9C,0xBD,0xCF,0xB4,0xF3,0x5C,0x5D, -0x54,0x7A,0x69,0x09,0x96,0xD6,0xDB,0x11,0xC1,0x8D,0x75,0xA8,0xB4,0xCF,0x39,0xC8, -0xCE,0x3C,0xBC,0x24,0x7C,0xE6,0x62,0xCA,0xE1,0xBD,0x7D,0xA7,0xBD,0x57,0x65,0x0B, -0xE4,0xFE,0x25,0xED,0xB6,0x69,0x10,0xDC,0x28,0x1A,0x46,0xBD,0x01,0x1D,0xD0,0x97, -0xB5,0xE1,0x98,0x3B,0xC0,0x37,0x64,0xD6,0x3D,0x94,0xEE,0x0B,0xE1,0xF5,0x28,0xAE, -0x0B,0x56,0xBF,0x71,0x8B,0x23,0x29,0x41,0x8E,0x86,0xC5,0x4B,0x52,0x7B,0xD8,0x71, -0xAB,0x1F,0x8A,0x15,0xA6,0x3B,0x83,0x5A,0xD7,0x58,0x01,0x51,0xC6,0x4C,0x41,0xD9, -0x7F,0xD8,0x41,0x67,0x72,0xA2,0x28,0xDF,0x60,0x83,0xA9,0x9E,0xC8,0x7B,0xFC,0x53, -0x73,0x72,0x59,0xF5,0x93,0x7A,0x17,0x76,0x0E,0xCE,0xF7,0xE5,0x5C,0xD9,0x0B,0x55, -0x34,0xA2,0xAA,0x5B,0xB5,0x6A,0x54,0xE7,0x13,0xCA,0x57,0xEC,0x97,0x6D,0xF4,0x5E, -0x06,0x2F,0x45,0x8B,0x58,0xD4,0x23,0x16,0x92,0xE4,0x16,0x6E,0x28,0x63,0x59,0x30, -0xDF,0x50,0x01,0x9C,0x63,0x89,0x1A,0x9F,0xDB,0x17,0x94,0x82,0x70,0x37,0xC3,0x24, -0x9E,0x9A,0x47,0xD6,0x5A,0xCA,0x4E,0xA8,0x69,0x89,0x72,0x1F,0x91,0x6C,0xDB,0x7E, -0x9E,0x1B,0xAD,0xC7,0x1F,0x73,0xDD,0x2C,0x4F,0x19,0x65,0xFD,0x7F,0x93,0x40,0x10, -0x2E,0xD2,0xF0,0xED,0x3C,0x9E,0x2E,0x28,0x3E,0x69,0x26,0x33,0xC5,0x7B,0x02,0x03, -0x01,0x00,0x01,0xA3,0x63,0x30,0x61,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01, -0xFF,0x04,0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04, -0x16,0x04,0x14,0xDA,0xBB,0x2E,0xAA,0xB0,0x0C,0xB8,0x88,0x26,0x51,0x74,0x5C,0x6D, -0x03,0xD3,0xC0,0xD8,0x8F,0x7A,0xD6,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18, -0x30,0x16,0x80,0x14,0xDA,0xBB,0x2E,0xAA,0xB0,0x0C,0xB8,0x88,0x26,0x51,0x74,0x5C, -0x6D,0x03,0xD3,0xC0,0xD8,0x8F,0x7A,0xD6,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01, -0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x86,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x02,0x01,0x00,0x31,0x78,0xE6,0xC7, -0xB5,0xDF,0xB8,0x94,0x40,0xC9,0x71,0xC4,0xA8,0x35,0xEC,0x46,0x1D,0xC2,0x85,0xF3, -0x28,0x58,0x86,0xB0,0x0B,0xFC,0x8E,0xB2,0x39,0x8F,0x44,0x55,0xAB,0x64,0x84,0x5C, -0x69,0xA9,0xD0,0x9A,0x38,0x3C,0xFA,0xE5,0x1F,0x35,0xE5,0x44,0xE3,0x80,0x79,0x94, -0x68,0xA4,0xBB,0xC4,0x9F,0x3D,0xE1,0x34,0xCD,0x30,0x46,0x8B,0x54,0x2B,0x95,0xA5, -0xEF,0xF7,0x3F,0x99,0x84,0xFD,0x35,0xE6,0xCF,0x31,0xC6,0xDC,0x6A,0xBF,0xA7,0xD7, -0x23,0x08,0xE1,0x98,0x5E,0xC3,0x5A,0x08,0x76,0xA9,0xA6,0xAF,0x77,0x2F,0xB7,0x60, -0xBD,0x44,0x46,0x6A,0xEF,0x97,0xFF,0x73,0x95,0xC1,0x8E,0xE8,0x93,0xFB,0xFD,0x31, -0xB7,0xEC,0x57,0x11,0x11,0x45,0x9B,0x30,0xF1,0x1A,0x88,0x39,0xC1,0x4F,0x3C,0xA7, -0x00,0xD5,0xC7,0xFC,0xAB,0x6D,0x80,0x22,0x70,0xA5,0x0C,0xE0,0x5D,0x04,0x29,0x02, -0xFB,0xCB,0xA0,0x91,0xD1,0x7C,0xD6,0xC3,0x7E,0x50,0xD5,0x9D,0x58,0xBE,0x41,0x38, -0xEB,0xB9,0x75,0x3C,0x15,0xD9,0x9B,0xC9,0x4A,0x83,0x59,0xC0,0xDA,0x53,0xFD,0x33, -0xBB,0x36,0x18,0x9B,0x85,0x0F,0x15,0xDD,0xEE,0x2D,0xAC,0x76,0x93,0xB9,0xD9,0x01, -0x8D,0x48,0x10,0xA8,0xFB,0xF5,0x38,0x86,0xF1,0xDB,0x0A,0xC6,0xBD,0x84,0xA3,0x23, -0x41,0xDE,0xD6,0x77,0x6F,0x85,0xD4,0x85,0x1C,0x50,0xE0,0xAE,0x51,0x8A,0xBA,0x8D, -0x3E,0x76,0xE2,0xB9,0xCA,0x27,0xF2,0x5F,0x9F,0xEF,0x6E,0x59,0x0D,0x06,0xD8,0x2B, -0x17,0xA4,0xD2,0x7C,0x6B,0xBB,0x5F,0x14,0x1A,0x48,0x8F,0x1A,0x4C,0xE7,0xB3,0x47, -0x1C,0x8E,0x4C,0x45,0x2B,0x20,0xEE,0x48,0xDF,0xE7,0xDD,0x09,0x8E,0x18,0xA8,0xDA, -0x40,0x8D,0x92,0x26,0x11,0x53,0x61,0x73,0x5D,0xEB,0xBD,0xE7,0xC4,0x4D,0x29,0x37, -0x61,0xEB,0xAC,0x39,0x2D,0x67,0x2E,0x16,0xD6,0xF5,0x00,0x83,0x85,0xA1,0xCC,0x7F, -0x76,0xC4,0x7D,0xE4,0xB7,0x4B,0x66,0xEF,0x03,0x45,0x60,0x69,0xB6,0x0C,0x52,0x96, -0x92,0x84,0x5E,0xA6,0xA3,0xB5,0xA4,0x3E,0x2B,0xD9,0xCC,0xD8,0x1B,0x47,0xAA,0xF2, -0x44,0xDA,0x4F,0xF9,0x03,0xE8,0xF0,0x14,0xCB,0x3F,0xF3,0x83,0xDE,0xD0,0xC1,0x54, -0xE3,0xB7,0xE8,0x0A,0x37,0x4D,0x8B,0x20,0x59,0x03,0x30,0x19,0xA1,0x2C,0xC8,0xBD, -0x11,0x1F,0xDF,0xAE,0xC9,0x4A,0xC5,0xF3,0x27,0x66,0x66,0x86,0xAC,0x68,0x91,0xFF, -0xD9,0xE6,0x53,0x1C,0x0F,0x8B,0x5C,0x69,0x65,0x0A,0x26,0xC8,0x1E,0x34,0xC3,0x5D, -0x51,0x7B,0xD7,0xA9,0x9C,0x06,0xA1,0x36,0xDD,0xD5,0x89,0x94,0xBC,0xD9,0xE4,0x2D, -0x0C,0x5E,0x09,0x6C,0x08,0x97,0x7C,0xA3,0x3D,0x7C,0x93,0xFF,0x3F,0xA1,0x14,0xA7, -0xCF,0xB5,0x5D,0xEB,0xDB,0xDB,0x1C,0xC4,0x76,0xDF,0x88,0xB9,0xBD,0x45,0x05,0x95, -0x1B,0xAE,0xFC,0x46,0x6A,0x4C,0xAF,0x48,0xE3,0xCE,0xAE,0x0F,0xD2,0x7E,0xEB,0xE6, -0x6C,0x9C,0x4F,0x81,0x6A,0x7A,0x64,0xAC,0xBB,0x3E,0xD5,0xE7,0xCB,0x76,0x2E,0xC5, -0xA7,0x48,0xC1,0x5C,0x90,0x0F,0xCB,0xC8,0x3F,0xFA,0xE6,0x32,0xE1,0x8D,0x1B,0x6F, -0xA4,0xE6,0x8E,0xD8,0xF9,0x29,0x48,0x8A,0xCE,0x73,0xFE,0x2C, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2 */ -/* issuer :/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2 */ -unsigned char XXX_certificate[969]={ -0x30,0x82,0x03,0xC5,0x30,0x82,0x02,0xAD,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x00, -0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x0B,0x05,0x00,0x30, -0x81,0x83,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31, -0x10,0x30,0x0E,0x06,0x03,0x55,0x04,0x08,0x13,0x07,0x41,0x72,0x69,0x7A,0x6F,0x6E, -0x61,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x07,0x13,0x0A,0x53,0x63,0x6F,0x74, -0x74,0x73,0x64,0x61,0x6C,0x65,0x31,0x1A,0x30,0x18,0x06,0x03,0x55,0x04,0x0A,0x13, -0x11,0x47,0x6F,0x44,0x61,0x64,0x64,0x79,0x2E,0x63,0x6F,0x6D,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x31,0x31,0x30,0x2F,0x06,0x03,0x55,0x04,0x03,0x13,0x28,0x47,0x6F,0x20, -0x44,0x61,0x64,0x64,0x79,0x20,0x52,0x6F,0x6F,0x74,0x20,0x43,0x65,0x72,0x74,0x69, -0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79, -0x20,0x2D,0x20,0x47,0x32,0x30,0x1E,0x17,0x0D,0x30,0x39,0x30,0x39,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x33,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0x83,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04, -0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,0x0E,0x06,0x03,0x55,0x04,0x08,0x13,0x07, -0x41,0x72,0x69,0x7A,0x6F,0x6E,0x61,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x07, -0x13,0x0A,0x53,0x63,0x6F,0x74,0x74,0x73,0x64,0x61,0x6C,0x65,0x31,0x1A,0x30,0x18, -0x06,0x03,0x55,0x04,0x0A,0x13,0x11,0x47,0x6F,0x44,0x61,0x64,0x64,0x79,0x2E,0x63, -0x6F,0x6D,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x31,0x30,0x2F,0x06,0x03,0x55,0x04, -0x03,0x13,0x28,0x47,0x6F,0x20,0x44,0x61,0x64,0x64,0x79,0x20,0x52,0x6F,0x6F,0x74, -0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74, -0x68,0x6F,0x72,0x69,0x74,0x79,0x20,0x2D,0x20,0x47,0x32,0x30,0x82,0x01,0x22,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82, -0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xBF,0x71,0x62,0x08, -0xF1,0xFA,0x59,0x34,0xF7,0x1B,0xC9,0x18,0xA3,0xF7,0x80,0x49,0x58,0xE9,0x22,0x83, -0x13,0xA6,0xC5,0x20,0x43,0x01,0x3B,0x84,0xF1,0xE6,0x85,0x49,0x9F,0x27,0xEA,0xF6, -0x84,0x1B,0x4E,0xA0,0xB4,0xDB,0x70,0x98,0xC7,0x32,0x01,0xB1,0x05,0x3E,0x07,0x4E, -0xEE,0xF4,0xFA,0x4F,0x2F,0x59,0x30,0x22,0xE7,0xAB,0x19,0x56,0x6B,0xE2,0x80,0x07, -0xFC,0xF3,0x16,0x75,0x80,0x39,0x51,0x7B,0xE5,0xF9,0x35,0xB6,0x74,0x4E,0xA9,0x8D, -0x82,0x13,0xE4,0xB6,0x3F,0xA9,0x03,0x83,0xFA,0xA2,0xBE,0x8A,0x15,0x6A,0x7F,0xDE, -0x0B,0xC3,0xB6,0x19,0x14,0x05,0xCA,0xEA,0xC3,0xA8,0x04,0x94,0x3B,0x46,0x7C,0x32, -0x0D,0xF3,0x00,0x66,0x22,0xC8,0x8D,0x69,0x6D,0x36,0x8C,0x11,0x18,0xB7,0xD3,0xB2, -0x1C,0x60,0xB4,0x38,0xFA,0x02,0x8C,0xCE,0xD3,0xDD,0x46,0x07,0xDE,0x0A,0x3E,0xEB, -0x5D,0x7C,0xC8,0x7C,0xFB,0xB0,0x2B,0x53,0xA4,0x92,0x62,0x69,0x51,0x25,0x05,0x61, -0x1A,0x44,0x81,0x8C,0x2C,0xA9,0x43,0x96,0x23,0xDF,0xAC,0x3A,0x81,0x9A,0x0E,0x29, -0xC5,0x1C,0xA9,0xE9,0x5D,0x1E,0xB6,0x9E,0x9E,0x30,0x0A,0x39,0xCE,0xF1,0x88,0x80, -0xFB,0x4B,0x5D,0xCC,0x32,0xEC,0x85,0x62,0x43,0x25,0x34,0x02,0x56,0x27,0x01,0x91, -0xB4,0x3B,0x70,0x2A,0x3F,0x6E,0xB1,0xE8,0x9C,0x88,0x01,0x7D,0x9F,0xD4,0xF9,0xDB, -0x53,0x6D,0x60,0x9D,0xBF,0x2C,0xE7,0x58,0xAB,0xB8,0x5F,0x46,0xFC,0xCE,0xC4,0x1B, -0x03,0x3C,0x09,0xEB,0x49,0x31,0x5C,0x69,0x46,0xB3,0xE0,0x47,0x02,0x03,0x01,0x00, -0x01,0xA3,0x42,0x30,0x40,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04, -0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF, -0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04, -0x14,0x3A,0x9A,0x85,0x07,0x10,0x67,0x28,0xB6,0xEF,0xF6,0xBD,0x05,0x41,0x6E,0x20, -0xC1,0x94,0xDA,0x0F,0xDE,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, -0x01,0x0B,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x99,0xDB,0x5D,0x79,0xD5,0xF9,0x97, -0x59,0x67,0x03,0x61,0xF1,0x7E,0x3B,0x06,0x31,0x75,0x2D,0xA1,0x20,0x8E,0x4F,0x65, -0x87,0xB4,0xF7,0xA6,0x9C,0xBC,0xD8,0xE9,0x2F,0xD0,0xDB,0x5A,0xEE,0xCF,0x74,0x8C, -0x73,0xB4,0x38,0x42,0xDA,0x05,0x7B,0xF8,0x02,0x75,0xB8,0xFD,0xA5,0xB1,0xD7,0xAE, -0xF6,0xD7,0xDE,0x13,0xCB,0x53,0x10,0x7E,0x8A,0x46,0xD1,0x97,0xFA,0xB7,0x2E,0x2B, -0x11,0xAB,0x90,0xB0,0x27,0x80,0xF9,0xE8,0x9F,0x5A,0xE9,0x37,0x9F,0xAB,0xE4,0xDF, -0x6C,0xB3,0x85,0x17,0x9D,0x3D,0xD9,0x24,0x4F,0x79,0x91,0x35,0xD6,0x5F,0x04,0xEB, -0x80,0x83,0xAB,0x9A,0x02,0x2D,0xB5,0x10,0xF4,0xD8,0x90,0xC7,0x04,0x73,0x40,0xED, -0x72,0x25,0xA0,0xA9,0x9F,0xEC,0x9E,0xAB,0x68,0x12,0x99,0x57,0xC6,0x8F,0x12,0x3A, -0x09,0xA4,0xBD,0x44,0xFD,0x06,0x15,0x37,0xC1,0x9B,0xE4,0x32,0xA3,0xED,0x38,0xE8, -0xD8,0x64,0xF3,0x2C,0x7E,0x14,0xFC,0x02,0xEA,0x9F,0xCD,0xFF,0x07,0x68,0x17,0xDB, -0x22,0x90,0x38,0x2D,0x7A,0x8D,0xD1,0x54,0xF1,0x69,0xE3,0x5F,0x33,0xCA,0x7A,0x3D, -0x7B,0x0A,0xE3,0xCA,0x7F,0x5F,0x39,0xE5,0xE2,0x75,0xBA,0xC5,0x76,0x18,0x33,0xCE, -0x2C,0xF0,0x2F,0x4C,0xAD,0xF7,0xB1,0xE7,0xCE,0x4F,0xA8,0xC4,0x9B,0x4A,0x54,0x06, -0xC5,0x7F,0x7D,0xD5,0x08,0x0F,0xE2,0x1C,0xFE,0x7E,0x17,0xB8,0xAC,0x5E,0xF6,0xD4, -0x16,0xB2,0x43,0x09,0x0C,0x4D,0xF6,0xA7,0x6B,0xB4,0x99,0x84,0x65,0xCA,0x7A,0x88, -0xE2,0xE2,0x44,0xBE,0x5C,0xF7,0xEA,0x1C,0xF5, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA */ -/* issuer :/C=US/O=SecureTrust Corporation/CN=SecureTrust CA */ -unsigned char XXX_certificate[956]={ -0x30,0x82,0x03,0xB8,0x30,0x82,0x02,0xA0,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x0C, -0xF0,0x8E,0x5C,0x08,0x16,0xA5,0xAD,0x42,0x7F,0xF0,0xEB,0x27,0x18,0x59,0xD0,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x48, -0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x20,0x30, -0x1E,0x06,0x03,0x55,0x04,0x0A,0x13,0x17,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72, -0x75,0x73,0x74,0x20,0x43,0x6F,0x72,0x70,0x6F,0x72,0x61,0x74,0x69,0x6F,0x6E,0x31, -0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x03,0x13,0x0E,0x53,0x65,0x63,0x75,0x72,0x65, -0x54,0x72,0x75,0x73,0x74,0x20,0x43,0x41,0x30,0x1E,0x17,0x0D,0x30,0x36,0x31,0x31, -0x30,0x37,0x31,0x39,0x33,0x31,0x31,0x38,0x5A,0x17,0x0D,0x32,0x39,0x31,0x32,0x33, -0x31,0x31,0x39,0x34,0x30,0x35,0x35,0x5A,0x30,0x48,0x31,0x0B,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x20,0x30,0x1E,0x06,0x03,0x55,0x04,0x0A, -0x13,0x17,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72,0x75,0x73,0x74,0x20,0x43,0x6F, -0x72,0x70,0x6F,0x72,0x61,0x74,0x69,0x6F,0x6E,0x31,0x17,0x30,0x15,0x06,0x03,0x55, -0x04,0x03,0x13,0x0E,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72,0x75,0x73,0x74,0x20, -0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D, -0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82, -0x01,0x01,0x00,0xAB,0xA4,0x81,0xE5,0x95,0xCD,0xF5,0xF6,0x14,0x8E,0xC2,0x4F,0xCA, -0xD4,0xE2,0x78,0x95,0x58,0x9C,0x41,0xE1,0x0D,0x99,0x40,0x24,0x17,0x39,0x91,0x33, -0x66,0xE9,0xBE,0xE1,0x83,0xAF,0x62,0x5C,0x89,0xD1,0xFC,0x24,0x5B,0x61,0xB3,0xE0, -0x11,0x11,0x41,0x1C,0x1D,0x6E,0xF0,0xB8,0xBB,0xF8,0xDE,0xA7,0x81,0xBA,0xA6,0x48, -0xC6,0x9F,0x1D,0xBD,0xBE,0x8E,0xA9,0x41,0x3E,0xB8,0x94,0xED,0x29,0x1A,0xD4,0x8E, -0xD2,0x03,0x1D,0x03,0xEF,0x6D,0x0D,0x67,0x1C,0x57,0xD7,0x06,0xAD,0xCA,0xC8,0xF5, -0xFE,0x0E,0xAF,0x66,0x25,0x48,0x04,0x96,0x0B,0x5D,0xA3,0xBA,0x16,0xC3,0x08,0x4F, -0xD1,0x46,0xF8,0x14,0x5C,0xF2,0xC8,0x5E,0x01,0x99,0x6D,0xFD,0x88,0xCC,0x86,0xA8, -0xC1,0x6F,0x31,0x42,0x6C,0x52,0x3E,0x68,0xCB,0xF3,0x19,0x34,0xDF,0xBB,0x87,0x18, -0x56,0x80,0x26,0xC4,0xD0,0xDC,0xC0,0x6F,0xDF,0xDE,0xA0,0xC2,0x91,0x16,0xA0,0x64, -0x11,0x4B,0x44,0xBC,0x1E,0xF6,0xE7,0xFA,0x63,0xDE,0x66,0xAC,0x76,0xA4,0x71,0xA3, -0xEC,0x36,0x94,0x68,0x7A,0x77,0xA4,0xB1,0xE7,0x0E,0x2F,0x81,0x7A,0xE2,0xB5,0x72, -0x86,0xEF,0xA2,0x6B,0x8B,0xF0,0x0F,0xDB,0xD3,0x59,0x3F,0xBA,0x72,0xBC,0x44,0x24, -0x9C,0xE3,0x73,0xB3,0xF7,0xAF,0x57,0x2F,0x42,0x26,0x9D,0xA9,0x74,0xBA,0x00,0x52, -0xF2,0x4B,0xCD,0x53,0x7C,0x47,0x0B,0x36,0x85,0x0E,0x66,0xA9,0x08,0x97,0x16,0x34, -0x57,0xC1,0x66,0xF7,0x80,0xE3,0xED,0x70,0x54,0xC7,0x93,0xE0,0x2E,0x28,0x15,0x59, -0x87,0xBA,0xBB,0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0x9D,0x30,0x81,0x9A,0x30,0x13, -0x06,0x09,0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x04,0x06,0x1E,0x04,0x00, -0x43,0x00,0x41,0x30,0x0B,0x06,0x03,0x55,0x1D,0x0F,0x04,0x04,0x03,0x02,0x01,0x86, -0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01, -0xFF,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x42,0x32,0xB6,0x16, -0xFA,0x04,0xFD,0xFE,0x5D,0x4B,0x7A,0xC3,0xFD,0xF7,0x4C,0x40,0x1D,0x5A,0x43,0xAF, -0x30,0x34,0x06,0x03,0x55,0x1D,0x1F,0x04,0x2D,0x30,0x2B,0x30,0x29,0xA0,0x27,0xA0, -0x25,0x86,0x23,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x73,0x65, -0x63,0x75,0x72,0x65,0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x53,0x54, -0x43,0x41,0x2E,0x63,0x72,0x6C,0x30,0x10,0x06,0x09,0x2B,0x06,0x01,0x04,0x01,0x82, -0x37,0x15,0x01,0x04,0x03,0x02,0x01,0x00,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x30,0xED,0x4F,0x4A, -0xE1,0x58,0x3A,0x52,0x72,0x5B,0xB5,0xA6,0xA3,0x65,0x18,0xA6,0xBB,0x51,0x3B,0x77, -0xE9,0x9D,0xEA,0xD3,0x9F,0x5C,0xE0,0x45,0x65,0x7B,0x0D,0xCA,0x5B,0xE2,0x70,0x50, -0xB2,0x94,0x05,0x14,0xAE,0x49,0xC7,0x8D,0x41,0x07,0x12,0x73,0x94,0x7E,0x0C,0x23, -0x21,0xFD,0xBC,0x10,0x7F,0x60,0x10,0x5A,0x72,0xF5,0x98,0x0E,0xAC,0xEC,0xB9,0x7F, -0xDD,0x7A,0x6F,0x5D,0xD3,0x1C,0xF4,0xFF,0x88,0x05,0x69,0x42,0xA9,0x05,0x71,0xC8, -0xB7,0xAC,0x26,0xE8,0x2E,0xB4,0x8C,0x6A,0xFF,0x71,0xDC,0xB8,0xB1,0xDF,0x99,0xBC, -0x7C,0x21,0x54,0x2B,0xE4,0x58,0xA2,0xBB,0x57,0x29,0xAE,0x9E,0xA9,0xA3,0x19,0x26, -0x0F,0x99,0x2E,0x08,0xB0,0xEF,0xFD,0x69,0xCF,0x99,0x1A,0x09,0x8D,0xE3,0xA7,0x9F, -0x2B,0xC9,0x36,0x34,0x7B,0x24,0xB3,0x78,0x4C,0x95,0x17,0xA4,0x06,0x26,0x1E,0xB6, -0x64,0x52,0x36,0x5F,0x60,0x67,0xD9,0x9C,0xC5,0x05,0x74,0x0B,0xE7,0x67,0x23,0xD2, -0x08,0xFC,0x88,0xE9,0xAE,0x8B,0x7F,0xE1,0x30,0xF4,0x37,0x7E,0xFD,0xC6,0x32,0xDA, -0x2D,0x9E,0x44,0x30,0x30,0x6C,0xEE,0x07,0xDE,0xD2,0x34,0xFC,0xD2,0xFF,0x40,0xF6, -0x4B,0xF4,0x66,0x46,0x06,0x54,0xA6,0xF2,0x32,0x0A,0x63,0x26,0x30,0x6B,0x9B,0xD1, -0xDC,0x8B,0x47,0xBA,0xE1,0xB9,0xD5,0x62,0xD0,0xA2,0xA0,0xF4,0x67,0x05,0x78,0x29, -0x63,0x1A,0x6F,0x04,0xD6,0xF8,0xC6,0x4C,0xA3,0x9A,0xB1,0x37,0xB4,0x8D,0xE5,0x28, -0x4B,0x1D,0x9E,0x2C,0xC2,0xB8,0x68,0xBC,0xED,0x02,0xEE,0x31, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA */ -/* issuer :/C=US/O=SecureTrust Corporation/CN=SecureTrust CA */ -unsigned char XXX_certificate[956]={ -0x30,0x82,0x03,0xB8,0x30,0x82,0x02,0xA0,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x0C, -0xF0,0x8E,0x5C,0x08,0x16,0xA5,0xAD,0x42,0x7F,0xF0,0xEB,0x27,0x18,0x59,0xD0,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x48, -0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x20,0x30, -0x1E,0x06,0x03,0x55,0x04,0x0A,0x13,0x17,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72, -0x75,0x73,0x74,0x20,0x43,0x6F,0x72,0x70,0x6F,0x72,0x61,0x74,0x69,0x6F,0x6E,0x31, -0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x03,0x13,0x0E,0x53,0x65,0x63,0x75,0x72,0x65, -0x54,0x72,0x75,0x73,0x74,0x20,0x43,0x41,0x30,0x1E,0x17,0x0D,0x30,0x36,0x31,0x31, -0x30,0x37,0x31,0x39,0x33,0x31,0x31,0x38,0x5A,0x17,0x0D,0x32,0x39,0x31,0x32,0x33, -0x31,0x31,0x39,0x34,0x30,0x35,0x35,0x5A,0x30,0x48,0x31,0x0B,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x20,0x30,0x1E,0x06,0x03,0x55,0x04,0x0A, -0x13,0x17,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72,0x75,0x73,0x74,0x20,0x43,0x6F, -0x72,0x70,0x6F,0x72,0x61,0x74,0x69,0x6F,0x6E,0x31,0x17,0x30,0x15,0x06,0x03,0x55, -0x04,0x03,0x13,0x0E,0x53,0x65,0x63,0x75,0x72,0x65,0x54,0x72,0x75,0x73,0x74,0x20, -0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D, -0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82, -0x01,0x01,0x00,0xAB,0xA4,0x81,0xE5,0x95,0xCD,0xF5,0xF6,0x14,0x8E,0xC2,0x4F,0xCA, -0xD4,0xE2,0x78,0x95,0x58,0x9C,0x41,0xE1,0x0D,0x99,0x40,0x24,0x17,0x39,0x91,0x33, -0x66,0xE9,0xBE,0xE1,0x83,0xAF,0x62,0x5C,0x89,0xD1,0xFC,0x24,0x5B,0x61,0xB3,0xE0, -0x11,0x11,0x41,0x1C,0x1D,0x6E,0xF0,0xB8,0xBB,0xF8,0xDE,0xA7,0x81,0xBA,0xA6,0x48, -0xC6,0x9F,0x1D,0xBD,0xBE,0x8E,0xA9,0x41,0x3E,0xB8,0x94,0xED,0x29,0x1A,0xD4,0x8E, -0xD2,0x03,0x1D,0x03,0xEF,0x6D,0x0D,0x67,0x1C,0x57,0xD7,0x06,0xAD,0xCA,0xC8,0xF5, -0xFE,0x0E,0xAF,0x66,0x25,0x48,0x04,0x96,0x0B,0x5D,0xA3,0xBA,0x16,0xC3,0x08,0x4F, -0xD1,0x46,0xF8,0x14,0x5C,0xF2,0xC8,0x5E,0x01,0x99,0x6D,0xFD,0x88,0xCC,0x86,0xA8, -0xC1,0x6F,0x31,0x42,0x6C,0x52,0x3E,0x68,0xCB,0xF3,0x19,0x34,0xDF,0xBB,0x87,0x18, -0x56,0x80,0x26,0xC4,0xD0,0xDC,0xC0,0x6F,0xDF,0xDE,0xA0,0xC2,0x91,0x16,0xA0,0x64, -0x11,0x4B,0x44,0xBC,0x1E,0xF6,0xE7,0xFA,0x63,0xDE,0x66,0xAC,0x76,0xA4,0x71,0xA3, -0xEC,0x36,0x94,0x68,0x7A,0x77,0xA4,0xB1,0xE7,0x0E,0x2F,0x81,0x7A,0xE2,0xB5,0x72, -0x86,0xEF,0xA2,0x6B,0x8B,0xF0,0x0F,0xDB,0xD3,0x59,0x3F,0xBA,0x72,0xBC,0x44,0x24, -0x9C,0xE3,0x73,0xB3,0xF7,0xAF,0x57,0x2F,0x42,0x26,0x9D,0xA9,0x74,0xBA,0x00,0x52, -0xF2,0x4B,0xCD,0x53,0x7C,0x47,0x0B,0x36,0x85,0x0E,0x66,0xA9,0x08,0x97,0x16,0x34, -0x57,0xC1,0x66,0xF7,0x80,0xE3,0xED,0x70,0x54,0xC7,0x93,0xE0,0x2E,0x28,0x15,0x59, -0x87,0xBA,0xBB,0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0x9D,0x30,0x81,0x9A,0x30,0x13, -0x06,0x09,0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x04,0x06,0x1E,0x04,0x00, -0x43,0x00,0x41,0x30,0x0B,0x06,0x03,0x55,0x1D,0x0F,0x04,0x04,0x03,0x02,0x01,0x86, -0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01, -0xFF,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x42,0x32,0xB6,0x16, -0xFA,0x04,0xFD,0xFE,0x5D,0x4B,0x7A,0xC3,0xFD,0xF7,0x4C,0x40,0x1D,0x5A,0x43,0xAF, -0x30,0x34,0x06,0x03,0x55,0x1D,0x1F,0x04,0x2D,0x30,0x2B,0x30,0x29,0xA0,0x27,0xA0, -0x25,0x86,0x23,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x73,0x65, -0x63,0x75,0x72,0x65,0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x53,0x54, -0x43,0x41,0x2E,0x63,0x72,0x6C,0x30,0x10,0x06,0x09,0x2B,0x06,0x01,0x04,0x01,0x82, -0x37,0x15,0x01,0x04,0x03,0x02,0x01,0x00,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x30,0xED,0x4F,0x4A, -0xE1,0x58,0x3A,0x52,0x72,0x5B,0xB5,0xA6,0xA3,0x65,0x18,0xA6,0xBB,0x51,0x3B,0x77, -0xE9,0x9D,0xEA,0xD3,0x9F,0x5C,0xE0,0x45,0x65,0x7B,0x0D,0xCA,0x5B,0xE2,0x70,0x50, -0xB2,0x94,0x05,0x14,0xAE,0x49,0xC7,0x8D,0x41,0x07,0x12,0x73,0x94,0x7E,0x0C,0x23, -0x21,0xFD,0xBC,0x10,0x7F,0x60,0x10,0x5A,0x72,0xF5,0x98,0x0E,0xAC,0xEC,0xB9,0x7F, -0xDD,0x7A,0x6F,0x5D,0xD3,0x1C,0xF4,0xFF,0x88,0x05,0x69,0x42,0xA9,0x05,0x71,0xC8, -0xB7,0xAC,0x26,0xE8,0x2E,0xB4,0x8C,0x6A,0xFF,0x71,0xDC,0xB8,0xB1,0xDF,0x99,0xBC, -0x7C,0x21,0x54,0x2B,0xE4,0x58,0xA2,0xBB,0x57,0x29,0xAE,0x9E,0xA9,0xA3,0x19,0x26, -0x0F,0x99,0x2E,0x08,0xB0,0xEF,0xFD,0x69,0xCF,0x99,0x1A,0x09,0x8D,0xE3,0xA7,0x9F, -0x2B,0xC9,0x36,0x34,0x7B,0x24,0xB3,0x78,0x4C,0x95,0x17,0xA4,0x06,0x26,0x1E,0xB6, -0x64,0x52,0x36,0x5F,0x60,0x67,0xD9,0x9C,0xC5,0x05,0x74,0x0B,0xE7,0x67,0x23,0xD2, -0x08,0xFC,0x88,0xE9,0xAE,0x8B,0x7F,0xE1,0x30,0xF4,0x37,0x7E,0xFD,0xC6,0x32,0xDA, -0x2D,0x9E,0x44,0x30,0x30,0x6C,0xEE,0x07,0xDE,0xD2,0x34,0xFC,0xD2,0xFF,0x40,0xF6, -0x4B,0xF4,0x66,0x46,0x06,0x54,0xA6,0xF2,0x32,0x0A,0x63,0x26,0x30,0x6B,0x9B,0xD1, -0xDC,0x8B,0x47,0xBA,0xE1,0xB9,0xD5,0x62,0xD0,0xA2,0xA0,0xF4,0x67,0x05,0x78,0x29, -0x63,0x1A,0x6F,0x04,0xD6,0xF8,0xC6,0x4C,0xA3,0x9A,0xB1,0x37,0xB4,0x8D,0xE5,0x28, -0x4B,0x1D,0x9E,0x2C,0xC2,0xB8,0x68,0xBC,0xED,0x02,0xEE,0x31, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network */ -/* issuer :/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network */ -unsigned char XXX_certificate[774]={ -0x30,0x82,0x03,0x02,0x30,0x82,0x02,0x6B,0x02,0x10,0x7D,0xD9,0xFE,0x07,0xCF,0xA8, -0x1E,0xB7,0x10,0x79,0x67,0xFB,0xA7,0x89,0x34,0xC6,0x30,0x0D,0x06,0x09,0x2A,0x86, -0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x81,0xC1,0x31,0x0B,0x30,0x09, -0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55, -0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x31,0x3C,0x30,0x3A,0x06,0x03,0x55,0x04,0x0B,0x13,0x33,0x43,0x6C,0x61, -0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D, -0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F, -0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x20,0x2D,0x20,0x47,0x32, -0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31,0x28,0x63,0x29,0x20,0x31, -0x39,0x39,0x38,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74,0x68,0x6F,0x72,0x69, -0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79,0x31,0x1F,0x30,0x1D, -0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x20, -0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65,0x74,0x77,0x6F,0x72,0x6B,0x30,0x1E,0x17, -0x0D,0x39,0x38,0x30,0x35,0x31,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D, -0x32,0x38,0x30,0x38,0x30,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0xC1, -0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30, -0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E, -0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x3C,0x30,0x3A,0x06,0x03,0x55,0x04,0x0B,0x13, -0x33,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x20, -0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63, -0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x20, -0x2D,0x20,0x47,0x32,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31,0x28, -0x63,0x29,0x20,0x31,0x39,0x39,0x38,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E, -0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74, -0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79, -0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56,0x65,0x72,0x69,0x53, -0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65,0x74,0x77,0x6F,0x72, -0x6B,0x30,0x81,0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, -0x01,0x05,0x00,0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xCC,0x5E, -0xD1,0x11,0x5D,0x5C,0x69,0xD0,0xAB,0xD3,0xB9,0x6A,0x4C,0x99,0x1F,0x59,0x98,0x30, -0x8E,0x16,0x85,0x20,0x46,0x6D,0x47,0x3F,0xD4,0x85,0x20,0x84,0xE1,0x6D,0xB3,0xF8, -0xA4,0xED,0x0C,0xF1,0x17,0x0F,0x3B,0xF9,0xA7,0xF9,0x25,0xD7,0xC1,0xCF,0x84,0x63, -0xF2,0x7C,0x63,0xCF,0xA2,0x47,0xF2,0xC6,0x5B,0x33,0x8E,0x64,0x40,0x04,0x68,0xC1, -0x80,0xB9,0x64,0x1C,0x45,0x77,0xC7,0xD8,0x6E,0xF5,0x95,0x29,0x3C,0x50,0xE8,0x34, -0xD7,0x78,0x1F,0xA8,0xBA,0x6D,0x43,0x91,0x95,0x8F,0x45,0x57,0x5E,0x7E,0xC5,0xFB, -0xCA,0xA4,0x04,0xEB,0xEA,0x97,0x37,0x54,0x30,0x6F,0xBB,0x01,0x47,0x32,0x33,0xCD, -0xDC,0x57,0x9B,0x64,0x69,0x61,0xF8,0x9B,0x1D,0x1C,0x89,0x4F,0x5C,0x67,0x02,0x03, -0x01,0x00,0x01,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05, -0x05,0x00,0x03,0x81,0x81,0x00,0x51,0x4D,0xCD,0xBE,0x5C,0xCB,0x98,0x19,0x9C,0x15, -0xB2,0x01,0x39,0x78,0x2E,0x4D,0x0F,0x67,0x70,0x70,0x99,0xC6,0x10,0x5A,0x94,0xA4, -0x53,0x4D,0x54,0x6D,0x2B,0xAF,0x0D,0x5D,0x40,0x8B,0x64,0xD3,0xD7,0xEE,0xDE,0x56, -0x61,0x92,0x5F,0xA6,0xC4,0x1D,0x10,0x61,0x36,0xD3,0x2C,0x27,0x3C,0xE8,0x29,0x09, -0xB9,0x11,0x64,0x74,0xCC,0xB5,0x73,0x9F,0x1C,0x48,0xA9,0xBC,0x61,0x01,0xEE,0xE2, -0x17,0xA6,0x0C,0xE3,0x40,0x08,0x3B,0x0E,0xE7,0xEB,0x44,0x73,0x2A,0x9A,0xF1,0x69, -0x92,0xEF,0x71,0x14,0xC3,0x39,0xAC,0x71,0xA7,0x91,0x09,0x6F,0xE4,0x71,0x06,0xB3, -0xBA,0x59,0x57,0x26,0x79,0x00,0xF6,0xF8,0x0D,0xA2,0x33,0x30,0x28,0xD4,0xAA,0x58, -0xA0,0x9D,0x9D,0x69,0x91,0xFD, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G3 */ -/* issuer :/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G3 */ -unsigned char XXX_certificate[1054]={ -0x30,0x82,0x04,0x1A,0x30,0x82,0x03,0x02,0x02,0x11,0x00,0x9B,0x7E,0x06,0x49,0xA3, -0x3E,0x62,0xB9,0xD5,0xEE,0x90,0x48,0x71,0x29,0xEF,0x57,0x30,0x0D,0x06,0x09,0x2A, -0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x81,0xCA,0x31,0x0B,0x30, -0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03, -0x55,0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49, -0x6E,0x63,0x2E,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56,0x65, -0x72,0x69,0x53,0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65,0x74, -0x77,0x6F,0x72,0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31,0x28, -0x63,0x29,0x20,0x31,0x39,0x39,0x39,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E, -0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74, -0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79, -0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56,0x65,0x72,0x69,0x53, -0x69,0x67,0x6E,0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C, -0x69,0x63,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69, -0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69, -0x74,0x79,0x20,0x2D,0x20,0x47,0x33,0x30,0x1E,0x17,0x0D,0x39,0x39,0x31,0x30,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x33,0x36,0x30,0x37,0x31,0x36, -0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0xCA,0x31,0x0B,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0A, -0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E,0x63,0x2E, -0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56,0x65,0x72,0x69,0x53, -0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65,0x74,0x77,0x6F,0x72, -0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31,0x28,0x63,0x29,0x20, -0x31,0x39,0x39,0x39,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49, -0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74,0x68,0x6F,0x72, -0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79,0x31,0x45,0x30, -0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E, -0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x20, -0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63, -0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x20, -0x2D,0x20,0x47,0x33,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A, -0x02,0x82,0x01,0x01,0x00,0xCB,0xBA,0x9C,0x52,0xFC,0x78,0x1F,0x1A,0x1E,0x6F,0x1B, -0x37,0x73,0xBD,0xF8,0xC9,0x6B,0x94,0x12,0x30,0x4F,0xF0,0x36,0x47,0xF5,0xD0,0x91, -0x0A,0xF5,0x17,0xC8,0xA5,0x61,0xC1,0x16,0x40,0x4D,0xFB,0x8A,0x61,0x90,0xE5,0x76, -0x20,0xC1,0x11,0x06,0x7D,0xAB,0x2C,0x6E,0xA6,0xF5,0x11,0x41,0x8E,0xFA,0x2D,0xAD, -0x2A,0x61,0x59,0xA4,0x67,0x26,0x4C,0xD0,0xE8,0xBC,0x52,0x5B,0x70,0x20,0x04,0x58, -0xD1,0x7A,0xC9,0xA4,0x69,0xBC,0x83,0x17,0x64,0xAD,0x05,0x8B,0xBC,0xD0,0x58,0xCE, -0x8D,0x8C,0xF5,0xEB,0xF0,0x42,0x49,0x0B,0x9D,0x97,0x27,0x67,0x32,0x6E,0xE1,0xAE, -0x93,0x15,0x1C,0x70,0xBC,0x20,0x4D,0x2F,0x18,0xDE,0x92,0x88,0xE8,0x6C,0x85,0x57, -0x11,0x1A,0xE9,0x7E,0xE3,0x26,0x11,0x54,0xA2,0x45,0x96,0x55,0x83,0xCA,0x30,0x89, -0xE8,0xDC,0xD8,0xA3,0xED,0x2A,0x80,0x3F,0x7F,0x79,0x65,0x57,0x3E,0x15,0x20,0x66, -0x08,0x2F,0x95,0x93,0xBF,0xAA,0x47,0x2F,0xA8,0x46,0x97,0xF0,0x12,0xE2,0xFE,0xC2, -0x0A,0x2B,0x51,0xE6,0x76,0xE6,0xB7,0x46,0xB7,0xE2,0x0D,0xA6,0xCC,0xA8,0xC3,0x4C, -0x59,0x55,0x89,0xE6,0xE8,0x53,0x5C,0x1C,0xEA,0x9D,0xF0,0x62,0x16,0x0B,0xA7,0xC9, -0x5F,0x0C,0xF0,0xDE,0xC2,0x76,0xCE,0xAF,0xF7,0x6A,0xF2,0xFA,0x41,0xA6,0xA2,0x33, -0x14,0xC9,0xE5,0x7A,0x63,0xD3,0x9E,0x62,0x37,0xD5,0x85,0x65,0x9E,0x0E,0xE6,0x53, -0x24,0x74,0x1B,0x5E,0x1D,0x12,0x53,0x5B,0xC7,0x2C,0xE7,0x83,0x49,0x3B,0x15,0xAE, -0x8A,0x68,0xB9,0x57,0x97,0x02,0x03,0x01,0x00,0x01,0x30,0x0D,0x06,0x09,0x2A,0x86, -0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x11,0x14, -0x96,0xC1,0xAB,0x92,0x08,0xF7,0x3F,0x2F,0xC9,0xB2,0xFE,0xE4,0x5A,0x9F,0x64,0xDE, -0xDB,0x21,0x4F,0x86,0x99,0x34,0x76,0x36,0x57,0xDD,0xD0,0x15,0x2F,0xC5,0xAD,0x7F, -0x15,0x1F,0x37,0x62,0x73,0x3E,0xD4,0xE7,0x5F,0xCE,0x17,0x03,0xDB,0x35,0xFA,0x2B, -0xDB,0xAE,0x60,0x09,0x5F,0x1E,0x5F,0x8F,0x6E,0xBB,0x0B,0x3D,0xEA,0x5A,0x13,0x1E, -0x0C,0x60,0x6F,0xB5,0xC0,0xB5,0x23,0x22,0x2E,0x07,0x0B,0xCB,0xA9,0x74,0xCB,0x47, -0xBB,0x1D,0xC1,0xD7,0xA5,0x6B,0xCC,0x2F,0xD2,0x42,0xFD,0x49,0xDD,0xA7,0x89,0xCF, -0x53,0xBA,0xDA,0x00,0x5A,0x28,0xBF,0x82,0xDF,0xF8,0xBA,0x13,0x1D,0x50,0x86,0x82, -0xFD,0x8E,0x30,0x8F,0x29,0x46,0xB0,0x1E,0x3D,0x35,0xDA,0x38,0x62,0x16,0x18,0x4A, -0xAD,0xE6,0xB6,0x51,0x6C,0xDE,0xAF,0x62,0xEB,0x01,0xD0,0x1E,0x24,0xFE,0x7A,0x8F, -0x12,0x1A,0x12,0x68,0xB8,0xFB,0x66,0x99,0x14,0x14,0x45,0x5C,0xAE,0xE7,0xAE,0x69, -0x17,0x81,0x2B,0x5A,0x37,0xC9,0x5E,0x2A,0xF4,0xC6,0xE2,0xA1,0x5C,0x54,0x9B,0xA6, -0x54,0x00,0xCF,0xF0,0xF1,0xC1,0xC7,0x98,0x30,0x1A,0x3B,0x36,0x16,0xDB,0xA3,0x6E, -0xEA,0xFD,0xAD,0xB2,0xC2,0xDA,0xEF,0x02,0x47,0x13,0x8A,0xC0,0xF1,0xB3,0x31,0xAD, -0x4F,0x1C,0xE1,0x4F,0x9C,0xAF,0x0F,0x0C,0x9D,0xF7,0x78,0x0D,0xD8,0xF4,0x35,0x56, -0x80,0xDA,0xB7,0x6D,0x17,0x8F,0x9D,0x1E,0x81,0x64,0xE1,0xFE,0xC5,0x45,0xBA,0xAD, -0x6B,0xB9,0x0A,0x7A,0x4E,0x4F,0x4B,0x84,0xEE,0x4B,0xF1,0x7D,0xDD,0x11, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2007 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G4 */ -/* issuer :/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2007 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G4 */ -unsigned char XXX_certificate[904]={ -0x30,0x82,0x03,0x84,0x30,0x82,0x03,0x0A,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x2F, -0x80,0xFE,0x23,0x8C,0x0E,0x22,0x0F,0x48,0x67,0x12,0x28,0x91,0x87,0xAC,0xB3,0x30, -0x0A,0x06,0x08,0x2A,0x86,0x48,0xCE,0x3D,0x04,0x03,0x03,0x30,0x81,0xCA,0x31,0x0B, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06, -0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20, -0x49,0x6E,0x63,0x2E,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56, -0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65, -0x74,0x77,0x6F,0x72,0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31, -0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x37,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6E,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75, -0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C, -0x79,0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56,0x65,0x72,0x69, -0x53,0x69,0x67,0x6E,0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62, -0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72, -0x69,0x74,0x79,0x20,0x2D,0x20,0x47,0x34,0x30,0x1E,0x17,0x0D,0x30,0x37,0x31,0x31, -0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x33,0x38,0x30,0x31,0x31, -0x38,0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0xCA,0x31,0x0B,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04, -0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E,0x63, -0x2E,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56,0x65,0x72,0x69, -0x53,0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65,0x74,0x77,0x6F, -0x72,0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31,0x28,0x63,0x29, -0x20,0x32,0x30,0x30,0x37,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20, -0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74,0x68,0x6F, -0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79,0x31,0x45, -0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6E,0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63, -0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69, -0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79, -0x20,0x2D,0x20,0x47,0x34,0x30,0x76,0x30,0x10,0x06,0x07,0x2A,0x86,0x48,0xCE,0x3D, -0x02,0x01,0x06,0x05,0x2B,0x81,0x04,0x00,0x22,0x03,0x62,0x00,0x04,0xA7,0x56,0x7A, -0x7C,0x52,0xDA,0x64,0x9B,0x0E,0x2D,0x5C,0xD8,0x5E,0xAC,0x92,0x3D,0xFE,0x01,0xE6, -0x19,0x4A,0x3D,0x14,0x03,0x4B,0xFA,0x60,0x27,0x20,0xD9,0x83,0x89,0x69,0xFA,0x54, -0xC6,0x9A,0x18,0x5E,0x55,0x2A,0x64,0xDE,0x06,0xF6,0x8D,0x4A,0x3B,0xAD,0x10,0x3C, -0x65,0x3D,0x90,0x88,0x04,0x89,0xE0,0x30,0x61,0xB3,0xAE,0x5D,0x01,0xA7,0x7B,0xDE, -0x7C,0xB2,0xBE,0xCA,0x65,0x61,0x00,0x86,0xAE,0xDA,0x8F,0x7B,0xD0,0x89,0xAD,0x4D, -0x1D,0x59,0x9A,0x41,0xB1,0xBC,0x47,0x80,0xDC,0x9E,0x62,0xC3,0xF9,0xA3,0x81,0xB2, -0x30,0x81,0xAF,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30, -0x03,0x01,0x01,0xFF,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04, -0x03,0x02,0x01,0x06,0x30,0x6D,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0C, -0x04,0x61,0x30,0x5F,0xA1,0x5D,0xA0,0x5B,0x30,0x59,0x30,0x57,0x30,0x55,0x16,0x09, -0x69,0x6D,0x61,0x67,0x65,0x2F,0x67,0x69,0x66,0x30,0x21,0x30,0x1F,0x30,0x07,0x06, -0x05,0x2B,0x0E,0x03,0x02,0x1A,0x04,0x14,0x8F,0xE5,0xD3,0x1A,0x86,0xAC,0x8D,0x8E, -0x6B,0xC3,0xCF,0x80,0x6A,0xD4,0x48,0x18,0x2C,0x7B,0x19,0x2E,0x30,0x25,0x16,0x23, -0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x6C,0x6F,0x67,0x6F,0x2E,0x76,0x65,0x72,0x69, -0x73,0x69,0x67,0x6E,0x2E,0x63,0x6F,0x6D,0x2F,0x76,0x73,0x6C,0x6F,0x67,0x6F,0x2E, -0x67,0x69,0x66,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xB3,0x16, -0x91,0xFD,0xEE,0xA6,0x6E,0xE4,0xB5,0x2E,0x49,0x8F,0x87,0x78,0x81,0x80,0xEC,0xE5, -0xB1,0xB5,0x30,0x0A,0x06,0x08,0x2A,0x86,0x48,0xCE,0x3D,0x04,0x03,0x03,0x03,0x68, -0x00,0x30,0x65,0x02,0x30,0x66,0x21,0x0C,0x18,0x26,0x60,0x5A,0x38,0x7B,0x56,0x42, -0xE0,0xA7,0xFC,0x36,0x84,0x51,0x91,0x20,0x2C,0x76,0x4D,0x43,0x3D,0xC4,0x1D,0x84, -0x23,0xD0,0xAC,0xD6,0x7C,0x35,0x06,0xCE,0xCD,0x69,0xBD,0x90,0x0D,0xDB,0x6C,0x48, -0x42,0x1D,0x0E,0xAA,0x42,0x02,0x31,0x00,0x9C,0x3D,0x48,0x39,0x23,0x39,0x58,0x1A, -0x15,0x12,0x59,0x6A,0x9E,0xEF,0xD5,0x59,0xB2,0x1D,0x52,0x2C,0x99,0x71,0xCD,0xC7, -0x29,0xDF,0x1B,0x2A,0x61,0x7B,0x71,0xD1,0xDE,0xF3,0xC0,0xE5,0x0D,0x3A,0x4A,0xAA, -0x2D,0xA7,0xD8,0x86,0x2A,0xDD,0x2E,0x10, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 */ -/* issuer :/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 */ -unsigned char XXX_certificate[1239]={ -0x30,0x82,0x04,0xD3,0x30,0x82,0x03,0xBB,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x18, -0xDA,0xD1,0x9E,0x26,0x7D,0xE8,0xBB,0x4A,0x21,0x58,0xCD,0xCC,0x6B,0x3B,0x4A,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x81, -0xCA,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, -0x30,0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6E,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B, -0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74, -0x20,0x4E,0x65,0x74,0x77,0x6F,0x72,0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04, -0x0B,0x13,0x31,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x56,0x65,0x72,0x69, -0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72, -0x20,0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20, -0x6F,0x6E,0x6C,0x79,0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56, -0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20, -0x50,0x75,0x62,0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43, -0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74, -0x68,0x6F,0x72,0x69,0x74,0x79,0x20,0x2D,0x20,0x47,0x35,0x30,0x1E,0x17,0x0D,0x30, -0x36,0x31,0x31,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x33,0x36, -0x30,0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0xCA,0x31,0x0B, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06, -0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20, -0x49,0x6E,0x63,0x2E,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x0B,0x13,0x16,0x56, -0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4E,0x65, -0x74,0x77,0x6F,0x72,0x6B,0x31,0x3A,0x30,0x38,0x06,0x03,0x55,0x04,0x0B,0x13,0x31, -0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6E,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75, -0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C, -0x79,0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3C,0x56,0x65,0x72,0x69, -0x53,0x69,0x67,0x6E,0x20,0x43,0x6C,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62, -0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72, -0x69,0x74,0x79,0x20,0x2D,0x20,0x47,0x35,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09, -0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00, -0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xAF,0x24,0x08,0x08,0x29,0x7A,0x35, -0x9E,0x60,0x0C,0xAA,0xE7,0x4B,0x3B,0x4E,0xDC,0x7C,0xBC,0x3C,0x45,0x1C,0xBB,0x2B, -0xE0,0xFE,0x29,0x02,0xF9,0x57,0x08,0xA3,0x64,0x85,0x15,0x27,0xF5,0xF1,0xAD,0xC8, -0x31,0x89,0x5D,0x22,0xE8,0x2A,0xAA,0xA6,0x42,0xB3,0x8F,0xF8,0xB9,0x55,0xB7,0xB1, -0xB7,0x4B,0xB3,0xFE,0x8F,0x7E,0x07,0x57,0xEC,0xEF,0x43,0xDB,0x66,0x62,0x15,0x61, -0xCF,0x60,0x0D,0xA4,0xD8,0xDE,0xF8,0xE0,0xC3,0x62,0x08,0x3D,0x54,0x13,0xEB,0x49, -0xCA,0x59,0x54,0x85,0x26,0xE5,0x2B,0x8F,0x1B,0x9F,0xEB,0xF5,0xA1,0x91,0xC2,0x33, -0x49,0xD8,0x43,0x63,0x6A,0x52,0x4B,0xD2,0x8F,0xE8,0x70,0x51,0x4D,0xD1,0x89,0x69, -0x7B,0xC7,0x70,0xF6,0xB3,0xDC,0x12,0x74,0xDB,0x7B,0x5D,0x4B,0x56,0xD3,0x96,0xBF, -0x15,0x77,0xA1,0xB0,0xF4,0xA2,0x25,0xF2,0xAF,0x1C,0x92,0x67,0x18,0xE5,0xF4,0x06, -0x04,0xEF,0x90,0xB9,0xE4,0x00,0xE4,0xDD,0x3A,0xB5,0x19,0xFF,0x02,0xBA,0xF4,0x3C, -0xEE,0xE0,0x8B,0xEB,0x37,0x8B,0xEC,0xF4,0xD7,0xAC,0xF2,0xF6,0xF0,0x3D,0xAF,0xDD, -0x75,0x91,0x33,0x19,0x1D,0x1C,0x40,0xCB,0x74,0x24,0x19,0x21,0x93,0xD9,0x14,0xFE, -0xAC,0x2A,0x52,0xC7,0x8F,0xD5,0x04,0x49,0xE4,0x8D,0x63,0x47,0x88,0x3C,0x69,0x83, -0xCB,0xFE,0x47,0xBD,0x2B,0x7E,0x4F,0xC5,0x95,0xAE,0x0E,0x9D,0xD4,0xD1,0x43,0xC0, -0x67,0x73,0xE3,0x14,0x08,0x7E,0xE5,0x3F,0x9F,0x73,0xB8,0x33,0x0A,0xCF,0x5D,0x3F, -0x34,0x87,0x96,0x8A,0xEE,0x53,0xE8,0x25,0x15,0x02,0x03,0x01,0x00,0x01,0xA3,0x81, -0xB2,0x30,0x81,0xAF,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05, -0x30,0x03,0x01,0x01,0xFF,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04, -0x04,0x03,0x02,0x01,0x06,0x30,0x6D,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x01, -0x0C,0x04,0x61,0x30,0x5F,0xA1,0x5D,0xA0,0x5B,0x30,0x59,0x30,0x57,0x30,0x55,0x16, -0x09,0x69,0x6D,0x61,0x67,0x65,0x2F,0x67,0x69,0x66,0x30,0x21,0x30,0x1F,0x30,0x07, -0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x04,0x14,0x8F,0xE5,0xD3,0x1A,0x86,0xAC,0x8D, -0x8E,0x6B,0xC3,0xCF,0x80,0x6A,0xD4,0x48,0x18,0x2C,0x7B,0x19,0x2E,0x30,0x25,0x16, -0x23,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x6C,0x6F,0x67,0x6F,0x2E,0x76,0x65,0x72, -0x69,0x73,0x69,0x67,0x6E,0x2E,0x63,0x6F,0x6D,0x2F,0x76,0x73,0x6C,0x6F,0x67,0x6F, -0x2E,0x67,0x69,0x66,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x7F, -0xD3,0x65,0xA7,0xC2,0xDD,0xEC,0xBB,0xF0,0x30,0x09,0xF3,0x43,0x39,0xFA,0x02,0xAF, -0x33,0x31,0x33,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05, -0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x93,0x24,0x4A,0x30,0x5F,0x62,0xCF,0xD8,0x1A, -0x98,0x2F,0x3D,0xEA,0xDC,0x99,0x2D,0xBD,0x77,0xF6,0xA5,0x79,0x22,0x38,0xEC,0xC4, -0xA7,0xA0,0x78,0x12,0xAD,0x62,0x0E,0x45,0x70,0x64,0xC5,0xE7,0x97,0x66,0x2D,0x98, -0x09,0x7E,0x5F,0xAF,0xD6,0xCC,0x28,0x65,0xF2,0x01,0xAA,0x08,0x1A,0x47,0xDE,0xF9, -0xF9,0x7C,0x92,0x5A,0x08,0x69,0x20,0x0D,0xD9,0x3E,0x6D,0x6E,0x3C,0x0D,0x6E,0xD8, -0xE6,0x06,0x91,0x40,0x18,0xB9,0xF8,0xC1,0xED,0xDF,0xDB,0x41,0xAA,0xE0,0x96,0x20, -0xC9,0xCD,0x64,0x15,0x38,0x81,0xC9,0x94,0xEE,0xA2,0x84,0x29,0x0B,0x13,0x6F,0x8E, -0xDB,0x0C,0xDD,0x25,0x02,0xDB,0xA4,0x8B,0x19,0x44,0xD2,0x41,0x7A,0x05,0x69,0x4A, -0x58,0x4F,0x60,0xCA,0x7E,0x82,0x6A,0x0B,0x02,0xAA,0x25,0x17,0x39,0xB5,0xDB,0x7F, -0xE7,0x84,0x65,0x2A,0x95,0x8A,0xBD,0x86,0xDE,0x5E,0x81,0x16,0x83,0x2D,0x10,0xCC, -0xDE,0xFD,0xA8,0x82,0x2A,0x6D,0x28,0x1F,0x0D,0x0B,0xC4,0xE5,0xE7,0x1A,0x26,0x19, -0xE1,0xF4,0x11,0x6F,0x10,0xB5,0x95,0xFC,0xE7,0x42,0x05,0x32,0xDB,0xCE,0x9D,0x51, -0x5E,0x28,0xB6,0x9E,0x85,0xD3,0x5B,0xEF,0xA5,0x7D,0x45,0x40,0x72,0x8E,0xB7,0x0E, -0x6B,0x0E,0x06,0xFB,0x33,0x35,0x48,0x71,0xB8,0x9D,0x27,0x8B,0xC4,0x65,0x5F,0x0D, -0x86,0x76,0x9C,0x44,0x7A,0xF6,0x95,0x5C,0xF6,0x5D,0x32,0x08,0x33,0xA4,0x54,0xB6, -0x18,0x3F,0x68,0x5C,0xF2,0x42,0x4A,0x85,0x38,0x54,0x83,0x5F,0xD1,0xE8,0x2C,0xF2, -0xAC,0x11,0xD6,0xA8,0xED,0x63,0x6A, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority */ -/* issuer :/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority */ -unsigned char XXX_certificate[576]={ -0x30,0x82,0x02,0x3C,0x30,0x82,0x01,0xA5,0x02,0x10,0x3C,0x91,0x31,0xCB,0x1F,0xF6, -0xD0,0x1B,0x0E,0x9A,0xB8,0xD0,0x44,0xBF,0x12,0xBE,0x30,0x0D,0x06,0x09,0x2A,0x86, -0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x5F,0x31,0x0B,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04, -0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E,0x63, -0x2E,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04,0x0B,0x13,0x2E,0x43,0x6C,0x61,0x73, -0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D,0x61, -0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E, -0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,0x0D,0x39,0x36, -0x30,0x31,0x32,0x39,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x32,0x38,0x30, -0x38,0x30,0x32,0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x5F,0x31,0x0B,0x30,0x09, -0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55, -0x04,0x0A,0x13,0x0E,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6E,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04,0x0B,0x13,0x2E,0x43,0x6C,0x61, -0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x20,0x50,0x72,0x69,0x6D, -0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F, -0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x81,0x9F,0x30,0x0D, -0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8D, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xC9,0x5C,0x59,0x9E,0xF2,0x1B,0x8A,0x01, -0x14,0xB4,0x10,0xDF,0x04,0x40,0xDB,0xE3,0x57,0xAF,0x6A,0x45,0x40,0x8F,0x84,0x0C, -0x0B,0xD1,0x33,0xD9,0xD9,0x11,0xCF,0xEE,0x02,0x58,0x1F,0x25,0xF7,0x2A,0xA8,0x44, -0x05,0xAA,0xEC,0x03,0x1F,0x78,0x7F,0x9E,0x93,0xB9,0x9A,0x00,0xAA,0x23,0x7D,0xD6, -0xAC,0x85,0xA2,0x63,0x45,0xC7,0x72,0x27,0xCC,0xF4,0x4C,0xC6,0x75,0x71,0xD2,0x39, -0xEF,0x4F,0x42,0xF0,0x75,0xDF,0x0A,0x90,0xC6,0x8E,0x20,0x6F,0x98,0x0F,0xF8,0xAC, -0x23,0x5F,0x70,0x29,0x36,0xA4,0xC9,0x86,0xE7,0xB1,0x9A,0x20,0xCB,0x53,0xA5,0x85, -0xE7,0x3D,0xBE,0x7D,0x9A,0xFE,0x24,0x45,0x33,0xDC,0x76,0x15,0xED,0x0F,0xA2,0x71, -0x64,0x4C,0x65,0x2E,0x81,0x68,0x45,0xA7,0x02,0x03,0x01,0x00,0x01,0x30,0x0D,0x06, -0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00, -0x10,0x72,0x52,0xA9,0x05,0x14,0x19,0x32,0x08,0x41,0xF0,0xC5,0x6B,0x0A,0xCC,0x7E, -0x0F,0x21,0x19,0xCD,0xE4,0x67,0xDC,0x5F,0xA9,0x1B,0xE6,0xCA,0xE8,0x73,0x9D,0x22, -0xD8,0x98,0x6E,0x73,0x03,0x61,0x91,0xC5,0x7C,0xB0,0x45,0x40,0x6E,0x44,0x9D,0x8D, -0xB0,0xB1,0x96,0x74,0x61,0x2D,0x0D,0xA9,0x45,0xD2,0xA4,0x92,0x2A,0xD6,0x9A,0x75, -0x97,0x6E,0x3F,0x53,0xFD,0x45,0x99,0x60,0x1D,0xA8,0x2B,0x4C,0xF9,0x5E,0xA7,0x09, -0xD8,0x75,0x30,0xD7,0xD2,0x65,0x60,0x3D,0x67,0xD6,0x48,0x55,0x75,0x69,0x3F,0x91, -0xF5,0x48,0x0B,0x47,0x69,0x22,0x69,0x82,0x96,0xBE,0xC9,0xC8,0x38,0x86,0x4A,0x7A, -0x2C,0x73,0x19,0x48,0x69,0x4E,0x6B,0x7C,0x65,0xBF,0x0F,0xFC,0x70,0xCE,0x88,0x90, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=thawte, Inc./OU=(c) 2007 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA - G2 */ -/* issuer :/C=US/O=thawte, Inc./OU=(c) 2007 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA - G2 */ -unsigned char XXX_certificate[652]={ -0x30,0x82,0x02,0x88,0x30,0x82,0x02,0x0D,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x35, -0xFC,0x26,0x5C,0xD9,0x84,0x4F,0xC9,0x3D,0x26,0x3D,0x57,0x9B,0xAE,0xD7,0x56,0x30, -0x0A,0x06,0x08,0x2A,0x86,0x48,0xCE,0x3D,0x04,0x03,0x03,0x30,0x81,0x84,0x31,0x0B, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06, -0x03,0x55,0x04,0x0A,0x13,0x0C,0x74,0x68,0x61,0x77,0x74,0x65,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x0B,0x13,0x2F,0x28,0x63,0x29, -0x20,0x32,0x30,0x30,0x37,0x20,0x74,0x68,0x61,0x77,0x74,0x65,0x2C,0x20,0x49,0x6E, -0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74,0x68,0x6F,0x72,0x69, -0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79,0x31,0x24,0x30,0x22, -0x06,0x03,0x55,0x04,0x03,0x13,0x1B,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72, -0x69,0x6D,0x61,0x72,0x79,0x20,0x52,0x6F,0x6F,0x74,0x20,0x43,0x41,0x20,0x2D,0x20, -0x47,0x32,0x30,0x1E,0x17,0x0D,0x30,0x37,0x31,0x31,0x30,0x35,0x30,0x30,0x30,0x30, -0x30,0x30,0x5A,0x17,0x0D,0x33,0x38,0x30,0x31,0x31,0x38,0x32,0x33,0x35,0x39,0x35, -0x39,0x5A,0x30,0x81,0x84,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0A,0x13,0x0C,0x74,0x68,0x61, -0x77,0x74,0x65,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x38,0x30,0x36,0x06,0x03,0x55, -0x04,0x0B,0x13,0x2F,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x37,0x20,0x74,0x68,0x61, -0x77,0x74,0x65,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F,0x72,0x20, -0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6F, -0x6E,0x6C,0x79,0x31,0x24,0x30,0x22,0x06,0x03,0x55,0x04,0x03,0x13,0x1B,0x74,0x68, -0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x52,0x6F,0x6F, -0x74,0x20,0x43,0x41,0x20,0x2D,0x20,0x47,0x32,0x30,0x76,0x30,0x10,0x06,0x07,0x2A, -0x86,0x48,0xCE,0x3D,0x02,0x01,0x06,0x05,0x2B,0x81,0x04,0x00,0x22,0x03,0x62,0x00, -0x04,0xA2,0xD5,0x9C,0x82,0x7B,0x95,0x9D,0xF1,0x52,0x78,0x87,0xFE,0x8A,0x16,0xBF, -0x05,0xE6,0xDF,0xA3,0x02,0x4F,0x0D,0x07,0xC6,0x00,0x51,0xBA,0x0C,0x02,0x52,0x2D, -0x22,0xA4,0x42,0x39,0xC4,0xFE,0x8F,0xEA,0xC9,0xC1,0xBE,0xD4,0x4D,0xFF,0x9F,0x7A, -0x9E,0xE2,0xB1,0x7C,0x9A,0xAD,0xA7,0x86,0x09,0x73,0x87,0xD1,0xE7,0x9A,0xE3,0x7A, -0xA5,0xAA,0x6E,0xFB,0xBA,0xB3,0x70,0xC0,0x67,0x88,0xA2,0x35,0xD4,0xA3,0x9A,0xB1, -0xFD,0xAD,0xC2,0xEF,0x31,0xFA,0xA8,0xB9,0xF3,0xFB,0x08,0xC6,0x91,0xD1,0xFB,0x29, -0x95,0xA3,0x42,0x30,0x40,0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04, -0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF, -0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04, -0x14,0x9A,0xD8,0x00,0x30,0x00,0xE7,0x6B,0x7F,0x85,0x18,0xEE,0x8B,0xB6,0xCE,0x8A, -0x0C,0xF8,0x11,0xE1,0xBB,0x30,0x0A,0x06,0x08,0x2A,0x86,0x48,0xCE,0x3D,0x04,0x03, -0x03,0x03,0x69,0x00,0x30,0x66,0x02,0x31,0x00,0xDD,0xF8,0xE0,0x57,0x47,0x5B,0xA7, -0xE6,0x0A,0xC3,0xBD,0xF5,0x80,0x8A,0x97,0x35,0x0D,0x1B,0x89,0x3C,0x54,0x86,0x77, -0x28,0xCA,0xA1,0xF4,0x79,0xDE,0xB5,0xE6,0x38,0xB0,0xF0,0x65,0x70,0x8C,0x7F,0x02, -0x54,0xC2,0xBF,0xFF,0xD8,0xA1,0x3E,0xD9,0xCF,0x02,0x31,0x00,0xC4,0x8D,0x94,0xFC, -0xDC,0x53,0xD2,0xDC,0x9D,0x78,0x16,0x1F,0x15,0x33,0x23,0x53,0x52,0xE3,0x5A,0x31, -0x5D,0x9D,0xCA,0xAE,0xBD,0x13,0x29,0x44,0x0D,0x27,0x5B,0xA8,0xE7,0x68,0x9C,0x12, -0xF7,0x58,0x3F,0x2E,0x72,0x02,0x57,0xA3,0x8F,0xA1,0x14,0x2E, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA */ -/* issuer :/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA */ -unsigned char XXX_certificate[1060]={ -0x30,0x82,0x04,0x20,0x30,0x82,0x03,0x08,0xA0,0x03,0x02,0x01,0x02,0x02,0x10,0x34, -0x4E,0xD5,0x57,0x20,0xD5,0xED,0xEC,0x49,0xF4,0x2F,0xCE,0x37,0xDB,0x2B,0x6D,0x30, -0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x81, -0xA9,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15, -0x30,0x13,0x06,0x03,0x55,0x04,0x0A,0x13,0x0C,0x74,0x68,0x61,0x77,0x74,0x65,0x2C, -0x20,0x49,0x6E,0x63,0x2E,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x0B,0x13,0x1F, -0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x53,0x65, -0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,0x69,0x76,0x69,0x73,0x69,0x6F,0x6E,0x31, -0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x0B,0x13,0x2F,0x28,0x63,0x29,0x20,0x32,0x30, -0x30,0x36,0x20,0x74,0x68,0x61,0x77,0x74,0x65,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20, -0x2D,0x20,0x46,0x6F,0x72,0x20,0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64, -0x20,0x75,0x73,0x65,0x20,0x6F,0x6E,0x6C,0x79,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55, -0x04,0x03,0x13,0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6D,0x61, -0x72,0x79,0x20,0x52,0x6F,0x6F,0x74,0x20,0x43,0x41,0x30,0x1E,0x17,0x0D,0x30,0x36, -0x31,0x31,0x31,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x33,0x36,0x30, -0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5A,0x30,0x81,0xA9,0x31,0x0B,0x30, -0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03, -0x55,0x04,0x0A,0x13,0x0C,0x74,0x68,0x61,0x77,0x74,0x65,0x2C,0x20,0x49,0x6E,0x63, -0x2E,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x0B,0x13,0x1F,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x53,0x65,0x72,0x76,0x69,0x63, -0x65,0x73,0x20,0x44,0x69,0x76,0x69,0x73,0x69,0x6F,0x6E,0x31,0x38,0x30,0x36,0x06, -0x03,0x55,0x04,0x0B,0x13,0x2F,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74, -0x68,0x61,0x77,0x74,0x65,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x20,0x2D,0x20,0x46,0x6F, -0x72,0x20,0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x7A,0x65,0x64,0x20,0x75,0x73,0x65, -0x20,0x6F,0x6E,0x6C,0x79,0x31,0x1F,0x30,0x1D,0x06,0x03,0x55,0x04,0x03,0x13,0x16, -0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6D,0x61,0x72,0x79,0x20,0x52, -0x6F,0x6F,0x74,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86, -0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82, -0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xAC,0xA0,0xF0,0xFB,0x80,0x59,0xD4,0x9C,0xC7, -0xA4,0xCF,0x9D,0xA1,0x59,0x73,0x09,0x10,0x45,0x0C,0x0D,0x2C,0x6E,0x68,0xF1,0x6C, -0x5B,0x48,0x68,0x49,0x59,0x37,0xFC,0x0B,0x33,0x19,0xC2,0x77,0x7F,0xCC,0x10,0x2D, -0x95,0x34,0x1C,0xE6,0xEB,0x4D,0x09,0xA7,0x1C,0xD2,0xB8,0xC9,0x97,0x36,0x02,0xB7, -0x89,0xD4,0x24,0x5F,0x06,0xC0,0xCC,0x44,0x94,0x94,0x8D,0x02,0x62,0x6F,0xEB,0x5A, -0xDD,0x11,0x8D,0x28,0x9A,0x5C,0x84,0x90,0x10,0x7A,0x0D,0xBD,0x74,0x66,0x2F,0x6A, -0x38,0xA0,0xE2,0xD5,0x54,0x44,0xEB,0x1D,0x07,0x9F,0x07,0xBA,0x6F,0xEE,0xE9,0xFD, -0x4E,0x0B,0x29,0xF5,0x3E,0x84,0xA0,0x01,0xF1,0x9C,0xAB,0xF8,0x1C,0x7E,0x89,0xA4, -0xE8,0xA1,0xD8,0x71,0x65,0x0D,0xA3,0x51,0x7B,0xEE,0xBC,0xD2,0x22,0x60,0x0D,0xB9, -0x5B,0x9D,0xDF,0xBA,0xFC,0x51,0x5B,0x0B,0xAF,0x98,0xB2,0xE9,0x2E,0xE9,0x04,0xE8, -0x62,0x87,0xDE,0x2B,0xC8,0xD7,0x4E,0xC1,0x4C,0x64,0x1E,0xDD,0xCF,0x87,0x58,0xBA, -0x4A,0x4F,0xCA,0x68,0x07,0x1D,0x1C,0x9D,0x4A,0xC6,0xD5,0x2F,0x91,0xCC,0x7C,0x71, -0x72,0x1C,0xC5,0xC0,0x67,0xEB,0x32,0xFD,0xC9,0x92,0x5C,0x94,0xDA,0x85,0xC0,0x9B, -0xBF,0x53,0x7D,0x2B,0x09,0xF4,0x8C,0x9D,0x91,0x1F,0x97,0x6A,0x52,0xCB,0xDE,0x09, -0x36,0xA4,0x77,0xD8,0x7B,0x87,0x50,0x44,0xD5,0x3E,0x6E,0x29,0x69,0xFB,0x39,0x49, -0x26,0x1E,0x09,0xA5,0x80,0x7B,0x40,0x2D,0xEB,0xE8,0x27,0x85,0xC9,0xFE,0x61,0xFD, -0x7E,0xE6,0x7C,0x97,0x1D,0xD5,0x9D,0x02,0x03,0x01,0x00,0x01,0xA3,0x42,0x30,0x40, -0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01, -0xFF,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01, -0x06,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x7B,0x5B,0x45,0xCF, -0xAF,0xCE,0xCB,0x7A,0xFD,0x31,0x92,0x1A,0x6A,0xB6,0xF3,0x46,0xEB,0x57,0x48,0x50, -0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03, -0x82,0x01,0x01,0x00,0x79,0x11,0xC0,0x4B,0xB3,0x91,0xB6,0xFC,0xF0,0xE9,0x67,0xD4, -0x0D,0x6E,0x45,0xBE,0x55,0xE8,0x93,0xD2,0xCE,0x03,0x3F,0xED,0xDA,0x25,0xB0,0x1D, -0x57,0xCB,0x1E,0x3A,0x76,0xA0,0x4C,0xEC,0x50,0x76,0xE8,0x64,0x72,0x0C,0xA4,0xA9, -0xF1,0xB8,0x8B,0xD6,0xD6,0x87,0x84,0xBB,0x32,0xE5,0x41,0x11,0xC0,0x77,0xD9,0xB3, -0x60,0x9D,0xEB,0x1B,0xD5,0xD1,0x6E,0x44,0x44,0xA9,0xA6,0x01,0xEC,0x55,0x62,0x1D, -0x77,0xB8,0x5C,0x8E,0x48,0x49,0x7C,0x9C,0x3B,0x57,0x11,0xAC,0xAD,0x73,0x37,0x8E, -0x2F,0x78,0x5C,0x90,0x68,0x47,0xD9,0x60,0x60,0xE6,0xFC,0x07,0x3D,0x22,0x20,0x17, -0xC4,0xF7,0x16,0xE9,0xC4,0xD8,0x72,0xF9,0xC8,0x73,0x7C,0xDF,0x16,0x2F,0x15,0xA9, -0x3E,0xFD,0x6A,0x27,0xB6,0xA1,0xEB,0x5A,0xBA,0x98,0x1F,0xD5,0xE3,0x4D,0x64,0x0A, -0x9D,0x13,0xC8,0x61,0xBA,0xF5,0x39,0x1C,0x87,0xBA,0xB8,0xBD,0x7B,0x22,0x7F,0xF6, -0xFE,0xAC,0x40,0x79,0xE5,0xAC,0x10,0x6F,0x3D,0x8F,0x1B,0x79,0x76,0x8B,0xC4,0x37, -0xB3,0x21,0x18,0x84,0xE5,0x36,0x00,0xEB,0x63,0x20,0x99,0xB9,0xE9,0xFE,0x33,0x04, -0xBB,0x41,0xC8,0xC1,0x02,0xF9,0x44,0x63,0x20,0x9E,0x81,0xCE,0x42,0xD3,0xD6,0x3F, -0x2C,0x76,0xD3,0x63,0x9C,0x59,0xDD,0x8F,0xA6,0xE1,0x0E,0xA0,0x2E,0x41,0xF7,0x2E, -0x95,0x47,0xCF,0xBC,0xFD,0x33,0xF3,0xF6,0x0B,0x61,0x7E,0x7E,0x91,0x2B,0x81,0x47, -0xC2,0x27,0x30,0xEE,0xA7,0x10,0x5D,0x37,0x8F,0x5C,0x39,0x2B,0xE4,0x04,0xF0,0x7B, -0x8D,0x56,0x8C,0x68, -}; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { -/* subject:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com */ -/* issuer :/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com */ -unsigned char XXX_certificate[747]={ -0x30,0x82,0x02,0xE7,0x30,0x82,0x02,0x50,0x02,0x01,0x01,0x30,0x0D,0x06,0x09,0x2A, -0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x81,0xBB,0x31,0x24,0x30, -0x22,0x06,0x03,0x55,0x04,0x07,0x13,0x1B,0x56,0x61,0x6C,0x69,0x43,0x65,0x72,0x74, -0x20,0x56,0x61,0x6C,0x69,0x64,0x61,0x74,0x69,0x6F,0x6E,0x20,0x4E,0x65,0x74,0x77, -0x6F,0x72,0x6B,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x61, -0x6C,0x69,0x43,0x65,0x72,0x74,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x35,0x30,0x33, -0x06,0x03,0x55,0x04,0x0B,0x13,0x2C,0x56,0x61,0x6C,0x69,0x43,0x65,0x72,0x74,0x20, -0x43,0x6C,0x61,0x73,0x73,0x20,0x32,0x20,0x50,0x6F,0x6C,0x69,0x63,0x79,0x20,0x56, -0x61,0x6C,0x69,0x64,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72, -0x69,0x74,0x79,0x31,0x21,0x30,0x1F,0x06,0x03,0x55,0x04,0x03,0x13,0x18,0x68,0x74, -0x74,0x70,0x3A,0x2F,0x2F,0x77,0x77,0x77,0x2E,0x76,0x61,0x6C,0x69,0x63,0x65,0x72, -0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x31,0x20,0x30,0x1E,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x09,0x01,0x16,0x11,0x69,0x6E,0x66,0x6F,0x40,0x76,0x61,0x6C,0x69, -0x63,0x65,0x72,0x74,0x2E,0x63,0x6F,0x6D,0x30,0x1E,0x17,0x0D,0x39,0x39,0x30,0x36, -0x32,0x36,0x30,0x30,0x31,0x39,0x35,0x34,0x5A,0x17,0x0D,0x31,0x39,0x30,0x36,0x32, -0x36,0x30,0x30,0x31,0x39,0x35,0x34,0x5A,0x30,0x81,0xBB,0x31,0x24,0x30,0x22,0x06, -0x03,0x55,0x04,0x07,0x13,0x1B,0x56,0x61,0x6C,0x69,0x43,0x65,0x72,0x74,0x20,0x56, -0x61,0x6C,0x69,0x64,0x61,0x74,0x69,0x6F,0x6E,0x20,0x4E,0x65,0x74,0x77,0x6F,0x72, -0x6B,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x56,0x61,0x6C,0x69, -0x43,0x65,0x72,0x74,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x35,0x30,0x33,0x06,0x03, -0x55,0x04,0x0B,0x13,0x2C,0x56,0x61,0x6C,0x69,0x43,0x65,0x72,0x74,0x20,0x43,0x6C, -0x61,0x73,0x73,0x20,0x32,0x20,0x50,0x6F,0x6C,0x69,0x63,0x79,0x20,0x56,0x61,0x6C, -0x69,0x64,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74, -0x79,0x31,0x21,0x30,0x1F,0x06,0x03,0x55,0x04,0x03,0x13,0x18,0x68,0x74,0x74,0x70, -0x3A,0x2F,0x2F,0x77,0x77,0x77,0x2E,0x76,0x61,0x6C,0x69,0x63,0x65,0x72,0x74,0x2E, -0x63,0x6F,0x6D,0x2F,0x31,0x20,0x30,0x1E,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D, -0x01,0x09,0x01,0x16,0x11,0x69,0x6E,0x66,0x6F,0x40,0x76,0x61,0x6C,0x69,0x63,0x65, -0x72,0x74,0x2E,0x63,0x6F,0x6D,0x30,0x81,0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48, -0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02, -0x81,0x81,0x00,0xCE,0x3A,0x71,0xCA,0xE5,0xAB,0xC8,0x59,0x92,0x55,0xD7,0xAB,0xD8, -0x74,0x0E,0xF9,0xEE,0xD9,0xF6,0x55,0x47,0x59,0x65,0x47,0x0E,0x05,0x55,0xDC,0xEB, -0x98,0x36,0x3C,0x5C,0x53,0x5D,0xD3,0x30,0xCF,0x38,0xEC,0xBD,0x41,0x89,0xED,0x25, -0x42,0x09,0x24,0x6B,0x0A,0x5E,0xB3,0x7C,0xDD,0x52,0x2D,0x4C,0xE6,0xD4,0xD6,0x7D, -0x5A,0x59,0xA9,0x65,0xD4,0x49,0x13,0x2D,0x24,0x4D,0x1C,0x50,0x6F,0xB5,0xC1,0x85, -0x54,0x3B,0xFE,0x71,0xE4,0xD3,0x5C,0x42,0xF9,0x80,0xE0,0x91,0x1A,0x0A,0x5B,0x39, -0x36,0x67,0xF3,0x3F,0x55,0x7C,0x1B,0x3F,0xB4,0x5F,0x64,0x73,0x34,0xE3,0xB4,0x12, -0xBF,0x87,0x64,0xF8,0xDA,0x12,0xFF,0x37,0x27,0xC1,0xB3,0x43,0xBB,0xEF,0x7B,0x6E, -0x2E,0x69,0xF7,0x02,0x03,0x01,0x00,0x01,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86, -0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x3B,0x7F,0x50,0x6F,0x6F, -0x50,0x94,0x99,0x49,0x62,0x38,0x38,0x1F,0x4B,0xF8,0xA5,0xC8,0x3E,0xA7,0x82,0x81, -0xF6,0x2B,0xC7,0xE8,0xC5,0xCE,0xE8,0x3A,0x10,0x82,0xCB,0x18,0x00,0x8E,0x4D,0xBD, -0xA8,0x58,0x7F,0xA1,0x79,0x00,0xB5,0xBB,0xE9,0x8D,0xAF,0x41,0xD9,0x0F,0x34,0xEE, -0x21,0x81,0x19,0xA0,0x32,0x49,0x28,0xF4,0xC4,0x8E,0x56,0xD5,0x52,0x33,0xFD,0x50, -0xD5,0x7E,0x99,0x6C,0x03,0xE4,0xC9,0x4C,0xFC,0xCB,0x6C,0xAB,0x66,0xB3,0x4A,0x21, -0x8C,0xE5,0xB5,0x0C,0x32,0x3E,0x10,0xB2,0xCC,0x6C,0xA1,0xDC,0x9A,0x98,0x4C,0x02, -0x5B,0xF3,0xCE,0xB9,0x9E,0xA5,0x72,0x0E,0x4A,0xB7,0x3F,0x3C,0xE6,0x16,0x68,0xF8, -0xBE,0xED,0x74,0x4C,0xBC,0x5B,0xD5,0x62,0x1F,0x43,0xDD, -}; - - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - return [NSArray arrayWithArray:trustedCertificates]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.h deleted file mode 100755 index 11de62e8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -@interface BTAnalyticsMetadata : NSObject - -+ (NSDictionary *)metadata; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.m deleted file mode 100755 index e7e7d922..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsMetadata.m +++ /dev/null @@ -1,253 +0,0 @@ -#import "BTAnalyticsMetadata.h" - -#import "Braintree-Version.h" -#import "BTKeychain.h" -@import CoreLocation; -#import -#import - -#import - -#ifdef __IPHONE_8_0 -#define kBTCLAuthorizationStatusAuthorized kCLAuthorizationStatusAuthorizedAlways -#else -#define kBTCLAuthorizationStatusAuthorized kCLAuthorizationStatusAuthorized -#endif - -@implementation BTAnalyticsMetadata - -+ (NSDictionary *)metadata { - BTAnalyticsMetadata *m = [[BTAnalyticsMetadata alloc] init]; - - NSMutableDictionary *data = [NSMutableDictionary dictionaryWithCapacity:16]; - - [self setObject:[m platform] forKey:@"platform" inDictionary:data]; - [self setObject:[m platformVersion] forKey:@"platformVersion" inDictionary:data]; - [self setObject:[m sdkVersion] forKey:@"sdkVersion" inDictionary:data]; - [self setObject:[m merchantAppId] forKey:@"merchantAppId" inDictionary:data]; - [self setObject:[m merchantAppName] forKey:@"merchantAppName" inDictionary:data]; - [self setObject:[m merchantAppVersion] forKey:@"merchantAppVersion" inDictionary:data]; -#ifndef __IPHONE_8_0 - [self setObject:@([m deviceRooted]) forKey:@"deviceRooted" inDictionary:data]; -#endif - [self setObject:[m deviceManufacturer] forKey:@"deviceManufacturer" inDictionary:data]; - [self setObject:[m deviceModel] forKey:@"deviceModel" inDictionary:data]; - if ([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kBTCLAuthorizationStatusAuthorized) { - [self setObject:@([m deviceLocationLatitude]) forKey:@"deviceLocationLatitude" inDictionary:data]; - [self setObject:@([m deviceLocationLongitude]) forKey:@"deviceLocationLongitude" inDictionary:data]; - } - [self setObject:[m iosDeviceName] forKey:@"iosDeviceName" inDictionary:data]; - [self setObject:[m iosSystemName] forKey:@"iosSystemName" inDictionary:data]; - [self setObject:[m iosBaseSDK] forKey:@"iosBaseSDK" inDictionary:data]; - [self setObject:[m iosDeploymentTarget] forKey:@"iosDeploymentTarget" inDictionary:data]; - [self setObject:[m iosIdentifierForVendor] forKey:@"iosIdentifierForVendor" inDictionary:data]; - [self setObject:@([m iosIsCocoapods]) forKey:@"iosIsCocoapods" inDictionary:data]; - [self setObject:[m deviceAppGeneratedPersistentUuid] forKey:@"deviceAppGeneratedPersistentUuid" inDictionary:data]; - [self setObject:@([m isSimulator]) forKey:@"isSimulator" inDictionary:data]; - [self setObject:[m deviceScreenOrientation] forKey:@"deviceScreenOrientation" inDictionary:data]; - [self setObject:[m userInterfaceOrientation] forKey:@"userInterfaceOrientation" inDictionary:data]; - [self setObject:@([m isVenmoInstalled]) forKey:@"venmoInstalled" inDictionary:data]; - - return [NSDictionary dictionaryWithDictionary:data]; -} - -+ (void)setObject:(id)object forKey:(id)aKey inDictionary:(NSMutableDictionary *)dictionary { - if (object) { - [dictionary setObject:object forKey:aKey]; - } -} - -#pragma mark Metadata Factors - -- (NSString *)platform { - return @"iOS"; -} - -- (NSString *)platformVersion { - - return [[UIDevice currentDevice] systemVersion]; -} - -- (NSString *)sdkVersion { - return BRAINTREE_VERSION; -} - -- (NSString *)merchantAppId { - return [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey]; -} - -- (NSString *)merchantAppVersion { - return [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey]; -} - -- (NSString *)merchantAppName { - return [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleNameKey]; -} - -- (BOOL)deviceRooted { -#if TARGET_IPHONE_SIMULATOR || __IPHONE_8_0 - return NO; -#else - BOOL isJailbroken = system(NULL) == 1; - - return isJailbroken; -#endif -} - -- (NSString *)deviceManufacturer { - return @"Apple"; -} - -- (NSString *)deviceModel { - struct utsname systemInfo; - - uname(&systemInfo); - - NSString* code = [NSString stringWithCString:systemInfo.machine - encoding:NSUTF8StringEncoding]; - - - return code; -} - -- (CLLocationDegrees)deviceLocationLatitude { - return [[[[CLLocationManager alloc] init] location] coordinate].latitude; -} - -- (CLLocationDegrees)deviceLocationLongitude { - return [[[[CLLocationManager alloc] init] location] coordinate].longitude; -} - -- (NSString *)iosIdentifierForVendor { - return [[[UIDevice currentDevice] identifierForVendor] UUIDString]; -} - -- (NSString *)iosDeploymentTarget { - NSString *rawVersionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MinimumOSVersion"]; - NSArray *rawVersionArray = [rawVersionString componentsSeparatedByString:@"."]; - NSInteger majorVersionNumber = [[rawVersionArray objectAtIndex:0] integerValue] * 10000; - NSInteger minorVersionNumber = [[rawVersionArray objectAtIndex:1] integerValue] * 100; - - return [NSString stringWithFormat:@"%i", (int)majorVersionNumber + (int)minorVersionNumber]; -} - -- (NSString *)iosBaseSDK { - return [@(__IPHONE_OS_VERSION_MAX_ALLOWED) stringValue]; -} - -- (NSString *)iosDeviceName { - return [[UIDevice currentDevice] name]; -} - -- (NSString *)iosSystemName { - return [[UIDevice currentDevice] systemName]; -} - -- (BOOL)iosIsCocoapods { -#ifdef COCOAPODS - return YES; -#else - return NO; -#endif -} - -- (NSString *)deviceAppGeneratedPersistentUuid { - @try { - static NSString *deviceAppGeneratedPersistentUuidKeychainKey = @"deviceAppGeneratedPersistentUuid"; - NSString *savedIdentifier = [BTKeychain stringForKey:deviceAppGeneratedPersistentUuidKeychainKey]; - if (savedIdentifier.length == 0) { - savedIdentifier = [[NSUUID UUID] UUIDString]; - BOOL setDidSucceed = [BTKeychain setString:savedIdentifier - forKey:deviceAppGeneratedPersistentUuidKeychainKey]; - if (!setDidSucceed) { - return nil; - } - } - return savedIdentifier; - } @catch (NSException *exception) { - return nil; - } -} - -- (BOOL)isSimulator { - return TARGET_IPHONE_SIMULATOR; -} - -- (NSString *)userInterfaceOrientation { -// UIViewController interface orientation methods are deprecated as of iOS 8 -#ifndef __IPHONE_8_0 - if ([UIApplication class] == nil) { - return nil; - } - - if ([self.class isAppExtension]) { - return nil; - } - - UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)]; - UIInterfaceOrientation deviceOrientation = [[[sharedApplication keyWindow] rootViewController] interfaceOrientation]; - - switch (deviceOrientation) { - case UIInterfaceOrientationPortrait: - return @"Portrait"; - case UIInterfaceOrientationPortraitUpsideDown: - return @"PortraitUpsideDown"; - case UIInterfaceOrientationLandscapeLeft: - return @"LandscapeLeft"; - case UIInterfaceOrientationLandscapeRight: - return @"LandscapeRight"; - default: - return @"Unknown"; - } -#else - return nil; -#endif -} - -- (NSString *)deviceScreenOrientation { - if ([self.class isAppExtension]) { - return @"AppExtension"; - } - if ([UIDevice class] == nil) { - return nil; - } - - switch ([[UIDevice currentDevice] orientation]) { - case UIDeviceOrientationFaceUp: - return @"FaceUp"; - case UIDeviceOrientationFaceDown: - return @"FaceDown"; - case UIDeviceOrientationPortrait: - return @"Portrait"; - case UIDeviceOrientationPortraitUpsideDown: - return @"PortraitUpsideDown"; - case UIDeviceOrientationLandscapeLeft: - return @"LandscapeLeft"; - case UIDeviceOrientationLandscapeRight: - return @"LandscapeRight"; - default: - return @"Unknown"; - } -} - -- (BOOL)isVenmoInstalled { - if ([self.class isAppExtension]) { - return NO; - } - - UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)]; - static BOOL venmoInstalled; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSURL *venmoURL = [NSURL URLWithString:@"com.venmo.touch.v2://x-callback-url/vzero/auth"]; - venmoInstalled = [sharedApplication canOpenURL:venmoURL]; - }); - return venmoInstalled; -} - -+ (BOOL)isAppExtension { - NSDictionary *extensionDictionary = [[NSBundle mainBundle] infoDictionary][@"NSExtension"]; - return [extensionDictionary isKindOfClass:[NSDictionary class]]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.h deleted file mode 100755 index 0d3a26e8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.h +++ /dev/null @@ -1,56 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTAnalyticsServiceErrorDomain; - -typedef NS_ENUM(NSUInteger, BTAnalyticsServiceErrorType) { - BTAnalyticsServiceErrorTypeUnknown = 1, - BTAnalyticsServiceErrorTypeMissingAnalyticsURL, - BTAnalyticsServiceErrorTypeInvalidAPIClient, -}; - -@class BTAPIClient, BTHTTP; - -@interface BTAnalyticsService : NSObject - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient; - -/*! - @brief Defaults to 1, can be overridden -*/ -@property (nonatomic, assign) NSUInteger flushThreshold; - -@property (nonatomic, strong) BTAPIClient *apiClient; - -/*! - @brief Tracks an event. - - @discussion Events are queued and sent in batches to the analytics service, based on the status of the app - and the number of queued events. After exiting this method, there is no guarantee that the event has been - sent. -*/ -- (void)sendAnalyticsEvent:(NSString *)eventKind; - -/*! - @brief Tracks an event and sends it to the analytics service. It will also flush any queued events. - - @param completionBlock A callback that is invoked when the analytics service has completed. -*/ -- (void)sendAnalyticsEvent:(NSString *)eventKind completion:(nullable void(^)(NSError * _Nullable))completionBlock; - -/*! - @brief Sends all queued events to the analytics service. - - @param completionBlock A callback that is invoked when the analytics service has completed. -*/ -- (void)flush:(nullable void (^)(NSError * _Nullable error))completionBlock; - -/*! - @brief The HTTP client for communication with the analytics service endpoint. Exposed for testing. -*/ -@property (nonatomic, strong) BTHTTP *http; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.m deleted file mode 100755 index 4fb283d7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAnalyticsService.m +++ /dev/null @@ -1,274 +0,0 @@ -#import "BTAnalyticsMetadata.h" -#import "BTAnalyticsService.h" -#import "BTAPIClient_Internal.h" -#import "BTClientMetadata.h" -#import "BTHTTP.h" -#import "BTLogger_Internal.h" -#import - -#pragma mark - BTAnalyticsEvent - -/// Encapsulates a single analytics event -@interface BTAnalyticsEvent : NSObject - -@property (nonatomic, copy) NSString *kind; - -@property (nonatomic, assign) long timestamp; - -+ (nonnull instancetype)event:(nonnull NSString *)eventKind withTimestamp:(long)timestamp; - -/// Event serialized to JSON -- (nonnull NSDictionary *)json; - -@end - -@implementation BTAnalyticsEvent - -+ (instancetype)event:(NSString *)eventKind withTimestamp:(long)timestamp { - BTAnalyticsEvent *event = [[BTAnalyticsEvent alloc] init]; - event.kind = eventKind; - event.timestamp = timestamp; - return event; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ at %ld", self.kind, (long)self.timestamp]; -} - -- (NSDictionary *)json { - return @{ - @"kind": self.kind, - @"timestamp": @(self.timestamp) - }; -} - -@end - -#pragma mark - BTAnalyticsSession - -/// Encapsulates analytics events for a given session -@interface BTAnalyticsSession : NSObject - -@property (nonatomic, copy, nonnull) NSString *sessionID; - -@property (nonatomic, copy, nonnull) NSString *source; - -@property (nonatomic, copy, nonnull) NSString *integration; - -@property (nonatomic, strong, nonnull) NSMutableArray *events; - -/// Dictionary of analytics metadata from `BTAnalyticsMetadata` -@property (nonatomic, strong, nonnull) NSDictionary *metadataParameters; - -+ (nonnull instancetype)sessionWithID:(nonnull NSString *)sessionID - source:(nonnull NSString *)source - integration:(nonnull NSString *)integration; - -@end - -@implementation BTAnalyticsSession - -- (instancetype)init { - if (self = [super init]) { - _events = [NSMutableArray array]; - _metadataParameters = [BTAnalyticsMetadata metadata]; - } - return self; -} - -+ (instancetype)sessionWithID:(NSString *)sessionID - source:(NSString *)source - integration:(NSString *)integration -{ - if (!sessionID || !source || !integration) { - return nil; - } - - BTAnalyticsSession *session = [[BTAnalyticsSession alloc] init]; - session.sessionID = sessionID; - session.source = source; - session.integration = integration; - return session; -} - -@end - -#pragma mark - BTAnalyticsService - -@interface BTAnalyticsService () - -/// Dictionary of analytics sessions, keyed by session ID. The analytics service requires that batched events -/// are sent from only one session. In practice, BTAPIClient.metadata.sessionId should never change, so this -/// is defensive. -@property (nonatomic, strong) NSMutableDictionary *analyticsSessions; - -/// A serial dispatch queue that synchronizes access to `analyticsSessions` -@property (nonatomic, strong) dispatch_queue_t sessionsQueue; - -@end - -@implementation BTAnalyticsService - -NSString * const BTAnalyticsServiceErrorDomain = @"com.braintreepayments.BTAnalyticsServiceErrorDomain"; - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - _analyticsSessions = [NSMutableDictionary dictionary]; - _sessionsQueue = dispatch_queue_create("com.braintreepayments.BTAnalyticsService", DISPATCH_QUEUE_SERIAL); - _apiClient = apiClient; - _flushThreshold = 1; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appWillResign:) name:UIApplicationWillResignActiveNotification object:nil]; - } - return self; -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -#pragma mark - Public methods - -- (void)sendAnalyticsEvent:(NSString *)eventKind { - [self enqueueEvent:eventKind]; - [self checkFlushThreshold]; -} - -- (void)sendAnalyticsEvent:(NSString *)eventKind completion:(__unused void(^)(NSError *error))completionBlock { - [self enqueueEvent:eventKind]; - [self flush:completionBlock]; -} - -- (void)flush:(void (^)(NSError *))completionBlock { - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - if (error) { - [[BTLogger sharedLogger] warning:[NSString stringWithFormat:@"Failed to send analytics event. Remote configuration fetch failed. %@", error.localizedDescription]]; - if (completionBlock) completionBlock(error); - return; - } - - NSURL *analyticsURL = [configuration.json[@"analytics"][@"url"] asURL]; - if (!analyticsURL) { - [[BTLogger sharedLogger] debug:@"Skipping sending analytics event - analytics is disabled in remote configuration"]; - NSError *error = [NSError errorWithDomain:BTAnalyticsServiceErrorDomain code:BTAnalyticsServiceErrorTypeMissingAnalyticsURL userInfo:@{ NSLocalizedDescriptionKey : @"Analytics is disabled in remote configuration" }]; - if (completionBlock) completionBlock(error); - return; - } - - if (!self.http) { - if (self.apiClient.clientToken) { - self.http = [[BTHTTP alloc] initWithBaseURL:analyticsURL authorizationFingerprint:self.apiClient.clientToken.authorizationFingerprint]; - } else if (self.apiClient.tokenizationKey) { - self.http = [[BTHTTP alloc] initWithBaseURL:analyticsURL tokenizationKey:self.apiClient.tokenizationKey]; - } - if (!self.http) { - NSError *error = [NSError errorWithDomain:BTAnalyticsServiceErrorDomain code:BTAnalyticsServiceErrorTypeInvalidAPIClient userInfo:@{ NSLocalizedDescriptionKey : @"API client must have client token or tokenization key" }]; - [[BTLogger sharedLogger] warning:error.localizedDescription]; - if (completionBlock) completionBlock(error); - return; - } - } - // A special value passed in by unit tests to prevent BTHTTP from actually posting - if ([self.http.baseURL isEqual:[NSURL URLWithString:@"test://do-not-send.url"]]) { - if (completionBlock) completionBlock(nil); - return; - } - - dispatch_async(self.sessionsQueue, ^{ - if (self.analyticsSessions.count == 0) { - if (completionBlock) completionBlock(nil); - return; - } - - for (NSString *sessionID in self.analyticsSessions.allKeys) { - BTAnalyticsSession *session = self.analyticsSessions[sessionID]; - - NSMutableDictionary *metadataParameters = [NSMutableDictionary dictionary]; - [metadataParameters addEntriesFromDictionary:session.metadataParameters]; - metadataParameters[@"sessionId"] = session.sessionID; - metadataParameters[@"integration"] = session.integration; - metadataParameters[@"source"] = session.source; - - NSMutableDictionary *postParameters = [NSMutableDictionary dictionary]; - if (session.events) { - // Map array of BTAnalyticsEvent to JSON - postParameters[@"analytics"] = [session.events valueForKey:@"json"]; - } - postParameters[@"_meta"] = metadataParameters; - if (self.apiClient.clientToken.authorizationFingerprint) { - postParameters[@"authorization_fingerprint"] = self.apiClient.clientToken.authorizationFingerprint; - } - if (self.apiClient.tokenizationKey) { - postParameters[@"tokenization_key"] = self.apiClient.tokenizationKey; - } - [self.http POST:@"/" parameters:postParameters completion:^(__unused BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - if (!error) { - [self.analyticsSessions removeObjectForKey:sessionID]; - } else { - [[BTLogger sharedLogger] warning:@"Failed to flush analytics events: %@", error.localizedDescription]; - } - if (completionBlock) completionBlock(error); - }]; - } - }); - }]; -} - -#pragma mark - Private methods - -- (void)appWillResign:(NSNotification *)notification { - UIApplication *application = notification.object; - - __block UIBackgroundTaskIdentifier bgTask; - bgTask = [application beginBackgroundTaskWithName:@"BTAnalyticsService" expirationHandler:^{ - [[BTLogger sharedLogger] warning:@"Analytics service background task expired"]; - [application endBackgroundTask:bgTask]; - bgTask = UIBackgroundTaskInvalid; - }]; - - // Start the long-running task and return immediately. - dispatch_async(self.sessionsQueue, ^{ - [self flush:^(__unused NSError * _Nullable error) { - [application endBackgroundTask:bgTask]; - bgTask = UIBackgroundTaskInvalid; - }]; - }); -} - -#pragma mark - Helpers - -- (void)enqueueEvent:(NSString *)eventKind { - long timestampInSeconds = round([[NSDate date] timeIntervalSince1970]); - BTAnalyticsEvent *event = [BTAnalyticsEvent event:eventKind withTimestamp:timestampInSeconds]; - - BTAnalyticsSession *session = [BTAnalyticsSession sessionWithID:self.apiClient.metadata.sessionId - source:self.apiClient.metadata.sourceString - integration:self.apiClient.metadata.integrationString]; - if (!session) { - [[BTLogger sharedLogger] warning:@"Missing analytics session metadata - will not send event %@", event.kind]; - return; - } - - dispatch_async(self.sessionsQueue, ^{ - if (!self.analyticsSessions[session.sessionID]) { - self.analyticsSessions[session.sessionID] = session; - } - - [self.analyticsSessions[session.sessionID].events addObject:event]; - }); -} - -- (void)checkFlushThreshold { - __block NSUInteger eventCount = 0; - - dispatch_sync(self.sessionsQueue, ^{ - for (BTAnalyticsSession *analyticsSession in self.analyticsSessions.allValues) { - eventCount += analyticsSession.events.count; - } - }); - - if (eventCount >= self.flushThreshold) { - [self flush:nil]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAppSwitch.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAppSwitch.m deleted file mode 100755 index 8af4e7cc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTAppSwitch.m +++ /dev/null @@ -1,71 +0,0 @@ -#import "BTAppSwitch.h" -#import - -NSString * const BTAppSwitchWillSwitchNotification = @"com.braintreepayments.BTAppSwitchWillSwitchNotification"; -NSString * const BTAppSwitchDidSwitchNotification = @"com.braintreepayments.BTAppSwitchDidSwitchNotification"; -NSString * const BTAppSwitchWillProcessPaymentInfoNotification = @"com.braintreepayments.BTAppSwitchWillProcessPaymentInfoNotification"; -NSString * const BTAppSwitchNotificationTargetKey = @"BTAppSwitchNotificationTargetKey"; - -@interface BTAppSwitch () - -@property (nonatomic, strong) NSMutableSet *appSwitchHandlers; - -@end - -@implementation BTAppSwitch - -+ (instancetype)sharedInstance { - static BTAppSwitch *instance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - instance = [[BTAppSwitch alloc] init]; - }); - return instance; -} - -- (instancetype)init { - self = [super init]; - if (self) { - _appSwitchHandlers = [NSMutableSet set]; - } - return self; -} - -+ (void)setReturnURLScheme:(NSString *)returnURLScheme { - [BTAppSwitch sharedInstance].returnURLScheme = returnURLScheme; -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 -+ (BOOL)handleOpenURL:(NSURL *)url options:(NSDictionary *)options { - return [[[self class] sharedInstance] handleOpenURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]]; -} -#else -+ (BOOL)handleOpenURL:(NSURL *)url options:(__unused NSDictionary *)options { - return [[[self class] sharedInstance] handleOpenURL:url sourceApplication:nil]; -} -#endif - -+ (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - return [[[self class] sharedInstance] handleOpenURL:url sourceApplication:sourceApplication]; -} - -- (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - for (Class handlerClass in self.appSwitchHandlers) { - if ([handlerClass canHandleAppSwitchReturnURL:url sourceApplication:sourceApplication]) { - [handlerClass handleAppSwitchReturnURL:url]; - return YES; - } - } - return NO; -} - --(void)registerAppSwitchHandler:(Class)handler { - if (!handler) return; - [self.appSwitchHandlers addObject:handler]; -} - -- (void)unregisterAppSwitchHandler:(Class)handler { - [self.appSwitchHandlers removeObject:handler]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientMetadata.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientMetadata.m deleted file mode 100755 index acdeec6a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientMetadata.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "BTClientMetadata.h" - -@interface BTClientMetadata () { - @protected - BTClientMetadataIntegrationType _integration; - BTClientMetadataSourceType _source; - NSString *_sessionId; -} -@end - -@implementation BTClientMetadata - -- (instancetype)init { - self = [super init]; - if (self) { - _integration = BTClientMetadataIntegrationCustom; - _source = BTClientMetadataSourceUnknown; - _sessionId = [[[NSUUID UUID] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; - } - return self; -} - -- (id)copyWithZone:(NSZone *)zone { - BTClientMetadata *copiedMetadata = [[BTClientMetadata allocWithZone:zone] init]; - copiedMetadata->_integration = _integration; - copiedMetadata->_source = _source; - copiedMetadata->_sessionId = [_sessionId copyWithZone:zone]; - return copiedMetadata; -} - -- (id)mutableCopyWithZone:(NSZone *)zone { - BTMutableClientMetadata *mutableMetadata = [[BTMutableClientMetadata allocWithZone:zone] init]; - mutableMetadata.integration = _integration; - mutableMetadata.source = _source; - mutableMetadata.sessionId = [_sessionId copyWithZone:zone]; - return mutableMetadata; -} - -- (NSString *)integrationString { - return [[self class] integrationToString:self.integration]; -} - -- (NSString *)sourceString { - return [[self class] sourceToString:self.source]; -} - -- (NSDictionary *)parameters { - return @{ - @"integration": self.integrationString, - @"source": self.sourceString, - @"sessionId": self.sessionId - }; -} - -#pragma mark Internal helpers - -+ (NSString *)integrationToString:(BTClientMetadataIntegrationType)integration { - switch (integration) { - case BTClientMetadataIntegrationCustom: - return @"custom"; - case BTClientMetadataIntegrationDropIn: - return @"dropin"; - case BTClientMetadataIntegrationDropIn2: - return @"dropin2"; - case BTClientMetadataIntegrationUnknown: - return @"unknown"; - } -} - -+ (NSString *)sourceToString:(BTClientMetadataSourceType)source { - switch (source) { - case BTClientMetadataSourcePayPalApp: - return @"paypal-app"; - case BTClientMetadataSourcePayPalBrowser: - return @"paypal-browser"; - case BTClientMetadataSourceVenmoApp: - return @"venmo-app"; - case BTClientMetadataSourceForm: - return @"form"; - case BTClientMetadataSourceUnknown: - return @"unknown"; - } -} - -@end - - -@implementation BTMutableClientMetadata - -- (void)setIntegration:(BTClientMetadataIntegrationType)integration { - _integration = integration; -} - -- (void)setSource:(BTClientMetadataSourceType)source { - _source = source; -} - -- (void)setSessionId:(NSString *)sessionId { - _sessionId = sessionId; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientToken.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientToken.m deleted file mode 100755 index 974643cb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTClientToken.m +++ /dev/null @@ -1,191 +0,0 @@ -#import "BTClientToken.h" - -NSString *const BTClientTokenKeyVersion = @"version"; -NSString *const BTClientTokenKeyAuthorizationFingerprint = @"authorizationFingerprint"; -NSString *const BTClientTokenKeyConfigURL = @"configUrl"; -NSString * const BTClientTokenErrorDomain = @"com.braintreepayments.BTClientTokenErrorDomain"; - -@interface BTClientToken () - -@property (nonatomic, readwrite, copy) NSString *authorizationFingerprint; -@property (nonatomic, readwrite, strong) NSURL *configURL; -@property (nonatomic, copy) NSString *originalValue; -@property (nonatomic, readwrite, strong) BTJSON *json; - -@end - -@implementation BTClientToken - -- (instancetype)init { - return nil; -} - -- (instancetype)initWithClientToken:(NSString *)clientToken error:(NSError * __autoreleasing *)error { - if (self = [super init]) { - // Client token must be decoded first because the other values are retrieved from it - _json = [self decodeClientToken:clientToken error:error]; - _authorizationFingerprint = [_json[BTClientTokenKeyAuthorizationFingerprint] asString]; - _configURL = [_json[BTClientTokenKeyConfigURL] asURL]; - _originalValue = clientToken; - - if (![self validateClientToken:error]) { - return nil; - } - } - return self; -} - -- (BOOL)validateClientToken:(NSError *__autoreleasing*)error { - if (error != NULL && *error) { - return NO; - } - - if ([self.authorizationFingerprint length] == 0) { - if (error != NULL) { - *error = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorInvalid - userInfo:@{ - NSLocalizedDescriptionKey: @"Invalid client token. Please ensure your server is generating a valid Braintree ClientToken.", - NSLocalizedFailureReasonErrorKey: @"Authorization fingerprint was not present or invalid." }]; - } - return NO; - } - - if (![self.configURL isKindOfClass:[NSURL class]] || self.configURL.absoluteString.length == 0) { - if (error != NULL) { - *error = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorInvalid - userInfo:@{ - NSLocalizedDescriptionKey: @"Invalid client token: config url was missing or invalid. Please ensure your server is generating a valid Braintree ClientToken." - }]; - } - return NO; - } - - return YES; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - BTClientToken *copiedClientToken = [[[self class] allocWithZone:zone] initWithClientToken:self.originalValue error:NULL]; - return copiedClientToken; -} - -#pragma mark JSON Parsing - -- (NSDictionary *)parseJSONString:(NSString *)rawJSONString error:(NSError * __autoreleasing *)error { - NSData *rawJSONData = [rawJSONString dataUsingEncoding:NSUTF8StringEncoding]; - - return [NSJSONSerialization JSONObjectWithData:rawJSONData options:0 error:error]; -} - -#pragma mark NSCoding - -- (void)encodeWithCoder:(NSCoder *)coder { - [coder encodeObject:self.originalValue forKey:@"originalValue"]; -} - -- (id)initWithCoder:(NSCoder *)decoder { - return [self initWithClientToken:[decoder decodeObjectForKey:@"originalValue"] error:NULL]; -} - -#pragma mark Client Token Parsing - -- (BTJSON *)decodeClientToken:(NSString *)rawClientTokenString error:(NSError * __autoreleasing *)error { - NSError *JSONError = nil; - NSData *base64DecodedClientToken = [[NSData alloc] initWithBase64EncodedString:rawClientTokenString - options:0]; - - NSDictionary *rawClientToken; - if (base64DecodedClientToken) { - rawClientToken = [NSJSONSerialization JSONObjectWithData:base64DecodedClientToken options:0 error:&JSONError]; - } else { - rawClientToken = [self parseJSONString:rawClientTokenString error:&JSONError]; - } - - if (!rawClientToken) { - if (error) { - NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] initWithDictionary:@{ - NSLocalizedDescriptionKey: @"Invalid client token. Please ensure your server is generating a valid Braintree ClientToken.", - NSLocalizedFailureReasonErrorKey: @"Invalid JSON" - }]; - if (JSONError) { - userInfo[NSUnderlyingErrorKey] = JSONError; - } - *error = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorInvalid - userInfo:userInfo]; - } - return nil; - } - - if (![rawClientToken isKindOfClass:[NSDictionary class]]) { - if (error) { - *error = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorInvalid - userInfo:@{ - NSLocalizedDescriptionKey: @"Invalid client token. Please ensure your server is generating a valid Braintree ClientToken.", - NSLocalizedFailureReasonErrorKey: @"Invalid JSON. Expected to find an object at JSON root." - }]; - } - return nil; - } - - NSError *clientTokenFormatError = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorInvalid - userInfo:@{ - NSLocalizedDescriptionKey: @"Invalid client token format. Please pass the client token string directly as it is generated by the server-side SDK.", - NSLocalizedFailureReasonErrorKey: @"Unsupported client token format." - }]; - - switch ([rawClientToken[BTClientTokenKeyVersion] integerValue]) { - case 1: - if (base64DecodedClientToken) { - if (error) { - *error = clientTokenFormatError; - } - return nil; - } - break; - case 2: - /* FALLTHROUGH */ - case 3: - if (!base64DecodedClientToken) { - if (error) { - *error = clientTokenFormatError; - } - return nil; - } - break; - default: - if (error) { - *error = [NSError errorWithDomain:BTClientTokenErrorDomain - code:BTClientTokenErrorUnsupportedVersion - userInfo:@{ - NSLocalizedDescriptionKey: @"Unsupported client token version. Please ensure your server is generating a valid Braintree ClientToken with a server-side SDK that is compatible with this version of Braintree iOS.", - NSLocalizedFailureReasonErrorKey: @"Unsupported client token version." - }]; - } - return nil; - } - - return [[BTJSON alloc] initWithValue:rawClientToken]; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"", self.authorizationFingerprint, self.configURL]; -} - -- (BOOL)isEqual:(id)object { - if (self == object) { - return YES; - } - - if ([object isKindOfClass:[BTClientToken class]]) { - BTClientToken *otherToken = object; - return [self.json.asDictionary isEqualToDictionary:otherToken.json.asDictionary]; - } - - return NO; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTConfiguration.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTConfiguration.m deleted file mode 100755 index 197a7e4d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTConfiguration.m +++ /dev/null @@ -1,23 +0,0 @@ -#import "BTConfiguration.h" - -@implementation BTConfiguration - -- (instancetype)init { - @throw [[NSException alloc] initWithName:@"Invalid initializer" reason:@"Use designated initializer" userInfo:nil]; -} - -- (instancetype)initWithJSON:(BTJSON *)json { - if (self = [super init]) { - _json = json; - } - return self; -} - -+ (BOOL)isBetaEnabledPaymentOption:(NSString*)__unused paymentOption { - return false; -} - -+ (void)setBetaPaymentOption:(NSString*) __unused paymentOption isEnabled:(BOOL) __unused isEnabled { /* NO OP */ } - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTErrors.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTErrors.m deleted file mode 100755 index fcbcffaa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTErrors.m +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTErrors.h" - -#pragma mark Error userInfo Keys - -NSString *const BTCustomerInputBraintreeValidationErrorsKey = @"BTCustomerInputBraintreeValidationErrorsKey"; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.h deleted file mode 100755 index 25b160e7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.h +++ /dev/null @@ -1,87 +0,0 @@ -#import -#import "BTHTTPErrors.h" -#import "BTJSON.h" - -NS_ASSUME_NONNULL_BEGIN - -@class BTHTTPResponse, BTClientToken; - -/*! - @brief Performs HTTP methods on the Braintree Client API -*/ -@interface BTHTTP : NSObject - -/*! - @brief An optional array of pinned certificates, each an NSData instance consisting of DER encoded x509 certificates -*/ -@property (nonatomic, nullable, strong) NSArray *pinnedCertificates; - -/*! - @brief Initialize `BTHTTP` with the authorization fingerprint from a client token - - @param URL The base URL for the Braintree Client API - @param authorizationFingerprint The authorization fingerprint HMAC from a client token -*/ -- (instancetype)initWithBaseURL:(NSURL *)URL - authorizationFingerprint:(NSString *)authorizationFingerprint NS_DESIGNATED_INITIALIZER; - -/*! - @brief Initialize `BTHTTP` with a tokenization key - - @param URL The base URL for the Braintree Client API - @param tokenizationKey A tokenization key -*/ -- (instancetype)initWithBaseURL:(NSURL *)URL tokenizationKey:(NSString *)tokenizationKey NS_DESIGNATED_INITIALIZER; - -/*! - @brief A convenience initializer to initialize `BTHTTP` with a client token - - @param clientToken A client token -*/ -- (instancetype)initWithClientToken:(BTClientToken *)clientToken; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wnullability" -- (nullable instancetype)init __attribute__((unavailable("Please use initWithBaseURL:authorizationFingerprint: instead."))); -#pragma clang diagnostic pop - -// For testing -@property (nonatomic, strong) NSURLSession *session; -@property (nonatomic, readonly, strong) NSURL *baseURL; - -/*! - @brief Queue that callbacks are dispatched onto, main queue if not otherwise specified -*/ -@property (nonatomic, strong) dispatch_queue_t dispatchQueue; - -- (void)GET:(NSString *)endpoint - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)GET:(NSString *)endpoint - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)POST:(NSString *)endpoint - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)POST:(NSString *)endpoint - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)PUT:(NSString *)endpoint - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)PUT:(NSString *)endpoint - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)DELETE:(NSString *)endpoint - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (void)DELETE:(NSString *)endpoint - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.m deleted file mode 100755 index 63eec3bf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTP.m +++ /dev/null @@ -1,384 +0,0 @@ -#import "BTHTTP.h" - -#include - -#import "Braintree-Version.h" -#import "BTClientToken.h" -#import "BTAPIPinnedCertificates.h" -#import "BTURLUtils.h" -#import "BTLogger_Internal.h" - -@interface BTHTTP () - -@property (nonatomic, strong) NSURL *baseURL; -@property (nonatomic, copy) NSString *authorizationFingerprint; -@property (nonatomic, copy) NSString *tokenizationKey; - -@end - -@implementation BTHTTP - -- (instancetype)init { - return nil; -} - -- (instancetype)initWithBaseURL:(NSURL *)URL authorizationFingerprint:(NSString *)authorizationFingerprint { - self = [super init]; - if (self) { - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - configuration.HTTPAdditionalHeaders = self.defaultHeaders; - self.baseURL = URL; - - NSOperationQueue *delegateQueue = [[NSOperationQueue alloc] init]; - delegateQueue.name = @"com.braintreepayments.BTHTTP"; - delegateQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; - - self.authorizationFingerprint = authorizationFingerprint; - self.session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:delegateQueue]; - self.pinnedCertificates = [BTAPIPinnedCertificates trustedCertificates]; - } - return self; -} - -- (instancetype)initWithBaseURL:(nonnull NSURL *)URL tokenizationKey:(nonnull NSString *)tokenizationKey { - if (self = [super init]) { - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - configuration.HTTPAdditionalHeaders = self.defaultHeaders; - self.baseURL = URL; - - NSOperationQueue *delegateQueue = [[NSOperationQueue alloc] init]; - delegateQueue.name = @"com.braintreepayments.BTHTTP"; - delegateQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; - - self.session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:delegateQueue]; - self.pinnedCertificates = [BTAPIPinnedCertificates trustedCertificates]; - self.tokenizationKey = tokenizationKey; - } - return self; -} - -- (instancetype)initWithClientToken:(BTClientToken *)clientToken { - return [self initWithBaseURL:[clientToken.json[@"clientApiUrl"] asURL] authorizationFingerprint:clientToken.authorizationFingerprint]; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - BTHTTP *copiedHTTP; - if (self.authorizationFingerprint) { - copiedHTTP = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL authorizationFingerprint:self.authorizationFingerprint]; - } else { - copiedHTTP = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL tokenizationKey:self.tokenizationKey]; - } - - copiedHTTP.pinnedCertificates = [_pinnedCertificates copy]; - return copiedHTTP; -} - -#pragma mark - HTTP Methods - -- (void)GET:(NSString *)aPath completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self GET:aPath parameters:nil completion:completionBlock]; -} - -- (void)GET:(NSString *)aPath parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self httpRequest:@"GET" path:aPath parameters:parameters completion:completionBlock]; -} - -- (void)POST:(NSString *)aPath completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self POST:aPath parameters:nil completion:completionBlock]; -} - -- (void)POST:(NSString *)aPath parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self httpRequest:@"POST" path:aPath parameters:parameters completion:completionBlock]; -} - -- (void)PUT:(NSString *)aPath completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self PUT:aPath parameters:nil completion:completionBlock]; -} - -- (void)PUT:(NSString *)aPath parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self httpRequest:@"PUT" path:aPath parameters:parameters completion:completionBlock]; -} - -- (void)DELETE:(NSString *)aPath completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self DELETE:aPath parameters:nil completion:completionBlock]; -} - -- (void)DELETE:(NSString *)aPath parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - [self httpRequest:@"DELETE" path:aPath parameters:parameters completion:completionBlock]; -} - -#pragma mark - Underlying HTTP - -- (void)httpRequest:(NSString *)method path:(NSString *)aPath parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - - BOOL hasHttpPrefix = aPath != nil && [aPath hasPrefix:@"http"]; - if (!hasHttpPrefix && (!self.baseURL || [self.baseURL.absoluteString isEqualToString:@""])) { - NSMutableDictionary *errorUserInfo = [NSMutableDictionary new]; - if (method) errorUserInfo[@"method"] = method; - if (aPath) errorUserInfo[@"path"] = aPath; - if (parameters) errorUserInfo[@"parameters"] = parameters; - completionBlock(nil, nil, [NSError errorWithDomain:BTHTTPErrorDomain code:BTHTTPErrorCodeMissingBaseURL userInfo:errorUserInfo]); - return; - } - - BOOL isNotDataURL = ![self.baseURL.scheme isEqualToString:@"data"]; - NSURL *fullPathURL; - if (aPath && isNotDataURL) { - if (hasHttpPrefix) { - fullPathURL = [NSURL URLWithString:aPath]; - } else { - fullPathURL = [self.baseURL URLByAppendingPathComponent:aPath]; - } - } else { - fullPathURL = self.baseURL; - } - - NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionaryWithDictionary:parameters]; - if (self.authorizationFingerprint) { - mutableParameters[@"authorization_fingerprint"] = self.authorizationFingerprint; - } - parameters = [mutableParameters copy]; - - if (!fullPathURL) { - // baseURL can be non-nil (e.g. an empty string) and still return nil for -URLByAppendingPathComponent: - // causing a crash when NSURLComponents.componentsWithString is called with nil. - NSMutableDictionary *errorUserInfo = [NSMutableDictionary new]; - if (method) errorUserInfo[@"method"] = method; - if (aPath) errorUserInfo[@"path"] = aPath; - if (parameters) errorUserInfo[@"parameters"] = parameters; - errorUserInfo[NSLocalizedFailureReasonErrorKey] = @"fullPathURL was nil"; - completionBlock(nil, nil, [NSError errorWithDomain:BTHTTPErrorDomain code:BTHTTPErrorCodeMissingBaseURL userInfo:errorUserInfo]); - return; - } - - NSURLComponents *components = [NSURLComponents componentsWithString:fullPathURL.absoluteString]; - - NSMutableDictionary *headers = [NSMutableDictionary dictionaryWithDictionary:self.defaultHeaders]; - - NSMutableURLRequest *request; - - if ([method isEqualToString:@"GET"] || [method isEqualToString:@"DELETE"]) { - if (isNotDataURL) { - NSString *encodedParametersString = [BTURLUtils queryStringWithDictionary:parameters]; - components.percentEncodedQuery = encodedParametersString; - } - request = [NSMutableURLRequest requestWithURL:components.URL]; - } else { - request = [NSMutableURLRequest requestWithURL:components.URL]; - - NSError *jsonSerializationError; - NSData *bodyData; - - if ([parameters isKindOfClass:[NSDictionary class]]) { - bodyData = [NSJSONSerialization dataWithJSONObject:parameters - options:0 - error:&jsonSerializationError]; - } - - if (jsonSerializationError != nil) { - completionBlock(nil, nil, jsonSerializationError); - return; - } - - [request setHTTPBody:bodyData]; - headers[@"Content-Type"] = @"application/json; charset=utf-8"; - } - if (self.tokenizationKey) { - headers[@"Client-Key"] = self.tokenizationKey; - } - [request setAllHTTPHeaderFields:headers]; - - [request setHTTPMethod:method]; - - // Perform the actual request - NSURLSessionTask *task = [self.session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - [self handleRequestCompletion:data response:response error:error completionBlock:completionBlock]; - }]; - [task resume]; -} - -- (void)handleRequestCompletion:(NSData *)data response:(NSURLResponse *)response error:(NSError *)error completionBlock:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock { - // Handle errors for which the response is irrelevant - // e.g. SSL, unavailable network, etc. - if (error != nil) { - [self callCompletionBlock:completionBlock body:nil response:nil error:error]; - return; - } - - NSHTTPURLResponse *httpResponse; - if ([response isKindOfClass:[NSHTTPURLResponse class]]) { - httpResponse = (NSHTTPURLResponse *)response; - } else if ([response.URL.scheme isEqualToString:@"data"]) { - httpResponse = [[NSHTTPURLResponse alloc] initWithURL:response.URL statusCode:200 HTTPVersion:nil headerFields:nil]; - } - - NSString *responseContentType = [response MIMEType]; - - NSMutableDictionary *errorUserInfo = [NSMutableDictionary new]; - errorUserInfo[BTHTTPURLResponseKey] = httpResponse; - - if (httpResponse.statusCode >= 400) { - errorUserInfo[NSLocalizedFailureReasonErrorKey] = [NSHTTPURLResponse localizedStringForStatusCode:httpResponse.statusCode]; - - BTJSON *json; - if ([responseContentType isEqualToString:@"application/json"]) { - json = (data.length == 0) ? [BTJSON new] : [[BTJSON alloc] initWithData:data]; - if (!json.isError) { - errorUserInfo[BTHTTPJSONResponseBodyKey] = json; - NSString *errorResponseMessage = [json[@"error"][@"message"] asString]; - if (errorResponseMessage) { - errorUserInfo[NSLocalizedDescriptionKey] = errorResponseMessage; - } - } - } - - BTHTTPErrorCode errorCode = httpResponse.statusCode >= 500 ? BTHTTPErrorCodeServerError : BTHTTPErrorCodeClientError; - if (httpResponse.statusCode == 429) { - errorCode = BTHTTPErrorCodeRateLimitError; - errorUserInfo[NSLocalizedDescriptionKey] = @"You are being rate-limited."; - errorUserInfo[NSLocalizedRecoverySuggestionErrorKey] = @"Please try again in a few minutes."; - } else if (httpResponse.statusCode >= 500) { - errorUserInfo[NSLocalizedRecoverySuggestionErrorKey] = @"Please try again later."; - } - - NSError *error = [NSError errorWithDomain:BTHTTPErrorDomain - code:errorCode - userInfo:[errorUserInfo copy]]; - [self callCompletionBlock:completionBlock body:json response:httpResponse error:error]; - return; - } - - // Empty response is valid - BTJSON *json = (data.length == 0) ? [BTJSON new] : [[BTJSON alloc] initWithData:data]; - if (json.isError) { - if (![responseContentType isEqualToString:@"application/json"]) { - // Return error for unsupported response type - errorUserInfo[NSLocalizedFailureReasonErrorKey] = [NSString stringWithFormat:@"BTHTTP only supports application/json responses, received Content-Type: %@", responseContentType]; - NSError *returnedError = [NSError errorWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeResponseContentTypeNotAcceptable - userInfo:[errorUserInfo copy]]; - [self callCompletionBlock:completionBlock body:nil response:nil error:returnedError]; - } else { - [self callCompletionBlock:completionBlock body:nil response:nil error:json.asError]; - } - return; - } - - [self callCompletionBlock:completionBlock body:json response:httpResponse error:nil]; -} - -- (void)callCompletionBlock:(void(^)(BTJSON *body, NSHTTPURLResponse *response, NSError *error))completionBlock - body:(BTJSON *)jsonBody - response:(NSHTTPURLResponse *)response - error:(NSError *)error { - if (completionBlock) { - dispatch_async(self.dispatchQueue, ^{ - completionBlock(jsonBody, response, error); - }); - } -} - -- (dispatch_queue_t)dispatchQueue { - return _dispatchQueue ?: dispatch_get_main_queue(); -} - -#pragma mark - Default Headers - -- (NSDictionary *)defaultHeaders { - return @{ @"User-Agent": [self userAgentString], - @"Accept": [self acceptString], - @"Accept-Language": [self acceptLanguageString] }; -} - -- (NSString *)userAgentString { - return [NSString stringWithFormat:@"Braintree/iOS/%@", BRAINTREE_VERSION]; -} - -- (NSString *)platformString { - size_t size = 128; - char *hwModel = alloca(size); - - if (sysctlbyname("hw.model", hwModel, &size, NULL, 0) != 0) { - return nil; - } - - NSString *hwModelString = [NSString stringWithCString:hwModel encoding:NSUTF8StringEncoding]; -#if TARGET_IPHONE_SIMULATOR - hwModelString = [hwModelString stringByAppendingString:@"(simulator)"]; -#endif - return hwModelString; -} - -- (NSString *)architectureString { - size_t size = 128; - char *hwMachine = alloca(size); - - if (sysctlbyname("hw.machine", hwMachine, &size, NULL, 0) != 0) { - return nil; - } - - return [NSString stringWithCString:hwMachine encoding:NSUTF8StringEncoding]; -} - -- (NSString *)acceptString { - return @"application/json"; -} - -- (NSString *)acceptLanguageString { - NSLocale *locale = [NSLocale currentLocale]; - return [NSString stringWithFormat:@"%@-%@", - [locale objectForKey:NSLocaleLanguageCode], - [locale objectForKey:NSLocaleCountryCode]]; -} - -#pragma mark - Helpers - -- (NSArray *)pinnedCertificateData { - NSMutableArray *pinnedCertificates = [NSMutableArray array]; - for (NSData *certificateData in self.pinnedCertificates) { - [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)]; - } - return pinnedCertificates; -} - -- (void)URLSession:(__unused NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler { - if ([[[challenge protectionSpace] authenticationMethod] isEqualToString:NSURLAuthenticationMethodServerTrust]) { - NSString *domain = challenge.protectionSpace.host; - SecTrustRef serverTrust = [[challenge protectionSpace] serverTrust]; - - NSArray *policies = @[(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; - SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); - SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)self.pinnedCertificateData); - SecTrustResultType result; - - OSStatus errorCode = SecTrustEvaluate(serverTrust, &result); - - BOOL evaluatesAsTrusted = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); - if (errorCode == errSecSuccess && evaluatesAsTrusted) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - completionHandler(NSURLSessionAuthChallengeUseCredential, credential); - } else { - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); - } - } else { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); - } -} - -- (BOOL)isEqualToHTTP:(BTHTTP *)http { - return [self.baseURL isEqual:http.baseURL] && [self.authorizationFingerprint isEqualToString:http.authorizationFingerprint]; -} - -- (BOOL)isEqual:(id)object { - if (self == object) { - return YES; - } - - if ([object isKindOfClass:[BTHTTP class]]) { - return [self isEqualToHTTP:object]; - } - - return NO; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTPErrors.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTPErrors.m deleted file mode 100755 index 917a5ab4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTHTTPErrors.m +++ /dev/null @@ -1,7 +0,0 @@ -#import "BTHTTPErrors.h" - -NSString * const BTHTTPErrorDomain = @"com.braintreepayments.BTHTTPErrorDomain"; - -NSString * const BTHTTPURLResponseKey = @"com.braintreepayments.BTHTTPURLResponseKey"; - -NSString * const BTHTTPJSONResponseBodyKey = @"com.braintreepayments.BTHTTPJSONResponseBodyKey"; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTJSON.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTJSON.m deleted file mode 100755 index b9bff2cf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTJSON.m +++ /dev/null @@ -1,257 +0,0 @@ -#import "BTJSON.h" - -NSString * const BTJSONErrorDomain = @"com.briantreepayments.BTJSONErrorDomain"; - -@interface BTJSON () - -@property (nonatomic, strong) NSArray *subscripts; -@property (nonatomic, strong) id value; - -@end - -@implementation BTJSON - -@synthesize value = _value; - -- (instancetype)init { - self = [super init]; - if (self) { - self.subscripts = [NSMutableArray array]; - self.value = @{}; - } - return self; -} - -- (instancetype)initWithData:(NSData *)data { - NSError *error; - id value = [NSJSONSerialization JSONObjectWithData:data - options:NSJSONReadingAllowFragments - error:&error]; - if (error != nil) { - return self = [self initWithValue:error]; - } - - return self = [self initWithValue:value]; -} - -- (instancetype)initWithValue:(id)value { - self = [self init]; - if (self) { - self.value = value; - } - return self; -} - - -#pragma mark Subscripting - -- (id)objectForKeyedSubscript:(NSString *)key { - BTJSON *json = [[BTJSON alloc] initWithValue:_value]; - json.subscripts = [self.subscripts arrayByAddingObject:key]; - - return json; -} - -- (id)objectAtIndexedSubscript:(NSUInteger)idx { - BTJSON *json = [[BTJSON alloc] initWithValue:_value]; - json.subscripts = [self.subscripts arrayByAddingObject:@(idx)]; - - return json; -} - -- (id)value { - id value = _value; - for (id key in self.subscripts) { - if ([value isKindOfClass:[NSArray class]]) { - if (![key isKindOfClass:[NSNumber class]]) { - value = [self chainedErrorOrErrorWithCode:BTJSONErrorAccessInvalid userInfo:nil]; - break; - } - - NSUInteger idx = [(NSNumber *)key unsignedIntegerValue]; - if (idx >= [(NSArray *)value count]) { - value = nil; - break; - } - - value = [value objectAtIndexedSubscript:idx]; - } else if ([value isKindOfClass:[NSDictionary class]]) { - if (![key isKindOfClass:[NSString class]]) { - value = [self chainedErrorOrErrorWithCode:BTJSONErrorAccessInvalid userInfo:nil]; - break; - } - - value = [value objectForKeyedSubscript:key]; - } else { - value = [self chainedErrorOrErrorWithCode:BTJSONErrorValueInvalid userInfo:@{ NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Attempted to index into a value that is neither an object nor an array using key (%@).", key] }]; - break; - } - } - return value; -} - -#pragma mark Validity Checks - -- (BOOL)isError { - return [self.value isKindOfClass:[NSError class]]; -} - -- (NSError *)asError { - if (![self.value isKindOfClass:[NSError class]]) { - return nil; - } - - return self.value; -} - -#pragma mark Generating JSON - -- (NSData *)asJSONAndReturnError:(NSError **)error { - return [NSJSONSerialization dataWithJSONObject:self.value - options:0 - error:error]; -} - -- (NSString *)asPrettyJSONAndReturnError:(NSError **)error { - return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:self.value - options:NSJSONWritingPrettyPrinted - error:error] - encoding:NSUTF8StringEncoding]; -} - - -#pragma mark JSON Type Casts - -- (NSString *)asString { - if (![self.value isKindOfClass:[NSString class]]) { - return nil; - } - - return self.value; -} - -- (NSArray *)asArray { - if (![self.value isKindOfClass:[NSArray class]]) { - return nil; - } - - return self.value; -} - -- (NSDecimalNumber *)asNumber { - if (![self.value isKindOfClass:[NSNumber class]]) { - return nil; - } - - return [NSDecimalNumber decimalNumberWithDecimal:[self.value decimalValue]]; -} - -#pragma mark JSON Extension Type Casts - -- (NSURL *)asURL { - NSString *urlString = self.asString; - - if (urlString == nil) { - return nil; - } - - return [NSURL URLWithString:urlString]; -} - -- (NSArray *)asStringArray { - NSArray *array = (NSArray *)self.asArray; - - for (id obj in array) { - if (![obj isKindOfClass:[NSString class]]) { - return nil; - } - } - - return array; -} - -- (NSDictionary *)asDictionary { - NSDictionary *dictionary = self.value; - - if (![dictionary isKindOfClass:[NSDictionary class]]) { - return nil; - } - - return dictionary; -} - -- (NSInteger)asIntegerOrZero { - NSNumber *number = self.value; - - if (![number isKindOfClass:[NSNumber class]]) { - return 0; - } - - return number.integerValue; -} - -- (NSInteger)asEnum:(nonnull NSDictionary *)mapping orDefault:(NSInteger)defaultValue { - id key = self.value; - NSNumber *value = mapping[key]; - - if (!value || ![value isKindOfClass:[NSNumber class]]) { - return defaultValue; - } - - return value.integerValue; -} - -// @name JSON Type Checks - -- (BOOL)isString { - return [self.value isKindOfClass:[NSString class]]; -} - -- (BOOL)isNumber { - return [self.value isKindOfClass:[NSNumber class]]; -} - -- (BOOL)isArray { - return [self.value isKindOfClass:[NSArray class]]; -} - -- (BOOL)isObject { - return [self.value isKindOfClass:[NSDictionary class]]; -} - -- (BOOL)isTrue { - return [self.value isEqual:@YES]; -} - -- (BOOL)isFalse { - return [self.value isEqual:@NO]; -} - -- (BOOL)isNull { - return [self.value isKindOfClass:[NSNull class]]; -} - -#pragma mark Error Handling - -- (NSError *)chainedErrorOrErrorWithCode:(NSInteger)code - userInfo:(NSDictionary *)userInfo { - if ([_value isKindOfClass:[NSError class]]) { - return _value; - } - - return [NSError errorWithDomain:BTJSONErrorDomain - code:code - userInfo:userInfo]; -} - -#pragma mark - - -- (NSString *)description { - return [self debugDescription]; -} - -- (NSString *)debugDescription { - return [NSString stringWithFormat:@"", self, self.value]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.h deleted file mode 100755 index 99b7e12a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.h +++ /dev/null @@ -1,12 +0,0 @@ -#import - -@interface BTKeychain : NSObject - -+ (BOOL)setString:(NSString *)string forKey:(NSString *)key; -+ (NSString *)stringForKey:(NSString *)key; - -+ (BOOL)setData:(NSData *)data forKey:(NSString *)key; -+ (NSData *)dataForKey:(NSString *)key; - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.m deleted file mode 100755 index fb631afc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTKeychain.m +++ /dev/null @@ -1,98 +0,0 @@ -#import "BTKeychain.h" -@import Security; - -@implementation BTKeychain - -+ (BOOL)setString:(NSString *)string forKey:(NSString *)key { - NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding]; - return [self setData:data forKey:key]; -} - -+ (NSString *)stringForKey:(NSString *)key { - NSData *data = [self dataForKey:key]; - return data == nil ? nil : [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -} - -+ (NSString *)keychainKeyForKey:(NSString *)key { - return [NSString stringWithFormat:@"com.braintreepayments.Braintree-API.%@", key]; -} - -+ (BOOL)setData:(NSData *)data forKey:(NSString *)key { - if(!key) { - return NO; - } - - BOOL success = YES; - - key = [self keychainKeyForKey:key]; - - // First check if it already exists, by creating a search dictionary and requesting that - // nothing be returned, and performing the search anyway. - NSMutableDictionary *existsQueryDictionary = [NSMutableDictionary dictionary]; - - [existsQueryDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass]; - - // Add the keys to the search dict - [existsQueryDictionary setObject:@"Service" forKey:(__bridge id)kSecAttrService]; - [existsQueryDictionary setObject:key forKey:(__bridge id)kSecAttrAccount]; - - OSStatus res = SecItemCopyMatching((__bridge CFDictionaryRef)existsQueryDictionary, NULL); - if(res == errSecItemNotFound) { - if(data) { - NSMutableDictionary *addDict = existsQueryDictionary; - [addDict setObject:data forKey:(__bridge id)kSecValueData]; - [addDict setObject:(__bridge id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly forKey:(__bridge id)kSecAttrAccessible]; - - res = SecItemAdd((__bridge CFDictionaryRef)addDict, NULL); - if (res != errSecSuccess) { - success = NO; - } - } - } - else if(res == errSecSuccess) { - if(data) { - // Modify an existing one - // Actually pull it now of the keychain at this point. - NSDictionary *attributeDict = [NSDictionary dictionaryWithObject:data forKey:(__bridge id)kSecValueData]; - - res = SecItemUpdate((__bridge CFDictionaryRef)existsQueryDictionary, (__bridge CFDictionaryRef)attributeDict); - if (res != errSecSuccess) { - success = NO; - } - } else { - SecItemDelete((__bridge CFDictionaryRef)existsQueryDictionary); - } - } - else { - success = NO; - } - - return success; -} - -+ (NSData *)dataForKey:(NSString *)key { - - key = [self keychainKeyForKey:key]; - - NSMutableDictionary *existsQueryDictionary = [NSMutableDictionary dictionary]; - - [existsQueryDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass]; - - // Add the keys to the search dict - [existsQueryDictionary setObject:@"Service" forKey:(__bridge id)kSecAttrService]; - [existsQueryDictionary setObject:key forKey:(__bridge id)kSecAttrAccount]; - - // We want the data back! - [existsQueryDictionary setObject:(id)kCFBooleanTrue forKey:(__bridge id)kSecReturnData]; - - CFTypeRef cfData = NULL; - OSStatus res = SecItemCopyMatching((__bridge CFDictionaryRef)existsQueryDictionary, &cfData); - NSData *data = (id)CFBridgingRelease(cfData); - if(res == errSecSuccess) { - return data; - } - - return nil; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger.m deleted file mode 100755 index 83bbda15..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger.m +++ /dev/null @@ -1,85 +0,0 @@ -#import - -#import "BTLogger_Internal.h" - -#define variadicLogLevel(level, format) \ - va_list args; \ - va_start(args, format); \ - [self logLevel:level format:format arguments:args]; \ - va_end(args); - - -@implementation BTLogger - -+ (instancetype)sharedLogger { - static BTLogger *instance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - instance = [self new]; - }); - - return instance; -} - -- (instancetype)init { - self = [super init]; - if (self) { - _level = BTLogLevelInfo; - } - return self; -} - -- (void)log:(NSString *)format, ... { - variadicLogLevel(BTLogLevelInfo, format) -} - -- (void)critical:(NSString *)format, ... { - variadicLogLevel(BTLogLevelCritical, format) -} - -- (void)error:(NSString *)format, ... { - variadicLogLevel(BTLogLevelError, format) -} - -- (void)warning:(NSString *)format, ... { - variadicLogLevel(BTLogLevelWarning, format) -} - -- (void)info:(NSString *)format, ... { - variadicLogLevel(BTLogLevelInfo, format) -} - -- (void)debug:(NSString *)format, ... { - variadicLogLevel(BTLogLevelDebug, format) -} - -- (void)logLevel:(BTLogLevel)level format:(NSString *)format arguments:(va_list)arguments { - if (level <= self.level) { - NSString *message = [[NSString alloc] initWithFormat:format arguments:arguments]; - if (self.logBlock) { - self.logBlock(level, message); - } else { - NSString *levelString = [[self class] levelString:level]; - NSLog(@"[BraintreeSDK] %@ %@", [levelString uppercaseString], message); - } - } -} - -+ (NSString *)levelString:(BTLogLevel)level { - switch (level) { - case BTLogLevelCritical: - return @"Critical"; - case BTLogLevelError: - return @"Error"; - case BTLogLevelWarning: - return @"Warning"; - case BTLogLevelInfo: - return @"Info"; - case BTLogLevelDebug: - return @"Debug"; - default: - return nil; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger_Internal.h deleted file mode 100755 index 1a625e35..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTLogger_Internal.h +++ /dev/null @@ -1,19 +0,0 @@ -#import - -#import "BTLogger.h" - -@interface BTLogger () - -- (void)log:(NSString *)format, ...; -- (void)critical:(NSString *)format, ...; -- (void)error:(NSString *)format, ...; -- (void)warning:(NSString *)format, ...; -- (void)info:(NSString *)format, ...; -- (void)debug:(NSString *)format, ...; - -/*! - @brief Custom block for handling log messages -*/ -@property (nonatomic, copy) void (^logBlock)(BTLogLevel level, NSString *message); - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonce.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonce.m deleted file mode 100755 index 8d5d4fbc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonce.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "BTPaymentMethodNonce.h" - -@interface BTPaymentMethodNonce () -@property (nonatomic, copy, readwrite) NSString *nonce; -@property (nonatomic, copy, readwrite) NSString *localizedDescription; -@property (nonatomic, copy, readwrite) NSString *type; -@property (nonatomic, readwrite, assign) BOOL isDefault; -@end - -@implementation BTPaymentMethodNonce - -- (instancetype)initWithNonce:(NSString *)nonce localizedDescription:(NSString *)description type:(NSString *)type { - if (!nonce) return nil; - - if (self = [super init]) { - self.nonce = nonce; - self.localizedDescription = description; - self.type = type; - } - return self; -} - -- (nullable instancetype)initWithNonce:(NSString *)nonce localizedDescription:(nullable NSString *)description { - return [self initWithNonce:nonce localizedDescription:description type:@"Unknown"]; -} - -- (nullable instancetype)initWithNonce:(NSString *)nonce localizedDescription:(NSString *)description type:(nonnull NSString *)type isDefault:(BOOL)isDefault { - if (self = [self initWithNonce:nonce localizedDescription:description type:type]) { - _isDefault = isDefault; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonceParser.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonceParser.m deleted file mode 100755 index 64f5c7e8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPaymentMethodNonceParser.m +++ /dev/null @@ -1,61 +0,0 @@ -#import "BTPaymentMethodNonce.h" -#import "BTPaymentMethodNonceParser.h" - -@interface BTPaymentMethodNonceParser () - -/// Dictionary of JSON parsing blocks keyed by types as strings. The blocks have the following type: -/// -/// `BTPaymentMethodNonce *(^)(NSDictionary *json)` -@property (nonatomic, strong) NSMutableDictionary *JSONParsingBlocks; - -@end - -@implementation BTPaymentMethodNonceParser - -+ (instancetype)sharedParser { - static BTPaymentMethodNonceParser *sharedParser; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedParser = [[BTPaymentMethodNonceParser alloc] init]; - }); - return sharedParser; -} - -- (NSMutableDictionary *)JSONParsingBlocks { - if (!_JSONParsingBlocks) { - _JSONParsingBlocks = [NSMutableDictionary dictionary]; - } - return _JSONParsingBlocks; -} - -- (BOOL)isTypeAvailable:(NSString *)type { - return self.JSONParsingBlocks[type] != nil; -} - -- (NSArray *)allTypes { - return self.JSONParsingBlocks.allKeys; -} - -- (void)registerType:(NSString *)type withParsingBlock:(BTPaymentMethodNonce *(^)(BTJSON *))jsonParsingBlock { - if (jsonParsingBlock) { - self.JSONParsingBlocks[type] = [jsonParsingBlock copy]; - } -} - -- (BTPaymentMethodNonce *)parseJSON:(BTJSON *)json withParsingBlockForType:(NSString *)type { - BTPaymentMethodNonce *(^block)(BTJSON *) = self.JSONParsingBlocks[type]; - if (!json) { - return nil; - } - if (block) { - return block(json); - } - // Unregistered types should fall back to parsing basic nonce and description from JSON - if (![json[@"nonce"] isString]) return nil; - return [[BTPaymentMethodNonce alloc] initWithNonce:[json[@"nonce"] asString] - localizedDescription:[json[@"description"] asString] - type:@"Unknown" - isDefault:[json[@"default"] isTrue]]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPostalAddress.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPostalAddress.m deleted file mode 100755 index 25a3121e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTPostalAddress.m +++ /dev/null @@ -1,24 +0,0 @@ -#import "BTPostalAddress.h" - -@implementation BTPostalAddress - -// Property names follow the `Braintree_Address` convention as documented at: -// https://developers.braintreepayments.com/ios+php/reference/response/address - -- (id)copyWithZone:(__unused NSZone *)zone { - BTPostalAddress *address = [[BTPostalAddress alloc] init]; - address.recipientName = self.recipientName; - address.streetAddress = self.streetAddress; - address.extendedAddress = self.extendedAddress; - address.locality = self.locality; - address.countryCodeAlpha2 = self.countryCodeAlpha2; - address.postalCode = self.postalCode; - address.region = self.region; - return address; -} - -- (NSString *)debugDescription { - return [NSString stringWithFormat:@"<%@:%p \"%@\" %@, %@, %@, %@, %@ %@ %@>", NSStringFromClass([self class]), self, [self description], self.recipientName, self.streetAddress, self.extendedAddress, self.locality, self.region, self.postalCode, self.countryCodeAlpha2]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTTokenizationService.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTTokenizationService.m deleted file mode 100755 index d1f5a192..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTTokenizationService.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "BTTokenizationService.h" - -NSString * const BTTokenizationServiceErrorDomain = @"com.braintreepayments.BTTokenizationServiceErrorDomain"; -NSString * const BTTokenizationServiceViewPresentingDelegateOption = @"viewControllerPresentingDelegate"; -NSString * const BTTokenizationServiceAppSwitchDelegateOption = @"BTTokenizationServiceAppSwitchDelegateOption"; -NSString * const BTTokenizationServicePayPalScopesOption = @"BTPaymentRequest.additionalPayPalScopes"; -NSString * const BTTokenizationServiceAmountOption = @"BTTokenizationServiceAmountOption"; -NSString * const BTTokenizationServiceNonceOption = @"BTTokenizationServiceNonceOption"; - -@interface BTTokenizationService () -/// Dictionary of tokenization blocks keyed by types as strings. The blocks have the following type: -/// -/// `void (^)(BTAPIClient * _Nonnull, NSDictionary * _Nullable, void (^ _Nonnull)(BTPaymentMethodNonce * _Nullable, NSError * _Nullable))` -@property (nonatomic, strong) NSMutableDictionary *tokenizationBlocks; -@end - -@implementation BTTokenizationService - -+ (instancetype)sharedService { - static BTTokenizationService *sharedService; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedService = [[BTTokenizationService alloc] init]; - }); - return sharedService; -} - -- (NSMutableDictionary *)tokenizationBlocks { - if (!_tokenizationBlocks) { - _tokenizationBlocks = [NSMutableDictionary dictionary]; - } - return _tokenizationBlocks; -} - -- (void)registerType:(NSString *)type withTokenizationBlock:(void (^)(BTAPIClient * _Nonnull, NSDictionary * _Nullable, void (^ _Nonnull)(BTPaymentMethodNonce * _Nullable, NSError * _Nullable)))tokenizationBlock -{ - self.tokenizationBlocks[type] = [tokenizationBlock copy]; -} - -- (BOOL)isTypeAvailable:(NSString *)type { - return self.tokenizationBlocks[type] != nil; -} - -- (NSArray *)allTypes { - return [self.tokenizationBlocks allKeys]; -} - -- (void)tokenizeType:(NSString *)type - withAPIClient:(BTAPIClient *)apiClient - completion:(void (^)(BTPaymentMethodNonce * _Nullable, NSError * _Nullable))completion -{ - [self tokenizeType:type options:nil withAPIClient:apiClient completion:completion]; -} - -- (void)tokenizeType:(NSString *)type - options:(NSDictionary *)options - withAPIClient:(BTAPIClient *)apiClient - completion:(void (^)(BTPaymentMethodNonce * _Nullable, NSError * _Nullable))completion -{ - void(^block)(BTAPIClient *, NSDictionary *, void(^)(BTPaymentMethodNonce *, NSError *)) = self.tokenizationBlocks[type]; - if (block) { - block(apiClient, options ?: @{}, completion); - } else { - NSError *error = [NSError errorWithDomain:BTTokenizationServiceErrorDomain - code:BTTokenizationServiceErrorTypeNotRegistered - userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:@"%@ processing not available", type], - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Type '%@' is not registered with BTTokenizationService", type], - NSLocalizedRecoverySuggestionErrorKey: [NSString stringWithFormat:@"Please link Braintree%@.framework to your app", type] - }]; - completion(nil, error); - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.h deleted file mode 100755 index 4930ff3c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface BTURLUtils : NSObject - -+ (NSURL *)URLfromURL:(NSURL *)URL withAppendedQueryDictionary:(NSDictionary *)dictionary; -+ (NSString *)queryStringWithDictionary:(NSDictionary *)dict; -+ (NSDictionary *)dictionaryForQueryString:(NSString *)queryString; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.m deleted file mode 100755 index 2d28fdd4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/BTURLUtils.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "BTURLUtils.h" - -@implementation BTURLUtils - -+ (NSURL *)URLfromURL:(NSURL *)URL withAppendedQueryDictionary:(NSDictionary *)dictionary { - if (!URL) { - return nil; - } - - NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - urlComponents.percentEncodedQuery = [self queryStringWithDictionary:dictionary]; - return urlComponents.URL; -} - -+ (NSString *)queryStringWithDictionary:(NSDictionary *)dict { - NSMutableString *queryString = [NSMutableString string]; - for (id key in dict) { - NSString *encodedKey = [self stringByURLEncodingAllCharactersInString:[key description]]; - id value = [dict objectForKey:key]; - if([value isKindOfClass:[NSArray class]]) { - for(id obj in value) { - [queryString appendFormat:@"%@%%5B%%5D=%@&", - encodedKey, - [self stringByURLEncodingAllCharactersInString:[obj description]] - ]; - } - } else if([value isKindOfClass:[NSDictionary class]]) { - for(id subkey in value) { - [queryString appendFormat:@"%@%%5B%@%%5D=%@&", - encodedKey, - [self stringByURLEncodingAllCharactersInString:[subkey description]], - [self stringByURLEncodingAllCharactersInString:[[value objectForKey:subkey] description]] - ]; - } - } else if([value isKindOfClass:[NSNull class]]) { - [queryString appendFormat:@"%@=&", encodedKey]; - } else { - [queryString appendFormat:@"%@=%@&", - encodedKey, - [self stringByURLEncodingAllCharactersInString:[value description]] - ]; - } - } - if([queryString length] > 0) { - [queryString deleteCharactersInRange:NSMakeRange([queryString length] - 1, 1)]; // remove trailing & - } - return queryString; -} - -+ (NSString *)stringByURLEncodingAllCharactersInString:(NSString *)aString { - // See Section 2.2. http://www.ietf.org/rfc/rfc2396.txt - NSString *reservedCharacters = @";/?:@&=+$,"; - - NSMutableCharacterSet *URLQueryPartAllowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; - [URLQueryPartAllowedCharacterSet removeCharactersInString:reservedCharacters]; - - return [aString stringByAddingPercentEncodingWithAllowedCharacters:URLQueryPartAllowedCharacterSet]; -} - -+ (NSDictionary *)dictionaryForQueryString:(NSString *)queryString { - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - NSArray *components = [queryString componentsSeparatedByString:@"&"]; - for (NSString *keyValueString in components) { - if ([keyValueString length] == 0) { - continue; - } - - NSArray *keyValueArray = [keyValueString componentsSeparatedByString:@"="]; - NSString *key = [self percentDecodedStringForString:keyValueArray[0]]; - if (!key) { - continue; - } - if (keyValueArray.count == 2) { - NSString *value = [self percentDecodedStringForString:keyValueArray[1]]; - parameters[key] = value; - } else { - parameters[key] = [NSNull null]; - } - } - return [NSDictionary dictionaryWithDictionary:parameters]; -} - -+ (NSString *)percentDecodedStringForString:(NSString *)string { - return [[string stringByReplacingOccurrencesOfString:@"+" withString:@" "] stringByRemovingPercentEncoding]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Braintree-Version.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Braintree-Version.h deleted file mode 100755 index ba9afb86..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Braintree-Version.h +++ /dev/null @@ -1 +0,0 @@ -#define BRAINTREE_VERSION (@"4.8.4") diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Info.plist b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Info.plist deleted file mode 100755 index d0786bc0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.8.4 - CFBundleSignature - ???? - CFBundleVersion - 4.8.4 - NSPrincipalClass - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAPIClient.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAPIClient.h deleted file mode 100755 index 306e7db4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAPIClient.h +++ /dev/null @@ -1,112 +0,0 @@ -#import -#import "BTClientMetadata.h" -#import "BTConfiguration.h" -#import "BTJSON.h" - -@class BTPaymentMethodNonce; - -NS_ASSUME_NONNULL_BEGIN - -extern NSString *const BTAPIClientErrorDomain; - -typedef NS_ENUM(NSInteger, BTAPIClientErrorType) { - BTAPIClientErrorTypeUnknown = 0, - - /// Configuration fetch failed - BTAPIClientErrorTypeConfigurationUnavailable, - - /// The authorization provided to the API client is insufficient - BTAPIClientErrorTypeNotAuthorized, -}; - -/*! - @class BTAPIClient - @brief This class acts as the entry point for accessing the Braintree APIs via common HTTP methods performed on API endpoints. - @discussion It also manages authentication via tokenization key and provides access to a merchant's gateway configuration. -*/ -@interface BTAPIClient : NSObject - -/*! - @brief Initialize a new API client. - - @param authorization Your tokenization key or client token. Passing an invalid value may return `nil`. - @return A Braintree API client, or `nil` if initialization failed. -*/ -- (nullable instancetype)initWithAuthorization:(NSString *)authorization; - -/*! - @brief Create a copy of an existing API client, but specify a new source and integration type. - @discussion This provides a way to override an API client's source and integration metadata, which - is captured and sent to Braintree as part of the analytics we track. -*/ -- (instancetype)copyWithSource:(BTClientMetadataSourceType)source - integration:(BTClientMetadataIntegrationType)integration; - -/*! - @brief Provides configuration data as a `BTJSON` object. - - @discussion The configuration data can be used by supported payment options to configure themselves - dynamically through the Control Panel. It also contains configuration options for the - Braintree SDK Core components. - - @note This method is asynchronous because it requires a network call to fetch the - configuration for a merchant account from Braintree servers. This configuration is - cached on subsequent calls for better performance. -*/ -- (void)fetchOrReturnRemoteConfiguration:(void (^)(BTConfiguration * _Nullable configuration, NSError * _Nullable error))completionBlock; - -/*! - @brief Fetches a customer's vaulted payment method nonces. - - @discussion Must be using client token with a customer ID specified. - - @param completion Callback that returns an array of payment method nonces. - On success, `paymentMethodNonces` contains the nonces and `error` is `nil`. The default payment method nonce, if one exists, will be first. - On failure, `error` contains the error that occured and `paymentMethodNonces` is `nil`. -*/ -- (void)fetchPaymentMethodNonces:(void(^)(NSArray * _Nullable paymentMethodNonces, NSError * _Nullable error))completion; - -/*! - @brief Fetches a customer's vaulted payment method nonces. - - @discussion Must be using client token with a customer ID specified. - - @param defaultFirst Specifies whether to sorts the fetched payment method nonces with the default payment method or the most recently used payment method first - @param completion Callback that returns an array of payment method nonces -*/ -- (void)fetchPaymentMethodNonces:(BOOL)defaultFirst - completion:(void(^)(NSArray * _Nullable paymentMethodNonces, NSError * _Nullable error))completion; - -/*! - @brief Perfom an HTTP GET on a URL composed of the configured from environment and the given path. - - @param path The endpoint URI path. - @param parameters Optional set of query parameters to be encoded with the request. - @param completionBlock A block object to be executed when the request finishes. - On success, `body` and `response` will contain the JSON body response and the - HTTP response and `error` will be `nil`; on failure, `body` and `response` will be - `nil` and `error` will contain the error that occurred. -*/ -- (void)GET:(NSString *)path - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -/*! - @brief Perfom an HTTP POST on a URL composed of the configured from environment and the given path. - - @param path The endpoint URI path. - @param parameters Optional set of parameters to be JSON encoded and sent in the body of the request. - @param completionBlock A block object to be executed when the request finishes. - On success, `body` and `response` will contain the JSON body response and the - HTTP response and `error` will be `nil`; on failure, `body` and `response` will be - `nil` and `error` will contain the error that occurred. -*/ -- (void)POST:(NSString *)path - parameters:(nullable NSDictionary *)parameters - completion:(nullable void(^)(BTJSON * _Nullable body, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error))completionBlock; - -- (instancetype)init __attribute__((unavailable("Use initWithAuthorization: instead."))); - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAppSwitch.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAppSwitch.h deleted file mode 100755 index e424b55e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTAppSwitch.h +++ /dev/null @@ -1,171 +0,0 @@ -#import - -@protocol BTAppSwitchHandler; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - BTAppSwitch - -/*! - @class BTAppSwitch - @brief Handles return URLs when returning from app switch and routes the return URL to the correct app switch handler class. - @discussion `returnURLScheme` must contain your app's registered URL Type that starts with the app's bundle - ID. When your app returns from app switch, the app delegate should call `handleOpenURL:sourceApplication:` -*/ -@interface BTAppSwitch : NSObject - -/*! - @brief The URL scheme to return to this app after switching to another app. - - @discussion This URL scheme must be registered as a URL Type in the app's info.plist, and it must start with the app's bundle ID. -*/ -@property (nonatomic, copy) NSString *returnURLScheme; - -/*! - @brief The singleton instance -*/ -+ (instancetype)sharedInstance; - -/*! - @brief Sets the return URL scheme for your app. - - @discussion This must be configured if your app integrates a payment option that may switch to either - Mobile Safari or to another app to finish the payment authorization workflow. - - @param returnURLScheme The return URL scheme -*/ -+ (void)setReturnURLScheme:(NSString *)returnURLScheme; - -/*! - @brief Handles a return from app switch - - @param url The URL that was opened to return to your app - @param sourceApplication The source app that requested the launch of your app - @return `YES` if the app switch successfully handled the URL, or `NO` if the attempt to handle the URL failed. -*/ -+ (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication; - -/*! - @brief Handles a return from app switch - - @param url The URL that was opened to return to your app - @param options The options dictionary provided by `application:openURL:options:` - @return `YES` if the app switch successfully handled the URL, or `NO` if the attempt to handle the URL failed. -*/ -+ (BOOL)handleOpenURL:(NSURL *)url options:(NSDictionary *)options; - -/*! - @brief Registers a class that knows how to handle a return from app switch -*/ -- (void)registerAppSwitchHandler:(Class)handler; - -/*! - @brief Unregisters a class that knows how to handle a return from app switch -*/ -- (void)unregisterAppSwitchHandler:(Class)handler; - -- (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; - -@end - -#pragma mark - BTAppSwitchDelegate - -extern NSString * const BTAppSwitchWillSwitchNotification; -extern NSString * const BTAppSwitchDidSwitchNotification; -extern NSString * const BTAppSwitchWillProcessPaymentInfoNotification; -extern NSString * const BTAppSwitchNotificationTargetKey; - -/*! - @brief Specifies the destination of an app switch -*/ -typedef NS_ENUM(NSInteger, BTAppSwitchTarget) { - BTAppSwitchTargetUnknown = 0, - /// Native app - BTAppSwitchTargetNativeApp, - /// Browser (i.e. Mobile Safari) - BTAppSwitchTargetWebBrowser, -}; - -/*! - @brief Protocol for receiving payment lifecycle messages from a payment option that may initiate an app or browser switch event to authorize payments. -*/ -@protocol BTAppSwitchDelegate - -/*! - @brief The app switcher will perform an app switch in order to obtain user payment authorization. - - @discussion Your implementation of this method may set your app to the state - it should be in if the user manually app-switches back to your app. - For example, re-enable any controls that are disabled. - - @param appSwitcher The app switcher -*/ -- (void)appSwitcherWillPerformAppSwitch:(id)appSwitcher; - -/*! - @brief Delegates receive this message when the app switcher has successfully performed an app switch. - - @discussion You may use this hook to prepare your UI for app switch return. Keep in mind that - users may manually switch back to your app via the iOS task manager. - - @note You may also hook into the app switch lifecycle via UIApplicationWillResignActiveNotification. - - @param appSwitcher The app switcher instance performing user authentication - @param target The destination that was actually used for this app switch -*/ -- (void)appSwitcher:(id)appSwitcher didPerformSwitchToTarget:(BTAppSwitchTarget)target; - -/*! - @brief The app switcher has obtained user payment details and/or user authorization and will process the results. - - @discussion This typically indicates asynchronous network activity. - When you receive this message, your UI should indicate activity. - - In the case of an app switch, this message indicates that the user has returned to this app; - this is usually after handleAppSwitchReturnURL: is called in your UIApplicationDelegate. - - @note You may also hook into the app switch lifecycle via UIApplicationWillResignActiveNotification. - - @param appSwitcher The app switcher -*/ -- (void)appSwitcherWillProcessPaymentInfo:(id)appSwitcher; - -@end - -#pragma mark - BTAppSwitchHandler protocol - -/*! - @protocol BTAppSwitchHandler - @brief A protocol for handling the return from switching out of an app to gather payment information. - @note The app may switch out to Mobile Safari or to a native app. -*/ -@protocol BTAppSwitchHandler - -@required - -/*! - @brief Determine whether the app switch return URL can be handled. - - @param url the URL you receive in `application:openURL:sourceApplication:annotation` when returning to your app - @param sourceApplication The source application you receive in `application:openURL:sourceApplication:annotation` - @return `YES` when the object can handle returning from the application with a URL -*/ -+ (BOOL)canHandleAppSwitchReturnURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; - -/*! - @brief Pass control back to `BTPayPalDriver` after returning from app or browser switch. - - @param url The URL you receive in `application:openURL:sourceApplication:annotation` -*/ -+ (void)handleAppSwitchReturnURL:(NSURL *)url; - -@optional - -/*! - @brief Indicates whether an iOS app is installed and available for app switch. -*/ -- (BOOL)isiOSAppAvailableForAppSwitch; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientMetadata.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientMetadata.h deleted file mode 100755 index 81fbcc26..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientMetadata.h +++ /dev/null @@ -1,60 +0,0 @@ -#import - -typedef NS_ENUM(NSInteger, BTClientMetadataSourceType) { - BTClientMetadataSourceUnknown = 0, - BTClientMetadataSourcePayPalApp, - BTClientMetadataSourcePayPalBrowser, - BTClientMetadataSourceVenmoApp, - BTClientMetadataSourceForm, -}; - -typedef NS_ENUM(NSInteger, BTClientMetadataIntegrationType) { - BTClientMetadataIntegrationCustom, - BTClientMetadataIntegrationDropIn, - BTClientMetadataIntegrationDropIn2, - BTClientMetadataIntegrationUnknown -}; - -NS_ASSUME_NONNULL_BEGIN - -/*! - @class BTClientMetadata - @brief Represents the metadata associated with a session for posting along with payment data during tokenization - - @discussion When a payment method is tokenized, the client api accepts parameters under - _meta which are used to determine where payment data originated. - - In general, this data may evolve and be used in different ways by different - integrations in a single app. For example, if both Apple Pay and drop in are - used. In this case, the source and integration may change over time, while - the sessionId should remain constant. To achieve this, users of this class - should use `mutableCopy` to create a new copy based on the existing session - and then update the object as needed. -*/ -@interface BTClientMetadata : NSObject - -@property (nonatomic, assign, readonly) BTClientMetadataIntegrationType integration; -@property (nonatomic, assign, readonly) BTClientMetadataSourceType source; - -/*! - @brief Auto-generated UUID -*/ -@property (nonatomic, copy, readonly) NSString *sessionId; - -#pragma mark Derived Properties - -@property (nonatomic, copy, readonly) NSString *integrationString; -@property (nonatomic, copy, readonly) NSString *sourceString; -@property (nonatomic, strong, readonly) NSDictionary *parameters; - -@end - -@interface BTMutableClientMetadata : BTClientMetadata - -- (void)setIntegration:(BTClientMetadataIntegrationType)integration; -- (void)setSource:(BTClientMetadataSourceType)source; -- (void)setSessionId:(NSString *)sessionId; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientToken.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientToken.h deleted file mode 100755 index ddf3da2c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTClientToken.h +++ /dev/null @@ -1,50 +0,0 @@ -#import -#import "BTJSON.h" - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTClientTokenKeyVersion; -extern NSString * const BTClientTokenErrorDomain; -extern NSString * const BTClientTokenKeyAuthorizationFingerprint; -extern NSString * const BTClientTokenKeyConfigURL; - -typedef NS_ENUM(NSInteger, BTClientTokenError) { - BTClientTokenErrorUnknown = 0, - BTClientTokenErrorInvalid, - BTClientTokenErrorUnsupportedVersion, -}; - -@interface BTClientToken : NSObject - -/*! - @brief The client token as a BTJSON object -*/ -@property (nonatomic, readonly, strong) BTJSON *json; - -/*! - @brief The extracted authorization fingerprint -*/ -@property (nonatomic, readonly, copy) NSString *authorizationFingerprint; - -/*! - @brief The extracted configURL -*/ -@property (nonatomic, readonly, strong) NSURL *configURL; - -/*! - @brief The original string used to initialize this instance -*/ -@property (nonatomic, readonly, copy) NSString *originalValue; - -#pragma mark - Initializers - -/*! - @brief Initialize a client token with a client token string generated by a Braintree Server Library. -*/ -- (nullable instancetype)initWithClientToken:(NSString *)clientToken error:(NSError **)error NS_DESIGNATED_INITIALIZER; - -- (instancetype)init __attribute__((unavailable("Please use initWithClientToken:error: instead."))); - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTConfiguration.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTConfiguration.h deleted file mode 100755 index a6189165..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTConfiguration.h +++ /dev/null @@ -1,31 +0,0 @@ -#import -#import "BTJSON.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface BTConfiguration : NSObject - -- (instancetype)initWithJSON:(BTJSON *)json NS_DESIGNATED_INITIALIZER; - -/*! - @brief The merchant account's configuration as a `BTJSON` object -*/ -@property (nonatomic, readonly, strong) BTJSON *json; - -#pragma mark - Undesignated initializers (do not use) - -- (instancetype)init __attribute__((unavailable("Please use initWithJSON: instead."))); - -/*! - @brief Returns true if the corresponding beta flag is set, otherwise returns false -*/ -+ (BOOL)isBetaEnabledPaymentOption:(NSString*)paymentOption DEPRECATED_MSG_ATTRIBUTE("Pay with Venmo is no longer in beta"); - -/*! - @brief Set a corresponding beta flag -*/ -+ (void)setBetaPaymentOption:(NSString*)paymentOption isEnabled:(BOOL)isEnabled DEPRECATED_MSG_ATTRIBUTE("Pay with Venmo is no longer in beta"); - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTEnums.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTEnums.h deleted file mode 100755 index 33e4fe78..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTEnums.h +++ /dev/null @@ -1,18 +0,0 @@ -/*! - @brief Card type - */ -typedef NS_ENUM(NSInteger, BTCardNetwork) { - BTCardNetworkUnknown = 0, - BTCardNetworkAMEX, - BTCardNetworkDinersClub, - BTCardNetworkDiscover, - BTCardNetworkMasterCard, - BTCardNetworkVisa, - BTCardNetworkJCB, - BTCardNetworkLaser, - BTCardNetworkMaestro, - BTCardNetworkUnionPay, - BTCardNetworkSolo, - BTCardNetworkSwitch, - BTCardNetworkUKMaestro, -}; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTErrors.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTErrors.h deleted file mode 100755 index 5834862d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTErrors.h +++ /dev/null @@ -1,8 +0,0 @@ -#import - -#pragma mark NSError userInfo Keys - -/*! - @brief NSError userInfo key for validation errors. -*/ -extern NSString * _Nonnull const BTCustomerInputBraintreeValidationErrorsKey; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTHTTPErrors.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTHTTPErrors.h deleted file mode 100755 index 953645d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTHTTPErrors.h +++ /dev/null @@ -1,34 +0,0 @@ -#import - -/*! - @brief The error domain for BTHTTP errors -*/ -extern NSString * const BTHTTPErrorDomain; - -/*! - @brief Key for userInfo dictionary that contains the NSHTTPURLResponse from server when it returns an HTTP error -*/ -extern NSString * const BTHTTPURLResponseKey; - -/*! - @brief Key for userInfo dictionary that contains the BTJSON body of the HTTP error response -*/ -extern NSString * const BTHTTPJSONResponseBodyKey; - -/*! - @brief BTHTTP error codes -*/ -typedef NS_ENUM(NSInteger, BTHTTPErrorCode) { - /// Unknown error (reserved) - BTHTTPErrorCodeUnknown = 0, - /// The response had a Content-Type header that is not supported - BTHTTPErrorCodeResponseContentTypeNotAcceptable, - /// The response was a 4xx error, e.g. 422, indicating a problem with the client's request - BTHTTPErrorCodeClientError, - /// The response was a 403 server error - BTHTTPErrorCodeServerError, - /// The BTHTTP instance was missing a base URL - BTHTTPErrorCodeMissingBaseURL, - /// The response was a 429, indicating a rate limiting error - BTHTTPErrorCodeRateLimitError -}; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTJSON.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTJSON.h deleted file mode 100755 index e8e58965..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTJSON.h +++ /dev/null @@ -1,127 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTJSONErrorDomain; - -typedef NS_ENUM(NSInteger, BTJSONErrorCode) { - BTJSONErrorValueUnknown = 0, - BTJSONErrorValueInvalid = 1, - BTJSONErrorAccessInvalid = 2, -}; - -/*! - @brief A type-safe wrapper around JSON - - @see http://www.json.org/ - - @discussion The primary goal of this class is to two-fold: (1) prevent bugs by staying true to JSON (json.org) - rather than interpreting it in mysterious ways; (2) prevent bugs by making JSON interpretation - as un-surprising as possible. - - Most notably, type casting occurs via the as* nullable methods; errors are deferred and can be checked explicitly using isError and asError. - - @code - ## Example Data: - { - "foo": "bar", - "baz": [1, 2, 3] - } - - ## Example Usage: - - let json : BTJSON = BTJSON(data:data); - json.isError // false - json.isObject // true - json.isNumber // false - json.asObject // self - json["foo"] // JSON(@"bar") - json["foo"].isString // true - json["foo"].asString // @"bar" - json["baz"].asString // null - json["baz"]["quux"].isError // true - json["baz"]["quux"].asError // NSError(domain: BTJSONErrorDomain, code: BTJSONErrorCodeTypeInvalid) - json["baz"][0].asError // null - json["baz"][0].asInteger // - json["random"]["nested"]["things"][3].isError // true - - let json : BTJSON = BTJSON() // json.asJson => {} - json["foo"][0] = "bar" // json.asJSON => { "foo": ["bar"] } - json["baz"] = [ 1, 2, 3 ] // json.asJSON => { "foo": ["bar"], "baz": [1,2,3] } - json["quux"] = NSSet() // json.isError => true, json.asJSON => throws NSError(domain: BTJSONErrorDomain, code: BTJSONErrorInvalidData) - @endcode -*/ -@interface BTJSON : NSObject - -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -- (instancetype)initWithValue:(id)value; - -- (instancetype)initWithData:(NSData *)data; - -/// @name Subscripting - -/*! - @brief Indexes into the JSON as if the current value is an object - - @discussion Notably, this method will always return successfully; however, if the value is not an object, the JSON will wrap an error. -*/ -- (id)objectForKeyedSubscript:(NSString *)key; - -/*! - @brief Indexes into the JSON as if the current value is an array - - @discussion Notably, this method will always return successfully; however, if the value is not an array, the JSON will wrap an error. -*/ -- (BTJSON *)objectAtIndexedSubscript:(NSUInteger)idx; - -/// @name Validity Checks - -@property (nonatomic, assign, readonly) BOOL isError; - -- (nullable NSError *)asError; - -/// @name Generating JSON - -- (nullable NSData *)asJSONAndReturnError:(NSError **)error; -- (nullable NSString *)asPrettyJSONAndReturnError:(NSError **)error; - -/// @name JSON Type Casts - -- (nullable NSString *)asString; - -- (nullable NSArray *)asArray; - -- (nullable NSDecimalNumber *)asNumber; - -/// @name JSON Extension Type Casts - -- (nullable NSURL *)asURL; - -- (nullable NSArray *)asStringArray; - -- (nullable NSDictionary *)asDictionary; - -- (NSInteger)asIntegerOrZero; - -- (NSInteger)asEnum:(NSDictionary *)mapping orDefault:(NSInteger)defaultValue; - -/// @name JSON Type Checks - -@property (nonatomic, assign, readonly) BOOL isString; - -@property (nonatomic, assign, readonly) BOOL isNumber; - -@property (nonatomic, assign, readonly) BOOL isArray; - -@property (nonatomic, assign, readonly) BOOL isObject; - -@property (nonatomic, assign, readonly) BOOL isTrue; - -@property (nonatomic, assign, readonly) BOOL isFalse; - -@property (nonatomic, assign, readonly) BOOL isNull; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTLogger.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTLogger.h deleted file mode 100755 index 88471a09..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTLogger.h +++ /dev/null @@ -1,42 +0,0 @@ -#import - -/*! - @brief Braintree SDK Logging Levels -*/ -typedef NS_ENUM(NSUInteger, BTLogLevel) { - - /// Suppress all log output - BTLogLevelNone = 0, - - /// Only log critical issues (e.g. irrecoverable errors) - BTLogLevelCritical = 1, - - /// Log errors (e.g. expected or recoverable errors) - BTLogLevelError = 2, - - /// Log warnings (e.g. use of pre-release features) - BTLogLevelWarning = 3, - - /// Log basic information (e.g. state changes, network activity) - BTLogLevelInfo = 4, - - /// Log debugging statements (anything and everything) - BTLogLevelDebug = 5 -}; - -/*! - @brief Braintree leveled logger - */ -@interface BTLogger : NSObject - -/*! - @brief The logger singleton used by the Braintree SDK -*/ -+ (instancetype)sharedLogger; - -/*! - @brief The current log level, with default value BTLogLevelInfo -*/ -@property (nonatomic, assign) BTLogLevel level; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonce.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonce.h deleted file mode 100755 index b9ba30d4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonce.h +++ /dev/null @@ -1,71 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - @class BTPaymentMethodNonce - @brief BTPaymentMethodNonce is for generic tokenized payment information. - - @discussion For example, if a customer's vaulted payment methods contains a type that's not recognized or supported by the - Braintree SDK or the client-side integration (e.g. the vault contains a PayPal account but the client-side - integration does not include the PayPal component), this type can act as a fallback. - - The payment method nonce is a public token that acts as a placeholder for sensitive payments data that - has been uploaded to Braintree for subsequent processing. The nonce is safe to access on the client and can be - used on your server to reference the data in Braintree operations, such as Transaction.sale. -*/ -@interface BTPaymentMethodNonce : NSObject - -/*! - @brief Initialize a new Payment Method Nonce. - - @param nonce A transactable payment method nonce. - @param description A human-readable description. - @param type A string identifying the type of the payment method. - @return A Payment Method Nonce, or `nil` if nonce is nil. -*/ -- (nullable instancetype)initWithNonce:(NSString *)nonce localizedDescription:(nullable NSString *)description type:(NSString *)type; - -/*! - @brief Initialize a new Payment Method Nonce. - - @param nonce A transactable payment method nonce. - @param description A human-readable description. - @return A Payment Method Nonce, or `nil` if nonce is nil. -*/ -- (nullable instancetype)initWithNonce:(NSString *)nonce localizedDescription:(nullable NSString *)description; - -/*! - @brief Initialize a new Payment Method Nonce. - - @param nonce A transactable payment method nonce. - @param description A human-readable description. - @param type A string identifying the type of the payment method. - @param isDefault A boolean indicating whether this is a default payment method. - @return A Payment Method Nonce, or `nil` if nonce is nil. -*/ -- (nullable instancetype)initWithNonce:(NSString *)nonce localizedDescription:(NSString *)description type:(nonnull NSString *)type isDefault:(BOOL)isDefault; - -/*! - @brief The one-time use payment method nonce -*/ -@property (nonatomic, readonly, copy) NSString *nonce; - -/*! - @brief A localized description of the payment info -*/ -@property (nonatomic, readonly, copy) NSString *localizedDescription; - -/*! - @brief The type of the tokenized data, e.g. PayPal, Venmo, MasterCard, Visa, Amex -*/ -@property (nonatomic, readonly, copy) NSString *type; - -/*! - @brief True if this nonce is the customer's default payment method, otherwise false. -*/ -@property (nonatomic, readonly, assign) BOOL isDefault; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonceParser.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonceParser.h deleted file mode 100755 index 2e6a7fbb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPaymentMethodNonceParser.h +++ /dev/null @@ -1,59 +0,0 @@ -#import "BTJSON.h" -#import "BTPaymentMethodNonce.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - @class BTPaymentMethodNonceParser - @brief A JSON parser that parses `BTJSON` into concrete `BTPaymentMethodNonce` objects. It supports registration of parsers at runtime. - - @discussion `BTPaymentMethodNonceParser` provides access to JSON parsing for different payment options - without introducing compile-time dependencies on payment option frameworks and their symbols. -*/ -@interface BTPaymentMethodNonceParser : NSObject - -/*! - @brief The singleton instance -*/ -+ (instancetype)sharedParser; - -/*! - @brief An array of the tokenization types currently registered -*/ -@property (nonatomic, readonly, strong) NSArray *allTypes; - -/*! - @brief Indicates whether a tokenization type is currently registered - - @param type The tokenization type string -*/ -- (BOOL)isTypeAvailable:(NSString *)type; - -/*! - @brief Registers a parsing block for a tokenization type. - - @param type The tokenization type string - @param jsonParsingBlock The block to execute when `parseJSON:type:` is called for the tokenization type. - This block should return a `BTPaymentMethodNonce` object, or `nil` if the JSON cannot be parsed. -*/ -- (void)registerType:(NSString *)type withParsingBlock:(BTPaymentMethodNonce * _Nullable (^)(BTJSON *json))jsonParsingBlock; - -/*! - @brief Parses tokenized payment information that has been serialized to JSON, and returns a `BTPaymentMethodNonce` object. - - @discussion The `BTPaymentMethodNonce` object is created by the JSON parsing block that has been registered for the tokenization - type. - - If the `type` has not been registered, this method will attempt to read the nonce from the JSON and return - a basic object; if it fails, it will return `nil`. - - @param json The tokenized payment info, serialized to JSON - @param type The registered type of the parsing block to use - @return A `BTPaymentMethodNonce` object, or `nil` if the tokenized payment info JSON does not contain a nonce -*/ -- (nullable BTPaymentMethodNonce *)parseJSON:(BTJSON *)json withParsingBlockForType:(NSString *)type; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPostalAddress.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPostalAddress.h deleted file mode 100755 index dcf3a90d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTPostalAddress.h +++ /dev/null @@ -1,44 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BTPostalAddress : NSObject - -/*! - @brief Optional. Recipient name for shipping address. -*/ -@property (nonatomic, nullable, copy) NSString *recipientName; - -/*! - @brief Line 1 of the Address (eg. number, street, etc). -*/ -@property (nonatomic, copy) NSString *streetAddress; - -/*! - @brief Optional line 2 of the Address (eg. suite, apt #, etc.). -*/ -@property (nonatomic, nullable, copy) NSString *extendedAddress; - -/*! - @brief City name -*/ -@property (nonatomic, copy) NSString *locality; - -/*! - @brief 2 letter country code. -*/ -@property (nonatomic, copy) NSString *countryCodeAlpha2; - -/*! - @brief Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code. -*/ -@property (nonatomic, nullable, copy) NSString *postalCode; - -/*! - @brief 2 letter code for US states, and the equivalent for other countries. -*/ -@property (nonatomic, nullable, copy) NSString *region; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTTokenizationService.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTTokenizationService.h deleted file mode 100755 index d21d0d5f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTTokenizationService.h +++ /dev/null @@ -1,76 +0,0 @@ -#import -#import "BTAPIClient.h" -#import "BTPaymentMethodNonce.h" - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTTokenizationServiceErrorDomain; -extern NSString * const BTTokenizationServiceAppSwitchDelegateOption; -extern NSString * const BTTokenizationServiceViewPresentingDelegateOption; -extern NSString * const BTTokenizationServicePayPalScopesOption; -extern NSString * const BTTokenizationServiceAmountOption; -extern NSString * const BTTokenizationServiceNonceOption; - -typedef NS_ENUM(NSInteger, BTTokenizationServiceError) { - BTTokenizationServiceErrorUnknown = 0, - BTTokenizationServiceErrorTypeNotRegistered, -}; - -/*! - @class BTTokenizationService - @brief A tokenization service that supports registration of tokenizers at runtime. - - @discussion `BTTokenizationService` provides access to tokenization services from payment options - (e.g. `BTPayPalDriver`) without introducing compile-time dependencies on the frameworks. -*/ -@interface BTTokenizationService : NSObject - -/*! - @brief The singleton instance of the tokenization service -*/ -+ (instancetype)sharedService; - -/*! - @brief Registers a block to execute for a given type when `tokenizeType:withAPIClient:completion:` or`tokenizeType:options:withAPIClient:completion:` are invoked. - - @param type A type string to identify the tokenization block. Providing a type that has already - been registered will overwrite the previously registered tokenization block. - @param tokenizationBlock The tokenization block to register for a type. -*/ -- (void)registerType:(NSString *)type withTokenizationBlock:(void(^)(BTAPIClient *apiClient, NSDictionary * _Nullable options, void(^)(BTPaymentMethodNonce * _Nullable paymentMethodNonce, NSError * _Nullable error)))tokenizationBlock; - -/*! - @brief Indicates whether a type has been registered with a valid tokenization block. -*/ -- (BOOL)isTypeAvailable:(NSString *)type; - -/*! - @brief Perform tokenization for the given type. This will execute the tokenization block that has been registered for the type. - - @param type The tokenization type to perform - @param apiClient The API client to use when performing tokenization. - @param completion The completion block to invoke when tokenization has completed. -*/ -- (void)tokenizeType:(NSString *)type - withAPIClient:(BTAPIClient *)apiClient - completion:(void(^)(BTPaymentMethodNonce * _Nullable paymentMethodNonce, NSError * _Nullable error))completion; - -/*! - @brief Perform tokenization for the given type. This will execute the tokenization block that has been registered for the type. - - @param type The tokenization type to perform - @param options A dictionary of data to use when invoking the tokenization block. This can be - used to pass data into a tokenization client/driver, e.g. credit card raw details. - @param apiClient The API client to use when performing tokenization. - @param completion The completion block to invoke when tokenization has completed. -*/ -- (void)tokenizeType:(NSString *)type - options:(nullable NSDictionary *)options - withAPIClient:(BTAPIClient *)apiClient - completion:(void(^)(BTPaymentMethodNonce * _Nullable paymentMethodNonce, NSError * _Nullable error))completion; - -@property (nonatomic, readonly, strong) NSArray *allTypes; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTViewControllerPresentingDelegate.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTViewControllerPresentingDelegate.h deleted file mode 100755 index 22206eed..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BTViewControllerPresentingDelegate.h +++ /dev/null @@ -1,34 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - @brief Protocol for receiving payment lifecycle messages from a payment driver that requires presentation of a view controller to authorize a payment. -*/ -@protocol BTViewControllerPresentingDelegate - -/*! - @brief The payment driver requires presentation of a view controller in order to proceed. - - @discussion Your implementation should present the viewController modally, e.g. via - `presentViewController:animated:completion:` - - @param driver The payment driver - @param viewController The view controller to present -*/ -- (void)paymentDriver:(id)driver requestsPresentationOfViewController:(UIViewController *)viewController; - -/*! - @brief The payment driver requires dismissal of a view controller. - - @discussion Your implementation should dismiss the viewController, e.g. via - `dismissViewControllerAnimated:completion:` - - @param driver The payment driver - @param viewController The view controller to be dismissed -*/ -- (void)paymentDriver:(id)driver requestsDismissalOfViewController:(UIViewController *)viewController; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BraintreeCore.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BraintreeCore.h deleted file mode 100755 index 84a491c9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeCore/Public/BraintreeCore.h +++ /dev/null @@ -1,28 +0,0 @@ -#import - -//! Project version number for BraintreeCore. -FOUNDATION_EXPORT double BraintreeCoreVersionNumber; - -//! Project version string for BraintreeCore. -FOUNDATION_EXPORT const unsigned char BraintreeCoreVersionString[]; - -#import "BTAPIClient.h" -#import "BTAppSwitch.h" -#import "BTClientMetadata.h" -#import "BTClientToken.h" -#import "BTConfiguration.h" -#import "BTEnums.h" -#import "BTErrors.h" -#import "BTHTTPErrors.h" -#import "BTJSON.h" -#import "BTLogger.h" -#import "BTPostalAddress.h" -#import "BTPaymentMethodNonce.h" -#import "BTPaymentMethodNonceParser.h" -#import "BTTokenizationService.h" -#import "BTPaymentMethodNonce.h" -#import "BTViewControllerPresentingDelegate.h" - -#ifndef __BT_AVAILABLE -#define __BT_AVAILABLE(class) NSClassFromString(class) != nil -#endif /*__BT_AVAILABLE*/ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector.m deleted file mode 100755 index c5427512..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector.m +++ /dev/null @@ -1,276 +0,0 @@ -#import "BTConfiguration+DataCollector.h" -#import "BTDataCollector_Internal.h" -#import - -@interface BTDataCollector () -@property (nonatomic, assign) BTDataCollectorEnvironment environment; -@property (nonatomic, copy) NSString *fraudMerchantId; -@property (nonatomic, copy) BTAPIClient *apiClient; -@end - -@implementation BTDataCollector - -static NSString *BTDataCollectorSharedMerchantId = @"600000"; -static Class PayPalDataCollectorClass; - -NSString * const BTDataCollectorKountErrorDomain = @"com.braintreepayments.BTDataCollectorKountErrorDomain"; - -#pragma mark - Initialization and setup - -+ (void)load { - if (self == [BTDataCollector class]) { - PayPalDataCollectorClass = NSClassFromString(@"PPDataCollector"); - } -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - [self setUpKountWithDebugOn:NO]; - _apiClient = apiClient; - } - - return self; -} - -- (void)setUpKountWithDebugOn:(BOOL)debugLogging { - self.kount = [KDataCollector sharedCollector]; - self.kount.debug = debugLogging; - - CLAuthorizationStatus locationStatus = [CLLocationManager authorizationStatus]; - if ((locationStatus != kCLAuthorizationStatusAuthorizedWhenInUse && locationStatus != kCLAuthorizationStatusAuthorizedAlways) || ![CLLocationManager locationServicesEnabled]) { - self.kount.locationCollectorConfig = KLocationCollectorConfigSkip; - } -} - -#pragma mark - Accessors - -+ (void)setPayPalDataCollectorClass:(Class)payPalDataCollectorClass { - // +load will always set PayPalDataCollectorClass - if ([payPalDataCollectorClass isSubclassOfClass:NSClassFromString(@"PPDataCollector")]) { - PayPalDataCollectorClass = payPalDataCollectorClass; - } -} - -- (void)setCollectorUrl:(__unused NSString *)url { - // do nothing -} - -- (void)setCollectorEnvironment:(KEnvironment)environment { - self.kount.environment = environment; -} - -- (void)setFraudMerchantId:(NSString *)fraudMerchantId { - _fraudMerchantId = fraudMerchantId; - self.kount.merchantID = [fraudMerchantId integerValue]; -} - -#pragma mark - Public methods - -- (void)collectCardFraudData:(void (^)(NSString * _Nonnull))completion { - [self collectFraudDataForCard:YES forPayPal:NO completion:completion]; -} - -- (void)collectFraudData:(void (^)(NSString * _Nonnull))completion { - [self collectFraudDataForCard:YES forPayPal:YES completion:completion]; -} - -#pragma mark - Helper methods - -- (void)collectFraudDataForCard:(BOOL)includeCard forPayPal:(BOOL)includePayPal completion:(void (^)(NSString *deviceData))completion { - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable __unused _) { - NSMutableDictionary *dataDictionary = [NSMutableDictionary new]; - - dispatch_group_t collectorDispatchGroup = dispatch_group_create(); - [self onCollectorStart]; - - if (configuration.isKountEnabled && includeCard) { - BTDataCollectorEnvironment btEnvironment = [self environmentFromString:[configuration.json[@"environment"] asString]]; - [self setCollectorEnvironment:[self collectorEnvironment:btEnvironment]]; - - NSString *merchantId = self.fraudMerchantId ?: [configuration kountMerchantId]; - self.kount.merchantID = [merchantId integerValue]; - - NSString *deviceSessionId = [self sessionId]; - dataDictionary[@"device_session_id"] = deviceSessionId; - dataDictionary[@"fraud_merchant_id"] = merchantId; - dispatch_group_enter(collectorDispatchGroup); - [self.kount collectForSession:deviceSessionId completion:^(__unused NSString * _Nonnull sessionID, __unused BOOL success, __unused NSError * _Nullable error) { - if (success) { - [self onCollectorSuccess]; - } else { - [self onCollectorError:error]; - } - dispatch_group_leave(collectorDispatchGroup); - }]; - } - - if (includePayPal) { - NSString *payPalClientMetadataId = [BTDataCollector generatePayPalClientMetadataId]; - if (payPalClientMetadataId) { - dataDictionary[@"correlation_id"] = payPalClientMetadataId; - } - } - - dispatch_group_notify(collectorDispatchGroup, dispatch_get_main_queue(), ^{ - NSError *error; - NSData *data = [NSJSONSerialization dataWithJSONObject:dataDictionary options:0 error:&error]; - // Defensive check: JSON serialization should never fail - if (!data) { - NSLog(@"ERROR: Failed to create deviceData string, error = %@", error); - [self onCollectorError:error]; - if (completion) { - completion(@""); - } - return; - } - NSString *deviceData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - - // If only PayPal fraud is being collected, immediately inform the delegate that collection has - // finished, since PayPal fraud does not allow us to know when it has officially finished collection. - if (!includeCard && includePayPal) { - [self onCollectorSuccess]; - } - - if (completion) { - completion(deviceData); - } - }); - }]; -} - -- (NSString *)collectFraudDataForCard:(BOOL)includeCard forPayPal:(BOOL)includePayPal -{ - [self onCollectorStart]; - NSMutableDictionary *dataDictionary = [NSMutableDictionary new]; - if (includeCard) { - NSString *deviceSessionId = [self sessionId]; - dataDictionary[@"device_session_id"] = deviceSessionId; - dataDictionary[@"fraud_merchant_id"] = self.fraudMerchantId; - - [self.kount collectForSession:deviceSessionId completion:^(__unused NSString * _Nonnull sessionID, BOOL success, NSError * _Nullable error) { - if (success) { - [self onCollectorSuccess]; - } else { - [self onCollectorError:error]; - } - }]; - } - - if (includePayPal) { - NSString *payPalClientMetadataId = [BTDataCollector generatePayPalClientMetadataId]; - if (payPalClientMetadataId) { - dataDictionary[@"correlation_id"] = payPalClientMetadataId; - } - } - - NSError *error; - NSData *data = [NSJSONSerialization dataWithJSONObject:dataDictionary options:0 error:&error]; - if (!data) { - NSLog(@"ERROR: Failed to create deviceData string, error = %@", error); - [self onCollectorError:error]; - return @""; - } - - // If only PayPal fraud is being collected, immediately inform the delegate that collection has - // finished, since PayPal fraud does not allow us to know when it has officially finished collection. - if (!includeCard && includePayPal) { - [self onCollectorSuccess]; - } - - return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -} - -+ (NSString *)generatePayPalClientMetadataId { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" - if (PayPalDataCollectorClass && [PayPalDataCollectorClass respondsToSelector:@selector(generateClientMetadataID)]) { - return [PayPalDataCollectorClass performSelector:@selector(generateClientMetadataID)]; - } -#pragma clang diagnostic pop - - return nil; -} - -/// Generates a new session ID -- (NSString *)sessionId { - return [[[NSUUID UUID] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; -} - -- (BTDataCollectorEnvironment)environmentFromString:(NSString *)environment { - if ([environment isEqualToString:@"production"]) { - return BTDataCollectorEnvironmentProduction; - } else if ([environment isEqualToString:@"sandbox"]) { - return BTDataCollectorEnvironmentSandbox; - } else if ([environment isEqualToString:@"qa"]) { - return BTDataCollectorEnvironmentQA; - } else { - return BTDataCollectorEnvironmentDevelopment; - } -} - -- (KEnvironment)collectorEnvironment:(BTDataCollectorEnvironment)environment { - switch (environment) { - case BTDataCollectorEnvironmentProduction: - return KEnvironmentProduction; - default: - return KEnvironmentTest; - } -} - -#pragma mark DeviceCollectorSDKDelegate methods - -/// The collector has started. -- (void)onCollectorStart { - if ([self.delegate respondsToSelector:@selector(dataCollectorDidStart:)]) { - [self.delegate dataCollectorDidStart:self]; - } -} - -/// The collector finished successfully. -- (void)onCollectorSuccess { - if ([self.delegate respondsToSelector:@selector(dataCollectorDidComplete:)]) { - [self.delegate dataCollectorDidComplete:self]; - } -} - -/// An error occurred. -/// -/// @param error Triggering error if available -- (void)onCollectorError:(NSError *)error { - if ([self.delegate respondsToSelector:@selector(dataCollector:didFailWithError:)]) { - [self.delegate dataCollector:self didFailWithError:error]; - } -} - -#pragma mark - Deprecated methods - -- (instancetype)initWithEnvironment:(BTDataCollectorEnvironment)environment { - if (self = [super init]) { - [self setUpKountWithDebugOn:NO]; - [self setCollectorEnvironment:[self collectorEnvironment:environment]]; - [self setFraudMerchantId:BTDataCollectorSharedMerchantId]; - } - return self; -} - -+ (NSString *)payPalClientMetadataId { - return [BTDataCollector generatePayPalClientMetadataId]; -} - -/// At this time, this method only collects data with Kount. However, it is possible that in the future, -/// we will want to collect data (for card transactions) with PayPal as well. If this becomes the case, -/// we can modify this method to include a clientMetadataID without breaking the public interface. -- (NSString *)collectCardFraudData { - return [self collectFraudDataForCard:YES forPayPal:NO]; -} - -- (NSString *)collectPayPalClientMetadataId { - return [self collectFraudDataForCard:NO forPayPal:YES]; -} - -/// Similar to `collectCardFraudData` but with the addition of the payPalClientMetadataId, if available. -- (NSString *)collectFraudData { - return [self collectFraudDataForCard:YES forPayPal:YES]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector_Internal.h deleted file mode 100755 index f95c022c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/BTDataCollector_Internal.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "BTDataCollector.h" -#import "KDataCollector.h" - -@interface BTDataCollector () - -/*! - @brief The Kount SDK device collector, exposed internally for testing -*/ -@property (nonatomic, strong, nonnull) KDataCollector *kount; - -/*! - @brief The `PPDataCollector` class, exposed internally for injecting test doubles for unit tests -*/ -+ (void)setPayPalDataCollectorClass:(nonnull Class)payPalDataCollectorClass; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/KDataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/KDataCollector.h deleted file mode 100755 index 0573b7e2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/KDataCollector.h +++ /dev/null @@ -1,103 +0,0 @@ -// -// KDataCollector.h -// Kount Data Collector SDK -// -// Copyright © 2016 Kount Inc. All rights reserved. -// - -#import - -// Error Codes -typedef NS_ENUM(NSInteger, KDataCollectorErrorCode) { - - KDataCollectorErrorCodeUnknown = 0, - - // A system error occurred - KDataCollectorErrorCodeNSError, - - // A required collector timed out - KDataCollectorErrorCodeTimeout, - - // A bad parameter was passed into the data collector - KDataCollectorErrorCodeBadParameter, - - // A network connection isn't available - KDataCollectorErrorCodeNoNetwork, - - // An error occurred while validating a response from the server - KDataCollectorErrorCodeResponseValidation, -}; - -NS_ASSUME_NONNULL_BEGIN - -extern NSString *const KDataCollectorErrorDomain; - -// Version of the Kount Data Collector SDK -extern NSString *const KDataCollectorVersion; - -// Configuration settings for location collection -typedef NS_ENUM(NSInteger, KLocationCollectorConfig) { - - // Request permission if not currently authorized (default) - KLocationCollectorConfigRequestPermission = 0, - - // Only collect if app already has location permissions - // (use in cases where requesting permission is done by the app itself) - KLocationCollectorConfigPassive, - - // Skip location collection - KLocationCollectorConfigSkip, -}; - -// Configuration settings Kount collection environment -typedef NS_ENUM(NSInteger, KEnvironment) { - - // Unknown Environment - KEnvironmentUnknown = 0, - - // Test Environment - KEnvironmentTest, - - // Production Environment - KEnvironmentProduction, -}; - -// KDataCollector enables you to collect device information for the given session -// -// First, configure the collector during the initialization of your application -// Second, call collectForSession when you start the payment checkout process -// -@interface KDataCollector : NSObject - -// Get the shared instance of the Data Collector -+ (KDataCollector *)sharedCollector; - -// -// Configuration -// - -// The Kount Merchant ID -@property NSInteger merchantID; -// The configuration of the location collector to determine if and how it goes about collection location -@property KLocationCollectorConfig locationCollectorConfig; -// Debug logging to the console -@property BOOL debug; -// Timeout in MS for the collection -@property NSInteger timeoutInMS; -// The Kount environment -@property KEnvironment environment; - -// -// Collection -// - -// Collect data for the session. -// -// @param sessionID A unique session ID that should match the sessionID for the payment transaction -// @param completionBlock This completion block will be called when the collection has completed or an error occurs. -- (void)collectForSession:(NSString *)sessionID completion:(nullable void (^)(NSString *_Nonnull sessionID, BOOL success, NSError *_Nullable error))completionBlock; - -NS_ASSUME_NONNULL_END - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/libDeviceCollectorLibrary.a b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/libDeviceCollectorLibrary.a deleted file mode 100755 index 3aa3bc97..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Kount/libDeviceCollectorLibrary.a and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.h deleted file mode 100755 index 6077a184..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.h +++ /dev/null @@ -1,19 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTConfiguration (DataCollector) - -/*! - @brief Indicates whether Kount is enabled for the merchant account. -*/ -@property (nonatomic, readonly, assign) BOOL isKountEnabled; - -/*! - @brief Returns the Kount merchant id set in the Gateway -*/ -@property (nonatomic, readonly, assign) NSString *kountMerchantId; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.m deleted file mode 100755 index c997c1c6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTConfiguration+DataCollector.m +++ /dev/null @@ -1,13 +0,0 @@ -#import "BTConfiguration+DataCollector.h" - -@implementation BTConfiguration (DataCollector) - -- (BOOL)isKountEnabled { - return [self.json[@"kount"][@"kountMerchantId"] isString]; -} - --(NSString *)kountMerchantId { - return [self.json[@"kount"][@"kountMerchantId"] asString]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTDataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTDataCollector.h deleted file mode 100755 index 5deda069..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BTDataCollector.h +++ /dev/null @@ -1,195 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -#import - -typedef NS_ENUM(NSInteger, BTDataCollectorEnvironment) { - BTDataCollectorEnvironmentDevelopment, - BTDataCollectorEnvironmentQA, - BTDataCollectorEnvironmentSandbox, - BTDataCollectorEnvironmentProduction -}; - -@protocol BTDataCollectorDelegate; - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTDataCollectorKountErrorDomain; - -/*! - @class BTDataCollector - @brief Braintree's advanced fraud protection solution -*/ -@interface BTDataCollector : NSObject - -/*! - @brief Set a BTDataCollectorDelegate to receive notifications about collector events. - @see BTDataCollectorDelegate protocol declaration -*/ -@property (nonatomic, weak) id delegate; - -/*! - @brief Initializes a `BTDataCollector` instance for an environment. - - @param environment The desired environment to target. This setting will determine which default collectorURL is used when collecting fraud data from the device. -*/ -- (instancetype)initWithEnvironment:(BTDataCollectorEnvironment)environment DEPRECATED_MSG_ATTRIBUTE("Use BTDataCollector initWithAPIClient: instead"); - -/*! - @brief Initializes a `BTDataCollector` instance with a BTAPIClient. - - @param apiClient The API client which can retrieve remote configuration for the data collector. -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient; - -/*! - @brief Collects device data using Kount and PayPal. - - @discussion This method collects device data using both Kount and PayPal. If you want to collect data for Kount, - use `-collectCardFraudData`. To collect data for PayPal, integrate PayPalDataCollector and use - `[PPDataCollector collectPayPalDeviceData]`. - - For lifecycle events such as a completion callback, use BTDataCollectorDelegate. Although you do not need - to wait for the completion callback before performing the transaction, the data will be most effective if you do. - Normal response time is less than 1 second, and it should never take more than 10 seconds. - - We recommend that you call this method as early as possible, e.g. at app launch. If that's too early, - calling it e.g. when the customer initiates checkout should also be fine. - - Store the return value as deviceData to use with debit/credit card transactions on your server, - e.g. with `Transaction.sale`. - - @param completion A completion block callback that returns a deviceData string that should be passed into server-side calls, such as `Transaction.sale`. This JSON serialized string contains the merchant ID, session ID, and the PayPal fraud ID (if PayPal is available). -*/ -- (void)collectFraudData:(void (^)(NSString *deviceData))completion; - -/*! - @brief Collects device data for Kount. - - @discussion This should be used when the user is paying with a card. - - For lifecycle events such as a completion callback, use BTDataCollectorDelegate. Although you do not need - to wait for the completion callback before performing the transaction, the data will be most effective if you do. - Normal response time is less than 1 second, and it should never take more than 10 seconds. - - We recommend that you call this method as early as possible, e.g. at app launch. If that's too early, - calling it e.g. when the customer initiates checkout should also be fine. - - @param completion A completion block callback that returns a deviceData string that should be passed in to server-side calls, such as `Transaction.sale` This JSON serialized string contains the merchant ID and session ID. -*/ -- (void)collectCardFraudData:(void (^)(NSString *deviceData))completion; - -#pragma mark - Direct Integrations - -/*! - @brief Set your fraud merchant id. - - @note If you do not call this method, a generic Braintree value will be used. - - @param fraudMerchantId The fraudMerchantId you have established with your Braintree account manager. -*/ -- (void)setFraudMerchantId:(NSString *)fraudMerchantId; - -#pragma mark - Deprecated - -/*! - @brief Set the URL that the Device Collector will use. - - @note If you do not call this method, a generic Braintree value will be used. - - @param url Full URL to device collector 302-redirect page -*/ -- (void)setCollectorUrl:(NSString *)url DEPRECATED_MSG_ATTRIBUTE("The collector URL is no longer used. The environment will be automatically chosen."); - -/*! - @brief Generates a new PayPal fraud ID if PayPal is integrated; otherwise returns `nil`. - - @note This returns a raw client metadata ID, which is not the correct format for device datawhen creating a transaction. Instead, use `[PPDataCollector collectPayPalDeviceData]`. - - @return a client metadata ID to send as a header -*/ -+ (nullable NSString *)payPalClientMetadataId DEPRECATED_MSG_ATTRIBUTE("Integrate PayPalDataCollector and use PPDataCollector +clientMetadataID instead."); - -/*! - @brief Collects device data for Kount. - - @discussion This should be used when the user is paying with a card. - - For lifecycle events such as a completion callback, use BTDataCollectorDelegate. Although you do not need - to wait for the completion callback before performing the transaction, the data will be most effective if you do. - Normal response time is less than 1 second, and it should never take more than 10 seconds. - - @return a deviceData string that should be passed into server-side calls, such as `Transaction.sale`. - This JSON serialized string contains the merchant ID and session ID. -*/ -- (NSString *)collectCardFraudData DEPRECATED_MSG_ATTRIBUTE("Use BTDataCollector -collectCardFraudData: instead"); - -/*! - @brief Collects device data for PayPal. - - @discussion This should be used when the user is paying with PayPal or Venmo only. - - @return a deviceData string that should be passed into server-side calls, such as `Transaction.sale`, - for PayPal transactions. This JSON serialized string contains a PayPal fraud ID. -*/ -- (NSString *)collectPayPalClientMetadataId DEPRECATED_MSG_ATTRIBUTE("Integrate PayPalDataCollector and use PPDataCollector +collectPayPalDeviceData instead."); - -/*! - @brief Collects device data using Kount and PayPal. - - @discussion This method collects device data using both Kount and PayPal. If you want to collect data for Kount, - use `-collectCardFraudData`. To collect data for PayPal, integrate PayPalDataCollector and use - `[PPDataCollector collectPayPalDeviceData]`. - - For lifecycle events such as a completion callback, use BTDataCollectorDelegate. Although you do not need - to wait for the completion callback before performing the transaction, the data will be most effective if you do. - Normal response time is less than 1 second, and it should never take more than 10 seconds. - - Store the return value as deviceData to use with debit/credit card transactions on your server, - e.g. with `Transaction.sale`. - - @return a deviceData string that should be passed into server-side calls, such as `Transaction.sale`. - This JSON serialized string contains the merchant ID, session ID, and - the PayPal fraud ID (if PayPal is available). -*/ -- (NSString *)collectFraudData DEPRECATED_MSG_ATTRIBUTE("Use BTDataCollector -collectFraudData: instead"); - -@end - -/*! - @brief Provides status updates from a BTDataCollector instance. At this time, updates will only be sent for card fraud data (from Kount). -*/ -@protocol BTDataCollectorDelegate - -/*! - @brief The collector finished successfully. - - @discussion Use this delegate method if, due to fraud, you want to wait - until collection completes before performing a transaction. - - This method is required because there's no reason to implement BTDataCollectorDelegate without this method. -*/ -- (void)dataCollectorDidComplete:(BTDataCollector *)dataCollector; - -@optional - -/*! - @brief The collector has started. -*/ -- (void)dataCollectorDidStart:(BTDataCollector *)dataCollector; - -/*! - @brief An error occurred. - - @param error Triggering error. If the error domain is BTDataCollectorKountErrorDomain, then the - errorCode is a Kount error code. See error.userInfo[NSLocalizedFailureReasonErrorKey] - for the cause of the failure. -*/ -- (void)dataCollector:(BTDataCollector *)dataCollector didFailWithError:(NSError *)error; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BraintreeDataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BraintreeDataCollector.h deleted file mode 100755 index 74fb0754..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/Public/BraintreeDataCollector.h +++ /dev/null @@ -1,8 +0,0 @@ -#import - -FOUNDATION_EXPORT double BraintreeDataCollectorVersionNumber; - -FOUNDATION_EXPORT const unsigned char BraintreeDataCollectorVersionString[]; - -#import "BTDataCollector.h" - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/README.md b/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/README.md deleted file mode 100755 index 6a7293b7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDataCollector/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Braintree Data Collector - -Our `BraintreeDataCollector` provides a fraud solution powered by `BTDataCollector`, PayPal, and Kount. - -See our [Advanced Fraud Tools - Client-Side Documentation](https://developers.braintreepayments.com/ios/guides/advanced-fraud-tools/client-side) for more information. diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeDropIn.podspec b/examples/braintree/ios/Frameworks/Braintree/BraintreeDropIn.podspec deleted file mode 100755 index e9599e4a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeDropIn.podspec +++ /dev/null @@ -1,40 +0,0 @@ -# This podspec is here to add BraintreeDropIn to the demo without including the dependencies on Braintree -Pod::Spec.new do |s| - s.name = "BraintreeDropIn" - s.version = "99.99.99-github-master" - s.summary = "Braintree v.zero: A modern foundation for accepting payments" - s.description = <<-DESC - Braintree is a full-stack payments platform for developers - - This CocoaPod will help you accept payments in your iOS app. - - Check out our development portal at https://developers.braintreepayments.com. - DESC - s.homepage = "https://www.braintreepayments.com/how-braintree-works" - s.documentation_url = "https://developers.braintreepayments.com/ios/start/hello-client" - s.screenshots = "https://raw.githubusercontent.com/braintree/braintree_ios/master/screenshot.png" - s.license = "MIT" - s.author = { "Braintree" => "code@getbraintree.com" } - s.source = { :git => "https://github.com/braintree/braintree-ios-drop-in.git", :branch => 'master' } - s.social_media_url = "https://twitter.com/braintree" - - s.platform = :ios, "9.0" - s.requires_arc = true - s.compiler_flags = "-Wall -Werror -Wextra" - - s.subspec "DropIn" do |sub| - sub.source_files = "BraintreeDropIn/**/*.{h,m}" - sub.public_header_files = "BraintreeDropIn/Public/*.h" - sub.frameworks = "UIKit" - sub.dependency "BraintreeDropIn/UIKit" - end - - s.subspec "UIKit" do |sub| - sub.source_files = "BraintreeUIKit/**/*.{h,m}" - sub.public_header_files = "BraintreeUIKit/Public/*.h" - sub.frameworks = "UIKit" - sub.resource_bundles = { - "Braintree-UIKit-Localization" => ["BraintreeUIKit/Localization/*.lproj"] } - end -end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTConfiguration+PayPal.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTConfiguration+PayPal.m deleted file mode 100755 index d332c9ba..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTConfiguration+PayPal.m +++ /dev/null @@ -1,13 +0,0 @@ -#import "BTConfiguration+PayPal.h" - -@implementation BTConfiguration (PayPal) - -- (BOOL)isPayPalEnabled { - return [self.json[@"paypalEnabled"] isTrue]; -} - -- (BOOL)isBillingAgreementsEnabled { - return [self.json[@"paypal"][@"billingAgreementsEnabled"] isTrue]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce.m deleted file mode 100755 index 2a350dd2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce.m +++ /dev/null @@ -1,44 +0,0 @@ -#import "BTPayPalAccountNonce_Internal.h" - -@interface BTPayPalAccountNonce () -@property (nonatomic, readwrite, copy) NSString *email; -@property (nonatomic, readwrite, copy) NSString *firstName; -@property (nonatomic, readwrite, copy) NSString *lastName; -@property (nonatomic, readwrite, copy) NSString *phone; -@property (nonatomic, readwrite, strong) BTPostalAddress *billingAddress; -@property (nonatomic, readwrite, strong) BTPostalAddress *shippingAddress; -@property (nonatomic, readwrite, copy) NSString *clientMetadataId; -@property (nonatomic, readwrite, copy) NSString *payerId; -@property (nonatomic, readwrite, strong) BTPayPalCreditFinancing *creditFinancing; -@end - -@implementation BTPayPalAccountNonce - -- (instancetype)initWithNonce:(NSString *)nonce - description:(NSString *)description - email:(NSString *)email - firstName:(NSString *)firstName - lastName:(NSString *)lastName - phone:(NSString *)phone - billingAddress:(BTPostalAddress *)billingAddress - shippingAddress:(BTPostalAddress *)shippingAddress - clientMetadataId:(NSString *)clientMetadataId - payerId:(NSString *)payerId - isDefault:(BOOL)isDefault - creditFinancing:(BTPayPalCreditFinancing *)creditFinancing -{ - if (self = [super initWithNonce:nonce localizedDescription:description type:@"PayPal" isDefault:isDefault]) { - _email = email; - _firstName = firstName; - _lastName = lastName; - _phone = phone; - _billingAddress = [billingAddress copy]; - _shippingAddress = [shippingAddress copy]; - _clientMetadataId = clientMetadataId; - _payerId = payerId; - _creditFinancing = creditFinancing; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce_Internal.h deleted file mode 100755 index 50ad737c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalAccountNonce_Internal.h +++ /dev/null @@ -1,40 +0,0 @@ -#import "BTPayPalAccountNonce.h" -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTPayPalCreditFinancingAmount () - -- (instancetype)initWithCurrency:(NSString *)currency value:(NSString *)value; - -@end - -@interface BTPayPalCreditFinancing () - -- (instancetype)initWithCardAmountImmutable:(BOOL)cardAmountImmutable - monthlyPayment:(BTPayPalCreditFinancingAmount *)monthlyPayment - payerAcceptance:(BOOL)payerAcceptance - term:(NSInteger)term - totalCost:(BTPayPalCreditFinancingAmount *)totalCost - totalInterest:(BTPayPalCreditFinancingAmount *)totalInterest; - -@end - -@interface BTPayPalAccountNonce () - -- (instancetype)initWithNonce:(NSString *)nonce - description:(NSString *)description - email:(NSString *)email - firstName:(NSString *)firstName - lastName:(NSString *)lastName - phone:(NSString *)phone - billingAddress:(BTPostalAddress *)billingAddress - shippingAddress:(BTPostalAddress *)shippingAddress - clientMetadataId:(NSString *)clientMetadataId - payerId:(NSString *)payerId - isDefault:(BOOL)isDefault - creditFinancing:(BTPayPalCreditFinancing *)creditFinancing; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancing.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancing.m deleted file mode 100755 index 8047d484..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancing.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "BTPayPalAccountNonce_Internal.h" - -@interface BTPayPalCreditFinancing () - -@property (nonatomic, readwrite) BOOL cardAmountImmutable; -@property (nonatomic, readwrite, strong) BTPayPalCreditFinancingAmount *monthlyPayment; -@property (nonatomic, readwrite) BOOL payerAcceptance; -@property (nonatomic, readwrite) NSInteger term; -@property (nonatomic, readwrite, strong) BTPayPalCreditFinancingAmount *totalCost; -@property (nonatomic, readwrite, strong) BTPayPalCreditFinancingAmount *totalInterest; - -@end - -@implementation BTPayPalCreditFinancing - -- (instancetype)initWithCardAmountImmutable:(BOOL)cardAmountImmutable - monthlyPayment:(BTPayPalCreditFinancingAmount *)monthlyPayment - payerAcceptance:(BOOL)payerAcceptance - term:(NSInteger)term - totalCost:(BTPayPalCreditFinancingAmount *)totalCost - totalInterest:(BTPayPalCreditFinancingAmount *)totalInterest -{ - if (self = [super init]) { - _cardAmountImmutable = cardAmountImmutable; - _monthlyPayment = monthlyPayment; - _payerAcceptance = payerAcceptance; - _term = term; - _totalCost = totalCost; - _totalInterest = totalInterest; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancingAmount.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancingAmount.m deleted file mode 100755 index 74d39eb8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalCreditFinancingAmount.m +++ /dev/null @@ -1,20 +0,0 @@ -#import "BTPayPalAccountNonce_Internal.h" - -@interface BTPayPalCreditFinancingAmount () - -@property (nonatomic, readwrite, copy) NSString *currency; -@property (nonatomic, readwrite, copy) NSString *value; - -@end - -@implementation BTPayPalCreditFinancingAmount - -- (instancetype)initWithCurrency:(NSString *)currency value:(NSString *)value { - if (self = [super init]) { - _currency = currency; - _value = value; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver.m deleted file mode 100755 index 7b6ae422..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver.m +++ /dev/null @@ -1,963 +0,0 @@ -#import "BTPayPalDriver_Internal.h" - -#import "PPOTRequest.h" -#import "PPOTCore.h" - -#if __has_include("BraintreeCore.h") -#import "BTAPIClient_Internal.h" -#import "BTPayPalAccountNonce_Internal.h" -#import "BTPostalAddress.h" -#import "BTLogger_Internal.h" -#else -#import -#import -#import -#import -#import -#endif -#import -#import "BTConfiguration+PayPal.h" - -NSString *const BTPayPalDriverErrorDomain = @"com.braintreepayments.BTPayPalDriverErrorDomain"; - -static void (^appSwitchReturnBlock)(NSURL *url); - -typedef NS_ENUM(NSUInteger, BTPayPalPaymentType) { - BTPayPalPaymentTypeUnknown = 0, - BTPayPalPaymentTypeFuturePayments, - BTPayPalPaymentTypeCheckout, - BTPayPalPaymentTypeBillingAgreement, -}; - -@interface BTPayPalDriver () -@end - -@implementation BTPayPalDriver - -+ (void)load { - if (self == [BTPayPalDriver class]) { - PayPalClass = [PPOTCore class]; - - [[BTAppSwitch sharedInstance] registerAppSwitchHandler:self]; - - [[BTTokenizationService sharedService] registerType:@"PayPal" withTokenizationBlock:^(BTAPIClient *apiClient, __unused NSDictionary *options, void (^completionBlock)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error)) { - BTPayPalDriver *driver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - driver.viewControllerPresentingDelegate = options[BTTokenizationServiceViewPresentingDelegateOption]; - driver.appSwitchDelegate = options[BTTokenizationServiceAppSwitchDelegateOption]; - [driver authorizeAccountWithAdditionalScopes:options[BTTokenizationServicePayPalScopesOption] completion:completionBlock]; - }]; - - [[BTPaymentMethodNonceParser sharedParser] registerType:@"PayPalAccount" withParsingBlock:^BTPaymentMethodNonce * _Nullable(BTJSON * _Nonnull payPalAccount) { - return [self payPalAccountFromJSON:payPalAccount]; - }]; - } -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - BTClientMetadataSourceType source = [self isiOSAppAvailableForAppSwitch] ? BTClientMetadataSourcePayPalApp : BTClientMetadataSourcePayPalBrowser; - _apiClient = [apiClient copyWithSource:source integration:apiClient.metadata.integration]; - } - return self; -} - -- (instancetype)init { - return nil; -} - -#pragma mark - Authorization (Future Payments) - -- (void)authorizeAccountWithCompletion:(void (^)(BTPayPalAccountNonce *paymentMethod, NSError *error))completionBlock { - [self authorizeAccountWithAdditionalScopes:[NSSet set] completion:completionBlock]; -} - -- (void)authorizeAccountWithAdditionalScopes:(NSSet *)additionalScopes completion:(void (^)(BTPayPalAccountNonce *, NSError *))completionBlock { - [self authorizeAccountWithAdditionalScopes:additionalScopes forceFuturePaymentFlow:false completion:completionBlock]; -} - -- (void)authorizeAccountWithAdditionalScopes:(NSSet *)additionalScopes forceFuturePaymentFlow:(BOOL)forceFuturePaymentFlow completion:(void (^)(BTPayPalAccountNonce *, NSError *))completionBlock { - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTPayPalDriver failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - [self setAuthorizationAppSwitchReturnBlock:completionBlock]; - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - if (error) { - if (completionBlock) completionBlock(nil, error); - return; - } - - if (configuration.isBillingAgreementsEnabled && !forceFuturePaymentFlow) { - // Switch to Billing Agreements flow - BTPayPalRequest *payPalRequest = [[BTPayPalRequest alloc] init]; // Drop-in only supports Vault flow, which does not use currency code or amount - [self requestBillingAgreement:payPalRequest completion:completionBlock]; - return; - } - - if (![self verifyAppSwitchWithRemoteConfiguration:configuration.json error:&error]) { - if (completionBlock) completionBlock(nil, error); - return; - } - - PPOTAuthorizationRequest *request = - [self.requestFactory requestWithScopeValues:[self.defaultOAuth2Scopes setByAddingObjectsFromSet:(additionalScopes ? additionalScopes : [NSSet set])] - privacyURL:[configuration.json[@"paypal"][@"privacyUrl"] asURL] - agreementURL:[configuration.json[@"paypal"][@"userAgreementUrl"] asURL] - clientID:[self paypalClientIdWithRemoteConfiguration:configuration.json] - environment:[self payPalEnvironmentForRemoteConfiguration:configuration.json] - callbackURLScheme:self.returnURLScheme]; - - if (self.apiClient.clientToken) { - request.additionalPayloadAttributes = @{ @"client_token": self.apiClient.clientToken.originalValue }; - } else if (self.apiClient.tokenizationKey) { - request.additionalPayloadAttributes = @{ @"client_key": self.apiClient.tokenizationKey }; - } - - if (![SFSafariViewController class]) { - [self informDelegateWillPerformAppSwitch]; - } - [request performWithAdapterBlock:^(BOOL success, NSURL *url, PPOTRequestTarget target, NSString *clientMetadataId, NSError *error) { - self.clientMetadataId = clientMetadataId; - - [self sendAnalyticsEventForInitiatingOneTouchForPaymentType:BTPayPalPaymentTypeFuturePayments withSuccess:success target:target]; - - [self handlePayPalRequestWithSuccess:success error:error requestURL:url target:target paymentType:BTPayPalPaymentTypeFuturePayments completion:completionBlock]; - }]; - }]; -} - -- (void)setAuthorizationAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce *account, NSError *error))completionBlock { - [self setAppSwitchReturnBlock:completionBlock forPaymentType:BTPayPalPaymentTypeFuturePayments]; -} - -#pragma mark - Billing Agreement - -- (void)requestBillingAgreement:(BTPayPalRequest *)request completion:(void (^)(BTPayPalAccountNonce *tokenizedCheckout, NSError *error))completionBlock { - [self requestExpressCheckout:request isBillingAgreement:YES handler:nil completion:completionBlock]; -} - -- (void)requestBillingAgreement:(BTPayPalRequest *)request handler:(id)handler completion:(void (^)(BTPayPalAccountNonce * _Nullable, NSError * _Nullable))completionBlock { - [self requestExpressCheckout:request isBillingAgreement:YES handler:handler completion:completionBlock]; -} - -- (void)setBillingAgreementAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce *tokenizedAccount, NSError *error))completionBlock { - [self setAppSwitchReturnBlock:completionBlock forPaymentType:BTPayPalPaymentTypeBillingAgreement]; -} - -#pragma mark - Express Checkout (One-Time Payments) - -- (void)requestOneTimePayment:(BTPayPalRequest *)request completion:(void (^)(BTPayPalAccountNonce *tokenizedCheckout, NSError *error))completionBlock { - [self requestExpressCheckout:request isBillingAgreement:NO handler:nil completion:completionBlock]; -} - -- (void)requestOneTimePayment:(BTPayPalRequest *)request handler:(id)handler completion:(void (^)(BTPayPalAccountNonce *tokenizedCheckout, NSError *error))completionBlock { - [self requestExpressCheckout:request isBillingAgreement:NO handler:handler completion:completionBlock]; -} - -- (void)setOneTimePaymentAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce *tokenizedAccount, NSError *error))completionBlock { - [self setAppSwitchReturnBlock:completionBlock forPaymentType:BTPayPalPaymentTypeCheckout]; -} - -#pragma mark - Helpers - -/// A "Hermes checkout" is used by both Billing Agreements and Express Checkout -- (void)requestExpressCheckout:(BTPayPalRequest *)request - isBillingAgreement:(BOOL)isBillingAgreement - handler:(id)handler - completion:(void (^)(BTPayPalAccountNonce *tokenizedCheckout, NSError *error))completionBlock { - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTPayPalDriver failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - if (!request || (!isBillingAgreement && !request.amount)) { - completionBlock(nil, [NSError errorWithDomain:BTPayPalDriverErrorDomain code:BTPayPalDriverErrorTypeInvalidRequest userInfo:nil]); - return; - } - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - if (error) { - if (completionBlock) completionBlock(nil, error); - return; - } - - if (![self verifyAppSwitchWithRemoteConfiguration:configuration.json error:&error]) { - if (completionBlock) completionBlock(nil, error); - return; - } - - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - NSMutableDictionary *experienceProfile = [NSMutableDictionary dictionary]; - - if (!isBillingAgreement) { - parameters[@"intent"] = [self.class intentTypeToString:request.intent]; - if (request.amount != nil) { - parameters[@"amount"] = request.amount; - } - } else { - if (request.billingAgreementDescription.length > 0) { - parameters[@"description"] = request.billingAgreementDescription; - } - } - - parameters[@"offer_paypal_credit"] = @(request.offerCredit); - - experienceProfile[@"no_shipping"] = @(!request.isShippingAddressRequired); - - experienceProfile[@"brand_name"] = request.displayName ?: [configuration.json[@"paypal"][@"displayName"] asString]; - - NSString *landingPageTypeValue = [self.class landingPageTypeToString:request.landingPageType]; - if (landingPageTypeValue != nil) { - experienceProfile[@"landing_page_type"] = landingPageTypeValue; - } - - if (request.localeCode != nil) { - experienceProfile[@"locale_code"] = request.localeCode; - } - - // Currency code should only be used for Hermes Checkout (one-time payment). - // For BA, currency should not be used. - NSString *currencyCode = request.currencyCode ?: [configuration.json[@"paypal"][@"currencyIsoCode"] asString]; - if (!isBillingAgreement && currencyCode) { - parameters[@"currency_iso_code"] = currencyCode; - } - - if (request.shippingAddressOverride != nil) { - experienceProfile[@"address_override"] = @YES; - BTPostalAddress *shippingAddress = request.shippingAddressOverride; - parameters[@"line1"] = shippingAddress.streetAddress; - parameters[@"line2"] = shippingAddress.extendedAddress; - parameters[@"city"] = shippingAddress.locality; - parameters[@"state"] = shippingAddress.region; - parameters[@"postal_code"] = shippingAddress.postalCode; - parameters[@"country_code"] = shippingAddress.countryCodeAlpha2; - parameters[@"recipient_name"] = shippingAddress.recipientName; - } else { - experienceProfile[@"address_override"] = @NO; - } - - NSString *returnURI; - NSString *cancelURI; - - [[self.class payPalClass] redirectURLsForCallbackURLScheme:self.returnURLScheme - withReturnURL:&returnURI - withCancelURL:&cancelURI]; - if (!returnURI || !cancelURI) { - completionBlock(nil, [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeIntegrationReturnURLScheme - userInfo:@{NSLocalizedFailureReasonErrorKey: @"Application may not support One Touch callback URL scheme.", - NSLocalizedRecoverySuggestionErrorKey: @"Check the return URL scheme" }]); - return; - } - - if (returnURI) { - parameters[@"return_url"] = returnURI; - } - if (cancelURI) { - parameters[@"cancel_url"] = cancelURI; - } - - parameters[@"experience_profile"] = experienceProfile; - - self.payPalRequest = request; - - NSString *url = isBillingAgreement ? @"setup_billing_agreement" : @"create_payment_resource"; - - [self.apiClient POST:[NSString stringWithFormat:@"v1/paypal_hermes/%@",url] - parameters:parameters - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - - if (error) { - NSString *errorDetailsIssue = ((BTJSON *)error.userInfo[BTHTTPJSONResponseBodyKey][@"paymentResource"][@"errorDetails"][0][@"issue"]).asString; - if (error.userInfo[NSLocalizedDescriptionKey] == nil && errorDetailsIssue != nil) { - NSMutableDictionary *dictionary = [error.userInfo mutableCopy]; - dictionary[NSLocalizedDescriptionKey] = errorDetailsIssue; - error = [NSError errorWithDomain:error.domain code:error.code userInfo:dictionary]; - } - - if (completionBlock) completionBlock(nil, error); - return; - } - - if (isBillingAgreement) { - [self setBillingAgreementAppSwitchReturnBlock:completionBlock]; - } else { - [self setOneTimePaymentAppSwitchReturnBlock:completionBlock]; - } - - NSString *payPalClientID = [configuration.json[@"paypal"][@"clientId"] asString]; - - if (!payPalClientID && [self payPalEnvironmentForRemoteConfiguration:configuration.json] == PayPalEnvironmentMock) { - payPalClientID = @"FAKE-PAYPAL-CLIENT-ID"; - } - - NSURL *approvalUrl = [body[@"paymentResource"][@"redirectUrl"] asURL]; - if (approvalUrl == nil) { - approvalUrl = [body[@"agreementSetup"][@"approvalUrl"] asURL]; - } - - approvalUrl = [self decorateApprovalURL:approvalUrl forRequest:request]; - - PPOTCheckoutRequest *request = nil; - if (isBillingAgreement) { - request = [self.requestFactory billingAgreementRequestWithApprovalURL:approvalUrl - clientID:payPalClientID - environment:[self payPalEnvironmentForRemoteConfiguration:configuration.json] - callbackURLScheme:self.returnURLScheme]; - } else { - request = [self.requestFactory checkoutRequestWithApprovalURL:approvalUrl - clientID:payPalClientID - environment:[self payPalEnvironmentForRemoteConfiguration:configuration.json] - callbackURLScheme:self.returnURLScheme]; - } - - // Call custom handler and return before beginning the default approval process - if (handler != nil) { - [handler handleApproval:request paypalApprovalDelegate:self]; - return; - } - - if (![SFSafariViewController class]) { - [self informDelegateWillPerformAppSwitch]; - } - - [request performWithAdapterBlock:^(BOOL success, NSURL *url, PPOTRequestTarget target, NSString *clientMetadataId, NSError *error) { - self.clientMetadataId = clientMetadataId; - - if (isBillingAgreement) { - [self sendAnalyticsEventForInitiatingOneTouchForPaymentType:BTPayPalPaymentTypeBillingAgreement withSuccess:success target:target]; - } else { - [self sendAnalyticsEventForInitiatingOneTouchForPaymentType:BTPayPalPaymentTypeCheckout withSuccess:success target:target]; - } - - [self handlePayPalRequestWithSuccess:success - error:error - requestURL:url - target:target - paymentType:isBillingAgreement ? BTPayPalPaymentTypeBillingAgreement : BTPayPalPaymentTypeCheckout - completion:completionBlock]; - }]; - }]; - }]; -} - -- (void)setAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce *tokenizedAccount, NSError *error))completionBlock - forPaymentType:(BTPayPalPaymentType)paymentType { - appSwitchReturnBlock = ^(NSURL *url) { - if (self.safariViewController) { - [self informDelegatePresentingViewControllerNeedsDismissal]; - } else { - [self informDelegateWillProcessAppSwitchReturn]; - } - - // Before parsing the return URL, check whether the user cancelled by breaking - // out of the PayPal app switch flow (e.g. "Done" button in SFSafariViewController) - if ([url.absoluteString isEqualToString:SFSafariViewControllerFinishedURL]) { - if (completionBlock) completionBlock(nil, nil); - return; - } - - [[self.class payPalClass] parseResponseURL:url completionBlock:^(PPOTResult *result) { - - [self sendAnalyticsEventForHandlingOneTouchResult:result forPaymentType:paymentType]; - - switch (result.type) { - case PPOTResultTypeError: - if (completionBlock) completionBlock(nil, result.error); - break; - case PPOTResultTypeCancel: - if (result.error) { - [[BTLogger sharedLogger] error:@"PayPal error: %@", result.error]; - } - if (completionBlock) completionBlock(nil, nil); - break; - case PPOTResultTypeSuccess: { - - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - parameters[@"paypal_account"] = [result.response mutableCopy]; - - if (paymentType == BTPayPalPaymentTypeCheckout) { - parameters[@"paypal_account"][@"options"] = @{ @"validate": @NO }; - if (self.payPalRequest) { - parameters[@"paypal_account"][@"intent"] = [self.class intentTypeToString:self.payPalRequest.intent]; - } - } - if (self.clientMetadataId) { - parameters[@"paypal_account"][@"correlation_id"] = self.clientMetadataId; - } - - BTClientMetadata *metadata = [self clientMetadata]; - parameters[@"_meta"] = @{ - @"source" : metadata.sourceString, - @"integration" : metadata.integrationString, - @"sessionId" : metadata.sessionId, - }; - - [self.apiClient POST:@"/v1/payment_methods/paypal_accounts" - parameters:parameters - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) - { - if (error) { - [self sendAnalyticsEventForTokenizationFailureForPaymentType:paymentType]; - if (completionBlock) completionBlock(nil, error); - return; - } - - [self sendAnalyticsEventForTokenizationSuccessForPaymentType:paymentType]; - - BTJSON *payPalAccount = body[@"paypalAccounts"][0]; - BTPayPalAccountNonce *tokenizedAccount = [self.class payPalAccountFromJSON:payPalAccount]; - - [self sendAnalyticsEventIfCreditFinancingInNonce:tokenizedAccount forPaymentType:paymentType]; - - if (completionBlock) completionBlock(tokenizedAccount, nil); - }]; - - break; - } - } - appSwitchReturnBlock = nil; - }]; - }; -} - -- (void)handlePayPalRequestWithSuccess:(BOOL)success - error:(NSError *)error - requestURL:(NSURL *)url - target:(PPOTRequestTarget)target - paymentType:(BTPayPalPaymentType)paymentType - completion:(void (^)(BTPayPalAccountNonce *, NSError *))completionBlock -{ - if (success) { - // Defensive programming in case PayPal One Touch returns a non-HTTP URL so that SFSafariViewController doesn't crash - if ([SFSafariViewController class] && ![url.scheme.lowercaseString hasPrefix:@"http"]) { - NSError *urlError = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeUnknown - userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Attempted to open an invalid URL in SFSafariViewController: %@://", url.scheme], - NSLocalizedRecoverySuggestionErrorKey: @"Try again or contact Braintree Support." }]; - if (completionBlock) completionBlock(nil, urlError); - - NSString *eventName = [NSString stringWithFormat:@"ios.%@.%@.error.safariviewcontrollerbadscheme.%@", [self.class eventStringForPaymentType:paymentType], [self.class eventStringForRequestTarget:target], url.scheme]; - [self.apiClient sendAnalyticsEvent:eventName]; - - return; - } - [self performSwitchRequest:url]; - if (![SFSafariViewController class]) { - [self informDelegateDidPerformAppSwitchToTarget:target]; - } - } else { - if (completionBlock) completionBlock(nil, error); - } -} - -- (void)performSwitchRequest:(NSURL *)appSwitchURL { - if ([SFSafariViewController class]) { - [self informDelegatePresentingViewControllerRequestPresent:appSwitchURL]; - } else { - UIApplication *application = [UIApplication sharedApplication]; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 - if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) { - [application openURL:appSwitchURL options:[NSDictionary dictionary] completionHandler:nil]; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [application openURL:appSwitchURL]; -#pragma clang diagnostic pop - } -#else -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [application openURL:appSwitchURL]; -#pragma clang diagnostic pop -#endif - } -} - -- (NSString *)payPalEnvironmentForRemoteConfiguration:(BTJSON *)configuration { - NSString *btPayPalEnvironmentName = [configuration[@"paypal"][@"environment"] asString]; - if ([btPayPalEnvironmentName isEqualToString:@"offline"]) { - return PayPalEnvironmentMock; - } else if ([btPayPalEnvironmentName isEqualToString:@"live"]) { - return PayPalEnvironmentProduction; - } else { - // Fall back to mock when configuration has an unsupported value for environment, e.g. "custom" - // Instead of returning btPayPalEnvironmentName - return PayPalEnvironmentMock; - } -} - -- (NSString *)paypalClientIdWithRemoteConfiguration:(BTJSON *)configuration { - if ([[configuration[@"paypal"][@"environment"] asString] isEqualToString:@"offline"] && ![configuration[@"paypal"][@"clientId"] isString]) { - return @"mock-paypal-client-id"; - } else { - return [configuration[@"paypal"][@"clientId"] asString]; - } -} - -- (BTClientMetadata *)clientMetadata { - BTMutableClientMetadata *metadata = [self.apiClient.metadata mutableCopy]; - - if ([self isiOSAppAvailableForAppSwitch]) { - metadata.source = BTClientMetadataSourcePayPalApp; - } else { - metadata.source = BTClientMetadataSourcePayPalBrowser; - } - - return [metadata copy]; -} - -- (NSSet *)defaultOAuth2Scopes { - return [NSSet setWithObjects:@"https://uri.paypal.com/services/payments/futurepayments", @"email", nil]; -} - -+ (BTPostalAddress *)accountAddressFromJSON:(BTJSON *)addressJSON { - if (!addressJSON.isObject) { - return nil; - } - - BTPostalAddress *address = [[BTPostalAddress alloc] init]; - address.recipientName = [addressJSON[@"recipientName"] asString]; // Likely to be nil - address.streetAddress = [addressJSON[@"street1"] asString]; - address.extendedAddress = [addressJSON[@"street2"] asString]; - address.locality = [addressJSON[@"city"] asString]; - address.region = [addressJSON[@"state"] asString]; - address.postalCode = [addressJSON[@"postalCode"] asString]; - address.countryCodeAlpha2 = [addressJSON[@"country"] asString]; - - return address; -} - -+ (BTPostalAddress *)shippingOrBillingAddressFromJSON:(BTJSON *)addressJSON { - if (!addressJSON.isObject) { - return nil; - } - - BTPostalAddress *address = [[BTPostalAddress alloc] init]; - address.recipientName = [addressJSON[@"recipientName"] asString]; // Likely to be nil - address.streetAddress = [addressJSON[@"line1"] asString]; - address.extendedAddress = [addressJSON[@"line2"] asString]; - address.locality = [addressJSON[@"city"] asString]; - address.region = [addressJSON[@"state"] asString]; - address.postalCode = [addressJSON[@"postalCode"] asString]; - address.countryCodeAlpha2 = [addressJSON[@"countryCode"] asString]; - - return address; -} - -+ (BTPayPalCreditFinancingAmount *)creditFinancingAmountFromJSON:(BTJSON *)amountJSON { - if (!amountJSON.isObject) { - return nil; - } - - NSString *currency = [amountJSON[@"currency"] asString]; - NSString *value = [amountJSON[@"value"] asString]; - - return [[BTPayPalCreditFinancingAmount alloc] initWithCurrency:currency value:value]; -} - -+ (BTPayPalCreditFinancing *)creditFinancingFromJSON:(BTJSON *)creditFinancingOfferedJSON { - if (!creditFinancingOfferedJSON.isObject) { - return nil; - } - - BOOL isCardAmountImmutable = [creditFinancingOfferedJSON[@"cardAmountImmutable"] isTrue]; - - BTPayPalCreditFinancingAmount *monthlyPayment = [self.class creditFinancingAmountFromJSON:creditFinancingOfferedJSON[@"monthlyPayment"]]; - - BOOL payerAcceptance = [creditFinancingOfferedJSON[@"payerAcceptance"] isTrue]; - NSInteger term = [creditFinancingOfferedJSON[@"term"] asIntegerOrZero]; - BTPayPalCreditFinancingAmount *totalCost = [self.class creditFinancingAmountFromJSON:creditFinancingOfferedJSON[@"totalCost"]]; - BTPayPalCreditFinancingAmount *totalInterest = [self.class creditFinancingAmountFromJSON:creditFinancingOfferedJSON[@"totalInterest"]]; - - return [[BTPayPalCreditFinancing alloc] initWithCardAmountImmutable:isCardAmountImmutable - monthlyPayment:monthlyPayment - payerAcceptance:payerAcceptance - term:term - totalCost:totalCost - totalInterest:totalInterest]; -} - -+ (BTPayPalAccountNonce *)payPalAccountFromJSON:(BTJSON *)payPalAccount { - NSString *nonce = [payPalAccount[@"nonce"] asString]; - NSString *description = [payPalAccount[@"description"] asString]; - - BTJSON *details = payPalAccount[@"details"]; - - NSString *email = [details[@"email"] asString]; - NSString *clientMetadataId = [details[@"correlationId"] asString]; - // Allow email to be under payerInfo - if ([details[@"payerInfo"][@"email"] isString]) { - email = [details[@"payerInfo"][@"email"] asString]; - } - - NSString *firstName = [details[@"payerInfo"][@"firstName"] asString]; - NSString *lastName = [details[@"payerInfo"][@"lastName"] asString]; - NSString *phone = [details[@"payerInfo"][@"phone"] asString]; - NSString *payerId = [details[@"payerInfo"][@"payerId"] asString]; - BOOL isDefault = [payPalAccount[@"default"] isTrue]; - - BTPostalAddress *shippingAddress = [self.class shippingOrBillingAddressFromJSON:details[@"payerInfo"][@"shippingAddress"]]; - BTPostalAddress *billingAddress = [self.class shippingOrBillingAddressFromJSON:details[@"payerInfo"][@"billingAddress"]]; - if (!shippingAddress) { - shippingAddress = [self.class accountAddressFromJSON:details[@"payerInfo"][@"accountAddress"]]; - } - - // Braintree gateway has some inconsistent behavior depending on - // the type of nonce, and sometimes returns "PayPal" for description, - // and sometimes returns a real identifying string. The former is not - // desirable for display. The latter is. - // As a workaround, we ignore descriptions that look like "PayPal". - if ([description caseInsensitiveCompare:@"PayPal"] == NSOrderedSame) { - description = email; - } - - BTPayPalCreditFinancing *creditFinancing = [self.class creditFinancingFromJSON:details[@"creditFinancingOffered"]]; - - BTPayPalAccountNonce *tokenizedPayPalAccount = [[BTPayPalAccountNonce alloc] initWithNonce:nonce - description:description - email:email - firstName:firstName - lastName:lastName - phone:phone - billingAddress:billingAddress - shippingAddress:shippingAddress - clientMetadataId:clientMetadataId - payerId:payerId - isDefault:isDefault - creditFinancing:creditFinancing]; - - return tokenizedPayPalAccount; -} - -+ (NSString *)intentTypeToString:(BTPayPalRequestIntent)intentType { - NSString *result = nil; - - switch(intentType) { - case BTPayPalRequestIntentAuthorize: - result = @"authorize"; - break; - case BTPayPalRequestIntentSale: - result = @"sale"; - break; - case BTPayPalRequestIntentOrder: - result = @"order"; - break; - default: - result = @"authorize"; - break; - } - - return result; -} - -+ (NSString *)landingPageTypeToString:(BTPayPalRequestLandingPageType)landingPageType { - switch(landingPageType) { - case BTPayPalRequestLandingPageTypeLogin: - return @"login"; - case BTPayPalRequestLandingPageTypeBilling: - return @"billing"; - default: - return nil; - } -} - -#pragma mark - Delegate Informers - -- (void)informDelegateWillPerformAppSwitch { - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchWillSwitchNotification object:self userInfo:nil]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillPerformAppSwitch:)]) { - [self.appSwitchDelegate appSwitcherWillPerformAppSwitch:self]; - } -} - -- (void)informDelegateDidPerformAppSwitchToTarget:(PPOTRequestTarget)target { - BTAppSwitchTarget appSwitchTarget; - switch (target) { - case PPOTRequestTargetBrowser: - appSwitchTarget = BTAppSwitchTargetWebBrowser; - break; - case PPOTRequestTargetOnDeviceApplication: - appSwitchTarget = BTAppSwitchTargetNativeApp; - break; - case PPOTRequestTargetNone: - case PPOTRequestTargetUnknown: - appSwitchTarget = BTAppSwitchTargetUnknown; - // Should never happen - break; - } - - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchDidSwitchNotification object:self userInfo:@{ BTAppSwitchNotificationTargetKey : @(appSwitchTarget) } ]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcher:didPerformSwitchToTarget:)]) { - [self.appSwitchDelegate appSwitcher:self didPerformSwitchToTarget:appSwitchTarget]; - } -} - -- (void)informDelegateWillProcessAppSwitchReturn { - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchWillProcessPaymentInfoNotification object:self userInfo:nil]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillProcessPaymentInfo:)]) { - [self.appSwitchDelegate appSwitcherWillProcessPaymentInfo:self]; - } -} - -- (void)informDelegatePresentingViewControllerRequestPresent:(NSURL*) appSwitchURL { - if (self.viewControllerPresentingDelegate != nil && [self.viewControllerPresentingDelegate respondsToSelector:@selector(paymentDriver:requestsPresentationOfViewController:)]) { - self.safariViewController = [[SFSafariViewController alloc] initWithURL:appSwitchURL]; - self.safariViewController.delegate = self; - [self.viewControllerPresentingDelegate paymentDriver:self requestsPresentationOfViewController:self.safariViewController]; - } else { - [[BTLogger sharedLogger] critical:@"Unable to display View Controller to continue PayPal flow. BTPayPalDriver needs a viewControllerPresentingDelegate to be set."]; - } -} - -- (void)informDelegatePresentingViewControllerNeedsDismissal { - if (self.viewControllerPresentingDelegate != nil && [self.viewControllerPresentingDelegate respondsToSelector:@selector(paymentDriver:requestsDismissalOfViewController:)]) { - [self.viewControllerPresentingDelegate paymentDriver:self requestsDismissalOfViewController:self.safariViewController]; - self.safariViewController = nil; - } else { - [[BTLogger sharedLogger] critical:@"Unable to dismiss View Controller to end PayPal flow. BTPayPalDriver needs a viewControllerPresentingDelegate to be set."]; - } -} - -#pragma mark - SFSafariViewControllerDelegate - -static NSString * const SFSafariViewControllerFinishedURL = @"sfsafariviewcontroller://finished"; - -- (void)safariViewControllerDidFinish:(__unused SFSafariViewController *)controller { - [self.class handleAppSwitchReturnURL:[NSURL URLWithString:SFSafariViewControllerFinishedURL]]; -} - -#pragma mark - Preflight check - -- (BOOL)verifyAppSwitchWithRemoteConfiguration:(BTJSON *)configuration error:(NSError * __autoreleasing *)error { - if (![configuration[@"paypalEnabled"] isTrue]) { - [self.apiClient sendAnalyticsEvent:@"ios.paypal-otc.preflight.disabled"]; - if (error != NULL) { - *error = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeDisabled - userInfo:@{ NSLocalizedDescriptionKey: @"PayPal is not enabled for this merchant", - NSLocalizedRecoverySuggestionErrorKey: @"Enable PayPal for this merchant in the Braintree Control Panel" }]; - } - return NO; - } - - if (self.returnURLScheme == nil || [self.returnURLScheme isEqualToString:@""]) { - NSString *recoverySuggestion = @"PayPal requires a return URL scheme to be configured via [BTAppSwitch setReturnURLScheme:]. This custom URL scheme must also be registered with your app."; - [[BTLogger sharedLogger] critical:recoverySuggestion]; - - [self.apiClient sendAnalyticsEvent:@"ios.paypal-otc.preflight.nil-return-url-scheme"]; - if (error != NULL) { - *error = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeIntegrationReturnURLScheme - userInfo:@{ NSLocalizedDescriptionKey: @"PayPal app switch is missing a returnURLScheme", - NSLocalizedRecoverySuggestionErrorKey: recoverySuggestion }]; - } - return NO; - } - - if (![[self.class payPalClass] doesApplicationSupportOneTouchCallbackURLScheme:self.returnURLScheme]) { - NSString *recoverySuggestion = [NSString stringWithFormat:@"PayPal requires [BTAppSwitch setReturnURLScheme:] to be configured to begin with your app's bundle ID (%@). Currently, it is set to (%@).", [NSBundle mainBundle].bundleIdentifier, self.returnURLScheme]; - [[BTLogger sharedLogger] critical:recoverySuggestion]; - - [self.apiClient sendAnalyticsEvent:@"ios.paypal-otc.preflight.invalid-return-url-scheme"]; - if (error != NULL) { - *error = [NSError errorWithDomain:BTPayPalDriverErrorDomain - code:BTPayPalDriverErrorTypeIntegrationReturnURLScheme - userInfo:@{NSLocalizedFailureReasonErrorKey: @"Application does not support One Touch callback URL scheme", - NSLocalizedRecoverySuggestionErrorKey: recoverySuggestion }]; - } - return NO; - } - - return YES; -} - -#pragma mark - Analytics Helpers - -+ (NSString *)eventStringForPaymentType:(BTPayPalPaymentType)paymentType { - switch (paymentType) { - case BTPayPalPaymentTypeBillingAgreement: - return @"paypal-ba"; - case BTPayPalPaymentTypeFuturePayments: - return @"paypal-future-payments"; - case BTPayPalPaymentTypeCheckout: - return @"paypal-single-payment"; - case BTPayPalPaymentTypeUnknown: - return nil; - } -} - -+ (NSString *)eventStringForRequestTarget:(PPOTRequestTarget)requestTarget { - switch (requestTarget) { - case PPOTRequestTargetNone: - return @"none"; - case PPOTRequestTargetUnknown: - return @"unknown"; - case PPOTRequestTargetOnDeviceApplication: - return @"appswitch"; - case PPOTRequestTargetBrowser: - return @"webswitch"; - } -} - -- (void)sendAnalyticsEventForInitiatingOneTouchForPaymentType:(BTPayPalPaymentType)paymentType - withSuccess:(BOOL)success - target:(PPOTRequestTarget)target -{ - if (paymentType == BTPayPalPaymentTypeUnknown) return; - - NSString *eventName = [NSString stringWithFormat:@"ios.%@.%@.initiate.%@", [self.class eventStringForPaymentType:paymentType], [self.class eventStringForRequestTarget:target], success ? @"started" : @"failed"]; - [self.apiClient sendAnalyticsEvent:eventName]; - - if ((paymentType == BTPayPalPaymentTypeCheckout || paymentType == BTPayPalPaymentTypeBillingAgreement) && self.payPalRequest.offerCredit) { - NSString *eventName = [NSString stringWithFormat:@"ios.%@.%@.credit.offered.%@", [self.class eventStringForPaymentType:paymentType], [self.class eventStringForRequestTarget:target], success ? @"started" : @"failed"]; - - [self.apiClient sendAnalyticsEvent:eventName]; - } -} - -- (void)sendAnalyticsEventForHandlingOneTouchResult:(PPOTResult *)result forPaymentType:(BTPayPalPaymentType)paymentType { - if (paymentType == BTPayPalPaymentTypeUnknown) return; - - NSString *eventName = [NSString stringWithFormat:@"ios.%@.%@", [self.class eventStringForPaymentType:paymentType], [self.class eventStringForRequestTarget:result.target]]; - - switch (result.type) { - case PPOTResultTypeError: - if (result.error.code == PPOTErrorCodePersistedDataFetchFailed) { - return [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"%@.failed-keychain", eventName]]; - } - return [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"%@.failed", eventName]]; - case PPOTResultTypeCancel: - if (result.error) { - return [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"%@.canceled-with-error", eventName]]; - } else { - return [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"%@.canceled", eventName]]; - } - case PPOTResultTypeSuccess: - return [self.apiClient sendAnalyticsEvent:[NSString stringWithFormat:@"%@.succeeded", eventName]]; - } -} - -- (void)sendAnalyticsEventIfCreditFinancingInNonce:(BTPayPalAccountNonce *)payPalAccountNonce forPaymentType:(BTPayPalPaymentType)paymentType { - if ([payPalAccountNonce creditFinancing]) { - NSString *eventName = [NSString stringWithFormat:@"ios.%@.credit.accepted", [self.class eventStringForPaymentType:paymentType]]; - - [self.apiClient sendAnalyticsEvent:eventName]; - } -} - -- (void)sendAnalyticsEventForTokenizationSuccessForPaymentType:(BTPayPalPaymentType)paymentType { - if (paymentType == BTPayPalPaymentTypeUnknown) return; - - NSString *eventName = [NSString stringWithFormat:@"ios.%@.tokenize.succeeded", [self.class eventStringForPaymentType:paymentType]]; - [self.apiClient sendAnalyticsEvent:eventName]; -} - -- (void)sendAnalyticsEventForTokenizationFailureForPaymentType:(BTPayPalPaymentType)paymentType { - if (paymentType == BTPayPalPaymentTypeUnknown) return; - - NSString *eventName = [NSString stringWithFormat:@"ios.%@.tokenize.failed", [self.class eventStringForPaymentType:paymentType]]; - [self.apiClient sendAnalyticsEvent:eventName]; -} - -#pragma mark - App Switch handling - -- (BOOL)isiOSAppAvailableForAppSwitch { - return [[self.class payPalClass] isWalletAppInstalled]; -} - -+ (BOOL)canHandleAppSwitchReturnURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - return appSwitchReturnBlock != nil && [PPOTCore canParseURL:url sourceApplication:sourceApplication]; -} - -+ (void)handleAppSwitchReturnURL:(NSURL *)url { - if (appSwitchReturnBlock) { - appSwitchReturnBlock(url); - } -} - -- (NSString *)returnURLScheme { - if (!_returnURLScheme) { - _returnURLScheme = [[BTAppSwitch sharedInstance] returnURLScheme]; - } - return _returnURLScheme; -} - -#pragma mark - BTPayPalApprovalHandler delegate methods - -- (void)onApprovalComplete:(NSURL *)url { - [self.class handleAppSwitchReturnURL:url]; -} - -- (void)onApprovalCancel { - [self.class handleAppSwitchReturnURL:[NSURL URLWithString:SFSafariViewControllerFinishedURL]]; -} - -#pragma mark - Internal - -- (NSURL *)decorateApprovalURL:(NSURL*)approvalURL forRequest:(BTPayPalRequest *)paypalRequest { - if (approvalURL != nil && paypalRequest.userAction != BTPayPalRequestUserActionDefault) { - NSURLComponents* approvalURLComponents = [[NSURLComponents alloc] initWithURL:approvalURL resolvingAgainstBaseURL:NO]; - if (approvalURLComponents != nil) { - NSString *userActionValue = [BTPayPalDriver userActionTypeToString:paypalRequest.userAction]; - if ([userActionValue length] > 0) { - NSString *query = [approvalURLComponents query]; - NSString *delimiter = [query length] == 0 ? @"" : @"&"; - query = [NSString stringWithFormat:@"%@%@useraction=%@", query, delimiter, userActionValue]; - approvalURLComponents.query = query; - } - return [approvalURLComponents URL]; - } - } - return approvalURL; -} - -+ (NSString *)userActionTypeToString:(BTPayPalRequestUserAction)userActionType { - NSString *result = nil; - - switch(userActionType) { - case BTPayPalRequestUserActionCommit: - result = @"commit"; - break; - default: - result = @""; - break; - } - - return result; -} - -- (BTPayPalRequestFactory *)requestFactory { - if (!_requestFactory) { - _requestFactory = [[BTPayPalRequestFactory alloc] init]; - } - return _requestFactory; -} - -static Class PayPalClass; - -+ (void)setPayPalClass:(Class)payPalClass { - if ([payPalClass isSubclassOfClass:[PPOTCore class]]) { - PayPalClass = payPalClass; - } -} - -+ (Class)payPalClass { - return PayPalClass; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver_Internal.h deleted file mode 100755 index ece7f839..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalDriver_Internal.h +++ /dev/null @@ -1,81 +0,0 @@ -#import "BTPayPalDriver.h" -#import "BTPayPalRequestFactory.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BTPayPalDriver () - -/*! - @brief Set up the callback to be invoked on return from browser or app switch for PayPal Express Checkout (Checkout Flow) - - @discussion Exposed internally to test BTPayPalDriver app switch return behavior by simulating an app switch return -*/ -- (void)setOneTimePaymentAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedCheckout, NSError * _Nullable error))completionBlock; - -/*! - @brief Set up the callback to be invoked on return from browser or app switch for PayPal Billing Agreement (Vault Flow) - - @discussion Exposed internally to test BTPayPalDriver app switch return behavior by simulating an app switch return -*/ -- (void)setBillingAgreementAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedAccount, NSError * _Nullable error))completionBlock; - -/*! - @brief Set up the callback to be invoked on return from browser or app switch for PayPal Future Payments (Vault Flow) - - @discussion Exposed internally to test BTPayPalDriver app switch return behavior by simulating an app switch return -*/ -- (void)setAuthorizationAppSwitchReturnBlock:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedAccount, NSError * _Nullable error))completionBlock; - -- (void)informDelegatePresentingViewControllerRequestPresent:(NSURL*) appSwitchURL; - -- (void)informDelegatePresentingViewControllerNeedsDismissal; - -/*! - @brief Exposed for testing to create stubbed versions of `PayPalOneTouchAuthorizationRequest` and `PayPalOneTouchCheckoutRequest` -*/ -@property (nonatomic, strong) BTPayPalRequestFactory *requestFactory; - -/*! - @brief Exposed for testing to provide subclasses of PayPalOneTouchCore to stub class methods -*/ -+ (Class)payPalClass; -+ (void)setPayPalClass:(Class)payPalClass; - -/*! - @brief Exposed for testing to provide a convenient way to inject custom return URL schemes -*/ -@property (nonatomic, copy) NSString *returnURLScheme; - -/*! - @brief Exposed for testing to get the instance of BTAPIClient after it has been copied by `copyWithSource:integration:` -*/ -@property (nonatomic, strong, nullable) BTAPIClient *apiClient; - -/*! - @brief Exposed for testing the clientMetadataId associated with this request -*/ -@property (nonatomic, strong) NSString *clientMetadataId; - -/*! - @brief Exposed for testing the intent associated with this request -*/ -@property (nonatomic, strong) BTPayPalRequest *payPalRequest; - -/*! - @brief Exposed for testing, the safariViewController instance used for the paypal flow on iOS >=9 -*/ -@property (nonatomic, strong, nullable) SFSafariViewController *safariViewController; - -/*! - @brief Used to test the Future Payments flow by force -*/ -- (void)authorizeAccountWithAdditionalScopes:(NSSet *)additionalScopes forceFuturePaymentFlow:(BOOL)forceFuturePaymentFlow completion:(void (^)(BTPayPalAccountNonce *, NSError *))completionBlock; - -+ (nullable BTPayPalCreditFinancingAmount *)creditFinancingAmountFromJSON:(BTJSON *)amountJSON; - -+ (nullable BTPayPalCreditFinancing *)creditFinancingFromJSON:(BTJSON *)creditFinancingOfferedJSON; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequest.m deleted file mode 100755 index 6e4b9708..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequest.m +++ /dev/null @@ -1,29 +0,0 @@ -#import "BTPayPalRequest.h" - -@implementation BTPayPalRequest - -- (instancetype)init -{ - self = [super init]; - if (self) { - _shippingAddressRequired = NO; - _offerCredit = NO; - _intent = BTPayPalRequestIntentAuthorize; - _userAction = BTPayPalRequestUserActionDefault; - _landingPageType = BTPayPalRequestLandingPageTypeDefault; - } - return self; -} - -- (instancetype)initWithAmount:(NSString *)amount { - if (amount == nil) { - return nil; - } - - if (self = [self init]) { - _amount = amount; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.h deleted file mode 100755 index 673d085a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.h +++ /dev/null @@ -1,33 +0,0 @@ -#import -#import "PPOTRequest.h" -#import "PPOTCore.h" - -@interface BTPayPalRequestFactory : NSObject - -/*! - @brief Creates PayPal Express Checkout requests -*/ -- (PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(NSURL *)approvalURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -/*! - @brief Creates PayPal Billing Agreement requests -*/ -- (PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(NSURL *)approvalURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -/*! - @brief Creates PayPal Future Payment requests -*/ -- (PPOTAuthorizationRequest *)requestWithScopeValues:(NSSet *)scopeValues - privacyURL:(NSURL *)privacyURL - agreementURL:(NSURL *)agreementURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.m deleted file mode 100755 index 1508f992..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/BTPayPalRequestFactory.m +++ /dev/null @@ -1,45 +0,0 @@ -#import "BTPayPalRequestFactory.h" -#import "PPOTRequestFactory.h" - -@implementation BTPayPalRequestFactory - -- (PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(NSURL *)approvalURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme -{ - return [PPOTRequestFactory checkoutRequestWithApprovalURL:approvalURL - pairingId:[PPOTRequest tokenFromApprovalURL:approvalURL] - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -- (PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(NSURL *)approvalURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme -{ - return [PPOTRequestFactory billingAgreementRequestWithApprovalURL:approvalURL - pairingId:[PPOTRequest tokenFromApprovalURL:approvalURL] - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -- (PPOTAuthorizationRequest *)requestWithScopeValues:(NSSet *)scopeValues - privacyURL:(NSURL *)privacyURL - agreementURL:(NSURL *)agreementURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme -{ - return [PPOTRequestFactory authorizationRequestWithScopeValues:scopeValues - privacyURL:privacyURL - agreementURL:agreementURL - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Info.plist b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Info.plist deleted file mode 100755 index d3de8eef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector.m deleted file mode 100755 index 66cf2390..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// PPDataCollector.m -// PPDataCollector -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPDataCollector_Internal.h" -#import "PPRCClientMetadataIDProvider.h" - -#import "PPOTDevice.h" -#import "PPOTVersion.h" -#import "PPOTMacros.h" -#import "PPOTURLSession.h" - -@implementation PPDataCollector - -+ (NSString *)generateClientMetadataID:(NSString *)pairingID { - static PPRCClientMetadataIDProvider *clientMetadataIDProvider; - __block NSString *clientMetadataPairingID = [pairingID copy]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - PPRCClientMetadataIDProviderNetworkAdapterBlock adapterBlock = ^(NSURLRequest *request, PPRCClientMetadataIDProviderNetworkResponseBlock completionBlock) { - [[PPOTURLSession session] sendRequest:request completionBlock:^(NSData* responseData, NSHTTPURLResponse *response, __unused NSError *error) { - completionBlock(response, responseData); - }]; - }; - - clientMetadataIDProvider = [[PPRCClientMetadataIDProvider alloc] initWithAppGuid:[PPOTDevice appropriateIdentifier] - sourceAppVersion:PayPalOTVersion() - networkAdapterBlock:adapterBlock - pairingID:clientMetadataPairingID]; - // On first time, do not use a pairing ID to generate the client metadata ID because it's already been paired - clientMetadataPairingID = nil; - }); - - NSString *clientMetadataID = [clientMetadataIDProvider clientMetadataID:clientMetadataPairingID]; - PPLog(@"ClientMetadataID: %@", clientMetadataID); - return clientMetadataID; -} - -+ (NSString *)generateClientMetadataID { - return [PPDataCollector generateClientMetadataID:nil]; -} - -+ (nonnull NSString *)clientMetadataID:(nullable NSString *)pairingID { - return [self generateClientMetadataID:pairingID]; -} - -+ (nonnull NSString *)clientMetadataID { - return [self generateClientMetadataID]; -} - -+ (nonnull NSString *)collectPayPalDeviceData { - NSMutableDictionary *dataDictionary = [NSMutableDictionary new]; - NSString *payPalClientMetadataId = [PPDataCollector generateClientMetadataID]; - if (payPalClientMetadataId) { - dataDictionary[@"correlation_id"] = payPalClientMetadataId; - } - - NSError *error; - NSData *data = [NSJSONSerialization dataWithJSONObject:dataDictionary options:0 error:&error]; - if (!data) { - NSLog(@"ERROR: Failed to create deviceData string, error = %@", error); - } - - return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector_Internal.h deleted file mode 100755 index 2ba91dec..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/PPDataCollector_Internal.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// PPDataCollector.h -// PayPalDataCollector -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPDataCollector.h" - -@interface PPDataCollector () - -/*! - @brief Generates a client metadata ID using an optional pairing ID. - - @note This is an internal method for generating raw client metadata IDs, which is not - the correct format for device data when creating a transaction. - - @param pairingID a pairing ID to associate with this clientMetadataID must be 10-32 chars long or null - @return a client metadata ID to send as a header -*/ -+ (nonnull NSString *)generateClientMetadataID:(nullable NSString *)pairingID; - -/*! - @brief Generates a client metadata ID. - - @note This is an internal method for generating raw client metadata IDs, which is not - the correct format for device data when creating a transaction. - - @return a client metadata ID to send as a header -*/ -+ (nonnull NSString *)generateClientMetadataID; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PPDataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PPDataCollector.h deleted file mode 100755 index 66ba92a8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PPDataCollector.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// PPDataCollector.h -// PayPalDataCollector -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPDataCollector : NSObject - -/*! - @brief Returns a client metadata ID. - - @note This returns a raw client metadata ID, which is not the correct format for device data - when creating a transaction. Instead, it is recommended to use `collectPayPalDeviceData`. - - @param pairingID a pairing ID to associate with this clientMetadataID must be 10-32 chars long or null - @return a client metadata ID to send as a header -*/ -+ (nonnull NSString *)clientMetadataID:(nullable NSString *)pairingID; - -/*! - @brief Returns a client metadata ID. - - @note This returns a raw client metadata ID, which is not the correct format for device data - when creating a transaction. Instead, it is recommended to use `collectPayPalDeviceData`. - - @return a client metadata ID to send as a header -*/ -+ (nonnull NSString *)clientMetadataID DEPRECATED_MSG_ATTRIBUTE("Use [PPDataCollector collectPayPalDeviceData] to generate a device data string."); - -/*! - @brief Collects device data for PayPal. - - @discussion This should be used when the user is paying with PayPal or Venmo only. - - @return a deviceData string that should be passed into server-side calls, such as `Transaction.sale`, - for PayPal transactions. This JSON serialized string contains a PayPal fraud ID. -*/ -+ (nonnull NSString *)collectPayPalDeviceData; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PayPalDataCollector.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PayPalDataCollector.h deleted file mode 100755 index 65963f4e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Public/PayPalDataCollector.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// PayPalDataCollector.h -// PayPalDataCollector -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -//! Project version number for PayPalRisk. -FOUNDATION_EXPORT double PayPalDataCollectorVersionNumber; - -//! Project version string for PayPalRisk. -FOUNDATION_EXPORT const unsigned char PayPalDataCollectorVersionString[]; - -#import "PPRCClientMetadataIDProvider.h" -#import "PPDataCollector.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/PPRCClientMetadataIDProvider.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/PPRCClientMetadataIDProvider.h deleted file mode 100755 index 3ab3ba4f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/PPRCClientMetadataIDProvider.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// PPRiskComponentClientMetadataIDProvider.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -/*! - @brief Block that processes a given HTTP response -*/ -typedef void (^PPRCClientMetadataIDProviderNetworkResponseBlock)(NSHTTPURLResponse * _Nonnull response, NSData * _Nonnull data); - -/*! - @brief Networking adapter block which is passed a URL request, the block must send the request, and then passes on the response to the given network response block -*/ -typedef void (^PPRCClientMetadataIDProviderNetworkAdapterBlock)(NSURLRequest * _Nonnull request, _Nonnull PPRCClientMetadataIDProviderNetworkResponseBlock); - -/*! - @brief Interface exposed from the Risk Component to bootstrap the Risk Component -*/ -@interface PPRCClientMetadataIDProvider : NSObject - -/*! - @brief Initializes the risk component - - @param appGuid the application's GUID - @param sourceAppVersion version of the source app/library - @param networkAdapterBlock the adapter block to send requests -*/ -- (nonnull instancetype)initWithAppGuid:(nonnull NSString *)appGuid - sourceAppVersion:(nonnull NSString *)sourceAppVersion - networkAdapterBlock:(nonnull PPRCClientMetadataIDProviderNetworkAdapterBlock)networkAdapterBlock; - -/*! - @brief Initializes the risk component - - @param appGuid the application's GUID - @param sourceAppVersion version of the source app/library - @param networkAdapterBlock the adapter block to send requests - @param pairingID the pairing ID to associate with -*/ -- (nonnull instancetype)initWithAppGuid:(nonnull NSString *)appGuid - sourceAppVersion:(nonnull NSString *)sourceAppVersion - networkAdapterBlock:(nonnull PPRCClientMetadataIDProviderNetworkAdapterBlock)networkAdapterBlock - pairingID:(nullable NSString *)pairingID; - -/*! - @brief Generates a client metadata ID - - @param pairingID a pairing ID to associate with this clientMetadataID must be 10-32 chars long or null - @return a client metadata ID -*/ -- (nonnull NSString *)clientMetadataID:(nullable NSString *)pairingID; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/libPPRiskComponent.a b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/libPPRiskComponent.a deleted file mode 100755 index fa3ce36a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalDataCollector/Risk/libPPRiskComponent.a and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.h deleted file mode 100755 index 831ee171..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// PPFPTIData.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -/*! - @brief Represents the analytics data and metadata for the analytics request. -*/ -@interface PPFPTIData: NSObject - -/*! - @brief Designated initializer - - @param params the analytics data to send - @param deviceID the device ID - @param sessionID the session's ID - @param userAgent the user agent string to use - @param trackerURL the tracker URL to send the data to -*/ -- (nonnull instancetype)initWithParams:(nonnull NSDictionary *)params - deviceID:(nonnull NSString *)deviceID - sessionID:(nonnull NSString *)sessionID - userAgent:(nonnull NSString *)userAgent - trackerURL:(nonnull NSURL *)trackerURL; - -/*! - @brief The intended NSURL to send the data to -*/ -@property (nonatomic, copy, readonly, nonnull) NSURL *trackerURL; - -/*! - @brief The user agent string to use for the request -*/ -@property (nonatomic, copy, readonly, nonnull) NSString *userAgent; - -/*! - @brief The analytics data and metadata to send. - - @discussion This data is not the same as the initial params data passed in the - initializer. The format of the dictionary is different and keys/values may be changed. - Usually transformed into a JSON object in the request body. -*/ -- (nonnull NSDictionary *)dataAsDictionary; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.m deleted file mode 100755 index 533046ae..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTIData.m +++ /dev/null @@ -1,97 +0,0 @@ -// -// PPFPTIData.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPFPTIData.h" - -@interface PPFPTIData () - -@property (nonatomic, strong) NSMutableDictionary *params; -@property (nonatomic, copy) NSString *deviceID; -@property (nonatomic, copy) NSString *sessionID; -@property (nonatomic, copy) NSString *userAgent; -@property (nonatomic, copy) NSURL *trackerURL; - -@end - -@implementation PPFPTIData - -- (instancetype)initWithParams:(NSDictionary *)params - deviceID:(NSString *)deviceID - sessionID:(NSString *)sessionID - userAgent:(NSString *)userAgent - trackerURL:(NSURL *)trackerURL { - self = [super init]; - if (self) { - self.params = [params mutableCopy]; - self.deviceID = deviceID; - self.sessionID = sessionID; - self.userAgent = userAgent; - self.trackerURL = trackerURL; - } - return self; -} - -/* - Sample request - { - "events": { - "actor": { - "tracking_visitor_id":"912bddaa1390abe0eed4d1b541ff46e198", - "tracking_visit_id":"982bddcd1390abe0d4d1b541ff46e12198" - }, - "channel":"mobile", - "tracking_event":"1363303116", - "event_params": { - "sv":"mobile", - "expn":"channel", - "t":"1161775163140", - "g":"-420", - "page":"main" - } - } - } - */ -- (NSDictionary *)dataAsDictionary { - NSTimeInterval impressionTimeInterval = [[NSDate date] timeIntervalSince1970]; - - // Note: If this method is called multiple times, the time may be different - NSString *trackingEventString = [PPFPTIData clientTimestampSinceEpochInMilliseconds:impressionTimeInterval]; - - self.params[@"g"] = [PPFPTIData gmtOffsetInMinutes]; - self.params[@"t"] = [PPFPTIData clientTimestampInLocalTimeZoneSinceEpochInMilliseconds:impressionTimeInterval]; - self.params[@"sv"] = @"mobile"; - - NSDictionary *data = @{ - @"events": @{ - @"actor": @{ - @"tracking_visitor_id": self.deviceID, - @"tracking_visit_id": self.sessionID - }, - @"channel" : @"mobile", - @"tracking_event": trackingEventString, - @"event_params": self.params - } - }; - return data; -} - -+ (NSString *)clientTimestampSinceEpochInMilliseconds:(NSTimeInterval)timeInterval { - return [NSString stringWithFormat:@"%lld", (long long)(timeInterval * 1000)]; -} - -+ (NSString *)clientTimestampInLocalTimeZoneSinceEpochInMilliseconds:(NSTimeInterval)timeInterval { - float timeZoneOffset = [[NSTimeZone systemTimeZone] secondsFromGMT]; - long long timeOffsetInMSInLocalTZ = (long long)((timeInterval - timeZoneOffset)*1000); - return [NSString stringWithFormat:@"%lld", timeOffsetInMSInLocalTZ]; -} - -+ (NSString *)gmtOffsetInMinutes { - float timeZoneOffset = [[NSTimeZone systemTimeZone] secondsFromGMT]; - return [NSString stringWithFormat:@"%d", (int)(timeZoneOffset/60.0)]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.h deleted file mode 100755 index dde252ac..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// PPFPTITracker.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -@class PPFPTIData; - -/*! - @brief Delegate for sending the passed in data -*/ -@protocol PPFPTINetworkAdapterDelegate - -/*! - @brief Sends the data using whatever transport the delegate implements. - - @param fptiData contains the data to send, which URL to send it to, and other request metadata -*/ -- (void)sendRequestWithData:(nonnull PPFPTIData*)fptiData; - -@end - -/*! - @brief Tracker to send analytics data to. -*/ -@interface PPFPTITracker : NSObject - -/*! - @brief Designated initializer. - - @param deviceUDID the device's UDID - @param sessionID the session ID to associate all events to - @param networkAdapterDelegate network delegate responsible for sending requests -*/ -- (nonnull instancetype)initWithDeviceUDID:(nonnull NSString *)deviceUDID - sessionID:(nonnull NSString *)sessionID - networkAdapterDelegate:(nullable id)networkAdapterDelegate; - - -/*! - @brief The delegate which actually sends the data -*/ -@property (nonatomic, weak, readwrite, nullable) id networkAdapterDelegate; - -/*! - @brief Sends an event with various metrics and data - - @param params the analytics data to send -*/ -- (void)submitEventWithParams:(nonnull NSDictionary *)params; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.m deleted file mode 100755 index 8588476d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPFPTITracker.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// PPFPTITracker.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -#import "PPFPTITracker.h" - -#import "PPFPTIData.h" -#import "PPOTDevice.h" -#import "PPOTVersion.h" - -static NSString* const kTrackerURLAsNSString = @"https://api-m.paypal.com/v1/tracking/events"; - -@interface PPFPTITracker () - -@property (nonatomic, copy, readwrite) NSString *deviceUDID; -@property (nonatomic, copy, readwrite) NSString *sessionID; -@property (nonatomic, copy, readwrite) NSURL *trackerURL; - -@property (nonatomic, copy, readwrite) NSString *userAgent; - -@end - -@implementation PPFPTITracker - -- (instancetype)initWithDeviceUDID:(NSString *)deviceUDID - sessionID:(NSString *)sessionID - networkAdapterDelegate:(id)networkAdapterDelegate { - if (self = [super init]) { - self.deviceUDID = deviceUDID; - self.sessionID = sessionID; - self.trackerURL = [NSURL URLWithString:kTrackerURLAsNSString]; - self.userAgent = [self computeUserAgent]; - self.networkAdapterDelegate = networkAdapterDelegate; - } - return self; -} - -- (void)submitEventWithParams:(NSDictionary *)params { - PPFPTIData *data = [[PPFPTIData alloc] initWithParams:params - deviceID:self.deviceUDID - sessionID:self.sessionID - userAgent:self.userAgent - trackerURL:self.trackerURL]; - if (self.networkAdapterDelegate) { - [self.networkAdapterDelegate sendRequestWithData:data]; - } -} - -- (NSString *)computeUserAgent { - NSLocale *currentLocale = [NSLocale currentLocale]; - NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode]; - NSString *language = [currentLocale objectForKey:NSLocaleLanguageCode]; - -#ifdef DEBUG - NSString *releaseMode = @"DEBUG"; -#else - NSString *releaseMode = @"RELEASE"; -#endif - - // PayPalSDK/OneTouchCore-iOS 3.2.2-11-g8b1c0e3 (iPhone; CPU iPhone OS 8_4_1; en-US; iPhone (iPhone5,1); iPhone5,1; DEBUG) - return [NSString stringWithFormat:@"PayPalSDK/OneTouchCore-iOS %@ (%@; CPU %@ %@; %@-%@; %@; %@; %@)", - PayPalOTVersion(), - [UIDevice currentDevice].model, - [UIDevice currentDevice].systemName, - [[UIDevice currentDevice].systemVersion stringByReplacingOccurrencesOfString:@"." withString:@"_"], - language, - countryCode, - [PPOTDevice deviceName], - [PPOTDevice hardwarePlatform], - releaseMode - ]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsDefines.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsDefines.h deleted file mode 100755 index 4cf43de0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsDefines.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PPOTAnalyticsDefines.h - -#ifndef TRACKING_DEFINES_H -#define TRACKING_DEFINES_H - -// "Page" is analytics-talk for "Screen" -// "Link" is analytics-talk for "Button, underlined text, or other tappable affordance" - -// Versioning -#define kAnalyticsVersion @"iOS:MODE:" - -// AppSwitch -#define kAnalyticsAppSwitchWalletPresent @"mobile:otc:checkwallet:present:" // followed by protocol -#define kAnalyticsAppSwitchWalletAbsent @"mobile:otc:checkwallet:absent:" // followed by protocol - -#define kAnalyticsAppSwitchPreflightBrowser @"mobile:otc:preflight:browser:" // followed by protocol -#define kAnalyticsAppSwitchPreflightWallet @"mobile:otc:preflight:wallet:" // followed by protocol -#define kAnalyticsAppSwitchPreflightNone @"mobile:otc:preflight:none:" // followed by protocol - -#define kAnalyticsAppSwitchToBrowser @"mobile:otc:switchaway:browser:" // followed by protocol -#define kAnalyticsAppSwitchToWallet @"mobile:otc:switchaway:wallet:" // followed by protocol - -#define kAnalyticsAppSwitchCancel @"mobile:otc:switchback:cancel:" -#define kAnalyticsAppSwitchReturn @"mobile:otc:switchback:return:" - -#endif /* TRACKING_DEFINES_H */ - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.h deleted file mode 100755 index bf242905..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// PPOTAnalyticsTracker.h -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPOTAnalyticsTracker : NSObject - -/*! - @brief Retrieves singleton instance. -*/ -+ (nonnull PPOTAnalyticsTracker *)sharedManager; - -/*! - @brief Tracks a "page"/action taken. - - @param pagename the page or "action" taken - @param environment the environment (production, sandbox, etc.) - @param clientID the client ID of the request - @param error an optional error that occurred - @param hermesToken web token -*/ -- (void)trackPage:(nonnull NSString *)pagename - environment:(nonnull NSString *)environment - clientID:(nullable NSString *)clientID - error:(nullable NSError *)error - hermesToken:(nullable NSString *)hermesToken; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.m deleted file mode 100755 index f639ce84..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Analytics/PPOTAnalyticsTracker.m +++ /dev/null @@ -1,348 +0,0 @@ -// -// PPOTAnalyticsTracker.m -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import - -#import "PPOTAnalyticsTracker.h" - -#import "PPOTCore_Internal.h" -#import "PPOTVersion.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" -#import "PPOTSimpleKeychain.h" -#import "PPOTString.h" -#import "PPOTURLSession.h" -#import "PPFPTIData.h" -#import "PPFPTITracker.h" -#import "PPOTAnalyticsDefines.h" -#if __has_include("BraintreeCore.h") -#import "BTLogger_Internal.h" -#else -#import -#endif - -#define kTimeForSession (30 * 60) // How long should an Omniture session last. -#define kKeychainIdentifierForUDID @"PayPal_OTC_Analytics_UDID" - -#define kFPTIVersKey @"vers" -#define kFPTIPageKey @"page" -#define kFPTILginKey @"lgin" -#define kFPTIRstaKey @"rsta" -#define kFPTIMosvKey @"mosv" -#define kFPTIMdvsKey @"mdvs" -#define kFPTIMapvKey @"mapv" -#define kFPTIEccdKey @"eccd" -#define kFPTIErpgKey @"erpg" -#define kFPTIFltkKey @"fltk" -#define kFPTITxntKey @"txnt" -#define kFPTIApinKey @"apin" -#define kFPTIBchnKey @"bchn" -#define kFPTISrceKey @"srce" -#define kFPTIBzsrKey @"bzsr" -#define kFPTIPgrpKey @"pgrp" -#define kFPTIVidKey @"vid" -#define kFPTIDsidKey @"dsid" -#define kFPTIClidKey @"clid" - - -@interface PPOTAnalyticsTracker () - -@property (nonatomic, copy, readwrite) NSString *deviceUDID; -@property (nonatomic, copy, readwrite) NSDictionary *trackerParams; - -@property (nonatomic, assign, readwrite) BOOL sessionImpressionSent; -@property (nonatomic, copy, readwrite) NSString *sessionID; -@property (nonatomic, copy, readwrite) NSDate *lastImpressionDate; - -@property (nonatomic, strong, readwrite) NSMutableArray *apiEndpoints; -@property (nonatomic, strong, readwrite) NSMutableArray *apiRoundtripTimes; - -@property (nonatomic, strong, readwrite) PPFPTITracker *fptiTracker; - -@property (nonatomic, strong, readwrite) PPOTURLSession *urlSession; - -@end - -@implementation PPOTAnalyticsTracker - -+ (nonnull PPOTAnalyticsTracker *)sharedManager { - static PPOTAnalyticsTracker* sharedManager = nil; - - static dispatch_once_t pred; - dispatch_once(&pred, ^{ - sharedManager = [[PPOTAnalyticsTracker alloc] init]; - - sharedManager.deviceUDID = [[NSString alloc] initWithData:[PPOTSimpleKeychain dataForKey:kKeychainIdentifierForUDID] - encoding:NSUTF8StringEncoding]; - if ([sharedManager.deviceUDID length] == 0) { - sharedManager.deviceUDID = [PPOTString generateUniquishIdentifier]; - [PPOTSimpleKeychain setData:[sharedManager.deviceUDID dataUsingEncoding:NSUTF8StringEncoding] - forKey:kKeychainIdentifierForUDID]; - } - - // trackingVars are the standard params to add to every request - NSMutableDictionary *trackingVars = [[NSMutableDictionary alloc] init]; - trackingVars[kFPTIMapvKey] = PayPalOTVersion(); // "App" Version number - trackingVars[kFPTIRstaKey] = [[self class] deviceLocale]; // Locale (consumer app bases this on payerCountry) - trackingVars[kFPTIMosvKey] = [NSString stringWithFormat:@"iOS %@", [UIDevice currentDevice].systemVersion]; // Mobile OS + version - trackingVars[kFPTIMdvsKey] = [PPOTDevice deviceName]; // Mobile Device Name, i.e. iPhone 4S - - sharedManager.trackerParams = trackingVars; - - // Initialize FPTI: - sharedManager.fptiTracker = [[PPFPTITracker alloc] initWithDeviceUDID:sharedManager.deviceUDID - sessionID:sharedManager.sessionID - networkAdapterDelegate:sharedManager]; - }); - - return sharedManager; -} - -- (nonnull instancetype)init { - if (self = [super init]) { - _apiRoundtripTimes = [NSMutableArray arrayWithCapacity:4]; - _apiEndpoints = [NSMutableArray arrayWithCapacity:4]; - _sessionImpressionSent = NO; - } - return self; -} - -- (void)dealloc { - [_urlSession finishTasksAndInvalidate]; -} - -#pragma mark - Smart getter for sessionID - -- (nonnull NSString *)sessionID { - // For Omniture, the session should last 30 minutes - if (_lastImpressionDate != nil && [[NSDate date] timeIntervalSinceDate:_lastImpressionDate] >= kTimeForSession) { - _sessionID = nil; - self.sessionImpressionSent = NO; - } - - if (_sessionID == nil) { - _sessionID = [PPOTAnalyticsTracker newOmnitureSessionID]; - } - - return _sessionID; -} - -/** - Generates a session ID - - @return a session ID - */ -+ (nonnull NSString *)newOmnitureSessionID { - // The javascript is sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed - // JavaScript Math.random gives a value between 0 and 1 - srandom((unsigned)[[NSDate date] timeIntervalSince1970]); // Seed the random number generator - NSUInteger rnumber = (NSUInteger) (10000000000000 * ((float) random() / (float) RAND_MAX)); - - // Javascript getTime is # of milliseconds from 1/1/1970 - return [NSString stringWithFormat:@"%lu", (unsigned long)(rnumber + (NSUInteger)floor((([NSDate timeIntervalSinceReferenceDate] + NSTimeIntervalSince1970) / (float) 10800)) % 10)]; -} - -#pragma mark - - -- (void)trackPage:(nonnull NSString *)pagename - environment:(nonnull NSString *)environment - clientID:(nullable NSString *)clientID - error:(nullable NSError *)error - hermesToken:(nullable NSString *)hermesToken { - // Use PPAsserts to catch bad parameters in Debug version: - PPAssert([pagename length], @"pagename must be non-empty"); - PPAssert(environment, @"environment can't be nil (can be empty string, though)"); - PPAssert(clientID, @"clientID can't be nil (can be empty string, though)"); - - // Sanity-check parameters to prevent crashes in Release version: - if (![pagename length]) { - return; - } - if (!environment) { - environment = @""; - } - if (!clientID) { - clientID = @""; - } - - NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; - - NSString *version = [kAnalyticsVersion stringByReplacingOccurrencesOfString:@"MODE" withString:environment]; - NSString *nameStr = [NSString stringWithFormat:@"%@:%@", pagename, version]; - if (error != nil) { - nameStr = [nameStr stringByAppendingString:@"|error"]; - } - - params[kFPTIVersKey] = version; - params[kFPTIPageKey] = nameStr; - params[kFPTILginKey] = @"out"; - params[kFPTIPgrpKey] = (error == nil) ? pagename : [pagename stringByAppendingString:@"|error"]; - params[kFPTIBchnKey] = @"otc"; - params[kFPTISrceKey] = @"otc"; - params[kFPTIBzsrKey] = @"mobile"; - params[kFPTIVidKey] = self.sessionID; - params[kFPTIDsidKey] = self.deviceUDID; - params[kFPTIClidKey] = clientID; - params[@"e"] = @"im"; - params[@"apid"] = [self appBundleInformation]; - - if ([hermesToken length]) { - params[kFPTIFltkKey] = hermesToken; - } - - [self addTrackerParamsTo:params]; - [self addAPIEndpointParamsTo:params]; - [self addErrorParamsTo:params withError:error]; - - // Send to FPTI. In this case, the FPTITracker prepares/formats the data which then is sent back to this instance's - // PPFPTINetworkAdapterDelegate method. - [self.fptiTracker submitEventWithParams:params]; -} - -#pragma mark - Helper methods for tracker data - -/** - Adds tracker level parameters to the params request. Tracker level params are constant parameters (say a device name) - which do not need to be re-calculated. - - @param params dictionary to add data to - */ -- (void)addTrackerParamsTo:(nonnull NSMutableDictionary *)params { - // If there is a standard set of properties/parameters to send on each call, add it now. - if (self.trackerParams != nil && [self.trackerParams count]) { - if (_sessionImpressionSent) { - // Always send the rsta value - params[@"rsta"] = self.trackerParams[@"rsta"]; - } - else { - [params addEntriesFromDictionary:self.trackerParams]; - } - } -} - -/** - Return the bundle information for analytics - - @return bundle information as a string - */ -- (nonnull NSString *)appBundleInformation { - NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; - return [NSString stringWithFormat:@"%@|%@|%@|%@|%@|%@", - infoDictionary[@"CFBundleExecutable"], - infoDictionary[@"CFBundleIdentifier"], - infoDictionary[@"CFBundleName"], - infoDictionary[@"CFBundleShortVersionString"], - infoDictionary[@"CFBundleVersion"], - infoDictionary[@"CFBundleDisplayName"]]; -} - -/** - Adds the API endpoint params - - @param params dictionary to add data to - */ -- (void)addAPIEndpointParamsTo:(nonnull NSMutableDictionary *)params { - if ([self.apiRoundtripTimes count]) { - NSMutableString *timesString = [NSMutableString string]; - NSMutableString *endpointsString = [NSMutableString string]; - - for (NSUInteger index = 0; index < [self.apiRoundtripTimes count]; index++) { - if ([timesString length]) { - [timesString appendString:@"|"]; - [endpointsString appendString:@"|"]; - } - [timesString appendFormat:@"%ld", (long)[self.apiRoundtripTimes[index] integerValue]]; - [endpointsString appendString:self.apiEndpoints[index]]; - } - - params[kFPTITxntKey] = timesString; - params[kFPTIApinKey] = endpointsString; - - [self.apiRoundtripTimes removeAllObjects]; - [self.apiEndpoints removeAllObjects]; - } -} - -/** - Adds the error param information (if there is an error - - @param params dictionary to add data to - @param error the error - */ -- (void)addErrorParamsTo:(nonnull NSMutableDictionary *)params withError:(nullable NSError *)error { - if (error != nil) { - if ([error.domain isEqualToString:NSURLErrorDomain] && error.code == NSURLErrorCancelled) { - // if Canceled, don't report as an error - } - else { - params[kFPTIEccdKey] = [NSString stringWithFormat:@"%ld", (long)error.code]; - params[kFPTIErpgKey] = ([error.localizedDescription length] > 0) ? error.localizedDescription : @"Unknown error"; - } - } -} - - -#pragma mark - PPFPTINetworkAdapterDelegate - -- (void)sendRequestWithData:(nonnull __attribute__((unused)) PPFPTIData*)fptiData { - NSDictionary *fptiDataDictionary = [fptiData dataAsDictionary]; - NSDictionary *params = fptiDataDictionary[@"events"][@"event_params"]; - NSString *nameStr = params[@"page"]; - - NSArray *pageComponents = [nameStr componentsSeparatedByString:@":"]; - NSString *environment = pageComponents[[pageComponents count] - 2]; - - if ([environment isEqualToString:@"mock"]) { - return; - } - - NSURL* url = [fptiData trackerURL]; - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; - request.HTTPShouldUsePipelining = YES; - [request setHTTPMethod:@"POST"]; - [request setValue:[fptiData userAgent] forHTTPHeaderField:@"User-Agent"]; - [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; - - NSError *error; - NSData *fptiJSONData = [NSJSONSerialization dataWithJSONObject:fptiDataDictionary options:0 error:&error]; - if (fptiJSONData == nil && error != NULL) { - // ignore the error - } else { - [request setHTTPBody:fptiJSONData]; - [self.urlSession sendRequest:request completionBlock:nil]; - } -} - -#pragma mark - - -+ (NSString *)deviceLocale { - // unlike NSLocaleIdentifier, this will always be either just language (@"en") or else language_COUNTRY (@"en_US") - NSString *language = [[self class] deviceLanguage]; - NSString *country = [[self class] deviceCountryCode]; - if ([country length]) { - return [NSString stringWithFormat:@"%@_%@", language, country]; - } - else { - return language; - } -} - -+ (NSString *)deviceLanguage { - return [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]; -} - -+ (NSString *)deviceCountryCode { - //gives the country code from the device - NSString *countryCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]; - if (!countryCode) { - // NSLocaleCountryCode can return nil if device's Region is set to English, Esperanto, etc. - countryCode = @""; - } - return countryCode; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPDefaultConfigurationJSON.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPDefaultConfigurationJSON.h deleted file mode 100755 index 8b807932..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPDefaultConfigurationJSON.h +++ /dev/null @@ -1,1730 +0,0 @@ -unsigned char configuration_otc_config_ios_json[] = { - 0x7b, 0x0a, 0x20, 0x20, 0x22, 0x6f, 0x73, 0x22, 0x3a, 0x20, 0x22, 0x69, - 0x4f, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3a, - 0x20, 0x22, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x31, 0x2d, 0x31, 0x31, - 0x54, 0x31, 0x36, 0x3a, 0x34, 0x32, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, - 0x72, 0x65, 0x63, 0x69, 0x70, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, - 0x20, 0x22, 0x33, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x64, 0x61, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x41, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x64, 0x65, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, - 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, - 0x65, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x4c, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, - 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x41, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x42, 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x48, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, - 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x45, 0x53, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x52, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x47, 0x42, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x48, 0x4b, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4b, 0x57, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x59, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, - 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x48, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x52, 0x55, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, - 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x54, 0x52, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x59, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x44, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x45, - 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x48, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, 0x57, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x41, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4e, - 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x51, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x41, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x59, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x48, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x44, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x46, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x48, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4b, - 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4d, 0x41, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x52, 0x4f, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, - 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x55, 0x53, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x5f, 0x49, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x69, 0x77, 0x5f, 0x49, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6a, 0x61, 0x5f, - 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x6e, 0x62, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, - 0x6c, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6c, 0x5f, 0x4e, 0x4c, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x6e, 0x6f, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6c, 0x5f, 0x50, - 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x70, 0x74, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, - 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x45, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x72, 0x75, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x4c, 0x56, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x72, 0x75, 0x5f, 0x52, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x65, 0x5f, - 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x73, 0x76, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, - 0x72, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x41, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x43, - 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x45, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x47, 0x52, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4b, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, - 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x50, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x4b, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x55, - 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x59, 0x45, 0x22, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, - 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x75, - 0x72, 0x69, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, - 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x66, 0x75, 0x74, 0x75, - 0x72, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, - 0x70, 0x65, 0x6e, 0x69, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x22, 0x3a, 0x20, - 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, - 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x6f, 0x75, - 0x63, 0x68, 0x2e, 0x76, 0x33, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x2a, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x79, 0x6f, 0x75, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x6e, 0x79, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x73, 0x22, - 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x64, 0x61, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, - 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x42, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x64, 0x65, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, - 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x54, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x47, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x52, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x48, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x45, - 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x46, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x47, 0x42, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x48, 0x4b, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x49, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x4c, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x4f, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4b, - 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x41, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x4d, 0x59, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x4c, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, - 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x51, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x52, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x47, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x4b, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x54, - 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x41, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x42, 0x48, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x45, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x46, 0x49, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x48, - 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4f, 0x4d, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x51, - 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x49, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x54, 0x4e, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, 0x48, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, - 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x45, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x46, 0x52, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4b, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, - 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x50, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x4b, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x55, - 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, - 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x77, 0x5f, 0x49, 0x4c, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x6a, 0x61, 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x62, 0x5f, 0x4e, 0x4f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x6e, 0x6c, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6c, 0x5f, - 0x4e, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6f, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, - 0x6c, 0x5f, 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, 0x5f, 0x42, 0x52, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x70, 0x74, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x45, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, - 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x52, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x73, 0x65, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x76, 0x5f, 0x53, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x74, 0x72, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x43, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x45, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x48, 0x4b, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4a, 0x4f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x56, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4e, - 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x51, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x41, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x59, 0x45, 0x22, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, - 0x2f, 0x2f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x66, - 0x75, 0x74, 0x75, 0x72, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x22, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x22, 0x3a, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, - 0x61, 0x6c, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, - 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2e, 0x76, 0x32, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x5b, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x2a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x79, 0x6f, 0x75, 0x72, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3a, - 0x20, 0x22, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x5f, 0x44, 0x4b, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x64, 0x65, 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x42, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, - 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x4b, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x64, 0x65, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x52, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x41, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x41, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, - 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x45, 0x53, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x52, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x47, 0x42, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x50, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, - 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x4c, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x4c, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x52, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x53, 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x41, 0x52, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x45, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x46, - 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x50, 0x54, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x46, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x55, - 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x69, 0x74, 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6a, 0x61, - 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x62, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x6e, 0x6c, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6c, 0x5f, 0x4e, 0x4c, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x6e, 0x6f, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6c, 0x5f, - 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, - 0x74, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x52, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x73, 0x65, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x76, 0x5f, 0x53, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x74, 0x72, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x46, 0x49, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x55, 0x53, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x5d, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x61, 0x79, - 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x22, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, - 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, - 0x6c, 0x2e, 0x2a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x79, 0x6f, 0x75, - 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x70, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x20, 0x22, - 0x33, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x61, - 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x70, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, - 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, - 0x69, 0x76, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, 0x6c, - 0x22, 0x3a, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x2e, 0x70, 0x61, 0x79, - 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, - 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x30, 0x38, - 0x31, 0x45, 0x44, 0x46, 0x35, 0x34, 0x36, 0x43, 0x42, 0x46, 0x36, 0x32, - 0x44, 0x45, 0x32, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x49, - 0x49, 0x44, 0x7a, 0x7a, 0x43, 0x43, 0x41, 0x72, 0x65, 0x67, 0x41, 0x77, - 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a, 0x41, 0x49, 0x48, 0x74, 0x39, 0x55, - 0x62, 0x4c, 0x39, 0x69, 0x33, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, - 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x43, 0x77, - 0x55, 0x41, 0x4d, 0x48, 0x34, 0x78, 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, - 0x4e, 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6c, 0x56, 0x54, 0x4d, 0x52, - 0x4d, 0x77, 0x45, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, - 0x70, 0x44, 0x59, 0x57, 0x78, 0x70, 0x5a, 0x6d, 0x39, 0x79, 0x62, 0x6d, - 0x6c, 0x68, 0x4d, 0x52, 0x45, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x51, - 0x51, 0x48, 0x44, 0x41, 0x68, 0x54, 0x59, 0x57, 0x34, 0x67, 0x53, 0x6d, - 0x39, 0x7a, 0x5a, 0x54, 0x45, 0x50, 0x4d, 0x41, 0x30, 0x47, 0x41, 0x31, - 0x55, 0x45, 0x43, 0x67, 0x77, 0x47, 0x55, 0x47, 0x46, 0x35, 0x55, 0x47, - 0x46, 0x73, 0x4d, 0x52, 0x49, 0x77, 0x45, 0x41, 0x59, 0x44, 0x56, 0x51, - 0x51, 0x4c, 0x44, 0x41, 0x6c, 0x43, 0x63, 0x6d, 0x46, 0x70, 0x62, 0x6e, - 0x52, 0x79, 0x5a, 0x57, 0x55, 0x78, 0x49, 0x6a, 0x41, 0x67, 0x42, 0x67, - 0x4e, 0x56, 0x42, 0x41, 0x4d, 0x4d, 0x47, 0x56, 0x42, 0x79, 0x62, 0x32, - 0x52, 0x31, 0x59, 0x33, 0x52, 0x70, 0x62, 0x32, 0x34, 0x67, 0x51, 0x6e, - 0x4a, 0x76, 0x64, 0x33, 0x4e, 0x6c, 0x63, 0x69, 0x42, 0x54, 0x64, 0x32, - 0x6c, 0x30, 0x59, 0x32, 0x67, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, - 0x55, 0x77, 0x4e, 0x44, 0x45, 0x78, 0x4d, 0x54, 0x63, 0x31, 0x4d, 0x44, - 0x49, 0x35, 0x57, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x63, 0x77, 0x4e, 0x44, - 0x45, 0x77, 0x4d, 0x54, 0x63, 0x31, 0x4d, 0x44, 0x49, 0x35, 0x57, 0x6a, - 0x42, 0x2b, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, - 0x51, 0x47, 0x45, 0x77, 0x4a, 0x56, 0x55, 0x7a, 0x45, 0x54, 0x4d, 0x42, - 0x45, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x41, 0x77, 0x4b, 0x51, 0x32, - 0x46, 0x73, 0x61, 0x57, 0x5a, 0x76, 0x63, 0x6d, 0x35, 0x70, 0x59, 0x54, - 0x45, 0x52, 0x4d, 0x41, 0x38, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x77, - 0x77, 0x49, 0x55, 0x32, 0x46, 0x75, 0x49, 0x45, 0x70, 0x76, 0x63, 0x32, - 0x55, 0x78, 0x44, 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, - 0x6f, 0x4d, 0x42, 0x6c, 0x42, 0x68, 0x65, 0x56, 0x42, 0x68, 0x62, 0x44, - 0x45, 0x53, 0x4d, 0x42, 0x41, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x77, - 0x77, 0x4a, 0x51, 0x6e, 0x4a, 0x68, 0x61, 0x57, 0x35, 0x30, 0x63, 0x6d, - 0x56, 0x6c, 0x4d, 0x53, 0x49, 0x77, 0x49, 0x41, 0x59, 0x44, 0x56, 0x51, - 0x51, 0x44, 0x44, 0x42, 0x6c, 0x51, 0x63, 0x6d, 0x39, 0x6b, 0x64, 0x57, - 0x4e, 0x30, 0x61, 0x57, 0x39, 0x75, 0x49, 0x45, 0x4a, 0x79, 0x62, 0x33, - 0x64, 0x7a, 0x5a, 0x58, 0x49, 0x67, 0x55, 0x33, 0x64, 0x70, 0x64, 0x47, - 0x4e, 0x6f, 0x4d, 0x49, 0x49, 0x42, 0x49, 0x6a, 0x41, 0x4e, 0x42, 0x67, - 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, - 0x45, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x38, 0x41, 0x4d, 0x49, - 0x49, 0x42, 0x43, 0x67, 0x4b, 0x43, 0x41, 0x51, 0x45, 0x41, 0x74, 0x2b, - 0x43, 0x63, 0x36, 0x47, 0x42, 0x33, 0x51, 0x44, 0x46, 0x43, 0x68, 0x65, - 0x69, 0x56, 0x6f, 0x4c, 0x6c, 0x43, 0x59, 0x32, 0x46, 0x55, 0x52, 0x46, - 0x48, 0x30, 0x49, 0x6a, 0x4a, 0x66, 0x78, 0x73, 0x52, 0x38, 0x6c, 0x35, - 0x49, 0x4b, 0x59, 0x56, 0x4d, 0x66, 0x2b, 0x47, 0x6a, 0x62, 0x41, 0x4e, - 0x76, 0x53, 0x2f, 0x48, 0x74, 0x55, 0x59, 0x69, 0x70, 0x34, 0x72, 0x66, - 0x53, 0x6a, 0x47, 0x34, 0x58, 0x6c, 0x49, 0x54, 0x70, 0x50, 0x6b, 0x77, - 0x4f, 0x31, 0x63, 0x46, 0x2f, 0x78, 0x61, 0x42, 0x77, 0x54, 0x33, 0x55, - 0x42, 0x59, 0x39, 0x76, 0x76, 0x69, 0x51, 0x6c, 0x56, 0x4d, 0x62, 0x6f, - 0x56, 0x66, 0x74, 0x6c, 0x67, 0x78, 0x5a, 0x2f, 0x69, 0x55, 0x6a, 0x41, - 0x6c, 0x78, 0x4b, 0x66, 0x32, 0x38, 0x42, 0x45, 0x39, 0x36, 0x62, 0x53, - 0x35, 0x33, 0x74, 0x4f, 0x62, 0x66, 0x54, 0x75, 0x48, 0x6e, 0x72, 0x62, - 0x2b, 0x6b, 0x6e, 0x65, 0x59, 0x51, 0x49, 0x5a, 0x71, 0x57, 0x43, 0x67, - 0x34, 0x38, 0x6d, 0x5a, 0x53, 0x63, 0x35, 0x6d, 0x52, 0x32, 0x67, 0x71, - 0x68, 0x62, 0x73, 0x33, 0x35, 0x47, 0x43, 0x34, 0x75, 0x64, 0x48, 0x30, - 0x45, 0x45, 0x6f, 0x4e, 0x49, 0x48, 0x46, 0x53, 0x76, 0x41, 0x63, 0x65, - 0x73, 0x55, 0x70, 0x51, 0x7a, 0x52, 0x33, 0x4d, 0x55, 0x55, 0x37, 0x50, - 0x57, 0x52, 0x62, 0x6f, 0x43, 0x6c, 0x4f, 0x76, 0x77, 0x45, 0x57, 0x76, - 0x6e, 0x62, 0x68, 0x6d, 0x44, 0x48, 0x6c, 0x42, 0x34, 0x6f, 0x59, 0x61, - 0x49, 0x72, 0x57, 0x78, 0x50, 0x2b, 0x75, 0x54, 0x41, 0x54, 0x76, 0x36, - 0x63, 0x57, 0x66, 0x65, 0x72, 0x6b, 0x75, 0x37, 0x37, 0x52, 0x74, 0x51, - 0x4a, 0x49, 0x6f, 0x62, 0x66, 0x53, 0x51, 0x76, 0x52, 0x56, 0x52, 0x43, - 0x44, 0x71, 0x6c, 0x41, 0x6a, 0x62, 0x49, 0x2f, 0x63, 0x37, 0x67, 0x30, - 0x36, 0x46, 0x7a, 0x6a, 0x65, 0x33, 0x50, 0x39, 0x31, 0x7a, 0x6d, 0x57, - 0x6a, 0x4e, 0x62, 0x4b, 0x6b, 0x69, 0x30, 0x6d, 0x75, 0x30, 0x68, 0x47, - 0x46, 0x53, 0x6b, 0x47, 0x4c, 0x6d, 0x7a, 0x68, 0x4c, 0x31, 0x5a, 0x30, - 0x46, 0x63, 0x38, 0x33, 0x67, 0x78, 0x46, 0x42, 0x36, 0x59, 0x68, 0x54, - 0x51, 0x4f, 0x64, 0x63, 0x33, 0x66, 0x57, 0x61, 0x62, 0x79, 0x4b, 0x4b, - 0x44, 0x39, 0x7a, 0x36, 0x72, 0x5a, 0x63, 0x4f, 0x4c, 0x53, 0x57, 0x34, - 0x77, 0x37, 0x55, 0x77, 0x49, 0x44, 0x41, 0x51, 0x41, 0x42, 0x6f, 0x31, - 0x41, 0x77, 0x54, 0x6a, 0x41, 0x64, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, - 0x34, 0x45, 0x46, 0x67, 0x51, 0x55, 0x66, 0x49, 0x44, 0x53, 0x77, 0x6e, - 0x79, 0x4f, 0x4b, 0x49, 0x44, 0x55, 0x4a, 0x46, 0x41, 0x59, 0x75, 0x41, - 0x30, 0x51, 0x51, 0x6d, 0x65, 0x53, 0x74, 0x2b, 0x67, 0x77, 0x48, 0x77, - 0x59, 0x44, 0x56, 0x52, 0x30, 0x6a, 0x42, 0x42, 0x67, 0x77, 0x46, 0x6f, - 0x41, 0x55, 0x66, 0x49, 0x44, 0x53, 0x77, 0x6e, 0x79, 0x4f, 0x4b, 0x49, - 0x44, 0x55, 0x4a, 0x46, 0x41, 0x59, 0x75, 0x41, 0x30, 0x51, 0x51, 0x6d, - 0x65, 0x53, 0x74, 0x2b, 0x67, 0x77, 0x44, 0x41, 0x59, 0x44, 0x56, 0x52, - 0x30, 0x54, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, - 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, - 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, - 0x45, 0x41, 0x4b, 0x55, 0x77, 0x39, 0x4c, 0x31, 0x50, 0x57, 0x42, 0x42, - 0x44, 0x2f, 0x74, 0x48, 0x44, 0x53, 0x61, 0x74, 0x6e, 0x57, 0x70, 0x36, - 0x55, 0x4e, 0x6e, 0x37, 0x52, 0x74, 0x73, 0x4d, 0x75, 0x2b, 0x62, 0x4a, - 0x6d, 0x35, 0x62, 0x6a, 0x30, 0x31, 0x70, 0x43, 0x37, 0x6a, 0x58, 0x35, - 0x67, 0x4b, 0x6d, 0x37, 0x35, 0x77, 0x55, 0x4b, 0x4f, 0x44, 0x72, 0x55, - 0x6e, 0x47, 0x41, 0x73, 0x7a, 0x52, 0x6f, 0x52, 0x75, 0x6a, 0x73, 0x79, - 0x4a, 0x4a, 0x72, 0x47, 0x4b, 0x7a, 0x62, 0x64, 0x53, 0x68, 0x4c, 0x6c, - 0x49, 0x35, 0x48, 0x4c, 0x56, 0x68, 0x39, 0x63, 0x52, 0x31, 0x74, 0x70, - 0x72, 0x33, 0x73, 0x2f, 0x39, 0x57, 0x36, 0x44, 0x42, 0x6b, 0x41, 0x4e, - 0x50, 0x68, 0x30, 0x43, 0x6c, 0x77, 0x48, 0x37, 0x74, 0x33, 0x35, 0x64, - 0x74, 0x30, 0x43, 0x77, 0x59, 0x48, 0x38, 0x61, 0x63, 0x7a, 0x37, 0x66, - 0x71, 0x52, 0x66, 0x54, 0x6a, 0x4a, 0x66, 0x54, 0x63, 0x63, 0x6a, 0x6e, - 0x66, 0x50, 0x42, 0x35, 0x45, 0x46, 0x63, 0x70, 0x4b, 0x49, 0x50, 0x76, - 0x33, 0x6c, 0x64, 0x38, 0x4c, 0x62, 0x52, 0x2f, 0x59, 0x6c, 0x43, 0x57, - 0x62, 0x72, 0x66, 0x55, 0x72, 0x7a, 0x51, 0x4d, 0x2f, 0x4b, 0x31, 0x46, - 0x64, 0x5a, 0x61, 0x4b, 0x37, 0x65, 0x6c, 0x48, 0x2f, 0x64, 0x72, 0x52, - 0x73, 0x2b, 0x44, 0x45, 0x42, 0x46, 0x4c, 0x70, 0x33, 0x4b, 0x71, 0x77, - 0x33, 0x62, 0x57, 0x74, 0x34, 0x7a, 0x30, 0x36, 0x41, 0x56, 0x31, 0x72, - 0x51, 0x56, 0x6d, 0x59, 0x32, 0x79, 0x61, 0x6b, 0x61, 0x46, 0x69, 0x70, - 0x70, 0x62, 0x72, 0x73, 0x72, 0x64, 0x77, 0x49, 0x4c, 0x36, 0x75, 0x4f, - 0x71, 0x4f, 0x2b, 0x53, 0x66, 0x52, 0x55, 0x62, 0x4d, 0x5a, 0x67, 0x31, - 0x34, 0x4b, 0x6b, 0x38, 0x57, 0x76, 0x61, 0x42, 0x67, 0x6d, 0x34, 0x6c, - 0x36, 0x61, 0x56, 0x36, 0x64, 0x73, 0x6c, 0x6e, 0x79, 0x62, 0x66, 0x6f, - 0x4a, 0x6b, 0x73, 0x6e, 0x73, 0x42, 0x73, 0x6d, 0x45, 0x69, 0x65, 0x39, - 0x6e, 0x6d, 0x54, 0x50, 0x69, 0x55, 0x39, 0x5a, 0x2b, 0x63, 0x50, 0x75, - 0x4e, 0x2f, 0x75, 0x6e, 0x6a, 0x4d, 0x42, 0x70, 0x34, 0x50, 0x6e, 0x43, - 0x54, 0x42, 0x4b, 0x70, 0x63, 0x39, 0x6c, 0x2b, 0x50, 0x4a, 0x71, 0x47, - 0x71, 0x38, 0x48, 0x46, 0x6e, 0x42, 0x6c, 0x44, 0x42, 0x4b, 0x77, 0x2f, - 0x4e, 0x49, 0x38, 0x45, 0x65, 0x70, 0x73, 0x51, 0x3d, 0x3d, 0x22, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x6d, 0x6f, 0x63, 0x6b, 0x22, 0x3a, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, - 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x2e, 0x70, 0x61, - 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, - 0x2d, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, - 0x2f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x30, - 0x43, 0x34, 0x39, 0x36, 0x45, 0x31, 0x41, 0x41, 0x41, 0x34, 0x33, 0x39, - 0x41, 0x34, 0x42, 0x43, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4d, - 0x49, 0x49, 0x44, 0x6f, 0x54, 0x43, 0x43, 0x41, 0x6f, 0x6d, 0x67, 0x41, - 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a, 0x41, 0x4d, 0x53, 0x57, 0x34, - 0x61, 0x71, 0x6b, 0x4f, 0x61, 0x53, 0x38, 0x4d, 0x41, 0x30, 0x47, 0x43, - 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x43, - 0x77, 0x55, 0x41, 0x4d, 0x47, 0x63, 0x78, 0x43, 0x7a, 0x41, 0x4a, 0x42, - 0x67, 0x4e, 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6c, 0x56, 0x54, 0x4d, - 0x52, 0x45, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, - 0x41, 0x68, 0x4a, 0x62, 0x47, 0x78, 0x70, 0x62, 0x6d, 0x39, 0x70, 0x63, - 0x7a, 0x45, 0x51, 0x4d, 0x41, 0x34, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, - 0x77, 0x77, 0x48, 0x51, 0x32, 0x68, 0x70, 0x59, 0x32, 0x46, 0x6e, 0x62, - 0x7a, 0x45, 0x53, 0x4d, 0x42, 0x41, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, - 0x67, 0x77, 0x4a, 0x51, 0x6e, 0x4a, 0x68, 0x61, 0x57, 0x35, 0x30, 0x63, - 0x6d, 0x56, 0x6c, 0x4d, 0x52, 0x38, 0x77, 0x48, 0x51, 0x59, 0x44, 0x56, - 0x51, 0x51, 0x4c, 0x44, 0x42, 0x5a, 0x54, 0x59, 0x57, 0x35, 0x6b, 0x59, - 0x6d, 0x39, 0x34, 0x49, 0x45, 0x4a, 0x79, 0x62, 0x33, 0x64, 0x7a, 0x5a, - 0x58, 0x49, 0x67, 0x55, 0x33, 0x64, 0x70, 0x64, 0x47, 0x4e, 0x6f, 0x4d, - 0x42, 0x34, 0x58, 0x44, 0x54, 0x45, 0x31, 0x4d, 0x44, 0x51, 0x78, 0x4d, - 0x44, 0x45, 0x34, 0x4d, 0x54, 0x4d, 0x78, 0x4f, 0x56, 0x6f, 0x58, 0x44, - 0x54, 0x49, 0x77, 0x4d, 0x44, 0x51, 0x78, 0x4d, 0x7a, 0x45, 0x34, 0x4d, - 0x54, 0x4d, 0x78, 0x4f, 0x56, 0x6f, 0x77, 0x5a, 0x7a, 0x45, 0x4c, 0x4d, - 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x56, - 0x56, 0x4d, 0x78, 0x45, 0x54, 0x41, 0x50, 0x42, 0x67, 0x4e, 0x56, 0x42, - 0x41, 0x67, 0x4d, 0x43, 0x45, 0x6c, 0x73, 0x62, 0x47, 0x6c, 0x75, 0x62, - 0x32, 0x6c, 0x7a, 0x4d, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, 0x44, 0x56, - 0x51, 0x51, 0x48, 0x44, 0x41, 0x64, 0x44, 0x61, 0x47, 0x6c, 0x6a, 0x59, - 0x57, 0x64, 0x76, 0x4d, 0x52, 0x49, 0x77, 0x45, 0x41, 0x59, 0x44, 0x56, - 0x51, 0x51, 0x4b, 0x44, 0x41, 0x6c, 0x43, 0x63, 0x6d, 0x46, 0x70, 0x62, - 0x6e, 0x52, 0x79, 0x5a, 0x57, 0x55, 0x78, 0x48, 0x7a, 0x41, 0x64, 0x42, - 0x67, 0x4e, 0x56, 0x42, 0x41, 0x73, 0x4d, 0x46, 0x6c, 0x4e, 0x68, 0x62, - 0x6d, 0x52, 0x69, 0x62, 0x33, 0x67, 0x67, 0x51, 0x6e, 0x4a, 0x76, 0x64, - 0x33, 0x4e, 0x6c, 0x63, 0x69, 0x42, 0x54, 0x64, 0x32, 0x6c, 0x30, 0x59, - 0x32, 0x67, 0x77, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, - 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, - 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, - 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x56, 0x6a, - 0x6e, 0x43, 0x34, 0x37, 0x42, 0x75, 0x55, 0x6d, 0x30, 0x50, 0x4b, 0x69, - 0x35, 0x73, 0x55, 0x53, 0x69, 0x30, 0x32, 0x77, 0x47, 0x4c, 0x38, 0x7a, - 0x71, 0x56, 0x6a, 0x52, 0x72, 0x64, 0x74, 0x74, 0x34, 0x59, 0x44, 0x79, - 0x50, 0x51, 0x64, 0x45, 0x4c, 0x6c, 0x69, 0x74, 0x66, 0x76, 0x34, 0x33, - 0x31, 0x59, 0x37, 0x48, 0x70, 0x54, 0x36, 0x7a, 0x2f, 0x58, 0x75, 0x73, - 0x75, 0x39, 0x2f, 0x32, 0x6d, 0x6a, 0x6c, 0x63, 0x76, 0x79, 0x6b, 0x47, - 0x4f, 0x31, 0x2b, 0x6f, 0x6b, 0x6d, 0x36, 0x56, 0x44, 0x69, 0x4e, 0x49, - 0x61, 0x48, 0x4d, 0x65, 0x65, 0x7a, 0x37, 0x56, 0x76, 0x33, 0x54, 0x6f, - 0x37, 0x4a, 0x33, 0x5a, 0x43, 0x4e, 0x52, 0x2f, 0x57, 0x5a, 0x44, 0x46, - 0x79, 0x7a, 0x62, 0x59, 0x37, 0x6c, 0x6e, 0x69, 0x77, 0x49, 0x53, 0x53, - 0x6f, 0x4c, 0x4d, 0x68, 0x37, 0x4d, 0x46, 0x36, 0x66, 0x73, 0x4f, 0x4b, - 0x59, 0x76, 0x63, 0x33, 0x6e, 0x41, 0x52, 0x65, 0x7a, 0x30, 0x51, 0x73, - 0x31, 0x4a, 0x70, 0x2b, 0x66, 0x58, 0x2b, 0x30, 0x44, 0x4b, 0x43, 0x48, - 0x39, 0x32, 0x36, 0x71, 0x34, 0x5a, 0x33, 0x4f, 0x57, 0x59, 0x71, 0x33, - 0x4e, 0x48, 0x50, 0x72, 0x41, 0x79, 0x38, 0x45, 0x32, 0x51, 0x4d, 0x7a, - 0x63, 0x47, 0x36, 0x38, 0x58, 0x4a, 0x65, 0x5a, 0x47, 0x59, 0x45, 0x66, - 0x56, 0x75, 0x75, 0x37, 0x53, 0x61, 0x64, 0x48, 0x48, 0x6b, 0x70, 0x76, - 0x76, 0x53, 0x4e, 0x32, 0x4b, 0x53, 0x48, 0x35, 0x64, 0x4e, 0x48, 0x78, - 0x43, 0x6b, 0x6e, 0x6d, 0x31, 0x4b, 0x70, 0x57, 0x34, 0x49, 0x6f, 0x47, - 0x67, 0x75, 0x58, 0x65, 0x70, 0x55, 0x6c, 0x6c, 0x64, 0x6d, 0x66, 0x31, - 0x4b, 0x6f, 0x72, 0x52, 0x58, 0x30, 0x44, 0x4f, 0x51, 0x71, 0x2f, 0x37, - 0x35, 0x30, 0x58, 0x4f, 0x50, 0x30, 0x72, 0x76, 0x68, 0x2b, 0x78, 0x44, - 0x48, 0x37, 0x45, 0x5a, 0x53, 0x4c, 0x67, 0x63, 0x43, 0x69, 0x38, 0x31, - 0x30, 0x6f, 0x74, 0x7a, 0x50, 0x34, 0x63, 0x50, 0x67, 0x2f, 0x4d, 0x35, - 0x46, 0x79, 0x6a, 0x36, 0x6c, 0x50, 0x41, 0x6a, 0x34, 0x54, 0x5a, 0x41, - 0x72, 0x46, 0x76, 0x71, 0x55, 0x4f, 0x4b, 0x6e, 0x41, 0x76, 0x74, 0x72, - 0x69, 0x39, 0x4c, 0x45, 0x41, 0x55, 0x50, 0x2b, 0x2f, 0x6c, 0x61, 0x42, - 0x32, 0x6d, 0x64, 0x4c, 0x36, 0x36, 0x38, 0x61, 0x75, 0x39, 0x6b, 0x53, - 0x56, 0x37, 0x68, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x55, - 0x44, 0x42, 0x4f, 0x4d, 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, 0x64, 0x44, - 0x67, 0x51, 0x57, 0x42, 0x42, 0x53, 0x31, 0x4b, 0x34, 0x32, 0x42, 0x43, - 0x49, 0x55, 0x4c, 0x5a, 0x2f, 0x51, 0x46, 0x6b, 0x4a, 0x51, 0x6c, 0x6a, - 0x2b, 0x4d, 0x6e, 0x63, 0x37, 0x61, 0x47, 0x36, 0x6a, 0x41, 0x66, 0x42, - 0x67, 0x4e, 0x56, 0x48, 0x53, 0x4d, 0x45, 0x47, 0x44, 0x41, 0x57, 0x67, - 0x42, 0x53, 0x31, 0x4b, 0x34, 0x32, 0x42, 0x43, 0x49, 0x55, 0x4c, 0x5a, - 0x2f, 0x51, 0x46, 0x6b, 0x4a, 0x51, 0x6c, 0x6a, 0x2b, 0x4d, 0x6e, 0x63, - 0x37, 0x61, 0x47, 0x36, 0x6a, 0x41, 0x4d, 0x42, 0x67, 0x4e, 0x56, 0x48, - 0x52, 0x4d, 0x45, 0x42, 0x54, 0x41, 0x44, 0x41, 0x51, 0x48, 0x2f, 0x4d, - 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, - 0x51, 0x45, 0x42, 0x43, 0x77, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x41, - 0x51, 0x42, 0x45, 0x64, 0x75, 0x45, 0x78, 0x58, 0x62, 0x79, 0x4d, 0x74, - 0x63, 0x6d, 0x6b, 0x36, 0x6e, 0x6f, 0x4c, 0x64, 0x6f, 0x4a, 0x64, 0x46, - 0x74, 0x6d, 0x63, 0x4c, 0x50, 0x7a, 0x43, 0x4f, 0x6d, 0x52, 0x31, 0x6b, - 0x31, 0x68, 0x47, 0x55, 0x44, 0x68, 0x34, 0x31, 0x51, 0x57, 0x4a, 0x67, - 0x46, 0x63, 0x75, 0x5a, 0x6c, 0x4d, 0x32, 0x35, 0x46, 0x2f, 0x71, 0x56, - 0x4b, 0x58, 0x53, 0x7a, 0x4c, 0x42, 0x52, 0x6f, 0x63, 0x31, 0x73, 0x73, - 0x45, 0x65, 0x55, 0x5a, 0x6c, 0x31, 0x41, 0x47, 0x79, 0x68, 0x4f, 0x4f, - 0x34, 0x39, 0x62, 0x2f, 0x4d, 0x66, 0x45, 0x50, 0x6f, 0x2f, 0x79, 0x56, - 0x77, 0x63, 0x7a, 0x32, 0x35, 0x34, 0x6f, 0x39, 0x50, 0x6d, 0x34, 0x45, - 0x39, 0x43, 0x76, 0x64, 0x71, 0x64, 0x4f, 0x38, 0x6d, 0x50, 0x70, 0x43, - 0x72, 0x45, 0x2f, 0x50, 0x6a, 0x72, 0x2b, 0x37, 0x54, 0x4e, 0x4b, 0x79, - 0x4d, 0x56, 0x73, 0x6b, 0x74, 0x6f, 0x4e, 0x33, 0x42, 0x35, 0x56, 0x35, - 0x4b, 0x31, 0x34, 0x2b, 0x47, 0x51, 0x56, 0x4f, 0x69, 0x53, 0x48, 0x67, - 0x65, 0x73, 0x45, 0x51, 0x61, 0x59, 0x71, 0x39, 0x63, 0x79, 0x78, 0x55, - 0x63, 0x6c, 0x4d, 0x73, 0x31, 0x51, 0x7a, 0x79, 0x4e, 0x48, 0x53, 0x65, - 0x33, 0x67, 0x44, 0x4e, 0x34, 0x31, 0x46, 0x46, 0x44, 0x58, 0x69, 0x45, - 0x37, 0x6b, 0x6a, 0x31, 0x68, 0x38, 0x6f, 0x6f, 0x34, 0x4d, 0x68, 0x48, - 0x37, 0x77, 0x63, 0x56, 0x76, 0x2b, 0x39, 0x6f, 0x6c, 0x4f, 0x57, 0x45, - 0x74, 0x61, 0x77, 0x47, 0x56, 0x78, 0x53, 0x69, 0x2f, 0x55, 0x39, 0x4b, - 0x56, 0x54, 0x6d, 0x4e, 0x35, 0x53, 0x68, 0x44, 0x4a, 0x67, 0x54, 0x77, - 0x75, 0x4d, 0x37, 0x34, 0x61, 0x53, 0x6e, 0x52, 0x77, 0x77, 0x45, 0x6a, - 0x32, 0x62, 0x58, 0x45, 0x61, 0x44, 0x4d, 0x62, 0x55, 0x58, 0x59, 0x58, - 0x44, 0x2f, 0x70, 0x34, 0x53, 0x50, 0x42, 0x71, 0x32, 0x61, 0x33, 0x65, - 0x63, 0x76, 0x65, 0x6c, 0x7a, 0x73, 0x59, 0x70, 0x57, 0x64, 0x77, 0x79, - 0x46, 0x37, 0x69, 0x58, 0x6f, 0x57, 0x43, 0x72, 0x50, 0x56, 0x4c, 0x4d, - 0x34, 0x36, 0x44, 0x38, 0x4d, 0x34, 0x50, 0x65, 0x65, 0x6e, 0x54, 0x7a, - 0x71, 0x36, 0x65, 0x66, 0x6e, 0x58, 0x34, 0x6d, 0x7a, 0x67, 0x53, 0x2f, - 0x66, 0x4f, 0x71, 0x49, 0x39, 0x67, 0x72, 0x6a, 0x53, 0x32, 0x52, 0x38, - 0x62, 0x74, 0x77, 0x39, 0x49, 0x64, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x22, 0x3a, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, - 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x72, 0x65, - 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2d, - 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, - 0x3a, 0x20, 0x22, 0x30, 0x30, 0x43, 0x39, 0x36, 0x46, 0x30, 0x39, 0x32, - 0x45, 0x31, 0x34, 0x42, 0x35, 0x31, 0x45, 0x43, 0x46, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x49, 0x49, 0x44, 0x4f, 0x7a, 0x43, 0x43, - 0x41, 0x69, 0x4f, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a, - 0x41, 0x4d, 0x6c, 0x76, 0x43, 0x53, 0x34, 0x55, 0x74, 0x52, 0x37, 0x50, - 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, - 0x44, 0x51, 0x45, 0x42, 0x42, 0x51, 0x55, 0x41, 0x4d, 0x44, 0x51, 0x78, - 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x59, 0x54, - 0x41, 0x6c, 0x56, 0x54, 0x4d, 0x52, 0x45, 0x77, 0x44, 0x77, 0x59, 0x44, - 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x68, 0x4a, 0x62, 0x47, 0x78, 0x70, - 0x62, 0x6d, 0x39, 0x70, 0x63, 0x7a, 0x45, 0x53, 0x4d, 0x42, 0x41, 0x47, - 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x4a, 0x51, 0x6e, 0x4a, 0x68, - 0x61, 0x57, 0x35, 0x30, 0x63, 0x6d, 0x56, 0x6c, 0x4d, 0x42, 0x34, 0x58, - 0x44, 0x54, 0x45, 0x31, 0x4d, 0x44, 0x4d, 0x79, 0x4d, 0x44, 0x41, 0x78, - 0x4d, 0x54, 0x63, 0x79, 0x4d, 0x56, 0x6f, 0x58, 0x44, 0x54, 0x45, 0x32, - 0x4d, 0x44, 0x4d, 0x78, 0x4f, 0x54, 0x41, 0x78, 0x4d, 0x54, 0x63, 0x79, - 0x4d, 0x56, 0x6f, 0x77, 0x4e, 0x44, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, - 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x56, 0x56, 0x4d, 0x78, - 0x45, 0x54, 0x41, 0x50, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, - 0x43, 0x45, 0x6c, 0x73, 0x62, 0x47, 0x6c, 0x75, 0x62, 0x32, 0x6c, 0x7a, - 0x4d, 0x52, 0x49, 0x77, 0x45, 0x41, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4b, - 0x44, 0x41, 0x6c, 0x43, 0x63, 0x6d, 0x46, 0x70, 0x62, 0x6e, 0x52, 0x79, - 0x5a, 0x57, 0x55, 0x77, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, - 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, - 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, - 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x66, - 0x43, 0x52, 0x68, 0x4f, 0x47, 0x65, 0x4d, 0x6a, 0x34, 0x63, 0x69, 0x35, - 0x42, 0x62, 0x62, 0x73, 0x2f, 0x78, 0x30, 0x47, 0x2b, 0x50, 0x6b, 0x62, - 0x65, 0x4c, 0x37, 0x69, 0x47, 0x45, 0x73, 0x58, 0x35, 0x55, 0x57, 0x51, - 0x65, 0x41, 0x38, 0x6f, 0x43, 0x57, 0x55, 0x38, 0x6a, 0x70, 0x69, 0x70, - 0x46, 0x54, 0x43, 0x32, 0x37, 0x31, 0x51, 0x30, 0x66, 0x35, 0x42, 0x51, - 0x7a, 0x58, 0x43, 0x4e, 0x38, 0x4c, 0x34, 0x4c, 0x6e, 0x77, 0x47, 0x76, - 0x74, 0x6d, 0x32, 0x63, 0x67, 0x41, 0x45, 0x69, 0x76, 0x53, 0x42, 0x4f, - 0x44, 0x6f, 0x37, 0x58, 0x48, 0x73, 0x6d, 0x78, 0x72, 0x46, 0x6a, 0x4b, - 0x64, 0x51, 0x78, 0x31, 0x53, 0x37, 0x46, 0x49, 0x75, 0x46, 0x52, 0x4b, - 0x4f, 0x31, 0x38, 0x55, 0x66, 0x38, 0x72, 0x49, 0x47, 0x6d, 0x5a, 0x48, - 0x69, 0x4a, 0x66, 0x68, 0x43, 0x62, 0x55, 0x45, 0x47, 0x69, 0x6c, 0x70, - 0x77, 0x4d, 0x74, 0x37, 0x68, 0x55, 0x4d, 0x6a, 0x6a, 0x76, 0x32, 0x58, - 0x44, 0x75, 0x66, 0x50, 0x43, 0x4d, 0x72, 0x4a, 0x38, 0x59, 0x6e, 0x32, - 0x79, 0x2f, 0x79, 0x44, 0x69, 0x35, 0x6e, 0x68, 0x73, 0x37, 0x55, 0x73, - 0x46, 0x68, 0x52, 0x4f, 0x6d, 0x39, 0x6f, 0x49, 0x32, 0x50, 0x79, 0x69, - 0x4a, 0x58, 0x30, 0x31, 0x79, 0x52, 0x32, 0x61, 0x67, 0x38, 0x63, 0x50, - 0x42, 0x62, 0x35, 0x41, 0x68, 0x6c, 0x77, 0x6d, 0x6a, 0x31, 0x79, 0x4d, - 0x57, 0x6d, 0x53, 0x75, 0x48, 0x56, 0x6e, 0x55, 0x4e, 0x38, 0x54, 0x30, - 0x72, 0x6a, 0x49, 0x58, 0x79, 0x72, 0x42, 0x68, 0x78, 0x54, 0x41, 0x6b, - 0x33, 0x6f, 0x6d, 0x51, 0x6b, 0x51, 0x64, 0x48, 0x4b, 0x6a, 0x32, 0x77, - 0x38, 0x61, 0x66, 0x64, 0x72, 0x41, 0x63, 0x4e, 0x55, 0x47, 0x69, 0x34, - 0x79, 0x55, 0x2f, 0x61, 0x35, 0x2f, 0x70, 0x6d, 0x62, 0x38, 0x74, 0x5a, - 0x70, 0x41, 0x61, 0x37, 0x33, 0x4f, 0x5a, 0x56, 0x64, 0x4f, 0x45, 0x51, - 0x65, 0x70, 0x4a, 0x41, 0x41, 0x49, 0x52, 0x57, 0x58, 0x65, 0x53, 0x32, - 0x42, 0x64, 0x4b, 0x54, 0x6b, 0x68, 0x66, 0x52, 0x4a, 0x63, 0x37, 0x57, - 0x45, 0x49, 0x6c, 0x62, 0x69, 0x2b, 0x39, 0x61, 0x32, 0x4f, 0x64, 0x74, - 0x4d, 0x33, 0x4f, 0x6b, 0x49, 0x73, 0x2b, 0x72, 0x5a, 0x45, 0x37, 0x2b, - 0x57, 0x56, 0x54, 0x38, 0x58, 0x51, 0x6f, 0x69, 0x4c, 0x78, 0x70, 0x55, - 0x64, 0x2f, 0x77, 0x4e, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, - 0x55, 0x44, 0x42, 0x4f, 0x4d, 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, 0x64, - 0x44, 0x67, 0x51, 0x57, 0x42, 0x42, 0x51, 0x68, 0x62, 0x4a, 0x38, 0x44, - 0x74, 0x75, 0x4b, 0x46, 0x68, 0x47, 0x54, 0x73, 0x72, 0x76, 0x5a, 0x34, - 0x31, 0x56, 0x77, 0x35, 0x6a, 0x59, 0x62, 0x6d, 0x61, 0x7a, 0x41, 0x66, - 0x42, 0x67, 0x4e, 0x56, 0x48, 0x53, 0x4d, 0x45, 0x47, 0x44, 0x41, 0x57, - 0x67, 0x42, 0x51, 0x68, 0x62, 0x4a, 0x38, 0x44, 0x74, 0x75, 0x4b, 0x46, - 0x68, 0x47, 0x54, 0x73, 0x72, 0x76, 0x5a, 0x34, 0x31, 0x56, 0x77, 0x35, - 0x6a, 0x59, 0x62, 0x6d, 0x61, 0x7a, 0x41, 0x4d, 0x42, 0x67, 0x4e, 0x56, - 0x48, 0x52, 0x4d, 0x45, 0x42, 0x54, 0x41, 0x44, 0x41, 0x51, 0x48, 0x2f, - 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, - 0x44, 0x51, 0x45, 0x42, 0x42, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, - 0x41, 0x51, 0x41, 0x52, 0x67, 0x32, 0x77, 0x6a, 0x68, 0x4a, 0x61, 0x6e, - 0x68, 0x4b, 0x75, 0x31, 0x62, 0x77, 0x36, 0x33, 0x2b, 0x58, 0x66, 0x6a, - 0x32, 0x35, 0x4f, 0x55, 0x61, 0x30, 0x32, 0x6a, 0x4b, 0x2b, 0x69, 0x34, - 0x76, 0x68, 0x6b, 0x57, 0x65, 0x75, 0x43, 0x47, 0x64, 0x35, 0x2f, 0x6b, - 0x78, 0x41, 0x31, 0x64, 0x5a, 0x4d, 0x6a, 0x42, 0x66, 0x53, 0x4d, 0x78, - 0x68, 0x34, 0x38, 0x34, 0x78, 0x42, 0x70, 0x61, 0x71, 0x52, 0x49, 0x4f, - 0x48, 0x76, 0x5a, 0x6d, 0x52, 0x70, 0x4b, 0x63, 0x78, 0x43, 0x67, 0x63, - 0x69, 0x38, 0x78, 0x52, 0x62, 0x62, 0x4a, 0x69, 0x61, 0x58, 0x72, 0x62, - 0x31, 0x76, 0x49, 0x65, 0x50, 0x54, 0x54, 0x69, 0x34, 0x6c, 0x66, 0x55, - 0x36, 0x63, 0x70, 0x66, 0x73, 0x6e, 0x6a, 0x4d, 0x46, 0x43, 0x48, 0x44, - 0x6b, 0x38, 0x45, 0x2f, 0x30, 0x41, 0x78, 0x49, 0x66, 0x4f, 0x70, 0x51, - 0x30, 0x42, 0x53, 0x4a, 0x59, 0x33, 0x35, 0x57, 0x71, 0x42, 0x34, 0x35, - 0x78, 0x61, 0x49, 0x57, 0x42, 0x41, 0x59, 0x38, 0x6c, 0x51, 0x32, 0x70, - 0x4e, 0x66, 0x69, 0x50, 0x79, 0x4b, 0x34, 0x6b, 0x7a, 0x61, 0x6a, 0x53, - 0x4f, 0x67, 0x2b, 0x6b, 0x62, 0x45, 0x4b, 0x4c, 0x6d, 0x41, 0x30, 0x75, - 0x64, 0x59, 0x79, 0x38, 0x74, 0x73, 0x79, 0x64, 0x74, 0x2b, 0x38, 0x38, - 0x2b, 0x52, 0x38, 0x38, 0x72, 0x59, 0x4b, 0x74, 0x34, 0x71, 0x44, 0x42, - 0x6f, 0x2b, 0x5a, 0x35, 0x7a, 0x67, 0x4a, 0x32, 0x66, 0x5a, 0x76, 0x62, - 0x41, 0x70, 0x39, 0x39, 0x63, 0x42, 0x41, 0x53, 0x48, 0x71, 0x4d, 0x43, - 0x6f, 0x55, 0x6f, 0x50, 0x62, 0x39, 0x36, 0x59, 0x57, 0x45, 0x68, 0x61, - 0x57, 0x68, 0x6a, 0x41, 0x72, 0x56, 0x47, 0x7a, 0x67, 0x65, 0x76, 0x70, - 0x6f, 0x70, 0x4b, 0x41, 0x39, 0x61, 0x4f, 0x41, 0x46, 0x64, 0x6e, 0x64, - 0x50, 0x4b, 0x4c, 0x62, 0x65, 0x36, 0x79, 0x32, 0x39, 0x62, 0x62, 0x66, - 0x4c, 0x66, 0x51, 0x71, 0x61, 0x74, 0x30, 0x42, 0x31, 0x66, 0x56, 0x6d, - 0x75, 0x74, 0x43, 0x49, 0x48, 0x47, 0x49, 0x58, 0x74, 0x73, 0x50, 0x48, - 0x51, 0x44, 0x65, 0x2f, 0x63, 0x58, 0x4a, 0x74, 0x6f, 0x4a, 0x6b, 0x37, - 0x48, 0x6d, 0x44, 0x30, 0x38, 0x2b, 0x2b, 0x43, 0x39, 0x59, 0x76, 0x6a, - 0x78, 0x6c, 0x53, 0x69, 0x38, 0x6a, 0x78, 0x4c, 0x62, 0x35, 0x6e, 0x49, - 0x41, 0x30, 0x51, 0x47, 0x49, 0x30, 0x79, 0x6a, 0x22, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, - 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x70, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, - 0x3a, 0x20, 0x22, 0x33, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x73, 0x22, 0x3a, 0x20, - 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x64, 0x61, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x41, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, - 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x64, 0x65, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x4c, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x41, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, - 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x48, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x45, 0x53, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, - 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x47, 0x42, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x48, 0x4b, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4b, 0x57, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x59, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x48, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x52, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x54, 0x52, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x59, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x42, 0x48, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x44, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x45, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x48, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, - 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x41, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x51, 0x41, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, - 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x54, 0x4e, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x59, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x48, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x44, - 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x46, 0x52, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x48, 0x55, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4d, - 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x50, 0x54, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x52, 0x4f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x55, 0x53, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x5f, 0x49, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x69, 0x77, 0x5f, 0x49, 0x4c, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6a, 0x61, - 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x62, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x6e, 0x6c, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6c, 0x5f, 0x4e, 0x4c, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x6e, 0x6f, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6c, 0x5f, - 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, - 0x74, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x45, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x72, 0x75, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x4c, - 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x52, 0x55, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x65, - 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x76, 0x5f, 0x53, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x74, 0x72, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x41, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x45, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x47, - 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4b, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4e, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x50, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x4b, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x59, 0x45, 0x22, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, - 0x70, 0x61, 0x6c, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x2e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x2e, 0x76, 0x33, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, - 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, - 0x2a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x79, 0x6f, 0x75, 0x72, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, - 0x3a, 0x20, 0x22, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x5f, 0x44, 0x4b, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x64, 0x65, 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, - 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, - 0x65, 0x5f, 0x44, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x5f, 0x44, 0x4b, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x64, 0x65, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x52, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x41, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x41, 0x55, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x47, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x41, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x4e, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x44, 0x4b, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x45, 0x45, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x45, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x49, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x46, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x47, 0x42, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x48, 0x55, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, - 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4a, 0x50, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4b, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x58, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x4d, 0x59, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, - 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x50, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x4c, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, - 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x6e, 0x5f, 0x52, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x41, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, - 0x47, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, - 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x54, 0x4e, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x6e, 0x5f, 0x54, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x55, 0x53, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x6e, 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x41, 0x52, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x43, 0x5a, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x45, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x45, 0x53, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x47, 0x52, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4a, 0x4f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x54, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4c, 0x56, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4d, - 0x58, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, - 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x50, 0x54, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x65, 0x73, 0x5f, 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x52, 0x4f, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, - 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, - 0x73, 0x5f, 0x54, 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x73, 0x5f, 0x55, 0x53, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x65, 0x73, 0x5f, 0x59, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x41, - 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x42, 0x45, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x42, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x43, 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x43, 0x5a, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x44, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x46, 0x49, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x46, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x47, 0x52, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4a, - 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4b, 0x57, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x54, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4c, 0x56, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4d, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, - 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x4f, 0x4d, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, - 0x72, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x51, 0x41, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x66, 0x72, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, - 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x53, 0x49, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, - 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x54, 0x4e, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x66, 0x72, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x72, 0x5f, 0x59, 0x45, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x69, 0x74, 0x5f, 0x49, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x77, 0x5f, - 0x49, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x6a, 0x61, 0x5f, 0x4a, 0x50, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, - 0x62, 0x5f, 0x4e, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6c, 0x5f, 0x42, 0x45, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x6e, 0x6c, 0x5f, 0x4e, 0x4c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6f, 0x5f, 0x4e, - 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x70, 0x6c, 0x5f, 0x50, 0x4c, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, - 0x5f, 0x42, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x74, 0x5f, 0x50, 0x54, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x72, 0x75, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, 0x4c, 0x54, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x72, 0x75, 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x75, 0x5f, - 0x52, 0x55, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x73, 0x65, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, - 0x76, 0x5f, 0x53, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x72, 0x5f, 0x54, 0x52, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x41, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x42, - 0x48, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x43, 0x4e, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x43, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x44, 0x5a, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x45, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x46, 0x49, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x47, 0x52, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x48, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x48, 0x55, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x4a, 0x4f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4b, 0x57, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x4b, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, - 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4c, 0x55, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x4c, 0x56, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4d, 0x41, 0x22, 0x2c, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x7a, 0x68, 0x5f, 0x4e, 0x5a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x4f, 0x4d, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x50, 0x54, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, - 0x51, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x52, 0x4f, 0x22, 0x2c, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, - 0x68, 0x5f, 0x53, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x49, 0x22, - 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x7a, 0x68, 0x5f, 0x53, 0x4b, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x54, - 0x4e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x7a, 0x68, 0x5f, 0x55, 0x53, 0x22, 0x2c, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7a, 0x68, - 0x5f, 0x59, 0x45, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x70, 0x70, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x6f, 0x75, 0x63, 0x68, - 0x2e, 0x76, 0x32, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, - 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2e, 0x2a, 0x22, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6d, - 0x2e, 0x79, 0x6f, 0x75, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x70, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x72, 0x6f, - 0x77, 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x22, 0x3a, 0x20, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x22, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x61, - 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x3a, 0x20, - 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, - 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x20, 0x22, - 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a -}; -unsigned int configuration_otc_config_ios_json_len = 20723; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.h deleted file mode 100755 index 76cfebff..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.h +++ /dev/null @@ -1,91 +0,0 @@ -// -// PPOTConfiguration.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTCore.h" -#import "PPOTRequest.h" - -@interface PPOTConfigurationRecipe : NSObject -@property (nonatomic, assign, readwrite) PPOTRequestTarget target; -@property (nonatomic, strong, readwrite) NSNumber *protocolVersion; -@property (nonatomic, strong, readwrite) NSArray *supportedLocales; // these have been uppercased, to prevent capitalization mistakes -@property (nonatomic, strong, readwrite) NSString *targetAppURLScheme; -@property (nonatomic, strong, readwrite) NSArray *targetAppBundleIDs; -@end - -@interface PPOTConfigurationRecipeEndpoint : NSObject -@property (nonatomic, strong, readwrite) NSString *url; -@property (nonatomic, strong, readwrite) NSString *certificateSerialNumber; -@property (nonatomic, strong, readwrite) NSString *base64EncodedCertificate; -@end - -@interface PPOTConfigurationOAuthRecipe : PPOTConfigurationRecipe -@property (nonatomic, strong, readwrite) NSSet *scope; -@property (nonatomic, strong, readwrite) NSDictionary *endpoints; // dictionary of PPOTConfigurationRecipeEndpoint -@end - -@interface PPOTConfigurationCheckoutRecipe : PPOTConfigurationRecipe -// no subclass-specific properties, so far -@end - -@interface PPOTConfigurationBillingAgreementRecipe : PPOTConfigurationRecipe -// no subclass-specific properties, so far -@end - -@class PPOTConfiguration; - -typedef void (^PPOTConfigurationCompletionBlock)(PPOTConfiguration *currentConfiguration); - -@interface PPOTConfiguration : NSObject - -/*! - @brief In the background: if the cached configuration is stale, then downloads the latest version. -*/ -+ (void)updateCacheAsNecessary; - -/*! - @brief Returns the current configuration, either from cache or else the hardcoded default configuration. -*/ -+ (PPOTConfiguration *)getCurrentConfiguration; - -/*! - @brief This method is here only for PPOTConfigurationTest. - - @discussion Everyone else, please stick to using [PPOTConfiguration getCurrentConfiguration]!!! -*/ -+ (PPOTConfiguration *)configurationWithDictionary:(NSDictionary *)dictionary; - -#if DEBUG -+ (void)useHardcodedConfiguration:(BOOL)useHardcodedConfiguration; -#endif - -@property (nonatomic, strong, readwrite) NSString *fileTimestamp; -@property (nonatomic, strong, readwrite) NSArray *prioritizedOAuthRecipes; -@property (nonatomic, strong, readwrite) NSArray *prioritizedCheckoutRecipes; -@property (nonatomic, strong, readwrite) NSArray *prioritizedBillingAgreementRecipes; - -@end - -// The following definitions are for backwards compatibility -@interface PPConfiguration: PPOTConfiguration -@end - -@interface PPConfigurationCheckoutRecipe : PPOTConfigurationCheckoutRecipe -@end - -@interface PPConfigurationBillingAgreementRecipe : PPOTConfigurationBillingAgreementRecipe -@end - -@interface PPConfigurationOAuthRecipe : PPOTConfigurationOAuthRecipe -@end - -@interface PPConfigurationRecipeEndpoint : PPOTConfigurationRecipeEndpoint -@end - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.m deleted file mode 100755 index be18a768..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/PPOTConfiguration.m +++ /dev/null @@ -1,574 +0,0 @@ -// -// PPOTConfiguration.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTConfiguration.h" -#import "PPOTJSONHelper.h" -#import "PPOTMacros.h" -#import "PPOTSimpleKeychain.h" -#import "PPOTURLSession.h" -#if __has_include("BraintreeCore.h") -#import "BTLogger_Internal.h" -#else -#import -#endif -#import - -#include "PPDefaultConfigurationJSON.h" -// `PPDefaultConfigurationJSON.h` is generated by a build script from `otc-config.ios.json`; -// it defines these two variables: -// unsigned char configuration_otc_config_ios_json[]; -// unsigned int configuration_otc_config_ios_json_len; -// `configuration_otc_config_ios_json` holds the contents of the `otc-config.ios.json` file. - -#define PPEnvironmentProduction @"live" - -#define kConfigurationFileDownloadURL CARDIO_STR(@"https://www.paypalobjects.com/webstatic/otc/otc-config.ios.json") -#define kConfigurationFileDownloadTimeout 60 -#define kConfigurationFileDownloadRetryInterval (5 * 60) // 5 minutes - -#define kPPOTConfigurationFileMaximumAcceptableObsolescence (4 * 60 * 60) // 4 hours - -#define kPPOTConfigurationSupportedProtocolVersionsForWallet @[@1, @2, @3] -#define kPPOTConfigurationSupportedProtocolVersionsForBrowser @[@0, @3] - -#define kPPOTConfigurationKeyOs CARDIO_STR(@"os") -#define kPPOTConfigurationKeyFileTimestamp CARDIO_STR(@"file_timestamp") -#define kPPOTConfigurationKeyTarget CARDIO_STR(@"target") -#define kPPOTConfigurationKeyProtocolVersion CARDIO_STR(@"protocol") -#define kPPOTConfigurationKeySupportedLocales CARDIO_STR(@"supported_locales") -#define kPPOTConfigurationKeyScope CARDIO_STR(@"scope") -#define kPPOTConfigurationKeyURLScheme CARDIO_STR(@"scheme") -#define kPPOTConfigurationKeyApplications CARDIO_STR(@"applications") -#define kPPOTConfigurationKeyEndpoints CARDIO_STR(@"endpoints") -#define kPPOTConfigurationKeyURL CARDIO_STR(@"url") -#define kPPOTConfigurationKeyCertificateSerialNumber CARDIO_STR(@"certificate_serial_number") -#define kPPOTConfigurationKeyCertificate CARDIO_STR(@"certificate") -#define kPPOTConfigurationKeyOAuthRecipes CARDIO_STR(@"oauth2_recipes_in_decreasing_priority_order") -#define kPPOTConfigurationKeyCheckoutRecipes CARDIO_STR(@"checkout_recipes_in_decreasing_priority_order") -#define kPPOTConfigurationKeyBillingAgreementRecipes CARDIO_STR(@"billing_agreement_recipes_in_decreasing_priority_order") - -#define kPPOTConfigurationValueWallet CARDIO_STR(@"wallet") -#define kPPOTConfigurationValueBrowser CARDIO_STR(@"browser") - -#define kPPOTCoderKeyConfigurationRecipeTarget CARDIO_STR(@"target") -#define kPPOTCoderKeyConfigurationRecipeProtocolVersion CARDIO_STR(@"protocol") -#define kPPOTCoderKeyConfigurationRecipeSupportedLocales CARDIO_STR(@"supportedLocales") -#define kPPOTCoderKeyConfigurationRecipeTargetAppURLScheme CARDIO_STR(@"targetAppURLScheme") -#define kPPOTCoderKeyConfigurationRecipeTargetAppBundleIDs CARDIO_STR(@"targetAppBundleIDs") -#define kPPOTCoderKeyConfigurationRecipeEndpoints CARDIO_STR(@"endpoints") -#define kPPOTCoderKeyConfigurationRecipeScope CARDIO_STR(@"scope") -#define kPPOTCoderKeyConfigurationRecipeURL CARDIO_STR(@"url") -#define kPPOTCoderKeyConfigurationRecipeCertificateSerialNumber CARDIO_STR(@"certificate_serial_number") -#define kPPOTCoderKeyConfigurationRecipeCertificate CARDIO_STR(@"certificate") - -#define kPPOTCoderKeyConfigurationDownloadTime CARDIO_STR(@"downloadTime") -#define kPPOTCoderKeyConfigurationTimestamp CARDIO_STR(@"timestamp") -#define kPPOTCoderKeyConfigurationOAuthRecipes CARDIO_STR(@"oAuthRecipes") -#define kPPOTCoderKeyConfigurationCheckoutRecipes CARDIO_STR(@"checkoutRecipes") -#define kPPOTCoderKeyConfigurationBillingAgreementRecipes CARDIO_STR(@"billingAgreementRecipes") - -#define kPPOTKeychainConfiguration CARDIO_STR(@"PayPal_OTC_Configuration") - -#define LOG_ERROR_AND_RETURN_NIL { PPSDKLog(@"Bad configuration: error %d", __LINE__); return nil; } - -#define STRING_FROM_DICTIONARY(STRING, DICTIONARY, KEY) \ -NSString *STRING = [PPOTJSONHelper stringFromDictionary:DICTIONARY withKey:KEY]; \ -if (!STRING) LOG_ERROR_AND_RETURN_NIL - -#define DICTIONARY_FROM_DICTIONARY(DICTIONARY1, DICTIONARY2, KEY, REQUIRED) \ -NSDictionary *DICTIONARY1 = [PPOTJSONHelper dictionaryFromDictionary:DICTIONARY2 withKey:KEY]; \ -if (REQUIRED && !DICTIONARY1) LOG_ERROR_AND_RETURN_NIL - -#define STRING_ARRAY_FROM_DICTIONARY(ARRAY, DICTIONARY, KEY, REQUIRED) \ -NSArray *ARRAY = [PPOTJSONHelper stringArrayFromDictionary:DICTIONARY withKey:KEY]; \ -if (REQUIRED && !ARRAY) LOG_ERROR_AND_RETURN_NIL - -#define DICTIONARY_ARRAY_FROM_DICTIONARY(ARRAY, DICTIONARY, KEY, REQUIRED) \ -NSArray *ARRAY = [PPOTJSONHelper dictionaryArrayFromDictionary:DICTIONARY withKey:KEY]; \ -if (REQUIRED && !ARRAY) LOG_ERROR_AND_RETURN_NIL - -#pragma mark - PPOTConfigurationRecipe - -@implementation PPOTConfigurationRecipe - -- (instancetype)initWithDictionary:(NSDictionary *)dictionary { - STRING_FROM_DICTIONARY(targetString, dictionary, kPPOTConfigurationKeyTarget) - STRING_FROM_DICTIONARY(protocolVersionString, dictionary, kPPOTConfigurationKeyProtocolVersion) - NSNumber *protocolVersionNumber = [NSNumber numberWithInteger:[protocolVersionString integerValue]]; - - if ((self = [super init])) { - if ([targetString isEqualToString:kPPOTConfigurationValueWallet]) { - _target = PPOTRequestTargetOnDeviceApplication; - - if (![kPPOTConfigurationSupportedProtocolVersionsForWallet containsObject:protocolVersionNumber]) { - LOG_ERROR_AND_RETURN_NIL - } - _protocolVersion = protocolVersionNumber; - - STRING_ARRAY_FROM_DICTIONARY(supportedLocalesArray, dictionary, kPPOTConfigurationKeySupportedLocales, NO) - // protect against capitalization mistakes: - NSMutableArray *uppercasedSupportedLocalesArray = [NSMutableArray arrayWithCapacity:[supportedLocalesArray count]]; - for (NSString *locale in supportedLocalesArray) { - [uppercasedSupportedLocalesArray addObject:[locale uppercaseString]]; - } - _supportedLocales = uppercasedSupportedLocalesArray; - - STRING_FROM_DICTIONARY(targetAppURLScheme, dictionary, kPPOTConfigurationKeyURLScheme) - if ([targetAppURLScheme rangeOfString:@":"].location != NSNotFound || - [targetAppURLScheme rangeOfString:@"/"].location != NSNotFound) { - LOG_ERROR_AND_RETURN_NIL - } - _targetAppURLScheme = targetAppURLScheme; - - STRING_ARRAY_FROM_DICTIONARY(targetsArray, dictionary, kPPOTConfigurationKeyApplications, YES) - _targetAppBundleIDs = targetsArray; - } - else if ([targetString isEqualToString:kPPOTConfigurationValueBrowser]) { - _target = PPOTRequestTargetBrowser; - - if (![kPPOTConfigurationSupportedProtocolVersionsForBrowser containsObject:protocolVersionNumber]) { - LOG_ERROR_AND_RETURN_NIL - } - _protocolVersion = protocolVersionNumber; - } - else { - LOG_ERROR_AND_RETURN_NIL - } - } - - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [self init])) { - _target = ((NSNumber *)[aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeTarget]).unsignedIntegerValue; - _protocolVersion = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeProtocolVersion]; - - if (_target == PPOTRequestTargetOnDeviceApplication) { - _targetAppURLScheme = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeTargetAppURLScheme]; - _targetAppBundleIDs = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeTargetAppBundleIDs]; - _supportedLocales = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeSupportedLocales]; - } - } - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:@(self.target) forKey:kPPOTCoderKeyConfigurationRecipeTarget]; - [aCoder encodeObject:self.protocolVersion forKey:kPPOTCoderKeyConfigurationRecipeProtocolVersion]; - if (self.target == PPOTRequestTargetOnDeviceApplication) { - [aCoder encodeObject:self.targetAppURLScheme forKey:kPPOTCoderKeyConfigurationRecipeTargetAppURLScheme]; - [aCoder encodeObject:self.targetAppBundleIDs forKey:kPPOTCoderKeyConfigurationRecipeTargetAppBundleIDs]; - [aCoder encodeObject:self.supportedLocales forKey:kPPOTCoderKeyConfigurationRecipeSupportedLocales]; - } -} - -@end - -#pragma mark - PPOTConfigurationRecipeEndpoint - -@implementation PPOTConfigurationRecipeEndpoint - -- (instancetype)initWithURL:(NSString *)url withCertificateSerialNumber:(NSString *)certificateSerialNumber withBase64EncodedCertificate:(NSString *)base64EncodedCertificate { - if ((self = [super init])) { - if (![url length] || ![certificateSerialNumber length] || ![base64EncodedCertificate length]) { - LOG_ERROR_AND_RETURN_NIL - } - - if (![url hasPrefix:@"https://"] && ![url hasPrefix:@"http://"]) { - LOG_ERROR_AND_RETURN_NIL - } - - _url = url; - _certificateSerialNumber = certificateSerialNumber; - _base64EncodedCertificate = base64EncodedCertificate; - } - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super init])) { - _url = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeURL]; - _certificateSerialNumber = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeCertificateSerialNumber]; - _base64EncodedCertificate = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeCertificate]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.url forKey:kPPOTCoderKeyConfigurationRecipeURL]; - [aCoder encodeObject:self.certificateSerialNumber forKey:kPPOTCoderKeyConfigurationRecipeCertificateSerialNumber]; - [aCoder encodeObject:self.base64EncodedCertificate forKey:kPPOTCoderKeyConfigurationRecipeCertificate]; -} - -@end - -#pragma mark - PPOTConfigurationOAuthRecipe - -@implementation PPOTConfigurationOAuthRecipe - -- (instancetype)initWithDictionary:(NSDictionary *)dictionary { - if ((self = [super initWithDictionary:dictionary])) { - STRING_ARRAY_FROM_DICTIONARY(scopeStrings, dictionary, kPPOTConfigurationKeyScope, YES) - _scope = [NSSet setWithArray:scopeStrings]; - - DICTIONARY_FROM_DICTIONARY(jsonEndpoints, dictionary, kPPOTConfigurationKeyEndpoints, - self.target == PPOTRequestTargetBrowser && [self.protocolVersion isEqual:@(3)]) - if (![jsonEndpoints count]) { - _endpoints = nil; - } - else { - NSMutableDictionary *endpoints = [NSMutableDictionary dictionaryWithCapacity:[jsonEndpoints count]]; - for (NSString *environment in jsonEndpoints) { - NSString *url = jsonEndpoints[environment][kPPOTConfigurationKeyURL]; - NSString *certificateSerialNumber = jsonEndpoints[environment][kPPOTConfigurationKeyCertificateSerialNumber]; - NSString *base64EncodedCertificate = jsonEndpoints[environment][kPPOTConfigurationKeyCertificate]; - - PPOTConfigurationRecipeEndpoint *endpoint = [[PPOTConfigurationRecipeEndpoint alloc] initWithURL:url - withCertificateSerialNumber:certificateSerialNumber - withBase64EncodedCertificate:base64EncodedCertificate]; - if (!endpoint) { - LOG_ERROR_AND_RETURN_NIL - } - - endpoints[environment] = endpoint; - } - - if (!endpoints[PPEnvironmentProduction]) { - LOG_ERROR_AND_RETURN_NIL - } - - _endpoints = endpoints; - } - } - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { - _scope = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeScope]; - - if (self.target == PPOTRequestTargetBrowser) { - _endpoints = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationRecipeEndpoints]; - } - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [super encodeWithCoder:aCoder]; - [aCoder encodeObject:self.scope forKey:kPPOTCoderKeyConfigurationRecipeScope]; - - if (self.target == PPOTRequestTargetBrowser) { - [aCoder encodeObject:self.endpoints forKey:kPPOTCoderKeyConfigurationRecipeEndpoints]; - } -} - -@end - -#pragma mark - PPOTConfigurationCheckoutRecipe - -@implementation PPOTConfigurationCheckoutRecipe - -- (instancetype)initWithDictionary:(NSDictionary *)dict { - if ((self = [super initWithDictionary:dict])) { - // no subclass-specific properties, so far - } - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { - // no subclass-specific properties, so far - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [super encodeWithCoder:aCoder]; - // no subclass-specific properties, so far -} - -@end - -#pragma mark - PPOTConfigurationBillingAgreementRecipe - -@implementation PPOTConfigurationBillingAgreementRecipe - -- (instancetype)initWithDictionary:(NSDictionary *)dict { - if ((self = [super initWithDictionary:dict])) { - // no subclass-specific properties, so far - } - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { - // no subclass-specific properties, so far - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [super encodeWithCoder:aCoder]; - // no subclass-specific properties, so far -} - -@end - -#pragma mark - PPOTConfiguration - -typedef void (^PPOTConfigurationFileDownloadCompletionBlock)(NSData *fileData); - -@interface PPOTConfiguration () -@property (nonatomic, strong, readwrite) NSDate *downloadTime; -@end - -@implementation PPOTConfiguration - -#pragma mark - debug-only stuff - -#if DEBUG -static BOOL alwaysUseHardcodedConfiguration = NO; - -+ (void)useHardcodedConfiguration:(BOOL)useHardcodedConfiguration { - alwaysUseHardcodedConfiguration = useHardcodedConfiguration; -} -#endif - -#pragma mark - public methods - -+ (void)updateCacheAsNecessary { - // If there is no persisted configuration, or if it's stale, - // then download a fresh configuration file and persist it. - - static int nobodyIsWorkingOnThisAtTheMoment = 1; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (OSAtomicCompareAndSwapInt(1, 0, &nobodyIsWorkingOnThisAtTheMoment)) { - - PPOTConfiguration *currentConfiguration = [PPOTConfiguration fetchPersistentConfiguration]; - - if (!currentConfiguration || fabs([currentConfiguration.downloadTime timeIntervalSinceNow]) > kPPOTConfigurationFileMaximumAcceptableObsolescence) { - - static NSDate *lastConfigurationFileDownloadAttemptTime = nil; - - if (!lastConfigurationFileDownloadAttemptTime || - fabs([lastConfigurationFileDownloadAttemptTime timeIntervalSinceNow]) > kConfigurationFileDownloadRetryInterval) { - lastConfigurationFileDownloadAttemptTime = [NSDate date]; - - NSURL *url = [NSURL URLWithString:kConfigurationFileDownloadURL]; - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; - [request setHTTPMethod:@"GET"]; - - // TODO: Can simplify by not specifying timeout interval. This might be better anyway to not specify because of slow networks. - PPOTURLSession *session = [PPOTURLSession sessionWithTimeoutIntervalForRequest:kConfigurationFileDownloadTimeout]; - [session sendRequest:request - completionBlock:^(NSData *data, __attribute__((unused)) NSHTTPURLResponse *response, __attribute__((unused)) NSError *error) { -#if DEBUG - NSString *dataString = nil; - if (data) { - dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - } - else { - dataString = @""; - } - [[BTLogger sharedLogger] debug:@"Downloaded JSON config\n-> HTTP status: %ld\n-> file contents:\n%@\n", (long)response.statusCode, dataString]; -#endif - PPOTConfiguration *configuration = data ? [[PPOTConfiguration alloc] initWithJSON:data] : nil; - if (configuration) { - configuration.downloadTime = [NSDate date]; - [PPOTConfiguration storePersistentConfiguration:configuration]; - } - [session finishTasksAndInvalidate]; - }]; - } - } - - nobodyIsWorkingOnThisAtTheMoment = 1; - } -#pragma clang diagnostic pop -} - -+ (PPOTConfiguration *)getCurrentConfiguration { -#if DEBUG - if (alwaysUseHardcodedConfiguration) { - return [self defaultConfiguration]; - } -#endif - - PPOTConfiguration *currentConfiguration = [PPOTConfiguration fetchPersistentConfiguration]; - - if (!currentConfiguration) { - currentConfiguration = [self defaultConfiguration]; - } - - return currentConfiguration; -} - -+ (PPOTConfiguration *)configurationWithDictionary:(NSDictionary *)dictionary { - return [[PPOTConfiguration alloc] initWithDictionary:dictionary]; -} - -#pragma mark - private methods - -+ (void)initialize { -#if DEBUG - NSAssert([PPOTConfiguration defaultConfiguration] != nil, @"otc-config.ios.json is invalid"); -#endif - if (self == [PPOTConfiguration class]) { - [self updateCacheAsNecessary]; - } -} - -+ (PPOTConfiguration *)defaultConfiguration { - NSData *defaultConfigurationJSON = [NSData dataWithBytes:configuration_otc_config_ios_json - length:configuration_otc_config_ios_json_len]; -#if DEBUG - NSString *str = [[NSString alloc] initWithData:defaultConfigurationJSON encoding:NSUTF8StringEncoding]; - [[BTLogger sharedLogger] debug:@"Using default JSON config %@\n", str]; -#endif - - PPOTConfiguration *defaultConfiguration = [[PPOTConfiguration alloc] initWithJSON:defaultConfigurationJSON]; - - return defaultConfiguration; -} - -- (instancetype)initWithDictionary:(NSDictionary *)dictionary { - STRING_FROM_DICTIONARY(os, dictionary, kPPOTConfigurationKeyOs) - - if (![os isEqualToString:@"iOS"]) { - LOG_ERROR_AND_RETURN_NIL - } - - STRING_FROM_DICTIONARY(fileTimestamp, dictionary, kPPOTConfigurationKeyFileTimestamp) - - // Currently we only support config file format 1.0. - // If we ever need to update the file format, then the code here would presumably - // first look for sub-dictionary "2.0" (or whatever) and then fallback to "1.0" as needed. - DICTIONARY_FROM_DICTIONARY(subDictionary, dictionary, @"1.0", YES) - - DICTIONARY_ARRAY_FROM_DICTIONARY(prioritizedOAuthRecipesDictionaries, subDictionary, kPPOTConfigurationKeyOAuthRecipes, NO) - DICTIONARY_ARRAY_FROM_DICTIONARY(prioritizedCheckoutRecipesDictionaries, subDictionary, kPPOTConfigurationKeyCheckoutRecipes, NO) - DICTIONARY_ARRAY_FROM_DICTIONARY(prioritizedBillingAgreementRecipesDictionaries, subDictionary, kPPOTConfigurationKeyBillingAgreementRecipes, NO) - - if ((self = [super init])) { - _downloadTime = [NSDate dateWithTimeIntervalSince1970:0]; // by default, mark file as obsolete - _fileTimestamp = fileTimestamp; - - _prioritizedOAuthRecipes = [self prioritizedRecipesFromArray:prioritizedOAuthRecipesDictionaries withRecipeAdapter:^PPOTConfigurationRecipe *(NSDictionary *recipeDictionary) { - return [[PPOTConfigurationOAuthRecipe alloc] initWithDictionary:recipeDictionary]; - }]; - - _prioritizedCheckoutRecipes = [self prioritizedRecipesFromArray:prioritizedCheckoutRecipesDictionaries withRecipeAdapter:^PPOTConfigurationRecipe* (NSDictionary* recipeDictionary) { - return [[PPOTConfigurationCheckoutRecipe alloc] initWithDictionary:recipeDictionary]; - }]; - - _prioritizedBillingAgreementRecipes = [self prioritizedRecipesFromArray:prioritizedBillingAgreementRecipesDictionaries withRecipeAdapter:^PPOTConfigurationRecipe* (NSDictionary* recipeDictionary) { - return [[PPOTConfigurationBillingAgreementRecipe alloc] initWithDictionary:recipeDictionary]; - }]; - - if (!_prioritizedOAuthRecipes || !_prioritizedCheckoutRecipes || !_prioritizedBillingAgreementRecipes) { - return nil; - } - } - return self; -} - -- (NSArray*)prioritizedRecipesFromArray:(NSArray*)recipes withRecipeAdapter:(PPOTConfigurationRecipe* (^)(NSDictionary*))recipeAdapter { - NSMutableArray *prioritizedRecipes = [NSMutableArray arrayWithCapacity:[recipes count]]; - for (NSDictionary *recipeDictionary in recipes) { - PPOTConfigurationRecipe *recipe = recipeAdapter(recipeDictionary); - if (recipe) { - [prioritizedRecipes addObject:recipe]; - } - } - return prioritizedRecipes; -} - -- (instancetype)initWithJSON:(NSData *)jsonData { - NSError *error = nil; - id jsonObject = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; - if (error || ![jsonObject isKindOfClass:[NSDictionary class]]) { - LOG_ERROR_AND_RETURN_NIL - } - - self = [self initWithDictionary:((NSDictionary *)jsonObject)]; - return self; -} - -#pragma mark - description - -- (NSString *)description { - return [NSString stringWithFormat:@"PPOTConfiguration: %ld Authorization recipes, %ld Checkout recipes, %ld Billing Agreement recipes", - (unsigned long)[self.prioritizedOAuthRecipes count], - (unsigned long)[self.prioritizedCheckoutRecipes count], - (unsigned long)[self.prioritizedBillingAgreementRecipes count]]; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [self init])) { - _downloadTime = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationDownloadTime]; - _fileTimestamp = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationTimestamp]; - _prioritizedOAuthRecipes = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationOAuthRecipes]; - _prioritizedCheckoutRecipes = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationCheckoutRecipes]; - _prioritizedBillingAgreementRecipes = [aDecoder decodeObjectForKey:kPPOTCoderKeyConfigurationBillingAgreementRecipes]; - } - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.downloadTime forKey:kPPOTCoderKeyConfigurationDownloadTime]; - [aCoder encodeObject:self.fileTimestamp forKey:kPPOTCoderKeyConfigurationTimestamp]; - [aCoder encodeObject:self.prioritizedOAuthRecipes forKey:kPPOTCoderKeyConfigurationOAuthRecipes]; - [aCoder encodeObject:self.prioritizedCheckoutRecipes forKey:kPPOTCoderKeyConfigurationCheckoutRecipes]; - [aCoder encodeObject:self.prioritizedBillingAgreementRecipes forKey:kPPOTCoderKeyConfigurationBillingAgreementRecipes]; -} - -#pragma mark - keychain persistence - -+ (PPOTConfiguration *)fetchPersistentConfiguration { - return (PPOTConfiguration *) [PPOTSimpleKeychain unarchiveObjectWithDataForKey:kPPOTKeychainConfiguration]; -} - -+ (void)storePersistentConfiguration:(PPOTConfiguration *)configuration { - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:configuration]; - [PPOTSimpleKeychain setData:data forKey:kPPOTKeychainConfiguration]; -} - -@end - -@implementation PPConfiguration -@end - -@implementation PPConfigurationCheckoutRecipe -@end - -@implementation PPConfigurationBillingAgreementRecipe -@end - -@implementation PPConfigurationOAuthRecipe -@end - -@implementation PPConfigurationRecipeEndpoint -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/otc-config.ios.json b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/otc-config.ios.json deleted file mode 100755 index 26a81651..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Configuration/otc-config.ios.json +++ /dev/null @@ -1,858 +0,0 @@ -{ - "os": "iOS", - "file_timestamp": "2016-01-11T16:42:00Z", - "1.0": { - "oauth2_recipes_in_decreasing_priority_order": [ - { - "target": "wallet", - "protocol": "3", - "supported_locales": [ - "da_DK", - "de_AT", - "de_BE", - "de_CH", - "de_DE", - "de_DK", - "de_LU", - "en_AE", - "en_AR", - "en_AT", - "en_AU", - "en_BE", - "en_BG", - "en_BH", - "en_BR", - "en_CA", - "en_CH", - "en_CN", - "en_CZ", - "en_DE", - "en_DK", - "en_DZ", - "en_EE", - "en_ES", - "en_FI", - "en_FR", - "en_GB", - "en_GR", - "en_HK", - "en_HU", - "en_IE", - "en_IL", - "en_IT", - "en_JO", - "en_JP", - "en_KW", - "en_KZ", - "en_LT", - "en_LU", - "en_LV", - "en_MA", - "en_MX", - "en_MY", - "en_NL", - "en_NO", - "en_NZ", - "en_OM", - "en_PH", - "en_PL", - "en_PT", - "en_QA", - "en_RO", - "en_RU", - "en_SA", - "en_SE", - "en_SG", - "en_SI", - "en_SK", - "en_TN", - "en_TR", - "en_US", - "en_YE", - "es_AE", - "es_AR", - "es_BH", - "es_CZ", - "es_DZ", - "es_EE", - "es_ES", - "es_FI", - "es_GR", - "es_HU", - "es_JO", - "es_KW", - "es_KZ", - "es_LT", - "es_LU", - "es_LV", - "es_MA", - "es_MX", - "es_NZ", - "es_OM", - "es_PT", - "es_QA", - "es_RO", - "es_SA", - "es_SI", - "es_SK", - "es_TN", - "es_US", - "es_YE", - "fr_AE", - "fr_BE", - "fr_BH", - "fr_CA", - "fr_CH", - "fr_CZ", - "fr_DZ", - "fr_EE", - "fr_FI", - "fr_FR", - "fr_GR", - "fr_HU", - "fr_JO", - "fr_KW", - "fr_KZ", - "fr_LT", - "fr_LU", - "fr_LV", - "fr_MA", - "fr_NZ", - "fr_OM", - "fr_PT", - "fr_QA", - "fr_RO", - "fr_SA", - "fr_SI", - "fr_SK", - "fr_TN", - "fr_US", - "fr_YE", - "it_IT", - "iw_IL", - "ja_JP", - "nb_NO", - "nl_BE", - "nl_NL", - "no_NO", - "pl_PL", - "pt_BR", - "pt_PT", - "ru_EE", - "ru_LT", - "ru_LV", - "ru_RU", - "se_SE", - "sv_SE", - "tr_TR", - "zh_AE", - "zh_BH", - "zh_CN", - "zh_CZ", - "zh_DZ", - "zh_EE", - "zh_FI", - "zh_GR", - "zh_HK", - "zh_HU", - "zh_JO", - "zh_KW", - "zh_KZ", - "zh_LT", - "zh_LU", - "zh_LV", - "zh_MA", - "zh_NZ", - "zh_OM", - "zh_PT", - "zh_QA", - "zh_RO", - "zh_SA", - "zh_SI", - "zh_SK", - "zh_TN", - "zh_US", - "zh_YE" - ], - "scope": [ - "https://uri.paypal.com/services/payments/futurepayments", - "email", - "address", - "phone", - "openid" - ], - "scheme": "com.paypal.ppclient.touch.v3", - "applications": [ - "com.paypal.*", - "com.yourcompany.ppclient" - ] - }, - { - "target": "wallet", - "protocol": "2", - "supported_locales": [ - "da_DK", - "de_AT", - "de_BE", - "de_CH", - "de_DE", - "de_DK", - "de_LU", - "en_AE", - "en_AR", - "en_AT", - "en_AU", - "en_BE", - "en_BG", - "en_BH", - "en_BR", - "en_CA", - "en_CH", - "en_CN", - "en_CZ", - "en_DE", - "en_DK", - "en_DZ", - "en_EE", - "en_ES", - "en_FI", - "en_FR", - "en_GB", - "en_GR", - "en_HK", - "en_HU", - "en_IE", - "en_IL", - "en_IT", - "en_JO", - "en_JP", - "en_KW", - "en_KZ", - "en_LT", - "en_LU", - "en_LV", - "en_MA", - "en_MX", - "en_MY", - "en_NL", - "en_NO", - "en_NZ", - "en_OM", - "en_PH", - "en_PL", - "en_PT", - "en_QA", - "en_RO", - "en_RU", - "en_SA", - "en_SE", - "en_SG", - "en_SI", - "en_SK", - "en_TN", - "en_TR", - "en_US", - "en_YE", - "es_AE", - "es_AR", - "es_BH", - "es_CZ", - "es_DZ", - "es_EE", - "es_ES", - "es_FI", - "es_GR", - "es_HU", - "es_JO", - "es_KW", - "es_KZ", - "es_LT", - "es_LU", - "es_LV", - "es_MA", - "es_MX", - "es_NZ", - "es_OM", - "es_PT", - "es_QA", - "es_RO", - "es_SA", - "es_SI", - "es_SK", - "es_TN", - "es_US", - "es_YE", - "fr_AE", - "fr_BE", - "fr_BH", - "fr_CA", - "fr_CH", - "fr_CZ", - "fr_DZ", - "fr_EE", - "fr_FI", - "fr_FR", - "fr_GR", - "fr_HU", - "fr_JO", - "fr_KW", - "fr_KZ", - "fr_LT", - "fr_LU", - "fr_LV", - "fr_MA", - "fr_NZ", - "fr_OM", - "fr_PT", - "fr_QA", - "fr_RO", - "fr_SA", - "fr_SI", - "fr_SK", - "fr_TN", - "fr_US", - "fr_YE", - "it_IT", - "iw_IL", - "ja_JP", - "nb_NO", - "nl_BE", - "nl_NL", - "no_NO", - "pl_PL", - "pt_BR", - "pt_PT", - "ru_EE", - "ru_LT", - "ru_LV", - "ru_RU", - "se_SE", - "sv_SE", - "tr_TR", - "zh_AE", - "zh_BH", - "zh_CN", - "zh_CZ", - "zh_DZ", - "zh_EE", - "zh_FI", - "zh_GR", - "zh_HK", - "zh_HU", - "zh_JO", - "zh_KW", - "zh_KZ", - "zh_LT", - "zh_LU", - "zh_LV", - "zh_MA", - "zh_NZ", - "zh_OM", - "zh_PT", - "zh_QA", - "zh_RO", - "zh_SA", - "zh_SI", - "zh_SK", - "zh_TN", - "zh_US", - "zh_YE" - ], - "scope": [ - "https://uri.paypal.com/services/payments/futurepayments", - "email", - "address", - "phone", - "openid" - ], - "scheme": "com.paypal.ppclient.touch.v2", - "applications": [ - "com.paypal.*", - "com.yourcompany.ppclient" - ] - }, - { - "target": "wallet", - "protocol": "1", - "supported_locales": [ - "da_DK", - "de_AT", - "de_BE", - "de_CH", - "de_DE", - "de_DK", - "de_LU", - "en_AR", - "en_AT", - "en_AU", - "en_BE", - "en_BR", - "en_CA", - "en_CH", - "en_CN", - "en_DE", - "en_DK", - "en_ES", - "en_FI", - "en_FR", - "en_GB", - "en_HK", - "en_IE", - "en_IT", - "en_JP", - "en_LU", - "en_MX", - "en_NL", - "en_NO", - "en_PL", - "en_PT", - "en_RU", - "en_SE", - "en_SG", - "en_TR", - "en_US", - "es_AR", - "es_ES", - "es_FI", - "es_LU", - "es_MX", - "es_PT", - "es_US", - "fr_BE", - "fr_CA", - "fr_CH", - "fr_FI", - "fr_FR", - "fr_LU", - "fr_PT", - "fr_US", - "it_IT", - "ja_JP", - "nb_NO", - "nl_BE", - "nl_NL", - "no_NO", - "pl_PL", - "pt_BR", - "pt_PT", - "ru_RU", - "se_SE", - "sv_SE", - "tr_TR", - "zh_CN", - "zh_FI", - "zh_HK", - "zh_LU", - "zh_PT", - "zh_US" - ], - "scope": [ - "https://uri.paypal.com/services/payments/futurepayments", - "email", - "address", - "phone", - "openid" - ], - "scheme": "com.paypal.ppclient.touch.v1", - "applications": [ - "com.paypal.*", - "com.yourcompany.ppclient" - ] - }, - { - "target": "browser", - "protocol": "3", - "scope": [ - "https://uri.paypal.com/services/payments/futurepayments", - "email", - "address", - "phone", - "openid" - ], - "endpoints": { - "live": { - "url": "https://checkout.paypal.com/one-touch-login/", - "certificate_serial_number": "0081EDF546CBF62DE2", - "certificate": "MIIDzzCCAregAwIBAgIJAIHt9UbL9i3iMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhTYW4gSm9zZTEPMA0GA1UECgwGUGF5UGFsMRIwEAYDVQQLDAlCcmFpbnRyZWUxIjAgBgNVBAMMGVByb2R1Y3Rpb24gQnJvd3NlciBTd2l0Y2gwHhcNMTUwNDExMTc1MDI5WhcNMTcwNDEwMTc1MDI5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIU2FuIEpvc2UxDzANBgNVBAoMBlBheVBhbDESMBAGA1UECwwJQnJhaW50cmVlMSIwIAYDVQQDDBlQcm9kdWN0aW9uIEJyb3dzZXIgU3dpdGNoMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt+Cc6GB3QDFCheiVoLlCY2FURFH0IjJfxsR8l5IKYVMf+GjbANvS/HtUYip4rfSjG4XlITpPkwO1cF/xaBwT3UBY9vviQlVMboVftlgxZ/iUjAlxKf28BE96bS53tObfTuHnrb+kneYQIZqWCg48mZSc5mR2gqhbs35GC4udH0EEoNIHFSvAcesUpQzR3MUU7PWRboClOvwEWvnbhmDHlB4oYaIrWxP+uTATv6cWferku77RtQJIobfSQvRVRCDqlAjbI/c7g06Fzje3P91zmWjNbKki0mu0hGFSkGLmzhL1Z0Fc83gxFB6YhTQOdc3fWabyKKD9z6rZcOLSW4w7UwIDAQABo1AwTjAdBgNVHQ4EFgQUfIDSwnyOKIDUJFAYuA0QQmeSt+gwHwYDVR0jBBgwFoAUfIDSwnyOKIDUJFAYuA0QQmeSt+gwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAKUw9L1PWBBD/tHDSatnWp6UNn7RtsMu+bJm5bj01pC7jX5gKm75wUKODrUnGAszRoRujsyJJrGKzbdShLlI5HLVh9cR1tpr3s/9W6DBkANPh0ClwH7t35dt0CwYH8acz7fqRfTjJfTccjnfPB5EFcpKIPv3ld8LbR/YlCWbrfUrzQM/K1FdZaK7elH/drRs+DEBFLp3Kqw3bWt4z06AV1rQVmY2yakaFippbrsrdwIL6uOqO+SfRUbMZg14Kk8WvaBgm4l6aV6dslnybfoJksnsBsmEie9nmTPiU9Z+cPuN/unjMBp4PnCTBKpc9l+PJqGq8HFnBlDBKw/NI8EepsQ==" - }, - "mock": { - "url": "https://checkout.paypal.com/one-touch-login/", - "certificate_serial_number": "00C496E1AAA439A4BC", - "certificate": "MIIDoTCCAomgAwIBAgIJAMSW4aqkOaS8MA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhJbGxpbm9pczEQMA4GA1UEBwwHQ2hpY2FnbzESMBAGA1UECgwJQnJhaW50cmVlMR8wHQYDVQQLDBZTYW5kYm94IEJyb3dzZXIgU3dpdGNoMB4XDTE1MDQxMDE4MTMxOVoXDTIwMDQxMzE4MTMxOVowZzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRAwDgYDVQQHDAdDaGljYWdvMRIwEAYDVQQKDAlCcmFpbnRyZWUxHzAdBgNVBAsMFlNhbmRib3ggQnJvd3NlciBTd2l0Y2gwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVjnC47BuUm0PKi5sUSi02wGL8zqVjRrdtt4YDyPQdELlitfv431Y7HpT6z/Xusu9/2mjlcvykGO1+okm6VDiNIaHMeez7Vv3To7J3ZCNR/WZDFyzbY7lniwISSoLMh7MF6fsOKYvc3nARez0Qs1Jp+fX+0DKCH926q4Z3OWYq3NHPrAy8E2QMzcG68XJeZGYEfVuu7SadHHkpvvSN2KSH5dNHxCknm1KpW4IoGguXepUlldmf1KorRX0DOQq/750XOP0rvh+xDH7EZSLgcCi810otzP4cPg/M5Fyj6lPAj4TZArFvqUOKnAvtri9LEAUP+/laB2mdL668au9kSV7hAgMBAAGjUDBOMB0GA1UdDgQWBBS1K42BCIULZ/QFkJQlj+Mnc7aG6jAfBgNVHSMEGDAWgBS1K42BCIULZ/QFkJQlj+Mnc7aG6jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBEduExXbyMtcmk6noLdoJdFtmcLPzCOmR1k1hGUDh41QWJgFcuZlM25F/qVKXSzLBRoc1ssEeUZl1AGyhOO49b/MfEPo/yVwcz254o9Pm4E9CvdqdO8mPpCrE/Pjr+7TNKyMVsktoN3B5V5K14+GQVOiSHgesEQaYq9cyxUclMs1QzyNHSe3gDN41FFDXiE7kj1h8oo4MhH7wcVv+9olOWEtawGVxSi/U9KVTmN5ShDJgTwuM74aSnRwwEj2bXEaDMbUXYXD/p4SPBq2a3ecvelzsYpWdwyF7iXoWCrPVLM46D8M4PeenTzq6efnX4mzgS/fOqI9grjS2R8btw9Idz" - }, - "develop": { - "url": "https://assets.staging.braintreepayments.com/one-touch-login/", - "certificate_serial_number": "00C96F092E14B51ECF", - "certificate": "MIIDOzCCAiOgAwIBAgIJAMlvCS4UtR7PMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhJbGxpbm9pczESMBAGA1UECgwJQnJhaW50cmVlMB4XDTE1MDMyMDAxMTcyMVoXDTE2MDMxOTAxMTcyMVowNDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRIwEAYDVQQKDAlCcmFpbnRyZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDfCRhOGeMj4ci5Bbbs/x0G+PkbeL7iGEsX5UWQeA8oCWU8jpipFTC271Q0f5BQzXCN8L4LnwGvtm2cgAEivSBODo7XHsmxrFjKdQx1S7FIuFRKO18Uf8rIGmZHiJfhCbUEGilpwMt7hUMjjv2XDufPCMrJ8Yn2y/yDi5nhs7UsFhROm9oI2PyiJX01yR2ag8cPBb5Ahlwmj1yMWmSuHVnUN8T0rjIXyrBhxTAk3omQkQdHKj2w8afdrAcNUGi4yU/a5/pmb8tZpAa73OZVdOEQepJAAIRWXeS2BdKTkhfRJc7WEIlbi+9a2OdtM3OkIs+rZE7+WVT8XQoiLxpUd/wNAgMBAAGjUDBOMB0GA1UdDgQWBBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAfBgNVHSMEGDAWgBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQARg2wjhJanhKu1bw63+Xfj25OUa02jK+i4vhkWeuCGd5/kxA1dZMjBfSMxh484xBpaqRIOHvZmRpKcxCgci8xRbbJiaXrb1vIePTTi4lfU6cpfsnjMFCHDk8E/0AxIfOpQ0BSJY35WqB45xaIWBAY8lQ2pNfiPyK4kzajSOg+kbEKLmA0udYy8tsydt+88+R88rYKt4qDBo+Z5zgJ2fZvbAp99cBASHqMCoUoPb96YWEhaWhjArVGzgevpopKA9aOAFdndPKLbe6y29bbfLfQqat0B1fVmutCIHGIXtsPHQDe/cXJtoJk7HmD08++C9YvjxlSi8jxLb5nIA0QGI0yj" - } - } - } - ], - "checkout_recipes_in_decreasing_priority_order": [ - { - "target": "wallet", - "protocol": "3", - "supported_locales": [ - "da_DK", - "de_AT", - "de_BE", - "de_CH", - "de_DE", - "de_DK", - "de_LU", - "en_AE", - "en_AR", - "en_AT", - "en_AU", - "en_BE", - "en_BG", - "en_BH", - "en_BR", - "en_CA", - "en_CH", - "en_CN", - "en_CZ", - "en_DE", - "en_DK", - "en_DZ", - "en_EE", - "en_ES", - "en_FI", - "en_FR", - "en_GB", - "en_GR", - "en_HK", - "en_HU", - "en_IE", - "en_IL", - "en_IT", - "en_JO", - "en_JP", - "en_KW", - "en_KZ", - "en_LT", - "en_LU", - "en_LV", - "en_MA", - "en_MX", - "en_MY", - "en_NL", - "en_NO", - "en_NZ", - "en_OM", - "en_PH", - "en_PL", - "en_PT", - "en_QA", - "en_RO", - "en_RU", - "en_SA", - "en_SE", - "en_SG", - "en_SI", - "en_SK", - "en_TN", - "en_TR", - "en_US", - "en_YE", - "es_AE", - "es_AR", - "es_BH", - "es_CZ", - "es_DZ", - "es_EE", - "es_ES", - "es_FI", - "es_GR", - "es_HU", - "es_JO", - "es_KW", - "es_KZ", - "es_LT", - "es_LU", - "es_LV", - "es_MA", - "es_MX", - "es_NZ", - "es_OM", - "es_PT", - "es_QA", - "es_RO", - "es_SA", - "es_SI", - "es_SK", - "es_TN", - "es_US", - "es_YE", - "fr_AE", - "fr_BE", - "fr_BH", - "fr_CA", - "fr_CH", - "fr_CZ", - "fr_DZ", - "fr_EE", - "fr_FI", - "fr_FR", - "fr_GR", - "fr_HU", - "fr_JO", - "fr_KW", - "fr_KZ", - "fr_LT", - "fr_LU", - "fr_LV", - "fr_MA", - "fr_NZ", - "fr_OM", - "fr_PT", - "fr_QA", - "fr_RO", - "fr_SA", - "fr_SI", - "fr_SK", - "fr_TN", - "fr_US", - "fr_YE", - "it_IT", - "iw_IL", - "ja_JP", - "nb_NO", - "nl_BE", - "nl_NL", - "no_NO", - "pl_PL", - "pt_BR", - "pt_PT", - "ru_EE", - "ru_LT", - "ru_LV", - "ru_RU", - "se_SE", - "sv_SE", - "tr_TR", - "zh_AE", - "zh_BH", - "zh_CN", - "zh_CZ", - "zh_DZ", - "zh_EE", - "zh_FI", - "zh_GR", - "zh_HK", - "zh_HU", - "zh_JO", - "zh_KW", - "zh_KZ", - "zh_LT", - "zh_LU", - "zh_LV", - "zh_MA", - "zh_NZ", - "zh_OM", - "zh_PT", - "zh_QA", - "zh_RO", - "zh_SA", - "zh_SI", - "zh_SK", - "zh_TN", - "zh_US", - "zh_YE" - ], - "scheme": "com.paypal.ppclient.touch.v3", - "applications": [ - "com.paypal.*", - "com.yourcompany.ppclient" - ] - }, - { - "target": "wallet", - "protocol": "2", - "supported_locales": [ - "da_DK", - "de_AT", - "de_BE", - "de_CH", - "de_DE", - "de_DK", - "de_LU", - "en_AE", - "en_AR", - "en_AT", - "en_AU", - "en_BE", - "en_BG", - "en_BH", - "en_BR", - "en_CA", - "en_CH", - "en_CN", - "en_CZ", - "en_DE", - "en_DK", - "en_DZ", - "en_EE", - "en_ES", - "en_FI", - "en_FR", - "en_GB", - "en_GR", - "en_HK", - "en_HU", - "en_IE", - "en_IL", - "en_IT", - "en_JO", - "en_JP", - "en_KW", - "en_KZ", - "en_LT", - "en_LU", - "en_LV", - "en_MA", - "en_MX", - "en_MY", - "en_NL", - "en_NO", - "en_NZ", - "en_OM", - "en_PH", - "en_PL", - "en_PT", - "en_QA", - "en_RO", - "en_RU", - "en_SA", - "en_SE", - "en_SG", - "en_SI", - "en_SK", - "en_TN", - "en_TR", - "en_US", - "en_YE", - "es_AE", - "es_AR", - "es_BH", - "es_CZ", - "es_DZ", - "es_EE", - "es_ES", - "es_FI", - "es_GR", - "es_HU", - "es_JO", - "es_KW", - "es_KZ", - "es_LT", - "es_LU", - "es_LV", - "es_MA", - "es_MX", - "es_NZ", - "es_OM", - "es_PT", - "es_QA", - "es_RO", - "es_SA", - "es_SI", - "es_SK", - "es_TN", - "es_US", - "es_YE", - "fr_AE", - "fr_BE", - "fr_BH", - "fr_CA", - "fr_CH", - "fr_CZ", - "fr_DZ", - "fr_EE", - "fr_FI", - "fr_FR", - "fr_GR", - "fr_HU", - "fr_JO", - "fr_KW", - "fr_KZ", - "fr_LT", - "fr_LU", - "fr_LV", - "fr_MA", - "fr_NZ", - "fr_OM", - "fr_PT", - "fr_QA", - "fr_RO", - "fr_SA", - "fr_SI", - "fr_SK", - "fr_TN", - "fr_US", - "fr_YE", - "it_IT", - "iw_IL", - "ja_JP", - "nb_NO", - "nl_BE", - "nl_NL", - "no_NO", - "pl_PL", - "pt_BR", - "pt_PT", - "ru_EE", - "ru_LT", - "ru_LV", - "ru_RU", - "se_SE", - "sv_SE", - "tr_TR", - "zh_AE", - "zh_BH", - "zh_CN", - "zh_CZ", - "zh_DZ", - "zh_EE", - "zh_FI", - "zh_GR", - "zh_HK", - "zh_HU", - "zh_JO", - "zh_KW", - "zh_KZ", - "zh_LT", - "zh_LU", - "zh_LV", - "zh_MA", - "zh_NZ", - "zh_OM", - "zh_PT", - "zh_QA", - "zh_RO", - "zh_SA", - "zh_SI", - "zh_SK", - "zh_TN", - "zh_US", - "zh_YE" - ], - "scheme": "com.paypal.ppclient.touch.v2", - "applications": [ - "com.paypal.*", - "com.yourcompany.ppclient" - ] - }, - { - "target": "browser", - "protocol": "0" - } - ], - "billing_agreement_recipes_in_decreasing_priority_order": [ - { - "target": "browser", - "protocol": "0" - } - ] - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Info.plist b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Info.plist deleted file mode 100755 index d3de8eef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.h deleted file mode 100755 index 214c4c09..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.h +++ /dev/null @@ -1,73 +0,0 @@ -// -// PPOTAppSwitchResponse.h -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTAppSwitchUtil.h" - -@class PPOTConfigurationRecipe; - -@interface PPOTAppSwitchResponse : NSObject - -/*! - @brief info from the most recent request -*/ -@property (nonatomic, readonly) NSString *encryptionKey; - -@property (nonatomic, readonly) PPAppSwitchResponseAction action; - -/*! - @brief represents payment_code_type for version 3 for now -*/ -@property (nonatomic, readonly) PPAppSwitchResponseType responseType; - -@property (nonatomic, readonly) NSInteger version; -@property (nonatomic, readonly) NSString *displayName; -@property (nonatomic, readonly) NSString *email; -@property (nonatomic, readonly) NSString *accessToken; -/*! - @brief represents payment_code in version 3 for now -*/ -@property (nonatomic, readonly) NSString *authorizationCode; -@property (nonatomic, readonly) NSInteger expiresIn; -@property (nonatomic, readonly) NSArray *scope; -/*! - @brief not sent yet -*/ -@property (nonatomic, readonly) NSString *photoURL; - -@property (nonatomic, readonly) NSDictionary *decodedPayload; -/*! - @brief can contain debug_id and message -*/ -@property (nonatomic, readonly) NSDictionary *error; -@property (nonatomic, readonly) NSString *environment; - -/*! - @brief version 0 and 2 -*/ -@property (nonatomic, readonly) NSString *webURL; - -/*! - @brief version 3 -*/ -@property (nonatomic, readonly) NSDate *timeStamp; -@property (nonatomic, readonly) NSString *msgID; - -/*! - @brief version 0 -*/ -- (instancetype)initWithHermesURL:(NSURL *)url environment:(NSString *)environment; - -/*! - @brief version 1, 2, 3 -*/ -- (instancetype)initWithEncodedURL:(NSURL *)url encryptionKey:(NSString *)encryptionKey; - -- (BOOL)validResponse; - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.m deleted file mode 100755 index 264be349..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchResponse.m +++ /dev/null @@ -1,218 +0,0 @@ -// -// PPOTAppSwitchResponse.m -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import "PPOTAppSwitchResponse.h" -#import "PPOTString.h" -#import "PPOTTime.h" -#import "PPOTEncryptionHelper.h" -#import "PPOTJSONHelper.h" - -@implementation PPOTAppSwitchResponse - -- (instancetype)initWithEncodedURL:(NSURL *)url encryptionKey:(NSString *)encryptionKey { - if (!url) { - return nil; - } - self = [self initWithURL:url]; - if (self) { - _encryptionKey = encryptionKey; - - // convert query string to dictionary, handles URLEncoding - NSDictionary *query = [PPOTAppSwitchUtil parseQueryString:[url query]]; - - - // base64 encoded payload - NSString *encodedPayload = [PPOTJSONHelper stringFromDictionary:query withKey:kPPOTAppSwitchPayloadKey]; - if (encodedPayload.length) { - // parse payload - _decodedPayload = [PPOTJSONHelper dictionaryWithBase64EncodedJSONString:encodedPayload]; - } - - if (_encryptionKey.length) { - // base64 encoded encrypted payload - NSString *encodedEncryptedPayload = [PPOTJSONHelper stringFromDictionary:query withKey:kPPOTAppSwitchEncryptedPayloadKey]; - if (encodedEncryptedPayload.length) { - // parse encrypted payload - NSData *encryptedData = [[NSData alloc] initWithBase64EncodedString:encodedEncryptedPayload - options:NSDataBase64DecodingIgnoreUnknownCharacters]; - [self parseEncryptedPayload:encryptedData]; - } - } - - [self parsePayload]; - } - return self; -} - -- (instancetype)initWithHermesURL:(NSURL *)url environment:(NSString *)environment { - if (!url) { - return nil; - } - self = [self initWithURL:url]; - if (self) { - // TODO: add error parsing since hermes may pass a error or abroted flag. - _responseType = PPAppSwitchResponseTypeWeb; - _webURL = [url absoluteString]; - _environment = environment; - } - return self; -} - -- (instancetype)initWithURL:(NSURL *)url { - self = [self init]; - if (self) { - // extract action from URL - if ([[PPOTAppSwitchUtil actionFromURLAction:url] isEqualToString:kPPOTAppSwitchCancelAction]) { - _action = PPAppSwitchResponseActionCancel; - } else if ([[PPOTAppSwitchUtil actionFromURLAction:url] isEqualToString:kPPOTAppSwitchSuccessAction]) { - _action = PPAppSwitchResponseActionSuccess; - } else { - _action = PPAppSwitchResponseActionUnknown; - } - } - return self; -} - -- (void)parsePayload { - - NSNumber *version = [PPOTJSONHelper numberFromDictionary:_decodedPayload withKey:kPPOTAppSwitchProtocolVersionKey]; - // Wallet not always sends version, default to 1 - _version = version ? [version integerValue] : 1; - - // in version 3+ the response_type is no longer sent - NSString *responseType = nil; - if (_version >= 3) { - responseType = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchPaymentCodeTypeKey]; - if (responseType == nil) { - responseType = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchResponseTypeKey]; - } - } else { - responseType = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchResponseTypeKey]; - } - - if ([responseType isEqualToString:kPPOTAppSwitchResponseTypeCode] || [responseType isEqualToString:kPPOTAppSwitchResposneAuthCodeKey]) { - _responseType = PPAppSwitchResponseTypeAuthorizationCode; - } else if ([responseType isEqualToString:kPPOTAppSwitchResponseTypeToken]) { - _responseType = PPAppSwitchResponseTypeToken; - } else if ([responseType isEqualToString:kPPOTAppSwitchResponseTypeWeb]) { - _responseType = PPAppSwitchResponseTypeWeb; - } else { - _responseType = PPAppSwitchResponseTypeUnknown; - } - - _displayName = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchDisplayNameKey]; - _email = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchEmailKey]; - // TODO: remove check until we fix with BT - if (!_email.length) { - _email = [_displayName copy]; - } - _accessToken = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchAccessTokenKey]; - - if (_version >= 3) { - _authorizationCode = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchPaymentCodeKey];; - if (![_authorizationCode length]) { - _authorizationCode = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchAuthorizationCodeKey]; - } - } else { - _authorizationCode = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchAuthorizationCodeKey]; - } - - NSNumber *expiresIn = [PPOTJSONHelper numberFromDictionary:_decodedPayload withKey:kPPOTAppSwitchExpiresInKey]; - if (expiresIn) { - _expiresIn = [expiresIn integerValue]; - } - - NSString *scope = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchScopesKey]; - if (scope.length) { - _scope = [scope componentsSeparatedByString:@" "]; - } - - _photoURL = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchPhotoURLKey]; - - _webURL = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchWebURLKey]; - - // The decoded payload may have been JSON decoded where the error value is already a dictionary - NSDictionary *errorDict = [PPOTJSONHelper dictionaryFromDictionary:_decodedPayload withKey:kPPOTAppSwitchErrorKey]; - if (errorDict) { - _error = errorDict; - } else { - NSString *error = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchErrorKey]; - if (error.length) { - _error = [NSJSONSerialization JSONObjectWithData:[error dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil]; - } - } - - NSString *environment = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchEnvironmentKey]; - if (environment.length) { - _environment = [environment lowercaseString]; - } - - // TODO: BT not sending at a string and in weird format - NSString *strTimetamp = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchTimestampKey]; - if (strTimetamp) { - _timeStamp = [PPOTTime dateFromRFC3339LikeString:strTimetamp]; - } else { - NSNumber *timestamp = [PPOTJSONHelper numberFromDictionary:_decodedPayload withKey:kPPOTAppSwitchTimestampKey]; - if (timestamp) { - _timeStamp = [NSDate dateWithTimeIntervalSince1970:[timestamp doubleValue]]; - } - } - - _msgID = [PPOTJSONHelper stringFromDictionary:_decodedPayload withKey:kPPOTAppSwitchMsgGUIDKey]; -} - -- (void)parseEncryptedPayload:(NSData *)encryptedPayload { - NSData *encryptionKey = [PPOTString dataWithHexString:_encryptionKey]; - NSData *decryptedPayload = [PPOTEncryptionHelper decryptAESCTRData:encryptedPayload encryptionKey:encryptionKey]; - if (decryptedPayload.length && encryptionKey.length) { - NSDictionary *jsonDictionary = [NSJSONSerialization JSONObjectWithData:decryptedPayload options:0 error:nil]; - if (jsonDictionary) { - // merge with existing payload - NSMutableDictionary *mergedDictionary = [NSMutableDictionary dictionaryWithCapacity:_decodedPayload.count + jsonDictionary.count]; - [mergedDictionary addEntriesFromDictionary:_decodedPayload]; - [mergedDictionary addEntriesFromDictionary:jsonDictionary]; - _decodedPayload = mergedDictionary; - } - } -} - -- (BOOL)validResponse { - if (self.action == PPAppSwitchResponseActionCancel) { - return YES; - } - - if (self.responseType == PPAppSwitchResponseTypeUnknown - || self.action == PPAppSwitchResponseActionUnknown - || (self.version < 0 || self.version > kPPOTAppSwitchCurrentVersionNumber) - ) { - return NO; - } - - // TOKEN not supported - - if (self.responseType == PPAppSwitchResponseTypeAuthorizationCode) { - if (!self.authorizationCode.length - || !self.email.length - || !self.displayName.length) { - return NO; - } - } - - if (self.responseType == PPAppSwitchResponseTypeWeb) { - if (!self.webURL.length) { - return NO; - } - } - - return YES; -} - -- (NSString *)description { - return [_decodedPayload description]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.h deleted file mode 100755 index eb95f02c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.h +++ /dev/null @@ -1,107 +0,0 @@ -// -// PPOTAppSwitchUtil.h -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import - -@class PPOTConfigurationRecipe; - -#define kPPOTAppSwitchCurrentVersionNumber 3 - -// Dictionary keys for PPTouch v1 protocol -#define kPPOTAppSwitchEnvironmentKey @"environment" -#define kPPOTAppSwitchEnvironmentURLKey @"environment_url" -#define kPPOTAppSwitchCustomEnvironmentKey @"custom" -#define kPPOTAppSwitchAppNameKey @"app_name" -#define kPPOTAppSwitchAppGuidKey @"app_guid" -#define kPPOTAppSwitchResponseTypeKey @"response_type" -#define kPPOTAppSwitchClientIdKey @"client_id" -#define kPPOTAppSwitchPayloadKey @"payload" -#define kPPOTAppSwitchHermesTokenKey @"token" -#define kPPOTAppSwitchHermesBATokenKey @"ba_token" -#define kPPOTAppSwitchXCancelKey @"x-cancel" -#define kPPOTAppSwitchXSuccessKey @"x-success" -#define kPPOTAppSwitchXSourceKey @"x-source" -#define kPPOTAppSwitchAuthenticateAction @"authenticate" -#define kPPOTAppSwitchSuccessAction @"success" -#define kPPOTAppSwitchCancelAction @"cancel" -#define kPPOTAppSwitchResponseTypeCode @"code" -#define kPPOTAppSwitchResponseTypeToken @"token" -#define kPPOTAppSwitchDisplayNameKey @"display_name" -#define kPPOTAppSwitchAccessTokenKey @"access_token" -#define kPPOTAppSwitchAuthorizationCodeKey @"authorization_code" -#define kPPOTAppSwitchExpiresInKey @"expires_in" -#define kPPOTAppSwitchScopesKey @"scope" -#define kPPOTAppSwitchEmailKey @"email" -#define kPPOTAppSwitchPhotoURLKey @"photo_url" -#define kPPOTAppSwitchAccountCountryKey @"account_country" -#define kPPOTAppSwitchLanguageKey @"language" -#define kPPOTAppSwitchProtocolVersionKey @"version" -#define kPPOTAppSwitchPrivacyURLKey @"privacy_url" -#define kPPOTAppSwitchAgreementURLKey @"agreement_url" -#define kPPOTAppSwitchErrorKey @"error" -#define kPPOTAppSwitchMessageKey @"message" - -// v2 extension -#define kPPOTAppSwitchResponseTypeWeb @"web" -#define kPPOTAppSwitchWebURLKey @"webURL" - -// v3 -#define kPPOTAppSwitchMetadataClientIDKey @"client_metadata_id" -#define kPPOTAppSwitchKeyIDKey @"key_id" -#define kPPOTAppSwitchMsgGUIDKey @"msg_GUID" -#define kPPOTAppSwitchSymKey @"sym_key" -#define kPPOTAppSwitchTimestampKey @"timestamp" -#define kPPOTAppSwitchLoginAction @"login" -#define kPPOTAppSwitchEncryptedPayloadKey @"payloadEnc" -#define kPPOTAppSwitchPaymentCodeTypeKey @"payment_code_type" -#define kPPOTAppSwitchPaymentCodeKey @"payment_code" -#define kPPOTAppSwitchResposneAuthCodeKey @"authcode" -#define kPPOTAppSwitchKeyDeviceName @"device_name" - -#define PPRequestEnvironmentProduction @"live" -#define PPRequestEnvironmentNoNetwork @"mock" -#define PPRequestEnvironmentSandbox @"sandbox" - - -typedef NS_ENUM(NSUInteger, PPAppSwitchResponseAction) { - PPAppSwitchResponseActionUnknown, - PPAppSwitchResponseActionCancel, - PPAppSwitchResponseActionSuccess -}; - -typedef NS_ENUM(NSUInteger, PPAppSwitchResponseType) { - PPAppSwitchResponseTypeUnknown, - PPAppSwitchResponseTypeToken, - PPAppSwitchResponseTypeAuthorizationCode, - PPAppSwitchResponseTypeWeb, -}; - -@interface PPOTAppSwitchUtil : NSObject - -+ (NSString *)bundleId; -+ (NSString *)bundleName; -+ (BOOL)isCallbackURLSchemeValid:(NSString *)callbackURLScheme; - -/*! - @brief handles urlencoding -*/ -+ (NSDictionary *)parseQueryString:(NSString *)query; - -+ (NSURL *)URLAction:(NSString *)action - targetAppURLScheme:(NSString *)targetAppURLScheme - callbackURLScheme:(NSString *)callbackURLScheme - payload:(NSDictionary *)payload; - -+ (NSURL *)URLAction:(NSString *)action - callbackURLScheme:(NSString *)callbackURLScheme - payload:(NSDictionary *)payload; - -+ (void)redirectURLsForCallbackURLScheme:(NSString *)callbackURLScheme withReturnURL:(NSString **)returnURL withCancelURL:(NSString **)cancelURL; -+ (BOOL)isValidURLAction:(NSURL *)urlAction; -+ (NSString *)actionFromURLAction:(NSURL *)urlAction; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.m deleted file mode 100755 index dda7b725..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAppSwitchUtil.m +++ /dev/null @@ -1,184 +0,0 @@ -// -// PPOTAppSwitchUtil.m -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// -#import - -#import "PPOTAppSwitchUtil.h" -#import "PPOTConfiguration.h" -#import "PPOTMacros.h" -#import "PPOTAnalyticsTracker.h" -#import "PPOTVersion.h" -#import "PPOTPersistentRequestData.h" -#import "PPOTString.h" -#import "PPOTJSONHelper.h" -#import "PPOTAnalyticsDefines.h" - -#define STR_TO_URL_SCHEME(str) [NSURL URLWithString:[NSString stringWithFormat:@"%@://", str]] - -@implementation PPOTAppSwitchUtil - -+ (NSString *)bundleId { - return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"]; -} - -+ (NSString *)bundleName { - return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; -} - -+ (BOOL)isCallbackURLSchemeValid:(NSString *)callbackURLScheme { - NSString *bundleID = [[self bundleId] lowercaseString]; - - // There are issues returning to the app if the return URL begins with a `-` - // Allow callback URLs that remove the leading `-` - // Ex: An app with Bundle ID `-com.example.myapp` can use the callback URL `com.example.myapp.payments` - if (bundleID.length <= 1) { - return NO; - } else if ([[bundleID substringToIndex:1] isEqualToString:@"-"] && ![[callbackURLScheme lowercaseString] hasPrefix:bundleID]) { - bundleID = [bundleID substringFromIndex:1]; - } - - if (bundleID && ![[callbackURLScheme lowercaseString] hasPrefix:bundleID]) { - PPSDKLog(@"callback URL scheme must start with %@ ", bundleID); - return NO; - } - - // check the actual plist that the app is fully configured rather than just making canOpenURL call - NSArray *urlTypes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - for (NSDictionary *item in urlTypes) { - NSArray *bundleURLSchemes = item[@"CFBundleURLSchemes"]; - if (NSNotFound != [bundleURLSchemes indexOfObject:callbackURLScheme]) { - return YES; - } - } - PPSDKLog(@"callback URL scheme %@ is not found in .plist", callbackURLScheme); - return NO; -} - -+ (NSString *)protocolFromTargetAppURLScheme:(NSString *)targetAppURLScheme { - NSArray *components = [targetAppURLScheme componentsSeparatedByString:@"."]; - return components[[components count] - 1]; -} - -+ (NSDictionary *)parseQueryString:(NSString *)query { - NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:6]; - NSArray *pairs = [query componentsSeparatedByString:@"&"]; - - for (NSString *pair in pairs) { - NSArray *elements = [pair componentsSeparatedByString:@"="]; - if (elements.count > 1) { - NSString *key = [[elements objectAtIndex:0] stringByRemovingPercentEncoding]; - NSString *val = [[elements objectAtIndex:1] stringByRemovingPercentEncoding]; - if (key.length && val.length) { - dict[key] = val; - } - } - } - return dict; -} - -+ (NSURL *)URLAction:(NSString *)action - targetAppURLScheme:(NSString *)targetAppURLScheme - callbackURLScheme:(NSString *)callbackURLScheme - payload:(NSDictionary *)payload { - NSString *successURL; - NSString *cancelURL; - [self redirectURLsForCallbackURLScheme:callbackURLScheme withReturnURL:&successURL withCancelURL:&cancelURL]; - - NSString *encodedPayload = [PPOTString stringByURLEncodingAllCharactersInString:[PPOTJSONHelper base64EncodedJSONStringWithDictionary:payload]]; - NSString* urlString = [NSString stringWithFormat:@"%@://%@?%@=%@&%@=%@&%@=%@&%@=%@", - targetAppURLScheme, action, kPPOTAppSwitchPayloadKey, encodedPayload, - kPPOTAppSwitchXSourceKey, [self bundleId], - kPPOTAppSwitchXSuccessKey, successURL, - kPPOTAppSwitchXCancelKey, cancelURL]; - - return [NSURL URLWithString:urlString]; -} - -+ (NSURL *)URLAction:(NSString *)action - callbackURLScheme:(NSString *)callbackURLScheme - payload:(NSDictionary *)payload { - NSString *successURL; - NSString *cancelURL; - [self redirectURLsForCallbackURLScheme:callbackURLScheme withReturnURL:&successURL withCancelURL:&cancelURL]; - - NSString *encodedPayload = [PPOTString stringByURLEncodingAllCharactersInString:[PPOTJSONHelper base64EncodedJSONStringWithDictionary:payload]]; - NSString* urlString = [NSString stringWithFormat:@"%@?%@=%@&%@=%@&%@=%@&%@=%@", - action, kPPOTAppSwitchPayloadKey, encodedPayload, - kPPOTAppSwitchXSourceKey, [self bundleId], - kPPOTAppSwitchXSuccessKey, successURL, - kPPOTAppSwitchXCancelKey, cancelURL]; - - return [NSURL URLWithString:urlString]; -} - -#pragma mark - build or parse our redirect urls - -+ (void)redirectURLsForCallbackURLScheme:(NSString *)callbackURLScheme withReturnURL:(NSString * __autoreleasing *)returnURL withCancelURL:(NSString * __autoreleasing *)cancelURL { - PPAssert(returnURL, @"redirectURLsForCallbackURLScheme: returnURL is required"); - PPAssert(cancelURL, @"redirectURLsForCallbackURLScheme: cancelURL is required"); - - *returnURL = nil; - *cancelURL = nil; - - if ([PPOTAppSwitchUtil isCallbackURLSchemeValid:callbackURLScheme]) { - NSString *hostAndPath = [self redirectURLHostAndPath]; - *returnURL = [NSString stringWithFormat:@"%@://%@%@", callbackURLScheme, hostAndPath, kPPOTAppSwitchSuccessAction]; - *cancelURL = [NSString stringWithFormat:@"%@://%@%@", callbackURLScheme, hostAndPath, kPPOTAppSwitchCancelAction]; - } -} - -+ (BOOL)isValidURLAction:(NSURL *)urlAction { - NSString *scheme = urlAction.scheme; - if (!scheme.length) { - return NO; - } - - NSString *hostAndPath = [urlAction.host stringByAppendingString:urlAction.path]; - NSMutableArray *pathComponents = [[hostAndPath componentsSeparatedByString:@"/"] mutableCopy]; - [pathComponents removeLastObject]; // remove the action (`success`, `cancel`, etc) - hostAndPath = [pathComponents componentsJoinedByString:@"/"]; - if ([hostAndPath length]) { - hostAndPath = [hostAndPath stringByAppendingString:@"/"]; - } - if (![hostAndPath isEqualToString:[self redirectURLHostAndPath]]) { - return NO; - } - - NSString *action = [self actionFromURLAction:urlAction]; - if (!action.length) { - return NO; - } - - NSArray *validActions = @[kPPOTAppSwitchSuccessAction, kPPOTAppSwitchCancelAction, kPPOTAppSwitchAuthenticateAction]; - if (![validActions containsObject:action]) { - return NO; - } - - NSString *query = [urlAction query]; - if (!query.length) { - // should always have at least a payload or else a Hermes token - return NO; - } - - return YES; -} - -+ (NSString *)actionFromURLAction:(NSURL *)urlAction { - NSString *action = [urlAction.lastPathComponent componentsSeparatedByString:@"?"][0]; - if (![action length]) { - action = urlAction.host; - } - return action; -} - -+ (NSString *)redirectURLHostAndPath { - // Return either an empty string; - // or else a non-empty `host` or `host/path`, ending with `/` - - return @"onetouch/v1/"; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest.m deleted file mode 100755 index cf226cb2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest.m +++ /dev/null @@ -1,180 +0,0 @@ -// -// PPOTAuthorizationRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest_Internal.h" -#import "PPOTAppSwitchUtil.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" -#import "PPOTOAuth2AppSwitchRequest.h" -#import "PPOTOAuth2BrowserSwitchRequest.h" -#import "PPOTEncryptionHelper.h" -#import "PPOTString.h" - -#define PPRequestEnvironmentDevelop @"develop" - -@interface PPOTAuthorizationRequest () - -/// Set of requested scope-values. -/// Available scope-values are listed at https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/attributes/ -@property (nonatomic, readwrite) NSSet *scopeValues; - -/// The URL of the merchant's privacy policy -@property (nonatomic, readwrite) NSURL *privacyURL; - -/// The URL of the merchant's user agreement -@property (nonatomic, readwrite) NSURL *agreementURL; - -@end - -#pragma mark - PPOTAuthorizationRequest implementation - -@implementation PPOTAuthorizationRequest - -- (instancetype)initWithScopeValues:(NSSet *)scopeValues - privacyURL:(NSURL *)privacyURL - agreementURL:(NSURL *)agreementURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - if (scopeValues.count == 0) { - PPSDKLog(@"scope is required."); - return nil; - } - - if (privacyURL == nil) { - PPSDKLog(@"merchantPrivacyPolicyURL is required."); - return nil; - } - if (agreementURL == nil) { - PPSDKLog(@"merchantUserAgreementURL is required."); - return nil; - } - - self = [super initWithClientID:clientID environment:environment callbackURLScheme:callbackURLScheme]; - if (self) { - _scopeValues = scopeValues; - _privacyURL = privacyURL; - _agreementURL = agreementURL; - } - - return self; -} - -+ (instancetype)requestWithScopeValues:(NSSet *)scopeValues - privacyURL:(NSURL *)privacyURL - agreementURL:(NSURL *)agreementURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - PPOTAuthorizationRequest *request = [[PPOTAuthorizationRequest alloc] initWithScopeValues:scopeValues - privacyURL:privacyURL - agreementURL:agreementURL - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; - return request; -} - -#pragma mark - add subclass-specific info to appSwitchRequest - -- (PPOTSwitchRequest *)getAppSwitchRequestForConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe { - - PPOTOAuth2SwitchRequest *appSwitchRequest = nil; - - switch (configurationRecipe.target) { - case PPOTRequestTargetOnDeviceApplication: { - appSwitchRequest = [[PPOTOAuth2AppSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme]; - break; - } - case PPOTRequestTargetBrowser: { - PPOTOAuth2BrowserSwitchRequest *browserSwitchRequest = [[PPOTOAuth2BrowserSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme]; - PPOTConfigurationOAuthRecipe *ooauthRecipe = (PPOTConfigurationOAuthRecipe *)configurationRecipe; - NSString *relevantEnvironment = nil; - if (ooauthRecipe.endpoints[self.environment]) { - relevantEnvironment = self.environment; - } else if (![self.environment isEqualToString:PPRequestEnvironmentProduction] && - ![self.environment isEqualToString:PPRequestEnvironmentNoNetwork] && - ooauthRecipe.endpoints[PPRequestEnvironmentDevelop]) { - relevantEnvironment = PPRequestEnvironmentDevelop; - } else if (ooauthRecipe.endpoints[PPRequestEnvironmentProduction]) { - relevantEnvironment = PPRequestEnvironmentProduction; - } - - if (relevantEnvironment) { // this is merely a sanity check; presence of "live" was guaranteed in [PPOTConfigurationOAuthRecipe initWithDictionary:] - PPOTConfigurationRecipeEndpoint *endpoint = ooauthRecipe.endpoints[relevantEnvironment]; - browserSwitchRequest.endpoint = endpoint.url; - browserSwitchRequest.keyID = endpoint.certificateSerialNumber; - browserSwitchRequest.certificate = [[NSData alloc] initWithBase64EncodedString:endpoint.base64EncodedCertificate - options:NSDataBase64DecodingIgnoreUnknownCharacters]; - - browserSwitchRequest.encryptionKey = [PPOTString hexStringFromData:[PPOTEncryptionHelper generate256BitKey]]; - browserSwitchRequest.additionalPayloadAttributes = self.additionalPayloadAttributes; - appSwitchRequest = browserSwitchRequest; - } - - break; - } - default: { - break; - } - } - - if (appSwitchRequest) { - appSwitchRequest.targetAppURLScheme = configurationRecipe.targetAppURLScheme; - appSwitchRequest.responseType = PPAppSwitchResponseTypeAuthorizationCode; - appSwitchRequest.scope = [self.scopeValues allObjects]; - // mandatory field - appSwitchRequest.merchantName = [PPOTAppSwitchUtil bundleName]; - appSwitchRequest.privacyURL = [self.privacyURL absoluteString]; - appSwitchRequest.agreementURL = [self.agreementURL absoluteString]; - } - - return appSwitchRequest; -} - -#pragma mark - configuration methods - -- (BOOL)scopeIsSupportedByConfigurationRecipe:(PPOTConfigurationOAuthRecipe *)configurationRecipe { - if ([configurationRecipe.scope count] == 1 && [configurationRecipe.scope containsObject:@"*"]) { - return YES; - } - - return ([self.scopeValues isSubsetOfSet:configurationRecipe.scope]); -} - -- (void)getAppropriateConfigurationRecipe:(void (^)(PPOTConfigurationRecipe *configurationRecipe))completionBlock { - PPAssert(completionBlock, @"getAppropriateConfigurationRecipe: completionBlock is required"); - - PPOTConfiguration *currentConfiguration = [PPOTConfiguration getCurrentConfiguration]; - PPOTConfigurationOAuthRecipe *bestConfigurationRecipe = nil; - for (PPOTConfigurationOAuthRecipe *configurationRecipe in currentConfiguration.prioritizedOAuthRecipes) { - if (![self scopeIsSupportedByConfigurationRecipe:configurationRecipe]) { - continue; - } - - if (![self isConfigurationRecipeTargetSupported:configurationRecipe] || - ![self isConfigurationRecipeLocaleSupported:configurationRecipe]) { - continue; - } - - bestConfigurationRecipe = configurationRecipe; - break; - } - - completionBlock(bestConfigurationRecipe); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest_Internal.h deleted file mode 100755 index 65cc69a4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTAuthorizationRequest_Internal.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PPOTAuthorizationRequest_Internal.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest.h" - -@interface PPOTAuthorizationRequest () - -+ (instancetype)requestWithScopeValues:(NSSet *)scopeValues - privacyURL:(NSURL *)privacyURL - agreementURL:(NSURL *)agreementURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTBillingAgreementRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTBillingAgreementRequest.m deleted file mode 100755 index 82ed2ac9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTBillingAgreementRequest.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// PPOTBillingAgreementRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest_Internal.h" -#import "PPOTCheckoutAppSwitchRequest.h" -#import "PPOTCheckoutBrowserSwitchRequest.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" - -#pragma mark - PPOTBillingAgreementRequest implementation - -@implementation PPOTBillingAgreementRequest - -#pragma mark - add subclass-specific info to appSwitchRequest - -- (PPOTSwitchRequest *)getAppSwitchRequestForConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe { - - PPOTCheckoutSwitchRequest *appSwitchRequest = nil; - - switch (configurationRecipe.target) { - case PPOTRequestTargetOnDeviceApplication: { - appSwitchRequest = [[PPOTCheckoutAppSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme - pairingId:self.pairingId]; - break; - } - case PPOTRequestTargetBrowser: { - PPOTCheckoutBrowserSwitchRequest *browserSwitchRequest = - [[PPOTCheckoutBrowserSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme - pairingId:self.pairingId]; - appSwitchRequest = browserSwitchRequest; - break; - } - default: { - break; - } - } - - if (appSwitchRequest) { - appSwitchRequest.targetAppURLScheme = configurationRecipe.targetAppURLScheme; - appSwitchRequest.responseType = PPAppSwitchResponseTypeWeb; - appSwitchRequest.approvalURL = [self.approvalURL absoluteString]; - } - - return appSwitchRequest; -} - -#pragma mark - configuration methods - -- (void)getAppropriateConfigurationRecipe:(void (^)(PPOTConfigurationRecipe *configurationRecipe))completionBlock { - PPAssert(completionBlock, @"getAppropriateConfigurationRecipe: completionBlock is required"); - - PPOTConfiguration *currentConfiguration = [PPOTConfiguration getCurrentConfiguration]; - PPOTConfigurationBillingAgreementRecipe *bestConfigurationRecipe = nil; - for (PPOTConfigurationBillingAgreementRecipe *configurationRecipe in currentConfiguration.prioritizedBillingAgreementRecipes) { - if (![self isConfigurationRecipeTargetSupported:configurationRecipe] || - ![self isConfigurationRecipeLocaleSupported:configurationRecipe]) { - continue; - } - bestConfigurationRecipe = configurationRecipe; - break; - } - - completionBlock(bestConfigurationRecipe); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.h deleted file mode 100755 index c4cbde63..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// PPOTCheckoutAppSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCheckoutSwitchRequest.h" - -@interface PPOTCheckoutAppSwitchRequest : PPOTCheckoutSwitchRequest - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.m deleted file mode 100755 index eef6a33a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutAppSwitchRequest.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// PPOTCheckoutAppSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCheckoutAppSwitchRequest.h" -#import "PPOTMacros.h" - -@implementation PPOTCheckoutAppSwitchRequest - -- (NSDictionary *)payloadDictionary { - - NSMutableDictionary *payload = [[super payloadDictionary] mutableCopy]; - - payload[kPPOTAppSwitchAppGuidKey] = self.appGuid; - payload[kPPOTAppSwitchWebURLKey] = self.approvalURL; - - return payload; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.h deleted file mode 100755 index ef817427..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// PPOTCheckoutBrowserSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCheckoutSwitchRequest.h" - -@interface PPOTCheckoutBrowserSwitchRequest : PPOTCheckoutSwitchRequest - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.m deleted file mode 100755 index f77aed0b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutBrowserSwitchRequest.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// PPOTCheckoutBrowserSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCheckoutBrowserSwitchRequest.h" -#import "PPOTAppSwitchUtil.h" -#import "PPOTPersistentRequestData.h" -#import "PPOTTime.h" -#import "PPOTString.h" -#import "PPOTMacros.h" - -// TODO: have a factory/builder/json reader of sandbox, mock, etc - -@interface PPOTCheckoutBrowserSwitchRequest () -@property (nonatomic, readwrite) NSString *msgID; -@end - -@implementation PPOTCheckoutBrowserSwitchRequest - -- (NSURL *)encodedURL { - return [NSURL URLWithString:self.approvalURL]; -} - -- (void)addDataToPersistentRequestDataDictionary:(NSMutableDictionary *)requestDataDictionary { - [super addDataToPersistentRequestDataDictionary:requestDataDictionary]; - - NSString *queryString = [self.approvalURL componentsSeparatedByString:@"?"][1]; - NSDictionary *queryDictionary = [PPOTAppSwitchUtil parseQueryString:queryString]; - NSString *hermesToken = queryDictionary[kPPOTAppSwitchHermesTokenKey]; - if (hermesToken == nil) { - hermesToken = queryDictionary[kPPOTAppSwitchHermesBATokenKey]; - } - requestDataDictionary[kPPOTRequestDataDataDictionaryHermesTokenKey] = FORCE_VALUE_OR_NULL(hermesToken); - requestDataDictionary[kPPOTRequestDataDataDictionaryEnvironmentKey] = FORCE_VALUE_OR_NULL(self.environment); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest.m deleted file mode 100755 index 16366b8b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest.m +++ /dev/null @@ -1,130 +0,0 @@ -// -// PPOTCheckoutRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest_Internal.h" -#import "PPOTCheckoutAppSwitchRequest.h" -#import "PPOTCheckoutBrowserSwitchRequest.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" - -#pragma mark - PPOTCheckoutRequest implementation - -@implementation PPOTCheckoutRequest - -- (instancetype)initWithApprovalURL:(NSURL *)approvalURL - pairingId:(NSString *)pairingId - clientID:(NSString *)clientID environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - if (!approvalURL - || ([environment isEqualToString:PPRequestEnvironmentProduction] - && ![approvalURL.absoluteString hasPrefix:@"https://"])) { - PPSDKLog(@"invalid approval URL, or scheme is not https:"); - return nil; - } - - NSDictionary *queryDictionary = [PPOTAppSwitchUtil parseQueryString:[approvalURL query]]; - NSString *hermesToken = queryDictionary[kPPOTAppSwitchHermesTokenKey]; - if (!hermesToken) { - hermesToken = queryDictionary[kPPOTAppSwitchHermesBATokenKey]; - } - - if (!hermesToken) { - PPSDKLog(@"approval URL lacks a Hermes token"); - return nil; - } - - self = [super initWithClientID:clientID environment:environment callbackURLScheme:callbackURLScheme]; - if (self) { - _approvalURL = approvalURL; - - _pairingId = pairingId; - } - return self; -} - -+ (instancetype)requestWithApprovalURL:(NSURL *)approvalURL - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - return [PPOTCheckoutRequest requestWithApprovalURL:approvalURL pairingId:nil clientID:clientID environment:environment callbackURLScheme:callbackURLScheme]; -} - -+ (instancetype)requestWithApprovalURL:(NSURL *)approvalURL - pairingId:(NSString *)pairingId - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - PPOTCheckoutRequest *request = [[[self class] alloc] initWithApprovalURL:approvalURL - pairingId:pairingId - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; - return request; -} - -#pragma mark - add subclass-specific info to appSwitchRequest - -- (PPOTSwitchRequest *)getAppSwitchRequestForConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe { - - PPOTCheckoutSwitchRequest *appSwitchRequest = nil; - - switch (configurationRecipe.target) { - case PPOTRequestTargetOnDeviceApplication: { - appSwitchRequest = [[PPOTCheckoutAppSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme - pairingId:self.pairingId]; - break; - } - case PPOTRequestTargetBrowser: { - PPOTCheckoutBrowserSwitchRequest *browserSwitchRequest = - [[PPOTCheckoutBrowserSwitchRequest alloc] initWithProtocolVersion:configurationRecipe.protocolVersion - appGuid:[PPOTDevice appropriateIdentifier] - clientID:self.clientID - environment:self.environment - callbackURLScheme:self.callbackURLScheme - pairingId:self.pairingId]; - appSwitchRequest = browserSwitchRequest; - break; - } - default: { - break; - } - } - - if (appSwitchRequest) { - appSwitchRequest.targetAppURLScheme = configurationRecipe.targetAppURLScheme; - appSwitchRequest.responseType = PPAppSwitchResponseTypeWeb; - appSwitchRequest.approvalURL = [self.approvalURL absoluteString]; - } - - return appSwitchRequest; -} - -#pragma mark - configuration methods - -- (void)getAppropriateConfigurationRecipe:(void (^)(PPOTConfigurationRecipe *configurationRecipe))completionBlock { - PPAssert(completionBlock, @"getAppropriateConfigurationRecipe: completionBlock is required"); - - PPOTConfiguration *currentConfiguration = [PPOTConfiguration getCurrentConfiguration]; - PPOTConfigurationCheckoutRecipe *bestConfigurationRecipe = nil; - for (PPOTConfigurationCheckoutRecipe *configurationRecipe in currentConfiguration.prioritizedCheckoutRecipes) { - if (![self isConfigurationRecipeTargetSupported:configurationRecipe] || - ![self isConfigurationRecipeLocaleSupported:configurationRecipe]) { - continue; - } - bestConfigurationRecipe = configurationRecipe; - break; - } - - completionBlock(bestConfigurationRecipe); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest_Internal.h deleted file mode 100755 index 382146e2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutRequest_Internal.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// PPOTCheckoutRequest_Internal.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest.h" - -@interface PPOTCheckoutRequest () - -/*! - @brief Factory method. Non-empty values for all parameters MUST be provided. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment PayPalEnvironmentProduction, PayPalEnvironmentMock, or PayPalEnvironmentSandbox; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable instancetype)requestWithApprovalURL:(nonnull NSURL *)approvalURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Factory method. Only pairingId can be nil. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param pairingId The pairingId for the risk component - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment PayPalEnvironmentProduction, PayPalEnvironmentMock, or PayPalEnvironmentSandbox; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable instancetype)requestWithApprovalURL:(nonnull NSURL *)approvalURL - pairingId:(nullable NSString *)pairingId - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.h deleted file mode 100755 index 5231396a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// PPOTCheckoutSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTSwitchRequest.h" - -@interface PPOTCheckoutSwitchRequest : PPOTSwitchRequest - -@property (nonatomic) NSString *approvalURL; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.m deleted file mode 100755 index 7fa90537..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCheckoutSwitchRequest.m +++ /dev/null @@ -1,12 +0,0 @@ -// -// PPOTCheckoutSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCheckoutSwitchRequest.h" - -@implementation PPOTCheckoutSwitchRequest - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore.m deleted file mode 100755 index d0ec4aa6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// PPOTCore.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCore.h" -#import "PPOTCore_Internal.h" -#import "PPOTResult_Internal.h" -#import "PPOTRequest_Internal.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" -#import "PPOTPersistentRequestData.h" -#import "PPDataCollector.h" -#import "PPOTVersion.h" - -// PayPalTouch v1 version -#import "PPOTAppSwitchUtil.h" - -#define kPPOTSafariViewService CARDIO_STR(@"com.apple.safariviewservice") -#define kPPOTSafariSourceApplication CARDIO_STR(@"com.apple.mobilesafari") - -@implementation PPOTCore - -+ (void)initialize { - if (self == [PPOTCore class]) { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - } -} - -+ (BOOL)doesApplicationSupportOneTouchCallbackURLScheme:(NSString *)callbackURLScheme { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - BOOL doesSupport = NO; - // checks the callbackURLScheme is present and app responds to it. - doesSupport = [PPOTAppSwitchUtil isCallbackURLSchemeValid:callbackURLScheme]; - return doesSupport; -} - -+ (BOOL)isWalletAppInstalled { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - return NO; -} - -+ (BOOL)canParseURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - BOOL canHandle = NO; - canHandle = ([PPOTCore isSourceApplicationValid:sourceApplication] - && [PPOTCore isValidURLAction:url]); - return canHandle; -} - -+ (void)parseResponseURL:(NSURL *)url completionBlock:(PPOTCompletionBlock)completionBlock { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - PPAssert(completionBlock, @"parseOneTouchResponseURL:completionBlock: completionBlock is required"); - - [PPOTResult parseURL:url completionBlock:completionBlock]; -} - -+ (void)redirectURLsForCallbackURLScheme:(NSString *)callbackURLScheme withReturnURL:(NSString * __autoreleasing *)returnURL withCancelURL:(NSString * __autoreleasing *)cancelURL { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - [PPOTAppSwitchUtil redirectURLsForCallbackURLScheme:callbackURLScheme withReturnURL:returnURL withCancelURL:cancelURL]; -} - -+ (BOOL)isSourceApplicationValid:(NSString *)sourceApplication { - if (!sourceApplication.length) { - return NO; - } - - PPOTPersistentRequestData *persistentRequestData = [PPOTPersistentRequestData fetch]; - PPOTConfigurationRecipe *configurationRecipe = persistentRequestData.configurationRecipe; - if (!configurationRecipe) { - return NO; - } - - sourceApplication = [sourceApplication lowercaseString]; - - for (NSString *bundleID in configurationRecipe.targetAppBundleIDs) { - NSUInteger asteriskLocation = [bundleID rangeOfString:@"*"].location; - NSString *bundleIDMask = asteriskLocation == NSNotFound ? bundleID : [bundleID substringToIndex:asteriskLocation]; - if ([sourceApplication hasPrefix:bundleIDMask]) { - return YES; - } - } - - if ([sourceApplication isEqualToString:kPPOTSafariSourceApplication] || [sourceApplication isEqualToString:kPPOTSafariViewService] ) { - return YES; - } - - return NO; -} - -+ (BOOL)isValidURLAction:(NSURL *)urlAction { - if (![PPOTAppSwitchUtil isValidURLAction:urlAction]) { - return NO; - } - - PPOTPersistentRequestData *persistentRequestData = [PPOTPersistentRequestData fetch]; - PPOTConfigurationRecipe *configurationRecipe = persistentRequestData.configurationRecipe; - NSDictionary *queryDictionary = [PPOTAppSwitchUtil parseQueryString:[urlAction query]]; - - if (!persistentRequestData || !configurationRecipe || !queryDictionary) { - return NO; - } - - if ([configurationRecipe.protocolVersion integerValue] == 0) { - NSString *requestHermesToken = persistentRequestData.requestData[kPPOTRequestDataDataDictionaryHermesTokenKey]; -// NSString *responseHermesToken = queryDictionary[kPPOTAppSwitchHermesBATokenKey]; -// if (responseHermesToken == nil) { -// responseHermesToken = queryDictionary[kPPOTAppSwitchHermesTokenKey]; -// } - if (![requestHermesToken length]) { - return NO; - } - } else { - if (![queryDictionary[kPPOTAppSwitchPayloadKey] length]) { - return NO; - } - - // For now, we only check the value of x-source in the case of Wallet-switch. - // Ultimately, we might want to agree on what x-source should be for a browser-switch (Hermes). - if (configurationRecipe.target == PPOTRequestTargetOnDeviceApplication && - ![self isSourceApplicationValid:queryDictionary[kPPOTAppSwitchXSourceKey]]) { - return NO; - } - } - - return YES; -} - -+ (NSString *)libraryVersion { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - return PayPalOTVersion(); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore_Internal.h deleted file mode 100755 index 9aa572ae..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTCore_Internal.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// PPOTCore_Internal.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCore.h" - -// eg PayPalSDK/OneTouchCore-iOS 1.2.1-g1234567-dirty (iOS 8.1; iPhone 6+; DEBUG) -#ifdef DEBUG -#define PP_PRODUCT_STRING [NSString stringWithFormat:@"PayPalSDK/OneTouchCore-iOS %@ (%@; %@; %@)", PayPalOTVersion(), [PPOTDevice deviceName], [PPOTDevice hardwarePlatform], @"DEBUG"] -#else -#define PP_PRODUCT_STRING [NSString stringWithFormat:@"PayPalSDK/OneTouchCore-iOS %@ (%@; %@; %@)", PayPalOTVersion(), [PPOTDevice deviceName], [PPOTDevice hardwarePlatform], @"RELEASE"] -#endif - -@interface PPOTCore () - -+ (BOOL)isValidURLAction:(NSURL *)urlAction; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.h deleted file mode 100755 index bae5113f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// PPOTError.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTCore.h" - -@interface PPOTError : NSObject - -/*! - @param errorCode the error code to use - @return NSError with the code given -*/ -+ (NSError *)errorWithErrorCode:(PPOTErrorCode)errorCode; - -/*! - @param errorCode the error code to use - @param userInfo the error's info dictionary - @return NSError with the code given -*/ -+ (NSError *)errorWithErrorCode:(PPOTErrorCode)errorCode userInfo:(NSDictionary *)userInfo; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.m deleted file mode 100755 index 2466a6a5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTError.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// PPOTError.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTError.h" - -@implementation PPOTError - -+ (NSError *)errorWithErrorCode:(PPOTErrorCode)errorCode { - return [self errorWithErrorCode:errorCode userInfo:nil]; -} - -+ (NSError *)errorWithErrorCode:(PPOTErrorCode)errorCode userInfo:(NSDictionary *)userInfo { - return [NSError errorWithDomain:kPayPalOneTouchErrorDomain code:errorCode userInfo:userInfo]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.h deleted file mode 100755 index 254093fd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// PPOTOAuth2AppSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTOAuth2SwitchRequest.h" - -@interface PPOTOAuth2AppSwitchRequest : PPOTOAuth2SwitchRequest - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.m deleted file mode 100755 index 9c36dc9f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2AppSwitchRequest.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// PPOTOAuth2AppSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTOAuth2AppSwitchRequest.h" - -@implementation PPOTOAuth2AppSwitchRequest - -- (NSDictionary *)payloadDictionary { - NSMutableDictionary *payload = [[super payloadDictionary] mutableCopy]; - - if (self.appGuid.length) { - payload[kPPOTAppSwitchAppGuidKey] = self.appGuid; - } - - return payload; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.h deleted file mode 100755 index feb0bfb9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// PPOTOAuth2BrowserSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTOAuth2SwitchRequest.h" - -@interface PPOTOAuth2BrowserSwitchRequest : PPOTOAuth2SwitchRequest - -/*! - @brief endpoint to which the browser should be directed -*/ -@property (nonatomic) NSString *endpoint; - -/*! - @brief the serial number extracted from the X.509 cert, which was used to encrypt the payloadEnc field. -*/ -@property (nonatomic) NSString *keyID; - -/*! - @brief a one time unique ID generated for this payment request -*/ -@property (nonatomic, readonly) NSString *msgID; - -/*! - @brief hexadecimal representation of 256-bit symmetric AES key -*/ -@property (nonatomic) NSString *encryptionKey; - -/*! - @brief additional key/value pairs that OTC will add to the payload - - @discussion (For example, the Braintree client_token, which is required by the temporary Braintree Future Payments consent webpage.) -*/ -@property (nonatomic) NSDictionary *additionalPayloadAttributes; - -@property (nonatomic) NSData *certificate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.m deleted file mode 100755 index 5f910e75..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2BrowserSwitchRequest.m +++ /dev/null @@ -1,91 +0,0 @@ -// -// PPOTOAuth2BrowserSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTOAuth2BrowserSwitchRequest.h" -#import "PPOTTime.h" -#import "PPOTString.h" -#import "PPOTMacros.h" -#import "PPOTPersistentRequestData.h" -#import "PPOTJSONHelper.h" -#import "PPOTEncryptionHelper.h" - - -@interface PPOTOAuth2BrowserSwitchRequest () -@property (nonatomic, readwrite) NSString *msgID; -@end - -@implementation PPOTOAuth2BrowserSwitchRequest - -- (NSString *)msgID { - if (!_msgID.length) { - _msgID = [PPOTString generateUniquishIdentifier]; - } - return _msgID; -} - -- (NSDictionary *)payloadDictionary { - NSMutableDictionary *payload = [[super payloadDictionary] mutableCopy]; - - payload[kPPOTAppSwitchKeyIDKey] = FORCE_VALUE_OR_NULL(self.keyID); - - if (self.additionalPayloadAttributes.count) { - for (id key in self.additionalPayloadAttributes) { - // avoid overriding defaults - if (![payload objectForKey:key]) { - payload[key] = FORCE_VALUE_OR_NULL(self.additionalPayloadAttributes[key]); - } - } - } - return payload; -} - -- (NSData *)encryptedPayload { - NSMutableDictionary *unencryptedPayload = [NSMutableDictionary dictionaryWithCapacity:6]; - unencryptedPayload[kPPOTAppSwitchTimestampKey] = FORCE_VALUE_OR_NULL([[PPOTTime rfc3339DateFormatter] stringFromDate:[NSDate date]]); - unencryptedPayload[kPPOTAppSwitchMsgGUIDKey] = FORCE_VALUE_OR_NULL(self.msgID); - //unencryptedPayload[kPPOTAppSwitchAppGuidKey] = FORCE_VALUE_OR_NULL(self.appGuid); - unencryptedPayload[kPPOTAppSwitchSymKey] = FORCE_VALUE_OR_NULL(self.encryptionKey); - NSString *currentDeviceName = [[UIDevice currentDevice] name]; - if (currentDeviceName != nil && ![currentDeviceName isEqualToString:@""]) { - unencryptedPayload[kPPOTAppSwitchKeyDeviceName] = FORCE_VALUE_OR_NULL(currentDeviceName); - } - - NSData *data = [NSJSONSerialization dataWithJSONObject:unencryptedPayload options:0 error:nil]; - if (!data) { - return nil; - } - - NSData *cipherData = [PPOTEncryptionHelper encryptRSAData:data certificate:self.certificate]; - return cipherData; -} - -- (NSURL *)encodedURL { - NSDictionary *payload = [self payloadDictionary]; - NSData *encryptedPayload = [self encryptedPayload]; - if (!encryptedPayload) { - return nil; - } - NSURL *url = [PPOTAppSwitchUtil URLAction:self.endpoint callbackURLScheme:self.callbackURLScheme payload:payload]; - // cheat for now and add encrypted payload - NSString *urlString = [url absoluteString]; - NSString *encodedEncryptedPayload = [encryptedPayload base64EncodedStringWithOptions:0]; - encodedEncryptedPayload = [PPOTString stringByURLEncodingAllCharactersInString:encodedEncryptedPayload]; - NSString *urlQuery = [NSString stringWithFormat:@"&%@=%@",kPPOTAppSwitchEncryptedPayloadKey, encodedEncryptedPayload]; - urlString = [urlString stringByAppendingString:urlQuery]; - - url = [NSURL URLWithString:urlString]; - - return url; -} - -- (void)addDataToPersistentRequestDataDictionary:(NSMutableDictionary *)requestDataDictionary { - [super addDataToPersistentRequestDataDictionary:requestDataDictionary]; - requestDataDictionary[kPPOTRequestDataDataDictionaryMsgIdKey] = FORCE_VALUE_OR_NULL(self.msgID); - requestDataDictionary[kPPOTRequestDataDataDictionaryEncryptionKey] = FORCE_VALUE_OR_NULL(self.encryptionKey); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.h deleted file mode 100755 index 067266a6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// PPOTOAuth2SwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTSwitchRequest.h" - -@interface PPOTOAuth2SwitchRequest : PPOTSwitchRequest - -@property (nonatomic, strong, readwrite) NSArray *scope; -@property (nonatomic, strong, readwrite) NSString *merchantName; -@property (nonatomic, strong, readwrite) NSString *privacyURL; -@property (nonatomic, strong, readwrite) NSString *agreementURL; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.m deleted file mode 100755 index 159868fc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTOAuth2SwitchRequest.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// PPOTOAuth2SwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2014 PayPal, Inc. All rights reserved. -// - -#import "PPOTOAuth2SwitchRequest.h" -#import "PPOTMacros.h" - -@implementation PPOTOAuth2SwitchRequest - -- (NSDictionary *)payloadDictionary { - NSMutableDictionary *payload = [[super payloadDictionary] mutableCopy]; - - if (self.scope.count) { - payload[kPPOTAppSwitchScopesKey] = [self.scope componentsJoinedByString:@" "]; - } - - if (self.customURL.length) { - payload[kPPOTAppSwitchEnvironmentURLKey] = self.customURL; - } - - if (self.privacyURL.length) { - payload[kPPOTAppSwitchPrivacyURLKey] = self.privacyURL; - } - - if (self.agreementURL.length) { - payload[kPPOTAppSwitchAgreementURLKey] = self.agreementURL; - } - - if (self.merchantName.length) { - // update name, the reason it can be localized or maybe more complete and shortcuted for better display - payload[kPPOTAppSwitchAppNameKey] = self.merchantName; - } - - return payload; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.h deleted file mode 100755 index 72451fca..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// PPOTPersistentRequestData.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTMacros.h" - -#define kPPOTRequestDataDataDictionaryMsgIdKey CARDIO_STR(@"msg_id") -#define kPPOTRequestDataDataDictionaryEncryptionKey CARDIO_STR(@"encryption_key") -#define kPPOTRequestDataDataDictionaryHermesTokenKey CARDIO_STR(@"hermes_token") -#define kPPOTRequestDataDataDictionaryEnvironmentKey CARDIO_STR(@"environment") - -@class PPOTSwitchRequest; -@class PPOTConfigurationRecipe; - -@interface PPOTPersistentRequestData : NSObject - -@property (nonatomic, strong, readwrite) PPOTConfigurationRecipe *configurationRecipe; -@property (nonatomic, strong, readwrite) NSString *environment; -@property (nonatomic, strong, readwrite) NSString *clientID; -@property (nonatomic, strong, readwrite) NSMutableDictionary *requestData; - -+ (PPOTPersistentRequestData *)fetch; -+ (void)storeWithConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe - withRequest:(PPOTSwitchRequest *)request; -+ (void)remove; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.m deleted file mode 100755 index 89498ec1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTPersistentRequestData.m +++ /dev/null @@ -1,76 +0,0 @@ -// -// PPOTPersistentRequestData.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTPersistentRequestData.h" -#import "PPOTOAuth2SwitchRequest.h" -#import "PPOTConfiguration.h" -#import "PPOTMacros.h" -#import "PPOTSimpleKeychain.h" - -#define kPPOTCoderKeyRequestDataConfigurationRecipe CARDIO_STR(@"configuration_recipe") -#define kPPOTCoderKeyRequestDataEnvironment CARDIO_STR(@"environment") -#define kPPOTCoderKeyRequestDataClientID CARDIO_STR(@"client_id") -#define kPPOTCoderKeyRequestDataDataDictionary CARDIO_STR(@"data_dictionary") - -#define kPPOTKeychainRequestSpecificData CARDIO_STR(@"PayPal_OTC_RequestData") - -@implementation PPOTPersistentRequestData - -#pragma mark - initializer - -- (instancetype)initWithConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe - withRequest:(PPOTSwitchRequest *)request { - if ((self = [super init])) { - _configurationRecipe = configurationRecipe; - _environment = request.environment; - _clientID = request.clientID; - _requestData = [NSMutableDictionary dictionary]; - [request addDataToPersistentRequestDataDictionary:_requestData]; - } - return self; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super init])) { - _configurationRecipe = [aDecoder decodeObjectForKey:kPPOTCoderKeyRequestDataConfigurationRecipe]; - _environment = [aDecoder decodeObjectForKey:kPPOTCoderKeyRequestDataEnvironment]; - _clientID = [aDecoder decodeObjectForKey:kPPOTCoderKeyRequestDataClientID]; - _requestData = [aDecoder decodeObjectForKey:kPPOTCoderKeyRequestDataDataDictionary]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.configurationRecipe forKey:kPPOTCoderKeyRequestDataConfigurationRecipe]; - [aCoder encodeObject:self.environment forKey:kPPOTCoderKeyRequestDataEnvironment]; - [aCoder encodeObject:self.clientID forKey:kPPOTCoderKeyRequestDataClientID]; - [aCoder encodeObject:self.requestData forKey:kPPOTCoderKeyRequestDataDataDictionary]; -} - -#pragma mark - keychain - -+ (PPOTPersistentRequestData *)fetch { - return [PPOTSimpleKeychain unarchiveObjectWithDataForKey:kPPOTKeychainRequestSpecificData]; -} - -+ (void)storeWithConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe - withRequest:(PPOTSwitchRequest *)request { - - PPOTPersistentRequestData *persistentRequestData = [[PPOTPersistentRequestData alloc] - initWithConfigurationRecipe:configurationRecipe withRequest:request]; - - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:persistentRequestData]; - [PPOTSimpleKeychain setData:data forKey:kPPOTKeychainRequestSpecificData]; -} - -+ (void)remove { - [PPOTSimpleKeychain setData:nil forKey:kPPOTKeychainRequestSpecificData]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest.m deleted file mode 100755 index 8d007ad2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest.m +++ /dev/null @@ -1,247 +0,0 @@ -// -// PPOTRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest_Internal.h" -#import "PPOTAnalyticsDefines.h" -#import "PPOTAppSwitchUtil.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTMacros.h" -#import "PPOTOAuth2SwitchRequest.h" -#import "PPOTAnalyticsTracker.h" -#import "PPOTPersistentRequestData.h" -#import "PPOTError.h" - -#import - -NSString *const PayPalEnvironmentProduction = PPRequestEnvironmentProduction; -NSString *const PayPalEnvironmentSandbox = PPRequestEnvironmentSandbox; -NSString *const PayPalEnvironmentMock = PPRequestEnvironmentNoNetwork; - -#define kPPOTAppSwitchSchemeToCheck CARDIO_STR(@"http") - -@implementation PPOTRequest - -#pragma mark - initialization - -+ (void)initialize { - if (self == [PPOTRequest class]) { - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - } -} - -- (instancetype)initWithClientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - if (!clientID.length) { - PPSDKLog(@"clientID is required."); - return nil; - } - - if (!environment.length) { - PPSDKLog(@"environment is required."); - return nil; - } - - if (![PPOTAppSwitchUtil isCallbackURLSchemeValid:callbackURLScheme]) { - PPSDKLog(@"callbackURLScheme is not configured or nil."); - return nil; - } - - self = [super init]; - if (self) { - _clientID = clientID; - _environment = environment; - _callbackURLScheme = callbackURLScheme; - - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - } - - return self; - -} - -#pragma mark - public methods - -- (void)getTargetApp:(PPOTRequestPreflightCompletionBlock)completionBlock { - PPAssert(completionBlock, @"getTargetApp: completionBlock is required"); - - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - [self determineConfigurationRecipe:^{ - NSString *analyticsPage = nil; - switch (self.configurationRecipe.target) { - case PPOTRequestTargetBrowser: - analyticsPage = kAnalyticsAppSwitchPreflightBrowser; - break; - case PPOTRequestTargetOnDeviceApplication: - analyticsPage = kAnalyticsAppSwitchPreflightWallet; - break; - case PPOTRequestTargetNone: - default: - analyticsPage = kAnalyticsAppSwitchPreflightNone; - break; - } - - NSString *protocol = [NSString stringWithFormat:@"v%ld", self.configurationRecipe.protocolVersion.longValue]; - analyticsPage = [analyticsPage stringByAppendingString:protocol]; - - [[PPOTAnalyticsTracker sharedManager] trackPage:analyticsPage - environment:self.environment - clientID:self.clientID - error:nil - hermesToken:nil]; - - completionBlock(self.configurationRecipe.target); - }]; -} - -- (void)performWithAdapterBlock:(PPOTRequestAdapterBlock)adapterBlock { - PPAssert(adapterBlock, @"performWithAdapterBlock: adapterBlock is required"); - - [PPOTConfiguration updateCacheAsNecessary]; // called by all public methods - - [self determineConfigurationRecipe:^{ - BOOL success = YES; - PPOTRequestTarget target = PPOTRequestTargetNone; - NSError *error = nil; - NSString *requestClientMetadataId = nil; - NSURL *appSwitchURL = nil; - if (self.configurationRecipe) { - PPOTSwitchRequest *appSwitchRequest = [self getAppSwitchRequestForConfigurationRecipe:self.configurationRecipe]; - if (appSwitchRequest) { - appSwitchURL = [appSwitchRequest encodedURL]; - requestClientMetadataId = appSwitchRequest.clientMetadataID; - PPLog(@"URL to open %@", appSwitchURL); - - NSString *analyticsPage = nil; - if ([[appSwitchURL.absoluteString lowercaseString] hasPrefix:kPPOTAppSwitchSchemeToCheck]) { - target = PPOTRequestTargetBrowser; - analyticsPage = kAnalyticsAppSwitchToBrowser; - } - else { - target = PPOTRequestTargetOnDeviceApplication; - analyticsPage = kAnalyticsAppSwitchToWallet; - } - - NSString *protocol = [NSString stringWithFormat:@"v%ld", self.configurationRecipe.protocolVersion.longValue]; - analyticsPage = [analyticsPage stringByAppendingString:protocol]; - - [PPOTPersistentRequestData storeWithConfigurationRecipe:self.configurationRecipe withRequest:appSwitchRequest]; - - - NSString *hermesToken = nil; - if ([self respondsToSelector:@selector(approvalURL)]) { - NSDictionary *queryDictionary = [PPOTAppSwitchUtil parseQueryString:[[self performSelector:@selector(approvalURL)] query]]; - hermesToken = queryDictionary[kPPOTAppSwitchHermesTokenKey]; - } - - [[PPOTAnalyticsTracker sharedManager] trackPage:analyticsPage - environment:self.environment - clientID:self.clientID - error:error - hermesToken:hermesToken]; - } else { - success = NO; - error = [PPOTError errorWithErrorCode:PPOTErrorCodeNoTargetAppFound]; - } - } else { - PPSDKLog(@"No appropriate configuration recipe found"); - success = NO; - error = [PPOTError errorWithErrorCode:PPOTErrorCodeNoTargetAppFound]; - } - adapterBlock(success, appSwitchURL, target, requestClientMetadataId, error); - }]; -} - -#pragma mark - add subclass-specific info to appSwitchRequest - -- (PPOTSwitchRequest *)getAppSwitchRequestForConfigurationRecipe:(__attribute__((unused)) PPOTConfigurationRecipe *)configurationRecipe { - PPAssert(NO, @"getAppSwitchRequestForConfigurationRecipe: subclass of PPOTRequest must override"); - return nil; -} - -#pragma mark - configuration methods - -- (void)determineConfigurationRecipe:(void (^)())completionBlock { - PPAssert(completionBlock, @"establishConfigurationRecipe: completionBlock is required"); - - if (self.configurationRecipe) { - completionBlock(); - return; - } - -#if DEBUG - [PPOTConfiguration useHardcodedConfiguration:self.useHardcodedConfiguration]; -#endif - - [self getAppropriateConfigurationRecipe:^(PPOTConfigurationRecipe *configurationRecipe) { - self.configurationRecipe = configurationRecipe; - completionBlock(); - }]; -} - -- (void)getAppropriateConfigurationRecipe:(__attribute__((unused)) void (^)(PPOTConfigurationRecipe *configurationRecipe))completionBlock { - PPAssert(NO, @"subclass must override"); -} - -- (BOOL)isConfigurationRecipeTargetSupported:(PPOTConfigurationRecipe *)configurationRecipe { - // Confirm that the recipe's target is available (Browser is always installed; Wallet may or may not be installed), - // and also that the recipe's target is not rejected by `self.forcedTarget`. - - switch (configurationRecipe.target) { - case PPOTRequestTargetOnDeviceApplication: { - return NO; - } - case PPOTRequestTargetBrowser: { - if (self.forcedTarget.integerValue == PPOTRequestTargetOnDeviceApplication) { - return NO; - } - return YES; - } - default: { - return NO; - } - } -} - -- (BOOL)isConfigurationRecipeLocaleSupported:(PPOTConfigurationRecipe *)configurationRecipe { - if (![configurationRecipe.supportedLocales count]) { - return YES; - } - - return [configurationRecipe.supportedLocales containsObject:[[PPOTDevice complicatedDeviceLocale] uppercaseString]]; -} - -#pragma mark - utility method - -#define kPPOTAppSwitchHermesTokenKey @"token" -#define kPPOTAppSwitchBillingAgreementTokenKey @"ba_token" - -+ (NSString *)tokenFromApprovalURL:(NSURL *)approvalURL { - NSDictionary *queryDictionary = [PPOTRequest parseQueryString:[approvalURL query]]; - return queryDictionary[kPPOTAppSwitchHermesTokenKey] ?: queryDictionary[kPPOTAppSwitchBillingAgreementTokenKey]; -} - -+ (NSDictionary *)parseQueryString:(NSString *)query { - NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:6]; - NSArray *pairs = [query componentsSeparatedByString:@"&"]; - - for (NSString *pair in pairs) { - NSArray *elements = [pair componentsSeparatedByString:@"="]; - if (elements.count > 1) { - NSString *key = [[elements objectAtIndex:0] stringByRemovingPercentEncoding]; - NSString *val = [[elements objectAtIndex:1] stringByRemovingPercentEncoding]; - if (key.length && val.length) { - dict[key] = val; - } - } - } - return dict; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequestFactory.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequestFactory.m deleted file mode 100755 index 2116109d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequestFactory.m +++ /dev/null @@ -1,73 +0,0 @@ -// -// PPOTRequestFactory.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequestFactory.h" - -#import "PPOTCheckoutRequest_Internal.h" -#import "PPOTAuthorizationRequest_Internal.h" - -@implementation PPOTRequestFactory - -+ (nullable PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(nonnull NSURL *)approvalURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme { - return [PPOTCheckoutRequest requestWithApprovalURL:approvalURL - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -+ (nullable PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(nonnull NSURL *)approvalURL - pairingId:(nullable NSString *)pairingId - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme { - return [PPOTCheckoutRequest requestWithApprovalURL:approvalURL - pairingId:pairingId - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -+ (nullable PPOTAuthorizationRequest *)authorizationRequestWithScopeValues:(nonnull NSSet *)scopeValues - privacyURL:(nonnull NSURL *)privacyURL - agreementURL:(nonnull NSURL *)agreementURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme { - return [PPOTAuthorizationRequest requestWithScopeValues:scopeValues - privacyURL:privacyURL - agreementURL:agreementURL - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -+ (nullable PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(nonnull NSURL *)approvalURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme { - return [PPOTBillingAgreementRequest requestWithApprovalURL:approvalURL - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -+ (nullable PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(nonnull NSURL *)approvalURL - pairingId:(nullable NSString *)pairingId - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme { - return [PPOTBillingAgreementRequest requestWithApprovalURL:approvalURL - pairingId:pairingId - clientID:clientID - environment:environment - callbackURLScheme:callbackURLScheme]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest_Internal.h deleted file mode 100755 index 051a3e59..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTRequest_Internal.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// PPOTRequest_Internal.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTRequest.h" - -@class PPOTSwitchRequest; -@class PPOTConfigurationRecipe; - -// All requests must have this -@interface PPOTRequest () - -// mandatory fields - -/*! - @brief All requests MUST include the app's Client ID, as obtained from developer.paypal.com -*/ -@property (nonatomic, readwrite) NSString *clientID; - -/*! - @discussion All requests MUST indicate the environment - PayPalEnvironmentProduction, PayPalEnvironmentMock, or PayPalEnvironmentSandbox; - or else a stage indicated as `base-url:port` -*/ -@property (nonatomic, readwrite) NSString *environment; - -/*! - @brief All requests MUST indicate the URL scheme to be used for returning to this app, following an app-switch -*/ -@property (nonatomic, readwrite) NSString *callbackURLScheme; - -/*! - @brief If client calls getTargetApp:, then cache the result here for later use by performWithCompletionBlock:. -*/ -@property (nonatomic, readwrite) PPOTConfigurationRecipe *configurationRecipe; - -/*! - @brief Recipe behavior override, for debugging purposes only. - - @discussion PPOTRequestTargetBrowser - always switch to browser; i.e., ignore all Wallet recipes - PPOTRequestTargetOnDeviceApplication - always switch to Wallet; i.e., ignore all Browser recipes - PPOTRequestTargetNone or PayPalOneTouchRequestTargetUnknown - obey recipes -*/ -@property (nonatomic, readwrite) NSNumber *forcedTarget; - -- (instancetype)initWithClientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -/*! - @brief subclasses must override -*/ -- (PPOTSwitchRequest *)getAppSwitchRequestForConfigurationRecipe:(PPOTConfigurationRecipe *)configurationRecipe; - -- (void)getAppropriateConfigurationRecipe:(void (^)(PPOTConfigurationRecipe *configurationRecipe))completionBlock; -- (BOOL)isConfigurationRecipeTargetSupported:(PPOTConfigurationRecipe *)configurationRecipe; -- (BOOL)isConfigurationRecipeLocaleSupported:(PPOTConfigurationRecipe *)configurationRecipe; - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult.m deleted file mode 100755 index e6fff6e0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult.m +++ /dev/null @@ -1,192 +0,0 @@ -// -// PPOTResult.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTResult_Internal.h" -#import "PPOTCore_Internal.h" -#import "PPOTAppSwitchResponse.h" -#import "PPOTConfiguration.h" -#import "PPOTDevice.h" -#import "PPOTError.h" -#import "PPOTMacros.h" -#import "PPOTAnalyticsTracker.h" -#import "PPOTVersion.h" -#import "PPOTPersistentRequestData.h" -#import "PPOTAnalyticsDefines.h" - -#define PP_TIMESTAMP_TIMEOUT 10*60 // 10 minutes - -@implementation PPOTResult - -+ (void)parseURL:(NSURL *)url completionBlock:(PPOTCompletionBlock)completionBlock { - PPAssert(completionBlock, @"parseURL:completionBlock: completionBlock is required"); - PPOTResult *result = nil; - PPOTPersistentRequestData *persistentRequestData = [PPOTPersistentRequestData fetch]; - - NSString *analyticsPage = kAnalyticsAppSwitchCancel; - NSError *analyticsError = nil; - - BOOL valid = [PPOTCore isValidURLAction:url]; - if (valid) { - PPOTConfigurationRecipe *configurationRecipe = persistentRequestData.configurationRecipe; - PPOTAppSwitchResponse *response = nil; - - if ([configurationRecipe.protocolVersion integerValue] == 0) { - // Note: Token (Hermes) validation performed inside of isValidURLAction: - // TODO: consider moving here - response = [[PPOTAppSwitchResponse alloc] initWithHermesURL:url - environment:persistentRequestData.requestData[kPPOTRequestDataDataDictionaryEnvironmentKey]]; - } else { - NSString *encryptionKey = persistentRequestData.requestData[kPPOTRequestDataDataDictionaryEncryptionKey]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:url encryptionKey:encryptionKey]; - - // TODO: make better - if (response.validResponse && response.version > 2) { - NSString *requestMsgID = persistentRequestData.requestData[kPPOTRequestDataDataDictionaryMsgIdKey]; - NSNumber *protocol = configurationRecipe.protocolVersion; - - if (response.version != [protocol integerValue]) { - valid = NO; - } - - if (![requestMsgID isEqualToString:response.msgID]) { - if (requestMsgID != nil || response.msgID != nil) { - valid = NO; - } - } - - if (valid && - [[response.timeStamp dateByAddingTimeInterval:PP_TIMESTAMP_TIMEOUT] - compare:[NSDate date]] == NSOrderedAscending) { - valid = NO; - } - } - } - - if (valid && response.validResponse && response.action == PPAppSwitchResponseActionSuccess) { - result = [self resultWithSuccess:response]; - analyticsPage = kAnalyticsAppSwitchReturn; - } else if (response.action == PPAppSwitchResponseActionCancel) { - result = [self resultWithCancel:response]; - } else { - result = [self resultWithError]; - analyticsError = result.error; - } - - result.target = configurationRecipe.target; - } else { - if (!persistentRequestData) { - result = [self resultWithPersistedRequestDataFetchError]; - } else { - result = [self resultWithError]; - } - result.target = PPOTRequestTargetUnknown; - analyticsError = result.error; - } - - // Protect parameters against missing persistentRequestData: - [[PPOTAnalyticsTracker sharedManager] trackPage:analyticsPage - environment:persistentRequestData.environment ? persistentRequestData.environment : @"" - clientID:persistentRequestData.clientID ? persistentRequestData.clientID : @"" - error:analyticsError - hermesToken:persistentRequestData.requestData[kPPOTRequestDataDataDictionaryHermesTokenKey]]; - - completionBlock(result); -} - -+ (PPOTResult *)resultWithSuccess:(PPOTAppSwitchResponse *)response { - PPOTResult *result = [PPOTResult new]; - result.type = PPOTResultTypeSuccess; - NSMutableDictionary *resultDictionary = [@{@"client": @{@"platform": @"iOS", - @"paypal_sdk_version": PayPalOTVersion(), - @"environment" : FORCE_VALUE_OR_NULL(response.environment), - @"product_name": PP_PRODUCT_STRING, - }, - } mutableCopy]; - - if (response.responseType == PPAppSwitchResponseTypeAuthorizationCode) { - - [resultDictionary addEntriesFromDictionary:@{@"response_type" : @"authorization_code", - @"response" : @{@"code": FORCE_VALUE_OR_NULL(response.authorizationCode)}, - @"user": @{@"display_string" : FORCE_VALUE_OR_NULL(response.email)}, - }]; - - - } else if (response.responseType == PPAppSwitchResponseTypeWeb) { - - [resultDictionary addEntriesFromDictionary:@{@"response_type" : @"web", - @"response" : @{@"webURL": FORCE_VALUE_OR_NULL(response.webURL)}, - }]; - - - } else { - NSString *error = [NSString stringWithFormat:CARDIO_STR(@"App Switch: Unexpected response type: %@"), @(response.responseType)]; - PPLog(@"%@", error); - result.type = PPOTResultTypeError; - result.error = [self errorUserInfo:@{kPPOTAppSwitchMessageKey: error}]; - } - result.response = resultDictionary; - return result; -} - -+ (PPOTResult *)resultWithCancel:(PPOTAppSwitchResponse *)response { - PPOTResult *result = [PPOTResult new]; - if (response.error.count) { - PPLog(@"App Switch Error: %@", response.error); - result.type = PPOTResultTypeError; - result.error = [self errorUserInfo:response.error]; - } else { - PPLog(@"App Switch Cancelled"); - result.type = PPOTResultTypeCancel; - } - return result; -} - -+ (PPOTResult *)resultWithError { - NSError *error = [self errorUserInfo:@{kPPOTAppSwitchMessageKey:CARDIO_STR(@"App Switch Invalid URL")}]; - return [self resultWithSpecificError:error]; -} - -+ (PPOTResult *)resultWithPersistedRequestDataFetchError { - NSDictionary *userInfo = @{kPPOTAppSwitchMessageKey:CARDIO_STR(@"Could not retrieve persisted request data")}; - NSError *error = [PPOTError errorWithErrorCode:PPOTErrorCodePersistedDataFetchFailed userInfo:userInfo]; - return [self resultWithSpecificError:error]; -} - -+ (PPOTResult *)resultWithSpecificError:(NSError *)error { - PPOTResult *result = [PPOTResult new]; - result.type = PPOTResultTypeError; - result.error = error; - return result; -} - -+ (NSError *)errorUserInfo:(NSDictionary *)dictionary { - return [PPOTError errorWithErrorCode:PPOTErrorCodeParsingFailed userInfo:dictionary]; -} - -- (NSString *)description { - NSMutableString *description = [NSMutableString string]; - - NSString *typeName; - switch (self.type) { - case PPOTResultTypeSuccess: typeName = @"Success"; break; - case PPOTResultTypeCancel: typeName = @"Cancel"; break; - case PPOTResultTypeError: typeName = @"Error"; break; - } - - [description appendFormat:@"PPOTResult (type: %@)\n", typeName]; - if (self.response) { - [description appendFormat:@" Result Dictionary: %@\n", [self.response description]]; - } - if (self.error) { - [description appendFormat:@" Error: %@\n", [self.error description]]; - } - return description; -} - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult_Internal.h deleted file mode 100755 index 1fad5c69..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTResult_Internal.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PPOTCore_Internal.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTCore.h" - -@interface PPOTResult () - -@property (nonatomic, readwrite, assign) PPOTResultType type; -@property (nonatomic, readwrite, copy) NSDictionary *response; -@property (nonatomic, readwrite, copy) NSError *error; -@property (nonatomic, readwrite, assign) PPOTRequestTarget target; - -+ (void)parseURL:(NSURL *)url completionBlock:(PPOTCompletionBlock)completionBlock; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.h deleted file mode 100755 index 74238737..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// PPOTSwitchRequest.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTAppSwitchUtil.h" - -@interface PPOTSwitchRequest : NSObject - -@property (nonatomic, readonly) NSNumber *protocolVersion; -@property (nonatomic, readonly) NSString *appGuid; -@property (nonatomic, readonly) NSString *clientID; -@property (nonatomic, readonly) NSString *environment; -@property (nonatomic, readonly) NSString *callbackURLScheme; -@property (nonatomic, readonly) NSString *clientMetadataID; - -@property (nonatomic, strong, readwrite) NSString *targetAppURLScheme; -@property (nonatomic, assign, readwrite) PPAppSwitchResponseType responseType; -@property (nonatomic, strong, readwrite) NSString *customURL; - -- (instancetype)initWithProtocolVersion:(NSNumber *)protocolVersion - appGuid:(NSString *)appGuid - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme; - -- (instancetype)initWithProtocolVersion:(NSNumber *)protocolVersion - appGuid:(NSString *)appGuid - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme - pairingId:(NSString *)pairingId; - -- (NSDictionary *)payloadDictionary; // used by v1, v2, v3 protocols (but not v0) - -- (NSURL *)encodedURL; - -- (void)addDataToPersistentRequestDataDictionary:(NSMutableDictionary *)requestDataDictionary; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.m deleted file mode 100755 index b4adb4da..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Models/PPOTSwitchRequest.m +++ /dev/null @@ -1,104 +0,0 @@ -// -// PPOTSwitchRequest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTSwitchRequest.h" -#import "PPOTMacros.h" -#import "PPDataCollector_Internal.h" - -@implementation PPOTSwitchRequest - -- (instancetype)initWithProtocolVersion:(NSNumber *)protocolVersion - appGuid:(NSString *)appGuid - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme { - return [self initWithProtocolVersion:protocolVersion appGuid:appGuid clientID:clientID environment:environment callbackURLScheme:callbackURLScheme pairingId:nil]; -} - -- (instancetype)initWithProtocolVersion:(NSNumber *)protocolVersion - appGuid:(NSString *)appGuid - clientID:(NSString *)clientID - environment:(NSString *)environment - callbackURLScheme:(NSString *)callbackURLScheme - pairingId:(NSString *)pairingId { - self = [super init]; - if (self) { - _protocolVersion = protocolVersion; - _appGuid = appGuid; - _clientID = clientID; - _environment = environment; - _responseType = PPAppSwitchResponseTypeUnknown; - _callbackURLScheme = callbackURLScheme; - _clientMetadataID = [PPDataCollector generateClientMetadataID:pairingId]; - } - return self; -} - -- (NSDictionary *)payloadDictionary { - - // mangle with environment for name "custom" - NSString *environment = self.environment; - if (![environment isEqualToString:PPRequestEnvironmentProduction] && ![environment isEqualToString:PPRequestEnvironmentNoNetwork] && - ![environment isEqualToString:PPRequestEnvironmentSandbox]) { - // extract baseURL - NSURL *serviceURL = [NSURL URLWithString:environment]; - if (!serviceURL.host.length) { - serviceURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://%@", environment]]; - } - self.customURL = [NSString stringWithFormat:@"%@://%@:%@", serviceURL.scheme, serviceURL.host, serviceURL.port]; - environment = kPPOTAppSwitchCustomEnvironmentKey; - } - - NSMutableDictionary *payload = [NSMutableDictionary dictionaryWithCapacity:11]; - - payload[kPPOTAppSwitchProtocolVersionKey] = self.protocolVersion; - payload[kPPOTAppSwitchClientIdKey] = [self.clientID copy]; - // use environment or custom - payload[kPPOTAppSwitchEnvironmentKey] = [environment copy]; - payload[kPPOTAppSwitchAppNameKey] = FORCE_VALUE_OR_NULL([PPOTAppSwitchUtil bundleName]); - - switch (self.responseType) { - case PPAppSwitchResponseTypeToken: - payload[kPPOTAppSwitchResponseTypeKey] = kPPOTAppSwitchResponseTypeToken; - break; - case PPAppSwitchResponseTypeAuthorizationCode: - payload[kPPOTAppSwitchResponseTypeKey] = kPPOTAppSwitchResponseTypeCode; - break; - case PPAppSwitchResponseTypeWeb: - payload[kPPOTAppSwitchResponseTypeKey] = kPPOTAppSwitchResponseTypeWeb; - break; - default: - PPAssert(YES, @"Response type unsupported"); - break; - } - - if (self.customURL.length) { - payload[kPPOTAppSwitchEnvironmentURLKey] = self.customURL; - } - - // dyson pairing id - payload[kPPOTAppSwitchMetadataClientIDKey] = FORCE_VALUE_OR_NULL(self.clientMetadataID); - - return payload; -} - -// default version of encodedURL (for v1, v2, and v3) -- (NSURL *)encodedURL { - NSDictionary *payload = [self payloadDictionary]; - - NSURL *url = [PPOTAppSwitchUtil URLAction:kPPOTAppSwitchAuthenticateAction - targetAppURLScheme:self.targetAppURLScheme - callbackURLScheme:self.callbackURLScheme - payload:payload]; - return url; -} - -- (void)addDataToPersistentRequestDataDictionary:(__attribute__((unused)) NSMutableDictionary *)requestDataDictionary { - // subclasses each call [super] add then add their own relevant data, if any, to be retrieved when the response comes back to us -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTCore.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTCore.h deleted file mode 100755 index e40554e5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTCore.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// PPOTCore.h -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -// Required Frameworks for the library. Additionally, make sure to set OTHER_LDFLAGS = -ObjC -#import -#import -#import - -#import -#import "PPOTResult.h" - -/*! - @brief Completion block for receiving the result of performing a request -*/ -typedef void (^PPOTCompletionBlock)(PPOTResult * _Nonnull result); - -@interface PPOTCore : NSObject - -/*! - @brief Check if the application is configured correctly to handle responses for One Touch flow. - - @param callbackURLScheme The URL scheme which the app has registered for One Touch responses. - @return `YES` iff the application is correctly configured. -*/ -+ (BOOL)doesApplicationSupportOneTouchCallbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Check whether the PayPal Wallet app is installed on this device (iOS <= 8). - - @discussion Universal links are used in iOS >=9 so the check is not performed - - @return `YES` if the wallet app is installed -*/ -+ (BOOL)isWalletAppInstalled; - -/*! - @brief Check whether the URL and source application are recognized and valid for One Touch. - - @discussion Usually called as a result of the `UIApplicationDelegate`'s - `- (BOOL)application:openURL:sourceApplication:annotation:` method - to determine if the URL is intended for the One Touch library. - - (To then actually process the URL, call `+ (void)parseOneTouchURL:completionBlock`.) - - @param url The URL of the app switch request - @param sourceApplication The bundle ID of the source application - - @return `YES` iff the URL and sending app are both valid. -*/ -+ (BOOL)canParseURL:(nonnull NSURL *)url sourceApplication:(nullable NSString *)sourceApplication; - -/*! - @brief Process a URL response. - - @param url The URL to process - @param completionBlock completion block for receiving the result of performing a request -*/ -+ (void)parseResponseURL:(nonnull NSURL *)url completionBlock:(nonnull PPOTCompletionBlock)completionBlock; - -/*! - @brief URLs to return control from the browser/wallet to the app containing the One Touch library. - - @discussion For payment processing, the client's server will first create a payment on the PayPal server. - Creating that payment requires, among many other things, a `redirect_urls` object containing two strings: - `return_url` and `cancel_url`. - - @note Both return values will be `nil` if [PPOTCore doesApplicationSupportOneTouchCallbackURLScheme:callbackURLScheme] is not true. - - @param callbackURLScheme The URL scheme which the app has registered for One Touch responses. - @param returnURL A string containing the `return_url`. - @param cancelURL A string containing the `cancel_url`. -*/ -+ (void)redirectURLsForCallbackURLScheme:(nonnull NSString *)callbackURLScheme withReturnURL:(NSString * _Nonnull * _Nonnull)returnURL withCancelURL:(NSString * _Nonnull * _Nonnull)cancelURL; - -/*! - @brief The version of the SDK library in use. Version numbering follows http://semver.org/. - - @note Please be sure to include this library version in tech support requests. -*/ -+ (nonnull NSString *)libraryVersion; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequest.h deleted file mode 100755 index d643dc1f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequest.h +++ /dev/null @@ -1,146 +0,0 @@ -// -// PPOTRequest.h -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTResult.h" - -/*! - @brief Completion block for receiving the result of preflighting a request -*/ -typedef void (^PPOTRequestPreflightCompletionBlock) (PPOTRequestTarget target); - -/*! - @brief Adapter block for app switching. -*/ -typedef void (^PPOTRequestAdapterBlock) (BOOL success, NSURL * _Nonnull url, PPOTRequestTarget target, NSString * _Nullable clientMetadataId, NSError * _Nullable error); - -/*! - @brief This environment MUST be used for App Store submissions. -*/ -extern NSString * _Nonnull const PayPalEnvironmentProduction; - -/*! - @brief Sandbox: Uses the PayPal sandbox for transactions. Useful for development. -*/ -extern NSString * _Nonnull const PayPalEnvironmentSandbox; - -/*! - @brief Mock: Mock mode. Does not submit transactions to PayPal. Fakes successful responses. Useful for unit tests. -*/ -extern NSString * _Nonnull const PayPalEnvironmentMock; - -/*! - @brief Base class for all One Touch requests -*/ -@interface PPOTRequest : NSObject - -/*! - @brief Optional preflight method, to determine in advance to which app we will switch when this request's `performWithCompletionBlock:` method is called. - - @note As currently implemented, `completionBlock` will be called synchronously. - We use a completion block here to allow for future changes in implementation that might cause - delays (such as time-consuming cryptographic operations, or server interactions). -*/ -- (void)getTargetApp:(nullable PPOTRequestPreflightCompletionBlock)completionBlock; - -/*! - @brief Ask the One Touch library to carry out a request. - - @discussion Will app switch to the PayPal Wallet app if present, or to the mobile browser otherwise. - - @param adapterBlock Block that makes the URL request. - - @note The adapter block is responsible for determining which app to app switch to (Wallet, browser, or neither). - The `completionBlock` is called synchronously. - We use a completion block here to allow for future changes in implementation that might cause - delays (such as time-consuming cryptographic operations, or server interactions). -*/ -- (void)performWithAdapterBlock:(nullable PPOTRequestAdapterBlock)adapterBlock; - -/*! - @brief Get token from approval URL -*/ -+ (nullable NSString *)tokenFromApprovalURL:(nonnull NSURL *)approvalURL; - -/*! - @brief All requests MUST include the app's Client ID, as obtained from developer.paypal.com -*/ -@property (nonnull, nonatomic, readonly) NSString *clientID; - -/*! - @discussion All requests MUST indicate the environment - - `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` -*/ -@property (nonnull, nonatomic, readonly) NSString *environment; - -/*! - @brief All requests MUST indicate the URL scheme to be used for returning to this app, following an app switch -*/ -@property (nonnull, nonatomic, readonly) NSString *callbackURLScheme; - -/*! - @brief Requests MAY include additional key/value pairs that One Touch will add to the payload - @discussion (For example, the Braintree client_token, which is required by the temporary Braintree Future Payments consent webpage.) -*/ -@property (nonnull, nonatomic, strong) NSDictionary *additionalPayloadAttributes; - -#if DEBUG -/*! - @brief DEBUG-only: don't use downloaded configuration file; defaults to NO -*/ -@property (nonatomic, assign, readwrite) BOOL useHardcodedConfiguration; -#endif - -@end - - -/*! - @brief Request consent for Profile Sharing (e.g., for Future Payments) -*/ -@interface PPOTAuthorizationRequest : PPOTRequest - -/*! - @brief Set of requested scope-values. - - @discussion Available scope-values are listed at https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/attributes/ -*/ -@property (nonnull, nonatomic, readonly) NSSet *scopeValues; - -/*! - @brief The URL of the merchant's privacy policy -*/ -@property (nonnull, nonatomic, readonly) NSURL *privacyURL; - -/*! - @brief The URL of the merchant's user agreement -*/ -@property (nonnull, nonatomic, readonly) NSURL *agreementURL; - -@end - - -/*! - @brief Request approval of a payment -*/ -@interface PPOTCheckoutRequest : PPOTRequest - -@property (nonnull, nonatomic, strong) NSString *pairingId; - -/*! - @brief Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL -*/ -@property (nonnull, nonatomic, readonly) NSURL *approvalURL; - -@end - -/*! - @brief Request approval of a Billing Agreement -*/ -@interface PPOTBillingAgreementRequest : PPOTCheckoutRequest - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequestFactory.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequestFactory.h deleted file mode 100755 index d0c3ab1c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTRequestFactory.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// PPOTRequestFactory.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTRequest.h" - -@interface PPOTRequestFactory : NSObject - -/*! - @brief Factory method. Non-empty values for all parameters MUST be provided. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(nonnull NSURL *)approvalURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Factory method. Only `pairingId` can be nil. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param pairingId The pairing ID for the risk component. Optional. - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(nonnull NSURL *)approvalURL - pairingId:(nullable NSString *)pairingId - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Factory method. Non-empty values for all parameters MUST be provided. - - @param scopeValues Set of requested scope-values. - Available scope-values are listed at https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/attributes/ - @param privacyURL The URL of the merchant's privacy policy - @param agreementURL The URL of the merchant's user agreement - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable PPOTAuthorizationRequest *)authorizationRequestWithScopeValues:(nonnull NSSet *)scopeValues - privacyURL:(nonnull NSURL *)privacyURL - agreementURL:(nonnull NSURL *)agreementURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Factory method. Non-empty values for all parameters MUST be provided. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(nonnull NSURL *)approvalURL - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -/*! - @brief Factory method. Only pairingId can be nil. - - @param approvalURL Client has already created a payment on PayPal server; this is the resulting HATEOS ApprovalURL - @param pairingId The pairing ID for the risk component. Optional. - @param clientID The app's Client ID, as obtained from developer.paypal.com - @param environment `PayPalEnvironmentProduction`, `PayPalEnvironmentMock`, or `PayPalEnvironmentSandbox`; - or else a stage indicated as `base-url:port` - @param callbackURLScheme The URL scheme to be used for returning to this app, following an app-switch -*/ -+ (nullable PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(nonnull NSURL *)approvalURL - pairingId:(nullable NSString *)pairingId - clientID:(nonnull NSString *)clientID - environment:(nonnull NSString *)environment - callbackURLScheme:(nonnull NSString *)callbackURLScheme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTResult.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTResult.h deleted file mode 100755 index 256025fc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PPOTResult.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// PPOTResult.h -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -typedef NS_ENUM(NSInteger, PPOTRequestTarget) { - // No app switch will occur - PPOTRequestTargetNone, - // App switch to/from browser - PPOTRequestTargetBrowser, - // App switch to/from PayPal Consumer App - PPOTRequestTargetOnDeviceApplication, - // Response url was invalid; can't confirm source app's identity - PPOTRequestTargetUnknown, -}; - -#define kPayPalOneTouchErrorDomain @"com.paypal.onetouch.error" - -typedef NS_ENUM(NSInteger, PPOTErrorCode) { - PPOTErrorCodeUnknown = -1000, - PPOTErrorCodeParsingFailed = -1001, - PPOTErrorCodeNoTargetAppFound = -1002, - PPOTErrorCodeOpenURLFailed = -1003, - PPOTErrorCodePersistedDataFetchFailed = -1004, -}; - -typedef NS_ENUM(NSInteger, PPOTResultType) { - PPOTResultTypeError, - PPOTResultTypeCancel, - PPOTResultTypeSuccess, -}; - -/*! - @brief The result of parsing the One Touch return URL -*/ -@interface PPOTResult : NSObject - -/*! - @brief The status of the app switch -*/ -@property (nonatomic, readonly, assign) PPOTResultType type; - -/*! - @brief When One Touch is successful, the response dictionary containing information that your server will need to process. -*/ -@property (nullable, nonatomic, readonly, copy) NSDictionary *response; - -/*! - @brief When One Touch encounters an error, it is reported here. Otherwise this property will be `nil`. -*/ -@property (nullable, nonatomic, readonly, copy) NSError *error; - -/*! - @brief The target app that is now switching back. -*/ -@property (nonatomic, readonly, assign) PPOTRequestTarget target; - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PayPalOneTouch.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PayPalOneTouch.h deleted file mode 100755 index 34b15eb7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalOneTouch/Public/PayPalOneTouch.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// PayPalOneTouch.h -// PayPalOneTouch -// -// - -#import - -//! Project version number for PayPalOneTouch. -FOUNDATION_EXPORT double PayPalOneTouchVersionNumber; - -//! Project version string for PayPalOneTouch. -FOUNDATION_EXPORT const unsigned char PayPalOneTouchVersionString[]; - -#include "PPOTCore.h" -#include "PPOTResult.h" -#include "PPOTRequest.h" -#include "PPOTRequestFactory.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Info.plist b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Info.plist deleted file mode 100755 index d3de8eef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTDevice.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTDevice.m deleted file mode 100755 index 99b9c345..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTDevice.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// PPOTDevice.m -// Copyright © 2009 PayPal, Inc. All rights reserved. -// - -#import "PPOTDevice.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#import "PPOTSimpleKeychain.h" -#import "PPOTString.h" - -#define kKeychainDeviceIdentifier @"PayPal_MPL_DeviceGUID" -#define kPPOTOTDeviceFallbackCountryISOCode @"US" -#define kPPOTOTDeviceFallbackCountryDialingCode @"1" - -@implementation PPOTDevice - -+ (NSString *)hardwarePlatform { - size_t size; - sysctlbyname("hw.machine", NULL, &size, NULL, 0); - char *machine = malloc(size); - sysctlbyname("hw.machine", machine, &size, NULL, 0); - NSString *platform = [NSString stringWithUTF8String:machine]; - free(machine); - return platform; -} - -+ (NSString *)deviceName { - NSString *model = [[UIDevice currentDevice] model]; - NSString *deviceName = [NSString stringWithFormat:@"%@ (%@)", model, [PPOTDevice hardwarePlatform]]; - return deviceName; -} - - -+ (NSString *)complicatedDeviceLocale { - // Start with the device's current language: - NSString *deviceLocale = [NSLocale preferredLanguages][0]; - - // Treat dialect, if present, as region (except for Chinese, where it's a bit more than just a dialect): - // For example, "en-GB" ("British English", as of iOS 7) -> "en_GB"; and "en-GB_HK" -> "en_GB". - if (![deviceLocale hasPrefix:@"zh"]) { - if ([deviceLocale rangeOfString:@"-"].location != NSNotFound) { - NSUInteger underscoreLocation = [deviceLocale rangeOfString:@"_"].location; - if (underscoreLocation != NSNotFound) { - deviceLocale = [deviceLocale substringToIndex:underscoreLocation]; - } - deviceLocale = [deviceLocale stringByReplacingOccurrencesOfString:@"-" withString:@"_"]; - } - } - - // If no region is specified, then use the device's current locale (if the language matches): - if ([deviceLocale rangeOfString:@"_"].location == NSNotFound) { - NSString *deviceLanguage = [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]; - NSString *deviceRegion = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]; - if (!deviceRegion) { - // NSLocaleCountryCode can return nil if device's Region is set to English, Esperanto, etc. - deviceRegion = @""; - } - NSString *calculatedDeviceLocale; - if ([deviceRegion length]) { - calculatedDeviceLocale = [NSString stringWithFormat:@"%@_%@", deviceLanguage, deviceRegion]; - } else { - calculatedDeviceLocale = deviceLanguage; - } - - if ([deviceLanguage hasPrefix:deviceLocale]) { - deviceLocale = calculatedDeviceLocale; - } - else if ([deviceRegion length]) { - // For language-matching here, treat missing device dialect as wildcard; e.g, "zh" matches either "zh-Hans" or "zh-Hant": - NSUInteger targetHyphenLocation = [deviceLocale rangeOfString:@"-"].location; - if (targetHyphenLocation != NSNotFound) { - NSString *targetLanguage = [deviceLocale substringToIndex:targetHyphenLocation]; - if ([deviceLanguage hasPrefix:targetLanguage]) { - deviceLocale = [NSString stringWithFormat:@"%@_%@", deviceLocale, deviceRegion]; - } else if ([deviceLocale caseInsensitiveCompare:@"zh-Hant"] == NSOrderedSame && - ([deviceRegion isEqualToString:@"HK"] || [deviceRegion isEqualToString:@"TW"])) { - // Very special case: target language is zh-Hant, and device region is either xx_HK or xx_TW, - // for *any* "xx" (because device region could be en_HK or en_TW): - deviceLocale = [NSString stringWithFormat:@"%@_%@", deviceLocale, deviceRegion]; - } - } - } - } - - return deviceLocale; -} - -+ (NSString *)appropriateIdentifier { - // see if we already have one - NSString *appropriateId = [[NSString alloc] initWithData:[PPOTSimpleKeychain dataForKey:kKeychainDeviceIdentifier] - encoding:NSUTF8StringEncoding]; - // if not generate a new one and save - if (!appropriateId.length) { - appropriateId = [[NSUUID UUID] UUIDString]; - [PPOTSimpleKeychain setData:[appropriateId dataUsingEncoding:NSUTF8StringEncoding] forKey:kKeychainDeviceIdentifier]; - } - return appropriateId; -} - -+ (void)clearIdentifier { - [PPOTSimpleKeychain setData:nil forKey:kKeychainDeviceIdentifier]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTEncryptionHelper.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTEncryptionHelper.m deleted file mode 100755 index b4fa5ead..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTEncryptionHelper.m +++ /dev/null @@ -1,248 +0,0 @@ -// -// PPOTEncryptionHelper.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTEncryptionHelper.h" -#import -#import -#import "PPOTMacros.h" - -@implementation PPOTEncryptionHelper - -+ (BOOL)compareSignatureData:(NSData *)data1 withData:(NSData *)data2 { - if (data1.length != data2.length) { - return NO; - } - - NSInteger result = 0; - uint8_t const *data1Ptr = [data1 bytes]; - uint8_t const *data2Ptr = [data2 bytes]; - for (unsigned int i = 0; i < data1.length; i++) { - result |= data1Ptr[i] ^ data2Ptr[i]; - } - return (result == 0); -} - -+ (NSData *)randomData:(NSUInteger)length { - NSMutableData *randomKey = [NSMutableData dataWithLength:length]; - int error = SecRandomCopyBytes(kSecRandomDefault, length, [randomKey mutableBytes]); - return (error == 0) ? randomKey : nil; -} - -+ (NSData *)generate256BitKey { - return [PPOTEncryptionHelper randomData:kCCKeySizeAES256]; -} - -// HMACSHA256 -+ (NSData *)dataDigest:(NSData *)data encryptionKey:(NSData *)encryptionKey { - NSMutableData* hash = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH]; - CCHmac(kCCHmacAlgSHA256, encryptionKey.bytes, encryptionKey.length, data.bytes, data.length, hash.mutableBytes); - return hash; -} - -#pragma mark - AES CTR -+ (NSData *)encryptAESCTRData:(NSData *)plainData encryptionKey:(NSData *)key { - if (key.length != kCCKeySizeAES256) { - // wrong key - PPSDKLog(@"encryptAESCTRData: Supplied key is not %@ bytes", @(kCCKeySizeAES256)); - return nil; - } - - NSData *nonce = [PPOTEncryptionHelper randomData:kCCKeySizeAES128]; - NSData *encryptionKey = [key subdataWithRange:NSMakeRange(0, kCCKeySizeAES128)]; - NSData *digestKey = [key subdataWithRange:NSMakeRange(16, kCCKeySizeAES128)]; - - // Init cryptor - CCCryptorRef cryptor = NULL; - CCCryptorStatus status = CCCryptorCreateWithMode(kCCEncrypt, - kCCModeCTR, - kCCAlgorithmAES, - ccNoPadding, - [nonce bytes], - [encryptionKey bytes], - encryptionKey.length, - 0, - 0, - 0, - kCCModeOptionCTR_BE,// deprecated and no longer used - &cryptor); - if (status != kCCSuccess) { - PPSDKLog(@"encryptAESCTRData: createWithMode error: %@", @(status)); - return nil; - } - - - size_t cipherDataSize = plainData.length + kCCKeySizeAES128 +1; // null terminator - uint8_t *cipherData = malloc(cipherDataSize); - memset(cipherData, 0, cipherDataSize); - - - size_t dataMoved; - // now re-use buffer to do decryption - status = CCCryptorUpdate(cryptor, [plainData bytes], [plainData length], cipherData, cipherDataSize, &dataMoved); - // note: there is no need to call CCCryptorFinal when no padding is used. - CCCryptorRelease(cryptor); - - // add logging - if (status != kCCSuccess) { - PPSDKLog(@"encryptAESCTRData: encryption error: %@", @(status)); - free(cipherData); - cipherData = NULL; - return nil; - } - - // concat nonce and cipher for signing - NSData *encryptedBlob = [NSData dataWithBytes:cipherData length:dataMoved]; - free(cipherData); - cipherData = NULL; - NSMutableData *signData = [NSMutableData dataWithCapacity:encryptedBlob.length + nonce.length]; - [signData appendData:nonce]; - [signData appendData:encryptedBlob]; - - // sign - NSData *digest = [PPOTEncryptionHelper dataDigest:signData encryptionKey:digestKey]; - - // construct encrypted payload = signature + nonce + encrypted blob - NSMutableData *payload = [NSMutableData dataWithCapacity:signData.length + digest.length]; - [payload appendData:digest]; - [payload appendData:signData]; - - return payload; -} - -+ (NSData *)decryptAESCTRData:(NSData *)cipherData encryptionKey:(NSData *)key { - if (key.length != kCCKeySizeAES256) { - // wrong key - PPSDKLog(@"decryptAESCTRData: Supplied key is not %@ bytes", @(kCCKeySizeAES256)); - return nil; - } - - if (cipherData.length < CC_SHA256_DIGEST_LENGTH + kCCKeySizeAES128) { - // we won't be able to decrypt, data sample too small - PPSDKLog(@"decryptAESCTRData: data is too small to decrypt"); - return nil; - } - - NSData *resultData = nil; - - NSData *encryptionKey = [key subdataWithRange:NSMakeRange(0, kCCKeySizeAES128)]; - NSData *digestKey = [key subdataWithRange:NSMakeRange(16, kCCKeySizeAES128)]; - - NSData *signature = [cipherData subdataWithRange:NSMakeRange(0, CC_SHA256_DIGEST_LENGTH)]; - NSData *digest = [PPOTEncryptionHelper dataDigest:[cipherData subdataWithRange:NSMakeRange(CC_SHA256_DIGEST_LENGTH, cipherData.length-CC_SHA256_DIGEST_LENGTH)] - encryptionKey:digestKey]; - - - if (![self compareSignatureData:signature withData:digest]) { - PPSDKLog(@"decryptAESCTRData: signature doesn't match"); - return nil; - } - - NSData *nonce = [cipherData subdataWithRange:NSMakeRange(CC_SHA256_DIGEST_LENGTH, kCCKeySizeAES128)]; - - // Init cryptor - CCCryptorRef cryptor = NULL; - CCCryptorStatus status = CCCryptorCreateWithMode(kCCDecrypt, - kCCModeCTR, - kCCAlgorithmAES, - ccNoPadding, - [nonce bytes], - [encryptionKey bytes], - encryptionKey.length, - 0, - 0, - 0, - kCCModeOptionCTR_BE, - &cryptor); - if (status != kCCSuccess) { - PPSDKLog(@"decryptAESCTRData: createWithMode error: %@", @(status)); - return nil; - } - - uint8_t *plainText = malloc(cipherData.length); // that's big enough - memset(plainText, 0, cipherData.length); - - const uint8_t *encryptionBlockPtr = [cipherData bytes] + CC_SHA256_DIGEST_LENGTH + kCCKeySizeAES128; // adjust pointer - size_t encryptionBlockSize = cipherData.length - CC_SHA256_DIGEST_LENGTH - kCCKeySizeAES128; // minus signature, minus nonce - - // now re-use buffer to do decryption - size_t dataMoved; - status = CCCryptorUpdate(cryptor, encryptionBlockPtr, encryptionBlockSize, plainText, cipherData.length, &dataMoved); - // note: there is no need to call CCCryptorFinal when no padding is used. - CCCryptorRelease(cryptor); - - if (status != kCCSuccess) { - PPSDKLog(@"decryptAESCTRData: encryption error: %@", @(status)); - free(plainText); - plainText = NULL; - return nil; - } - resultData = [NSData dataWithBytes:plainText length:dataMoved]; - free(plainText); - plainText = NULL; - return resultData; -} - - -#pragma mark - AES Public Key - -+ (SecKeyRef)createPublicKeyUsingCertificate:(NSData *)certificateData { - SecCertificateRef certificate = SecCertificateCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)certificateData); - if (certificate == NULL) { - PPSDKLog(@"createPublicKeyUsingData: failed to create public key"); - return NULL; - } - SecPolicyRef policy = SecPolicyCreateBasicX509(); - SecTrustRef trustRef = NULL; - SecKeyRef keyRef = NULL; - OSStatus status = SecTrustCreateWithCertificates(certificate, policy, &trustRef); - if (status == errSecSuccess) { - keyRef = SecTrustCopyPublicKey(trustRef); - } else { - PPSDKLog(@"createPublicKeyUsingData: create certificate failed with error %@", @(status)); - } - CFRelease(trustRef); - CFRelease(policy); - CFRelease(certificate); - - return keyRef; -} - -+ (NSData *)encryptRSAData:(NSData *)plainData certificate:(NSData *)certificate { - if (![certificate length]) { - PPSDKLog(@"encryptRSAData: no certificate provided"); - return nil; - } - - SecKeyRef publicKeyRef = [self createPublicKeyUsingCertificate:certificate]; - if (!publicKeyRef) { - // logging is done above - return nil; - } - size_t keyBlockSize = SecKeyGetBlockSize(publicKeyRef); - if (plainData.length > keyBlockSize) { - PPSDKLog(@"encryptRSAData: data too big to encrypt"); - return nil; - } - size_t cipherTextLen = keyBlockSize; - uint8_t *cipherText = malloc(keyBlockSize); - memset(cipherText, 0, keyBlockSize); - - OSStatus status = SecKeyEncrypt(publicKeyRef, kSecPaddingOAEP, [plainData bytes], [plainData length], cipherText, &cipherTextLen); - CFRelease(publicKeyRef); - if (status != errSecSuccess) { - PPSDKLog(@"encryptRSAData: encryption failed with error %@", @(status)); - free(cipherText); - return nil; - } - - NSData *resultData = [NSData dataWithBytes:cipherText length:cipherTextLen]; - free(cipherText); - cipherText = NULL; - return resultData; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTJSONHelper.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTJSONHelper.m deleted file mode 100755 index 2561efa9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTJSONHelper.m +++ /dev/null @@ -1,90 +0,0 @@ -// -// PPOTJSONHelper.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTJSONHelper.h" -#import "PPOTString.h" - -@implementation PPOTJSONHelper - -+ (NSString *)stringFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSString *string = nil; - if ([dictionary[key] isKindOfClass:[NSString class]]) { - string = dictionary[key]; - } - return string; -} - -+ (NSDictionary *)dictionaryFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSDictionary *dict = nil; - if ([dictionary[key] isKindOfClass:[NSDictionary class]]) { - dict = dictionary[key]; - } - return dict; -} - -+ (NSArray *)arrayFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSArray *array = nil; - if ([dictionary[key] isKindOfClass:[NSArray class]]) { - array = dictionary[key]; - } - return array; -} - -+ (NSArray *)stringArrayFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSArray *array = [PPOTJSONHelper arrayFromDictionary:dictionary withKey:key]; - for (id item in array) { - if (![item isKindOfClass:[NSString class]]) { - return nil; - } - } - return array; -} - -+ (NSArray *)dictionaryArrayFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSArray *array = [PPOTJSONHelper arrayFromDictionary:dictionary withKey:key]; - for (id item in array) { - if (![item isKindOfClass:[NSDictionary class]]) { - return nil; - } - } - return array; -} - -+ (NSString *)base64EncodedJSONStringWithDictionary:(NSDictionary*)dictionary { - NSData *json = [NSJSONSerialization dataWithJSONObject:dictionary options:0 error:nil]; - if ([json length]) { - return [PPOTString stringByBase64EncodingData:json]; - } - else { - return @""; - } -} -+ (NSDictionary *)dictionaryWithBase64EncodedJSONString:(NSString*)base64String { - NSData *data = [PPOTString decodeBase64WithString:base64String]; - if ([data length]) { - return [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; - } - else { - return @{}; - } -} - -+ (NSNumber *)numberFromDictionary:(NSDictionary *)dictionary withKey:(NSString *)key { - NSNumber *number = nil; - if ([dictionary[key] isKindOfClass:[NSNumber class]]) { - number = dictionary[key]; - } else { - NSString *stringNumber = [self stringFromDictionary:dictionary withKey:key]; - if (stringNumber.length) { - NSNumberFormatter *formatter = [NSNumberFormatter new]; - number = [formatter numberFromString:stringNumber]; - } - } - return number; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTMacros.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTMacros.m deleted file mode 100755 index 3b7bb560..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTMacros.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// PPOTMacros.m -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTMacros.h" -#import - -@implementation PPOTMacros - -+ (NSUInteger)deviceSystemMajorVersion { - static NSUInteger _deviceSystemMajorVersion = -1; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue]; - }); - return _deviceSystemMajorVersion; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTPinnedCertificates.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTPinnedCertificates.m deleted file mode 100755 index 2d7de1bf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTPinnedCertificates.m +++ /dev/null @@ -1,350 +0,0 @@ -// -// PPOTPinnedCertificates.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTPinnedCertificates.h" - -@implementation PPOTPinnedCertificates - -+ (NSArray *)trustedCertificates { - NSMutableArray *trustedCertificates = [NSMutableArray array]; - { - /* subject= /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 */ - /* issuer= /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 */ - unsigned char XXX_certificate[1239]={ - 0x30,0x82,0x04,0xd3,0x30,0x82,0x03,0xbb,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x18, - 0xda,0xd1,0x9e,0x26,0x7d,0xe8,0xbb,0x4a,0x21,0x58,0xcd,0xcc,0x6b,0x3b,0x4a,0x30, - 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x81, - 0xca,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, - 0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, - 0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, - 0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73,0x74, - 0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04, - 0x0b,0x13,0x31,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x56,0x65,0x72,0x69, - 0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72, - 0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20, - 0x6f,0x6e,0x6c,0x79,0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3c,0x56, - 0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20, - 0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43, - 0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74, - 0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x2d,0x20,0x47,0x35,0x30,0x1e,0x17,0x0d,0x30, - 0x36,0x31,0x31,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33,0x36, - 0x30,0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xca,0x31,0x0b, - 0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06, - 0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20, - 0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b,0x13,0x16,0x56, - 0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4e,0x65, - 0x74,0x77,0x6f,0x72,0x6b,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04,0x0b,0x13,0x31, - 0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x56,0x65,0x72,0x69,0x53,0x69,0x67, - 0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,0x20,0x61,0x75, - 0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c, - 0x79,0x31,0x45,0x30,0x43,0x06,0x03,0x55,0x04,0x03,0x13,0x3c,0x56,0x65,0x72,0x69, - 0x53,0x69,0x67,0x6e,0x20,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62, - 0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, - 0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72, - 0x69,0x74,0x79,0x20,0x2d,0x20,0x47,0x35,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09, - 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00, - 0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xaf,0x24,0x08,0x08,0x29,0x7a,0x35, - 0x9e,0x60,0x0c,0xaa,0xe7,0x4b,0x3b,0x4e,0xdc,0x7c,0xbc,0x3c,0x45,0x1c,0xbb,0x2b, - 0xe0,0xfe,0x29,0x02,0xf9,0x57,0x08,0xa3,0x64,0x85,0x15,0x27,0xf5,0xf1,0xad,0xc8, - 0x31,0x89,0x5d,0x22,0xe8,0x2a,0xaa,0xa6,0x42,0xb3,0x8f,0xf8,0xb9,0x55,0xb7,0xb1, - 0xb7,0x4b,0xb3,0xfe,0x8f,0x7e,0x07,0x57,0xec,0xef,0x43,0xdb,0x66,0x62,0x15,0x61, - 0xcf,0x60,0x0d,0xa4,0xd8,0xde,0xf8,0xe0,0xc3,0x62,0x08,0x3d,0x54,0x13,0xeb,0x49, - 0xca,0x59,0x54,0x85,0x26,0xe5,0x2b,0x8f,0x1b,0x9f,0xeb,0xf5,0xa1,0x91,0xc2,0x33, - 0x49,0xd8,0x43,0x63,0x6a,0x52,0x4b,0xd2,0x8f,0xe8,0x70,0x51,0x4d,0xd1,0x89,0x69, - 0x7b,0xc7,0x70,0xf6,0xb3,0xdc,0x12,0x74,0xdb,0x7b,0x5d,0x4b,0x56,0xd3,0x96,0xbf, - 0x15,0x77,0xa1,0xb0,0xf4,0xa2,0x25,0xf2,0xaf,0x1c,0x92,0x67,0x18,0xe5,0xf4,0x06, - 0x04,0xef,0x90,0xb9,0xe4,0x00,0xe4,0xdd,0x3a,0xb5,0x19,0xff,0x02,0xba,0xf4,0x3c, - 0xee,0xe0,0x8b,0xeb,0x37,0x8b,0xec,0xf4,0xd7,0xac,0xf2,0xf6,0xf0,0x3d,0xaf,0xdd, - 0x75,0x91,0x33,0x19,0x1d,0x1c,0x40,0xcb,0x74,0x24,0x19,0x21,0x93,0xd9,0x14,0xfe, - 0xac,0x2a,0x52,0xc7,0x8f,0xd5,0x04,0x49,0xe4,0x8d,0x63,0x47,0x88,0x3c,0x69,0x83, - 0xcb,0xfe,0x47,0xbd,0x2b,0x7e,0x4f,0xc5,0x95,0xae,0x0e,0x9d,0xd4,0xd1,0x43,0xc0, - 0x67,0x73,0xe3,0x14,0x08,0x7e,0xe5,0x3f,0x9f,0x73,0xb8,0x33,0x0a,0xcf,0x5d,0x3f, - 0x34,0x87,0x96,0x8a,0xee,0x53,0xe8,0x25,0x15,0x02,0x03,0x01,0x00,0x01,0xa3,0x81, - 0xb2,0x30,0x81,0xaf,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05, - 0x30,0x03,0x01,0x01,0xff,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04, - 0x04,0x03,0x02,0x01,0x06,0x30,0x6d,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01, - 0x0c,0x04,0x61,0x30,0x5f,0xa1,0x5d,0xa0,0x5b,0x30,0x59,0x30,0x57,0x30,0x55,0x16, - 0x09,0x69,0x6d,0x61,0x67,0x65,0x2f,0x67,0x69,0x66,0x30,0x21,0x30,0x1f,0x30,0x07, - 0x06,0x05,0x2b,0x0e,0x03,0x02,0x1a,0x04,0x14,0x8f,0xe5,0xd3,0x1a,0x86,0xac,0x8d, - 0x8e,0x6b,0xc3,0xcf,0x80,0x6a,0xd4,0x48,0x18,0x2c,0x7b,0x19,0x2e,0x30,0x25,0x16, - 0x23,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x6f,0x67,0x6f,0x2e,0x76,0x65,0x72, - 0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x76,0x73,0x6c,0x6f,0x67,0x6f, - 0x2e,0x67,0x69,0x66,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x7f, - 0xd3,0x65,0xa7,0xc2,0xdd,0xec,0xbb,0xf0,0x30,0x09,0xf3,0x43,0x39,0xfa,0x02,0xaf, - 0x33,0x31,0x33,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05, - 0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x93,0x24,0x4a,0x30,0x5f,0x62,0xcf,0xd8,0x1a, - 0x98,0x2f,0x3d,0xea,0xdc,0x99,0x2d,0xbd,0x77,0xf6,0xa5,0x79,0x22,0x38,0xec,0xc4, - 0xa7,0xa0,0x78,0x12,0xad,0x62,0x0e,0x45,0x70,0x64,0xc5,0xe7,0x97,0x66,0x2d,0x98, - 0x09,0x7e,0x5f,0xaf,0xd6,0xcc,0x28,0x65,0xf2,0x01,0xaa,0x08,0x1a,0x47,0xde,0xf9, - 0xf9,0x7c,0x92,0x5a,0x08,0x69,0x20,0x0d,0xd9,0x3e,0x6d,0x6e,0x3c,0x0d,0x6e,0xd8, - 0xe6,0x06,0x91,0x40,0x18,0xb9,0xf8,0xc1,0xed,0xdf,0xdb,0x41,0xaa,0xe0,0x96,0x20, - 0xc9,0xcd,0x64,0x15,0x38,0x81,0xc9,0x94,0xee,0xa2,0x84,0x29,0x0b,0x13,0x6f,0x8e, - 0xdb,0x0c,0xdd,0x25,0x02,0xdb,0xa4,0x8b,0x19,0x44,0xd2,0x41,0x7a,0x05,0x69,0x4a, - 0x58,0x4f,0x60,0xca,0x7e,0x82,0x6a,0x0b,0x02,0xaa,0x25,0x17,0x39,0xb5,0xdb,0x7f, - 0xe7,0x84,0x65,0x2a,0x95,0x8a,0xbd,0x86,0xde,0x5e,0x81,0x16,0x83,0x2d,0x10,0xcc, - 0xde,0xfd,0xa8,0x82,0x2a,0x6d,0x28,0x1f,0x0d,0x0b,0xc4,0xe5,0xe7,0x1a,0x26,0x19, - 0xe1,0xf4,0x11,0x6f,0x10,0xb5,0x95,0xfc,0xe7,0x42,0x05,0x32,0xdb,0xce,0x9d,0x51, - 0x5e,0x28,0xb6,0x9e,0x85,0xd3,0x5b,0xef,0xa5,0x7d,0x45,0x40,0x72,0x8e,0xb7,0x0e, - 0x6b,0x0e,0x06,0xfb,0x33,0x35,0x48,0x71,0xb8,0x9d,0x27,0x8b,0xc4,0x65,0x5f,0x0d, - 0x86,0x76,0x9c,0x44,0x7a,0xf6,0x95,0x5c,0xf6,0x5d,0x32,0x08,0x33,0xa4,0x54,0xb6, - 0x18,0x3f,0x68,0x5c,0xf2,0x42,0x4a,0x85,0x38,0x54,0x83,0x5f,0xd1,0xe8,0x2c,0xf2, - 0xac,0x11,0xd6,0xa8,0xed,0x63,0x6a, - }; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { - /* subject= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA */ - /* issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA */ - unsigned char XXX_certificate[969]={ - 0x30,0x82,0x03,0xc5,0x30,0x82,0x02,0xad,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x02, - 0xac,0x5c,0x26,0x6a,0x0b,0x40,0x9b,0x8f,0x0b,0x79,0xf2,0xae,0x46,0x25,0x77,0x30, - 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x6c, - 0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30, - 0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x44,0x69,0x67,0x69,0x43,0x65,0x72,0x74, - 0x20,0x49,0x6e,0x63,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0b,0x13,0x10,0x77, - 0x77,0x77,0x2e,0x64,0x69,0x67,0x69,0x63,0x65,0x72,0x74,0x2e,0x63,0x6f,0x6d,0x31, - 0x2b,0x30,0x29,0x06,0x03,0x55,0x04,0x03,0x13,0x22,0x44,0x69,0x67,0x69,0x43,0x65, - 0x72,0x74,0x20,0x48,0x69,0x67,0x68,0x20,0x41,0x73,0x73,0x75,0x72,0x61,0x6e,0x63, - 0x65,0x20,0x45,0x56,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d, - 0x30,0x36,0x31,0x31,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33, - 0x31,0x31,0x31,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x6c,0x31,0x0b, - 0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06, - 0x03,0x55,0x04,0x0a,0x13,0x0c,0x44,0x69,0x67,0x69,0x43,0x65,0x72,0x74,0x20,0x49, - 0x6e,0x63,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0b,0x13,0x10,0x77,0x77,0x77, - 0x2e,0x64,0x69,0x67,0x69,0x63,0x65,0x72,0x74,0x2e,0x63,0x6f,0x6d,0x31,0x2b,0x30, - 0x29,0x06,0x03,0x55,0x04,0x03,0x13,0x22,0x44,0x69,0x67,0x69,0x43,0x65,0x72,0x74, - 0x20,0x48,0x69,0x67,0x68,0x20,0x41,0x73,0x73,0x75,0x72,0x61,0x6e,0x63,0x65,0x20, - 0x45,0x56,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d, - 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01, - 0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xc6,0xcc,0xe5,0x73,0xe6, - 0xfb,0xd4,0xbb,0xe5,0x2d,0x2d,0x32,0xa6,0xdf,0xe5,0x81,0x3f,0xc9,0xcd,0x25,0x49, - 0xb6,0x71,0x2a,0xc3,0xd5,0x94,0x34,0x67,0xa2,0x0a,0x1c,0xb0,0x5f,0x69,0xa6,0x40, - 0xb1,0xc4,0xb7,0xb2,0x8f,0xd0,0x98,0xa4,0xa9,0x41,0x59,0x3a,0xd3,0xdc,0x94,0xd6, - 0x3c,0xdb,0x74,0x38,0xa4,0x4a,0xcc,0x4d,0x25,0x82,0xf7,0x4a,0xa5,0x53,0x12,0x38, - 0xee,0xf3,0x49,0x6d,0x71,0x91,0x7e,0x63,0xb6,0xab,0xa6,0x5f,0xc3,0xa4,0x84,0xf8, - 0x4f,0x62,0x51,0xbe,0xf8,0xc5,0xec,0xdb,0x38,0x92,0xe3,0x06,0xe5,0x08,0x91,0x0c, - 0xc4,0x28,0x41,0x55,0xfb,0xcb,0x5a,0x89,0x15,0x7e,0x71,0xe8,0x35,0xbf,0x4d,0x72, - 0x09,0x3d,0xbe,0x3a,0x38,0x50,0x5b,0x77,0x31,0x1b,0x8d,0xb3,0xc7,0x24,0x45,0x9a, - 0xa7,0xac,0x6d,0x00,0x14,0x5a,0x04,0xb7,0xba,0x13,0xeb,0x51,0x0a,0x98,0x41,0x41, - 0x22,0x4e,0x65,0x61,0x87,0x81,0x41,0x50,0xa6,0x79,0x5c,0x89,0xde,0x19,0x4a,0x57, - 0xd5,0x2e,0xe6,0x5d,0x1c,0x53,0x2c,0x7e,0x98,0xcd,0x1a,0x06,0x16,0xa4,0x68,0x73, - 0xd0,0x34,0x04,0x13,0x5c,0xa1,0x71,0xd3,0x5a,0x7c,0x55,0xdb,0x5e,0x64,0xe1,0x37, - 0x87,0x30,0x56,0x04,0xe5,0x11,0xb4,0x29,0x80,0x12,0xf1,0x79,0x39,0x88,0xa2,0x02, - 0x11,0x7c,0x27,0x66,0xb7,0x88,0xb7,0x78,0xf2,0xca,0x0a,0xa8,0x38,0xab,0x0a,0x64, - 0xc2,0xbf,0x66,0x5d,0x95,0x84,0xc1,0xa1,0x25,0x1e,0x87,0x5d,0x1a,0x50,0x0b,0x20, - 0x12,0xcc,0x41,0xbb,0x6e,0x0b,0x51,0x38,0xb8,0x4b,0xcb,0x02,0x03,0x01,0x00,0x01, - 0xa3,0x63,0x30,0x61,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04, - 0x03,0x02,0x01,0x86,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05, - 0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14, - 0xb1,0x3e,0xc3,0x69,0x03,0xf8,0xbf,0x47,0x01,0xd4,0x98,0x26,0x1a,0x08,0x02,0xef, - 0x63,0x64,0x2b,0xc3,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80, - 0x14,0xb1,0x3e,0xc3,0x69,0x03,0xf8,0xbf,0x47,0x01,0xd4,0x98,0x26,0x1a,0x08,0x02, - 0xef,0x63,0x64,0x2b,0xc3,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, - 0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x1c,0x1a,0x06,0x97,0xdc,0xd7,0x9c, - 0x9f,0x3c,0x88,0x66,0x06,0x08,0x57,0x21,0xdb,0x21,0x47,0xf8,0x2a,0x67,0xaa,0xbf, - 0x18,0x32,0x76,0x40,0x10,0x57,0xc1,0x8a,0xf3,0x7a,0xd9,0x11,0x65,0x8e,0x35,0xfa, - 0x9e,0xfc,0x45,0xb5,0x9e,0xd9,0x4c,0x31,0x4b,0xb8,0x91,0xe8,0x43,0x2c,0x8e,0xb3, - 0x78,0xce,0xdb,0xe3,0x53,0x79,0x71,0xd6,0xe5,0x21,0x94,0x01,0xda,0x55,0x87,0x9a, - 0x24,0x64,0xf6,0x8a,0x66,0xcc,0xde,0x9c,0x37,0xcd,0xa8,0x34,0xb1,0x69,0x9b,0x23, - 0xc8,0x9e,0x78,0x22,0x2b,0x70,0x43,0xe3,0x55,0x47,0x31,0x61,0x19,0xef,0x58,0xc5, - 0x85,0x2f,0x4e,0x30,0xf6,0xa0,0x31,0x16,0x23,0xc8,0xe7,0xe2,0x65,0x16,0x33,0xcb, - 0xbf,0x1a,0x1b,0xa0,0x3d,0xf8,0xca,0x5e,0x8b,0x31,0x8b,0x60,0x08,0x89,0x2d,0x0c, - 0x06,0x5c,0x52,0xb7,0xc4,0xf9,0x0a,0x98,0xd1,0x15,0x5f,0x9f,0x12,0xbe,0x7c,0x36, - 0x63,0x38,0xbd,0x44,0xa4,0x7f,0xe4,0x26,0x2b,0x0a,0xc4,0x97,0x69,0x0d,0xe9,0x8c, - 0xe2,0xc0,0x10,0x57,0xb8,0xc8,0x76,0x12,0x91,0x55,0xf2,0x48,0x69,0xd8,0xbc,0x2a, - 0x02,0x5b,0x0f,0x44,0xd4,0x20,0x31,0xdb,0xf4,0xba,0x70,0x26,0x5d,0x90,0x60,0x9e, - 0xbc,0x4b,0x17,0x09,0x2f,0xb4,0xcb,0x1e,0x43,0x68,0xc9,0x07,0x27,0xc1,0xd2,0x5c, - 0xf7,0xea,0x21,0xb9,0x68,0x12,0x9c,0x3c,0x9c,0xbf,0x9e,0xfc,0x80,0x5c,0x9b,0x63, - 0xcd,0xec,0x47,0xaa,0x25,0x27,0x67,0xa0,0x37,0xf3,0x00,0x82,0x7d,0x54,0xd7,0xa9, - 0xf8,0xe9,0x2e,0x13,0xa3,0x77,0xe8,0x1f,0x4a, - }; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { - /* subject= /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2008 VeriSign, Inc. - For authorized use only/CN=VeriSign Universal Root Certification Authority */ - /* issuer= /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2008 VeriSign, Inc. - For authorized use only/CN=VeriSign Universal Root Certification Authority */ - unsigned char XXX_certificate[1213]={ - 0x30,0x82,0x04,0xb9,0x30,0x82,0x03,0xa1,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x40, - 0x1a,0xc4,0x64,0x21,0xb3,0x13,0x21,0x03,0x0e,0xbb,0xe4,0x12,0x1a,0xc5,0x1d,0x30, - 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x30,0x81, - 0xbd,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, - 0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, - 0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, - 0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73,0x74, - 0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04, - 0x0b,0x13,0x31,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x38,0x20,0x56,0x65,0x72,0x69, - 0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72, - 0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20, - 0x6f,0x6e,0x6c,0x79,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x03,0x13,0x2f,0x56, - 0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x55,0x6e,0x69,0x76,0x65,0x72,0x73,0x61, - 0x6c,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, - 0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e, - 0x17,0x0d,0x30,0x38,0x30,0x34,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17, - 0x0d,0x33,0x37,0x31,0x32,0x30,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81, - 0xbd,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, - 0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, - 0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, - 0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73,0x74, - 0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04, - 0x0b,0x13,0x31,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x38,0x20,0x56,0x65,0x72,0x69, - 0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72, - 0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20, - 0x6f,0x6e,0x6c,0x79,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x03,0x13,0x2f,0x56, - 0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x55,0x6e,0x69,0x76,0x65,0x72,0x73,0x61, - 0x6c,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, - 0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x82, - 0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, - 0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xc7, - 0x61,0x37,0x5e,0xb1,0x01,0x34,0xdb,0x62,0xd7,0x15,0x9b,0xff,0x58,0x5a,0x8c,0x23, - 0x23,0xd6,0x60,0x8e,0x91,0xd7,0x90,0x98,0x83,0x7a,0xe6,0x58,0x19,0x38,0x8c,0xc5, - 0xf6,0xe5,0x64,0x85,0xb4,0xa2,0x71,0xfb,0xed,0xbd,0xb9,0xda,0xcd,0x4d,0x00,0xb4, - 0xc8,0x2d,0x73,0xa5,0xc7,0x69,0x71,0x95,0x1f,0x39,0x3c,0xb2,0x44,0x07,0x9c,0xe8, - 0x0e,0xfa,0x4d,0x4a,0xc4,0x21,0xdf,0x29,0x61,0x8f,0x32,0x22,0x61,0x82,0xc5,0x87, - 0x1f,0x6e,0x8c,0x7c,0x5f,0x16,0x20,0x51,0x44,0xd1,0x70,0x4f,0x57,0xea,0xe3,0x1c, - 0xe3,0xcc,0x79,0xee,0x58,0xd8,0x0e,0xc2,0xb3,0x45,0x93,0xc0,0x2c,0xe7,0x9a,0x17, - 0x2b,0x7b,0x00,0x37,0x7a,0x41,0x33,0x78,0xe1,0x33,0xe2,0xf3,0x10,0x1a,0x7f,0x87, - 0x2c,0xbe,0xf6,0xf5,0xf7,0x42,0xe2,0xe5,0xbf,0x87,0x62,0x89,0x5f,0x00,0x4b,0xdf, - 0xc5,0xdd,0xe4,0x75,0x44,0x32,0x41,0x3a,0x1e,0x71,0x6e,0x69,0xcb,0x0b,0x75,0x46, - 0x08,0xd1,0xca,0xd2,0x2b,0x95,0xd0,0xcf,0xfb,0xb9,0x40,0x6b,0x64,0x8c,0x57,0x4d, - 0xfc,0x13,0x11,0x79,0x84,0xed,0x5e,0x54,0xf6,0x34,0x9f,0x08,0x01,0xf3,0x10,0x25, - 0x06,0x17,0x4a,0xda,0xf1,0x1d,0x7a,0x66,0x6b,0x98,0x60,0x66,0xa4,0xd9,0xef,0xd2, - 0x2e,0x82,0xf1,0xf0,0xef,0x09,0xea,0x44,0xc9,0x15,0x6a,0xe2,0x03,0x6e,0x33,0xd3, - 0xac,0x9f,0x55,0x00,0xc7,0xf6,0x08,0x6a,0x94,0xb9,0x5f,0xdc,0xe0,0x33,0xf1,0x84, - 0x60,0xf9,0x5b,0x27,0x11,0xb4,0xfc,0x16,0xf2,0xbb,0x56,0x6a,0x80,0x25,0x8d,0x02, - 0x03,0x01,0x00,0x01,0xa3,0x81,0xb2,0x30,0x81,0xaf,0x30,0x0f,0x06,0x03,0x55,0x1d, - 0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0e,0x06,0x03,0x55, - 0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x6d,0x06,0x08,0x2b, - 0x06,0x01,0x05,0x05,0x07,0x01,0x0c,0x04,0x61,0x30,0x5f,0xa1,0x5d,0xa0,0x5b,0x30, - 0x59,0x30,0x57,0x30,0x55,0x16,0x09,0x69,0x6d,0x61,0x67,0x65,0x2f,0x67,0x69,0x66, - 0x30,0x21,0x30,0x1f,0x30,0x07,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1a,0x04,0x14,0x8f, - 0xe5,0xd3,0x1a,0x86,0xac,0x8d,0x8e,0x6b,0xc3,0xcf,0x80,0x6a,0xd4,0x48,0x18,0x2c, - 0x7b,0x19,0x2e,0x30,0x25,0x16,0x23,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,0x6f, - 0x67,0x6f,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f, - 0x76,0x73,0x6c,0x6f,0x67,0x6f,0x2e,0x67,0x69,0x66,0x30,0x1d,0x06,0x03,0x55,0x1d, - 0x0e,0x04,0x16,0x04,0x14,0xb6,0x77,0xfa,0x69,0x48,0x47,0x9f,0x53,0x12,0xd5,0xc2, - 0xea,0x07,0x32,0x76,0x07,0xd1,0x97,0x07,0x19,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, - 0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x4a,0xf8,0xf8, - 0xb0,0x03,0xe6,0x2c,0x67,0x7b,0xe4,0x94,0x77,0x63,0xcc,0x6e,0x4c,0xf9,0x7d,0x0e, - 0x0d,0xdc,0xc8,0xb9,0x35,0xb9,0x70,0x4f,0x63,0xfa,0x24,0xfa,0x6c,0x83,0x8c,0x47, - 0x9d,0x3b,0x63,0xf3,0x9a,0xf9,0x76,0x32,0x95,0x91,0xb1,0x77,0xbc,0xac,0x9a,0xbe, - 0xb1,0xe4,0x31,0x21,0xc6,0x81,0x95,0x56,0x5a,0x0e,0xb1,0xc2,0xd4,0xb1,0xa6,0x59, - 0xac,0xf1,0x63,0xcb,0xb8,0x4c,0x1d,0x59,0x90,0x4a,0xef,0x90,0x16,0x28,0x1f,0x5a, - 0xae,0x10,0xfb,0x81,0x50,0x38,0x0c,0x6c,0xcc,0xf1,0x3d,0xc3,0xf5,0x63,0xe3,0xb3, - 0xe3,0x21,0xc9,0x24,0x39,0xe9,0xfd,0x15,0x66,0x46,0xf4,0x1b,0x11,0xd0,0x4d,0x73, - 0xa3,0x7d,0x46,0xf9,0x3d,0xed,0xa8,0x5f,0x62,0xd4,0xf1,0x3f,0xf8,0xe0,0x74,0x57, - 0x2b,0x18,0x9d,0x81,0xb4,0xc4,0x28,0xda,0x94,0x97,0xa5,0x70,0xeb,0xac,0x1d,0xbe, - 0x07,0x11,0xf0,0xd5,0xdb,0xdd,0xe5,0x8c,0xf0,0xd5,0x32,0xb0,0x83,0xe6,0x57,0xe2, - 0x8f,0xbf,0xbe,0xa1,0xaa,0xbf,0x3d,0x1d,0xb5,0xd4,0x38,0xea,0xd7,0xb0,0x5c,0x3a, - 0x4f,0x6a,0x3f,0x8f,0xc0,0x66,0x6c,0x63,0xaa,0xe9,0xd9,0xa4,0x16,0xf4,0x81,0xd1, - 0x95,0x14,0x0e,0x7d,0xcd,0x95,0x34,0xd9,0xd2,0x8f,0x70,0x73,0x81,0x7b,0x9c,0x7e, - 0xbd,0x98,0x61,0xd8,0x45,0x87,0x98,0x90,0xc5,0xeb,0x86,0x30,0xc6,0x35,0xbf,0xf0, - 0xff,0xc3,0x55,0x88,0x83,0x4b,0xef,0x05,0x92,0x06,0x71,0xf2,0xb8,0x98,0x93,0xb7, - 0xec,0xcd,0x82,0x61,0xf1,0x38,0xe6,0x4f,0x97,0x98,0x2a,0x5a,0x8d, - }; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - { - /* subject= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Trusted Root G4 */ - /* issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Trusted Root G4 */ - unsigned char XXX_certificate[1428]={ - 0x30,0x82,0x05,0x90,0x30,0x82,0x03,0x78,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x05, - 0x9b,0x1b,0x57,0x9e,0x8e,0x21,0x32,0xe2,0x39,0x07,0xbd,0xa7,0x77,0x75,0x5c,0x30, - 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x30,0x62, - 0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30, - 0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x44,0x69,0x67,0x69,0x43,0x65,0x72,0x74, - 0x20,0x49,0x6e,0x63,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0b,0x13,0x10,0x77, - 0x77,0x77,0x2e,0x64,0x69,0x67,0x69,0x63,0x65,0x72,0x74,0x2e,0x63,0x6f,0x6d,0x31, - 0x21,0x30,0x1f,0x06,0x03,0x55,0x04,0x03,0x13,0x18,0x44,0x69,0x67,0x69,0x43,0x65, - 0x72,0x74,0x20,0x54,0x72,0x75,0x73,0x74,0x65,0x64,0x20,0x52,0x6f,0x6f,0x74,0x20, - 0x47,0x34,0x30,0x1e,0x17,0x0d,0x31,0x33,0x30,0x38,0x30,0x31,0x31,0x32,0x30,0x30, - 0x30,0x30,0x5a,0x17,0x0d,0x33,0x38,0x30,0x31,0x31,0x35,0x31,0x32,0x30,0x30,0x30, - 0x30,0x5a,0x30,0x62,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, - 0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x44,0x69,0x67,0x69, - 0x43,0x65,0x72,0x74,0x20,0x49,0x6e,0x63,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04, - 0x0b,0x13,0x10,0x77,0x77,0x77,0x2e,0x64,0x69,0x67,0x69,0x63,0x65,0x72,0x74,0x2e, - 0x63,0x6f,0x6d,0x31,0x21,0x30,0x1f,0x06,0x03,0x55,0x04,0x03,0x13,0x18,0x44,0x69, - 0x67,0x69,0x43,0x65,0x72,0x74,0x20,0x54,0x72,0x75,0x73,0x74,0x65,0x64,0x20,0x52, - 0x6f,0x6f,0x74,0x20,0x47,0x34,0x30,0x82,0x02,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86, - 0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x02,0x0f,0x00,0x30,0x82, - 0x02,0x0a,0x02,0x82,0x02,0x01,0x00,0xbf,0xe6,0x90,0x73,0x68,0xde,0xbb,0xe4,0x5d, - 0x4a,0x3c,0x30,0x22,0x30,0x69,0x33,0xec,0xc2,0xa7,0x25,0x2e,0xc9,0x21,0x3d,0xf2, - 0x8a,0xd8,0x59,0xc2,0xe1,0x29,0xa7,0x3d,0x58,0xab,0x76,0x9a,0xcd,0xae,0x7b,0x1b, - 0x84,0x0d,0xc4,0x30,0x1f,0xf3,0x1b,0xa4,0x38,0x16,0xeb,0x56,0xc6,0x97,0x6d,0x1d, - 0xab,0xb2,0x79,0xf2,0xca,0x11,0xd2,0xe4,0x5f,0xd6,0x05,0x3c,0x52,0x0f,0x52,0x1f, - 0xc6,0x9e,0x15,0xa5,0x7e,0xbe,0x9f,0xa9,0x57,0x16,0x59,0x55,0x72,0xaf,0x68,0x93, - 0x70,0xc2,0xb2,0xba,0x75,0x99,0x6a,0x73,0x32,0x94,0xd1,0x10,0x44,0x10,0x2e,0xdf, - 0x82,0xf3,0x07,0x84,0xe6,0x74,0x3b,0x6d,0x71,0xe2,0x2d,0x0c,0x1b,0xee,0x20,0xd5, - 0xc9,0x20,0x1d,0x63,0x29,0x2d,0xce,0xec,0x5e,0x4e,0xc8,0x93,0xf8,0x21,0x61,0x9b, - 0x34,0xeb,0x05,0xc6,0x5e,0xec,0x5b,0x1a,0xbc,0xeb,0xc9,0xcf,0xcd,0xac,0x34,0x40, - 0x5f,0xb1,0x7a,0x66,0xee,0x77,0xc8,0x48,0xa8,0x66,0x57,0x57,0x9f,0x54,0x58,0x8e, - 0x0c,0x2b,0xb7,0x4f,0xa7,0x30,0xd9,0x56,0xee,0xca,0x7b,0x5d,0xe3,0xad,0xc9,0x4f, - 0x5e,0xe5,0x35,0xe7,0x31,0xcb,0xda,0x93,0x5e,0xdc,0x8e,0x8f,0x80,0xda,0xb6,0x91, - 0x98,0x40,0x90,0x79,0xc3,0x78,0xc7,0xb6,0xb1,0xc4,0xb5,0x6a,0x18,0x38,0x03,0x10, - 0x8d,0xd8,0xd4,0x37,0xa4,0x2e,0x05,0x7d,0x88,0xf5,0x82,0x3e,0x10,0x91,0x70,0xab, - 0x55,0x82,0x41,0x32,0xd7,0xdb,0x04,0x73,0x2a,0x6e,0x91,0x01,0x7c,0x21,0x4c,0xd4, - 0xbc,0xae,0x1b,0x03,0x75,0x5d,0x78,0x66,0xd9,0x3a,0x31,0x44,0x9a,0x33,0x40,0xbf, - 0x08,0xd7,0x5a,0x49,0xa4,0xc2,0xe6,0xa9,0xa0,0x67,0xdd,0xa4,0x27,0xbc,0xa1,0x4f, - 0x39,0xb5,0x11,0x58,0x17,0xf7,0x24,0x5c,0x46,0x8f,0x64,0xf7,0xc1,0x69,0x88,0x76, - 0x98,0x76,0x3d,0x59,0x5d,0x42,0x76,0x87,0x89,0x97,0x69,0x7a,0x48,0xf0,0xe0,0xa2, - 0x12,0x1b,0x66,0x9a,0x74,0xca,0xde,0x4b,0x1e,0xe7,0x0e,0x63,0xae,0xe6,0xd4,0xef, - 0x92,0x92,0x3a,0x9e,0x3d,0xdc,0x00,0xe4,0x45,0x25,0x89,0xb6,0x9a,0x44,0x19,0x2b, - 0x7e,0xc0,0x94,0xb4,0xd2,0x61,0x6d,0xeb,0x33,0xd9,0xc5,0xdf,0x4b,0x04,0x00,0xcc, - 0x7d,0x1c,0x95,0xc3,0x8f,0xf7,0x21,0xb2,0xb2,0x11,0xb7,0xbb,0x7f,0xf2,0xd5,0x8c, - 0x70,0x2c,0x41,0x60,0xaa,0xb1,0x63,0x18,0x44,0x95,0x1a,0x76,0x62,0x7e,0xf6,0x80, - 0xb0,0xfb,0xe8,0x64,0xa6,0x33,0xd1,0x89,0x07,0xe1,0xbd,0xb7,0xe6,0x43,0xa4,0x18, - 0xb8,0xa6,0x77,0x01,0xe1,0x0f,0x94,0x0c,0x21,0x1d,0xb2,0x54,0x29,0x25,0x89,0x6c, - 0xe5,0x0e,0x52,0x51,0x47,0x74,0xbe,0x26,0xac,0xb6,0x41,0x75,0xde,0x7a,0xac,0x5f, - 0x8d,0x3f,0xc9,0xbc,0xd3,0x41,0x11,0x12,0x5b,0xe5,0x10,0x50,0xeb,0x31,0xc5,0xca, - 0x72,0x16,0x22,0x09,0xdf,0x7c,0x4c,0x75,0x3f,0x63,0xec,0x21,0x5f,0xc4,0x20,0x51, - 0x6b,0x6f,0xb1,0xab,0x86,0x8b,0x4f,0xc2,0xd6,0x45,0x5f,0x9d,0x20,0xfc,0xa1,0x1e, - 0xc5,0xc0,0x8f,0xa2,0xb1,0x7e,0x0a,0x26,0x99,0xf5,0xe4,0x69,0x2f,0x98,0x1d,0x2d, - 0xf5,0xd9,0xa9,0xb2,0x1d,0xe5,0x1b,0x02,0x03,0x01,0x00,0x01,0xa3,0x42,0x30,0x40, - 0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01, - 0xff,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x01, - 0x86,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xec,0xd7,0xe3,0x82, - 0xd2,0x71,0x5d,0x64,0x4c,0xdf,0x2e,0x67,0x3f,0xe7,0xba,0x98,0xae,0x1c,0x0f,0x4f, - 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x03, - 0x82,0x02,0x01,0x00,0xbb,0x61,0xd9,0x7d,0xa9,0x6c,0xbe,0x17,0xc4,0x91,0x1b,0xc3, - 0xa1,0xa2,0x00,0x8d,0xe3,0x64,0x68,0x0f,0x56,0xcf,0x77,0xae,0x70,0xf9,0xfd,0x9a, - 0x4a,0x99,0xb9,0xc9,0x78,0x5c,0x0c,0x0c,0x5f,0xe4,0xe6,0x14,0x29,0x56,0x0b,0x36, - 0x49,0x5d,0x44,0x63,0xe0,0xad,0x9c,0x96,0x18,0x66,0x1b,0x23,0x0d,0x3d,0x79,0xe9, - 0x6d,0x6b,0xd6,0x54,0xf8,0xd2,0x3c,0xc1,0x43,0x40,0xae,0x1d,0x50,0xf5,0x52,0xfc, - 0x90,0x3b,0xbb,0x98,0x99,0x69,0x6b,0xc7,0xc1,0xa7,0xa8,0x68,0xa4,0x27,0xdc,0x9d, - 0xf9,0x27,0xae,0x30,0x85,0xb9,0xf6,0x67,0x4d,0x3a,0x3e,0x8f,0x59,0x39,0x22,0x53, - 0x44,0xeb,0xc8,0x5d,0x03,0xca,0xed,0x50,0x7a,0x7d,0x62,0x21,0x0a,0x80,0xc8,0x73, - 0x66,0xd1,0xa0,0x05,0x60,0x5f,0xe8,0xa5,0xb4,0xa7,0xaf,0xa8,0xf7,0x6d,0x35,0x9c, - 0x7c,0x5a,0x8a,0xd6,0xa2,0x38,0x99,0xf3,0x78,0x8b,0xf4,0x4d,0xd2,0x20,0x0b,0xde, - 0x04,0xee,0x8c,0x9b,0x47,0x81,0x72,0x0d,0xc0,0x14,0x32,0xef,0x30,0x59,0x2e,0xae, - 0xe0,0x71,0xf2,0x56,0xe4,0x6a,0x97,0x6f,0x92,0x50,0x6d,0x96,0x8d,0x68,0x7a,0x9a, - 0xb2,0x36,0x14,0x7a,0x06,0xf2,0x24,0xb9,0x09,0x11,0x50,0xd7,0x08,0xb1,0xb8,0x89, - 0x7a,0x84,0x23,0x61,0x42,0x29,0xe5,0xa3,0xcd,0xa2,0x20,0x41,0xd7,0xd1,0x9c,0x64, - 0xd9,0xea,0x26,0xa1,0x8b,0x14,0xd7,0x4c,0x19,0xb2,0x50,0x41,0x71,0x3d,0x3f,0x4d, - 0x70,0x23,0x86,0x0c,0x4a,0xdc,0x81,0xd2,0xcc,0x32,0x94,0x84,0x0d,0x08,0x09,0x97, - 0x1c,0x4f,0xc0,0xee,0x6b,0x20,0x74,0x30,0xd2,0xe0,0x39,0x34,0x10,0x85,0x21,0x15, - 0x01,0x08,0xe8,0x55,0x32,0xde,0x71,0x49,0xd9,0x28,0x17,0x50,0x4d,0xe6,0xbe,0x4d, - 0xd1,0x75,0xac,0xd0,0xca,0xfb,0x41,0xb8,0x43,0xa5,0xaa,0xd3,0xc3,0x05,0x44,0x4f, - 0x2c,0x36,0x9b,0xe2,0xfa,0xe2,0x45,0xb8,0x23,0x53,0x6c,0x06,0x6f,0x67,0x55,0x7f, - 0x46,0xb5,0x4c,0x3f,0x6e,0x28,0x5a,0x79,0x26,0xd2,0xa4,0xa8,0x62,0x97,0xd2,0x1e, - 0xe2,0xed,0x4a,0x8b,0xbc,0x1b,0xfd,0x47,0x4a,0x0d,0xdf,0x67,0x66,0x7e,0xb2,0x5b, - 0x41,0xd0,0x3b,0xe4,0xf4,0x3b,0xf4,0x04,0x63,0xe9,0xef,0xc2,0x54,0x00,0x51,0xa0, - 0x8a,0x2a,0xc9,0xce,0x78,0xcc,0xd5,0xea,0x87,0x04,0x18,0xb3,0xce,0xaf,0x49,0x88, - 0xaf,0xf3,0x92,0x99,0xb6,0xb3,0xe6,0x61,0x0f,0xd2,0x85,0x00,0xe7,0x50,0x1a,0xe4, - 0x1b,0x95,0x9d,0x19,0xa1,0xb9,0x9c,0xb1,0x9b,0xb1,0x00,0x1e,0xef,0xd0,0x0f,0x4f, - 0x42,0x6c,0xc9,0x0a,0xbc,0xee,0x43,0xfa,0x3a,0x71,0xa5,0xc8,0x4d,0x26,0xa5,0x35, - 0xfd,0x89,0x5d,0xbc,0x85,0x62,0x1d,0x32,0xd2,0xa0,0x2b,0x54,0xed,0x9a,0x57,0xc1, - 0xdb,0xfa,0x10,0xcf,0x19,0xb7,0x8b,0x4a,0x1b,0x8f,0x01,0xb6,0x27,0x95,0x53,0xe8, - 0xb6,0x89,0x6d,0x5b,0xbc,0x68,0xd4,0x23,0xe8,0x8b,0x51,0xa2,0x56,0xf9,0xf0,0xa6, - 0x80,0xa0,0xd6,0x1e,0xb3,0xbc,0x0f,0x0f,0x53,0x75,0x29,0xaa,0xea,0x13,0x77,0xe4, - 0xde,0x8c,0x81,0x21,0xad,0x07,0x10,0x47,0x11,0xad,0x87,0x3d,0x07,0xd1,0x75,0xbc, - 0xcf,0xf3,0x66,0x7e, - }; - [trustedCertificates addObject:[NSData dataWithBytes:XXX_certificate length:sizeof(XXX_certificate)]]; - } - return [NSArray arrayWithArray:trustedCertificates]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTSimpleKeychain.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTSimpleKeychain.m deleted file mode 100755 index a4a8dc26..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTSimpleKeychain.m +++ /dev/null @@ -1,128 +0,0 @@ -// adapted from https://raw.github.com/rackspace/rackspace-ios/master/Classes/Keychain.m - -// -// PPOTSimpleKeychain.m -// OpenStack -// -// Based on CardIOKeychain -// Based on KeychainWrapper in BadassVNC by Dylan Barrie -// -// Created by Mike Mayo on 10/1/10. -// The OpenStack project is provided under the Apache 2.0 license. -// - -#import "PPOTSimpleKeychain.h" -#import "PPOTMacros.h" -#import -#import - -@implementation PPOTSimpleKeychain - -+ (NSString *)keychainKeyForKey:(NSString *)key { - // WARNING: don't change this line unless you know what you doing - // If the app upgraded from mSDK (PayPal Touch) to OTC, we want to re-use app GUID; - // therefore we are using the same keychain key. - return [NSString stringWithFormat:CARDIO_STR(@"card.io - %@"), key]; -} - -+ (BOOL)setData:(NSData *)data forKey:(NSString *)key { - if (!key) { - return NO; - } - - BOOL success = YES; - - key = [self keychainKeyForKey:key]; - -#if TARGET_IPHONE_SIMULATOR - // since keychain sometimes is not available when running unit tests from the terminal - // we decided to simply use user defaults - [[NSUserDefaults standardUserDefaults] setValue:data ? data : [NSData data] forKey:key]; - [[NSUserDefaults standardUserDefaults] synchronize]; - return success; -#else - - // First check if it already exists, by creating a search dictionary and requesting that - // nothing be returned, and performing the search anyway. - NSMutableDictionary *existsQueryDictionary = [NSMutableDictionary dictionary]; - - [existsQueryDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass]; - - // Add the keys to the search dict - [existsQueryDictionary setObject:CARDIO_STR(@"service") forKey:(__bridge id)kSecAttrService]; - [existsQueryDictionary setObject:key forKey:(__bridge id)kSecAttrAccount]; - - OSStatus res = SecItemCopyMatching((__bridge CFDictionaryRef)existsQueryDictionary, NULL); - if (res == errSecItemNotFound) { - if (data) { - NSMutableDictionary *addDict = existsQueryDictionary; - [addDict setObject:data forKey:(__bridge id)kSecValueData]; - [addDict setObject:(__bridge id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly forKey:(__bridge id)kSecAttrAccessible]; - - res = SecItemAdd((__bridge CFDictionaryRef)addDict, NULL); - if (res != errSecSuccess) { - success = NO; - } - } - } else if (res == errSecSuccess) { - if(data) { - // Modify an existing one - // Actually pull it now off the keychain at this point. - NSDictionary *attributeDict = [NSDictionary dictionaryWithObject:data forKey:(__bridge id)kSecValueData]; - - res = SecItemUpdate((__bridge CFDictionaryRef)existsQueryDictionary, (__bridge CFDictionaryRef)attributeDict); - if (res != errSecSuccess) { - success = NO; - } - } else { - SecItemDelete((__bridge CFDictionaryRef)existsQueryDictionary); - } - } else { - success = NO; - } - - return success; -#endif -} - -+ (NSData *)dataForKey:(NSString *)key { - - key = [self keychainKeyForKey:key]; - -#if TARGET_IPHONE_SIMULATOR - return [[NSUserDefaults standardUserDefaults] valueForKey:key]; -#else - - NSMutableDictionary *existsQueryDictionary = [NSMutableDictionary dictionary]; - - [existsQueryDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass]; - - // Add the keys to the search dict - [existsQueryDictionary setObject:CARDIO_STR(@"service") forKey:(__bridge id)kSecAttrService]; - [existsQueryDictionary setObject:key forKey:(__bridge id)kSecAttrAccount]; - - // We want the data back! - [existsQueryDictionary setObject:(id)kCFBooleanTrue forKey:(__bridge id)kSecReturnData]; - - CFTypeRef cfData = NULL; - OSStatus res = SecItemCopyMatching((__bridge CFDictionaryRef)existsQueryDictionary, &cfData); - NSData *data = (id)CFBridgingRelease(cfData); - if (res == errSecSuccess) { - return data; - } - - return nil; -#endif -} - -+ (id)unarchiveObjectWithDataForKey:(NSString *)key { - NSData *data = [PPOTSimpleKeychain dataForKey:key]; - if ([data length]) { - return [NSKeyedUnarchiver unarchiveObjectWithData:data]; - } - else { - return nil; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTString.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTString.m deleted file mode 100755 index 8c01095a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTString.m +++ /dev/null @@ -1,237 +0,0 @@ -// -// PPOTString.m -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTString.h" -#import "PPOTMacros.h" -#import - -static const short _base64DecodingTable[256] = { - -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -2, -1, -1, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -2, -2, -2, - -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, -2, - -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2 -}; - -@implementation PPOTString - -+ (NSString *)stringByURLEncodingAllCharactersInString:(NSString *)aString { - NSString *reservedCharacters = @"&()<>@,;:\\\"/[]?=+$|^~`{}"; - - NSMutableCharacterSet *URLQueryPartAllowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; - [URLQueryPartAllowedCharacterSet removeCharactersInString:reservedCharacters]; - - return [aString stringByAddingPercentEncodingWithAllowedCharacters:URLQueryPartAllowedCharacterSet]; -} - -// This base 64 encoding adapted from Colloquy's BSD-licensed Chat Core library - -static char base64encodingTable[64] = { - 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', - 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', - 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' -}; - -+ (NSString *)stringByBase64EncodingData:(NSData *)data { - return [self stringByBase64EncodingData:data lineLength:0]; -} - -+ (NSString *)stringByBase64EncodingData:(NSData *)data lineLength:(NSUInteger)lineLength { - const unsigned char *bytes = [data bytes]; - NSMutableString *result = [NSMutableString stringWithCapacity:[data length]]; - unsigned long ixtext = 0; - unsigned long lentext = [data length]; - long ctremaining = 0; - unsigned char inbuf[3], outbuf[4]; - unsigned short i = 0; - unsigned short charsonline = 0, ctcopy = 0; - unsigned long ix = 0; - - while( YES ) { - ctremaining = lentext - ixtext; - if( ctremaining <= 0 ) break; - - for( i = 0; i < 3; i++ ) { - ix = ixtext + i; - if( ix < lentext ) inbuf[i] = bytes[ix]; - else inbuf [i] = 0; - } - - outbuf [0] = (unsigned char)((inbuf [0] & 0xFC) >> 2); - outbuf [1] = (unsigned char)(((inbuf [0] & 0x03) << 4) | ((inbuf [1] & 0xF0) >> 4)); - outbuf [2] = (unsigned char)(((inbuf [1] & 0x0F) << 2) | ((inbuf [2] & 0xC0) >> 6)); - outbuf [3] = inbuf [2] & 0x3F; - ctcopy = 4; - - switch( ctremaining ) { - case 1: - ctcopy = 2; - break; - case 2: - ctcopy = 3; - break; - } - - for( i = 0; i < ctcopy; i++ ) - [result appendFormat:@"%c", base64encodingTable[outbuf[i]]]; - - for( i = ctcopy; i < 4; i++ ) - [result appendString:@"="]; - - ixtext += 3; - charsonline += 4; - - if( lineLength > 0 ) { - if( charsonline >= lineLength ) { - charsonline = 0; - [result appendString:@"\n"]; - } - } - } - - return [NSString stringWithString:result]; -} - - -+ (NSData *)decodeBase64WithString:(NSString *)strBase64 { - const char * objPointer = [strBase64 cStringUsingEncoding:NSASCIIStringEncoding]; - if (objPointer == NULL) return nil; - size_t intLength = strlen(objPointer); - int intCurrent; - int i = 0, j = 0, k; - - unsigned char * objResult; - objResult = calloc(intLength, sizeof(unsigned char)); - - // Run through the whole string, converting as we go - while ( ((intCurrent = *objPointer++) != '\0') && (intLength-- > 0) ) { - if (intCurrent == '=') { - if (*objPointer != '=' && ((i % 4) == 1)) {// || (intLength > 0)) { - // the padding character is invalid at this point -- so this entire string is invalid - free(objResult); - return nil; - } - continue; - } - - intCurrent = _base64DecodingTable[intCurrent]; - if (intCurrent == -1) { - // we're at a whitespace -- simply skip over - continue; - } else if (intCurrent == -2) { - // we're at an invalid character - free(objResult); - return nil; - } - - switch (i % 4) { - case 0: - objResult[j] = (unsigned char)(intCurrent << 2); - break; - - case 1: - objResult[j++] |= (unsigned char)(intCurrent >> 4); - objResult[j] = (unsigned char)((intCurrent & 0x0f) << 4); - break; - - case 2: - objResult[j++] |= (unsigned char)(intCurrent >>2); - objResult[j] = (unsigned char)((intCurrent & 0x03) << 6); - break; - - case 3: - objResult[j++] |= (unsigned char)intCurrent; - break; - } - i++; - } - - // mop things up if we ended on a boundary - k = j; - if (intCurrent == '=') { - switch (i % 4) { - case 1: - // Invalid state - free(objResult); - return nil; - - case 2: - k++; - // flow through - case 3: - objResult[k] = 0; - } - } - - // Cleanup and setup the return NSData - return [[NSData alloc] initWithBytesNoCopy:objResult length:j freeWhenDone:YES]; -} - -+ (NSUInteger)numberOfLinesInString:(NSString *)str { - // probably not the most efficient implementation (see e.g. https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TextLayout/Tasks/CountLines.html) - // ...but very obviously correct :) - __block NSUInteger nLines = 0; - [str enumerateLinesUsingBlock:^(__attribute__((unused)) NSString *line, BOOL *stop) { - nLines++; - *stop = NO; - }]; - return nLines; -} - -+ (NSString *)generateUniquishIdentifier { - CFUUIDRef uuid = CFUUIDCreate(NULL); - CFStringRef uuidStr = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - NSString *result = (__bridge_transfer NSString *)uuidStr; - return result; -} - -#pragma mark - Hex String - -+ (NSString *)hexStringFromData:(NSData *)data { - NSMutableString *hexString = [NSMutableString string]; - const char* bytes = [data bytes]; - for (NSUInteger index = 0; index < data.length; index++) { - [hexString appendFormat:@"%02hhX", bytes[index]]; - } - return hexString; -} - -+ (NSData *)dataWithHexString:(NSString *)hexString { - // - // NSData+HexString.m - // libsecurity_transform - // - // Copyright (c) 2011 Apple, Inc. All rights reserved. - // - char buf[3]; - buf[2] = '\0'; - NSAssert(0 == [hexString length] % 2, @"Hex strings should have an even number of digits (%@)", hexString); - unsigned char *bytes = malloc([hexString length]/2); - unsigned char *bp = bytes; - for (NSUInteger i = 0; i < [hexString length]; i += 2) { - buf[0] = [hexString characterAtIndex:i]; - buf[1] = [hexString characterAtIndex:i+1]; - char *b2 = NULL; - *bp++ = strtol(buf, &b2, 16); - //NSAssert(b2 == buf + 2, @"String should be all hex digits: %@ (bad digit around %ld)", hexString, i); - } - - return [NSData dataWithBytesNoCopy:bytes length:[hexString length]/2 freeWhenDone:YES]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTTime.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTTime.m deleted file mode 100755 index b84a7a36..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTTime.m +++ /dev/null @@ -1,63 +0,0 @@ -// -// PPOTTime.m -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import "PPOTMacros.h" -#import "PPOTTime.h" - -@implementation PPOTTime - -+ (NSDateFormatter *)rfc3339DateFormatter { - /* - Adapted from the Apple docs someplace... - - Note that this does not handle all possible - RFC 3339 date time strings, just one of the most common styles. - */ - static NSDateFormatter *rfc3339DateFormatter; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - rfc3339DateFormatter = [[NSDateFormatter alloc] init]; - NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; - - [rfc3339DateFormatter setLocale:enUSPOSIXLocale]; - [rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; - [rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; - }); - - return rfc3339DateFormatter; -} - -+ (NSDateFormatter *)rfc3339MillisecondDateFormatter { - static NSDateFormatter* rfc3339millisecondDateFormatter; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - rfc3339millisecondDateFormatter = [[PPOTTime rfc3339DateFormatter] copy]; - [rfc3339millisecondDateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS'Z'"]; - }); - - return rfc3339millisecondDateFormatter; -} - -// sometimes the server supplied date has a millisecond component. Sometimes not. Easier to just deal with it. -+ (NSDate *)dateFromRFC3339LikeString:(NSString *)dateStr { - if (dateStr == nil) { - return nil; - } - - NSDate* result = [[PPOTTime rfc3339DateFormatter] dateFromString:dateStr]; - if (!result) { - result = [[PPOTTime rfc3339MillisecondDateFormatter] dateFromString:dateStr]; - - if (!result) { - PPLog(@"WARNING - could not parse '%@' into date!", dateStr); - } - } - - return result; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTURLSession.m b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTURLSession.m deleted file mode 100755 index 7fde0848..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/PPOTURLSession.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// PPOTSimpleURLConnection.m -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -#import "PPOTURLSession.h" - -#import "PPOTMacros.h" -#import "PPOTPinnedCertificates.h" - -#import "PPOTDevice.h" -#import "PPOTVersion.h" - -#define STATUS_IS_FAIL(x) (x < 200 || x >= 300) - -@interface PPOTURLSession () - -/// An optional array of pinned certificates, each an NSData instance -/// consisting of DER encoded x509 certificates -@property (nonatomic, nullable, strong) NSArray *pinnedCertificates; - -@property (nonatomic, strong, readwrite) NSURLSession *session; -@property (nonatomic, strong, readwrite) NSURLSessionConfiguration *sessionConfig; - -@end - -@implementation PPOTURLSession - -+ (PPOTURLSession *)session { - return [PPOTURLSession sessionWithTimeoutIntervalForRequest:0]; -} - -+ (PPOTURLSession *)sessionWithTimeoutIntervalForRequest:(NSTimeInterval)timeoutIntervalForRequest { - PPOTURLSession *session = [[PPOTURLSession alloc] initWithTimeoutIntervalForRequest:timeoutIntervalForRequest]; - return session; -} - -- (nonnull instancetype)initWithTimeoutIntervalForRequest:(NSTimeInterval)timeoutIntervalForRequest { - self = [super init]; - if (self) { - self.sessionConfig = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - self.sessionConfig.requestCachePolicy = NSURLRequestReloadIgnoringCacheData; - self.sessionConfig.HTTPShouldUsePipelining = YES; - self.sessionConfig.HTTPAdditionalHeaders = @{ @"User-Agent": [PPOTURLSession computeUserAgent] }; - if (timeoutIntervalForRequest > 0) { - self.sessionConfig.timeoutIntervalForRequest = timeoutIntervalForRequest; - } - self.session = [NSURLSession sessionWithConfiguration:self.sessionConfig - delegate:self - delegateQueue:nil]; - - self.pinnedCertificates = [PPOTPinnedCertificates trustedCertificates]; - } - - return self; -} - -- (void)sendRequest:(nonnull NSURLRequest *)request completionBlock:(nullable PPOTURLSessionCompletionBlock)completionBlock { - NSURLSessionDataTask *task = [self.session dataTaskWithRequest:request - completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { - completionBlock(data, (NSHTTPURLResponse *)response, error); - }]; - [task resume]; -} - -- (void)finishTasksAndInvalidate { - [self.session finishTasksAndInvalidate]; -} - -+ (NSString *)computeUserAgent { - NSLocale *currentLocale = [NSLocale currentLocale]; - NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode]; - NSString *language = [currentLocale objectForKey:NSLocaleLanguageCode]; - -#ifdef DEBUG - NSString *releaseMode = @"DEBUG"; -#else - NSString *releaseMode = @"RELEASE"; -#endif - - // PayPalSDK/OneTouchCore-iOS 3.2.2-11-g8b1c0e3 (iPhone; CPU iPhone OS 8_4_1; en-US; iPhone (iPhone5,1); iPhone5,1; DEBUG) - return [NSString stringWithFormat:@"PayPalSDK/OneTouchCore-iOS %@ (%@; CPU %@ %@; %@-%@; %@; %@; %@)", - PayPalOTVersion(), - [UIDevice currentDevice].model, - [UIDevice currentDevice].systemName, - [[UIDevice currentDevice].systemVersion stringByReplacingOccurrencesOfString:@"." withString:@"_"], - language, - countryCode, - [PPOTDevice deviceName], - [PPOTDevice hardwarePlatform], - releaseMode - ]; -} - - -#pragma mark - NSURLSessionDelegate methods - -- (NSArray *)pinnedCertificateData { - NSMutableArray *pinnedCertificates = [NSMutableArray array]; - for (NSData *certificateData in self.pinnedCertificates) { - [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)]; - } - return pinnedCertificates; -} - -- (void)URLSession:(__unused NSURLSession *)session -didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge - completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler { - if ([[[challenge protectionSpace] authenticationMethod] isEqualToString:NSURLAuthenticationMethodServerTrust]) { - NSString *domain = challenge.protectionSpace.host; - SecTrustRef serverTrust = [[challenge protectionSpace] serverTrust]; - - NSArray *policies = @[(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; - SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); - SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)self.pinnedCertificateData); - SecTrustResultType result; - - OSStatus errorCode = SecTrustEvaluate(serverTrust, &result); - - BOOL evaluatesAsTrusted = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); - if (errorCode == errSecSuccess && evaluatesAsTrusted) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - completionHandler(NSURLSessionAuthChallengeUseCredential, credential); - } else { - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); - } - } else { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTDevice.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTDevice.h deleted file mode 100755 index a9a52900..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTDevice.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// PPOTDevice.h -// Copyright © 2009 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPOTDevice : NSObject - -/*! - @return the hardware platform used -*/ -+ (nonnull NSString *)hardwarePlatform; - -/*! - @return the name of the device -*/ -+ (nonnull NSString *)deviceName; - -/*! - @return the device's locale -*/ -+ (nonnull NSString *)complicatedDeviceLocale; - -/*! - @brief Generates a device identifier and stores it. - - @return a generated device identifier -*/ -+ (nonnull NSString *)appropriateIdentifier; - -/*! - @brief Clears any stored device identifier. -*/ -+ (void)clearIdentifier; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTEncryptionHelper.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTEncryptionHelper.h deleted file mode 100755 index fbf2575b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTEncryptionHelper.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// PPOTEncryptionHelper.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPOTEncryptionHelper : NSObject - -/*! - @brief Generates a random 256-bit key to encrypt data with - - @return a 256-bit encryption key -*/ -+ (nonnull NSData *)generate256BitKey; - -/*! - @brief Encrypt the data using the encryption key. - - @param plainData the data to encrypt - @param key the encryption key to use - @return the encrypted data -*/ -+ (nullable NSData *)encryptAESCTRData:(nonnull NSData *)plainData encryptionKey:(nonnull NSData *)key; - -/*! - @brief Decrypt the data using the encryption key. - - @param cipherData the encrypted data - @param key the encryption key used - @return the decrypted data -*/ -+ (nullable NSData *)decryptAESCTRData:(nonnull NSData *)cipherData encryptionKey:(nonnull NSData *)key; - -/*! - @brief Encrypts data using the given certificate - - @param plainData the data to encrypt - @param certificate the certificate to use - @return the encrypted data -*/ -+ (nullable NSData *)encryptRSAData:(nonnull NSData *)plainData certificate:(nonnull NSData *)certificate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTJSONHelper.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTJSONHelper.h deleted file mode 100755 index 180989aa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTJSONHelper.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// PPOTJSONHelper.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPOTJSONHelper : NSObject - -+ (nullable NSString *)stringFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; -+ (nullable NSDictionary *)dictionaryFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; - -+ (nullable NSArray *)arrayFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; -+ (nullable NSArray *)stringArrayFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; -+ (nullable NSArray *)dictionaryArrayFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; - -+ (nullable NSString *)base64EncodedJSONStringWithDictionary:(nonnull NSDictionary *)dictionary; -+ (nullable NSDictionary *)dictionaryWithBase64EncodedJSONString:(nonnull NSString *)base64String; - -+ (nullable NSNumber *)numberFromDictionary:(nonnull NSDictionary *)dictionary withKey:(nonnull NSString *)key; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTMacros.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTMacros.h deleted file mode 100755 index 03767d6f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTMacros.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// PPOTMacros.h -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -#define PPSDKLog(format, args...) NSLog(@"%@", [NSString stringWithFormat:@"PayPal OneTouchCoreSDK: %@", [NSString stringWithFormat:format, ## args]]) - -// PPLog is a replacement for NSLog that logs iff DEBUG is set. -#if DEBUG -#define PPLog(format, args...) NSLog(format, ## args) -#else -#define PPLog(format, args...) -#endif - -// PPAssert* are replacements for NSAssert, NSAssert1, etc. -// Whether the latter are enabled or disabled depends upon NS_BLOCK_ASSERTIONS; -// we set NS_BLOCK_ASSERTIONS inside our .pch files based upon DEBUG. -// Those #defines are a little bit fragile, and could easily accidentally get broken in the future. -// So PPAssert* depend explicitly on DEBUG, just to be a bit more safe. -#if DEBUG - #define PPAssert(condition, desc...) NSAssert(condition, desc) - #define PPAssert1(condition, desc, arg1) NSAssert1(condition, desc, arg1) - #define PPAssert2(condition, desc, arg1, arg2) NSAssert2(condition, desc, arg1, arg2) - #define PPAssert3(condition, desc, arg1, arg2, arg3) NSAssert3(condition, desc, arg1, arg2, arg3) - #define PPAssert4(condition, desc, arg1, arg2, arg3, arg4) NSAssert4(condition, desc, arg1, arg2, arg3, arg4) - #define PPAssert5(condition, desc, arg1, arg2, arg3, arg4, arg5) NSAssert5(condition, desc, arg1, arg2, arg3, arg4, arg5) - #define PPParameterAssert(condition) NSParameterAssert(condition) -#else - #define PPAssert(condition, desc, ...) - #define PPAssert1(condition, desc, arg1) - #define PPAssert2(condition, desc, arg1, arg2) - #define PPAssert3(condition, desc, arg1, arg2, arg3) - #define PPAssert4(condition, desc, arg1, arg2, arg3, arg4) - #define PPAssert5(condition, desc, arg1, arg2, arg3, arg4, arg5) - #define PPParameterAssert(condition) -#endif - -@interface PPOTMacros : NSObject - -/*! - @return the iOS major version number -*/ -+ (NSUInteger)deviceSystemMajorVersion; - -@end - -#define iOS_MAJOR_VERSION [PPOTMacros deviceSystemMajorVersion] -#define iOS_9_PLUS ([PPOTMacros deviceSystemMajorVersion] >= 9) -#define iOS_8_PLUS ([PPOTMacros deviceSystemMajorVersion] >= 8) -#define iOS_7_PLUS ([PPOTMacros deviceSystemMajorVersion] >= 7) -#define iOS_6_PLUS ([PPOTMacros deviceSystemMajorVersion] >= 6) -#define iOS_6 ([PPOTMacros deviceSystemMajorVersion] == 6) -#define iOS_5 ([PPOTMacros deviceSystemMajorVersion] == 5) - -#define FORCE_VALUE_OR_NULL(x) (x ? x : [NSNull null]) - -// Use the CARDIO_STR() macro around sensitive string literals. -// E.g., `CARDIO_STR(@"http://top_secret_url.paypal.com")`. -// For release builds, uses of this macro get preprocessed by fabfile.py to obfuscate the string. -// PLEASE do not include any whitespace on either side of the string inside the parentheses; -// i.e., between `CARDIO_STR(` and `@"abc"`, or between `@"abc"` and the closing `)`. -#define CARDIO_STR(string) string - -#define PPRGBAUIColor(RR, GG, BB, AA) ([UIColor colorWithRed:(RR)/255.0f green:(GG)/255.0f blue:(BB)/255.0f alpha:(AA)/255.0f]) - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTPinnedCertificates.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTPinnedCertificates.h deleted file mode 100755 index 9291d338..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTPinnedCertificates.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PPOTPinnedCertificates.h -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -@interface PPOTPinnedCertificates : NSObject - -/*! - @brief Returns the set of trusted root certificates - - @return An array of trusted certificates encoded in the DER format, encapsulated in NSData objects. -*/ -+ (NSArray *)trustedCertificates; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTSimpleKeychain.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTSimpleKeychain.h deleted file mode 100755 index e4e1fed3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTSimpleKeychain.h +++ /dev/null @@ -1,47 +0,0 @@ -// adapted from https://raw.github.com/rackspace/rackspace-ios/master/Classes/Keychain.h - -// -// PPOTSimpleKeychain.h -// OpenStack -// -// Based on CardIOKeychain -// Based on KeychainWrapper in BadassVNC by Dylan Barrie -// -// Created by Mike Mayo on 10/1/10. -// The OpenStack project is provided under the Apache 2.0 license. -// - -#import - -/*! - @brief Wrapper to help deal with Keychain-related things such as storing API keys and passwords. - @discussion The key used in the methods may not be the actual key used in the keychain -*/ -@interface PPOTSimpleKeychain : NSObject - -/*! - @brief Sets the given data for the given key - - @param data the data to set, null if any data associated with the key should be deleted - @param key the key to use - @return YES if successful, NO if not -*/ -+ (BOOL)setData:(nullable NSData *)data forKey:(nonnull NSString *)key; - -/*! - @brief Retrieves the data associated with the given key - - @param key the key to use - @return any data associated with the key -*/ -+ (nullable NSData *)dataForKey:(nonnull NSString *)key; - -/*! - @brief Retrieves the unarchived object with the given key - - @param key the key to use - @return the unarchived object associated with the given key -*/ -+ (nullable id)unarchiveObjectWithDataForKey:(nonnull NSString *)key; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTString.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTString.h deleted file mode 100755 index ff8b32be..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTString.h +++ /dev/null @@ -1,58 +0,0 @@ -// -// PPOTString.m -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import - -@interface PPOTString : NSObject - -/*! - @brief URL encodes all characters in a given string including &, %, ?, =, and other URL "safe" characters - - @param aString the string to encode - @return the encoded string -*/ -+ (nonnull NSString *)stringByURLEncodingAllCharactersInString:(nonnull NSString *)aString; - -/*! - @brief Base64 encoded version of the data - - @param data Data to base64 encode - @return the base64 encoded data as a string -*/ -+ (nonnull NSString *)stringByBase64EncodingData:(nonnull NSData *)data; - -/*! - @brief Decoded a base64 string back into data - - @param strBase64 the string base64 encoded - @return the decoded data -*/ -+ (nullable NSData *)decodeBase64WithString:(nonnull NSString *)strBase64; - -/*! - @brief Generates a random identifier - - @return a uniquish identifier -*/ -+ (nonnull NSString *)generateUniquishIdentifier; - -/*! - @brief Converts a NSData to a hexadecimal NSString - - @param data the data to convert - @return a hexadecimal string from given byte data -*/ -+ (nonnull NSString *)hexStringFromData:(nonnull NSData *)data; - -/*! - @brief Converts a hexadecimal string into a NSData representation - - @param hexString the string to convert - @return the converted value representation of the hexadecimal string -*/ -+ (nonnull NSData *)dataWithHexString:(nonnull NSString *)hexString; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTTime.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTTime.h deleted file mode 100755 index 2757559f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTTime.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// PPOTTime.h -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -/*! - @brief Collection of time utility methods -*/ -@interface PPOTTime : NSObject - -/*! - @return A RFC 3339 ( 2012-08-10T14:22:56.864-07:00 ) date formatter. -*/ -+ (nonnull NSDateFormatter *)rfc3339DateFormatter; - -/*! - @brief Parses a string for an RFC 3339 like date string. Tries a few different options for misbehaving servers. - - @return Date from RFC339-like string -*/ -+ (nullable NSDate *)dateFromRFC3339LikeString:(nullable NSString *)dateStr; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTURLSession.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTURLSession.h deleted file mode 100755 index 459e8cfe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTURLSession.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// PPOTURLSession.h -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -/*! - @brief Request completion callback type -*/ -typedef void(^PPOTURLSessionCompletionBlock)(NSData * _Nullable data, NSHTTPURLResponse * _Nullable response, NSError * _Nullable error); - -/*! - @brief A URL session to manage network connections -*/ -@interface PPOTURLSession: NSObject - -/*! - @return a session to send requests -*/ -+ (nonnull PPOTURLSession *)session; - -/*! - @return a session to send requests with a specific timeout for requests -*/ -+ (nonnull PPOTURLSession *)sessionWithTimeoutIntervalForRequest:(NSTimeInterval)timeoutIntervalForRequest; - -/*! - @brief Sends a URL request - - @param request the request to send - @param completionBlock the completion block invoked for the response -*/ -- (void)sendRequest:(nonnull NSURLRequest *)request - completionBlock:(nullable PPOTURLSessionCompletionBlock)completionBlock; - -/*! - @brief Attempts to stop the session from accepting any future requests -*/ -- (void)finishTasksAndInvalidate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTVersion.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTVersion.h deleted file mode 100755 index 9b9640f1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PPOTVersion.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// PPOTVersion.h -// - - -#ifndef PPOTVersion_h -#define PPOTVersion_h - -#define PayPalOTVersion() @"4.8.4" - -#endif diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PayPalUtils.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PayPalUtils.h deleted file mode 100755 index 8e49f4d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/PayPalUtils/Public/PayPalUtils.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -//! Project version number for PayPalUtils. -FOUNDATION_EXPORT double PayPalUtilsVersionNumber; - -//! Project version string for PayPalUtils. -FOUNDATION_EXPORT const unsigned char PayPalUtilsVersionString[]; - -#import "PPOTDevice.h" -#import "PPOTEncryptionHelper.h" -#import "PPOTJSONHelper.h" -#import "PPOTMacros.h" -#import "PPOTPinnedCertificates.h" -#import "PPOTSimpleKeychain.h" -#import "PPOTString.h" -#import "PPOTTime.h" -#import "PPOTURLSession.h" -#import "PPOTVersion.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTConfiguration+PayPal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTConfiguration+PayPal.h deleted file mode 100755 index 1e6b7cc4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTConfiguration+PayPal.h +++ /dev/null @@ -1,15 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BTConfiguration.h" -#else -#import -#endif - -@interface BTConfiguration (PayPal) - -/*! - @brief Indicates whether PayPal is enabled for the merchant account. -*/ -@property (nonatomic, readonly, assign) BOOL isPayPalEnabled; -@property (nonatomic, readonly, assign) BOOL isBillingAgreementsEnabled; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalAccountNonce.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalAccountNonce.h deleted file mode 100755 index e07b36a8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalAccountNonce.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTPayPalCreditFinancing.h" - -@interface BTPayPalAccountNonce : BTPaymentMethodNonce - -/*! - @brief Payer's email address -*/ -@property (nonatomic, nullable, readonly, copy) NSString *email; - -/*! - @brief Payer's first name. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *firstName; - -/*! - @brief Payer's last name. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *lastName; - -/*! - @brief Payer's phone number. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *phone; - -/*! - @brief The billing address. -*/ -@property (nonatomic, nullable, readonly, strong) BTPostalAddress *billingAddress; - -/*! - @brief The shipping address. -*/ -@property (nonatomic, nullable, readonly, strong) BTPostalAddress *shippingAddress; - -/*! - @brief Client Metadata Id associated with this transaction. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *clientMetadataId; - -/*! - @brief Optional. Payer Id associated with this transaction. - - @discussion Will be provided for Billing Agreement and Checkout. -*/ -@property (nonatomic, nullable, readonly, copy) NSString *payerId; - -/*! - @brief Optional. Credit financing details if the customer pays with PayPal Credit. - - @discussion Will be provided for Billing Agreement and Checkout. - */ -@property (nonatomic, nullable, readonly, strong) BTPayPalCreditFinancing *creditFinancing; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalCreditFinancing.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalCreditFinancing.h deleted file mode 100755 index cc7d8e79..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalCreditFinancing.h +++ /dev/null @@ -1,54 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTPayPalCreditFinancingAmount: NSObject - -/*! - @brief 3 letter currency code as defined by ISO 4217. - */ -@property (nonatomic, nullable, readonly, copy) NSString *currency; - -/*! - @brief An amount defined by ISO 4217 for the given currency. - */ -@property (nonatomic, nullable, readonly, copy) NSString *value; - -@end - -@interface BTPayPalCreditFinancing: NSObject - -/*! - @brief Indicates whether the card amount is editable after payer's acceptance on PayPal side. - */ -@property (nonatomic, readonly) BOOL cardAmountImmutable; - -/*! - @brief Estimated amount per month that the customer will need to pay including fees and interest. - */ -@property (nonatomic, nullable, readonly, strong) BTPayPalCreditFinancingAmount *monthlyPayment; - -/*! - @brief Status of whether the customer ultimately was approved for and chose to make the payment using the approved installment credit. - */ -@property (nonatomic, readonly) BOOL payerAcceptance; - -/*! - @brief Length of financing terms in months. - */ -@property (nonatomic, readonly) NSInteger term; - -/*! - @brief Estimated total payment amount including interest and fees the user will pay during the lifetime of the loan. - */ -@property (nonatomic, nullable, readonly, strong) BTPayPalCreditFinancingAmount *totalCost; - -/*! - @brief Estimated interest or fees amount the payer will have to pay during the lifetime of the loan. - */ -@property (nonatomic, nullable, readonly, strong) BTPayPalCreditFinancingAmount *totalInterest; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalDriver.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalDriver.h deleted file mode 100755 index 8a97495c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalDriver.h +++ /dev/null @@ -1,254 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTPayPalAccountNonce.h" -#import "BTPayPalRequest.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -@class PPOTRequest; - -extern NSString *const BTPayPalDriverErrorDomain; - -typedef NS_ENUM(NSInteger, BTPayPalDriverErrorType) { - BTPayPalDriverErrorTypeUnknown = 0, - - /// PayPal is disabled in configuration - BTPayPalDriverErrorTypeDisabled, - - /// App switch is not configured appropriately. You must specify a - /// valid returnURLScheme via BTAppSwitch before attempting an app switch - BTPayPalDriverErrorTypeIntegrationReturnURLScheme, - - /// UIApplication failed to switch despite it being available. - /// `[UIApplication openURL:]` returned `NO` when `YES` was expected - BTPayPalDriverErrorTypeAppSwitchFailed, - - /// Invalid configuration, e.g. bad CFBundleDisplayName - BTPayPalDriverErrorTypeInvalidConfiguration, - - /// Invalid request, e.g. missing PayPal request - BTPayPalDriverErrorTypeInvalidRequest, - - /// Braintree SDK is integrated incorrectly - BTPayPalDriverErrorTypeIntegration, -}; - -/*! - @brief Protocol to handle custom PayPal Approval via BTPayPalApprovalHandler -*/ -@protocol BTPayPalApprovalDelegate -/*! - @brief Use when custom approval has completed with success or error -*/ -- (void)onApprovalComplete:(NSURL *) url; - -/*! - @brief Use when custom approval was canceled -*/ -- (void)onApprovalCancel; -@end - -/*! - @brief Protocol for custom authentication and authorization of PayPal. -*/ -@protocol BTPayPalApprovalHandler - -/*! - @brief Handle approval request for PayPal and carry out custom authentication and authorization. - - @discussion Use the delegate to handle success/error/cancel flows. - On completion or error use BTPayPalApprovalDelegate:onApprovalComplete - On cancel use BTPayPalApprovalDelegate:onApprovalCancel - - @param request PayPal request object. - @param delegate The BTPayPalApprovalDelegate to handle response. -*/ -- (void)handleApproval:(PPOTRequest*)request paypalApprovalDelegate:(id)delegate; -@end - -/*! - @brief BTPayPalDriver enables you to obtain permission to charge your customers' PayPal accounts via app switch to the PayPal app and the browser. - - @note To make PayPal available, you must ensure that PayPal is enabled in your Braintree control panel. - See our [online documentation](https://developers.braintreepayments.com/ios+ruby/guides/paypal) for - details. - - @discussion This class supports two basic use-cases: Vault and Checkout. Each of these involves variations on the - user experience as well as variations on the capabilities granted to you by this authorization. - - The *Vault* option uses PayPal's future payments authorization, which allows your merchant account to - charge this customer arbitrary amounts for a long period of time into the future (unless the user - manually revokes this permission in their PayPal control panel.) This authorization flow includes - a screen with legal language that directs the user to agree to the terms of Future Payments. - Unfortunately, it is not currently possible to collect shipping information in the Vault flow. - - The *Checkout* option creates a one-time use PayPal payment on your behalf. As a result, you must - specify the checkout details up-front, so that they can be shown to the user during the PayPal flow. - With this flow, you must specify the estimated transaction amount, and you can collect shipping - details. While this flow omits the Future Payments agreement, the resulting payment method cannot be - stored in the vault. It is only possible to create one Braintree transaction with this form of user - approval. - - Both of these flows are available to all users on any iOS device. If the PayPal app is installed on the - device, the PayPal login flow will take place there via an app switch. Otherwise, PayPal login takes - place in the Safari browser. - - Regardless of the type or target, all of these user experiences take full advantage of One Touch. This - means that users may bypass the username/password entry screen when they are already logged in. - - Upon successful completion, you will receive a `BTPayPalAccountNonce`, which includes user-facing - details and a payment method nonce, which you must pass to your server in order to create a transaction - or save the authorization in the Braintree vault (not possible with Checkout). - - ## User Experience Details - - To keep your UI in sync during app switch authentication, you may set a delegate, which will receive - notifications as the PayPal driver progresses through the various steps necessary for user - authentication. - - ## App Switching Details - - This class will handle switching out of your app to the PayPal app or the browser (including the call to - `-[UIApplication openURL:]`). -*/ -@interface BTPayPalDriver : NSObject - - -/*! - @brief Initialize a new PayPal driver instance. - - @param apiClient The API client -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient; - - -- (instancetype)init __attribute__((unavailable("Please use initWithAPIClient:"))); - -/*! - @brief Authorize a PayPal user for saving their account in the Vault via app switch to the PayPal App or the browser. - - @discussion On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note During the app switch authorization, the user may switch back to your app manually. In this case, the caller - will not receive a cancellation via the completionBlock. Rather, it is the caller's responsibility to observe - `UIApplicationDidBecomeActiveNotification` and `UIApplicationWillResignActiveNotification` using `NSNotificationCenter` - if necessary. - - @param completionBlock This completion will be invoked exactly once when authorization is complete or an error occurs. -*/ -- (void)authorizeAccountWithCompletion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - - -/*! - @brief Authorize a PayPal user for saving their account in the Vault via app switch to the PayPal App or the browser with additional scopes (e.g. address). - - @discussion On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note During the app switch authorization, the user may switch back to your app manually. In this case, the caller - will not receive a cancellation via the completionBlock. Rather, it is the caller's responsibility to observe - `UIApplicationDidBecomeActiveNotification` and `UIApplicationWillResignActiveNotification` using `NSNotificationCenter` - if necessary. - - @param additionalScopes An `NSSet` of requested scope-values as `NSString`s. Available scope-values are listed at - https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/attributes/ - @param completionBlock This completion will be invoked exactly once when authorization is complete or an error occurs. -*/ -- (void)authorizeAccountWithAdditionalScopes:(NSSet *)additionalScopes - completion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - -/*! - @brief Check out with PayPal to create a single-use PayPal payment method nonce. - - @discussion You can use this as the final step in your order/checkout flow. If you want, you may create a transaction from your - server when this method completes without any additional user interaction. - - On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note This method is mutually exclusive with `authorizeAccountWithCompletion:`. In both cases, you need to create a - Braintree transaction from your server in order to actually move money! - - @param request A PayPal request - @param completionBlock This completion will be invoked exactly once when checkout is complete or an error occurs. - */ -- (void)requestOneTimePayment:(BTPayPalRequest *)request - completion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - - -/*! - @brief Check out with PayPal to create a single-use PayPal payment method nonce. - - @discussion You can use this as the final step in your order/checkout flow. If you want, you may create a transaction from your - server when this method completes without any additional user interaction. - - On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note This method is mutually exclusive with `authorizeAccountWithCompletion:`. In both cases, you need to create a - Braintree transaction from your server in order to actually move money! - - @param request A PayPal request - @param handler A BTPayPalApprovalHandler for custom authorizatin and approval - @param completionBlock This completion will be invoked exactly once when checkout is complete or an error occurs. - */ -- (void)requestOneTimePayment:(BTPayPalRequest *)request handler:(id)handler - completion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - -/*! - @brief Create a PayPal Billing Agreement for repeat purchases. - - @discussion You can use this as the final step in your order/checkout flow. If you want, you may create a transaction from your - server when this method completes without any additional user interaction. - - On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note This method is mutually exclusive with `authorizeAccountWithCompletion:`. In both cases, you need to create a - Braintree transaction from your server in order to actually move money! - - @param request A PayPal request - @param completionBlock This completion will be invoked exactly once when checkout is complete or an error occurs. -*/ -- (void)requestBillingAgreement:(BTPayPalRequest *)request - completion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - -/*! - @brief Create a PayPal Billing Agreement for repeat purchases. - - @discussion You can use this as the final step in your order/checkout flow. If you want, you may create a transaction from your - server when this method completes without any additional user interaction. - - On success, you will receive an instance of `BTPayPalAccountNonce`; on failure, an error; on user cancellation, - you will receive `nil` for both parameters. - - @note This method is mutually exclusive with `authorizeAccountWithCompletion:`. In both cases, you need to create a - Braintree transaction from your server in order to actually move money! - - @param request A PayPal request - @param handler A BTPayPalApprovalHandler for custom authorization and approval - @param completionBlock This completion will be invoked exactly once when checkout is complete or an error occurs. - */ -- (void)requestBillingAgreement:(BTPayPalRequest *)request handler:(id)handler - completion:(void (^)(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error))completionBlock; - -#pragma mark - Delegate - -/*! - @brief An optional delegate for receiving notifications about the lifecycle of a PayPal app switch for updating your UI -*/ -@property (nonatomic, weak, nullable) id appSwitchDelegate; - -/*! - @brief A required delegate to control the presentation and dismissal of view controllers -*/ -@property (nonatomic, weak, nullable) id viewControllerPresentingDelegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalRequest.h deleted file mode 100755 index 3dde3fc4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BTPayPalRequest.h +++ /dev/null @@ -1,154 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -NS_ASSUME_NONNULL_BEGIN - -/*! - @brief Payment intent. - - @discussion Must be set to sale for immediate payment, authorize to authorize a payment for capture later, or order to create an order. Defaults to authorize. Only works in the Single Payment flow. - - @see https://developer.paypal.com/docs/integration/direct/payments/capture-payment/ Capture payments later - @see https://developer.paypal.com/docs/integration/direct/payments/create-process-order/ Create and process orders -*/ -typedef NS_ENUM(NSInteger, BTPayPalRequestIntent) { - BTPayPalRequestIntentAuthorize = 1, - BTPayPalRequestIntentSale, - BTPayPalRequestIntentOrder, -}; - -/*! - @brief Use this option to specify the PayPal page to display when a user lands on the PayPal site to complete the payment. -*/ -typedef NS_ENUM(NSInteger, BTPayPalRequestLandingPageType) { - BTPayPalRequestLandingPageTypeDefault = 1, - BTPayPalRequestLandingPageTypeLogin, - BTPayPalRequestLandingPageTypeBilling, -}; - -/*! - @brief The call-to-action in the PayPal one-time payment checkout flow. - - @discussion By default the final button will show the localized word for "Continue" and implies that the final amount billed is not yet known. - Setting the BTPayPalRequest's userAction to `BTPayPalRequestUserActionCommit` changes the button text to "Pay Now", conveying to - the user that billing will take place immediately. -*/ -typedef NS_ENUM(NSInteger, BTPayPalRequestUserAction) { - BTPayPalRequestUserActionDefault = 1, - BTPayPalRequestUserActionCommit, -}; - -/*! - @brief A PayPal request specifies options that control the PayPal flow. - - @discussion For a one-time payment, the request must specify a transaction amount. - - @see BTPayPalDriver -*/ -@interface BTPayPalRequest : NSObject - -/*! - @brief Initialize a PayPal request with an amount for a one-time payment. - - @param amount Used for a one-time payment. Amount must be greater than or equal to zero, may optionally contain exactly 2 decimal places separated by '.', optional thousands separator ',', and is limited to 7 digits before the decimal point. - @return A PayPal request. -*/ -- (instancetype)initWithAmount:(NSString *)amount; - -/*! - @brief Used for a one-time payment. - - @discussion Amount must be greater than or equal to zero, may optionally contain exactly 2 decimal places separated by '.', optional thousands separator ',', and is limited to 7 digits before the decimal point. -*/ -@property (nonatomic, readonly, strong) NSString *amount; - -/*! - @brief Defaults to false. When set to true, the shipping address selector will be displayed. -*/ -@property (nonatomic, getter=isShippingAddressRequired) BOOL shippingAddressRequired; - -/*! - @brief Optional: A valid ISO currency code to use for the transaction. Defaults to merchant currency code if not set. - @note This is only used for one-time payments. -*/ -@property (nonatomic, nullable, copy) NSString *currencyCode; - -/*! - @brief Optional: A locale code to use for the transaction. - - @discussion Supported locales are: - - `da_DK`, - `de_DE`, - `en_AU`, - `en_GB`, - `en_US`, - `es_ES`, - `es_XC`, - `fr_CA`, - `fr_FR`, - `fr_XC`, - `id_ID`, - `it_IT`, - `ja_JP`, - `ko_KR`, - `nl_NL`, - `no_NO`, - `pl_PL`, - `pt_BR`, - `pt_PT`, - `ru_RU`, - `sv_SE`, - `th_TH`, - `tr_TR`, - `zh_CN`, - `zh_HK`, - `zh_TW`, - `zh_XC`. -*/ -@property (nonatomic, nullable, copy) NSString *localeCode; - -/*! - @brief Optional: A valid shipping address to be displayed in the transaction flow. An error will occur if this address is not valid. -*/ -@property (nonatomic, nullable, strong) BTPostalAddress *shippingAddressOverride; - -/*! - @brief Optional: Display a custom description to the user for a billing agreement. -*/ -@property (nonatomic, nullable, copy) NSString *billingAgreementDescription; - -/*! - @brief Optional: Payment intent. Only applies when using checkout flow. Defaults to `BTPayPalRequestIntentAuthorize`. -*/ -@property (nonatomic) BTPayPalRequestIntent intent; - -/*! - @brief Optional: Changes the call-to-action in the PayPal flow. This option works for both checkout and vault flows. Defaults to `BTPayPalRequestUserActionDefault`. -*/ -@property (nonatomic) BTPayPalRequestUserAction userAction; - -/*! - @brief Optional: Landing page type. Defaults to `BTPayPalRequestLandingPageTypeDefault`. - - @discussion Setting the BTPayPalRequest's landingPageType changes the PayPal page to display when a user lands on the PayPal site to complete the payment. BTPayPalRequestLandingPageTypeLogin specifies a PayPal account login page is used. BTPayPalRequestLandingPageTypeBilling specifies a non-PayPal account landing page is used. - */ -@property (nonatomic) BTPayPalRequestLandingPageType landingPageType; - -/*! - @brief Optional: The merchant name displayed inside of the PayPal flow; defaults to the company name on your Braintree account -*/ -@property (nonatomic, nullable, copy) NSString *displayName; - -/*! - @brief Optional: Offers PayPal Credit if the customer qualifies. Defaults to false. Only available with PayPal Checkout and PayPal Billing Agreement. - */ -@property (nonatomic) BOOL offerCredit; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BraintreePayPal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BraintreePayPal.h deleted file mode 100755 index bbdc6447..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreePayPal/Public/BraintreePayPal.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -//! Project version number for BraintreePayPal. -FOUNDATION_EXPORT double BraintreePayPalVersionNumber; - -//! Project version string for BraintreePayPal. -FOUNDATION_EXPORT const unsigned char BraintreePayPalVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTConfiguration+PayPal.h" -#import "BTPayPalRequest.h" -#import "BTPayPalDriver.h" -#import "BTPayPalAccountNonce.h" -#import "BTPayPalCreditFinancing.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.h deleted file mode 100755 index 84e30a90..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.h +++ /dev/null @@ -1,51 +0,0 @@ -#import "BTUIThemedView.h" - -#import "BraintreeUI.h" - -#import "BTPaymentButton.h" - -typedef NS_ENUM(NSUInteger, BTDropInContentViewStateType) { - BTDropInContentViewStateForm = 0, - BTDropInContentViewStatePaymentMethodsOnFile, - BTDropInContentViewStateActivity -}; - -/*! - @brief A thin view layer that manages Drop In subviews and their layout. -*/ -@interface BTDropInContentView : BTUIThemedView - -@property (nonatomic, strong) BTUISummaryView *summaryView; -@property (nonatomic, strong) BTUICTAControl *ctaControl; -@property (nonatomic, strong) BTPaymentButton *paymentButton; -@property (nonatomic, strong) UILabel *cardFormSectionHeader; -@property (nonatomic, strong) BTUICardFormView *cardForm; - -@property (nonatomic, strong) BTUIPaymentMethodView *selectedPaymentMethodView; -@property (nonatomic, strong) UIButton *changeSelectedPaymentMethodButton; - -/*! - @brief Whether to hide the call to action -*/ -@property (nonatomic, assign) BOOL hideCTA; - -/*! - @brief Whether to hide the summary banner view -*/ -@property (nonatomic, assign) BOOL hideSummary; - -/*! - @brief The current state -*/ -@property (nonatomic, assign) BTDropInContentViewStateType state; - -/*! - @brief Whether the paymentButton control is hidden -*/ -@property (nonatomic, assign) BOOL hidePaymentButton; - -- (void)setState:(BTDropInContentViewStateType)newState animate:(BOOL)animate; - -- (void)setState:(BTDropInContentViewStateType)newState animate:(BOOL)animate completion:(void(^)())completionBlock; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.m deleted file mode 100755 index 48101b9e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInContentView.m +++ /dev/null @@ -1,325 +0,0 @@ -#import "BTDropInContentView.h" -#import "BTDropInLocalizedString.h" -#import "BTTokenizationService.h" - -@interface BTDropInContentView () -@property (nonatomic, strong) NSArray *verticalLayoutConstraints; -/// An array of `NSLayoutConstraint` horizontal constraints on the payment button. -/// These constraints may need to be updated when -@property (nonatomic, strong) NSArray *paymentButtonConstraints; -@property (nonatomic, strong) UIActivityIndicatorView *activityView; -@property (nonatomic, strong) NSLayoutConstraint *heightConstraint; -@end - -@implementation BTDropInContentView - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - // Initialize Subviews - - self.activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; - self.activityView.translatesAutoresizingMaskIntoConstraints = NO; - self.activityView.hidden = YES; - [self addSubview:self.activityView]; - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0.0f]]; - - self.summaryView = [[BTUISummaryView alloc] init]; - - UIView *summaryBorderBottom = [[UIView alloc] init]; - summaryBorderBottom.backgroundColor = self.theme.borderColor; - summaryBorderBottom.translatesAutoresizingMaskIntoConstraints = NO; - [self.summaryView addSubview:summaryBorderBottom]; - [self.summaryView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[border]|" - options:0 - metrics:nil - views:@{@"border": summaryBorderBottom}]]; - [self.summaryView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[border(==borderWidth)]|" - options:0 - metrics:@{@"borderWidth": @(self.theme.borderWidth)} - views:@{@"border": summaryBorderBottom}]]; - - self.cardFormSectionHeader = [[UILabel alloc] init]; - - self.cardForm = [[BTUICardFormView alloc] init]; - [self.cardForm setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; - - self.selectedPaymentMethodView = [[BTUIPaymentMethodView alloc] init]; - - self.changeSelectedPaymentMethodButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [self.changeSelectedPaymentMethodButton setTitle:BTDropInLocalizedString(DROP_IN_CHANGE_PAYMENT_METHOD_BUTTON_TEXT) - forState:UIControlStateNormal]; - - self.ctaControl = [[BTUICTAControl alloc] init]; - - // Add Constraints & Subviews - - // Full-Width Views - for (UIView *view in @[self.selectedPaymentMethodView, self.summaryView, self.ctaControl, self.cardForm]) { - [self addSubview:view withHorizontalMargins:NO]; - } - - // Not quite full-width views - for (UIView *view in @[self.cardFormSectionHeader, self.changeSelectedPaymentMethodButton]) { - [self addSubview:view withHorizontalMargins:YES]; - } - - self.paymentButton = [[BTPaymentButton alloc] init]; - // The payment button horizontal constraints may be updated to add a margin to the button *after* - // fetching the configuration, so keep a reference to them to update them in updateConstraints - self.paymentButtonConstraints = [self addSubview:self.paymentButton withHorizontalMargins:NO]; - - self.state = BTDropInContentViewStateForm; - - // Keyboard dismissal when tapping outside text field - UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped)]; - tapGesture.delegate = self; - [self addGestureRecognizer:tapGesture]; - - } - return self; -} - -/// Adds a subview, and returns an array of constraints applied to the subview -- (NSArray *)addSubview:(UIView *)view withHorizontalMargins:(BOOL)useHorizontalMargins { - [self addSubview:view]; - view.translatesAutoresizingMaskIntoConstraints = NO; - NSDictionary *metrics = useHorizontalMargins ? @{@"horizontalMargin": @(self.theme.horizontalMargin)} : @{@"horizontalMargin": @(0)}; - NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(horizontalMargin)-[view]-(horizontalMargin)-|" - options:0 - metrics:metrics - views:@{@"view": view}]; - [self addConstraints:constraints]; - return constraints; -} - -- (void)updateConstraints { - - if (self.verticalLayoutConstraints != nil) { - [self removeConstraints:self.verticalLayoutConstraints]; - } - - CGFloat paymentButtonMargin; - if ([self.paymentButton.enabledPaymentOptions isEqualToOrderedSet:[NSOrderedSet orderedSetWithArray:@[@"PayPal"]]]) { - paymentButtonMargin = self.theme.horizontalMargin; - } else { - paymentButtonMargin = 0; - } - for (NSLayoutConstraint *constraint in self.paymentButtonConstraints) { - constraint.constant = paymentButtonMargin; - } - [self.paymentButton setNeedsLayout]; - [self.paymentButton layoutIfNeeded]; - - NSDictionary *viewBindings = @{ - @"activityView": self.activityView, - @"summaryView": self.summaryView, - @"paymentButton": self.paymentButton, - @"cardFormSectionHeader": self.cardFormSectionHeader, - @"cardForm": self.cardForm, - @"ctaControl": self.ctaControl, - @"selectedPaymentMethodView": self.selectedPaymentMethodView, - @"changeSelectedPaymentMethodButton": self.changeSelectedPaymentMethodButton - }; - - NSMutableArray *newConstraints = [NSMutableArray array]; - for (NSString *visualFormat in [self evaluateVisualFormat]) { - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:visualFormat - options:0 - metrics:nil - views:viewBindings]]; - } - - if(self.heightConstraint != nil) { - [self.superview removeConstraint:self.heightConstraint]; - } - - if (self.state != BTDropInContentViewStateForm) { - - self.heightConstraint = [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeHeight - relatedBy:NSLayoutRelationGreaterThanOrEqual - toItem:self.superview - attribute:NSLayoutAttributeHeight - multiplier:1.0f - constant:0]; - [self.superview addConstraint:self.heightConstraint]; - } - [self.superview setNeedsLayout]; - - [self addConstraints:newConstraints]; - self.verticalLayoutConstraints = newConstraints; - - [super updateConstraints]; - -} -- (void)setHideSummary:(BOOL)hideSummary { - _hideSummary = hideSummary; - [self updateContentView]; -} - -- (void)setHideCTA:(BOOL)hideCTA { - _hideCTA = hideCTA; - [self updateContentView]; -} - -- (void)setState:(BTDropInContentViewStateType)state { - _state = state; - [self updateContentView]; -} - -- (void)setState:(BTDropInContentViewStateType)newState animate:(BOOL)animate completion:(void(^)())completionBlock { - if (!animate) { - [self setState:newState]; - } else { - BTDropInContentViewStateType oldState = self.state; - CGFloat duration = 0.2f; - if (oldState == BTDropInContentViewStateActivity) { - if (newState == BTDropInContentViewStateForm) { - [UIView animateWithDuration:duration animations:^{ - self.activityView.alpha = 0.0f; - } completion:^(__unused BOOL finished) { - [self setState:newState]; - self.paymentButton.alpha = 0.0f; - self.cardForm.alpha = 0.0f; - self.cardFormSectionHeader.alpha = 0.0f; - self.ctaControl.alpha = 0.0f; - [self setNeedsUpdateConstraints]; - [self layoutIfNeeded]; - [UIView animateWithDuration:duration animations:^{ - self.paymentButton.alpha = 1.0f; - self.cardForm.alpha = 1.0f; - self.cardFormSectionHeader.alpha = 1.0f; - self.ctaControl.alpha = 1.0f; - if (completionBlock) { - completionBlock(); - } - }]; - }]; - return; - } - - if (newState == BTDropInContentViewStatePaymentMethodsOnFile) { - self.activityView.alpha = 1.0f; - [UIView animateWithDuration:duration animations:^{ - self.activityView.alpha = 0.0f; - } completion:^(__unused BOOL finished) { - [self setState:newState]; - self.selectedPaymentMethodView.alpha = 0.0f; - self.changeSelectedPaymentMethodButton.alpha = 0.0f; - self.ctaControl.alpha = 0.0f; - [self setNeedsUpdateConstraints]; - [self layoutIfNeeded]; - [UIView animateWithDuration:duration animations:^{ - self.selectedPaymentMethodView.alpha = 1.0f; - self.changeSelectedPaymentMethodButton.alpha = 1.0f; - self.ctaControl.alpha = 1.0f; - if (completionBlock) { - completionBlock(); - } - }]; - }]; - return; - } - } - [self setState:newState]; - } -} - -- (void)setState:(BTDropInContentViewStateType)newState animate:(BOOL)animate { - [self setState:newState animate:animate completion:nil]; -} - -- (void)setHidePaymentButton:(BOOL)hidePaymentButton { - _hidePaymentButton = hidePaymentButton; - self.paymentButton.hidden = hidePaymentButton; - [self updateContentView]; -} - -- (void)updateContentView { - - // Reset all to hidden, just for clarity - self.activityView.hidden = YES; - self.summaryView.hidden = self.hideSummary; - self.paymentButton.hidden = YES; - self.cardFormSectionHeader.hidden = YES; - self.cardForm.hidden = YES; - self.selectedPaymentMethodView.hidden = YES; - self.changeSelectedPaymentMethodButton.hidden = YES; - self.ctaControl.hidden = YES; - - switch (self.state) { - case BTDropInContentViewStateForm: - self.activityView.hidden = YES; - [self.activityView stopAnimating]; - self.ctaControl.hidden = self.hideCTA; - self.paymentButton.hidden = self.hidePaymentButton; - if ([[BTTokenizationService sharedService] isTypeAvailable:@"Card"]) { - self.cardFormSectionHeader.hidden = NO; - self.cardForm.hidden = NO; - } - break; - case BTDropInContentViewStatePaymentMethodsOnFile: - self.activityView.hidden = YES; - [self.activityView stopAnimating]; - self.ctaControl.hidden = self.hideCTA; - self.selectedPaymentMethodView.hidden = NO; - self.changeSelectedPaymentMethodButton.hidden = NO; - break; - case BTDropInContentViewStateActivity: - self.activityView.hidden = NO; - self.activityView.alpha = 1.0f; - [self.activityView startAnimating]; - break; - default: - break; - } - [self setNeedsUpdateConstraints]; -} - - -#pragma mark Tap Gesture Delegate - -- (BOOL)gestureRecognizer:(__unused UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { - // Disallow recognition of tap gestures on UIControls (like, say, buttons) - if ([touch.view isKindOfClass:[UIControl class]] || [touch.view isDescendantOfView:self.paymentButton]) { - return NO; - } - return YES; -} - - -- (void)tapped { - [self.cardForm endEditing:YES]; -} - -- (NSArray*) evaluateVisualFormat{ - NSString *summaryViewVisualFormat = self.summaryView.hidden ? @"" : @"[summaryView(>=60)]"; - NSString *ctaControlVisualFormat = self.ctaControl.hidden ? @"" : @"[ctaControl(==50)]"; - - if (self.state == BTDropInContentViewStateActivity) { - return @[[NSString stringWithFormat:@"V:|%@-(40)-[activityView]-(>=40)-%@|", summaryViewVisualFormat, ctaControlVisualFormat]]; - - } else if (self.state != BTDropInContentViewStatePaymentMethodsOnFile) { - if (!self.ctaControl.hidden) { - ctaControlVisualFormat = [NSString stringWithFormat:@"-(15)-%@-(>=0)-", ctaControlVisualFormat]; - } - if (self.hidePaymentButton){ - return @[[NSString stringWithFormat:@"V:|%@-(35)-[cardFormSectionHeader]-(7)-[cardForm]%@|", summaryViewVisualFormat, ctaControlVisualFormat]]; - } else { - summaryViewVisualFormat = [NSString stringWithFormat:@"%@-(35)-", summaryViewVisualFormat]; - return @[[NSString stringWithFormat:@"V:|%@[paymentButton(==44)]-(18)-[cardFormSectionHeader]-(7)-[cardForm]%@|", summaryViewVisualFormat, ctaControlVisualFormat]]; - } - - } else { - NSString *primaryLayout = [NSString stringWithFormat:@"V:|%@-(15)-[selectedPaymentMethodView(==45)]-(15)-[changeSelectedPaymentMethodButton]-(>=15)-%@|", summaryViewVisualFormat, ctaControlVisualFormat]; - NSMutableArray *visualLayouts = [NSMutableArray arrayWithObject:primaryLayout]; - if (!self.ctaControl.hidden) { - [visualLayouts addObject:@"V:[ctaControl]|"]; - } - return visualLayouts; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.h deleted file mode 100755 index b2330b24..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.h +++ /dev/null @@ -1,21 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BTDropInErrorAlert : NSObject - -@property (nonatomic, copy) NSString *title; -@property (nonatomic, copy, nullable) NSString *message; -@property (nonatomic, copy, nullable) void (^retryBlock)(); -@property (nonatomic, copy, nullable) void (^cancelBlock)(); -@property (nonatomic, weak, nullable) UIViewController *presentingViewController; - -- (instancetype)initWithPresentingViewController:(UIViewController *)viewController NS_DESIGNATED_INITIALIZER; - -- (instancetype)init __attribute__((unavailable("Please use initWithPresentingViewController:"))); - -- (void)showWithDismissalHandler:(void (^)())dismissalHandler; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.m deleted file mode 100755 index 2e85fb00..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "BTDropInErrorAlert.h" -#import "BTDropInLocalizedString.h" - -@interface BTDropInErrorAlert () - -@property (nonatomic, copy, nullable) void (^dismissalHandler)(); - -@end - -@implementation BTDropInErrorAlert - -- (instancetype)initWithPresentingViewController:(UIViewController *)viewController -{ - if (self = [super init]) { - _presentingViewController = viewController; - } - return self; -} - - -- (void)showWithDismissalHandler:(void (^)())dismissalHandler { - NSString *localizedOK = BTDropInLocalizedString(ERROR_ALERT_OK_BUTTON_TEXT); - NSString *localizedCancel = BTDropInLocalizedString(ERROR_ALERT_CANCEL_BUTTON_TEXT); - self.dismissalHandler = dismissalHandler; - - if ([UIAlertController class]) { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:self.title message:self.message preferredStyle:UIAlertControllerStyleAlert]; - - [alertController addAction:[UIAlertAction actionWithTitle:self.retryBlock ? localizedCancel : localizedOK - style:UIAlertActionStyleCancel - handler:^(__unused UIAlertAction *action) { - if (self.cancelBlock) { - self.cancelBlock(); - } - if (self.dismissalHandler) { - self.dismissalHandler(); - } - }]]; - if (self.retryBlock) { - [alertController addAction:[UIAlertAction actionWithTitle:BTDropInLocalizedString(ERROR_ALERT_TRY_AGAIN_BUTTON_TEXT) - style:UIAlertActionStyleDefault - handler:^(__unused UIAlertAction *action) { - if (self.retryBlock) { - self.retryBlock(); - } - if (self.dismissalHandler) { - self.dismissalHandler(); - } - }]]; - } - - [self.presentingViewController presentViewController:alertController animated:YES completion:nil]; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:self.title - message:self.message - delegate:self - cancelButtonTitle:self.retryBlock ? localizedCancel : localizedOK - otherButtonTitles:nil]; - - if (self.retryBlock) { - NSString *localizedTryAgain = BTDropInLocalizedString(ERROR_ALERT_TRY_AGAIN_BUTTON_TEXT); - [alertView addButtonWithTitle:localizedTryAgain]; - } - - [alertView show]; -#pragma clang diagnostic pop - } -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -- (void)alertView:(__unused UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == 0 && self.cancelBlock) { - self.cancelBlock(); - } else if (buttonIndex == 1 && self.retryBlock) { - self.retryBlock(); - } - self.dismissalHandler(); -} -#pragma clang diagnostic pop - -- (NSString *)title { - return _title ?: BTDropInLocalizedString(ERROR_ALERT_CONNECTION_ERROR); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.h deleted file mode 100755 index 6539b43b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.h +++ /dev/null @@ -1,29 +0,0 @@ -#import - -/*! - @discussion Interprets NSError objects of domain BTHTTPErrorDomain, code - BTHTTPErrorCodeClientError (status code 422) for Drop-In UI Components. -*/ -@interface BTDropInErrorState : NSObject - -/*! - @discussion Initializes a new error state object returned by - saveCardWithNumber:expirationMonth:expirationYear:cvv:postalCode:validate:success:failure:. - - @param error The error to interpret - - @return a new error state instance -*/ -- (instancetype)initWithError:(NSError *)error; - -/*! - @brief Top-level description of error -*/ -@property (nonatomic, copy, readonly) NSString *errorTitle; - -/*! - @brief Set of invalid fields to highlight, each represented as a boxed BTUICardFormField -*/ -@property (nonatomic, strong, readonly) NSSet *highlightedFields; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.m deleted file mode 100755 index e9e3c4ec..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInErrorState.m +++ /dev/null @@ -1,64 +0,0 @@ -#import "BTDropInErrorState.h" -#import "BTUICardFormView.h" -#import "BTErrors.h" - -@interface BTDropInErrorState () -@property (nonatomic, strong) NSError *error; - -@end - -@implementation BTDropInErrorState - -- (instancetype)initWithError:(__unused NSError *)error{ - self = [super init]; - if (self != nil) { - self.error = error; - } - return self; -} - -- (NSString *)errorTitle { - return self.validationErrors[@"error"][@"message"]; -} - -- (NSDictionary *)validationErrors { - return self.error.userInfo[BTCustomerInputBraintreeValidationErrorsKey]; -} - -- (NSSet *)highlightedFields{ - NSMutableSet *fieldsToHighlight = [[NSMutableSet alloc] init]; - NSArray *fieldErrors = self.validationErrors[@"fieldErrors"]; - - NSArray *creditCardFieldErrors = @[]; - for (NSDictionary *fieldError in fieldErrors) { - if ([fieldError[@"field"] isEqualToString:@"creditCard"]) { - creditCardFieldErrors = fieldError[@"fieldErrors"]; - break; - } - } - - for (NSDictionary *creditCardFieldError in creditCardFieldErrors) { - NSString *field = creditCardFieldError[@"field"]; - if([field isEqualToString:@"cvv"]){ - [fieldsToHighlight addObject:@(BTUICardFormFieldCvv)]; - } else if ([field isEqualToString:@"billingAddress"]) { - for (NSDictionary *billingAddressFieldError in creditCardFieldError[@"fieldErrors"]) { - NSString *billingAddressField = billingAddressFieldError[@"field"]; - if ([billingAddressField isEqualToString:@"postalCode"]) { - [fieldsToHighlight addObject:@(BTUICardFormFieldPostalCode)]; - } - } - } else if ([field isEqualToString:@"number"]) { - [fieldsToHighlight addObject:@(BTUICardFormFieldNumber)]; - } else if ([field isEqualToString:@"expirationDate"] || [field isEqualToString:@"expirationMonth"] || [field isEqualToString:@"expirationYear"]) { - [fieldsToHighlight addObject:@(BTUICardFormFieldExpiration)]; - } - } - return fieldsToHighlight; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"", self, self.errorTitle, self.highlightedFields]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.h deleted file mode 100755 index a1d845c9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.h +++ /dev/null @@ -1,37 +0,0 @@ -#import - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -#import "BTUI.h" - -@protocol BTDropInSelectPaymentMethodViewControllerDelegate; - -/*! - @class BTDropInSelectPaymentMethodViewController - @brief Drop In's payment method selection flow. -*/ -@interface BTDropInSelectPaymentMethodViewController : UITableViewController - -@property (nonatomic, strong) BTAPIClient *client; -@property (nonatomic, weak) id delegate; - -@property (nonatomic, strong) NSArray *paymentMethodNonces; - -@property (nonatomic, assign) NSInteger selectedPaymentMethodIndex; - -@property (nonatomic, strong) BTUI *theme; - -@end - -@protocol BTDropInSelectPaymentMethodViewControllerDelegate - -- (void)selectPaymentMethodViewController:(BTDropInSelectPaymentMethodViewController *)viewController - didSelectPaymentMethodAtIndex:(NSUInteger)index; - -- (void)selectPaymentMethodViewControllerDidRequestNew:(BTDropInSelectPaymentMethodViewController *)viewController; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.m deleted file mode 100755 index 22d365dc..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInSelectPaymentMethodViewController.m +++ /dev/null @@ -1,78 +0,0 @@ -#import "BTDropInSelectPaymentMethodViewController.h" -#import "BTDropInUtil.h" -#import "BTUIViewUtil.h" -#import "BTUI.h" -#import "BTDropInViewController.h" -#import "BTDropInLocalizedString.h" -#import "BTUILocalizedString.h" - -@interface BTDropInSelectPaymentMethodViewController () - -@end - -@implementation BTDropInSelectPaymentMethodViewController - -- (instancetype)init { - return [self initWithStyle:UITableViewStyleGrouped]; -} - -- (id)initWithStyle:(UITableViewStyle)style -{ - self = [super initWithStyle:style]; - if (self) { - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(didTapAdd)]; - self.tableView.accessibilityIdentifier = @"Payment Methods Table"; - } - return self; -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - [self.tableView reloadData]; -} - -#pragma mark - - -- (void)didTapAdd { - [self.delegate selectPaymentMethodViewControllerDidRequestNew:self]; -} - -#pragma mark - Table view data source - -- (NSInteger)tableView:(__unused UITableView *)tableView numberOfRowsInSection:(__unused NSInteger)section { - return self.paymentMethodNonces.count; -} - - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *paymentMethodCellIdentifier = @"paymentMethodCell"; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:paymentMethodCellIdentifier]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:paymentMethodCellIdentifier]; - } - - BTPaymentMethodNonce *paymentInfo = self.paymentMethodNonces[indexPath.row]; - - BTUIPaymentOptionType paymentOptionType = [BTUI paymentOptionTypeForPaymentInfoType:paymentInfo.type]; - NSString *typeString = [BTUIViewUtil nameForPaymentMethodType:paymentOptionType]; - NSAttributedString *paymentOptionTypeString = [[NSAttributedString alloc] initWithString:typeString attributes:@{ NSFontAttributeName : self.theme.controlTitleFont }]; - cell.textLabel.attributedText = paymentOptionTypeString; - cell.detailTextLabel.text = paymentInfo.localizedDescription; - - BTUIVectorArtView *iconArt = [[BTUI braintreeTheme] vectorArtViewForPaymentInfoType:paymentInfo.type]; - UIImage *icon = [iconArt imageOfSize:CGSizeMake(42, 23)]; - cell.imageView.contentMode = UIViewContentModeCenter; - cell.imageView.image = icon; - cell.accessoryType = (indexPath.row == self.selectedPaymentMethodIndex) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; - - return cell; -} - -- (void)tableView:(__unused UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - self.selectedPaymentMethodIndex = indexPath.row; - [self.tableView reloadData]; - [self.delegate selectPaymentMethodViewController:self didSelectPaymentMethodAtIndex:indexPath.row]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.h deleted file mode 100755 index 118a9e2b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "BTCardNonce.h" -#import "BTUIPaymentOptionType.h" - -@interface BTDropInUtil : NSObject - -+ (BTUIPaymentOptionType)uiForCardNetwork:(BTCardNetwork)cardNetwork; - -/*! - @brief Get the top view controller - - @return The top most UIViewController - */ -+ (UIViewController *)topViewController; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.m deleted file mode 100755 index 71aaac05..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInUtil.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "BTDropInUtil.h" - -@implementation BTDropInUtil - -+ (BTUIPaymentOptionType)uiForCardNetwork:(BTCardNetwork)cardNetwork { - switch (cardNetwork) { - case BTCardNetworkUnknown: return BTUIPaymentOptionTypeUnknown; - case BTCardNetworkAMEX: return BTUIPaymentOptionTypeAMEX; - case BTCardNetworkDinersClub: return BTUIPaymentOptionTypeDinersClub; - case BTCardNetworkDiscover: return BTUIPaymentOptionTypeDiscover; - case BTCardNetworkMasterCard: return BTUIPaymentOptionTypeMasterCard; - case BTCardNetworkVisa: return BTUIPaymentOptionTypeVisa; - case BTCardNetworkJCB: return BTUIPaymentOptionTypeJCB; - case BTCardNetworkLaser: return BTUIPaymentOptionTypeLaser; - case BTCardNetworkMaestro: return BTUIPaymentOptionTypeMaestro; - case BTCardNetworkUnionPay: return BTUIPaymentOptionTypeUnionPay; - case BTCardNetworkSolo: return BTUIPaymentOptionTypeSolo; - case BTCardNetworkSwitch: return BTUIPaymentOptionTypeSwitch; - case BTCardNetworkUKMaestro: return BTUIPaymentOptionTypeUKMaestro; - default: return BTUIPaymentOptionTypeUnknown; - } -} - -+ (UIViewController *)topViewController { - UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)]; - UIViewController *topViewController = sharedApplication.keyWindow.rootViewController; - - while (topViewController.presentedViewController) { - topViewController = topViewController.presentedViewController; - } - return topViewController; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController.m deleted file mode 100755 index 53c43789..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController.m +++ /dev/null @@ -1,721 +0,0 @@ -#import "BTAPIClient_Internal.h" -#import "BTCard.h" -#import "BTCardClient.h" -#import "BTCardRequest.h" -#import "BTDropInViewController_Internal.h" -#import "BTLogger_Internal.h" -#import "BTDropInErrorAlert.h" -#import "BTDropInErrorState.h" -#import "BTDropInLocalizedString.h" -#import "BTDropInSelectPaymentMethodViewController.h" -#import "BTDropInUtil.h" -#import "BTPaymentMethodNonceParser.h" -#import "BTTokenizationService.h" -#import "BTUICardFormView.h" -#import "BTUIScrollView.h" - -@interface BTDropInViewController () - -@property (nonatomic, strong) BTUIScrollView *scrollView; -@property (nonatomic, assign) NSInteger selectedPaymentMethodNonceIndex; -@property (nonatomic, strong) UIBarButtonItem *submitBarButtonItem; - -/// Whether currently visible. -@property (nonatomic, assign) BOOL visible; -@property (nonatomic, assign) NSTimeInterval visibleStartTime; - -/// If YES, fetch and display payment methods on file, summary view, CTA control. -/// If NO, do not fetch payment methods, and just show UI to add a new method. -/// -/// Defaults to `YES`. -@property (nonatomic, assign) BOOL fullForm; - -@property (nonatomic, assign) BOOL cardEntryDidBegin; -@property (nonatomic, assign) BOOL cardEntryDidFocus; - -@property (nonatomic, assign) BOOL originalCoinbaseStoreInVault; - -/// Used to strongly retain any BTDropInErrorAlert instances in case UIViewAlert is used -@property (nonatomic, strong, nonnull) NSMutableSet *errorAlerts; - -@end - -@implementation BTDropInViewController - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - self.theme = [BTUI braintreeTheme]; - self.dropInContentView = [[BTDropInContentView alloc] init]; - self.dropInContentView.paymentButton.viewControllerPresentingDelegate = self; - - self.apiClient = [apiClient copyWithSource:apiClient.metadata.source integration:BTClientMetadataIntegrationDropIn]; - self.dropInContentView.paymentButton.apiClient = self.apiClient; - - __weak typeof(self) weakSelf = self; - self.dropInContentView.paymentButton.completion = ^(BTPaymentMethodNonce *paymentMethodNonce, NSError *error) { - [weakSelf paymentButtonDidCompleteTokenization:paymentMethodNonce fromViewController:weakSelf error:error]; - }; - - self.dropInContentView.hidePaymentButton = !self.dropInContentView.paymentButton.hasAvailablePaymentMethod; - - self.selectedPaymentMethodNonceIndex = NSNotFound; - self.dropInContentView.state = BTDropInContentViewStateActivity; - self.fullForm = YES; - - self.errorAlerts = [NSMutableSet set]; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - self.edgesForExtendedLayout = UIRectEdgeNone; - - self.view.backgroundColor = self.theme.viewBackgroundColor; - - // Configure Subviews - self.scrollView = [[BTUIScrollView alloc] init]; - self.scrollView.scrollRectToVisibleDelegate = self; - self.scrollView.bounces = YES; - self.scrollView.scrollsToTop = YES; - self.scrollView.alwaysBounceVertical = YES; - self.scrollView.translatesAutoresizingMaskIntoConstraints = NO; - self.scrollView.delaysContentTouches = NO; - self.scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(keyboardWillHide:) - name:UIKeyboardWillHideNotification - object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(keyboardWillShow:) - name:UIKeyboardWillShowNotification - object:nil]; - - self.dropInContentView.translatesAutoresizingMaskIntoConstraints = NO; - - self.dropInContentView.cardForm.delegate = self; - self.dropInContentView.cardForm.alphaNumericPostalCode = YES; - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - - if (!self.delegate) { - // Log integration error, as a delegate is required by this point - [[BTLogger sharedLogger] critical:@"ERROR: Drop-in delegate not set"]; - } - - self.dropInContentView.hidePaymentButton = !self.dropInContentView.paymentButton.hasAvailablePaymentMethod; - - if (![self isAddPaymentMethodDropInViewController]) { - [self fetchPaymentMethodsOnCompletion:^{}]; - } - - if (error) { - BTDropInErrorAlert *errorAlert = [[BTDropInErrorAlert alloc] initWithPresentingViewController:self]; - errorAlert.title = error.localizedDescription ?: BTDropInLocalizedString(ERROR_ALERT_CONNECTION_ERROR); - [self.errorAlerts addObject:errorAlert]; - [errorAlert showWithDismissalHandler:^{ - [self.errorAlerts removeObject:errorAlert]; - }]; - } - - NSArray *challenges = [configuration.json[@"challenges"] asStringArray]; - - static NSString *cvvChallenge = @"cvv"; - static NSString *postalCodeChallenge = @"postal_code"; - - BTUICardFormOptionalFields optionalFields; - if ([challenges containsObject:cvvChallenge] && [challenges containsObject:postalCodeChallenge]) { - optionalFields = BTUICardFormOptionalFieldsCvv | BTUICardFormFieldPostalCode; - } else if ([challenges containsObject:cvvChallenge]) { - optionalFields = BTUICardFormOptionalFieldsCvv; - } else if ([challenges containsObject:postalCodeChallenge]) { - optionalFields = BTUICardFormOptionalFieldsPostalCode; - } else { - optionalFields = BTUICardFormOptionalFieldsNone; - } - - self.dropInContentView.cardForm.optionalFields = optionalFields; - - [self informDelegateDidLoad]; - }]; - - [self.dropInContentView.changeSelectedPaymentMethodButton addTarget:self - action:@selector(tappedChangePaymentMethod) - forControlEvents:UIControlEventTouchUpInside]; - - [self.dropInContentView.ctaControl addTarget:self - action:@selector(tappedSubmitForm) - forControlEvents:UIControlEventTouchUpInside]; - - self.dropInContentView.cardFormSectionHeader.textColor = self.theme.sectionHeaderTextColor; - self.dropInContentView.cardFormSectionHeader.font = self.theme.sectionHeaderFont; - self.dropInContentView.cardFormSectionHeader.text = BTDropInLocalizedString(CARD_FORM_SECTION_HEADER); - - - // Call the setters explicitly - [self updateDropInContentViewFromPaymentRequest]; - - [self.dropInContentView setNeedsUpdateConstraints]; - - // Add Subviews - [self.view addSubview:self.scrollView]; - [self.scrollView addSubview:self.dropInContentView]; - - // Add initial constraints - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[scrollView]|" - options:0 - metrics:nil - views:@{@"scrollView": self.scrollView}]]; - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[scrollView]|" - options:0 - metrics:nil - views:@{@"scrollView": self.scrollView}]]; - - [self.scrollView addConstraint:[NSLayoutConstraint constraintWithItem:self.dropInContentView - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self.scrollView - attribute:NSLayoutAttributeWidth - multiplier:1 - constant:0]]; - - [self.scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[dropInContentView]|" - options:0 - metrics:nil - views:@{@"dropInContentView": self.dropInContentView}]]; - - [self.scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[dropInContentView]|" - options:0 - metrics:nil - views:@{@"dropInContentView": self.dropInContentView}]]; - - if (!self.fullForm) { - self.dropInContentView.state = BTDropInContentViewStateForm; - } - - [self updateValidity]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - self.visible = YES; - self.visibleStartTime = [NSDate timeIntervalSinceReferenceDate]; - - // Ensure dropInContentView is visible. See viewWillDisappear below - self.dropInContentView.alpha = 1.0f; - - if (self.fullForm) { - [self.apiClient sendAnalyticsEvent:@"dropin.ios.appear"]; - } - [self.apiClient sendAnalyticsEvent:@"ios.dropin.appear.succeeded"]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - // Quickly fade out the content view to prevent a jarring effect - // as keyboard dimisses. - [UIView animateWithDuration:self.theme.quickTransitionDuration animations:^{ - self.dropInContentView.alpha = 0.0f; - }]; - if (self.fullForm) { - [self.apiClient sendAnalyticsEvent:@"dropin.ios.disappear"]; - } -} - -- (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; - self.visible = NO; -} - -#pragma mark - BTUIScrollViewScrollRectToVisibleDelegate implementation - -// Delegate implementation to handle "custom" autoscrolling via the BTUIScrollView class -// -// Scroll priorities are: -// 1. Attempt to display the submit button, even if it means the card form title is not visible. -// 2. If that isn't possible, at least attempt to show the card form title. -// 3. If that fails, fail just do the default behavior (relevant in landscape). -// -// Some cleanup here could attempt to parameterize or make sane some of the magic number pixel nudging. -- (void)scrollView:(BTUIScrollView *)scrollView requestsScrollRectToVisible:(CGRect)rect animated:(BOOL)animated { - - CGRect targetRect = rect; - - CGRect desiredVisibleTopRect = [self.scrollView convertRect:self.dropInContentView.cardFormSectionHeader.frame fromView:self.dropInContentView]; - desiredVisibleTopRect.origin.y -= 7; - CGRect desiredVisibleBottomRect; - if (self.dropInContentView.ctaControl.hidden) { - desiredVisibleBottomRect = desiredVisibleTopRect; - } else { - desiredVisibleBottomRect = [self.scrollView convertRect:self.dropInContentView.ctaControl.frame fromView:self.dropInContentView]; - } - - CGFloat visibleAreaHeight = self.scrollView.frame.size.height - self.scrollView.contentInset.bottom - self.scrollView.contentInset.top; - - CGRect weightedBottomRect = CGRectUnion(targetRect, desiredVisibleBottomRect); - if (weightedBottomRect.size.height <= visibleAreaHeight) { - targetRect = weightedBottomRect; - } - - CGRect weightedTopRect = CGRectUnion(targetRect, desiredVisibleTopRect); - - if (weightedTopRect.size.height <= visibleAreaHeight) { - targetRect = weightedTopRect; - targetRect.size.height = MIN(visibleAreaHeight, CGRectGetMaxY(weightedBottomRect) - CGRectGetMinY(targetRect)); - } - - [scrollView defaultScrollRectToVisible:targetRect animated:animated]; -} - -#pragma mark - Keyboard behavior - -- (void)keyboardWillHide:(__unused NSNotification *)inputViewNotification { - UIEdgeInsets ei = UIEdgeInsetsMake(0.0, 0.0, 0.0, 0.0); - [UIView animateWithDuration:self.theme.transitionDuration animations:^{ - self.scrollView.scrollIndicatorInsets = ei; - self.scrollView.contentInset = ei; - }]; -} - -- (void)keyboardWillShow:(__unused NSNotification *)inputViewNotification { - CGRect inputViewFrame = [[[inputViewNotification userInfo] valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; - CGRect inputViewFrameInView = [self.view convertRect:inputViewFrame fromView:nil]; - CGRect intersection = CGRectIntersection(self.scrollView.frame, inputViewFrameInView); - UIEdgeInsets ei = UIEdgeInsetsMake(0.0, 0.0, intersection.size.height, 0.0); - self.scrollView.scrollIndicatorInsets = ei; - self.scrollView.contentInset = ei; -} - -#pragma mark - Handlers - -- (void)tappedChangePaymentMethod { - UIViewController *rootViewController; - if (self.paymentMethodNonces.count == 1) { - rootViewController = self.addPaymentMethodDropInViewController; - } else { - BTDropInSelectPaymentMethodViewController *selectPaymentMethod = [[BTDropInSelectPaymentMethodViewController alloc] init]; - selectPaymentMethod.title = BTDropInLocalizedString(SELECT_PAYMENT_METHOD_TITLE); - selectPaymentMethod.theme = self.theme; - selectPaymentMethod.paymentMethodNonces = self.paymentMethodNonces; - selectPaymentMethod.selectedPaymentMethodIndex = self.selectedPaymentMethodNonceIndex; - selectPaymentMethod.delegate = self; - selectPaymentMethod.client = self.apiClient; - rootViewController = selectPaymentMethod; - } - rootViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel - target:self - action:@selector(didCancelChangePaymentMethod)]; - - UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; - [self presentViewController:navController animated:YES completion:nil]; -} - -- (void)tappedSubmitForm { - [self showLoadingState:YES]; - - BTPaymentMethodNonce *paymentInfo = [self selectedPaymentMethod]; - if (paymentInfo != nil) { - [self showLoadingState:NO]; - [self informDelegateWillComplete]; - [self informDelegateDidAddPaymentInfo:paymentInfo]; - } else if (!self.dropInContentView.cardForm.hidden) { - BTUICardFormView *cardForm = self.dropInContentView.cardForm; - - if (cardForm.valid) { - [self informDelegateWillComplete]; - - BTCard *card = [[BTCard alloc] initWithNumber:cardForm.number expirationMonth:cardForm.expirationMonth expirationYear:cardForm.expirationYear cvv:cardForm.cvv]; - card.postalCode = cardForm.postalCode; - card.shouldValidate = self.apiClient.tokenizationKey ? NO : YES; - BTCardRequest *request = [[BTCardRequest alloc] initWithCard:card]; - BTAPIClient *copiedAPIClient = [self.apiClient copyWithSource:BTClientMetadataSourceForm integration:BTClientMetadataIntegrationDropIn]; - BTCardClient *cardClient = [[BTCardClient alloc] initWithAPIClient:copiedAPIClient]; - - [cardClient tokenizeCard:request options:nil completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - [self showLoadingState:NO]; - - if (error) { - if ([error.domain isEqualToString:@"com.braintreepayments.BTCardClientErrorDomain"] && error.code == BTCardClientErrorTypeCustomerInputInvalid) { - [self informUserDidFailWithError:error]; - } else { - BTDropInErrorAlert *errorAlert = [[BTDropInErrorAlert alloc] initWithPresentingViewController:self]; - errorAlert.title = BTDropInLocalizedString(ERROR_SAVING_CARD_ALERT_TITLE); - errorAlert.message = error.localizedDescription; - __weak typeof(self) weakSelf = self; - errorAlert.cancelBlock = ^{ - // Use the paymentMethodNonces setter to update state - weakSelf.paymentMethodNonces = weakSelf.paymentMethodNonces; - }; - [self.errorAlerts addObject:errorAlert]; - [errorAlert showWithDismissalHandler:^{ - [self.errorAlerts removeObject:errorAlert]; - }]; - } - return; - } - - [self informDelegateDidAddPaymentInfo:tokenizedCard]; - }]; - } else { - BTDropInErrorAlert *errorAlert = [[BTDropInErrorAlert alloc] initWithPresentingViewController:self]; - errorAlert.title = BTDropInLocalizedString(ERROR_SAVING_CARD_ALERT_TITLE); - errorAlert.message = BTDropInLocalizedString(ERROR_SAVING_CARD_MESSAGE); - [self.errorAlerts addObject:errorAlert]; - [errorAlert showWithDismissalHandler:^{ - [self.errorAlerts removeObject:errorAlert]; - }]; - } - } -} - -- (void)didCancelChangePaymentMethod { - [self dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma mark Progress UI - -- (void)cardFormViewDidBeginEditing:(__unused BTUICardFormView *)cardFormView { - if (!self.cardEntryDidFocus) { - [self.apiClient sendAnalyticsEvent:@"ios.dropin.card.focus"]; - self.cardEntryDidFocus = YES; - } -} - - -- (void)showLoadingState:(BOOL)loadingState { - [self.dropInContentView.ctaControl showLoadingState:loadingState]; - self.submitBarButtonItem.enabled = !loadingState; - if (self.submitBarButtonItem != nil) { - [BTUI activityIndicatorViewStyleForBarTintColor:self.navigationController.navigationBar.barTintColor]; - UIActivityIndicatorView *submitInProgressActivityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; - [submitInProgressActivityIndicator startAnimating]; - UIBarButtonItem *submitInProgressActivityIndicatorBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:submitInProgressActivityIndicator]; - [self.navigationItem setRightBarButtonItem:(loadingState ? submitInProgressActivityIndicatorBarButtonItem : self.submitBarButtonItem) animated:YES]; - } -} - -#pragma mark Error UI - -- (void)informUserDidFailWithError:(__unused NSError *)error { - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - - [self.dropInContentView.cardForm showTopLevelError:state.errorTitle]; - for (NSNumber *fieldNumber in state.highlightedFields) { - BTUICardFormField field = [fieldNumber unsignedIntegerValue]; - [self.dropInContentView.cardForm showErrorForField:field]; - } -} - -#pragma mark Card Form Delegate methods - -- (void)cardFormViewDidChange:(__unused BTUICardFormView *)cardFormView { - - if (!self.cardEntryDidBegin) { - [self.apiClient sendAnalyticsEvent:@"dropin.ios.add-card.start"]; - self.cardEntryDidBegin = YES; - } - - [self updateValidity]; -} - -#pragma mark Drop In Select Payment Method Table View Controller Delegate methods - -- (void)selectPaymentMethodViewController:(BTDropInSelectPaymentMethodViewController *)viewController - didSelectPaymentMethodAtIndex:(NSUInteger)index { - self.selectedPaymentMethodNonceIndex = index; - [viewController.navigationController dismissViewControllerAnimated:YES completion:nil]; -} - -- (void)selectPaymentMethodViewControllerDidRequestNew:(BTDropInSelectPaymentMethodViewController *)viewController { - [viewController.navigationController pushViewController:self.addPaymentMethodDropInViewController animated:YES]; -} - -#pragma mark BTDropInViewControllerDelegate implementation - -- (void)dropInViewController:(BTDropInViewController *)viewController didSucceedWithTokenization:(BTPaymentMethodNonce *)paymentMethodNonce { - [viewController.navigationController dismissViewControllerAnimated:YES completion:nil]; - - NSMutableArray *newPaymentMethodNonces = [NSMutableArray arrayWithArray:self.paymentMethodNonces]; - [newPaymentMethodNonces insertObject:paymentMethodNonce atIndex:0]; - self.paymentMethodNonces = newPaymentMethodNonces; -} - -- (void)dropInViewControllerDidCancel:(BTDropInViewController *)viewController { - [viewController.navigationController dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma mark BTAppSwitchDelegate - -- (void)paymentDriverWillPerformAppSwitch:(__unused id)sender { - // If there is a presented view controller, dismiss it before app switch - // so that the result of the app switch can be shown in this view controller. - if ([self presentedViewController]) { - [self dismissViewControllerAnimated:YES completion:nil]; - } -} - -#pragma mark Delegate Notifications - -- (void)informDelegateDidLoad { - if ([self.delegate respondsToSelector:@selector(dropInViewControllerDidLoad:)]) { - [self.delegate dropInViewControllerDidLoad:self]; - } -} - -- (void)informDelegateWillComplete { - if ([self.delegate respondsToSelector:@selector(dropInViewControllerWillComplete:)]) { - [self.delegate dropInViewControllerWillComplete:self]; - } -} - -- (void)informDelegateDidAddPaymentInfo:(BTPaymentMethodNonce *)paymentMethodNonce { - if ([self.delegate respondsToSelector:@selector(dropInViewController:didSucceedWithTokenization:)]) { - [self.delegate dropInViewController:self - didSucceedWithTokenization:paymentMethodNonce]; - } -} - -- (void)informDelegateDidCancel { - if ([self.delegate respondsToSelector:@selector(dropInViewControllerDidCancel:)]) { - [self.delegate dropInViewControllerDidCancel:self]; - } -} - -#pragma mark User Supplied Parameters - -- (void)setFullForm:(BOOL)fullForm { - _fullForm = fullForm; - if (!self.fullForm) { - self.dropInContentView.state = BTDropInContentViewStateForm; - } -} - -- (void)setShouldHideCallToAction:(BOOL)shouldHideCallToAction { - self.dropInContentView.hideCTA = shouldHideCallToAction; - - self.submitBarButtonItem = shouldHideCallToAction ? [[UIBarButtonItem alloc] - initWithBarButtonSystemItem:UIBarButtonSystemItemSave - target:self - action:@selector(tappedSubmitForm)] : nil; - self.submitBarButtonItem.style = UIBarButtonItemStyleDone; - self.navigationItem.rightBarButtonItem = self.submitBarButtonItem; -} - -- (void)setSummaryTitle:(NSString *)summaryTitle { - self.dropInContentView.summaryView.slug = summaryTitle; - self.dropInContentView.hideSummary = (summaryTitle == nil || self.dropInContentView.summaryView.summary == nil); -} - -- (void)setSummaryDescription:(NSString *)summaryDescription { - self.dropInContentView.summaryView.summary = summaryDescription; - self.dropInContentView.hideSummary = (self.dropInContentView.summaryView.slug == nil || summaryDescription == nil); -} - -- (void)setDisplayAmount:(NSString *)displayAmount { - self.dropInContentView.summaryView.amount = displayAmount; -} - -- (void)setCallToActionText:(NSString *)callToActionText { - self.dropInContentView.ctaControl.callToAction = callToActionText; -} - -- (void)setCardNumber:(NSString *)cardNumber { - self.dropInContentView.cardForm.number = cardNumber; -} - -- (void)setCardExpirationMonth:(NSInteger)expirationMonth year:(NSInteger)expirationYear { - [self.dropInContentView.cardForm setExpirationMonth:expirationMonth year:expirationYear]; -} - -#pragma mark Data - -- (void)setPaymentMethodNonces:(NSArray *)paymentMethodNonces { - _paymentMethodNonces = paymentMethodNonces; - BTDropInContentViewStateType newState; - - if ([self.paymentMethodNonces count] == 0) { - self.selectedPaymentMethodNonceIndex = NSNotFound; - newState = BTDropInContentViewStateForm; - } else { - self.selectedPaymentMethodNonceIndex = 0; - newState = BTDropInContentViewStatePaymentMethodsOnFile; - } - if (self.visible) { - NSTimeInterval elapsed = [NSDate timeIntervalSinceReferenceDate] - self.visibleStartTime; - if (elapsed < self.theme.minimumVisibilityTime) { - NSTimeInterval delay = self.theme.minimumVisibilityTime - elapsed; - - __weak typeof(self) weakSelf = self; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [self.dropInContentView setState:newState animate:YES completion:^{ - [weakSelf updateValidity]; - }]; - }); - return; - } - } - [self.dropInContentView setState:newState animate:self.visible]; - [self updateValidity]; -} - -- (void)setSelectedPaymentMethodNonceIndex:(NSInteger)selectedPaymentMethodNonceIndex { - _selectedPaymentMethodNonceIndex = selectedPaymentMethodNonceIndex; - if (_selectedPaymentMethodNonceIndex != NSNotFound) { - BTPaymentMethodNonce *defaultPaymentMethod = [self selectedPaymentMethod]; - BTUIPaymentOptionType paymentMethodType = [BTUI paymentOptionTypeForPaymentInfoType:defaultPaymentMethod.type]; - self.dropInContentView.selectedPaymentMethodView.type = paymentMethodType; - self.dropInContentView.selectedPaymentMethodView.detailDescription = defaultPaymentMethod.localizedDescription; - } - [self updateValidity]; -} - -- (BTPaymentMethodNonce *)selectedPaymentMethod { - return self.selectedPaymentMethodNonceIndex != NSNotFound ? self.paymentMethodNonces[self.selectedPaymentMethodNonceIndex] : nil; -} - -- (void)updateValidity { - BTPaymentMethodNonce *paymentMethod = [self selectedPaymentMethod]; - BOOL valid = (paymentMethod != nil) || (!self.dropInContentView.cardForm.hidden && self.dropInContentView.cardForm.valid); - - [self.navigationItem.rightBarButtonItem setEnabled:valid]; - [UIView animateWithDuration:self.theme.quickTransitionDuration animations:^{ - self.dropInContentView.ctaControl.enabled = valid; - self.dropInContentView.paymentButton.alpha = valid ? 0.3 : 1.0; - }]; -} - -- (void)fetchPaymentMethodsOnCompletion:(void(^)())completionBlock { - // Check for proper authorization before fetching payment methods to suppress errors when using tokenization key - if (!self.apiClient.clientToken) { - self.paymentMethodNonces = @[]; - if (completionBlock) { - completionBlock(); - } - return; - } - - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; - - [self.apiClient fetchPaymentMethodNonces:self.paymentRequest.showDefaultPaymentMethodNonceFirst completion:^(NSArray *paymentMethodNonces, NSError *error) { - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - - if (error) { - BTDropInErrorAlert *errorAlert = [[BTDropInErrorAlert alloc] initWithPresentingViewController:self]; - errorAlert.title = error.localizedDescription; - BTJSON *errorBody = error.userInfo[BTHTTPJSONResponseBodyKey]; - errorAlert.message = [errorBody[@"error"][@"message"] asString]; - errorAlert.cancelBlock = ^{ - [self informDelegateDidCancel]; - if (completionBlock) completionBlock(); - }; - errorAlert.retryBlock = ^{ - [self fetchPaymentMethodsOnCompletion:completionBlock]; - }; - [self.errorAlerts addObject:errorAlert]; - [errorAlert showWithDismissalHandler:^{ - [self.errorAlerts removeObject:errorAlert]; - }]; - } else { - self.paymentMethodNonces = [paymentMethodNonces copy]; - if (completionBlock) { - completionBlock(); - } - } - }]; -} - -#pragma mark - BTPaymentRequest - -@synthesize paymentRequest = _paymentRequest; - -- (BTPaymentRequest *)paymentRequest { - if (!_paymentRequest) { - _paymentRequest = [[BTPaymentRequest alloc] init]; - } - return _paymentRequest; -} - -- (void)setPaymentRequest:(BTPaymentRequest *)paymentRequest { - _paymentRequest = paymentRequest; - [self updateDropInContentViewFromPaymentRequest]; -} - -- (void)updateDropInContentViewFromPaymentRequest { - self.dropInContentView.paymentButton.paymentRequest = self.paymentRequest; - [self setShouldHideCallToAction:self.paymentRequest.shouldHideCallToAction]; - [self setSummaryTitle:self.paymentRequest.summaryTitle]; - [self setSummaryDescription:self.paymentRequest.summaryDescription]; - [self setDisplayAmount:self.paymentRequest.displayAmount]; - [self setCallToActionText:self.paymentRequest.callToActionText]; -} - -#pragma mark - Helpers - -- (BTDropInViewController *)addPaymentMethodDropInViewController { - BTDropInViewController *addPaymentMethodDropInViewController = [[BTDropInViewController alloc] initWithAPIClient:self.apiClient]; - - addPaymentMethodDropInViewController.title = BTDropInLocalizedString(ADD_PAYMENT_METHOD_VIEW_CONTROLLER_TITLE); - addPaymentMethodDropInViewController.fullForm = NO; - - BTPaymentRequest *paymentRequest = [BTPaymentRequest new]; - paymentRequest.shouldHideCallToAction = YES; - addPaymentMethodDropInViewController.paymentRequest = paymentRequest; - - addPaymentMethodDropInViewController.delegate = self; - - __weak typeof(self) weakSelf = self; - __weak typeof(addPaymentMethodDropInViewController) weakAddPaymentMethodController = addPaymentMethodDropInViewController; - addPaymentMethodDropInViewController.dropInContentView.paymentButton.completion = ^(BTPaymentMethodNonce *paymentMethodNonce, NSError *error) { - [weakSelf paymentButtonDidCompleteTokenization:paymentMethodNonce fromViewController:weakAddPaymentMethodController error:error]; - }; - - return addPaymentMethodDropInViewController; -} - -- (void)paymentButtonDidCompleteTokenization:(BTPaymentMethodNonce *)paymentMethodNonce - fromViewController:(UIViewController *)viewController - error:(NSError *)error { - if (error) { - NSString *savePaymentMethodErrorAlertTitle = error.localizedDescription ?: BTDropInLocalizedString(ERROR_ALERT_CONNECTION_ERROR); - - BTDropInErrorAlert *errorAlert = [[BTDropInErrorAlert alloc] initWithPresentingViewController:viewController]; - errorAlert.title = savePaymentMethodErrorAlertTitle; - errorAlert.message = error.localizedFailureReason; - errorAlert.cancelBlock = ^{ - // Use the paymentMethodNonces setter to update state - self.paymentMethodNonces = self.paymentMethodNonces; - }; - - [self.errorAlerts addObject:errorAlert]; - [errorAlert showWithDismissalHandler:^{ - [self.errorAlerts removeObject:errorAlert]; - }]; - } else if (paymentMethodNonce) { - NSMutableArray *newPaymentMethods = [NSMutableArray arrayWithArray:self.paymentMethodNonces]; - [newPaymentMethods insertObject:paymentMethodNonce atIndex:0]; - self.paymentMethodNonces = newPaymentMethods; - [self informDelegateDidAddPaymentInfo:paymentMethodNonce]; - } else { - // Refresh payment methods display - self.paymentMethodNonces = self.paymentMethodNonces; - } -} - -- (BOOL)isAddPaymentMethodDropInViewController { - return [self.delegate isKindOfClass:[BTDropInViewController class]]; -} - -#pragma mark - BTViewControllerPresentingDelegate - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - UIViewController *presentingViewController = self.paymentRequest.presentViewControllersFromTop? [BTDropInUtil topViewController] : self; - [presentingViewController presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(__unused UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController_Internal.h deleted file mode 100755 index 24b4b974..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTDropInViewController_Internal.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "BTDropInViewController.h" -#import "BTDropInContentView.h" -#import "BTViewControllerPresentingDelegate.h" - -@interface BTDropInViewController () - -@property (nonatomic, strong) BTDropInContentView *dropInContentView; - -- (BTDropInViewController *)addPaymentMethodDropInViewController; - -// Exposed for internal testing of presenting view controllers from top -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton.m deleted file mode 100755 index 51d398d0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton.m +++ /dev/null @@ -1,362 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTPaymentButton_Internal.h" -#import "BTLogger_Internal.h" -#import "BTUIVenmoButton.h" -#import "BTUIPayPalButton.h" -#import "BTUIPayPalCompactButton.h" -#import "BTUICoinbaseButton.h" -#import "BTUIHorizontalButtonStackCollectionViewFlowLayout.h" -#import "BTUIPaymentButtonCollectionViewCell.h" - -NSString *BTPaymentButtonPaymentButtonCellIdentifier = @"BTPaymentButtonPaymentButtonCellIdentifier"; - -@interface BTPaymentButton () - -@property (nonatomic, strong) UICollectionView *paymentButtonsCollectionView; -@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView; -@property (nonatomic, strong) UIView *topBorder; -@property (nonatomic, strong) UIView *bottomBorder; -@property (nonatomic, assign) BOOL skipConfigurationValidation; - -@end - -@implementation BTPaymentButton - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient - completion:(void(^)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error))completion -{ - if (self = [super init]) { - _apiClient = apiClient; - _completion = [completion copy]; - [self setupViews]; - [self fetchConfiguration]; - } - return self; -} - -- (id)init { - self = [super init]; - return self; -} - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self setupViews]; - [self fetchConfiguration]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupViews]; - [self fetchConfiguration]; - } - return self; -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -- (void)fetchConfiguration { - [self.activityIndicatorView startAnimating]; - self.paymentButtonsCollectionView.hidden = YES; - - [self.apiClient fetchOrReturnRemoteConfiguration:^(__unused BTConfiguration * _Nullable configuration, __unused NSError * _Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^{ - [self.activityIndicatorView stopAnimating]; - self.paymentButtonsCollectionView.hidden = NO; - - if (error) { - self.completion(nil, error); - return; - } - - self.configuration = configuration; - }); - }]; -} - -- (void)setupViews { - self.clipsToBounds = YES; - - BTUIHorizontalButtonStackCollectionViewFlowLayout *layout = [[BTUIHorizontalButtonStackCollectionViewFlowLayout alloc] init]; - layout.minimumInteritemSpacing = 0.0f; - - self.paymentButtonsCollectionView = [[UICollectionView alloc] initWithFrame:self.bounds - collectionViewLayout:layout]; - self.paymentButtonsCollectionView.accessibilityIdentifier = @"Payment Options"; - self.paymentButtonsCollectionView.translatesAutoresizingMaskIntoConstraints = NO; - self.paymentButtonsCollectionView.allowsSelection = YES; - self.paymentButtonsCollectionView.delaysContentTouches = NO; - self.paymentButtonsCollectionView.delegate = self; - self.paymentButtonsCollectionView.dataSource = self; - self.paymentButtonsCollectionView.backgroundColor = [UIColor whiteColor]; - [self.paymentButtonsCollectionView registerClass:[BTUIPaymentButtonCollectionViewCell class] forCellWithReuseIdentifier:BTPaymentButtonPaymentButtonCellIdentifier]; - - self.topBorder = [[UIView alloc] init]; - self.topBorder.backgroundColor = [self.theme borderColor]; - self.topBorder.translatesAutoresizingMaskIntoConstraints = NO; - - self.bottomBorder = [[UIView alloc] init]; - self.bottomBorder.backgroundColor = [self.theme borderColor]; - self.bottomBorder.translatesAutoresizingMaskIntoConstraints = NO; - - [self addSubview:self.paymentButtonsCollectionView]; - [self addSubview:self.topBorder]; - [self addSubview:self.bottomBorder]; - - _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; - _activityIndicatorView.translatesAutoresizingMaskIntoConstraints = NO; - [self addSubview:_activityIndicatorView]; -} - -- (CGSize)intrinsicContentSize { - CGFloat height = self.enabledPaymentOptions.count > 0 ? 44 : 0; - - return CGSizeMake(UIViewNoIntrinsicMetric, height); -} - -- (void)layoutSubviews { - [super layoutSubviews]; - [self.paymentButtonsCollectionView.collectionViewLayout invalidateLayout]; -} - -- (void)updateConstraints { - NSDictionary *views = @{ @"paymentButtonsCollectionView": self.paymentButtonsCollectionView, - @"topBorder": self.topBorder, - @"bottomBorder": self.bottomBorder }; - NSDictionary *metrics = @{ @"borderWidth": @(self.theme.borderWidth) }; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[paymentButtonsCollectionView]|" - options:0 - metrics:metrics - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[paymentButtonsCollectionView]|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[topBorder]|" - options:0 - metrics:metrics - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[topBorder(==borderWidth)]" - options:0 - metrics:metrics - views:views]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[bottomBorder]|" - options:0 - metrics:metrics - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[bottomBorder(==borderWidth)]|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicatorView - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeCenterX - multiplier:1 - constant:0]]; - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicatorView - attribute:NSLayoutAttributeCenterY - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeCenterY - multiplier:1 - constant:0]]; - - [super updateConstraints]; -} - -#pragma mark - Accessors - -- (id)application { - if (!_application) { - _application = [UIApplication sharedApplication]; - } - return _application; -} - -- (void)setApiClient:(BTAPIClient *)apiClient { - _apiClient = apiClient; - [self fetchConfiguration]; -} - -#pragma mark PaymentButton State - -@synthesize enabledPaymentOptions = _enabledPaymentOptions; - -- (NSOrderedSet *)enabledPaymentOptions { - if (!_enabledPaymentOptions) { - _enabledPaymentOptions = [NSOrderedSet orderedSetWithArray:@[ @"PayPal", @"Venmo" ]]; - } - - if (self.skipConfigurationValidation) { - return _enabledPaymentOptions; - } - - /// Filter the availability of payment options by checking the merchant configuration - NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(NSString *paymentOption, __unused NSDictionary * _Nullable bindings) { - return [self isPaymentOptionAvailable:paymentOption]; - }]; - return [_enabledPaymentOptions filteredOrderedSetUsingPredicate:predicate]; -} - -- (void)setEnabledPaymentOptions:(NSOrderedSet *)enabledPaymentOptions { - _enabledPaymentOptions = enabledPaymentOptions; - self.skipConfigurationValidation = YES; - - [self invalidateIntrinsicContentSize]; - [self.paymentButtonsCollectionView reloadData]; -} - -- (void)setConfiguration:(BTConfiguration *)configuration { - _configuration = configuration; - - [self invalidateIntrinsicContentSize]; - [self.paymentButtonsCollectionView reloadData]; -} - -- (BOOL)isPaymentOptionAvailable:(NSString *)paymentOption { - if (![[BTTokenizationService sharedService] isTypeAvailable:paymentOption]) { - return NO; // If the payment option's framework is not present, it should never be shown - } - - if (self.configuration == nil) { - return YES; // Without Configuration, we can't do additional filtering. - } - - if ([paymentOption isEqualToString:@"PayPal"]) { - return [self.configuration.json[@"paypalEnabled"] isTrue]; - } else if ([paymentOption isEqualToString:@"Venmo"]) { - // Directly from BTConfiguration+Venmo.m. Be sure to keep these files in sync! This - // is intentionally not DRY so that BraintreeUI does not depend on BraintreeVenmo. - BTJSON *venmoAccessToken = self.configuration.json[@"payWithVenmo"][@"accessToken"]; - NSURLComponents *components = [NSURLComponents componentsWithString:@"com.venmo.touch.v2://x-callback-url/vzero/auth"]; - - BOOL isVenmoAppInstalled = [[self application] canOpenURL:components.URL]; - return venmoAccessToken.isString && isVenmoAppInstalled; - } - // Payment option is available in the tokenization service, but BTPaymentButton does not know how - // to check Configuration for whether it is enabled. Default to YES. - return YES; - -} - -- (BOOL)hasAvailablePaymentMethod { - return self.enabledPaymentOptions.count > 0 ? YES : NO; -} - -- (NSString *)paymentOptionForIndexPath:(NSIndexPath *)indexPath { - return self.enabledPaymentOptions[indexPath.row]; -} - -#pragma mark UICollectionViewDataSource methods - -- (NSInteger)collectionView:(__unused UICollectionView *)collectionView numberOfItemsInSection:(__unused NSInteger)section { - NSParameterAssert(section == 0); - return [self.enabledPaymentOptions count]; -} - -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - NSParameterAssert(indexPath.section == 0); - - BTUIPaymentButtonCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:BTPaymentButtonPaymentButtonCellIdentifier - forIndexPath:indexPath]; - NSString *paymentOption = [self paymentOptionForIndexPath:indexPath]; - - UIControl *paymentButton; - if ([paymentOption isEqualToString:@"PayPal"]) { - if (self.enabledPaymentOptions.count == 1) { - BTUIPayPalButton *payPalButton = [[BTUIPayPalButton alloc] initWithFrame:cell.bounds]; - payPalButton.layer.cornerRadius = self.theme.cornerRadius; - self.topBorder.hidden = YES; - self.bottomBorder.hidden = YES; - collectionView.backgroundColor = [UIColor clearColor]; - paymentButton = payPalButton; - } else { - paymentButton = [[BTUIPayPalCompactButton alloc] initWithFrame:cell.bounds]; - } - } else if ([paymentOption isEqualToString:@"Venmo"]) { - paymentButton = [[BTUIVenmoButton alloc] initWithFrame:cell.bounds]; - } else if ([paymentOption isEqualToString:@"Coinbase"]) { - paymentButton = [[BTUICoinbaseButton alloc] initWithFrame:cell.bounds]; - } else { - [[BTLogger sharedLogger] warning:@"BTPaymentButton encountered an unexpected payment option value: %@", paymentOption]; - return cell; - } - - cell.accessibilityLabel = paymentOption; - paymentButton.translatesAutoresizingMaskIntoConstraints = NO; - cell.paymentButton = paymentButton; - - return cell; -} - -- (void)collectionView:(__unused UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - NSAssert(self.apiClient, @"BTPaymentButton tapped without an apiClient. Please set a BTAPIClient on this payment button by setting the apiClient property."); - NSAssert(self.completion, @"BTPaymentButton tapped without a completion block. Please set up a completion block on this payment button by setting the completion property."); - - NSString *paymentOption = [self paymentOptionForIndexPath:indexPath]; - - if ([[BTTokenizationService sharedService] isTypeAvailable:paymentOption]) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willAppSwitch:) name:BTAppSwitchWillSwitchNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didAppSwitch:) name:BTAppSwitchDidSwitchNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willProcessPaymentInfo:) name:BTAppSwitchWillProcessPaymentInfoNotification object:nil]; - - NSMutableDictionary *options = [NSMutableDictionary dictionary]; - if (self.viewControllerPresentingDelegate != nil) { - options[BTTokenizationServiceViewPresentingDelegateOption] = self.viewControllerPresentingDelegate; - } - if (self.paymentRequest.additionalPayPalScopes != nil) { - options[BTTokenizationServicePayPalScopesOption] = self.paymentRequest.additionalPayPalScopes; - } - - [[BTTokenizationService sharedService] tokenizeType:paymentOption options:options withAPIClient:self.apiClient completion:self.completion]; - } else { - [[BTLogger sharedLogger] warning:@"BTPaymentButton encountered an unexpected payment option value: %@", paymentOption]; - } -} - -- (void)willAppSwitch:(NSNotification *)notification { - [[NSNotificationCenter defaultCenter] removeObserver:self name:BTAppSwitchWillSwitchNotification object:nil]; - - id paymentDriver = notification.object; - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillPerformAppSwitch:)]) { - [self.appSwitchDelegate appSwitcherWillPerformAppSwitch:paymentDriver]; - } -} - -- (void)didAppSwitch:(NSNotification *)notification { - [[NSNotificationCenter defaultCenter] removeObserver:self name:BTAppSwitchDidSwitchNotification object:nil]; - - id paymentDriver = notification.object; - BTAppSwitchTarget appSwitchTarget = [notification.userInfo[BTAppSwitchNotificationTargetKey] integerValue]; - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcher:didPerformSwitchToTarget:)]) { - [self.appSwitchDelegate appSwitcher:paymentDriver didPerformSwitchToTarget:appSwitchTarget]; - } -} - -- (void)willProcessPaymentInfo:(NSNotification *)notification { - [[NSNotificationCenter defaultCenter] removeObserver:self name:BTAppSwitchWillProcessPaymentInfoNotification object:nil]; - - id paymentDriver = notification.object; - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillProcessPaymentInfo:)]) { - [self.appSwitchDelegate appSwitcherWillProcessPaymentInfo:paymentDriver]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton_Internal.h deleted file mode 100755 index 3e38a4e5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/BTPaymentButton_Internal.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "BTPaymentButton.h" - -@interface BTPaymentButton () - -/*! - @discussion Defaults to [UIApplication sharedApplication], but exposed for unit tests to inject test doubles - to prevent calls to openURL. Its type is `id` and not `UIApplication` because trying to subclass - UIApplication is not possible, since it enforces that only one instance can ever exist -*/ -@property (nonatomic, strong) id application; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.h deleted file mode 100755 index e06d103e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.h +++ /dev/null @@ -1,21 +0,0 @@ -#import - -#define BTDropInLocalizedString(KEY) [BTDropInLocalizedString KEY] - -@interface BTDropInLocalizedString : NSObject - -+ (NSString *)DROP_IN_CHANGE_PAYMENT_METHOD_BUTTON_TEXT; -+ (NSString *)ERROR_ALERT_OK_BUTTON_TEXT; -+ (NSString *)ERROR_ALERT_CANCEL_BUTTON_TEXT; -+ (NSString *)ERROR_ALERT_TRY_AGAIN_BUTTON_TEXT; -+ (NSString *)ERROR_ALERT_CONNECTION_ERROR; -+ (NSString *)DEFAULT_CALL_TO_ACTION; -+ (NSString *)CARD_FORM_SECTION_HEADER; -+ (NSString *)SELECT_PAYMENT_METHOD_TITLE; -+ (NSString *)ERROR_SAVING_CARD_ALERT_TITLE; -+ (NSString *)ERROR_SAVING_CARD_MESSAGE; -+ (NSString *)ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE; -+ (NSString *)ERROR_SAVING_PAYPAL_ACCOUNT_ALERT_MESSAGE; -+ (NSString *)ADD_PAYMENT_METHOD_VIEW_CONTROLLER_TITLE; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.m deleted file mode 100755 index 83b16466..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/BTDropInLocalizedString.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "BTDropInLocalizedString.h" - -@implementation BTDropInLocalizedString - -+ (NSBundle *)localizationBundle { - - static NSString * bundleName = @"Braintree-Drop-In-Localization"; - NSString *localizationBundlePath = [[NSBundle mainBundle] pathForResource:bundleName ofType:@"bundle"]; - if (!localizationBundlePath) { - localizationBundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:bundleName ofType:@"bundle"]; - } - - return localizationBundlePath ? [NSBundle bundleWithPath:localizationBundlePath] : [NSBundle mainBundle]; -} - -+ (NSString *)localizationTable { - return @"Drop-In"; -} - -+ (NSString *)DROP_IN_CHANGE_PAYMENT_METHOD_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"DROP_IN_CHANGE_PAYMENT_METHOD_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"Change payment method", @"Title text for button on Drop In with a selected payment method that allows user to choose a different payment method on file"); -} - -+ (NSString *)ERROR_ALERT_OK_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_OK_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"OK", @"Button text to indicate acceptance of an alert condition"); -} - - -+ (NSString *)ERROR_ALERT_CANCEL_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_CANCEL_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"Cancel", @"Button text to indicate acceptance of an alert condition"); -} - -+ (NSString *)ERROR_ALERT_TRY_AGAIN_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_TRY_AGAIN_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"Try Again", @"Button text to request that an failed operation should be restarted and to try again"); -} - -+ (NSString *)ERROR_ALERT_CONNECTION_ERROR { - return NSLocalizedStringWithDefaultValue(@"ERROR_ALERT_CONNECTION_ERROR", [self localizationTable], [self localizationBundle], @"Connection Error", @"Vague title for alert view that ambiguously indicates an unspecified failure"); -} - -+ (NSString *)DEFAULT_CALL_TO_ACTION { - return NSLocalizedStringWithDefaultValue(@"DEFAULT_CALL_TO_ACTION", [self localizationTable], [self localizationBundle], @"Pay", @"Default text to display in Drop In view controller call to action (Submit button)"); -} - -+ (NSString *)CARD_FORM_SECTION_HEADER { - return NSLocalizedStringWithDefaultValue(@"CARD_FORM_SECTION_HEADER", [self localizationTable], [self localizationBundle], @"Pay with a card", @"Section header above card form in Drop In view controller"); -} - -+ (NSString *)SELECT_PAYMENT_METHOD_TITLE { - return NSLocalizedStringWithDefaultValue(@"SELECT_PAYMENT_METHOD_TITLE", [self localizationTable], [self localizationBundle], @"Payment Method", @"Title for select payment method view controller"); -} - -+ (NSString *)ERROR_SAVING_CARD_ALERT_TITLE{ - return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_CARD_ALERT_TITLE", [self localizationTable], [self localizationBundle], @"Error Saving Card", @"Title for alert view that is displayed when Drop In submission fails because there was an error saving the card"); -} - -+ (NSString *)ERROR_SAVING_CARD_MESSAGE { - return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_CARD_MESSAGE", [self localizationTable], [self localizationBundle], @"Please try again.", @"Message for alert view that is displayed when Drop In submission fails because there was an error saving the card"); -} - -+ (NSString *)ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE { - return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_PAYMENT_METHOD_ALERT_TITLE", [self localizationTable], [self localizationBundle], @"PayPal Error", @"Title for alert view that is displayed when Drop In submission fails because there was an error saving the PayPal account"); -} - - -+ (NSString *)ERROR_SAVING_PAYPAL_ACCOUNT_ALERT_MESSAGE { - return NSLocalizedStringWithDefaultValue(@"ERROR_SAVING_PAYPAL_ACCOUNT_ALERT_MESSAGE", [self localizationTable], [self localizationBundle], @"Please try again.", @"Message for alert view that is displayed when Drop In submission fails because there was an error saving the PayPal account"); -} - -+ (NSString *)ADD_PAYMENT_METHOD_VIEW_CONTROLLER_TITLE { - return NSLocalizedStringWithDefaultValue(@"ADD_PAYMENT_METHOD_VIEW_CONTROLLER_TITLE", [self localizationTable], [self localizationBundle], @"Add Payment Method", @"Title for view controller presented by Drop In to collect a new payment method when payment methods are already on file"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/da.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/da.lproj/Drop-In.strings deleted file mode 100755 index 4c29707a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/da.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/de.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/de.lproj/Drop-In.strings deleted file mode 100755 index fb374e01..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/de.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en.lproj/Drop-In.strings deleted file mode 100755 index 9f87bef6..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_AU.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_AU.lproj/Drop-In.strings deleted file mode 100755 index 6831369b..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_AU.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_CA.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_CA.lproj/Drop-In.strings deleted file mode 100755 index 9f87bef6..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_CA.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_GB.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_GB.lproj/Drop-In.strings deleted file mode 100755 index 66af1cac..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/en_GB.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es.lproj/Drop-In.strings deleted file mode 100755 index d22ffecf..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es_ES.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es_ES.lproj/Drop-In.strings deleted file mode 100755 index ef392421..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/es_ES.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr.lproj/Drop-In.strings deleted file mode 100755 index 35a60783..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_CA.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_CA.lproj/Drop-In.strings deleted file mode 100755 index 940077d0..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_CA.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_FR.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_FR.lproj/Drop-In.strings deleted file mode 100755 index f829499f..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/fr_FR.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/he.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/he.lproj/Drop-In.strings deleted file mode 100755 index da09d22e..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/he.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/it.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/it.lproj/Drop-In.strings deleted file mode 100755 index a95735c2..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/it.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nb.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nb.lproj/Drop-In.strings deleted file mode 100755 index 59665fb4..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nb.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nl.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nl.lproj/Drop-In.strings deleted file mode 100755 index cbfe53fa..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/nl.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pl.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pl.lproj/Drop-In.strings deleted file mode 100755 index 5c1c930c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pl.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pt.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pt.lproj/Drop-In.strings deleted file mode 100755 index b0d7302b..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/pt.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/ru.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/ru.lproj/Drop-In.strings deleted file mode 100755 index cfaf5d03..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/ru.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/sv.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/sv.lproj/Drop-In.strings deleted file mode 100755 index 0a6c7d7a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/sv.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/tr.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/tr.lproj/Drop-In.strings deleted file mode 100755 index 0a70112f..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/tr.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/zh-Hans.lproj/Drop-In.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/zh-Hans.lproj/Drop-In.strings deleted file mode 100755 index 0527d283..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Drop-In/Localization/zh-Hans.lproj/Drop-In.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardAmEx.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardAmEx.svg deleted file mode 100755 index e3481418..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardAmEx.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - BTUICardAmEx - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVBack.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVBack.svg deleted file mode 100755 index e22734cd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVBack.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - BTUICardCVVBack - Created with Sketch. - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVFront.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVFront.svg deleted file mode 100755 index 96c71673..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardCVVFront.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - BTUICardCVVFront - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDinersClub.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDinersClub.svg deleted file mode 100755 index 0ee234b8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDinersClub.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - BTUICardDinersClub - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDiscover.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDiscover.svg deleted file mode 100755 index 674870ff..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardDiscover.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - BTUICardDiscover - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardJCB.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardJCB.svg deleted file mode 100755 index 09be5be8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardJCB.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMaestro.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMaestro.svg deleted file mode 100755 index d4aab6cf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMaestro.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - BTUICardMaestro - Created with Sketch. - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMasterCard.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMasterCard.svg deleted file mode 100755 index 13338691..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardMasterCard.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - BTUICardMasterCard - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardUnknown.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardUnknown.svg deleted file mode 100755 index 6ef7acf3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardUnknown.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - BTUICardUnknown - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardVisa.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardVisa.svg deleted file mode 100755 index 9ac09a0e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUICardVisa.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - BTUICardVisa - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUIPayPalMonogramFullWordmark.svg b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUIPayPalMonogramFullWordmark.svg deleted file mode 100755 index d6f3a490..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Icons/BTUIPayPalMonogramFullWordmark.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - paypal_monogram-wordmark-3d copy - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - Check ou - t - - - - - \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.h deleted file mode 100755 index b80ffba0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.h +++ /dev/null @@ -1,33 +0,0 @@ -#import - -#define BTUILocalizedString(KEY) [BTUILocalizedString KEY] - -@interface BTUILocalizedString : NSObject - -+ (NSString *)CARD_NUMBER_PLACEHOLDER; -+ (NSString *)CVV_FIELD_PLACEHOLDER; -+ (NSString *)EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR; -+ (NSString *)EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR; -+ (NSString *)PAYPAL_CARD_BRAND; -+ (NSString *)POSTAL_CODE_PLACEHOLDER; -+ (NSString *)TOP_LEVEL_ERROR_ALERT_VIEW_OK_BUTTON_TEXT; -+ (NSString *)PHONE_NUMBER_PLACEHOLDER; - -#pragma mark Card Brands - -+ (NSString *)CARD_TYPE_AMERICAN_EXPRESS; -+ (NSString *)CARD_TYPE_DISCOVER; -+ (NSString *)CARD_TYPE_DINERS_CLUB; -+ (NSString *)CARD_TYPE_MASTER_CARD; -+ (NSString *)CARD_TYPE_VISA; -+ (NSString *)CARD_TYPE_JCB; -+ (NSString *)CARD_TYPE_MAESTRO; -+ (NSString *)CARD_TYPE_UNION_PAY; -+ (NSString *)CARD_TYPE_SWITCH; -+ (NSString *)CARD_TYPE_SOLO; -+ (NSString *)CARD_TYPE_LASER; -+ (NSString *)PAYMENT_METHOD_TYPE_PAYPAL; -+ (NSString *)PAYMENT_METHOD_TYPE_COINBASE; -+ (NSString *)PAYMENT_METHOD_TYPE_VENMO; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.m deleted file mode 100755 index 247ba9b3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/BTUILocalizedString.m +++ /dev/null @@ -1,108 +0,0 @@ -#import "BTUILocalizedString.h" - -@implementation BTUILocalizedString - -+ (NSBundle *)localizationBundle { - - static NSString * bundleName = @"Braintree-UI-Localization"; - NSString *localizationBundlePath = [[NSBundle mainBundle] pathForResource:bundleName ofType:@"bundle"]; - if (!localizationBundlePath) { - localizationBundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:bundleName ofType:@"bundle"]; - } - - return localizationBundlePath ? [NSBundle bundleWithPath:localizationBundlePath] : [NSBundle mainBundle]; -} - -+ (NSString *)localizationTable { - return @"UI"; -} - -+ (NSString *)CVV_FIELD_PLACEHOLDER { - return NSLocalizedStringWithDefaultValue(@"CVV_FIELD_PLACEHOLDER", [self localizationTable], [self localizationBundle], @"CVV", @"CVV (credit card security code) field placeholder"); -} - -+ (NSString *)CARD_NUMBER_PLACEHOLDER { - return NSLocalizedStringWithDefaultValue(@"CARD_NUMBER_PLACEHOLDER", [self localizationTable], [self localizationBundle], @"Card Number", @"Credit card number field placeholder"); -} - -+ (NSString *)PHONE_NUMBER_PLACEHOLDER { - return NSLocalizedStringWithDefaultValue(@"PHONE_NUMBER_PLACEHOLDER", [self localizationTable], [self localizationBundle], @"Phone Number", @"Phone number field placeholder"); -} - -+ (NSString *)EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR { - return NSLocalizedStringWithDefaultValue(@"EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR", [self localizationTable], [self localizationBundle], @"MM/YYYY", @"Credit card expiration date field placeholder (MM/YYYY format)"); -} - -+ (NSString *)EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR { - return NSLocalizedStringWithDefaultValue(@"EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR", [self localizationTable], [self localizationBundle], @"MM/YY", @"Credit card expiration date field placeholder (MM/YY format)"); -} - -+ (NSString *)PAYPAL_CARD_BRAND { - return NSLocalizedStringWithDefaultValue(@"PAYPAL_CARD_BRAND", [self localizationTable], [self localizationBundle], @"PayPal", @"PayPal payment method name"); -} - -+ (NSString *)POSTAL_CODE_PLACEHOLDER { - return NSLocalizedStringWithDefaultValue(@"POSTAL_CODE_PLACEHOLDER", [self localizationTable], [self localizationBundle], @"Postal Code", @"Credit card billing postal code field placeholder"); -} - -+ (NSString *)TOP_LEVEL_ERROR_ALERT_VIEW_OK_BUTTON_TEXT { - return NSLocalizedStringWithDefaultValue(@"TOP_LEVEL_ERROR_ALERT_VIEW_OK_BUTTON_TEXT", [self localizationTable], [self localizationBundle], @"OK", @"OK Button on card form alert view for top level errors"); -} - -+ (NSString *)CARD_TYPE_AMERICAN_EXPRESS { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_AMERICAN_EXPRESS", [self localizationTable], [self localizationBundle], @"American Express", @"American Express card brand"); -} - -+ (NSString *)CARD_TYPE_DINERS_CLUB { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_DINERS_CLUB", [self localizationTable], [self localizationBundle], @"Diners Club", @"Diners Club card brand"); -} - -+ (NSString *)CARD_TYPE_DISCOVER { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_DISCOVER", [self localizationTable], [self localizationBundle], @"Discover", @"Discover card brand"); -} - -+ (NSString *)CARD_TYPE_MASTER_CARD { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_MASTER_CARD", [self localizationTable], [self localizationBundle], @"MasterCard", @"MasterCard card brand"); -} - -+ (NSString *)CARD_TYPE_VISA { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_VISA", [self localizationTable], [self localizationBundle], @"Visa", @"Visa card brand"); -} - -+ (NSString *)CARD_TYPE_JCB { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_JCB", [self localizationTable], [self localizationBundle], @"JCB", @"JCB card brand"); -} - -+ (NSString *)CARD_TYPE_MAESTRO { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_MAESTRO", [self localizationTable], [self localizationBundle], @"Maestro", @"Maestro card brand"); -} - -+ (NSString *)CARD_TYPE_UNION_PAY { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_UNION_PAY", [self localizationTable], [self localizationBundle], @"UnionPay", @"UnionPay card brand"); -} - -+ (NSString *)CARD_TYPE_LASER { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_LASER", [self localizationTable], [self localizationBundle], @"Laser", @"Laser card brand"); -} - -+ (NSString *)CARD_TYPE_SOLO { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_SOLO", [self localizationTable], [self localizationBundle], @"Solo", @"Solo card brand"); -} - -+ (NSString *)CARD_TYPE_SWITCH { - return NSLocalizedStringWithDefaultValue(@"CARD_TYPE_SWITCH", [self localizationTable], [self localizationBundle], @"Switch", @"Switch card brand"); -} - -+ (NSString *)PAYMENT_METHOD_TYPE_PAYPAL { - return NSLocalizedStringWithDefaultValue(@"PAYPAL", [self localizationTable], [self localizationBundle], @"PayPal", @"PayPal (as a standalone term, referring to the payment method type, analogous to Visa or Discover)"); -} - -+ (NSString *)PAYMENT_METHOD_TYPE_COINBASE { - return NSLocalizedStringWithDefaultValue(@"COINBASE", [self localizationTable], [self localizationBundle], @"Coinbase", @"Coinbase (as a standalone term, referring to the bitcoin wallet company)"); -} - -+ (NSString *)PAYMENT_METHOD_TYPE_VENMO { - return NSLocalizedStringWithDefaultValue(@"VENMO", [self localizationTable], [self localizationBundle], @"Venmo", @"Venmo (as a standalone term, referring to Venmo the company)"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/da.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/da.lproj/UI.strings deleted file mode 100755 index 18bb418e..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/da.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/de.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/de.lproj/UI.strings deleted file mode 100755 index d0b59e01..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/de.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en.lproj/UI.strings deleted file mode 100755 index 647df60e..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_AU.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_AU.lproj/UI.strings deleted file mode 100755 index 889ba709..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_AU.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_CA.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_CA.lproj/UI.strings deleted file mode 100755 index ef2558ab..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_CA.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_GB.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_GB.lproj/UI.strings deleted file mode 100755 index e70ece8f..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/en_GB.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es.lproj/UI.strings deleted file mode 100755 index 270e1a71..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es_ES.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es_ES.lproj/UI.strings deleted file mode 100755 index 338fcf76..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/es_ES.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr.lproj/UI.strings deleted file mode 100755 index c45a8a03..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_CA.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_CA.lproj/UI.strings deleted file mode 100755 index 7927651c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_CA.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_FR.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_FR.lproj/UI.strings deleted file mode 100755 index df933d9a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/fr_FR.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/he.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/he.lproj/UI.strings deleted file mode 100755 index dad0e4f6..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/he.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/it.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/it.lproj/UI.strings deleted file mode 100755 index 9ee4a223..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/it.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nb.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nb.lproj/UI.strings deleted file mode 100755 index 449ddb51..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nb.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nl.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nl.lproj/UI.strings deleted file mode 100755 index 12ff3731..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/nl.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pl.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pl.lproj/UI.strings deleted file mode 100755 index 36683db7..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pl.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pt.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pt.lproj/UI.strings deleted file mode 100755 index 2baa2a56..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/pt.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/ru.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/ru.lproj/UI.strings deleted file mode 100755 index f90bf3f7..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/ru.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/sv.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/sv.lproj/UI.strings deleted file mode 100755 index 449ddb51..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/sv.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/tr.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/tr.lproj/UI.strings deleted file mode 100755 index bf4f4000..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/tr.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/zh-Hans.lproj/UI.strings b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/zh-Hans.lproj/UI.strings deleted file mode 100755 index 6de374be..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Localization/zh-Hans.lproj/UI.strings and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTPaymentRequest.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTPaymentRequest.m deleted file mode 100755 index be6ec3fe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTPaymentRequest.m +++ /dev/null @@ -1,32 +0,0 @@ -#import "BTPaymentRequest.h" -#import "BTDropInLocalizedString.h" - -@implementation BTPaymentRequest - -- (instancetype)init -{ - if (self = [super init]) { - _displayAmount = @""; // Use empty string as default value for this non-nullable property. - _callToActionText = BTDropInLocalizedString(DEFAULT_CALL_TO_ACTION); // Default value for this non-nullable property. - _showDefaultPaymentMethodNonceFirst = NO; - } - return self; -} - -- (id)copyWithZone:(__unused NSZone *)zone { - BTPaymentRequest *request = [BTPaymentRequest new]; - request.summaryTitle = self.summaryTitle; - request.summaryDescription = self.summaryDescription; - request.displayAmount = self.displayAmount; - request.callToActionText = self.callToActionText; - request.shouldHideCallToAction = self.shouldHideCallToAction; - request.amount = self.amount; - request.currencyCode = self.currencyCode; - request.noShipping = self.noShipping; - request.presentViewControllersFromTop = self.presentViewControllersFromTop; - request.shippingAddress = self.shippingAddress; - request.showDefaultPaymentMethodNonceFirst = self.showDefaultPaymentMethodNonceFirst; - return request; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.h deleted file mode 100755 index 9268fd3a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -#define kBTUICardExpirationValidatorFarFutureYears 20 - -@interface BTUICardExpirationValidator : NSObject - -+ (BOOL)month:(NSUInteger)month year:(NSUInteger)year validForDate:(NSDate *)date; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.m deleted file mode 100755 index f4243257..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpirationValidator.m +++ /dev/null @@ -1,43 +0,0 @@ -#import "BTUICardExpirationValidator.h" - -#ifdef __IPHONE_8_0 -#define kBTNSGregorianCalendarIdentifier NSCalendarIdentifierGregorian -#else -#define kBTNSGregorianCalendarIdentifier NSGregorianCalendar -#endif - -@implementation BTUICardExpirationValidator - -+ (BOOL)month:(NSUInteger)month year:(NSUInteger)year validForDate:(NSDate *)date { - // Creating NSCalendar is expensive, so cache it! - static NSCalendar *gregorianCalendar; - if (!gregorianCalendar) { - gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:kBTNSGregorianCalendarIdentifier]; - } - - NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; - dateComponents.calendar = gregorianCalendar; - dateComponents.year = ((year % 2000) + 2000) ; - dateComponents.month = month; - NSInteger newMonth = (dateComponents.month + 1); - if (newMonth > 12) { - dateComponents.month = newMonth % 12; - dateComponents.year += 1; - } else { - dateComponents.month = newMonth; - } - BOOL expired = [date compare:dateComponents.date] != NSOrderedAscending; - if (expired) { - return NO; - } - - NSDate *farFuture = [date dateByAddingTimeInterval:3600 * 24 * 365.25 * kBTUICardExpirationValidatorFarFutureYears]; // roughly years in the future - BOOL tooFarInTheFuture = [farFuture compare:dateComponents.date] != NSOrderedDescending; - - return !tooFarInTheFuture; -} - - - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.h deleted file mode 100755 index 7d8c6464..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface BTUICardExpiryFormat : NSObject -@property (nonatomic, copy) NSString *value; -@property (nonatomic, assign) NSUInteger cursorLocation; -@property (nonatomic, assign) BOOL backspace; - -- (void)formattedValue:(NSString * __autoreleasing *)value cursorLocation:(NSUInteger *)cursorLocation; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.m deleted file mode 100755 index 36efc562..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardExpiryFormat.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "BTUICardExpiryFormat.h" -#import "BTUIUtil.h" - -@implementation BTUICardExpiryFormat - -- (void)formattedValue:(NSString *__autoreleasing *)value cursorLocation:(NSUInteger *)cursorLocation { - if (value == NULL || cursorLocation == NULL) { - return; - } - - NSMutableString *s = [NSMutableString stringWithString:self.value]; - *cursorLocation = self.cursorLocation; - - if (s.length == 0) { - *value = s; - return; - } - - if (*cursorLocation == 1 && s.length == 1 && [s characterAtIndex:0] > '1' && [s characterAtIndex:0] <= '9') { - [s insertString:@"0" atIndex:0]; - *cursorLocation += 1; - } - - if (self.backspace) { - if (*cursorLocation == 2 && s.length == 2) { - [s deleteCharactersInRange:NSMakeRange(1, 1)]; - *cursorLocation -= 1; - } - } else { - - NSUInteger slashLocation = [s rangeOfString:@"/"].location; - if (slashLocation != NSNotFound) { - if (slashLocation > 2) { - s = [NSMutableString stringWithString:[BTUIUtil stripNonDigits:s]]; - [s insertString:@"/" atIndex:2]; - *cursorLocation += 1; - } - } else { - if (s.length >= 2) { - [s insertString:@"/" atIndex:2]; - if (*cursorLocation >= 2) { - *cursorLocation += 1; - } - } - } - } - - *value = s; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.h deleted file mode 100755 index 753c4369..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.h +++ /dev/null @@ -1,64 +0,0 @@ -#import - -#import "BTUILocalizedString.h" - -/*! - @class BTUICardType - @brief Immutable card type - */ -@interface BTUICardType : NSObject - -/*! - @brief Obtain the `BTCardType` for the given brand, or nil if none is found - */ -+ (instancetype)cardTypeForBrand:(NSString *)brand; - -/*! - @brief Obtain the `BTCardType` for the given number, or nil if none is found - */ -+ (instancetype)cardTypeForNumber:(NSString *)number; - -/*! - @brief Return all possible card types for a number - */ -+ (NSArray *)possibleCardTypesForNumber:(NSString *)number; - -/*! - @brief Check if a number is valid - */ -- (BOOL)validNumber:(NSString *)number; - -/*! - @brief Check if a number is complete - */ -- (BOOL)completeNumber:(NSString *)number; - -/*! - @brief Check is a number is valid and necessarily complete - @note (i.e. it can't get any longer) - */ -- (BOOL)validAndNecessarilyCompleteNumber:(NSString *)number; - -/*! - @brief Check if the CVV is valid for a `BTCardType` - */ -- (BOOL)validCvv:(NSString *)cvv; - -/*! - @brief Format a number based on type - @note Does NOT validate - */ -- (NSAttributedString *)formatNumber:(NSString *)input; -- (NSAttributedString *)formatNumber:(NSString *)input kerning:(CGFloat)kerning; - -+ (NSUInteger)maxNumberLength; - -@property (nonatomic, copy, readonly) NSString *brand; -@property (nonatomic, strong, readonly) NSArray *validNumberPrefixes; -@property (nonatomic, strong, readonly) NSIndexSet *validNumberLengths; -@property (nonatomic, assign, readonly) NSUInteger validCvvLength; - -@property (nonatomic, strong, readonly) NSArray *formatSpaces; -@property (nonatomic, assign, readonly) NSUInteger maxNumberLength; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.m deleted file mode 100755 index 2a2e8e93..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUICardType.m +++ /dev/null @@ -1,227 +0,0 @@ -#import - -#import "BTUICardType.h" -#import "BTUIUtil.h" - -#define kDefaultFormatSpaceIndices @[@4, @8, @12, @16] -#define kDefaultCvvLength 3 -#define kDefaultValidNumberLengths [NSIndexSet indexSetWithIndex:16] -#define kInvalidCvvCharacterSet [[NSCharacterSet characterSetWithCharactersInString:@"0123456789"] invertedSet] - - -@implementation BTUICardType - -#pragma mark - Private initializers - -- (instancetype)initWithBrand:(NSString *)brand - prefixes:(NSArray *)prefixes -{ - return [self initWithBrand:brand - prefixes:prefixes - validNumberLengths:kDefaultValidNumberLengths - validCvvLength:kDefaultCvvLength - formatSpaces:kDefaultFormatSpaceIndices]; -} - -- (instancetype)initWithBrand:(NSString *)brand - prefixes:(NSArray *)prefixes - validNumberLengths:(NSIndexSet *)validLengths - validCvvLength:(NSUInteger)cvvLength - formatSpaces:(NSArray *)formatSpaces -{ - self = [super init]; - if (self != nil) { - _brand = brand; - NSError *error; - - _validNumberPrefixes = prefixes; - if (error != nil) { - NSLog(@"Braintree-Payments-UI: %@", error); - } - _validNumberLengths = validLengths; - _validCvvLength = cvvLength; - - NSArray *sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"self" ascending:YES]]; - _formatSpaces = [formatSpaces sortedArrayUsingDescriptors:sortDescriptors] ?: kDefaultFormatSpaceIndices; - _maxNumberLength = [validLengths lastIndex]; - } - return self; -} - -#pragma mark - Finders - -+ (instancetype)cardTypeForBrand:(NSString *)rename { - return [[self class] cardsByBrand][rename]; -} - -+ (instancetype)cardTypeForNumber:(NSString *)number { - if (number.length == 0) { - return nil; - } - for (BTUICardType *cardType in [[self class] allCards]) { - for (NSString *prefix in cardType.validNumberPrefixes) { - if (number.length >= prefix.length) { - NSUInteger compareLength = MIN(prefix.length, number.length); - NSString *sizedNumber = [number substringToIndex:compareLength]; - if ([sizedNumber isEqualToString:prefix]) { - return cardType; - } - } - } - } - return nil; -} - -// Since each card type has a list of acceptable card prefixes, we -// can determine which card types may match a given number -+ (NSArray *)possibleCardTypesForNumber:(NSString *)number { - number = [BTUIUtil stripNonDigits:number]; - if (number.length == 0) { - return [[self class] allCards]; - } - NSMutableSet *possibleCardTypes = [NSMutableSet set]; - for (BTUICardType *cardType in [[self class] allCards]) { - for (NSString *prefix in cardType.validNumberPrefixes) { - NSUInteger compareLength = MIN(prefix.length, number.length); - - NSString *sizedPrefix = [prefix substringToIndex:compareLength]; - NSString *sizedNumber = [number substringToIndex:compareLength]; - if ([sizedNumber isEqualToString:sizedPrefix]) { - [possibleCardTypes addObject:cardType]; - break; - } - } - } - return [possibleCardTypes allObjects]; -} - -#pragma mark - Instance methods - -- (BOOL)validCvv:(NSString *)cvv { - if (cvv.length != self.validCvvLength) { - return NO; - } - return ([cvv rangeOfCharacterFromSet:kInvalidCvvCharacterSet].location == NSNotFound); -} - -- (NSString *)description { - return [NSString stringWithFormat:@"BTUICardType %@", self.brand]; -} - -#pragma mark - Immutable singletons - -+ (NSUInteger)maxNumberLength { - static dispatch_once_t p = 0; - static NSUInteger _maxNumberLength = 0; - dispatch_once(&p, ^{ - for (BTUICardType *t in [self allCards]) { - _maxNumberLength = MAX(_maxNumberLength, t.maxNumberLength); - } - }); - return _maxNumberLength; -} - -+ (NSArray *)allCards -{ - static dispatch_once_t p = 0; - static NSArray *_allCards = nil; - - dispatch_once(&p, ^{ - - BTUICardType *visa = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_VISA) prefixes:@[@"4"]]; - BTUICardType *mastercard = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_MASTER_CARD) - prefixes:@[@"51", @"52", @"53", @"54", @"55"]]; - BTUICardType *discover = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_DISCOVER) prefixes:@[@"6011", @"65", @"644", @"645", @"646", @"647", @"648", @"649"]]; - BTUICardType *jcb = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_JCB) prefixes:@[@"35"]]; - - BTUICardType *amex = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS) - prefixes:@[@"34", @"37"] - validNumberLengths:[NSIndexSet indexSetWithIndex:15] - validCvvLength:4 - formatSpaces:@[@4, @10]]; - - BTUICardType *dinersClub = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_DINERS_CLUB) - prefixes:@[@"36", @"38", @"300", @"301", @"302", @"303", @"304", @"305"] - validNumberLengths:[NSIndexSet indexSetWithIndex:14] - validCvvLength:3 - formatSpaces:nil]; - - BTUICardType *maestro = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_MAESTRO) - prefixes:@[@"5018", @"5020", @"5038", @"6304", @"6307", @"6759", @"6761", @"6762", @"6763"] - validNumberLengths:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(12, 8)] - validCvvLength:3 - formatSpaces:nil]; - - BTUICardType *unionPay = [[BTUICardType alloc] initWithBrand:BTUILocalizedString(CARD_TYPE_UNION_PAY) - prefixes:@[@"62"] - validNumberLengths:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(16, 4)] - validCvvLength:3 - formatSpaces:nil]; - - _allCards = @[visa, mastercard, discover, amex, dinersClub, jcb, mastercard, maestro, unionPay]; - }); - - // returns the same object each time - return _allCards; -} - -+ (NSDictionary *)cardsByBrand { - - static dispatch_once_t p = 0; - static NSDictionary *_cardsByBrand = nil; - - dispatch_once(&p, ^{ - NSMutableDictionary *d = [NSMutableDictionary dictionary]; - for (BTUICardType *cardType in [self allCards]) { - d[cardType.brand] = cardType; - } - _cardsByBrand = d; - }); - return _cardsByBrand; -} - -#pragma mark - Formatting - -- (NSAttributedString *)formatNumber:(NSString *)input kerning:(CGFloat)kerning{ - - input = [BTUIUtil stripNonDigits:input]; - - NSMutableAttributedString *result = [[NSMutableAttributedString alloc] initWithString:input]; - - if (input.length > self.maxNumberLength) { - return result; - } - - for (NSNumber *indexNumber in self.formatSpaces) { - NSUInteger index = [indexNumber unsignedIntegerValue]; - if (index >= result.length) { - break; - } - [result setAttributes:@{NSKernAttributeName: @(kerning)} range:NSMakeRange(index-1, 1)]; - } - return result; -} - -- (NSAttributedString *)formatNumber:(NSString *)input { - return [self formatNumber:input kerning:8.0f]; -} - -#pragma mark - Validation - -- (BOOL)validAndNecessarilyCompleteNumber:(NSString *)number { - return (number.length == self.validNumberLengths.lastIndex && - ([BTUIUtil luhnValid:number] || [self.brand isEqualToString:BTUILocalizedString(CARD_TYPE_UNION_PAY)])); -} - -- (BOOL)validNumber:(NSString *)number { - return ([self completeNumber:number] && - ([BTUIUtil luhnValid:number] || [self.brand isEqualToString:BTUILocalizedString(CARD_TYPE_UNION_PAY)])); -} - -- (BOOL)completeNumber:(NSString *)number { - return [self.validNumberLengths containsIndex:number.length]; -} - - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.h deleted file mode 100755 index ed9b9c23..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@interface BTUIUtil : NSObject - -+ (BOOL)luhnValid:(NSString *)cardNumber; - -/*! - @brief Strips non-digit characters from a string. - - @param input The string to strip. - - @return The string stripped of non-digit characters, or `nil` if `input` is `nil` -*/ -+ (NSString *)stripNonDigits:(NSString *)input; - -+ (NSString *)stripNonExpiry:(NSString *)input; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.m deleted file mode 100755 index 7fe51c72..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Models/BTUIUtil.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "BTUIUtil.h" - -@implementation BTUIUtil - -#pragma mark - Class Method Utils - -+ (BOOL)luhnValid:(NSString *)cardNumber { - // http://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#Objective-C - const char *digitChars = [cardNumber UTF8String]; - BOOL isOdd = YES; - NSInteger oddSum = 0; - NSInteger evenSum = 0; - for (NSInteger i = [cardNumber length] - 1; i >= 0; i--) { - NSInteger digit = digitChars[i] - '0'; - if (isOdd) { - oddSum += digit; - } else { - evenSum += digit/5 + (2*digit) % 10; - } - isOdd = !isOdd; - } - - return ((oddSum + evenSum) % 10 == 0); -} - -+ (NSString *)stripNonDigits:(NSString *)input { - return [self stripPattern:@"[^0-9]" input:input]; -} - -+ (NSString *)stripNonExpiry:(NSString *)input { - return [self stripPattern:@"[^0-9/]" input:input]; -} - -+ (NSString *)stripPattern:(NSString *)pattern input:(NSString *)input { - if (!input) return nil; - - NSError *error; - NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:pattern - options:0 - error:&error]; - - return [re stringByReplacingMatchesInString:input - options:0 - range:NSMakeRange(0, input.length) - withTemplate:@""]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTDropInViewController.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTDropInViewController.h deleted file mode 100755 index 8d416de4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTDropInViewController.h +++ /dev/null @@ -1,146 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@class BTAPIClient, BTUI, BTPaymentRequest, BTPaymentMethodNonce; -@protocol BTDropInViewControllerDelegate; - -/*! - @class BTDropInViewController - @brief A view controller that provides a quick and easy payment experience. - - @discussion When initialized with a Braintree client, the Drop In will prompt a user for payment details, - based on your Gateway configuration. The Drop In payment form supports cards and PayPal. When - using Drop In, you don't need to worry about which methods are already on file with Braintree; - newly created methods are saved as part of the Drop In flow as needed. - - Upon successful form submission, you will receive a payment method nonce, which you can - transact with on your server. Client and validation errors are handled internally by Drop In; - other types of Errors are rare and generally irrecoverable. - - The Drop In view controller delegates presentation and dismissal to the developer. It has been - most thoroughly tested in the context of a UINavigationController. - - The Drop In can send success and cancelation messages to the developer via the - delegate. See `delegate` and `BTDropInViewControllerDelegate`. - - You can customize Drop In in various ways, for example, you can change the primary Call To - Action button text. For visual customzation options see `theme` and `BTUI`. Like any - UIViewController, you can setup properties like `title` or `navigationBar.rightBarButtonItem`. -*/ -@interface BTDropInViewController : UIViewController - -/*! - @brief Initialize a new Drop-in view controller. - - @param apiClient A BTAPIClient used for communicating with Braintree servers. Required. - - @return A new Drop-in view controller that is ready to be presented. -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient; - -/*! - @brief The API Client used for communication with Braintree servers. -*/ -@property (nonatomic, strong) BTAPIClient *apiClient; - -/*! - @brief The BTPaymentRequest that defines the Drop-in experience. - - @note The properties of this payment request are used to customize Drop-in. -*/ -@property (nonatomic, strong, nullable) BTPaymentRequest *paymentRequest; - -/*! - @brief The array of `BTPaymentMethodNonce` payment method nonces on file. - @discussion The payment method nonces may be in the Vault. - Most payment methods are automatically Vaulted if the client token was generated with a customer ID. -*/ -@property (nonatomic, strong) NSArray *paymentMethodNonces; - -#pragma mark State Change Notifications - -/*! - @brief The delegate that, if set, is notified of success or failure. -*/ -@property (nonatomic, weak, nullable) id delegate; - -#pragma mark Customization - -/*! - @brief The presentation theme to use for the Drop In. -*/ -@property (nonatomic, strong, nullable) BTUI *theme; - -/*! - @brief Fetches the customer's saved payment methods and populates Drop In with them. - - @discussion For the best user experience, you should call this method as early as - possible (after initializing BTDropInViewController, before presenting it) - in order to avoid a loading spinner. - - @param completionBlock A block that gets called on completion. -*/ -- (void)fetchPaymentMethodsOnCompletion:(void(^)())completionBlock; - -/*! - @brief Sets the card number in the card form. -*/ -- (void)setCardNumber:(nullable NSString *)cardNumber; - -/*! - @brief Sets the expiration month and year in the card form. - - @note The expiration date uses the Gregorian calendar. - - @param expirationMonth The expiration month as a one- or two-digit number. - @param expirationYear The expiration year as a four-digit number. -*/ -- (void)setCardExpirationMonth:(NSInteger)expirationMonth year:(NSInteger)expirationYear; - -@end - -/*! - @brief A protocol for BTDropInViewController completion notifications. -*/ -@protocol BTDropInViewControllerDelegate - -/*! - @brief Informs the delegate when the user has successfully provided payment info that has been successfully tokenized. - - @discussion Upon receiving this message, you should dismiss Drop In. - - @param viewController The Drop In view controller informing its delegate of success - @param paymentMethodNonce The selected (and possibly newly created) tokenized payment information. -*/ -- (void)dropInViewController:(BTDropInViewController *)viewController didSucceedWithTokenization:(BTPaymentMethodNonce *)paymentMethodNonce; - -/*! - @brief Informs the delegate when the user has decided to cancel out of the Drop-in payment form. - - @discussion Drop-in handles its own error cases, so this cancelation is user initiated and - irreversable. Upon receiving this message, you should dismiss Drop-in. - - @param viewController The Drop-in view controller informing its delegate of failure or cancelation. -*/ -- (void)dropInViewControllerDidCancel:(BTDropInViewController *)viewController; - -@optional - -/*! - @brief Informs the delegate when the Drop-in view controller has finished loading. - - @param viewController The Drop-in view controller informing its delegate -*/ -- (void)dropInViewControllerDidLoad:(BTDropInViewController *)viewController; - -/*! - @brief Informs the delegate when the user has entered or selected payment information. - - @param viewController The Drop-in view controller informing its delegate -*/ -- (void)dropInViewControllerWillComplete:(BTDropInViewController *)viewController; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentButton.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentButton.h deleted file mode 100755 index 29042818..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentButton.h +++ /dev/null @@ -1,84 +0,0 @@ -#import "BTPaymentRequest.h" -#import "BTUIThemedView.h" -#import - -@protocol BTAppSwitchDelegate, BTViewControllerPresentingDelegate; -@class BTAPIClient, BTPaymentMethodNonce; - -NS_ASSUME_NONNULL_BEGIN - -@interface BTPaymentButton : BTUIThemedView - -/*! - @brief Initialize a BTPaymentButton. - - @param apiClient A `BTAPIClient` used for communicating with Braintree servers. Required. - @param completion A completion block. Required. - - @return A new BTPaymentButton. -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient - completion:(void(^)(BTPaymentMethodNonce * _Nullable paymentMethodNonce, NSError * _Nullable error))completion; - -/*! - @brief The `BTAPIClient` used for communicating with Braintree servers. - - @discussion This property is exposed to enable the use of other UIView initializers, e.g. - when using Storyboards. -*/ -@property (nonatomic, strong, nullable) BTAPIClient *apiClient; - -/*! - @brief The `BTPaymentRequest` that customizes the payment experience. -*/ -@property (nonatomic, strong, nullable) BTPaymentRequest *paymentRequest; - -/*! - @brief The completion block to handle the result of a payment authorization flow. - - @discussion This property is exposed to enable the use of other `UIView` initializers, e.g. - when using Storyboards. -*/ -@property (nonatomic, copy) void(^completion)(BTPaymentMethodNonce * _Nullable paymentMethodNonce, NSError * _Nullable error); - -/*! - @brief Set of payment options as strings. - @discussion e.g. `@"PayPal"`, `@"Venmo"`. By default, this is configured - to the set of payment options that have been included in the client-side app integration, - e.g. via frameworks. - - Setting this property will force the button to reload and display the specified payment options, - even if the payment option is disabled in the Control Panel. -*/ -@property (nonatomic, strong) NSOrderedSet *enabledPaymentOptions; - -/*! - @brief The configuration from a `BTAPIClient`. - @discussion This is automatically fetched when the payment button - is initialized with a `BTAPIClient`, but it can be `nil` if the `BTAPIClient` has not yet been - set or if the configuration fetch fails. - - Setting this property will force the button to reload using the new configuration. -*/ -@property (nonatomic, strong, nullable) BTConfiguration *configuration; - -/*! - @brief Optional delegate for receiving payment lifecycle messages from a payment option that may initiate an app or browser switch to authorize payments. -*/ -@property (nonatomic, weak, nullable) id appSwitchDelegate; - -/*! - @brief Optional delegate for receiving payment lifecycle messages from a payment driverthat requires presentation of a view controller to authorize a payment. - - @note Required by PayPal. -*/ -@property (nonatomic, weak, nullable) id viewControllerPresentingDelegate; - -/*! - @brief Indicates whether any payment options available. -*/ -@property (nonatomic, readonly) BOOL hasAvailablePaymentMethod; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentRequest.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentRequest.h deleted file mode 100755 index 7234d537..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTPaymentRequest.h +++ /dev/null @@ -1,112 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BTPostalAddress.h" -#else -#import -#endif - -@class BTAPIClient; - -NS_ASSUME_NONNULL_BEGIN - -@interface BTPaymentRequest : NSObject - -/*! - @brief Primary text to display in the summary view. - - @discussion Intended to provide a name the overall transaction taking place. For example, "1 Item", "1 Year Subscription", "Yellow T-Shirt", etc. - - If summaryTitle or summaryDescription are nil, then the summary view is not shown. -*/ -@property (nonatomic, copy, nullable) NSString *summaryTitle; - -/*! - @brief Detail text to display in the summary view. - - @discussion Intended to provide a few words of detail. For example, "Ships in Five Days", "15 feet by 12 feet" or "We know you'll love it" - - If summaryTitle or summaryDescription are nil, then the summary view is not shown. -*/ -@property (nonatomic, copy, nullable) NSString *summaryDescription; - -/*! - @brief A string representation of the grand total amount - - @note For example, "$12.95" -*/ -@property (nonatomic, copy) NSString *displayAmount; - -/*! - @brief The text to display in the primary call-to-action button. For example: "$19 - Purchase" or "Subscribe Now". -*/ -@property (nonatomic, copy) NSString *callToActionText; - -/*! - @brief Whether to hide the call to action control in Drop-in's content view. - - @discussion When `YES`, the call to action control in Drop-in's content view will be hidden; - instead, a submit button will be added as a bar button item, which relies on the - Drop-in view controller being embedded in a navigation controller. - - Defaults to `NO`, so that the call to action control will be shown within Drop-in's - content view. - - @see callToAction - @see callToActionAmount -*/ -@property (nonatomic, assign) BOOL shouldHideCallToAction; - -/*! - @brief Optional: Amount of the transaction. - - @discussion Amount must be a non-negative number, may optionally contain exactly 2 decimal places - separated by '.', optional thousands separator ',', limited to 7 digits before the decimal point. - - @note Used by PayPal. -*/ -@property (nonatomic, copy, nullable) NSString *amount; - -/*! - @brief Optional: A valid ISO currency code to use for the transaction. Defaults to merchant currency code if not set. - - @note Used by PayPal. -*/ -@property (nonatomic, copy, nullable) NSString *currencyCode; - -/*! - @brief Defaults to false. When set to true, the shipping address selector will not be displayed. - - @note Used by PayPal. -*/ -@property (nonatomic, assign) BOOL noShipping; - -/*! - @brief When set to `YES`, this controls whether to present additional modal view controllers from the root view controller of the application's key window. Defaults to `NO`. - - @note Setting this to `YES` can fix issues with blank `SFSafariViewControllers`, which can occur when apps use multiple `UIWindow` instances. -*/ -@property (nonatomic, assign) BOOL presentViewControllersFromTop; - -/*! - @brief Show a customer's vaulted payment methods with the default payment method nonce first, followed by the remaining payment methods sorted by most recent usage. Defaults to `NO`. - - @note Must be using client token with a customer ID -*/ -@property (nonatomic, assign) BOOL showDefaultPaymentMethodNonceFirst; - -/*! - @brief Optional: A valid shipping address to be displayed in the transaction flow. - @discussion An error will occur if this address is not valid. - - @note Used by PayPal. -*/ -@property (nonatomic, strong, nullable) BTPostalAddress *shippingAddress; - -/*! - @brief Optional: A set of PayPal scopes to use when requesting payment via PayPal. Used by Drop-in and payment button. -*/ -@property (nonatomic, strong, nullable) NSSet *additionalPayPalScopes; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUI.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUI.h deleted file mode 100755 index 4201b7a5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUI.h +++ /dev/null @@ -1,110 +0,0 @@ -#import - -#import "BTUIPaymentOptionType.h" -#import "BTUIVectorArtView.h" - -/*! - @brief BTUI represents a visual theme and can be applied to any `BTUIThemedView`. -*/ -@interface BTUI : NSObject - -/*! - @brief Returns a default Braintree theme. - - @return the default Braintree theme. -*/ -+ (BTUI *)braintreeTheme; - -#pragma mark - Palette - -- (UIColor *)idealGray; - -#pragma mark - Colors - -/*! - @brief Tint color if none is set. Defaults to nil. -*/ -- (UIColor *)defaultTintColor; - -- (UIColor *)viewBackgroundColor; -- (UIColor *)callToActionColor; -- (UIColor *)callToActionColorHighlighted; -- (UIColor *)disabledButtonColor; - -- (UIColor *)titleColor; -- (UIColor *)detailColor; -- (UIColor *)borderColor; - -- (UIColor *)textFieldTextColor; -- (UIColor *)textFieldPlaceholderColor; - -- (UIColor *)sectionHeaderTextColor; -- (UIColor *)textFieldFloatLabelTextColor; - -- (UIColor *)cardHintBorderColor; - -- (UIColor *)errorBackgroundColor; -- (UIColor *)errorForegroundColor; - -#pragma mark Adjustments - -- (CGFloat) highlightedBrightnessAdjustment; - -#pragma mark PayPal Colors - -- (UIColor *)payBlue; -- (UIColor *)palBlue; -- (UIColor *)payPalButtonBlue; -- (UIColor *)payPalButtonActiveBlue; - -#pragma mark Venmo Color - -- (UIColor *)venmoPrimaryBlue; - -#pragma mark Coinbase Color - -- (UIColor *)coinbasePrimaryBlue; - -#pragma mark Typography - -- (UIFont *)controlFont; -- (UIFont *)controlTitleFont; -- (UIFont *)controlDetailFont; -- (UIFont *)textFieldFont; -- (UIFont *)textFieldFloatLabelFont; -- (UIFont *)sectionHeaderFont; - -#pragma mark Attributes - -- (NSDictionary *)textFieldTextAttributes; -- (NSDictionary *)textFieldPlaceholderAttributes; - -#pragma mark Visuals - -- (CGFloat)borderWidth; -- (CGFloat)cornerRadius; -- (CGFloat)formattedEntryKerning; -- (CGFloat)horizontalMargin; -- (CGFloat)paymentButtonMinHeight; -- (CGFloat)paymentButtonMaxHeight; -- (CGFloat)paymentButtonWordMarkHeight DEPRECATED_ATTRIBUTE; - -#pragma mark Transitions - -- (CGFloat)quickTransitionDuration; -- (CGFloat)transitionDuration; -- (CGFloat)minimumVisibilityTime; - - - -#pragma mark Icons - -- (BTUIVectorArtView *)vectorArtViewForPaymentInfoType:(NSString *)typeString; -- (BTUIVectorArtView *)vectorArtViewForPaymentOptionType:(BTUIPaymentOptionType)type; - -#pragma mark Utilities - -+ (BTUIPaymentOptionType)paymentOptionTypeForPaymentInfoType:(NSString *)typeString; -+ (UIActivityIndicatorViewStyle)activityIndicatorViewStyleForBarTintColor:(UIColor *)color; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICTAControl.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICTAControl.h deleted file mode 100755 index 7a9c1bc0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICTAControl.h +++ /dev/null @@ -1,31 +0,0 @@ -#import - -@class BTUI; - -NS_ASSUME_NONNULL_BEGIN - -/*! - @class BTUICTAControl - @discussion The Call To Action control is a button that is intended to be used as the submit button - on the bottom of a payment form. As a UIControl subclass, typical target-action event - listeners are available. -*/ -@interface BTUICTAControl : UIControl - -/*! - @brief The amount, including a currency symbol, to be displayed. -*/ -@property (nonatomic, copy, nullable) NSString *displayAmount; - -/*! - @brief The call to action verb, such as "Subscribe" or "Buy". -*/ -@property (nonatomic, copy) NSString *callToAction; - -- (void)showLoadingState:(BOOL)loadingState; - -@property (nonatomic, strong) BTUI *theme; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardFormView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardFormView.h deleted file mode 100755 index 823ae7d7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardFormView.h +++ /dev/null @@ -1,130 +0,0 @@ -#import "BTUIThemedView.h" - -typedef NS_OPTIONS(NSUInteger, BTUICardFormOptionalFields) { - BTUICardFormOptionalFieldsNone = 0, - BTUICardFormOptionalFieldsCvv = 1 << 0, - BTUICardFormOptionalFieldsPostalCode = 1 << 1, - BTUICardFormOptionalFieldsPhoneNumber= 1 << 2, - BTUICardFormOptionalFieldsAll = BTUICardFormOptionalFieldsCvv | BTUICardFormOptionalFieldsPostalCode | BTUICardFormOptionalFieldsPhoneNumber -}; - -typedef NS_ENUM(NSUInteger, BTUICardFormField) { - BTUICardFormFieldNumber = 0, - BTUICardFormFieldExpiration, - BTUICardFormFieldCvv, - BTUICardFormFieldPostalCode, - BTUICardFormFieldPhoneNumber, -}; - -@protocol BTUICardFormViewDelegate; - -@interface BTUICardFormView : BTUIThemedView - -@property (nonatomic, weak) IBOutlet id delegate; - -@property (nonatomic, assign, readonly) BOOL valid; - -/*! - @brief The card number. - - @discussion If you set a card number longer than is allowed by the card type, - it will not be set. -*/ -@property (nonatomic, copy) NSString *number; - -/*! - @brief The card CVV - - @note this field is only visible when specified in `optionalFields` -*/ -@property (nonatomic, copy) NSString *cvv; - -/*! - @brief The card billing address postal code for AVS verifications - - @note this field is only visible when specified in `optionalFields` -*/ -@property (nonatomic, copy) NSString *postalCode; - -/*! - @brief The card expiration month -*/ -@property (nonatomic, copy, readonly) NSString *expirationMonth; - -/*! - @brief The card expiration year -*/ -@property (nonatomic, copy, readonly) NSString *expirationYear; - -/*! - @brief A phone number -*/ -@property (nonatomic, copy, readonly) NSString *phoneNumber; - -/*! - @brief Sets the card form view's expiration date - - @param expirationDate The expiration date. Passing in `nil` will clear the - card form's expiry field. -*/ -- (void)setExpirationDate:(NSDate *)expirationDate; - -/*! - @brief Sets the card form view's expiration date - - @param expirationMonth The expiration month - @param expirationYear The expiration year. Two-digit years are assumed to be 20xx. -*/ -- (void)setExpirationMonth:(NSInteger)expirationMonth year:(NSInteger)expirationYear; - -/*! - @brief Immediately present a top level error message to the user. - - @param message The error message to present -*/ -- (void)showTopLevelError:(NSString *)message; - -/*! - @brief Immediately present a field-level error to the user. - - @note We do not support field-level error descriptions. This method highlights the field to indicate invalidity. - @param field The invalid field -*/ -- (void)showErrorForField:(BTUICardFormField)field; - -/*! - @brief Configure whether to support complete alphanumeric postal codes. Defaults to YES - @note If NO, allows only digit entry. -*/ -@property (nonatomic, assign) BOOL alphaNumericPostalCode; - -/*! - @brief Which fields should be included. Defaults to BTUICardFormOptionalFieldsAll -*/ -@property (nonatomic, assign) BTUICardFormOptionalFields optionalFields; - -/*! - @brief Whether to provide feedback to the user via vibration. Defaults to YES -*/ -@property (nonatomic, assign) BOOL vibrate; - - -@end - -/*! - @brief Delegate protocol for receiving updates about the card form -*/ -@protocol BTUICardFormViewDelegate - -@optional - -/*! - @brief The card form data has updated. -*/ -- (void)cardFormViewDidChange:(BTUICardFormView *)cardFormView; - -- (void)cardFormViewDidBeginEditing:(BTUICardFormView *)cardFormView; - -- (void)cardFormViewDidEndEditing:(BTUICardFormView *)cardFormView; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardHint.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardHint.h deleted file mode 100755 index dba47559..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICardHint.h +++ /dev/null @@ -1,54 +0,0 @@ -#import -#import "BTUIPaymentOptionType.h" -#import "BTUIThemedView.h" - -/*! - @brief `BTCardHint` has two display modes: one emphasizes the card type, and the second emphasizes the CVV location. -*/ -typedef NS_ENUM(NSInteger, BTCardHintDisplayMode) { - /// Emphasize the card's type. - BTCardHintDisplayModeCardType, - /// Emphasize the CVV's location. - BTCardHintDisplayModeCVVHint, -}; - -/*! - @class BTUICardHint - @discussion A View that displays a card icon in order to provide users with a hint as to what card type - has been detected or where the CVV can be found on that card. -*/ -@interface BTUICardHint : BTUIThemedView - -/*! - @brief The card type to display. -*/ -@property (nonatomic, assign) BTUIPaymentOptionType cardType; - -/*! - @brief Whether to emphasize the card type or the CVV. -*/ -@property (nonatomic, assign) BTCardHintDisplayMode displayMode; - -/*! - @brief Whether it is highlighted with the tint color -*/ -@property (nonatomic, assign) BOOL highlighted; - -/*! - @brief Set highlight with animation -*/ -- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated; - -/*! - @brief Update the current cardType with an optional visual animation - @see cardType -*/ -- (void)setCardType:(BTUIPaymentOptionType)cardType animated:(BOOL)animated; - -/*! - @brief Update the current displayMode with an optional visual animation - @see displayMode -*/ -- (void)setDisplayMode:(BTCardHintDisplayMode)displayMode animated:(BOOL)animated; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICoinbaseButton.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICoinbaseButton.h deleted file mode 100755 index a9337872..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUICoinbaseButton.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@class BTUI; - -@interface BTUICoinbaseButton : UIControl - -@property (nonatomic, strong) BTUI *theme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPayPalButton.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPayPalButton.h deleted file mode 100755 index 45ac4899..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPayPalButton.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@class BTUI, BTUIPayPalWordmarkVectorArtView; - -@interface BTUIPayPalButton : UIControl - -@property (nonatomic, strong) BTUI *theme; - -@property (nonatomic, strong) BTUIPayPalWordmarkVectorArtView *payPalWordmark; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentMethodView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentMethodView.h deleted file mode 100755 index 2e708d2f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentMethodView.h +++ /dev/null @@ -1,26 +0,0 @@ -#import "BTUIPaymentOptionType.h" -#import "BTUIThemedView.h" -#import - -/*! - @brief A view that indicates the currently selected payment method, be it a credit card or a PayPal account. -*/ -@interface BTUIPaymentMethodView : BTUIThemedView - -/*! - @brief The type of payment method to display. - */ -@property (nonatomic, assign) BTUIPaymentOptionType type; - -/*! - @brief An optional string description of the payment method. - @discussion For example, you could say "ending in 02" for a credit card. - */ -@property (nonatomic, copy) NSString *detailDescription; - -/*! - @brief When true, all content is hidden and a loading spinner is displayed. - */ -@property (nonatomic, assign, getter = isProcessing) BOOL processing; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentOptionType.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentOptionType.h deleted file mode 100755 index b2f0d42a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIPaymentOptionType.h +++ /dev/null @@ -1,21 +0,0 @@ -/*! - @brief Credit card types -*/ -typedef NS_ENUM(NSInteger, BTUIPaymentOptionType) { - BTUIPaymentOptionTypeUnknown = 0, - BTUIPaymentOptionTypeAMEX, - BTUIPaymentOptionTypeDinersClub, - BTUIPaymentOptionTypeDiscover, - BTUIPaymentOptionTypeMasterCard, - BTUIPaymentOptionTypeVisa, - BTUIPaymentOptionTypeJCB, - BTUIPaymentOptionTypeLaser, - BTUIPaymentOptionTypeMaestro, - BTUIPaymentOptionTypeUnionPay, - BTUIPaymentOptionTypeSolo, - BTUIPaymentOptionTypeSwitch, - BTUIPaymentOptionTypeUKMaestro, - BTUIPaymentOptionTypePayPal, - BTUIPaymentOptionTypeCoinbase, - BTUIPaymentOptionTypeVenmo, -}; diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUISummaryView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUISummaryView.h deleted file mode 100755 index 46bdd2a3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUISummaryView.h +++ /dev/null @@ -1,24 +0,0 @@ -#import -#import "BTUIThemedView.h" - -/*! - @brief Informational view that displays a summary of the shopping cart or other relevant data for checkout experience that user is agreing too. -*/ - @interface BTUISummaryView : BTUIThemedView - -/*! - @brief The text to display as the primary description of the purchase. -*/ -@property (nonatomic, copy) NSString *slug; - -/*! - @brief The text to display as the secondary summary of the purchase. -*/ -@property (nonatomic, copy) NSString *summary; - -/*! - @brief The textual representation of the dollar amount for the purchase including the currency symbol -*/ -@property (nonatomic, copy) NSString *amount; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIThemedView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIThemedView.h deleted file mode 100755 index 94981863..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIThemedView.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import "BTUI.h" - -@interface BTUIThemedView : UIView -@property (nonatomic, strong) BTUI *theme; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVectorArtView.h deleted file mode 100755 index c0db3976..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVectorArtView.h +++ /dev/null @@ -1,23 +0,0 @@ -#import - -/*! - @class BTUIVectorArtView - @brief Subclassed to easily draw vector art into a scaled UIView. - @discussion Useful for using generated UIBezierPath code from - [PaintCode](http://www.paintcodeapp.com/) verbatim. -*/ -@interface BTUIVectorArtView : UIView - -/*! - @brief Subclass and implement this method to draw within a context pre-scaled to the view's size. -*/ -- (void)drawArt; - -/*! - @brief This property informs the BTVectorArtView drawRect method of the dimensions of the artwork. -*/ -@property (nonatomic, assign) CGSize artDimensions; - -- (UIImage *)imageOfSize:(CGSize)size; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVenmoButton.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVenmoButton.h deleted file mode 100755 index 515bd4b2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BTUIVenmoButton.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@class BTUI; - -@interface BTUIVenmoButton : UIControl - -@property (nonatomic, strong) BTUI *theme; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BraintreeUI.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BraintreeUI.h deleted file mode 100755 index 9cc1673f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/BraintreeUI.h +++ /dev/null @@ -1,25 +0,0 @@ -#import - -//! Project version number for BraintreeUI. -FOUNDATION_EXPORT double BraintreeUIVersionNumber; - -//! Project version string for BraintreeUI. -FOUNDATION_EXPORT const unsigned char BraintreeUIVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTDropInViewController.h" -#import "BTPaymentButton.h" -#import "BTPaymentRequest.h" -#import "BTUICardFormView.h" -#import "BTUICardHint.h" -#import "BTUICoinbaseButton.h" -#import "BTUICTAControl.h" -#import "BTUIPaymentMethodView.h" -#import "BTUIPayPalButton.h" -#import "BTUISummaryView.h" -#import "BTUIVenmoButton.h" -#import "UIColor+BTUI.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/UIColor+BTUI.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/UIColor+BTUI.h deleted file mode 100755 index 427fb6ed..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Public/UIColor+BTUI.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@interface UIColor (BTUI) - -+ (instancetype)bt_colorWithBytesR:(NSInteger)r G:(NSInteger)g B:(NSInteger)b A:(NSInteger)a; -+ (instancetype)bt_colorWithBytesR:(NSInteger)r G:(NSInteger)g B:(NSInteger)b; -+ (instancetype)bt_colorFromHex:(NSString *)hex alpha:(CGFloat)alpha; - -- (instancetype)bt_adjustedBrightness:(CGFloat)adjustment; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/README.md b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/README.md deleted file mode 100755 index 52f8a607..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Braintree Payments UI for iOS - -Braintree Payments UI is an iOS library that enables you to create a simple, native UI for collecting payment information, including credit card details and PayPal accounts. - -This library is comprised of dumb views and controls without much logic or ability to communicate with a payments processor. We compose these in our ideal Drop In payments experience in Drop In. - -## Usage - -To run the example project; clone the repo, and run `pod install` from the Example directory first. Then, open up the xcworkspace and run the demo app. - -## Installation - -Braintree Payments UI is available through [CocoaPods](http://cocoapods.org). To install -it, add the following line to your Podfile: - -```ruby -pod 'Braintree/UI' -``` diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/BTUI.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/BTUI.m deleted file mode 100755 index 940a940c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/BTUI.m +++ /dev/null @@ -1,300 +0,0 @@ -#import "BTUI.h" -#import "BTUIUtil.h" -#import "UIColor+BTUI.h" - -#import "BTUIMasterCardVectorArtView.h" -#import "BTUIJCBVectorArtView.h" -#import "BTUIMaestroVectorArtView.h" -#import "BTUIVisaVectorArtView.h" -#import "BTUIDiscoverVectorArtView.h" -#import "BTUIUnknownCardVectorArtView.h" -#import "BTUIDinersClubVectorArtView.h" -#import "BTUIAmExVectorArtView.h" -#import "BTUIPayPalMonogramCardView.h" -#import "BTUICoinbaseMonogramCardView.h" -#import "BTUIVenmoMonogramCardView.h" -#import "BTUIUnionPayVectorArtView.h" - -@implementation BTUI - -+ (BTUI *)braintreeTheme { - static BTUI *_sharedBraintreeTheme; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _sharedBraintreeTheme = [[BTUI alloc] init]; - }); - return _sharedBraintreeTheme; -} - -- (UIColor *)idealGray { - return [UIColor bt_colorWithBytesR:128 G:128 B:128]; -} - -- (UIColor *)viewBackgroundColor { - return [UIColor bt_colorFromHex:@"f3f4f6" alpha:1.0f]; -} - -- (UIColor *)callToActionColor { - return [UIColor bt_colorWithBytesR:7 G:158 B:222]; -} - -- (UIColor *)callToActionColorHighlighted { - return [UIColor colorWithRed:0.375 green:0.635 blue:0.984 alpha:1.000]; -} - -- (UIColor *)disabledButtonColor { - return [UIColor bt_colorFromHex:@"#BCBFC4" alpha:1.0f]; -} - -- (UIColor *)titleColor { - return [UIColor bt_colorWithBytesR:46 G:51 B:58]; -} - -- (UIColor *)detailColor { - return [UIColor bt_colorWithBytesR:98 G:102 B:105]; -} - -- (UIColor *)borderColor { - return [UIColor bt_colorWithBytesR:216 G:216 B:216]; -} - -- (UIColor *)textFieldTextColor { - return [UIColor bt_colorWithBytesR:26 G:26 B:26]; -} - -- (UIColor *)textFieldPlaceholderColor { - return [self idealGray]; -} - -- (UIColor *)sectionHeaderTextColor { - return [self idealGray]; -} - -- (UIColor *)textFieldFloatLabelTextColor { - return [self sectionHeaderTextColor]; -} - -- (UIColor *)defaultTintColor { - return [self palBlue]; -} - -- (UIColor *)cardHintBorderColor { - return [UIColor bt_colorWithBytesR:0 G:0 B:0 A:20]; -} - -- (UIColor *)errorBackgroundColor { - return [UIColor bt_colorWithBytesR:250 G:229 B:232]; -} - -- (UIColor *)errorForegroundColor { - return [UIColor bt_colorWithBytesR:208 G:2 B:27]; -} - -#pragma mark PayPal Colors - -- (UIColor *)payBlue { - return [UIColor bt_colorFromHex:@"003087" alpha:1.0f]; -} - -- (UIColor *)palBlue { - return [UIColor bt_colorFromHex:@"009CDE" alpha:1.0f]; -} - -- (UIColor *)payPalButtonBlue { - return [UIColor bt_colorWithBytesR:12 G:141 B:196]; -} - -- (UIColor *)payPalButtonActiveBlue { - return [UIColor bt_colorWithBytesR:1 G:156 B:222]; -} - -#pragma mark Venmo Color - -- (UIColor *)venmoPrimaryBlue { - return [UIColor bt_colorFromHex:@"3D95CE" alpha:1.0f]; -} - -#pragma mark Coinbase Color - -- (UIColor *)coinbasePrimaryBlue { - return [UIColor colorWithRed: 0.053 green: 0.433 blue: 0.7 alpha: 1]; -} - -#pragma mark Adjustments - -- (CGFloat)highlightedBrightnessAdjustment { - return 0.6; -} - -#pragma mark - Appearance - -- (CGFloat)cornerRadius { - return 4.0f; -} - -- (CGFloat)borderWidth { - CGFloat screenScale = [UIScreen mainScreen].scale; - return 1 / screenScale; -} - -- (CGFloat)formattedEntryKerning { - return 8.0f; -} - -- (CGFloat)horizontalMargin { - return 17.0f; -} - -- (CGFloat)paymentButtonMinHeight { - return 44.0f; -} - -- (CGFloat)paymentButtonMaxHeight { - return 60.0f; -} - -- (CGFloat)paymentButtonWordMarkHeight { - return 18.0f; -} - - -#pragma mark - Type - -- (UIFont *)controlFont { - return [UIFont fontWithName:@"HelveticaNeue-Light" size:14.0f]; -} - -- (UIFont *)controlTitleFont { - return [UIFont fontWithName:@"HelveticaNeue-Bold" size:17.0f]; -} - -- (UIFont *)controlDetailFont { - return [UIFont fontWithName:@"HelveticaNeue" size:17.0f]; -} - -- (UIFont *)textFieldFont { - return [UIFont fontWithName:@"HelveticaNeue" size:17.0f]; -} - -- (UIFont *)textFieldFloatLabelFont { - return [UIFont fontWithName:@"HelveticaNeue" size:12.0f]; -} - -- (UIFont *)sectionHeaderFont { - return [UIFont fontWithName:@"HelveticaNeue" size:14.0f]; -} - -#pragma mark - String Attributes - -- (NSDictionary *)textFieldTextAttributes { - return @{NSFontAttributeName: self.textFieldFont, - NSForegroundColorAttributeName: self.textFieldTextColor}; -} - -- (NSDictionary *)textFieldPlaceholderAttributes { - return @{NSFontAttributeName: self.textFieldFont, - NSForegroundColorAttributeName: self.textFieldPlaceholderColor}; -} - -#pragma mark Transitions - -- (CGFloat)quickTransitionDuration { - return 0.1f; -} - -- (CGFloat)transitionDuration { - return 0.2f; -} - -- (CGFloat)minimumVisibilityTime { - return 0.5f; -} - -#pragma mark Icons - -+ (BTUIPaymentOptionType)paymentOptionTypeForPaymentInfoType:(NSString *)typeString { - if ([typeString isEqualToString:@"Visa"]) { - return BTUIPaymentOptionTypeVisa; - } else if ([typeString isEqualToString:@"MasterCard"]) { - return BTUIPaymentOptionTypeMasterCard; - } else if ([typeString isEqualToString:@"Coinbase"]) { - return BTUIPaymentOptionTypeCoinbase; - } else if ([typeString isEqualToString:@"PayPal"]) { - return BTUIPaymentOptionTypePayPal; - } else if ([typeString isEqualToString:@"DinersClub"]) { - return BTUIPaymentOptionTypeDinersClub; - } else if ([typeString isEqualToString:@"JCB"]) { - return BTUIPaymentOptionTypeJCB; - } else if ([typeString isEqualToString:@"Maestro"]) { - return BTUIPaymentOptionTypeMaestro; - } else if ([typeString isEqualToString:@"Discover"]) { - return BTUIPaymentOptionTypeDiscover; - } else if ([typeString isEqualToString:@"UKMaestro"]) { - return BTUIPaymentOptionTypeUKMaestro; - } else if ([typeString isEqualToString:@"AMEX"]) { - return BTUIPaymentOptionTypeAMEX; - } else if ([typeString isEqualToString:@"Solo"]) { - return BTUIPaymentOptionTypeSolo; - } else if ([typeString isEqualToString:@"Laser"]) { - return BTUIPaymentOptionTypeLaser; - } else if ([typeString isEqualToString:@"Switch"]) { - return BTUIPaymentOptionTypeSwitch; - } else if ([typeString isEqualToString:@"UnionPay"]) { - return BTUIPaymentOptionTypeUnionPay; - } else if ([typeString isEqualToString:@"Venmo"]) { - return BTUIPaymentOptionTypeVenmo; - } else { - return BTUIPaymentOptionTypeUnknown; - } -} - -- (BTUIVectorArtView *)vectorArtViewForPaymentInfoType:(NSString *)typeString { - return [self vectorArtViewForPaymentOptionType:[BTUI paymentOptionTypeForPaymentInfoType:typeString]]; -} - -- (BTUIVectorArtView *)vectorArtViewForPaymentOptionType:(BTUIPaymentOptionType)type { - switch (type) { - case BTUIPaymentOptionTypeVisa: - return [BTUIVisaVectorArtView new]; - case BTUIPaymentOptionTypeMasterCard: - return [BTUIMasterCardVectorArtView new]; - case BTUIPaymentOptionTypeCoinbase: - return [BTUICoinbaseMonogramCardView new]; - case BTUIPaymentOptionTypePayPal: - return [BTUIPayPalMonogramCardView new]; - case BTUIPaymentOptionTypeDinersClub: - return [BTUIDinersClubVectorArtView new]; - case BTUIPaymentOptionTypeJCB: - return [BTUIJCBVectorArtView new]; - case BTUIPaymentOptionTypeMaestro: - return [BTUIMaestroVectorArtView new]; - case BTUIPaymentOptionTypeDiscover: - return [BTUIDiscoverVectorArtView new]; - case BTUIPaymentOptionTypeUKMaestro: - return [BTUIMaestroVectorArtView new]; - case BTUIPaymentOptionTypeAMEX: - return [BTUIAmExVectorArtView new]; - case BTUIPaymentOptionTypeVenmo: - return [BTUIVenmoMonogramCardView new]; - case BTUIPaymentOptionTypeUnionPay: - return [BTUIUnionPayVectorArtView new]; - case BTUIPaymentOptionTypeSolo: - case BTUIPaymentOptionTypeLaser: - case BTUIPaymentOptionTypeSwitch: - case BTUIPaymentOptionTypeUnknown: - return [BTUIUnknownCardVectorArtView new]; - } -} - -#pragma mark Utilties - -+ (UIActivityIndicatorViewStyle)activityIndicatorViewStyleForBarTintColor:(UIColor *)color { - CGFloat r, g, b; - [color getRed:&r green:&g blue:&b alpha:NULL]; - CGFloat perceivedBrightnessBasedOnWeightedDistanceIn3DRGBSpace = sqrtf(r * r * .241 + g * g * .691 + b * b * .068); - - return perceivedBrightnessBasedOnWeightedDistanceIn3DRGBSpace > 0.5 ? UIActivityIndicatorViewStyleGray : UIActivityIndicatorViewStyleWhite; -} - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/UIColor+BTUI.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/UIColor+BTUI.m deleted file mode 100755 index df64f4f0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Theme/UIColor+BTUI.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "UIColor+BTUI.h" - -@implementation UIColor (BTUI) - -+ (instancetype)bt_colorWithBytesR:(NSInteger)r G:(NSInteger)g B:(NSInteger)b A:(NSInteger)a { - return [[self class] colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a/255.0f]; -} - -+ (instancetype)bt_colorWithBytesR:(NSInteger)r G:(NSInteger)g B:(NSInteger)b { - return [[self class] bt_colorWithBytesR:r G:g B:b A:255.0f]; -} - -- (instancetype)bt_adjustedBrightness:(CGFloat)adjustment { - CGFloat h, s, b, a; - if ([self getHue:&h saturation:&s brightness:&b alpha:&a]) { - CGFloat newB = MAX(0.0f, MIN(1.0f, adjustment * b)); - return [[self class] colorWithHue:h saturation:s brightness:newB alpha:a]; - } else { - return nil; - } -} - -+ (instancetype)bt_colorFromHex:(NSString *)hex alpha:(CGFloat)alpha { - uint value = 0; - NSScanner *scanner = [NSScanner scannerWithString:hex]; - [scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@"#"]]; - [scanner scanHexInt:&value]; - return [UIColor colorWithRed:((value >> 16) & 255) / 255.0f - green:((value >> 8) & 255) / 255.0f - blue:(value & 255) / 255.0f - alpha:alpha]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.h deleted file mode 100755 index 6819a662..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.h +++ /dev/null @@ -1,16 +0,0 @@ -#import - -@protocol BTMockApplePayPaymentAuthorizationViewDelegate; - -@interface BTMockApplePayPaymentAuthorizationView : UIView - -- (instancetype)initWithDelegate:(id)delegate; - -@end - -@protocol BTMockApplePayPaymentAuthorizationViewDelegate - -- (void)mockApplePayPaymentAuthorizationViewDidSucceed:(BTMockApplePayPaymentAuthorizationView *)view; -- (void)mockApplePayPaymentAuthorizationViewDidCancel:(BTMockApplePayPaymentAuthorizationView *)view; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.m deleted file mode 100755 index badfaa2f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationView.m +++ /dev/null @@ -1,98 +0,0 @@ -#import "BTMockApplePayPaymentAuthorizationView.h" - -@interface BTMockApplePayPaymentAuthorizationView () -@property (nonatomic, weak) id delegate; -@property (nonatomic, strong) UITableView *tableView; -@end - -NSString *const BTMockApplePayPaymentAuthorizationControlCell = @"BTMockApplePayPaymentAuthorizationControlCell"; - -@implementation BTMockApplePayPaymentAuthorizationView - -- (instancetype)initWithDelegate:(id)delegate { - self = [super init]; - if (self) { - self.delegate = delegate; - - self.tableView = [[UITableView alloc] initWithFrame:self.frame - style:UITableViewStyleGrouped]; - self.tableView.translatesAutoresizingMaskIntoConstraints = NO; - [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:BTMockApplePayPaymentAuthorizationControlCell]; - self.tableView.dataSource = self; - self.tableView.delegate = self; - - [self addSubview:self.tableView]; - - NSDictionary *views = @{ @"tableView": self.tableView }; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[tableView]|" - options:0 - metrics:nil - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[tableView]|" - options:0 - metrics:nil - views:views]]; - } - return self; -} - -#pragma mark Table View Data Source - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - NSParameterAssert(indexPath.section == 0); - NSParameterAssert(indexPath.row < 2); - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:BTMockApplePayPaymentAuthorizationControlCell forIndexPath:indexPath]; - - if (!cell) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:BTMockApplePayPaymentAuthorizationControlCell]; - } - - cell.selectionStyle = UITableViewCellSelectionStyleBlue; - - switch (indexPath.row) { - case 0: - cell.textLabel.text = @"💳 Succeed (4111111111111111)"; - break; - case 1: - cell.textLabel.text = @"⛔️ Cancel"; - break; - - default: - break; - } - - return cell; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSParameterAssert(indexPath.section == 0); - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - - switch (indexPath.row) { - case 0: - [self.delegate mockApplePayPaymentAuthorizationViewDidSucceed:self]; - break; - case 1: - [self.delegate mockApplePayPaymentAuthorizationViewDidCancel:self]; - default: - break; - } -} - -- (NSString *)tableView:(__unused UITableView *)tableView titleForHeaderInSection:(__unused NSInteger)section { - NSParameterAssert(section == 0); - - return @"Apple Pay - Mock Mode"; -} - -- (NSInteger)tableView:(__unused UITableView *)tableView numberOfRowsInSection:(__unused NSInteger)section { - NSParameterAssert(section == 0); - return 2; -} - -- (NSInteger)numberOfSectionsInTableView:(__unused UITableView *)tableView { - return 1; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.h deleted file mode 100755 index 0ab97c47..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -#import -@import PassKit; - -@protocol BTMockApplePayPaymentAuthorizationViewControllerDelegate; - -@interface BTMockApplePayPaymentAuthorizationViewController : UIViewController - -@property (nonatomic, weak) id delegate; - -- (instancetype)initWithPaymentRequest:(PKPaymentRequest *)request; - -+ (BOOL)canMakePayments; - -@end - -@protocol BTMockApplePayPaymentAuthorizationViewControllerDelegate - -- (void)mockApplePayPaymentAuthorizationViewController:(BTMockApplePayPaymentAuthorizationViewController *)viewController - didAuthorizePayment:(PKPayment *)payment - completion:(void (^)(PKPaymentAuthorizationStatus status))completion; - -- (void)mockApplePayPaymentAuthorizationViewControllerDidFinish:(BTMockApplePayPaymentAuthorizationViewController *)viewController; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.m deleted file mode 100755 index 35aabd58..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Apple Pay/BTMockApplePayPaymentAuthorizationViewController.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "BTMockApplePayPaymentAuthorizationViewController.h" - -#import "BTMockApplePayPaymentAuthorizationView.h" -#import "BTLogger_Internal.h" - -@interface BTMockApplePayPaymentAuthorizationViewController () - -@end - -@implementation BTMockApplePayPaymentAuthorizationViewController - -- (instancetype)initWithPaymentRequest:(PKPaymentRequest *)request { - self = [super init]; - if (self) { - [[BTLogger sharedLogger] debug:@"Initializing BTMockApplePayPaymentAuthorizationViewController with PKRequest merchantIdentifier: %@; items: %@", request.merchantIdentifier, request.paymentSummaryItems ]; - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - BTMockApplePayPaymentAuthorizationView *authorizationView = [[BTMockApplePayPaymentAuthorizationView alloc] initWithDelegate:self]; - authorizationView.translatesAutoresizingMaskIntoConstraints = NO; - - [self.view addSubview:authorizationView]; - - NSDictionary *views = @{ @"authorizationView": authorizationView }; - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[authorizationView]|" - options:0 - metrics:nil - views:views]]; - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[authorizationView]|" - options:0 - metrics:nil - views:views]]; -} - -+ (BOOL)canMakePayments { - NSOperatingSystemVersion v; - v.majorVersion = 8; - v.minorVersion = 1; - v.patchVersion = 0; - return [[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)] && [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:v]; -} - -- (void)cancel:(__unused id)sender { - [self.delegate mockApplePayPaymentAuthorizationViewControllerDidFinish:self]; -} - -#pragma mark Mock Payment Authorization View Delegate - -- (void)mockApplePayPaymentAuthorizationViewDidCancel:(__unused BTMockApplePayPaymentAuthorizationView *)view { - [self.delegate mockApplePayPaymentAuthorizationViewControllerDidFinish:self]; -} - -- (void)mockApplePayPaymentAuthorizationViewDidSucceed:(__unused BTMockApplePayPaymentAuthorizationView *)view { - [self.delegate mockApplePayPaymentAuthorizationViewController:self - didAuthorizePayment:nil - completion:^(__unused PKPaymentAuthorizationStatus status) { - [self.delegate mockApplePayPaymentAuthorizationViewControllerDidFinish:self]; - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.h deleted file mode 100755 index c38918b7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.h +++ /dev/null @@ -1,17 +0,0 @@ -#import - -#import "BTUICardType.h" -#import "BTUIPaymentOptionType.h" - -/*! - @class BTUIViewUtil - @brief Utilities used by other views -*/ -@interface BTUIViewUtil : NSObject - -+ (BTUIPaymentOptionType)paymentMethodTypeForCardType:(BTUICardType *)cardType; -+ (NSString *)nameForPaymentMethodType:(BTUIPaymentOptionType)paymentMethodType; - -+ (void)vibrate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.m deleted file mode 100755 index d5543512..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/BTUIViewUtil.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "BTUIViewUtil.h" -@import AudioToolbox; - -@implementation BTUIViewUtil - -+ (BTUIPaymentOptionType)paymentMethodTypeForCardType:(BTUICardType *)cardType { - - if (cardType == nil) { - return BTUIPaymentOptionTypeUnknown; - } - - if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)]) { - return BTUIPaymentOptionTypeAMEX; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_VISA)]) { - return BTUIPaymentOptionTypeVisa; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_MASTER_CARD)]) { - return BTUIPaymentOptionTypeMasterCard; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_DISCOVER)]) { - return BTUIPaymentOptionTypeDiscover; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_JCB)]) { - return BTUIPaymentOptionTypeJCB; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_MAESTRO)]) { - return BTUIPaymentOptionTypeMaestro; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_DINERS_CLUB)]) { - return BTUIPaymentOptionTypeDinersClub; - } else if ([cardType.brand isEqualToString:BTUILocalizedString(CARD_TYPE_UNION_PAY)]) { - return BTUIPaymentOptionTypeUnionPay; - } else { - return BTUIPaymentOptionTypeUnknown; - } -} - - -+ (NSString *)nameForPaymentMethodType:(BTUIPaymentOptionType)paymentMethodType { - switch (paymentMethodType) { - case BTUIPaymentOptionTypeUnknown: - return @"Card"; - case BTUIPaymentOptionTypeAMEX: - return BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS); - case BTUIPaymentOptionTypeDinersClub: - return BTUILocalizedString(CARD_TYPE_DINERS_CLUB); - case BTUIPaymentOptionTypeDiscover: - return BTUILocalizedString(CARD_TYPE_DISCOVER); - case BTUIPaymentOptionTypeMasterCard: - return BTUILocalizedString(CARD_TYPE_MASTER_CARD); - case BTUIPaymentOptionTypeVisa: - return BTUILocalizedString(CARD_TYPE_VISA); - case BTUIPaymentOptionTypeJCB: - return BTUILocalizedString(CARD_TYPE_JCB); - case BTUIPaymentOptionTypeLaser: - return BTUILocalizedString(CARD_TYPE_LASER); - case BTUIPaymentOptionTypeMaestro: - return BTUILocalizedString(CARD_TYPE_MAESTRO); - case BTUIPaymentOptionTypeUnionPay: - return BTUILocalizedString(CARD_TYPE_UNION_PAY); - case BTUIPaymentOptionTypeSolo: - return BTUILocalizedString(CARD_TYPE_SOLO); - case BTUIPaymentOptionTypeSwitch: - return BTUILocalizedString(CARD_TYPE_SWITCH); - case BTUIPaymentOptionTypeUKMaestro: - return BTUILocalizedString(CARD_TYPE_MAESTRO); - case BTUIPaymentOptionTypePayPal: - return BTUILocalizedString(PAYPAL_CARD_BRAND); - case BTUIPaymentOptionTypeCoinbase: - return BTUILocalizedString(PAYMENT_METHOD_TYPE_COINBASE); - case BTUIPaymentOptionTypeVenmo: - return BTUILocalizedString(PAYMENT_METHOD_TYPE_VENMO); - } - -} - -+ (void)vibrate { - AudioServicesPlayAlertSound(kSystemSoundID_Vibrate); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.h deleted file mode 100755 index 509f3bea..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface BTUIHorizontalButtonStackCollectionViewFlowLayout : UICollectionViewFlowLayout - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.m deleted file mode 100755 index 3a21fd38..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackCollectionViewFlowLayout.m +++ /dev/null @@ -1,65 +0,0 @@ -#import "BTUIHorizontalButtonStackCollectionViewFlowLayout.h" -#import "BTUIHorizontalButtonStackSeparatorLineView.h" - - -NSString *BTHorizontalButtonStackCollectionViewFlowLayoutLineSeparatorDecoratorViewKind = @"BTHorizontalButtonStackCollectionViewFlowLayoutLineSeparatorDecoratorViewKind"; - -@interface BTUIHorizontalButtonStackCollectionViewFlowLayout () -@property (nonatomic, strong) NSMutableArray *cachedLayoutAttributes; -@end - -@implementation BTUIHorizontalButtonStackCollectionViewFlowLayout - -- (id)init { - self = [super init]; - if (self) { - [self registerClass:[BTUIHorizontalButtonStackSeparatorLineView class] forDecorationViewOfKind:BTHorizontalButtonStackCollectionViewFlowLayoutLineSeparatorDecoratorViewKind]; - } - return self; -} - -- (void)prepareLayout { - NSAssert(self.collectionView.numberOfSections == 1, @"Must have 1 section"); - - [self calculateAndCacheLayoutAttributes]; -} - -- (CGSize)collectionViewContentSize { - /// The collection view should never scroll - return self.collectionView.frame.size; -} - -- (NSArray *)layoutAttributesForElementsInRect:(__unused CGRect)rect { - return [self.cachedLayoutAttributes copy]; -} - -#pragma mark - Helpers - -- (void)calculateAndCacheLayoutAttributes { - self.cachedLayoutAttributes = [NSMutableArray array]; - - NSInteger numberOfButtons = [self.collectionView numberOfItemsInSection:0]; - CGFloat totalWidth = CGRectGetWidth(self.collectionView.frame); - CGFloat totalHeight = CGRectGetHeight(self.collectionView.frame); - CGSize buttonSize = CGSizeMake(totalWidth / numberOfButtons, totalHeight); - - for (NSInteger i = 0; i < numberOfButtons; i++) { - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:0]; - UICollectionViewLayoutAttributes *cellLayoutAttributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath]; - CGRect cellFrame = CGRectMake(buttonSize.width * i, 0, buttonSize.width, buttonSize.height); - cellLayoutAttributes.frame = cellFrame; - [self.cachedLayoutAttributes addObject:cellLayoutAttributes]; - } - - if (numberOfButtons > 1) { - NSArray *layoutAttributesWithoutLastElement = [self.cachedLayoutAttributes subarrayWithRange:NSMakeRange(0, [self.cachedLayoutAttributes count] > 0 ? [self.cachedLayoutAttributes count] - 1 : 0)]; - for (UICollectionViewLayoutAttributes *attributes in layoutAttributesWithoutLastElement) { - UICollectionViewLayoutAttributes *separatorAttributes = [UICollectionViewLayoutAttributes layoutAttributesForDecorationViewOfKind:BTHorizontalButtonStackCollectionViewFlowLayoutLineSeparatorDecoratorViewKind - withIndexPath:attributes.indexPath]; - separatorAttributes.frame = CGRectMake(attributes.frame.origin.x + attributes.frame.size.width, attributes.frame.origin.y, 1/2.0f, attributes.frame.size.height); - [self.cachedLayoutAttributes addObject:separatorAttributes]; - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.h deleted file mode 100755 index 3e2c93a9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BTUI.h" - -@interface BTUIHorizontalButtonStackSeparatorLineView : UICollectionReusableView -@property (nonatomic, strong) BTUI *theme; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.m deleted file mode 100755 index ae5c83a6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIHorizontalButtonStackSeparatorLineView.m +++ /dev/null @@ -1,59 +0,0 @@ -#import "BTUIHorizontalButtonStackSeparatorLineView.h" - -@interface BTUIHorizontalButtonStackSeparatorLineView () -@property (nonatomic, strong) UIView *line; -@end - -@implementation BTUIHorizontalButtonStackSeparatorLineView - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.theme = [BTUI braintreeTheme]; - self.opaque = NO; - self.backgroundColor = [UIColor clearColor]; - - self.line = [[UIView alloc] initWithFrame:CGRectZero]; - self.line.translatesAutoresizingMaskIntoConstraints = NO; - [self updateThemeAttributes]; - [self addSubview:self.line]; - } - return self; -} - -- (void)updateThemeAttributes { - self.line.backgroundColor = self.theme.borderColor; -} - -- (void)setTheme:(BTUI *)theme { - _theme = theme; - [self updateThemeAttributes]; -} - -- (void)updateConstraints { - NSDictionary *views = @{ @"line": self.line }; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[line]|" - options:0 - metrics:nil - views:views]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeHeight - relatedBy:NSLayoutRelationEqual - toItem:self.line - attribute:NSLayoutAttributeHeight - multiplier:2.0f - constant:0.0f]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterY - relatedBy:NSLayoutRelationEqual - toItem:self.line - attribute:NSLayoutAttributeCenterY - multiplier:1.0f - constant:0.0f]]; - - [super updateConstraints]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.h deleted file mode 100755 index d59de8d1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface BTUIPaymentButtonCollectionViewCell : UICollectionViewCell -@property (nonatomic, strong) UIControl *paymentButton; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.m deleted file mode 100755 index 7c831db2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Collection Views/BTUIPaymentButtonCollectionViewCell.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "BTUIPaymentButtonCollectionViewCell.h" - -@interface BTUIPaymentButtonCollectionViewCell () -@property (nonatomic, strong) NSMutableArray *paymentButtonConstraints; -@end - -@implementation BTUIPaymentButtonCollectionViewCell - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.contentView.userInteractionEnabled = NO; - self.paymentButtonConstraints = [NSMutableArray array]; - } - return self; -} - -- (void)setPaymentButton:(UIControl *)paymentButton { - if (self.paymentButtonConstraints) { - [self removeConstraints:self.paymentButtonConstraints]; - [self.paymentButtonConstraints removeAllObjects]; - } - [self.paymentButton removeFromSuperview]; - - _paymentButton = paymentButton; - [self.contentView addSubview:paymentButton]; - - paymentButton.userInteractionEnabled = NO; - - [self setNeedsUpdateConstraints]; -} - -- (void)updateConstraints { - if (self.paymentButton) { - NSDictionary *views = @{ @"paymentButton": self.paymentButton }; - [self.paymentButtonConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[paymentButton]|" - options:0 - metrics:nil - views:views]]; - [self.paymentButtonConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[paymentButton]|" - options:0 - metrics:nil - views:views]]; - [self addConstraints:self.paymentButtonConstraints]; - } - [super updateConstraints]; -} - -- (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - - [self.paymentButton setHighlighted:highlighted]; -} - -- (void)setSelected:(BOOL)selected { - [super setSelected:selected]; - - [self.paymentButton setSelected:selected]; -} - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.h deleted file mode 100755 index aa515d0f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "BTUIThemedView.h" - -@interface BTUIFloatLabel : BTUIThemedView - -@property (nonatomic, readonly, strong) UILabel *label; - -- (void)showWithAnimation:(BOOL)shouldAnimate; -- (void)hideWithAnimation:(BOOL)shouldAnimate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.m deleted file mode 100755 index 9c228c65..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFloatLabel.m +++ /dev/null @@ -1,125 +0,0 @@ -#import "BTUIFloatLabel.h" - -@interface BTUIFloatLabel () -@property (nonatomic, readwrite, strong) UILabel *label; -@property (nonatomic, strong) NSArray *verticalConstraints; -@end - -@implementation BTUIFloatLabel - -- (id)init { - self = [super init]; - if (self) { - [self setupSubviews]; - } - return self; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupSubviews]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupSubviews]; - } - return self; -} - -- (void)setupSubviews { - self.label = [[UILabel alloc] init]; - self.label.translatesAutoresizingMaskIntoConstraints = NO; - self.label.font = self.theme.textFieldFloatLabelFont; - self.label.textColor = self.theme.textFieldFloatLabelTextColor; - self.label.backgroundColor = [UIColor clearColor]; - self.label.opaque = NO; - self.label.numberOfLines = 1; - self.label.adjustsFontSizeToFitWidth = YES; - [self addSubview:self.label]; - - self.verticalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[label]|" - options:0 - metrics:nil - views:[self viewBindings]]; -} - -- (void)updateConstraints { - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[label]|" - options:0 - metrics:nil - views:[self viewBindings]]]; - [self addConstraints:self.verticalConstraints]; - - [super updateConstraints]; -} - -- (void)showWithAnimation:(BOOL)shouldAnimate { - void (^animations)(void) = ^{ - self.label.alpha = 1.0f; - [self layoutIfNeeded]; - }; - - [self removeConstraints:self.verticalConstraints]; - self.verticalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[label]|" - options:0 - metrics:nil - views:[self viewBindings]]; - [self setNeedsUpdateConstraints]; - - if (shouldAnimate) { - [UIView animateWithDuration:self.theme.quickTransitionDuration - delay:0.0f - options:UIViewAnimationOptionCurveEaseOut - animations:animations - completion:nil]; - } else { - animations(); - } -} - -- (void)hideWithAnimation:(BOOL)shouldAnimate { - void (^animations)(void) = ^{ - self.label.alpha = 0.0f; - [self setNeedsUpdateConstraints]; - [self layoutIfNeeded]; - }; - - [self removeConstraints:self.verticalConstraints]; - self.verticalConstraints = @[ [NSLayoutConstraint constraintWithItem:self.label - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeCenterY - multiplier:1.0f - constant:0.0f] ]; - [self setNeedsUpdateConstraints]; - if (shouldAnimate) { - [UIView animateWithDuration:self.theme.quickTransitionDuration - delay:0.0f - options:UIViewAnimationOptionCurveEaseOut - animations:animations - completion:nil]; - } else { - animations(); - } -} - -#pragma mark - Theme - -- (void)setTheme:(BTUI *)theme { - [super setTheme:theme]; - - self.label.font = self.theme.textFieldFloatLabelFont; - self.label.textColor = self.theme.textFieldFloatLabelTextColor; -} - -- (NSDictionary *)viewBindings { - return @{ @"label": self.label }; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.h deleted file mode 100755 index 451f5559..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.h +++ /dev/null @@ -1,46 +0,0 @@ -#import -#import "BTUIThemedView.h" - -@protocol BTUIFormFieldDelegate; - -/*! - @class BTUIFormField - @brief A form field is a UI component for entering a text value - - @discussion This is the parent class of all card form fields, - and handles display but not formatting, validation, or - relaying of events - - @see BTUIFormField() -*/ -@interface BTUIFormField : BTUIThemedView - -- (void)updateAppearance; - -@property (nonatomic, weak) id delegate; -@property (nonatomic, assign) BOOL vibrateOnInvalidInput; -@property (nonatomic, assign, readonly) BOOL valid; -@property (nonatomic, assign, readonly) BOOL entryComplete; -@property (nonatomic, assign) BOOL displayAsValid; -@property (nonatomic, assign) BOOL bottomBorder; -@property (nonatomic, assign, readwrite) BOOL backspace; - -/*! - @brief The text displayed by the field -*/ -@property (nonatomic, copy) NSString *text; - -@end - - -@protocol BTUIFormFieldDelegate - -- (void)formFieldDidChange:(BTUIFormField *)formField; -- (void)formFieldDidDeleteWhileEmpty:(BTUIFormField *)formField; - -@optional -- (BOOL)formFieldShouldReturn:(BTUIFormField *)formField; -- (void)formFieldDidBeginEditing:(BTUIFormField *)formField; -- (void)formFieldDidEndEditing:(BTUIFormField *)formField; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.m deleted file mode 100755 index 9a8fed39..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField.m +++ /dev/null @@ -1,418 +0,0 @@ -#import "BTUIFormField_Protected.h" -#import "BTUIViewUtil.h" -#import "BTUITextField.h" -#import "BTUIFloatLabel.h" - -@import QuartzCore; - -static const CGFloat formFieldTopMargin = 7; -static const CGFloat formFieldLabelHeight = 15; -static const CGFloat formFieldVerticalSpace = 1; -static const CGFloat formFieldTextFieldHeight = 20; -static const CGFloat formFieldBottomMargin = 11; - -@interface BTUIFormField () - -@property (nonatomic, strong) BTUIFloatLabel *floatLabel; -@property (nonatomic, copy) NSString *previousTextFieldText; -@property (nonatomic, strong) NSMutableArray *layoutConstraints; - -@end - -@implementation BTUIFormField - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.displayAsValid = YES; - BTUITextField *textField = [BTUITextField new]; - textField.editDelegate = self; - _textField = textField; - self.textField.translatesAutoresizingMaskIntoConstraints = NO; - self.textField.borderStyle = UITextBorderStyleNone; - self.textField.backgroundColor = [UIColor clearColor]; - self.textField.opaque = NO; - self.textField.adjustsFontSizeToFitWidth = YES; - self.textField.returnKeyType = UIReturnKeyNext; - - self.floatLabel = [[BTUIFloatLabel alloc] init]; - self.floatLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.floatLabel hideWithAnimation:NO]; - - self.accessoryView = [[UIView alloc] init]; - self.accessoryView.backgroundColor = [UIColor clearColor]; - self.accessoryView.hidden = YES; - - [self.textField addTarget:self action:@selector(fieldContentDidChange) forControlEvents:UIControlEventEditingChanged]; - [self.textField addTarget:self action:@selector(editingDidBegin) forControlEvents:UIControlEventEditingDidBegin]; - [self.textField addTarget:self action:@selector(editingDidEnd) forControlEvents:UIControlEventEditingDidEnd]; - - self.textField.delegate = self; - - [self addSubview:self.textField]; - [self addSubview:self.floatLabel]; - [self addSubview:self.accessoryView]; - - [self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tappedField)]]; - - [self setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; - self.opaque = NO; - - [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(orientationChange) - name:UIDeviceOrientationDidChangeNotification - object:nil]; - } - return self; -} - -- (CGSize)intrinsicContentSize { - CGFloat height = formFieldTopMargin + formFieldLabelHeight + formFieldVerticalSpace + formFieldTextFieldHeight + formFieldBottomMargin; - return CGSizeMake(UIViewNoIntrinsicMetric, height); -} - -- (void)setAccessoryView:(UIView *)accessoryView { - _accessoryView = accessoryView; - self.accessoryView.userInteractionEnabled = NO; - self.accessoryView.translatesAutoresizingMaskIntoConstraints = NO; -} - -- (void)setDisplayAsValid:(BOOL)displayAsValid { - if (self.vibrateOnInvalidInput && self.textField.isFirstResponder && _displayAsValid && !displayAsValid) { - [BTUIViewUtil vibrate]; - } - - _displayAsValid = displayAsValid; - [self updateAppearance]; - [self setNeedsDisplay]; -} - -- (void)orientationChange { - [self setNeedsDisplay]; -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -#pragma mark - Validity "abstract" methods - -- (BOOL)valid { - return YES; -} - -- (BOOL)entryComplete { - NSUInteger index = [self.textField offsetFromPosition:self.textField.beginningOfDocument toPosition:self.textField.selectedTextRange.start]; - return index == self.textField.text.length && self.valid; -} - -- (BOOL)becomeFirstResponder { - return [self.textField becomeFirstResponder]; -} - -- (BOOL)resignFirstResponder { - return [super resignFirstResponder] || [self.textField resignFirstResponder]; -} - -#pragma mark - Theme - -- (void)setTheme:(BTUI *)theme { - [super setTheme:theme]; - NSMutableDictionary *d = [NSMutableDictionary dictionaryWithDictionary:self.theme.textFieldTextAttributes]; - d[NSKernAttributeName] = @0; - self.textField.defaultTextAttributes = self.theme.textFieldTextAttributes; - self.floatLabel.theme = theme; -} - -- (void)setThemedPlaceholder:(NSString *)placeholder { - self.floatLabel.label.text = placeholder; - self.textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder ?: @"" - attributes:self.theme.textFieldPlaceholderAttributes]; -} - -- (void)setThemedAttributedPlaceholder:(NSAttributedString *)placeholder { - NSMutableAttributedString *mutableFloatLabel = [[NSMutableAttributedString alloc] initWithAttributedString:placeholder]; - [mutableFloatLabel beginEditing]; - [mutableFloatLabel removeAttribute:NSForegroundColorAttributeName range:NSMakeRange(0, [mutableFloatLabel length])]; - [mutableFloatLabel removeAttribute:NSBackgroundColorAttributeName range:NSMakeRange(0, [mutableFloatLabel length])]; - [mutableFloatLabel removeAttribute:NSFontAttributeName range:NSMakeRange(0, [mutableFloatLabel length])]; - [mutableFloatLabel endEditing]; - self.floatLabel.label.attributedText = mutableFloatLabel; - - NSMutableAttributedString *mutablePlaceholder = [[NSMutableAttributedString alloc] initWithAttributedString:placeholder]; - [mutablePlaceholder beginEditing]; - [mutablePlaceholder addAttributes:self.theme.textFieldPlaceholderAttributes range:NSMakeRange(0, [mutablePlaceholder length])]; - [mutablePlaceholder endEditing]; - - self.textField.attributedPlaceholder = mutablePlaceholder; -} - -#pragma mark - Drawing - -- (void)updateAppearance { - UIColor *textColor; - NSString *currentAccessibilityLabel = self.textField.accessibilityLabel; - if (!self.displayAsValid){ - textColor = self.theme.errorForegroundColor; - self.backgroundColor = self.theme.errorBackgroundColor; - if (currentAccessibilityLabel != nil) { - self.textField.accessibilityLabel = [self addInvalidAccessibilityToString:currentAccessibilityLabel]; - } - } else { - textColor = self.theme.textFieldTextColor; - self.backgroundColor = [UIColor clearColor]; - if (currentAccessibilityLabel != nil) { - self.textField.accessibilityLabel = [self stripInvalidAccessibilityFromString:currentAccessibilityLabel]; - } - } - - NSMutableAttributedString *mutableText = [[NSMutableAttributedString alloc] initWithAttributedString:self.textField.attributedText]; - [mutableText addAttributes:@{NSForegroundColorAttributeName: textColor} range:NSMakeRange(0, mutableText.length)]; - - UITextRange *currentRange = self.textField.selectedTextRange; - - self.textField.attributedText = mutableText; - - // Reassign current selection range, since it gets cleared after attributedText assignment - self.textField.selectedTextRange = currentRange; -} - -- (void)drawRect:(CGRect)rect { - - // Draw borders - - CGContextRef context = UIGraphicsGetCurrentContext(); - if (!self.displayAsValid) { - [self.theme.errorForegroundColor setFill]; - - CGPathRef path = CGPathCreateWithRect(CGRectMake(rect.origin.x, CGRectGetMaxY(rect) - 0.5f, rect.size.width, 0.5f), NULL); - CGContextAddPath(context, path); - CGPathRelease(path); - - path = CGPathCreateWithRect(CGRectMake(rect.origin.x, 0, rect.size.width, 0.5f), NULL); - CGContextAddPath(context, path); - - CGContextDrawPath(context, kCGPathFill); - CGPathRelease(path); - } else if (self.bottomBorder) { - CGFloat horizontalMargin = [self.theme horizontalMargin]; - CGPathRef path = CGPathCreateWithRect(CGRectMake(rect.origin.x + horizontalMargin, CGRectGetMaxY(rect) - 0.5f, rect.size.width - horizontalMargin, 0.5f), NULL); - CGContextAddPath(context, path); - [self.theme.borderColor setFill]; - CGContextDrawPath(context, kCGPathFill); - CGPathRelease(path); - } -} - -- (void)setBottomBorder:(BOOL)bottomBorder { - _bottomBorder = bottomBorder; - [self setNeedsDisplay]; -} - -- (void)updateConstraints { - - NSDictionary *metrics = @{@"horizontalMargin": @([self.theme horizontalMargin]), - @"accessoryViewWidth": @44, - @"formFieldTopMargin": @(formFieldTopMargin), - @"formFieldLabelHeight": @(formFieldLabelHeight), - @"formFieldVerticalSpace": @(formFieldVerticalSpace), - @"formFieldTextFieldHeight": @(formFieldTextFieldHeight), - @"formFieldBottomMargin": @(formFieldBottomMargin) - }; - NSDictionary *views = @{ @"textField": self.textField, - @"floatLabel": self.floatLabel, - @"accessoryView": self.accessoryView }; - - if (self.layoutConstraints != nil) { - [self removeConstraints:self.layoutConstraints]; - } - self.layoutConstraints = [NSMutableArray array]; - - // Pin accessory view to right with constant width - - [self.layoutConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[accessoryView]-(horizontalMargin)-|" - options:NSLayoutFormatAlignAllCenterY - metrics:metrics - views:views]]; - - - // Horizontally Pin Float Label and accessory view - [self.layoutConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(horizontalMargin)-[floatLabel]-(horizontalMargin)-[accessoryView]-(horizontalMargin)-|" options:0 metrics:metrics views:views]]; - - // Horizontally Pin text field and accessory view - [self.layoutConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(horizontalMargin)-[textField]-(horizontalMargin)-[accessoryView]-(horizontalMargin)-|" options:0 metrics:metrics views:views]]; - - [self.layoutConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[accessoryView(==accessoryViewWidth)]" options:0 metrics:metrics views:views]]; - - [self.layoutConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(formFieldTopMargin)-[floatLabel(==formFieldLabelHeight)]-(formFieldVerticalSpace)-[textField(==formFieldTextFieldHeight)]-(formFieldBottomMargin)-|" options:0 metrics:metrics views:views]]; - [self.layoutConstraints addObject:[NSLayoutConstraint constraintWithItem:self.accessoryView - attribute:NSLayoutAttributeCenterY - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeCenterY - multiplier:1.0f - constant:0]]; - NSArray *contraintsToAdd = [self.layoutConstraints copy]; - [self addConstraints:contraintsToAdd]; - [super updateConstraints]; - -} - -- (void)didDeleteBackward { - if (self.previousTextFieldText.length == 0 && self.textField.text.length == 0) { - [self.delegate formFieldDidDeleteWhileEmpty:self]; - } -} - - -- (void)updateFloatLabelTextColor { - if ([self.textField isFirstResponder]) { - self.floatLabel.label.textColor = self.tintColor; - } else { - self.floatLabel.label.textColor = self.theme.textFieldFloatLabelTextColor; - } -} - -- (void)tintColorDidChange { - [self updateFloatLabelTextColor]; -} - -#pragma mark - UITextFieldDelegate methods - -- (void)textFieldDidBeginEditing:(__unused UITextField *)textField { - [self updateFloatLabelTextColor]; - if ([self.delegate respondsToSelector:@selector(formFieldDidBeginEditing:)]) { - [self.delegate formFieldDidBeginEditing:self]; - } -} - -- (void)textFieldDidEndEditing:(__unused UITextField *)textField { - [self updateFloatLabelTextColor]; - if ([self.delegate respondsToSelector:@selector(formFieldDidEndEditing:)]) { - [self.delegate formFieldDidEndEditing:self]; - } -} - -#pragma mark - BTUITextFieldEditDelegate methods - -- (void)textFieldWillDeleteBackward:(__unused BTUITextField *)textField { - // _backspace indicates that the backspace key was typed. - _backspace = YES; - -} - -- (void)textFieldDidDeleteBackward:(BTUITextField *)textField originalText:(__unused NSString *)originalText { - if (originalText.length == 0) { - [self.delegate formFieldDidDeleteWhileEmpty:self]; - } - - if (textField.text.length == 0) { - [self.floatLabel hideWithAnimation:YES]; - } -} - -- (void)textField:(__unused BTUITextField *)textField willInsertText:(__unused NSString *)text { - _backspace = NO; -} - -- (void)textField:(BTUITextField *)textField didInsertText:(__unused NSString *)text { - if (textField.text.length > 0) { - [self.floatLabel showWithAnimation:YES]; - } -} - -- (void)setAccessoryHighlighted:(BOOL)highlight { - if (self.accessoryView) { - if ([self.accessoryView respondsToSelector:@selector(setHighlighted:animated:)]) { - SEL selector = @selector(setHighlighted:animated:); - BOOL animated = YES; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[self.accessoryView methodSignatureForSelector:selector]]; - [invocation setSelector:selector]; - [invocation setTarget:self.accessoryView]; - [invocation setArgument:&highlight atIndex:2]; - [invocation setArgument:&animated atIndex:3]; - [invocation invoke]; - } - } -} - -#pragma mark - Custom accessors - -- (void)setText:(NSString *)text { - BOOL shouldChange = [self.textField.delegate textField:self.textField - shouldChangeCharactersInRange:NSMakeRange(0, self.textField.text.length) - replacementString:text]; - if (shouldChange) { - [self.textField.delegate textFieldDidBeginEditing:self.textField]; - [self.textField.editDelegate textField:self.textField willInsertText:text]; - self.textField.text = text; - [self fieldContentDidChange]; - [self.textField.editDelegate textField:self.textField didInsertText:text]; - [self.textField.delegate textFieldDidEndEditing:self.textField]; - - } -} - -- (NSString *)text { - return self.textField.text; -} - -#pragma mark - Delegate methods and handlers - -- (void)fieldContentDidChange { - // To be implemented by subclass -} - -- (void)editingDidBegin { - [self setAccessoryHighlighted:YES]; -} - -- (void)editingDidEnd { - [self setAccessoryHighlighted:NO]; -} - - -- (BOOL)textField:(__unused UITextField *)textField shouldChangeCharactersInRange:(__unused NSRange)range replacementString:(__unused NSString *)newText { - // To be implemented by subclass - return YES; -} - -- (BOOL)textFieldShouldReturn:(__unused UITextField *)textField { - if ([self.delegate respondsToSelector:@selector(formFieldShouldReturn:)]) { - return [self.delegate formFieldShouldReturn:self]; - } else { - return YES; - } -} - -- (void)tappedField { - [self.textField becomeFirstResponder]; -} - -#pragma mark UIKeyInput - -- (void)insertText:(NSString *)text { - [self.textField insertText:text]; -} - -- (void)deleteBackward { - [self.textField deleteBackward]; -} - -- (BOOL)hasText { - return [self.textField hasText]; -} - -#pragma mark Accessibility Helpers - -- (NSString *)stripInvalidAccessibilityFromString:(NSString *)str { - return [str stringByReplacingOccurrencesOfString:@"Invalid: " withString:@""]; -} - -- (NSString *)addInvalidAccessibilityToString:(NSString *)str { - return [NSString stringWithFormat:@"Invalid: %@", [self stripInvalidAccessibilityFromString:str]]; -} - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField_Protected.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField_Protected.h deleted file mode 100755 index a9c26159..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIFormField_Protected.h +++ /dev/null @@ -1,26 +0,0 @@ -#import -#import "BTUIFormField.h" -#import "BTUITextField.h" - -/*! - @brief Private class extension for implementors of BTUIFormField subclasses. -*/ -@interface BTUIFormField () - -@property (nonatomic, strong, readonly) BTUITextField *textField; - -@property (nonatomic, strong) UIView *accessoryView; - -/*! - @brief Override in your subclass to implement behavior on content change -*/ -- (void)fieldContentDidChange; - -/*! - @brief Sets placeholder text with the appropriate theme style -*/ -- (void)setThemedPlaceholder:(NSString *)placeholder; -- (void)setThemedAttributedPlaceholder:(NSAttributedString *)placeholder; - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.h deleted file mode 100755 index efb51b8d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.h +++ /dev/null @@ -1,29 +0,0 @@ -#import - -@protocol BTUIScrollViewScrollRectToVisibleDelegate; - -/*! - @class BTUIScrollView - @brief Subclass of UIScrollView that disables default iOS "autoscrolling" to text fields by overriding the scrollRectToVisible method with a call to a delegate. -*/ -@interface BTUIScrollView : UIScrollView - -/*! - @brief Delegate that, if set, receives messages when scrollRectToVisible is called - @note If nil, scrollRectToVisible is simply a no-op. -*/ -@property (nonatomic, weak) id scrollRectToVisibleDelegate; - -/*! - @brief The "default" scrollRectToVisible implementation -*/ -- (void)defaultScrollRectToVisible:(CGRect)rect animated:(BOOL)animated; - -@end - - -@protocol BTUIScrollViewScrollRectToVisibleDelegate - -- (void)scrollView:(BTUIScrollView *)scrollView requestsScrollRectToVisible:(__unused CGRect)rect animated:(__unused BOOL)animated; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.m deleted file mode 100755 index 8a508dee..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIScrollView.m +++ /dev/null @@ -1,21 +0,0 @@ -#import "BTUIScrollView.h" - -@implementation BTUIScrollView - -- (void)defaultScrollRectToVisible:(CGRect)rect animated:(BOOL)animated -{ - [super scrollRectToVisible:rect animated:animated]; -} - -- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated -{ - if (self.scrollRectToVisibleDelegate != nil) { - [self.scrollRectToVisibleDelegate scrollView:self requestsScrollRectToVisible:rect animated:animated]; - } -} - -- (BOOL)touchesShouldCancelInContentView:(__unused UIView *)view { - return YES; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.h deleted file mode 100755 index 8d824a01..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.h +++ /dev/null @@ -1,58 +0,0 @@ -#import - -@protocol BTUITextFieldEditDelegate; - -/*! - @class BTUITextField - @brief A specialized text field that provides more granular callbacks than a standard - @discussion UITextField as the user edits text -*/ -@interface BTUITextField : UITextField - -/*! - @brief The specialized delegate for receiving callbacks about editing -*/ -@property (nonatomic, weak) id editDelegate; - -@end - -/*! - @brief A protocol for receiving callbacks when a user edits text in a `BTUITextField` -*/ -@protocol BTUITextFieldEditDelegate - -@optional - -/*! - @brief The editDelegate receives this message when the user deletes a character, but before the deletion is applied to the `text` - - @param textField The text field -*/ -- (void)textFieldWillDeleteBackward:(BTUITextField *)textField; - -/*! - @brief The editDelegate receives this message after the user deletes a character - - @param textField The text field - @param originalText The `text` of the text field before applying the deletion -*/ -- (void)textFieldDidDeleteBackward:(BTUITextField *)textField - originalText:(NSString *)originalText; - -/*! - @brief The editDelegate receives this message when the user enters text, but before the text is inserted - - @param textField The text field - @param text The text that will be inserted -*/ -- (void)textField:(BTUITextField *)textField willInsertText:(NSString *)text; - -/*! - @brief The editDelegate receives this message after the user enters text - - @param textField The text field - @param text The text that was inserted -*/ -- (void)textField:(BTUITextField *)textField didInsertText:(NSString *)text; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.m deleted file mode 100755 index 6c9c42d6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUITextField.m +++ /dev/null @@ -1,100 +0,0 @@ -#import "BTUITextField.h" - -@interface BTUITextField () -@property (nonatomic, copy) NSString *previousText; -@end - -@implementation BTUITextField - -- (instancetype)init { - if (self = [super init]) { - if ([UIDevice currentDevice].systemVersion.intValue == 9) { - [self addTarget:self action:@selector(iOS9_changed) forControlEvents:UIControlEventEditingChanged]; - self.delegate = self; - } - } - return self; -} - -- (void)iOS9_changed { - // We only want to notify when this text field's text length has increased - if (self.previousText.length >= self.text.length) { - self.previousText = self.text; - return; - } - self.previousText = self.text; - - NSString *insertedText = [self.text substringWithRange:NSMakeRange(self.previousText.length, self.text.length - self.previousText.length)]; - - if ([self.editDelegate respondsToSelector:@selector(textField:willInsertText:)]) { - // Sets _backspace = NO; in the BTUIFormField or BTUIFormField subclass - [self.editDelegate textField:self willInsertText:insertedText]; - } - - self.previousText = self.text; - - if ([self.editDelegate respondsToSelector:@selector(textField:didInsertText:)]) { - [self.editDelegate textField:self didInsertText:insertedText]; - } -} - -- (BOOL)keyboardInputShouldDelete:(__unused UITextField *)textField { - if ([self.editDelegate respondsToSelector:@selector(textFieldWillDeleteBackward:)]) { - [self.editDelegate textFieldWillDeleteBackward:self]; - } - - BOOL shouldDelete = YES; - - if ([UITextField instancesRespondToSelector:_cmd]) { - BOOL (*keyboardInputShouldDelete)(id, SEL, UITextField *) = (BOOL (*)(id, SEL, UITextField *))[UITextField instanceMethodForSelector:_cmd]; - - if (keyboardInputShouldDelete) { - shouldDelete = keyboardInputShouldDelete(self, _cmd, textField); - } - } - - BOOL isIos8 = ([[[UIDevice currentDevice] systemVersion] intValue] == 8); - BOOL isLessThanIos8_3 = ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.3f); - - // iOS 8.0-8.2 has a bug where deleteBackward is not called even when this method returns YES and the character is deleted - // As a result, we do so manually but return NO in order to prevent UITextField from double-calling the delegate method - // (textFieldDidDeleteBackwards:originalText:) - if (isIos8 && isLessThanIos8_3) { - [self deleteBackward]; - shouldDelete = NO; - } - - return shouldDelete; -} - -- (void)deleteBackward -{ - BOOL shouldDismiss = [self.text length] == 0; - NSString *originalText = self.text; - - [super deleteBackward]; - - if (shouldDismiss) { - if ([self.delegate respondsToSelector:@selector(textField:shouldChangeCharactersInRange:replacementString:)]) { - [self.delegate textField:self shouldChangeCharactersInRange:NSMakeRange(0, 0) replacementString:@""]; - } - } - - if ([self.editDelegate respondsToSelector:@selector(textFieldDidDeleteBackward:originalText:)]) { - [self.editDelegate textFieldDidDeleteBackward:self originalText:originalText]; - } -} - -- (void)insertText:(NSString *)text { - if ([self.editDelegate respondsToSelector:@selector(textField:willInsertText:)]) { - [self.editDelegate textField:self willInsertText:text]; - } - - [super insertText:text]; - - if ([self.editDelegate respondsToSelector:@selector(textField:didInsertText:)]) { - [self.editDelegate textField:self didInsertText:text]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIThemedView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIThemedView.m deleted file mode 100755 index dd9a3430..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIThemedView.m +++ /dev/null @@ -1,30 +0,0 @@ -#import "BTUIThemedView.h" - -@implementation BTUIThemedView - -- (id)init { - self = [super init]; - if (self) { - _theme = [BTUI braintreeTheme]; - } - return self; -} - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - _theme = [BTUI braintreeTheme]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - _theme = [BTUI braintreeTheme]; - } - return self; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIVectorArtView.m deleted file mode 100755 index 01d09490..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Custom Views/BTUIVectorArtView.m +++ /dev/null @@ -1,32 +0,0 @@ -#import "BTUIVectorArtView.h" -@import QuartzCore; - -@implementation BTUIVectorArtView - -- (void)drawRect:(CGRect)rect -{ - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - CGFloat scaleFactor = MIN(rect.size.width/self.artDimensions.width, rect.size.height/self.artDimensions.height); - CGContextScaleCTM(ctx, scaleFactor, scaleFactor); - CGContextTranslateCTM(ctx, rect.origin.x, rect.origin.y); - - [self drawArt]; - - CGContextRestoreGState(ctx); -} - -- (void)drawArt { - // Subclass overrides this -} - - -- (UIImage *)imageOfSize:(CGSize)size { - UIGraphicsBeginImageContextWithOptions(size, NO, 0); - [self drawRect:CGRectMake(0, 0, size.width, size.height)]; - UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - return img; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.h deleted file mode 100755 index f840642b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "BTUIFormField.h" -#import "BTUICardType.h" - -@interface BTUICardCvvField : BTUIFormField - -@property (nonatomic, strong) BTUICardType *cardType; - -@property (nonatomic, copy) NSString *cvv; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.m deleted file mode 100755 index 2a769300..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardCvvField.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "BTUICardCvvField.h" -#import "BTUIFormField_Protected.h" -#import "BTUICardHint.h" -#import "BTUIUtil.h" -#import "BTUIViewUtil.h" -#import "BTUILocalizedString.h" - -#define kMinimumCvvLength 3 -#define kMaximumCvvLength 4 - -@interface BTUICardCvvField () -@property (nonatomic, readonly) NSUInteger validLength; -@property (nonatomic, strong) BTUICardHint *hint; -@end - -@implementation BTUICardCvvField - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setThemedPlaceholder:BTUILocalizedString(CVV_FIELD_PLACEHOLDER)]; - self.textField.accessibilityLabel = BTUILocalizedString(CVV_FIELD_PLACEHOLDER); - self.textField.keyboardType = UIKeyboardTypeNumberPad; - self.textField.delegate = self; - - self.hint = [BTUICardHint new]; - self.hint.displayMode = BTCardHintDisplayModeCVVHint; - self.accessoryView = self.hint; - self.accessoryView.translatesAutoresizingMaskIntoConstraints = NO; - [self addSubview:self.accessoryView]; - } - return self; -} - -- (void)setCardType:(BTUICardType *)cardType { - _cardType = cardType; - self.displayAsValid = [self.textField isFirstResponder] || self.textField.text.length == 0 || self.valid; - BTUIPaymentOptionType type = [BTUIViewUtil paymentMethodTypeForCardType:cardType]; - [self.hint setCardType:type animated:YES]; - - if (type == BTUIPaymentOptionTypeUnionPay) { - [self setThemedPlaceholder:@"CVVM"]; - } else { - [self setThemedPlaceholder:BTUILocalizedString(CVV_FIELD_PLACEHOLDER)]; - } - - [self updateAppearance]; -} - -- (BOOL)valid { - BOOL noCardTypeOKLength = (self.cardType == nil && self.cvv.length <= kMaximumCvvLength && self.cvv.length >= kMinimumCvvLength); - BOOL validLengthForCardType = (self.cardType != nil && self.cvv.length == self.cardType.validCvvLength); - return noCardTypeOKLength || validLengthForCardType; -} - - -- (BOOL)entryComplete { - NSUInteger index = [self.textField offsetFromPosition:self.textField.beginningOfDocument toPosition:self.textField.selectedTextRange.start]; - BOOL cursorAtEnd = (index == self.textField.text.length); - - if (self.cardType == nil) { - return cursorAtEnd && self.cvv.length == kMaximumCvvLength; - } else { - return self.valid; - } -} - -- (BOOL)textField:(__unused UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - return string.length + range.location <= self.validLength; -} - -- (NSUInteger)validLength { - return self.cardType == nil ? kMaximumCvvLength : self.cardType.validCvvLength; -} - -- (void)setCvv:(NSString *)cvv { - _cvv = cvv; - self.text = cvv; -} - -#pragma mark - Handlers - -- (void)fieldContentDidChange { - self.displayAsValid = YES; - _cvv = [BTUIUtil stripNonDigits:self.textField.text]; - [self.delegate formFieldDidChange:self]; -} - -- (void)textFieldDidBeginEditing:(UITextField *)textField { - [super textFieldDidBeginEditing:textField]; - self.displayAsValid = YES; - [self.hint setHighlighted:YES animated:YES]; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - [super textFieldDidEndEditing:textField]; - self.displayAsValid = self.textField.text.length == 0 || self.valid; - [self.hint setHighlighted:NO animated:YES]; -} - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.h deleted file mode 100755 index ea7bf92d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "BTUIFormField.h" - -@interface BTUICardExpiryField : BTUIFormField - -@property (nonatomic, strong, readonly) NSString *expirationMonth; -@property (nonatomic, strong, readonly) NSString *expirationYear; - -/*! - @brief The expiration date in MMYYYY format. -*/ -@property (nonatomic, copy) NSString *expirationDate; - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.m deleted file mode 100755 index fb6c67c8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardExpiryField.m +++ /dev/null @@ -1,188 +0,0 @@ -#import "BTUICardExpiryField.h" -#import "BTUIFormField_Protected.h" -#import "BTUIUtil.h" -#import "BTUICardExpirationValidator.h" -#import "BTUICardExpiryFormat.h" -#import "BTUILocalizedString.h" - -#define BTUICardExpiryFieldYYYYPrefix @"20" -#define BTUICardExpiryFieldComponentSeparator @"/" - -#define BTUICardExpiryPlaceholderFourDigitYear BTUILocalizedString(EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR) -#define BTUICardExpiryPlaceholderTwoDigitYear BTUILocalizedString(EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR) - -@interface BTUICardExpiryField () -@end - -@implementation BTUICardExpiryField - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self updatePlaceholder]; - self.textField.keyboardType = UIKeyboardTypeNumberPad; - self.textField.delegate = self; - } - return self; -} - -- (BOOL)valid { - if (!self.expirationYear || !self.expirationMonth) { - return NO; - } - return [BTUICardExpirationValidator month:self.expirationMonth.intValue year:self.expirationYear.intValue validForDate:[NSDate date]]; -} - -- (void)setExpirationDate:(NSString *)expirationDate { - [self setText:expirationDate]; - } - -- (NSString *)expirationDate { - if (!self.expirationMonth || !self.expirationYear) return nil; - - return [NSString stringWithFormat:@"%@%@", self.expirationMonth, self.expirationYear]; -} - -#pragma mark - Handlers - -- (void)fieldContentDidChange { - _expirationMonth = nil; - _expirationYear = nil; - - NSString *formattedValue; - NSUInteger formattedCursorLocation; - - BTUICardExpiryFormat *format = [[BTUICardExpiryFormat alloc] init]; - format.value = self.textField.text; - format.cursorLocation = [self.textField offsetFromPosition:self.textField.beginningOfDocument toPosition:self.textField.selectedTextRange.start]; - format.backspace = self.backspace; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - // Important: Reset the state of self.backspace. - // Otherwise, the user won't be able to do the following: - // Enter "11/16", then backspace to - // "1", and then type e.g. "2". Instead of showing: - // "12/" (as it should), the form would instead remain stuck at - // "1". - self.backspace = NO; - // This is because UIControlEventEditingChanged is *not* sent after the "/" is removed. - // We can't trigger UIControlEventEditingChanged here (after removing a "/") because that would cause an infinite loop. - - NSMutableAttributedString *result = [[NSMutableAttributedString alloc] initWithString:formattedValue attributes:self.theme.textFieldTextAttributes]; - [self kernExpiration:result]; - self.textField.attributedText = result; - - UITextPosition *newPosition = [self.textField positionFromPosition:self.textField.beginningOfDocument offset:formattedCursorLocation]; - UITextRange *newRange = [self.textField textRangeFromPosition:newPosition toPosition:newPosition]; - self.textField.selectedTextRange = newRange; - - NSArray *expirationComponents = [self expirationComponents:self.textField.text]; - if(expirationComponents.count == 2 && (self.textField.text.length == 5 || self.textField.text.length == 7)) { - _expirationMonth = expirationComponents[0]; - _expirationYear = expirationComponents[1]; - } - - [self updatePlaceholder]; - - self.displayAsValid = ((self.textField.text.length != 5 && self.textField.text.length != 7) || self.valid); - - [self.delegate formFieldDidChange:self]; -} - -- (void)textFieldDidBeginEditing:(UITextField *)textField { - [super textFieldDidBeginEditing:textField]; - self.displayAsValid = YES; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - [super textFieldDidEndEditing:textField]; - self.displayAsValid = self.textField.text.length == 0 || self.valid; -} - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)newText { - NSString *numericNewText = [BTUIUtil stripNonDigits:newText]; - if (![numericNewText isEqualToString:newText]) { - return NO; - } - NSString *updatedText = [textField.text stringByReplacingCharactersInRange:range withString:numericNewText]; - - return [self dateIsValid:updatedText]; -} - -- (BOOL)entryComplete { - return [super entryComplete] && ![self.expirationYear isEqualToString:BTUICardExpiryFieldYYYYPrefix]; -} - -#pragma mark Helper - -- (void)updatePlaceholder { - NSString *placeholder = [self dateCouldEndWithFourDigitYear:self.textField.text] ? BTUILocalizedString(EXPIRY_PLACEHOLDER_FOUR_DIGIT_YEAR) : BTUILocalizedString(EXPIRY_PLACEHOLDER_TWO_DIGIT_YEAR); - [self setThemedPlaceholder:placeholder]; - self.textField.accessibilityLabel = placeholder; -} - -- (void)setThemedPlaceholder:(NSString *)placeholder { - NSMutableAttributedString *attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:placeholder ?: @"" - attributes:self.theme.textFieldPlaceholderAttributes]; - [self kernExpiration:attributedPlaceholder]; - [self setThemedAttributedPlaceholder:attributedPlaceholder]; -} - -- (BOOL)dateCouldEndWithFourDigitYear:(NSString *)expirationDate { - NSArray *expirationComponents = [self expirationComponents:expirationDate]; - NSString *yearComponent = [expirationComponents count] >= 2 ? expirationComponents[1] : nil; - return (yearComponent && yearComponent.length >= 2 && [[yearComponent substringToIndex:2] isEqualToString:BTUICardExpiryFieldYYYYPrefix]); -} - -- (NSArray *)expirationComponents:(NSString *)expirationDate { - return [expirationDate componentsSeparatedByString:BTUICardExpiryFieldComponentSeparator]; -} - -- (void)kernExpiration:(NSMutableAttributedString *)input { - [input removeAttribute:NSKernAttributeName range:NSMakeRange(0, input.length)]; - - [input beginEditing]; - if (input.length > 2) { - [input addAttribute:NSKernAttributeName value:@(self.theme.formattedEntryKerning/2) range:NSMakeRange(1, 1)]; - if (input.length > 3) { - [input addAttribute:NSKernAttributeName value:@(self.theme.formattedEntryKerning/2) range:NSMakeRange(2, 1)]; - } - } - [input endEditing]; -} - -// Returns YES if date is either a valid date or can have digits appended to make one. It does not contain any expiration -// date validation. -- (BOOL)dateIsValid:(NSString *)date { - NSArray *dateComponents = [date componentsSeparatedByString:BTUICardExpiryFieldComponentSeparator]; - - NSString *yearComponent; - if (dateComponents.count >= 2) { - yearComponent = dateComponents[1]; - } else { - yearComponent = date.length >= 4 ? [date substringWithRange:NSMakeRange(2, date.length - 2)] : nil; - } - - BOOL couldEndWithFourDigitYear = yearComponent && yearComponent.length >= 2 && [[yearComponent substringToIndex:2] isEqualToString:BTUICardExpiryFieldYYYYPrefix]; - if (couldEndWithFourDigitYear ? date.length > 7 : date.length > 5) { - return NO; - } - - NSString *updatedNumberText = [BTUIUtil stripNonDigits:date]; - - NSString *monthStr = [updatedNumberText substringToIndex:MIN((NSUInteger)2, updatedNumberText.length)]; - if (monthStr.length > 0) { - NSInteger month = [monthStr integerValue]; - if(month < 0 || 12 < month) { - return NO; - } - if(monthStr.length >= 2 && month == 0) { - return NO; - } - } - - return YES; -} - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.h deleted file mode 100755 index 1c156bda..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTUIFormField.h" -#import "BTUICardType.h" - -@interface BTUICardNumberField : BTUIFormField - -@property (nonatomic, strong, readonly) BTUICardType *cardType; -@property (nonatomic, strong) NSString *number; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.m deleted file mode 100755 index be0b0284..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardNumberField.m +++ /dev/null @@ -1,105 +0,0 @@ -#import "BTUICardNumberField.h" -#import "BTUIFormField_Protected.h" -#import "BTUIUtil.h" -#import "BTUICardHint.h" -#import "BTUIViewUtil.h" -#import "BTUILocalizedString.h" - -@implementation BTUICardNumberField - -@synthesize number = _number; - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setThemedPlaceholder:BTUILocalizedString(CARD_NUMBER_PLACEHOLDER)]; - self.textField.accessibilityLabel = BTUILocalizedString(CARD_NUMBER_PLACEHOLDER); - self.textField.keyboardType = UIKeyboardTypeNumberPad; - _number = @""; - - BTUICardHint *hint = [BTUICardHint new]; - [hint setCardType:BTUIPaymentOptionTypeUnknown]; - self.accessoryView = hint; - self.accessoryView.translatesAutoresizingMaskIntoConstraints = NO; - [self addSubview:self.accessoryView]; - } - return self; -} - -- (BOOL)valid { - return [self.cardType validNumber:self.number]; -} - -- (BOOL)entryComplete { - return [super entryComplete] && [self.cardType validAndNecessarilyCompleteNumber:self.number]; -} - -- (void)setNumber:(NSString *)number { - self.text = number; - _number = self.textField.text; -} - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - NSUInteger newLength = textField.text.length - range.length + string.length; - NSUInteger maxLength = self.cardType == nil ? [BTUICardType maxNumberLength] : self.cardType.maxNumberLength; - return newLength <= maxLength; -} - -- (void)fieldContentDidChange { - _number = [BTUIUtil stripNonDigits:self.textField.text]; - BTUICardType *oldCardType = _cardType; - _cardType = [BTUICardType cardTypeForNumber:_number]; - if (self.cardType != nil) { - UITextRange *r = self.textField.selectedTextRange; - NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithAttributedString:[self.cardType formatNumber:_number kerning:self.theme.formattedEntryKerning]]; - [text addAttributes:self.theme.textFieldTextAttributes range:NSMakeRange(0, text.length)]; - self.textField.attributedText = text; - self.textField.selectedTextRange = r; - } - if (self.cardType != oldCardType) { - [self updateCardHint]; - } - - self.displayAsValid = self.valid || (!self.isValidLength && self.isPotentiallyValid); - - [self updateAppearance]; - [self setNeedsDisplay]; - - [self.delegate formFieldDidChange:self]; -} - -- (void)textFieldDidBeginEditing:(UITextField *)textField { - [super textFieldDidBeginEditing:textField]; - self.displayAsValid = self.valid || (!self.isValidLength && self.isPotentiallyValid); - [self updateAppearance]; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - [super textFieldDidEndEditing:textField]; - self.displayAsValid = _number.length == 0 || (_cardType != nil && [_cardType validNumber:_number]); - [self updateAppearance]; -} - -#pragma mark - Private Helpers - -- (BOOL)isValidCardType { - return self.cardType != nil || _number.length == 0; -} - -- (BOOL)isPotentiallyValid { - return [BTUICardType possibleCardTypesForNumber:self.number].count > 0; -} - -- (BOOL)isValidLength { - return self.cardType != nil && [self.cardType completeNumber:_number]; -} - -- (void)updateCardHint { - BTUIPaymentOptionType paymentMethodType = [BTUIViewUtil paymentMethodTypeForCardType:self.cardType]; - BTUICardHint *hint =(BTUICardHint *)self.accessoryView; - [hint setCardType:paymentMethodType animated:YES]; -} - - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.h deleted file mode 100755 index 059483e1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "BTUIFormField.h" - -@interface BTUICardPhoneNumberField : BTUIFormField - -@property (nonatomic, copy) NSString *phoneNumber; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.m deleted file mode 100755 index 190cae0e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPhoneNumberField.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "BTUICardPhoneNumberField.h" -#import "BTUIFormField_Protected.h" -#import "BTUILocalizedString.h" -@import Contacts; - -@implementation BTUICardPhoneNumberField - -#define MAX_PHONE_NUMBER_DIGITS 11 - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setThemedPlaceholder:BTUILocalizedString(PHONE_NUMBER_PLACEHOLDER)]; - self.textField.accessibilityLabel = BTUILocalizedString(PHONE_NUMBER_PLACEHOLDER); - self.textField.keyboardType = UIKeyboardTypeNumberPad; - } - return self; -} - -- (BOOL)valid { - return self.textField.text.length == MAX_PHONE_NUMBER_DIGITS; -} - -- (NSString *)phoneNumber { - return self.textField.text; -} - -- (void)setPhoneNumber:(NSString *)phoneNumber { - self.textField.text = phoneNumber; -} - -- (void)fieldContentDidChange { - if ([self.delegate respondsToSelector:@selector(formFieldDidChange:)]) { - [self.delegate formFieldDidChange:self]; - } -} - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - NSUInteger oldLength = [textField.text length]; - NSUInteger replacementLength = [string length]; - NSUInteger rangeLength = range.length; - - NSUInteger newLength = oldLength - rangeLength + replacementLength; - return newLength <= MAX_PHONE_NUMBER_DIGITS; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.h deleted file mode 100755 index 6f02d9c7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "BTUIFormField.h" - -@interface BTUICardPostalCodeField : BTUIFormField - -@property (nonatomic, strong) NSString *postalCode; -@property (nonatomic, assign) BOOL nonDigitsSupported; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.m deleted file mode 100755 index e8104e92..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Form Fields/BTUICardPostalCodeField.m +++ /dev/null @@ -1,64 +0,0 @@ -#import "BTUICardPostalCodeField.h" -#import "BTUIFormField_Protected.h" -#import "BTUILocalizedString.h" -#import "BTUIUtil.h" - -@implementation BTUICardPostalCodeField - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setThemedPlaceholder:BTUILocalizedString(POSTAL_CODE_PLACEHOLDER)]; - self.textField.accessibilityLabel = BTUILocalizedString(POSTAL_CODE_PLACEHOLDER); - self.nonDigitsSupported = NO; - self.textField.autocorrectionType = UITextAutocorrectionTypeNo; - self.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; - self.textField.returnKeyType = UIReturnKeyDone; - } - return self; -} - -- (void)setPostalCode:(NSString *)postalCode { - if (!self.nonDigitsSupported) { - NSString *numericPostalCode = [BTUIUtil stripNonDigits:postalCode]; - if (![numericPostalCode isEqualToString:postalCode]) return; - } - _postalCode = postalCode; - self.text = postalCode; -} - -- (void)setNonDigitsSupported:(BOOL)nonDigitsSupported { - _nonDigitsSupported = nonDigitsSupported; - self.textField.autocorrectionType = UITextAutocorrectionTypeNo; - self.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; - self.textField.keyboardType = _nonDigitsSupported ? UIKeyboardTypeNumbersAndPunctuation : UIKeyboardTypeNumberPad; -} - -- (BOOL)entryComplete { - // Never allow auto-advancing out of postal code field since there is no way to know that the - // input value constitutes a complete postal code. - return NO; -} - -- (BOOL)valid { - return self.postalCode.length > 0; -} - -- (void)fieldContentDidChange { - _postalCode = [self.textField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - self.displayAsValid = YES; - [super fieldContentDidChange]; - [self.delegate formFieldDidChange:self]; -} - -- (void)textFieldDidBeginEditing:(UITextField *)textField { - self.displayAsValid = YES; - [super textFieldDidBeginEditing:textField]; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - self.displayAsValid = YES; - [super textFieldDidEndEditing:textField]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Forms/BTUICardFormView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Forms/BTUICardFormView.m deleted file mode 100755 index 2fe8ec52..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Forms/BTUICardFormView.m +++ /dev/null @@ -1,366 +0,0 @@ -#import "BTUICardFormView.h" -#import "BTUICardNumberField.h" -#import "BTUICardExpiryField.h" -#import "BTUICardCvvField.h" -#import "BTUICardPhoneNumberField.h" -#import "BTUICardPostalCodeField.h" -#import "BTUI.h" -#import "BTUILocalizedString.h" -#import "BTUIViewUtil.h" - -@interface BTUICardFormView () - -@property (nonatomic, strong) BTUICardNumberField *numberField; -@property (nonatomic, strong) BTUICardExpiryField *expiryField; -@property (nonatomic, strong) BTUICardCvvField *cvvField; -@property (nonatomic, strong) BTUICardPostalCodeField *postalCodeField; -@property (nonatomic, strong) BTUICardPhoneNumberField *phoneNumberField; - -@property (nonatomic, strong) NSArray *fields; -@property (nonatomic, strong) NSArray *dynamicConstraints; -@property (nonatomic, assign, readwrite) BOOL valid; -@property (nonatomic, assign) BTUIPaymentOptionType lastPaymentMethodType; - -@end - -@implementation BTUICardFormView - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setup]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setup]; - } - return self; -} - -- (CGSize)intrinsicContentSize { - CGFloat height = 0; - for (BTUIFormField *field in self.fields) { - height += field.intrinsicContentSize.height; - } - // subtract (number of field adjacencies) * (number of pixels overlap per adjacency) - height -= (self.fields.count - 1) * 1; - - return CGSizeMake(UIViewNoIntrinsicMetric, height); -} - -#pragma mark - Getters/setters - -- (void)showErrorForField:(__unused BTUICardFormField)field { - switch (field) { - case BTUICardFormFieldNumber: - self.numberField.displayAsValid = NO; - break; - case BTUICardFormFieldExpiration: - self.expiryField.displayAsValid = NO; - break; - case BTUICardFormFieldCvv: - self.cvvField.displayAsValid = NO; - break; - case BTUICardFormFieldPostalCode: - self.postalCodeField.displayAsValid = NO; - break; - case BTUICardFormFieldPhoneNumber: - self.phoneNumberField.displayAsValid = NO; - break; - } -} - -- (void)showTopLevelError:(NSString *)message { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSString *localizedOK = BTUILocalizedString(TOP_LEVEL_ERROR_ALERT_VIEW_OK_BUTTON_TEXT); - [[[UIAlertView alloc] initWithTitle:message - message:nil - delegate:nil - cancelButtonTitle:localizedOK - otherButtonTitles:nil] show]; -#pragma clang diagnostic pop -} - -- (void)setAlphaNumericPostalCode:(BOOL)alphaNumericPostalCode { - _alphaNumericPostalCode = alphaNumericPostalCode; - self.postalCodeField.nonDigitsSupported = alphaNumericPostalCode; -} - -- (void)setOptionalFields:(BTUICardFormOptionalFields)optionalFields { - _optionalFields = optionalFields; - - NSArray *defaultFields = @[self.numberField, self.expiryField]; - NSMutableArray *fields = [defaultFields mutableCopy]; - - self.cvvField.hidden = self.postalCodeField.hidden = self.phoneNumberField.hidden = YES; - if (optionalFields & BTUICardFormOptionalFieldsPostalCode) { - [fields addObject:self.postalCodeField]; - self.postalCodeField.hidden = NO; - } - if (optionalFields & BTUICardFormOptionalFieldsCvv) { - [fields addObject:self.cvvField]; - self.cvvField.hidden = NO; - } - if (optionalFields & BTUICardFormOptionalFieldsPhoneNumber) { - [fields addObject:self.phoneNumberField]; - self.phoneNumberField.hidden = NO; - } - - // Set bottom border for fields - for (NSUInteger i = 0; i < fields.count - 1; i++) { - [fields[i] setBottomBorder:YES]; - } - [[fields lastObject] setBottomBorder:NO]; - - self.fields = fields; - - [self invalidateIntrinsicContentSize]; -} - -- (void)setExpirationDate:(NSDate *)expirationDate { - static NSDateFormatter *dateFormatter; - if (!dateFormatter) { - dateFormatter = [[NSDateFormatter alloc] init]; - // The expiry field only allows digit chars to be entered - dateFormatter.dateFormat = @"MMyyyy"; - } - - NSString *expirationDateString = [dateFormatter stringFromDate:expirationDate]; - [self.expiryField setText:expirationDateString]; -} - -- (void)setExpirationMonth:(NSInteger)expirationMonth year:(NSInteger)expirationYear { - NSString *expirationMonthString = expirationMonth < 10 ? [NSString stringWithFormat:@"0%ld", (long)expirationMonth] : [NSString stringWithFormat:@"%ld", (long)expirationMonth]; - NSString *expirationYearString = expirationYear < 100 ? [NSString stringWithFormat:@"20%ld", (long)expirationYear] : [NSString stringWithFormat:@"%ld", (long)expirationYear]; - self.expiryField.text = [NSString stringWithFormat:@"%@%@", expirationMonthString, expirationYearString]; -} - -- (NSString *)phoneNumber { - return self.phoneNumberField.text.length > 0 ? self.phoneNumberField.text : nil; -} - -- (void)setup { - self.opaque = NO; - self.backgroundColor = [UIColor whiteColor]; - - self.dynamicConstraints = @[]; - - _numberField = [[BTUICardNumberField alloc] init]; - self.numberField.translatesAutoresizingMaskIntoConstraints = NO; - self.numberField.delegate = self; - [self addSubview:self.numberField]; - - _expiryField = [[BTUICardExpiryField alloc] init]; - self.expiryField.translatesAutoresizingMaskIntoConstraints = NO; - self.expiryField.delegate = self; - [self addSubview:self.expiryField]; - - _cvvField = [[BTUICardCvvField alloc] init]; - self.cvvField.translatesAutoresizingMaskIntoConstraints = NO; - self.cvvField.delegate = self; - [self addSubview:self.cvvField]; - - _postalCodeField = [[BTUICardPostalCodeField alloc] init]; - self.postalCodeField.translatesAutoresizingMaskIntoConstraints = NO; - self.postalCodeField.delegate = self; - [self addSubview:self.postalCodeField]; - [self setAlphaNumericPostalCode:YES]; - - self.phoneNumberField = [[BTUICardPhoneNumberField alloc] init]; - self.phoneNumberField.translatesAutoresizingMaskIntoConstraints = NO; - self.phoneNumberField.delegate = self; - [self addSubview:self.phoneNumberField]; - - self.vibrate = YES; - self.optionalFields = BTUICardFormOptionalFieldsAll; - - for (UIView *v in self.fields) { - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[v]|" options:0 metrics:@{} views:@{@"v": v}]]; - } - - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[v]" - options:0 - metrics:0 - views:@{@"v": self.numberField}]]; - -} - -- (void)updateConstraints { - [self removeConstraints:self.dynamicConstraints]; - - NSMutableArray *newContraints = [NSMutableArray array]; - for (NSUInteger i = 0; i < self.fields.count - 1; i++) { - BTUIFormField *fieldAbove = self.fields[i]; - BTUIFormField *fieldBelow = self.fields[i+1]; - [newContraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[v]-(-1)-[v2]" - options:0 - metrics:0 - views:@{@"v": fieldAbove, @"v2": fieldBelow }]]; - } - - self.dynamicConstraints = newContraints; - [self addConstraints:self.dynamicConstraints]; - - [super updateConstraints]; - -} - -#pragma mark - Theme - -- (void)setTheme:(BTUI *)theme { - [super setTheme:theme]; - - _numberField.theme = theme; - _expiryField.theme = theme; - _cvvField.theme = theme; - _postalCodeField.theme = theme; -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - [self.theme.borderColor setFill]; - - // Top - CGPathRef path = CGPathCreateWithRect(CGRectMake(rect.origin.x, 0, rect.size.width, 0.5f), NULL); - CGContextAddPath(context, path); - CGPathRelease(path); - - // Bottom - path = CGPathCreateWithRect(CGRectMake(rect.origin.x, CGRectGetMaxY(rect) - 0.5f, rect.size.width, 0.5f), NULL); - CGContextAddPath(context, path); - - CGContextDrawPath(context, kCGPathFill); - CGPathRelease(path); -} - -#pragma mark - Validity - -- (BOOL)valid { - _valid = YES; - for (BTUIFormField *f in self.fields) { - if (!f.valid) { - _valid = NO; - } - } - return _valid; -} - -- (void)setVibrate:(BOOL)vibrate { - _vibrate = vibrate; - for (BTUIFormField *f in self.fields) { - f.vibrateOnInvalidInput = vibrate; - } -} - -#pragma mark - Value getters - -- (NSString *)number { - return self.numberField.number; -} - -- (void)setNumber:(NSString *)number { - self.numberField.number = number; -} - -- (NSString *)expirationMonth { - return self.expiryField.expirationMonth; -} - -- (NSString *)expirationYear { - return self.expiryField.expirationYear; -} - -- (NSString *)cvv { - return self.optionalFields & BTUICardFormOptionalFieldsCvv ? self.cvvField.cvv : nil; -} - -- (void)setCvv:(NSString *)cvv { - self.cvvField.cvv = cvv; -} - -- (NSString *)postalCode { - return self.optionalFields & BTUICardFormOptionalFieldsPostalCode ? self.postalCodeField.postalCode : nil; -} - -- (void)setPostalCode:(NSString *)postalCode { - self.postalCodeField.postalCode = postalCode; -} - -#pragma mark - Field delegate implementations - -- (void)formFieldDidChange:(BTUIFormField *)field { - if (field == self.numberField) { - self.cvvField.cardType = self.numberField.cardType; - } - [self advanceToNextInvalidFieldFrom:field]; - // Trigger KVO - self.valid = self.valid; - if ([self.delegate respondsToSelector:@selector(cardFormViewDidChange:)]) { - [self.delegate cardFormViewDidChange:self]; - } -} - -- (void)formFieldDidBeginEditing:(__unused BTUIFormField *)field { - if ([self.delegate respondsToSelector:@selector(cardFormViewDidBeginEditing:)]) { - [self.delegate cardFormViewDidBeginEditing:self]; - } -} - -- (void)formFieldDidEndEditing:(__unused BTUIFormField *)field { - if ([self.delegate respondsToSelector:@selector(cardFormViewDidEndEditing:)]) { - [self.delegate cardFormViewDidEndEditing:self]; - } -} - -- (void)formFieldDidDeleteWhileEmpty:(BTUIFormField *)formField { - [self switchToPreviousField:formField]; -} - -- (BOOL)formFieldShouldReturn:(BTUIFormField *)formField { - [formField resignFirstResponder]; - return NO; -} - -#pragma mark - Auto-advancing - -- (void)advanceToNextInvalidFieldFrom:(BTUIFormField *)field { - if (field.entryComplete) { - NSUInteger fieldIndex = [self.fields indexOfObject:field]; - NSUInteger startIndex = (fieldIndex + 1) % self.fields.count; - - for (NSUInteger i = startIndex ; i != fieldIndex; i = (i + 1) % self.fields.count) { - BTUIFormField *ithField = self.fields[i]; - if (!ithField.valid) { - [ithField becomeFirstResponder]; - break; - } - } - } -} - -- (void)switchToPreviousField:(BTUIFormField *)field { - NSUInteger fieldIndex = [self.fields indexOfObject:field]; - if (fieldIndex == 0) { - return; - } - NSInteger previousIndex = (fieldIndex - 1); - if (previousIndex < 0) { - return; - } - BTUIFormField *previousField = self.fields[previousIndex]; - [previousField becomeFirstResponder]; - if (previousField.text.length > 0) { - [previousField deleteBackward]; - } -} - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICTAControl.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICTAControl.m deleted file mode 100755 index 41df4248..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICTAControl.m +++ /dev/null @@ -1,151 +0,0 @@ -#import "BTUI.h" -#import "BTUICTAControl.h" -#import "UIColor+BTUI.h" - -@interface BTUICTAControl() -@property (nonatomic, strong) UILabel *label; -@property (nonatomic, strong) UIActivityIndicatorView *activityIndicator; -@end - -@implementation BTUICTAControl - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -#pragma mark View Lifecycle - -- (void)setupView { - self.theme = [BTUI braintreeTheme]; - self.backgroundColor = self.tintColor; - - self.label = [[UILabel alloc] init]; - [self.label setTranslatesAutoresizingMaskIntoConstraints:NO]; - - self.label.textColor = [UIColor whiteColor]; - self.label.font = [UIFont systemFontOfSize:17.0f]; - self.label.textAlignment = NSTextAlignmentCenter; - - [self addSubview:self.label]; - - self.activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; - self.activityIndicator.translatesAutoresizingMaskIntoConstraints = NO; - [self addSubview:self.activityIndicator]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicator attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0.0f]]; - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicator attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:0.0f]]; - - self.isAccessibilityElement = YES; - self.accessibilityTraits = UIAccessibilityTraitButton; - - [self updateText]; -} - -- (void)showLoadingState: (__unused BOOL)loadingState{ - if (loadingState) { - self.label.hidden = YES; - [self.activityIndicator startAnimating]; - } else { - self.label.hidden = NO; - [self.activityIndicator stopAnimating]; - } -} - -- (void)updateConstraints { - [self addConstraints:@[[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.label - attribute:NSLayoutAttributeCenterX - multiplier:1.0f - constant:0.0f], - - [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterY - relatedBy:NSLayoutRelationEqual - toItem:self.label - attribute:NSLayoutAttributeCenterY - multiplier:1.0f - constant:0.0f], - - [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self.label - attribute:NSLayoutAttributeWidth - multiplier:1.0f - constant:0.0f], - - [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeHeight - relatedBy:NSLayoutRelationEqual - toItem:self.label - attribute:NSLayoutAttributeHeight - multiplier:1.0f - constant:0.0f], - ]]; - [super updateConstraints]; -} - -#pragma mark Highlight Presentation - -- (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - UIColor *newColor = highlighted ? [self.tintColor bt_adjustedBrightness:self.theme.highlightedBrightnessAdjustment] : self.tintColor; - [UIView animateWithDuration:self.theme.quickTransitionDuration animations:^{ - [self setBackgroundColor:newColor]; - }]; -} - -- (void)setEnabled:(BOOL)enabled { - [super setEnabled:enabled]; - UIColor *newColor = enabled ? self.tintColor : self.theme.disabledButtonColor; - [UIView animateWithDuration:self.theme.quickTransitionDuration animations:^{ - [self setBackgroundColor:newColor]; - }]; -} - - -#pragma mark Public Parameters - -- (void)setDisplayAmount:(NSString *)displayAmount { - _displayAmount = displayAmount; - [self updateText]; -} - -- (void)setCallToAction:(NSString *)callToAction { - _callToAction = callToAction; - [self updateText]; -} - -#pragma mark State Management - -- (void)updateText { - if (self.displayAmount) { - self.label.text = [NSString stringWithFormat:@"%@ - %@", self.displayAmount, self.callToAction]; - } else { - self.label.text = [NSString stringWithFormat:@"%@", self.callToAction]; - } - self.accessibilityLabel = self.label.text; -} - -#pragma mark - Theme - -- (void)tintColorDidChange { - self.highlighted = self.highlighted; - self.enabled = self.enabled; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICardHint.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICardHint.m deleted file mode 100755 index 1d05a6c6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICardHint.m +++ /dev/null @@ -1,185 +0,0 @@ -#import "BTUICardHint.h" - -#import "BTUI.h" - -#import "BTUICVVFrontVectorArtView.h" -#import "BTUICVVBackVectorArtView.h" - -@interface BTUICardHint () -@property (nonatomic, strong) UIView *hintVectorArtView; -@property (nonatomic, strong) NSArray *hintVectorArtViewConstraints; -@end - -@implementation BTUICardHint - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.layer.borderColor = self.theme.cardHintBorderColor.CGColor; - self.layer.borderWidth = 1.0f; - self.layer.cornerRadius = 2.0f; - - self.hintVectorArtView = [[BTUI braintreeTheme] vectorArtViewForPaymentOptionType:BTUIPaymentOptionTypeUnknown]; - [self.hintVectorArtView setTranslatesAutoresizingMaskIntoConstraints:NO]; - [self addSubview:self.hintVectorArtView]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:87.0f/55.0f - constant:0.0f]]; - - [self setNeedsLayout]; -} - -- (void)updateConstraints { - if (self.hintVectorArtViewConstraints) { - [self removeConstraints:self.hintVectorArtViewConstraints]; - } - - self.hintVectorArtViewConstraints = @[[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self.hintVectorArtView - attribute:NSLayoutAttributeWidth - multiplier:1.0f - constant:1.0f], - - [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.hintVectorArtView - attribute:NSLayoutAttributeCenterX - multiplier:1.0f - constant:0.0f], - - [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterY - relatedBy:NSLayoutRelationEqual - toItem:self.hintVectorArtView - attribute:NSLayoutAttributeCenterY - multiplier:1.0f - constant:0.0f] ]; - - [self addConstraints:self.hintVectorArtViewConstraints]; - - [super updateConstraints]; -} - -- (void)updateViews { - UIView *cardVectorArtView; - switch (self.displayMode) { - case BTCardHintDisplayModeCardType: - cardVectorArtView = [[BTUI braintreeTheme] vectorArtViewForPaymentOptionType:self.cardType]; - break; - case BTCardHintDisplayModeCVVHint: - if (self.cardType == BTUIPaymentOptionTypeAMEX) { - cardVectorArtView = [BTUICVVFrontVectorArtView new]; - } else { - cardVectorArtView = [BTUICVVBackVectorArtView new]; - } - break; - } - - [self.hintVectorArtView removeFromSuperview]; - self.hintVectorArtView = cardVectorArtView; - [self.hintVectorArtView setTranslatesAutoresizingMaskIntoConstraints:NO]; - [self addSubview:self.hintVectorArtView]; - [self setHighlighted:self.highlighted]; - - [self setNeedsUpdateConstraints]; - [self setNeedsLayout]; -} - -- (void)setCardType:(BTUIPaymentOptionType)cardType { - _cardType = cardType; - [self updateViews]; -} - -- (void)setCardType:(BTUIPaymentOptionType)cardType animated:(BOOL)animated { - if (cardType == self.cardType) { - return; - } - if (animated) { - [UIView transitionWithView:self - duration:0.2f - options:UIViewAnimationOptionTransitionCrossDissolve - animations:^{ - [self setCardType:cardType]; - } completion:nil]; - } else { - [self setCardType:cardType]; - } -} - -- (void)setDisplayMode:(BTCardHintDisplayMode)displayMode { - _displayMode = displayMode; - [self updateViews]; -} - -- (void)setDisplayMode:(BTCardHintDisplayMode)displayMode animated:(BOOL)animated { - if (animated) { - [UIView transitionWithView:self - duration:0.2f - options:UIViewAnimationOptionTransitionFlipFromLeft - animations:^{ - [self setDisplayMode:displayMode]; - } completion:nil]; - } else { - [self updateViews]; - } -} - -#pragma mark - Highlighting - -- (void)setHighlighted:(BOOL)highlighted { - [self setHighlighted:highlighted animated:NO]; -} - -- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { - _highlighted = highlighted; - UIColor *c = highlighted ? self.tintColor : nil; - [self setHighlightColor:c animated:animated]; -} - -- (void)setHighlightColor:(UIColor *)color animated:(BOOL)animated { - if (![self.hintVectorArtView respondsToSelector:@selector(setHighlightColor:)]) { - return; - } - if (animated) { - [UIView transitionWithView:self.hintVectorArtView - duration:self.theme.quickTransitionDuration - options:UIViewAnimationOptionTransitionCrossDissolve - animations:^{ - [self.hintVectorArtView performSelector:@selector(setHighlightColor:) withObject:color]; - [self.hintVectorArtView setNeedsDisplay]; - } - completion:nil - ]; - } else { - [self.hintVectorArtView performSelector:@selector(setHighlightColor:) withObject:color]; - [self.hintVectorArtView setNeedsDisplay]; - } -} - -- (void)tintColorDidChange { - [self setHighlighted:self.highlighted animated:YES]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICoinbaseButton.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICoinbaseButton.m deleted file mode 100755 index d27a9381..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUICoinbaseButton.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "BTUICoinbaseButton.h" - -#import "BTUI.h" -#import "UIColor+BTUI.h" - -#import "BTUICoinbaseWordmarkVectorArtView.h" -#import "BTUILocalizedString.h" - -@interface BTUICoinbaseButton () -@property (nonatomic, strong) BTUICoinbaseWordmarkVectorArtView *coinbaseWordmark; -@end - -@implementation BTUICoinbaseButton - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.theme = [BTUI braintreeTheme]; - self.userInteractionEnabled = YES; - self.clipsToBounds = YES; - self.opaque = NO; - self.backgroundColor = [UIColor whiteColor]; - self.accessibilityLabel = [BTUILocalizedString PAYMENT_METHOD_TYPE_COINBASE]; - - self.coinbaseWordmark = [[BTUICoinbaseWordmarkVectorArtView alloc] init]; - self.coinbaseWordmark.userInteractionEnabled = NO; - self.coinbaseWordmark.translatesAutoresizingMaskIntoConstraints = NO; - self.coinbaseWordmark.color = [self.theme coinbasePrimaryBlue]; - - [self addSubview:self.coinbaseWordmark]; -} - -- (void)updateConstraints { - NSDictionary *metrics = @{ @"minHeight": @([self.theme paymentButtonMinHeight]), - @"maxHeight": @([self.theme paymentButtonMaxHeight]), - @"minWidth": @(200), - @"required": @(UILayoutPriorityRequired), - @"high": @(UILayoutPriorityDefaultHigh), - @"breathingRoom": @(10) }; - NSDictionary *views = @{ @"self": self , - @"coinbaseWordmark": self.coinbaseWordmark }; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[coinbaseWordmark]|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.coinbaseWordmark - attribute:NSLayoutAttributeCenterX - multiplier:1.0f - constant:0.0f]]; - - [super updateConstraints]; -} - -- (void)setHighlighted:(BOOL)highlighted { - [UIView animateWithDuration:0.08f - delay:0.0f - options:UIViewAnimationOptionBeginFromCurrentState animations:^{ - if (highlighted) { - self.backgroundColor = [UIColor colorWithWhite:0.92f alpha:1.0f]; - } else { - self.backgroundColor = [UIColor whiteColor]; - } - } - completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalButton.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalButton.m deleted file mode 100755 index f7342242..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalButton.m +++ /dev/null @@ -1,84 +0,0 @@ -#import "BTUI.h" -#import "BTUIPayPalButton.h" -#import "BTUIPayPalWordmarkVectorArtView.h" - -@implementation BTUIPayPalButton - -#define PAYPAL_BUTTON_COLOR [UIColor colorWithRed:0 green:156/255.0 blue:222/255.0 alpha:1] -#define PAYPAL_BUTTON_HIGHLIGHTED [UIColor colorWithRed:0 green:138/255.0 blue:197/255.0 alpha:1] - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.theme = [BTUI braintreeTheme]; - self.userInteractionEnabled = YES; - self.clipsToBounds = YES; - self.opaque = NO; - self.backgroundColor = PAYPAL_BUTTON_COLOR; - - self.payPalWordmark = [[BTUIPayPalWordmarkVectorArtView alloc] initWithPadding]; - self.payPalWordmark.userInteractionEnabled = NO; - self.payPalWordmark.translatesAutoresizingMaskIntoConstraints = NO; - - [self addSubview:self.payPalWordmark]; -} - -- (void)updateConstraints { - NSDictionary *metrics = @{ @"minHeight": @([self.theme paymentButtonMinHeight]), - @"maxHeight": @([self.theme paymentButtonMaxHeight]), - @"minWidth": @(200), - @"required": @(UILayoutPriorityRequired), - @"high": @(UILayoutPriorityDefaultHigh), - @"breathingRoom": @(10) }; - NSDictionary *views = @{ @"self": self , - @"payPalWordmark": self.payPalWordmark }; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[payPalWordmark]|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.payPalWordmark - attribute:NSLayoutAttributeCenterX - multiplier:1.0f - constant:0.0f]]; - - [super updateConstraints]; -} - -- (CGSize)intrinsicContentSize { - return CGSizeMake(UIViewNoIntrinsicMetric, 44); -} - -- (void)setHighlighted:(BOOL)highlighted { - [UIView animateWithDuration:0.08f - delay:0.0f - options:UIViewAnimationOptionBeginFromCurrentState animations:^{ - if (highlighted) { - self.backgroundColor = PAYPAL_BUTTON_HIGHLIGHTED; - } else { - self.backgroundColor = PAYPAL_BUTTON_COLOR; - } - } - completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.h deleted file mode 100755 index 0b15fd4b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUIPayPalButton.h" - -@interface BTUIPayPalCompactButton : BTUIPayPalButton - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.m deleted file mode 100755 index aadee033..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPayPalCompactButton.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "BTUIPayPalCompactButton.h" -#import "BTUIPayPalWordmarkCompactVectorArtView.h" - -@interface BTUIPayPalCompactButton () -@end - -@implementation BTUIPayPalCompactButton - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.backgroundColor = [UIColor whiteColor]; - - self.payPalWordmark = [[BTUIPayPalWordmarkCompactVectorArtView alloc] initWithPadding]; - self.payPalWordmark.userInteractionEnabled = NO; - self.payPalWordmark.translatesAutoresizingMaskIntoConstraints = NO; - - [self addSubview:self.payPalWordmark]; -} - -- (void)setHighlighted:(BOOL)highlighted { - [UIView animateWithDuration:0.08f - delay:0.0f - options:UIViewAnimationOptionBeginFromCurrentState animations:^{ - if (highlighted) { - self.backgroundColor = [UIColor colorWithWhite:0.92f alpha:1.0f]; - } else { - self.backgroundColor = [UIColor whiteColor]; - } - } - completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPaymentMethodView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPaymentMethodView.m deleted file mode 100755 index 75181866..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIPaymentMethodView.m +++ /dev/null @@ -1,229 +0,0 @@ -#import "BTUI.h" -#import "BTUICardType.h" -#import "BTUIPaymentMethodView.h" -#import "BTUIUnknownCardVectorArtView.h" -#import "BTUIViewUtil.h" - -typedef NS_ENUM(NSInteger, BTPaymentMethodViewState) { - BTPaymentMethodViewStateNormal, - BTPaymentMethodViewStateProcessing, -}; - -@interface BTUIPaymentMethodView () - -@property (nonatomic, assign) BTPaymentMethodViewState contentState; - -@property (nonatomic, strong) UIView *iconView; -@property (nonatomic, strong) UILabel *typeLabel; -@property (nonatomic, strong) UILabel *detailDescriptionLabel; -@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView; - -@property (nonatomic, strong) UIView *topBorder; -@property (nonatomic, strong) UIView *bottomBorder; - -@property (nonatomic, strong) NSArray *centeredLogoConstraints; -@property (nonatomic, strong) NSArray *logoEmailConstraints; - -@end - -@implementation BTUIPaymentMethodView - -- (instancetype)init { - self = [self initWithFrame:CGRectZero]; - return self; -} - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupViews]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupViews]; - } - return self; -} - -+ (BOOL)requiresConstraintBasedLayout { - return YES; -} - -- (void)setupViews { - - self.clipsToBounds = YES; - - self.iconView = [BTUIUnknownCardVectorArtView new]; - [self.iconView setTranslatesAutoresizingMaskIntoConstraints:NO]; - - self.typeLabel = [[UILabel alloc] init]; - [self.typeLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; - self.typeLabel.font = [self.theme controlTitleFont]; - [self.typeLabel setTextColor:[self.theme titleColor]]; - [self.typeLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - [self.typeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.detailDescriptionLabel = [[UILabel alloc] init]; - [self.detailDescriptionLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; - self.detailDescriptionLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; - self.detailDescriptionLabel.font = [self.theme controlDetailFont]; - [self.detailDescriptionLabel setTextColor:[self.theme detailColor]]; - - // Activity Indicators - self.activityIndicatorView = [[UIActivityIndicatorView alloc] init]; - self.activityIndicatorView.hidden = YES; - [self.activityIndicatorView setTranslatesAutoresizingMaskIntoConstraints:NO]; - - self.topBorder = [[UIView alloc] init]; - self.topBorder.backgroundColor = [self.theme borderColor]; - self.topBorder.translatesAutoresizingMaskIntoConstraints = NO; - - self.bottomBorder = [[UIView alloc] init]; - self.bottomBorder.backgroundColor = [self.theme borderColor]; - self.bottomBorder.translatesAutoresizingMaskIntoConstraints = NO; - - [self addSubview:self.iconView]; - [self addSubview:self.typeLabel]; - [self addSubview:self.detailDescriptionLabel]; - [self addSubview:self.activityIndicatorView]; - [self addSubview:self.topBorder]; - [self addSubview:self.bottomBorder]; - - // Setup initial state - self.contentState = BTPaymentMethodViewStateNormal; - - // Setup views based on initial state - [self updateSubviews]; -} - -- (void)updateConstraints { - [self removeConstraints:self.constraints]; - - NSDictionary *views = @{ @"topBorder": self.topBorder, - @"bottomBorder": self.bottomBorder, - @"methodTypeView": self.typeLabel, - @"emailView": self.detailDescriptionLabel, - @"activityIndicatorView": self.activityIndicatorView, - @"iconView": self.iconView }; - NSDictionary *metrics = @{ @"logoWidth": @30, - @"pad": @12, - @"sp": @5, - @"activityIndicatorViewSize": @60, - @"iconViewHeight": @21, - @"borderWidth": @(self.theme.borderWidth * 1) }; - - NSLayoutConstraint *constraint; - - // Minimum height - constraint = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0f constant:40.0f]; - constraint.priority = UILayoutPriorityRequired; - [self addConstraint:constraint]; - - // Maximum height - constraint = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationLessThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0f constant:60.0f]; - constraint.priority = UILayoutPriorityRequired; - [self addConstraint:constraint]; - - // Minimum width - constraint = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0f constant:260.0f]; - constraint.priority = UILayoutPriorityRequired; - [self addConstraint:constraint]; - - // Centered activity indicator - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicatorView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:0.0f]]; - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicatorView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0.0f]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[activityIndicatorView(==activityIndicatorViewSize)]" options:0 metrics:metrics views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[activityIndicatorView(==activityIndicatorViewSize)]" options:0 metrics:metrics views:views]]; - - // Full Width Borders - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[topBorder]|" options:0 metrics:metrics views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[topBorder(==borderWidth)]" options:0 metrics:metrics views:views]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[bottomBorder]|" options:0 metrics:metrics views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[bottomBorder(==borderWidth)]|" options:0 metrics:metrics views:views]]; - - // Icon & type - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[iconView(==iconViewHeight)]" - options:0 - metrics:metrics - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(pad)-[iconView]-sp-[methodTypeView]" - options:NSLayoutFormatAlignAllCenterY - metrics:metrics - views:views]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[methodTypeView]-sp-[emailView]" - options:NSLayoutFormatAlignAllBaseline - metrics:metrics - views:views]]; - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[emailView]-(pad)-|" - options:NSLayoutFormatAlignAllBaseline - metrics:metrics - views:views]]; - [self addConstraint:[NSLayoutConstraint constraintWithItem:self.iconView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1 constant:0.0f]]; - - [super updateConstraints]; -} - -- (void)updateSubviews { - switch (self.contentState) { - case BTPaymentMethodViewStateNormal: - self.typeLabel.text = [BTUIViewUtil nameForPaymentMethodType:self.type]; - self.detailDescriptionLabel.text = self.detailDescription; - [self.iconView removeFromSuperview]; - self.iconView = [self.theme vectorArtViewForPaymentOptionType:self.type]; - [self.iconView setTranslatesAutoresizingMaskIntoConstraints:NO]; - [self addSubview:self.iconView]; - - self.backgroundColor = [UIColor whiteColor]; - self.layer.borderColor = [self.theme borderColor].CGColor; - self.iconView.alpha = 1.0f; - self.typeLabel.alpha = 1.0f; - self.detailDescriptionLabel.alpha = 1.0f; - self.activityIndicatorView.alpha = 0.0f; - [self.activityIndicatorView stopAnimating]; - break; - case BTPaymentMethodViewStateProcessing: - self.backgroundColor = [UIColor whiteColor]; - self.layer.borderColor = [self.theme borderColor].CGColor; - self.iconView.alpha = 0.0f; - self.typeLabel.alpha = 0.0f; - self.detailDescriptionLabel.alpha = 0.0f; - self.activityIndicatorView.alpha = 1.0f; - [self.activityIndicatorView startAnimating]; - break; - default: - break; - } - - [self setNeedsUpdateConstraints]; - [self setNeedsLayout]; -} - -#pragma mark - - -- (void)setDetailDescription:(NSString *)paymentMethodDescription { - _detailDescription = paymentMethodDescription; - [self updateSubviews]; -} - -- (void)setType:(BTUIPaymentOptionType)type { - _type = type; - [self updateSubviews]; -} - -- (void)setProcessing:(BOOL)processing { - _processing = processing; - - self.contentState = processing ? BTPaymentMethodViewStateProcessing : BTPaymentMethodViewStateNormal; - [UIView animateWithDuration:0.3f animations:^{ - [self updateSubviews]; - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUISummaryView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUISummaryView.m deleted file mode 100755 index f6a42cba..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUISummaryView.m +++ /dev/null @@ -1,130 +0,0 @@ -#import "BTUISummaryView.h" -#import "BTUI.h" - -@interface BTUISummaryView () -@property (nonatomic, strong) UILabel *slugLabel; -@property (nonatomic, strong) UILabel *summaryLabel; -@property (nonatomic, strong) UILabel *amountLabel; -@end - -@implementation BTUISummaryView - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.backgroundColor = [UIColor whiteColor]; - - // Create subviews - self.slugLabel = [[UILabel alloc] init]; - self.slugLabel.lineBreakMode = NSLineBreakByWordWrapping; - self.slugLabel.numberOfLines = 0; - - self.summaryLabel = [[UILabel alloc] init]; - self.summaryLabel.lineBreakMode = NSLineBreakByWordWrapping; - self.summaryLabel.numberOfLines = 0; - - self.amountLabel = [[UILabel alloc] init]; - [self.amountLabel setContentCompressionResistancePriority:1000 forAxis:UILayoutConstraintAxisHorizontal]; - [self.amountLabel setContentHuggingPriority:1000 forAxis:UILayoutConstraintAxisHorizontal]; - - [self setTheme:self.theme]; - - // Configure subviews - [self.slugLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; - [self.summaryLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; - [self.amountLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; - - // Add subviews - [self addSubview:self.slugLabel]; - [self addSubview:self.summaryLabel]; - [self addSubview:self.amountLabel]; - - // Set content - [self updateText]; -} - -- (void)setTheme:(BTUI *)theme { - [super setTheme:theme]; - self.slugLabel.font = self.theme.controlTitleFont; - self.summaryLabel.font = self.theme.controlFont; - self.amountLabel.font = self.theme.controlTitleFont; -} - -- (void)updateConstraints { - NSDictionary *views = @{@"view": self, - @"slugLabel": self.slugLabel, - @"summaryLabel": self.summaryLabel, - @"amountLabel": self.amountLabel }; - NSDictionary *metrics = @{@"height": @65.0f, - @"topPadding": @10.0f, - @"middlePadding": @2, - @"horizontalMargin": @(self.theme.horizontalMargin)}; - - // View Constraints - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[view(>=height)]" - options:0 - metrics:metrics - views:views]]; - - // Slug and Amount Label Constraints - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(horizontalMargin)-[slugLabel]-[amountLabel]-(horizontalMargin)-|" - options:0 - metrics:metrics - views:views]]; - - // Summary Label Constraints - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(horizontalMargin)-[summaryLabel]-(horizontalMargin)-|" - options:0 - metrics:metrics - views:views]]; - - // Vertical Constraints - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(topPadding)-[slugLabel]-(middlePadding)-[summaryLabel]-(topPadding)-|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(topPadding)-[amountLabel]" - options:0 - metrics:metrics - views:views]]; - - [super updateConstraints]; -} - -- (void)setSlug:(NSString *)slug { - _slug = slug; - [self updateText]; -} - -- (void)setSummary:(NSString *)summary { - _summary = summary; - [self updateText]; -} - -- (void)setAmount:(NSString *)amount { - _amount = amount; - [self updateText]; -} - -- (void)updateText { - self.slugLabel.text = self.slug; - self.summaryLabel.text = self.summary; - self.amountLabel.text = self.amount; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIVenmoButton.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIVenmoButton.m deleted file mode 100755 index bf45c29f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Payments Components/BTUIVenmoButton.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "BTUIVenmoWordmarkVectorArtView.h" -#import "BTUI.h" -#import "BTUIVenmoButton.h" -#import "UIColor+BTUI.h" - -@interface BTUIVenmoButton () -@property (nonatomic, strong) BTUIVenmoWordmarkVectorArtView *venmoWordmark; -@end - -@implementation BTUIVenmoButton - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self setupView]; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - [self setupView]; - } - return self; -} - -- (void)setupView { - self.theme = [BTUI braintreeTheme]; - self.userInteractionEnabled = YES; - self.clipsToBounds = YES; - self.opaque = NO; - self.backgroundColor = [UIColor whiteColor]; - - self.venmoWordmark = [[BTUIVenmoWordmarkVectorArtView alloc] init]; - self.venmoWordmark.userInteractionEnabled = NO; - self.venmoWordmark.translatesAutoresizingMaskIntoConstraints = NO; - self.venmoWordmark.color = [self.theme venmoPrimaryBlue]; - - [self addSubview:self.venmoWordmark]; -} - -- (void)updateConstraints { - NSDictionary *metrics = @{ @"minHeight": @([self.theme paymentButtonMinHeight]), - @"maxHeight": @([self.theme paymentButtonMaxHeight]), - @"minWidth": @(200), - @"required": @(UILayoutPriorityRequired), - @"high": @(UILayoutPriorityDefaultHigh), - @"breathingRoom": @(10) }; - NSDictionary *views = @{ @"self": self , - @"venmoWordmark": self.venmoWordmark }; - - [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[venmoWordmark]|" - options:0 - metrics:metrics - views:views]]; - - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.venmoWordmark - attribute:NSLayoutAttributeCenterX - multiplier:1.0f - constant:0.0f]]; - - [super updateConstraints]; -} - -- (void)setHighlighted:(BOOL)highlighted { - [UIView animateWithDuration:0.08f - delay:0.0f - options:UIViewAnimationOptionBeginFromCurrentState animations:^{ - if (highlighted) { - self.backgroundColor = [UIColor colorWithWhite:0.92f alpha:1.0f]; - } else { - self.backgroundColor = [UIColor whiteColor]; - } - } - completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.h deleted file mode 100755 index 14cc7c48..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIAmExVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.m deleted file mode 100755 index 1e8976d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIAmExVectorArtView.m +++ /dev/null @@ -1,343 +0,0 @@ -#import "BTUIAmExVectorArtView.h" - -@implementation BTUIAmExVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.059 green: 0.469 blue: 0.655 alpha: 1]; - - //// Page-1 - { - //// AmEx - { - //// amex - { - //// _x34__x5F_COL_x5F_SQ - { - //// Express - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(54.98, 38.33)]; - [bezierPath addLineToPoint: CGPointMake(54.98, 36.35)]; - [bezierPath addCurveToPoint: CGPointMake(53.19, 34.8) controlPoint1: CGPointMake(54.98, 36.35) controlPoint2: CGPointMake(54.87, 34.8)]; - [bezierPath addLineToPoint: CGPointMake(50.58, 34.8)]; - [bezierPath addLineToPoint: CGPointMake(50.58, 38.33)]; - [bezierPath addLineToPoint: CGPointMake(47.9, 38.33)]; - [bezierPath addLineToPoint: CGPointMake(47.9, 28.14)]; - [bezierPath addLineToPoint: CGPointMake(54.4, 28.14)]; - [bezierPath addCurveToPoint: CGPointMake(57.8, 31.12) controlPoint1: CGPointMake(54.4, 28.14) controlPoint2: CGPointMake(57.8, 27.74)]; - [bezierPath addCurveToPoint: CGPointMake(56.3, 33.5) controlPoint1: CGPointMake(57.8, 32.88) controlPoint2: CGPointMake(56.3, 33.5)]; - [bezierPath addCurveToPoint: CGPointMake(57.58, 35.81) controlPoint1: CGPointMake(56.3, 33.5) controlPoint2: CGPointMake(57.58, 34.09)]; - [bezierPath addLineToPoint: CGPointMake(57.58, 38.33)]; - [bezierPath addLineToPoint: CGPointMake(54.98, 38.33)]; - [bezierPath moveToPoint: CGPointMake(50.58, 32.4)]; - [bezierPath addLineToPoint: CGPointMake(53.35, 32.4)]; - [bezierPath addCurveToPoint: CGPointMake(54.82, 31.43) controlPoint1: CGPointMake(54.15, 32.4) controlPoint2: CGPointMake(54.82, 31.97)]; - [bezierPath addCurveToPoint: CGPointMake(53.35, 30.47) controlPoint1: CGPointMake(54.82, 30.9) controlPoint2: CGPointMake(54.15, 30.47)]; - [bezierPath addLineToPoint: CGPointMake(50.58, 30.47)]; - [bezierPath addLineToPoint: CGPointMake(50.58, 32.4)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(37.11, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(34.77, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(31.93, 35.33)]; - [bezier2Path addLineToPoint: CGPointMake(29.08, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(27.45, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(19.11, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(19.11, 28.13)]; - [bezier2Path addLineToPoint: CGPointMake(27.45, 28.13)]; - [bezier2Path addLineToPoint: CGPointMake(28.86, 28.13)]; - [bezier2Path addLineToPoint: CGPointMake(31.93, 31.38)]; - [bezier2Path addLineToPoint: CGPointMake(35.02, 28.15)]; - [bezier2Path addLineToPoint: CGPointMake(37.08, 28.15)]; - [bezier2Path addLineToPoint: CGPointMake(37.08, 28.13)]; - [bezier2Path addLineToPoint: CGPointMake(43.58, 28.13)]; - [bezier2Path addCurveToPoint: CGPointMake(46.97, 31.13) controlPoint1: CGPointMake(43.58, 28.13) controlPoint2: CGPointMake(46.97, 27.77)]; - [bezier2Path addCurveToPoint: CGPointMake(42.38, 35.07) controlPoint1: CGPointMake(46.97, 34.14) controlPoint2: CGPointMake(45.85, 35.07)]; - [bezier2Path addLineToPoint: CGPointMake(39.76, 35.07)]; - [bezier2Path addLineToPoint: CGPointMake(39.76, 38.35)]; - [bezier2Path addLineToPoint: CGPointMake(37.11, 38.35)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(33.76, 33.33)]; - [bezier2Path addLineToPoint: CGPointMake(37.08, 36.88)]; - [bezier2Path addLineToPoint: CGPointMake(37.08, 29.79)]; - [bezier2Path addLineToPoint: CGPointMake(33.76, 33.33)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(21.81, 36.14)]; - [bezier2Path addLineToPoint: CGPointMake(27.45, 36.14)]; - [bezier2Path addLineToPoint: CGPointMake(30.1, 33.33)]; - [bezier2Path addLineToPoint: CGPointMake(27.45, 30.53)]; - [bezier2Path addLineToPoint: CGPointMake(21.81, 30.53)]; - [bezier2Path addLineToPoint: CGPointMake(21.81, 32.1)]; - [bezier2Path addLineToPoint: CGPointMake(27.31, 32.1)]; - [bezier2Path addLineToPoint: CGPointMake(27.31, 34.41)]; - [bezier2Path addLineToPoint: CGPointMake(21.81, 34.41)]; - [bezier2Path addLineToPoint: CGPointMake(21.81, 36.14)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(39.76, 32.41)]; - [bezier2Path addLineToPoint: CGPointMake(42.53, 32.41)]; - [bezier2Path addCurveToPoint: CGPointMake(43.99, 31.45) controlPoint1: CGPointMake(43.33, 32.41) controlPoint2: CGPointMake(43.99, 31.98)]; - [bezier2Path addCurveToPoint: CGPointMake(42.53, 30.48) controlPoint1: CGPointMake(43.99, 30.91) controlPoint2: CGPointMake(43.33, 30.48)]; - [bezier2Path addLineToPoint: CGPointMake(39.76, 30.48)]; - [bezier2Path addLineToPoint: CGPointMake(39.76, 32.41)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(73.25, 38.3)]; - [bezier3Path addLineToPoint: CGPointMake(68.48, 38.3)]; - [bezier3Path addLineToPoint: CGPointMake(68.48, 35.96)]; - [bezier3Path addLineToPoint: CGPointMake(72.66, 35.96)]; - [bezier3Path addCurveToPoint: CGPointMake(74.16, 35.15) controlPoint1: CGPointMake(72.66, 35.96) controlPoint2: CGPointMake(74.16, 36.13)]; - [bezier3Path addCurveToPoint: CGPointMake(71.89, 34.3) controlPoint1: CGPointMake(74.16, 34.23) controlPoint2: CGPointMake(71.89, 34.3)]; - [bezier3Path addCurveToPoint: CGPointMake(68.19, 31.26) controlPoint1: CGPointMake(71.89, 34.3) controlPoint2: CGPointMake(68.19, 34.61)]; - [bezier3Path addCurveToPoint: CGPointMake(71.53, 28.12) controlPoint1: CGPointMake(68.19, 27.93) controlPoint2: CGPointMake(71.53, 28.12)]; - [bezier3Path addLineToPoint: CGPointMake(76.68, 28.12)]; - [bezier3Path addLineToPoint: CGPointMake(76.68, 30.5)]; - [bezier3Path addLineToPoint: CGPointMake(72.54, 30.5)]; - [bezier3Path addCurveToPoint: CGPointMake(71.11, 31.23) controlPoint1: CGPointMake(72.54, 30.5) controlPoint2: CGPointMake(71.11, 30.23)]; - [bezier3Path addCurveToPoint: CGPointMake(73.05, 31.95) controlPoint1: CGPointMake(71.11, 32.07) controlPoint2: CGPointMake(73.05, 31.95)]; - [bezier3Path addCurveToPoint: CGPointMake(77.14, 34.73) controlPoint1: CGPointMake(73.05, 31.95) controlPoint2: CGPointMake(77.14, 31.66)]; - [bezier3Path addCurveToPoint: CGPointMake(73.57, 38.32) controlPoint1: CGPointMake(77.14, 38.03) controlPoint2: CGPointMake(74.51, 38.32)]; - [bezier3Path addCurveToPoint: CGPointMake(73.25, 38.3) controlPoint1: CGPointMake(73.37, 38.32) controlPoint2: CGPointMake(73.25, 38.3)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(58.91, 38.3)]; - [bezier4Path addLineToPoint: CGPointMake(58.91, 28.12)]; - [bezier4Path addLineToPoint: CGPointMake(67.26, 28.12)]; - [bezier4Path addLineToPoint: CGPointMake(67.26, 30.49)]; - [bezier4Path addLineToPoint: CGPointMake(61.6, 30.49)]; - [bezier4Path addLineToPoint: CGPointMake(61.6, 32.06)]; - [bezier4Path addLineToPoint: CGPointMake(67.12, 32.06)]; - [bezier4Path addLineToPoint: CGPointMake(67.12, 34.37)]; - [bezier4Path addLineToPoint: CGPointMake(61.6, 34.37)]; - [bezier4Path addLineToPoint: CGPointMake(61.6, 36.1)]; - [bezier4Path addLineToPoint: CGPointMake(67.26, 36.1)]; - [bezier4Path addLineToPoint: CGPointMake(67.26, 38.3)]; - [bezier4Path addLineToPoint: CGPointMake(58.91, 38.3)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(82.7, 38.3)]; - [bezier5Path addLineToPoint: CGPointMake(77.93, 38.3)]; - [bezier5Path addLineToPoint: CGPointMake(77.93, 35.96)]; - [bezier5Path addLineToPoint: CGPointMake(82.09, 35.96)]; - [bezier5Path addCurveToPoint: CGPointMake(83.61, 35.15) controlPoint1: CGPointMake(82.09, 35.96) controlPoint2: CGPointMake(83.61, 36.13)]; - [bezier5Path addCurveToPoint: CGPointMake(81.34, 34.3) controlPoint1: CGPointMake(83.61, 34.23) controlPoint2: CGPointMake(81.34, 34.3)]; - [bezier5Path addCurveToPoint: CGPointMake(77.64, 31.26) controlPoint1: CGPointMake(81.34, 34.3) controlPoint2: CGPointMake(77.64, 34.61)]; - [bezier5Path addCurveToPoint: CGPointMake(80.98, 28.12) controlPoint1: CGPointMake(77.64, 27.93) controlPoint2: CGPointMake(80.98, 28.12)]; - [bezier5Path addLineToPoint: CGPointMake(86.11, 28.12)]; - [bezier5Path addLineToPoint: CGPointMake(86.11, 30.5)]; - [bezier5Path addLineToPoint: CGPointMake(81.98, 30.5)]; - [bezier5Path addCurveToPoint: CGPointMake(80.56, 31.23) controlPoint1: CGPointMake(81.98, 30.5) controlPoint2: CGPointMake(80.56, 30.23)]; - [bezier5Path addCurveToPoint: CGPointMake(82.5, 31.95) controlPoint1: CGPointMake(80.56, 32.07) controlPoint2: CGPointMake(82.5, 31.95)]; - [bezier5Path addCurveToPoint: CGPointMake(86.59, 34.73) controlPoint1: CGPointMake(82.5, 31.95) controlPoint2: CGPointMake(86.59, 31.66)]; - [bezier5Path addCurveToPoint: CGPointMake(83.02, 38.32) controlPoint1: CGPointMake(86.59, 38.03) controlPoint2: CGPointMake(83.96, 38.32)]; - [bezier5Path addCurveToPoint: CGPointMake(82.7, 38.3) controlPoint1: CGPointMake(82.82, 38.32) controlPoint2: CGPointMake(82.7, 38.3)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - } - - - //// American - { - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(45.31, 27.39)]; - [bezier6Path addLineToPoint: CGPointMake(45.31, 25.41)]; - [bezier6Path addCurveToPoint: CGPointMake(43.53, 23.85) controlPoint1: CGPointMake(45.31, 25.41) controlPoint2: CGPointMake(45.2, 23.85)]; - [bezier6Path addLineToPoint: CGPointMake(40.92, 23.85)]; - [bezier6Path addLineToPoint: CGPointMake(40.92, 27.39)]; - [bezier6Path addLineToPoint: CGPointMake(38.24, 27.39)]; - [bezier6Path addLineToPoint: CGPointMake(38.24, 17.19)]; - [bezier6Path addLineToPoint: CGPointMake(44.74, 17.19)]; - [bezier6Path addCurveToPoint: CGPointMake(48.14, 20.18) controlPoint1: CGPointMake(44.74, 17.19) controlPoint2: CGPointMake(48.14, 16.8)]; - [bezier6Path addCurveToPoint: CGPointMake(46.63, 22.56) controlPoint1: CGPointMake(48.14, 21.94) controlPoint2: CGPointMake(46.63, 22.56)]; - [bezier6Path addCurveToPoint: CGPointMake(47.94, 24.87) controlPoint1: CGPointMake(46.63, 22.56) controlPoint2: CGPointMake(47.94, 23.15)]; - [bezier6Path addLineToPoint: CGPointMake(47.94, 27.39)]; - [bezier6Path addLineToPoint: CGPointMake(45.31, 27.39)]; - [bezier6Path moveToPoint: CGPointMake(40.92, 21.45)]; - [bezier6Path addLineToPoint: CGPointMake(43.69, 21.45)]; - [bezier6Path addCurveToPoint: CGPointMake(45.15, 20.49) controlPoint1: CGPointMake(44.49, 21.45) controlPoint2: CGPointMake(45.15, 21.02)]; - [bezier6Path addCurveToPoint: CGPointMake(43.69, 19.52) controlPoint1: CGPointMake(45.15, 19.95) controlPoint2: CGPointMake(44.49, 19.52)]; - [bezier6Path addLineToPoint: CGPointMake(40.92, 19.52)]; - [bezier6Path addLineToPoint: CGPointMake(40.92, 21.45)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(76.93, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(72.68, 20.57)]; - [bezier7Path addLineToPoint: CGPointMake(72.68, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(70.37, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(69.94, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(67.43, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(66.48, 25.25)]; - [bezier7Path addLineToPoint: CGPointMake(61.58, 25.25)]; - [bezier7Path addLineToPoint: CGPointMake(60.65, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(58.19, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(57.74, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(56.45, 27.39)]; - [bezier7Path addCurveToPoint: CGPointMake(52.85, 22.58) controlPoint1: CGPointMake(56.45, 27.39) controlPoint2: CGPointMake(52.85, 26.89)]; - [bezier7Path addCurveToPoint: CGPointMake(57.08, 17.11) controlPoint1: CGPointMake(52.85, 16.92) controlPoint2: CGPointMake(56.94, 17.14)]; - [bezier7Path addLineToPoint: CGPointMake(60.39, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(60.39, 19.49)]; - [bezier7Path addLineToPoint: CGPointMake(57.67, 19.52)]; - [bezier7Path addCurveToPoint: CGPointMake(55.69, 21.75) controlPoint1: CGPointMake(57.67, 19.52) controlPoint2: CGPointMake(55.9, 19.52)]; - [bezier7Path addCurveToPoint: CGPointMake(55.65, 22.46) controlPoint1: CGPointMake(55.66, 22) controlPoint2: CGPointMake(55.65, 22.24)]; - [bezier7Path addCurveToPoint: CGPointMake(58.85, 24.8) controlPoint1: CGPointMake(55.66, 25.91) controlPoint2: CGPointMake(58.75, 24.84)]; - [bezier7Path addLineToPoint: CGPointMake(62.17, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(65.92, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(69.94, 26.44)]; - [bezier7Path addLineToPoint: CGPointMake(69.94, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(73.73, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(77.92, 23.91)]; - [bezier7Path addLineToPoint: CGPointMake(77.92, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(80.62, 17.19)]; - [bezier7Path addLineToPoint: CGPointMake(80.62, 27.39)]; - [bezier7Path addLineToPoint: CGPointMake(76.93, 27.39)]; - [bezier7Path closePath]; - [bezier7Path moveToPoint: CGPointMake(62.73, 22.65)]; - [bezier7Path addLineToPoint: CGPointMake(65.33, 22.65)]; - [bezier7Path addLineToPoint: CGPointMake(64.05, 19.61)]; - [bezier7Path addLineToPoint: CGPointMake(62.73, 22.65)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(23.92, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(23.92, 20.4)]; - [bezier8Path addLineToPoint: CGPointMake(20.56, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(18.36, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(14.99, 20.43)]; - [bezier8Path addLineToPoint: CGPointMake(14.99, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(12.65, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(12.29, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(9.7, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(8.77, 25.3)]; - [bezier8Path addLineToPoint: CGPointMake(3.88, 25.3)]; - [bezier8Path addLineToPoint: CGPointMake(2.93, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(0, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(4.45, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(8.22, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(12.29, 26.61)]; - [bezier8Path addLineToPoint: CGPointMake(12.29, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(16.52, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(19.47, 23.58)]; - [bezier8Path addLineToPoint: CGPointMake(22.4, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(26.63, 17.24)]; - [bezier8Path addLineToPoint: CGPointMake(26.63, 27.44)]; - [bezier8Path addLineToPoint: CGPointMake(23.92, 27.44)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(5.02, 22.69)]; - [bezier8Path addLineToPoint: CGPointMake(7.63, 22.69)]; - [bezier8Path addLineToPoint: CGPointMake(6.32, 19.66)]; - [bezier8Path addLineToPoint: CGPointMake(5.02, 22.69)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(28.49, 27.39)]; - [bezier9Path addLineToPoint: CGPointMake(28.49, 17.19)]; - [bezier9Path addLineToPoint: CGPointMake(36.85, 17.19)]; - [bezier9Path addLineToPoint: CGPointMake(36.85, 19.57)]; - [bezier9Path addLineToPoint: CGPointMake(31.18, 19.57)]; - [bezier9Path addLineToPoint: CGPointMake(31.18, 21.14)]; - [bezier9Path addLineToPoint: CGPointMake(36.7, 21.14)]; - [bezier9Path addLineToPoint: CGPointMake(36.7, 23.46)]; - [bezier9Path addLineToPoint: CGPointMake(31.18, 23.46)]; - [bezier9Path addLineToPoint: CGPointMake(31.18, 25.18)]; - [bezier9Path addLineToPoint: CGPointMake(36.85, 25.18)]; - [bezier9Path addLineToPoint: CGPointMake(36.85, 27.39)]; - [bezier9Path addLineToPoint: CGPointMake(28.49, 27.39)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier9Path fill]; - - - //// Bezier 10 Drawing - UIBezierPath* bezier10Path = [UIBezierPath bezierPath]; - [bezier10Path moveToPoint: CGPointMake(49.24, 27.42)]; - [bezier10Path addLineToPoint: CGPointMake(49.24, 17.19)]; - [bezier10Path addLineToPoint: CGPointMake(51.94, 17.19)]; - [bezier10Path addLineToPoint: CGPointMake(51.94, 27.42)]; - [bezier10Path addLineToPoint: CGPointMake(49.24, 27.42)]; - [bezier10Path closePath]; - bezier10Path.miterLimit = 4; - - bezier10Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier10Path fill]; - } - } - } - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.h deleted file mode 100755 index 7ae91bd1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUICVVBackVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.m deleted file mode 100755 index a54b8253..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVBackVectorArtView.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "BTUICVVBackVectorArtView.h" - -@implementation BTUICVVBackVectorArtView - -- (void)drawArt { - - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.124 green: 0.132 blue: 0.138 alpha: 0.1]; - UIColor* color2 = self.highlightColor ?: color1; - UIColor* color3 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - - //// Page-1 - { - //// CVV-Back - { - //// Rectangle Drawing - UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRect: CGRectMake(0, 8, 87, 12)]; - [color1 setFill]; - [rectanglePath fill]; - - - //// Rounded Rectangle Drawing - UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(53, 30, 26, 18) cornerRadius: 9]; - [color2 setFill]; - [roundedRectanglePath fill]; - - - //// Rectangle 2 Drawing - UIBezierPath* rectangle2Path = [UIBezierPath bezierPathWithRect: CGRectMake(61, 36, 2, 6)]; - [color3 setFill]; - [rectangle2Path fill]; - - - //// Rectangle 3 Drawing - UIBezierPath* rectangle3Path = [UIBezierPath bezierPathWithRect: CGRectMake(65, 36, 2, 6)]; - [color3 setFill]; - [rectangle3Path fill]; - - - //// Rectangle 4 Drawing - UIBezierPath* rectangle4Path = [UIBezierPath bezierPathWithRect: CGRectMake(69, 36, 2, 6)]; - [color3 setFill]; - [rectangle4Path fill]; - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.h deleted file mode 100755 index 79f85f8f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUICVVFrontVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.m deleted file mode 100755 index 4e1f4353..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICVVFrontVectorArtView.m +++ /dev/null @@ -1,341 +0,0 @@ -#import "BTUICVVFrontVectorArtView.h" - -@implementation BTUICVVFrontVectorArtView - -- (void)drawArt { - - - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.765 green: 0.77 blue: 0.756 alpha: 1]; - UIColor* color3 = self.highlightColor ?: color1; - UIColor* color2 = [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 0.105]; - UIColor* color4 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - - //// Page-1 - { - //// CVV-Front - { - //// Card-#-2 - { - //// CC-numbers - { - //// CC-number - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(6, 31)]; - [bezierPath addLineToPoint: CGPointMake(8, 31)]; - [bezierPath addLineToPoint: CGPointMake(8, 37)]; - [bezierPath addLineToPoint: CGPointMake(6, 37)]; - [bezierPath addLineToPoint: CGPointMake(6, 31)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(10, 31)]; - [bezier2Path addLineToPoint: CGPointMake(12, 31)]; - [bezier2Path addLineToPoint: CGPointMake(12, 37)]; - [bezier2Path addLineToPoint: CGPointMake(10, 37)]; - [bezier2Path addLineToPoint: CGPointMake(10, 31)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(14, 31)]; - [bezier3Path addLineToPoint: CGPointMake(16, 31)]; - [bezier3Path addLineToPoint: CGPointMake(16, 37)]; - [bezier3Path addLineToPoint: CGPointMake(14, 37)]; - [bezier3Path addLineToPoint: CGPointMake(14, 31)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(18, 31)]; - [bezier4Path addLineToPoint: CGPointMake(20, 31)]; - [bezier4Path addLineToPoint: CGPointMake(20, 37)]; - [bezier4Path addLineToPoint: CGPointMake(18, 37)]; - [bezier4Path addLineToPoint: CGPointMake(18, 31)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(26, 31)]; - [bezier5Path addLineToPoint: CGPointMake(28, 31)]; - [bezier5Path addLineToPoint: CGPointMake(28, 37)]; - [bezier5Path addLineToPoint: CGPointMake(26, 37)]; - [bezier5Path addLineToPoint: CGPointMake(26, 31)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(30, 31)]; - [bezier6Path addLineToPoint: CGPointMake(32, 31)]; - [bezier6Path addLineToPoint: CGPointMake(32, 37)]; - [bezier6Path addLineToPoint: CGPointMake(30, 37)]; - [bezier6Path addLineToPoint: CGPointMake(30, 31)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(34, 31)]; - [bezier7Path addLineToPoint: CGPointMake(36, 31)]; - [bezier7Path addLineToPoint: CGPointMake(36, 37)]; - [bezier7Path addLineToPoint: CGPointMake(34, 37)]; - [bezier7Path addLineToPoint: CGPointMake(34, 31)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(38, 31)]; - [bezier8Path addLineToPoint: CGPointMake(40, 31)]; - [bezier8Path addLineToPoint: CGPointMake(40, 37)]; - [bezier8Path addLineToPoint: CGPointMake(38, 37)]; - [bezier8Path addLineToPoint: CGPointMake(38, 31)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(46, 31)]; - [bezier9Path addLineToPoint: CGPointMake(48, 31)]; - [bezier9Path addLineToPoint: CGPointMake(48, 37)]; - [bezier9Path addLineToPoint: CGPointMake(46, 37)]; - [bezier9Path addLineToPoint: CGPointMake(46, 31)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier9Path fill]; - - - //// Bezier 10 Drawing - UIBezierPath* bezier10Path = [UIBezierPath bezierPath]; - [bezier10Path moveToPoint: CGPointMake(50, 31)]; - [bezier10Path addLineToPoint: CGPointMake(52, 31)]; - [bezier10Path addLineToPoint: CGPointMake(52, 37)]; - [bezier10Path addLineToPoint: CGPointMake(50, 37)]; - [bezier10Path addLineToPoint: CGPointMake(50, 31)]; - [bezier10Path closePath]; - bezier10Path.miterLimit = 4; - - bezier10Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier10Path fill]; - - - //// Bezier 11 Drawing - UIBezierPath* bezier11Path = [UIBezierPath bezierPath]; - [bezier11Path moveToPoint: CGPointMake(54, 31)]; - [bezier11Path addLineToPoint: CGPointMake(56, 31)]; - [bezier11Path addLineToPoint: CGPointMake(56, 37)]; - [bezier11Path addLineToPoint: CGPointMake(54, 37)]; - [bezier11Path addLineToPoint: CGPointMake(54, 31)]; - [bezier11Path closePath]; - bezier11Path.miterLimit = 4; - - bezier11Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier11Path fill]; - - - //// Bezier 12 Drawing - UIBezierPath* bezier12Path = [UIBezierPath bezierPath]; - [bezier12Path moveToPoint: CGPointMake(58, 31)]; - [bezier12Path addLineToPoint: CGPointMake(60, 31)]; - [bezier12Path addLineToPoint: CGPointMake(60, 37)]; - [bezier12Path addLineToPoint: CGPointMake(58, 37)]; - [bezier12Path addLineToPoint: CGPointMake(58, 31)]; - [bezier12Path closePath]; - bezier12Path.miterLimit = 4; - - bezier12Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier12Path fill]; - - - //// Bezier 13 Drawing - UIBezierPath* bezier13Path = [UIBezierPath bezierPath]; - [bezier13Path moveToPoint: CGPointMake(66, 31)]; - [bezier13Path addLineToPoint: CGPointMake(68, 31)]; - [bezier13Path addLineToPoint: CGPointMake(68, 37)]; - [bezier13Path addLineToPoint: CGPointMake(66, 37)]; - [bezier13Path addLineToPoint: CGPointMake(66, 31)]; - [bezier13Path closePath]; - bezier13Path.miterLimit = 4; - - bezier13Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier13Path fill]; - - - //// Bezier 14 Drawing - UIBezierPath* bezier14Path = [UIBezierPath bezierPath]; - [bezier14Path moveToPoint: CGPointMake(70, 31)]; - [bezier14Path addLineToPoint: CGPointMake(72, 31)]; - [bezier14Path addLineToPoint: CGPointMake(72, 37)]; - [bezier14Path addLineToPoint: CGPointMake(70, 37)]; - [bezier14Path addLineToPoint: CGPointMake(70, 31)]; - [bezier14Path closePath]; - bezier14Path.miterLimit = 4; - - bezier14Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier14Path fill]; - - - //// Bezier 15 Drawing - UIBezierPath* bezier15Path = [UIBezierPath bezierPath]; - [bezier15Path moveToPoint: CGPointMake(74, 31)]; - [bezier15Path addLineToPoint: CGPointMake(76, 31)]; - [bezier15Path addLineToPoint: CGPointMake(76, 37)]; - [bezier15Path addLineToPoint: CGPointMake(74, 37)]; - [bezier15Path addLineToPoint: CGPointMake(74, 31)]; - [bezier15Path closePath]; - bezier15Path.miterLimit = 4; - - bezier15Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier15Path fill]; - - - //// Bezier 16 Drawing - UIBezierPath* bezier16Path = [UIBezierPath bezierPath]; - [bezier16Path moveToPoint: CGPointMake(78, 31)]; - [bezier16Path addLineToPoint: CGPointMake(80, 31)]; - [bezier16Path addLineToPoint: CGPointMake(80, 37)]; - [bezier16Path addLineToPoint: CGPointMake(78, 37)]; - [bezier16Path addLineToPoint: CGPointMake(78, 31)]; - [bezier16Path closePath]; - bezier16Path.miterLimit = 4; - - bezier16Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier16Path fill]; - } - - - //// Rectangle Drawing - UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRect: CGRectMake(26, 43, 14, 2)]; - [color2 setFill]; - [rectanglePath fill]; - - - //// Rectangle 2 Drawing - UIBezierPath* rectangle2Path = [UIBezierPath bezierPathWithRect: CGRectMake(6, 47, 34, 2)]; - [color2 setFill]; - [rectangle2Path fill]; - - - //// Rounded Rectangle Drawing - UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(56, 5, 26, 18) cornerRadius: 9]; - [color3 setFill]; - [roundedRectanglePath fill]; - - - //// Rectangle 3 Drawing - UIBezierPath* rectangle3Path = [UIBezierPath bezierPathWithRect: CGRectMake(62, 11, 2, 6)]; - [color4 setFill]; - [rectangle3Path fill]; - - - //// Rectangle 4 Drawing - UIBezierPath* rectangle4Path = [UIBezierPath bezierPathWithRect: CGRectMake(66, 11, 2, 6)]; - [color4 setFill]; - [rectangle4Path fill]; - - - //// Rectangle 5 Drawing - UIBezierPath* rectangle5Path = [UIBezierPath bezierPathWithRect: CGRectMake(70, 11, 2, 6)]; - [color4 setFill]; - [rectangle5Path fill]; - - - //// Rectangle 6 Drawing - UIBezierPath* rectangle6Path = [UIBezierPath bezierPathWithRect: CGRectMake(74, 11, 2, 6)]; - [color4 setFill]; - [rectangle6Path fill]; - } - - - //// Rounded Rectangle 2 Drawing - UIBezierPath* roundedRectangle2Path = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(6, 7, 14, 14) cornerRadius: 0.75]; - [color2 setFill]; - [roundedRectangle2Path fill]; - - - //// Rounded Rectangle 3 Drawing - UIBezierPath* roundedRectangle3Path = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(72, 41, 8, 8) cornerRadius: 0.75]; - [color2 setFill]; - [roundedRectangle3Path fill]; - } - } - } - - -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.h deleted file mode 100755 index 5bb8874b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "BTUIVectorArtView.h" - -@interface BTUICardVectorArtView : BTUIVectorArtView - -@property (nonatomic, strong) UIColor *highlightColor; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.m deleted file mode 100755 index 204eb0fa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICardVectorArtView.m +++ /dev/null @@ -1,25 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@implementation BTUICardVectorArtView - -- (id)init { - self = [super init]; - if (self) { - self.artDimensions = CGSizeMake(87.0f, 55.0f); - self.opaque = NO; - } - return self; -} - -- (void)updateConstraints { - [self addConstraint:[NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:87.0f/55.0f - constant:0]]; - [super updateConstraints]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.h deleted file mode 100755 index b3000828..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUICoinbaseMonogramCardView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.m deleted file mode 100755 index eb52ffdb..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseMonogramCardView.m +++ /dev/null @@ -1,43 +0,0 @@ -#import "BTUICoinbaseMonogramCardView.h" - -@implementation BTUICoinbaseMonogramCardView - -- (void)drawArt { - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.053 green: 0.433 blue: 0.7 alpha: 1]; - - //// Assets - { - //// icon-coinbase - { - //// Rectangle Drawing - - - //// logo/coinbase-2 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(24, 27.45)]; - [bezierPath addCurveToPoint: CGPointMake(47.38, 0) controlPoint1: CGPointMake(24, 8.33) controlPoint2: CGPointMake(35.54, 0)]; - [bezierPath addCurveToPoint: CGPointMake(61, 3.63) controlPoint1: CGPointMake(53.21, 0) controlPoint2: CGPointMake(57.74, 1.47)]; - [bezierPath addLineToPoint: CGPointMake(57.45, 11.37)]; - [bezierPath addCurveToPoint: CGPointMake(48.77, 8.82) controlPoint1: CGPointMake(55.28, 9.8) controlPoint2: CGPointMake(52.02, 8.82)]; - [bezierPath addCurveToPoint: CGPointMake(34.57, 27.45) controlPoint1: CGPointMake(41.66, 8.82) controlPoint2: CGPointMake(34.57, 14.51)]; - [bezierPath addCurveToPoint: CGPointMake(48.77, 45.98) controlPoint1: CGPointMake(34.57, 40.39) controlPoint2: CGPointMake(41.86, 45.98)]; - [bezierPath addCurveToPoint: CGPointMake(57.45, 43.43) controlPoint1: CGPointMake(52.02, 45.98) controlPoint2: CGPointMake(55.28, 45)]; - [bezierPath addLineToPoint: CGPointMake(61, 51.37)]; - [bezierPath addCurveToPoint: CGPointMake(47.38, 55) controlPoint1: CGPointMake(57.65, 53.63) controlPoint2: CGPointMake(53.21, 55)]; - [bezierPath addCurveToPoint: CGPointMake(24, 27.45) controlPoint1: CGPointMake(35.54, 55) controlPoint2: CGPointMake(24, 46.57)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - } - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.h deleted file mode 100755 index 84da3172..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "BTUIVectorArtView.h" - -@interface BTUICoinbaseWordmarkVectorArtView : BTUIVectorArtView - -@property (nonatomic, strong) UIColor *color; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.m deleted file mode 100755 index d9f828c3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUICoinbaseWordmarkVectorArtView.m +++ /dev/null @@ -1,191 +0,0 @@ -#import "BTUICoinbaseWordmarkVectorArtView.h" - -@implementation BTUICoinbaseWordmarkVectorArtView - -- (instancetype)initWithCoder:(NSCoder *)coder -{ - self = [super initWithCoder:coder]; - if (self) { - [self doSetup]; - } - return self; -} - -- (id)init { - self = [super init]; - if (self) { - [self doSetup]; - } - return self; -} - -- (void)doSetup { - self.artDimensions = CGSizeMake(162, 88); - self.opaque = NO; - self.color = [UIColor colorWithRed: 0.053 green: 0.433 blue: 0.7 alpha: 1]; // Default color -} - -- (void)setColor:(UIColor *)color { - _color = color; - [self setNeedsDisplay]; -} - -- (void)drawArt { - //// Assets - { - //// button-coinbase - { - //// Rectangle Drawing - - - //// logo/coinbase-2 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(20.22, 54)]; - [bezierPath addCurveToPoint: CGPointMake(12, 43.98) controlPoint1: CGPointMake(16.06, 54) controlPoint2: CGPointMake(12, 50.93)]; - [bezierPath addCurveToPoint: CGPointMake(20.22, 34) controlPoint1: CGPointMake(12, 37.03) controlPoint2: CGPointMake(16.06, 34)]; - [bezierPath addCurveToPoint: CGPointMake(25, 35.32) controlPoint1: CGPointMake(22.26, 34) controlPoint2: CGPointMake(23.86, 34.53)]; - [bezierPath addLineToPoint: CGPointMake(23.75, 38.14)]; - [bezierPath addCurveToPoint: CGPointMake(20.7, 37.21) controlPoint1: CGPointMake(22.99, 37.56) controlPoint2: CGPointMake(21.85, 37.21)]; - [bezierPath addCurveToPoint: CGPointMake(15.92, 43.95) controlPoint1: CGPointMake(18.21, 37.21) controlPoint2: CGPointMake(15.92, 39.24)]; - [bezierPath addCurveToPoint: CGPointMake(20.7, 50.72) controlPoint1: CGPointMake(15.92, 48.65) controlPoint2: CGPointMake(18.27, 50.72)]; - [bezierPath addCurveToPoint: CGPointMake(23.75, 49.79) controlPoint1: CGPointMake(21.85, 50.72) controlPoint2: CGPointMake(22.99, 50.36)]; - [bezierPath addLineToPoint: CGPointMake(25, 52.68)]; - [bezierPath addCurveToPoint: CGPointMake(20.22, 54) controlPoint1: CGPointMake(23.82, 53.5) controlPoint2: CGPointMake(22.26, 54)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(36.07, 54)]; - [bezierPath addCurveToPoint: CGPointMake(27.62, 44.12) controlPoint1: CGPointMake(30.61, 54) controlPoint2: CGPointMake(27.62, 49.74)]; - [bezierPath addCurveToPoint: CGPointMake(36.07, 34.27) controlPoint1: CGPointMake(27.62, 38.49) controlPoint2: CGPointMake(30.61, 34.27)]; - [bezierPath addCurveToPoint: CGPointMake(44.52, 44.12) controlPoint1: CGPointMake(41.53, 34.27) controlPoint2: CGPointMake(44.52, 38.49)]; - [bezierPath addCurveToPoint: CGPointMake(36.07, 54) controlPoint1: CGPointMake(44.52, 49.74) controlPoint2: CGPointMake(41.53, 54)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(31, 44)]; - [bezierPath addCurveToPoint: CGPointMake(36, 51) controlPoint1: CGPointMake(31, 48.08) controlPoint2: CGPointMake(32.97, 51)]; - [bezierPath addCurveToPoint: CGPointMake(41, 44) controlPoint1: CGPointMake(39.03, 51) controlPoint2: CGPointMake(41, 48.08)]; - [bezierPath addCurveToPoint: CGPointMake(36, 37) controlPoint1: CGPointMake(41, 39.92) controlPoint2: CGPointMake(39.03, 37)]; - [bezierPath addCurveToPoint: CGPointMake(31, 44) controlPoint1: CGPointMake(32.97, 37) controlPoint2: CGPointMake(31, 39.92)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(51, 32)]; - [bezierPath addCurveToPoint: CGPointMake(49, 30) controlPoint1: CGPointMake(49.89, 32) controlPoint2: CGPointMake(49, 31.1)]; - [bezierPath addCurveToPoint: CGPointMake(51, 28) controlPoint1: CGPointMake(49, 28.9) controlPoint2: CGPointMake(49.89, 28)]; - [bezierPath addCurveToPoint: CGPointMake(53, 30) controlPoint1: CGPointMake(52.11, 28) controlPoint2: CGPointMake(53, 28.9)]; - [bezierPath addCurveToPoint: CGPointMake(51, 32) controlPoint1: CGPointMake(53, 31.1) controlPoint2: CGPointMake(52.11, 32)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(49, 54)]; - [bezierPath addLineToPoint: CGPointMake(49, 35)]; - [bezierPath addLineToPoint: CGPointMake(53, 35)]; - [bezierPath addLineToPoint: CGPointMake(53, 54)]; - [bezierPath addLineToPoint: CGPointMake(49, 54)]; - [bezierPath addLineToPoint: CGPointMake(49, 54)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(70, 41)]; - [bezierPath addCurveToPoint: CGPointMake(65.5, 37) controlPoint1: CGPointMake(70, 38.71) controlPoint2: CGPointMake(68.28, 37)]; - [bezierPath addCurveToPoint: CGPointMake(62, 38) controlPoint1: CGPointMake(64.01, 37) controlPoint2: CGPointMake(62.82, 37.67)]; - [bezierPath addLineToPoint: CGPointMake(62, 54)]; - [bezierPath addLineToPoint: CGPointMake(58, 54)]; - [bezierPath addLineToPoint: CGPointMake(58, 35.38)]; - [bezierPath addCurveToPoint: CGPointMake(65.5, 34) controlPoint1: CGPointMake(60, 34.58) controlPoint2: CGPointMake(62.38, 34)]; - [bezierPath addCurveToPoint: CGPointMake(74, 40.55) controlPoint1: CGPointMake(71.11, 34) controlPoint2: CGPointMake(74, 36.4)]; - [bezierPath addLineToPoint: CGPointMake(74, 54)]; - [bezierPath addLineToPoint: CGPointMake(70, 54)]; - [bezierPath addLineToPoint: CGPointMake(70, 41)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(78, 52.66)]; - [bezierPath addLineToPoint: CGPointMake(78, 26)]; - [bezierPath addLineToPoint: CGPointMake(81.9, 26)]; - [bezierPath addLineToPoint: CGPointMake(81.9, 35.15)]; - [bezierPath addCurveToPoint: CGPointMake(85.5, 34) controlPoint1: CGPointMake(82.83, 34.72) controlPoint2: CGPointMake(84.18, 34)]; - [bezierPath addCurveToPoint: CGPointMake(94, 43.69) controlPoint1: CGPointMake(90.48, 34) controlPoint2: CGPointMake(94, 37.89)]; - [bezierPath addCurveToPoint: CGPointMake(84.48, 54) controlPoint1: CGPointMake(94, 50.83) controlPoint2: CGPointMake(90.24, 54)]; - [bezierPath addCurveToPoint: CGPointMake(78, 52.66) controlPoint1: CGPointMake(81.97, 54) controlPoint2: CGPointMake(79.5, 53.4)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(85, 37)]; - [bezierPath addCurveToPoint: CGPointMake(82, 37.65) controlPoint1: CGPointMake(83.96, 37) controlPoint2: CGPointMake(82.73, 37.25)]; - [bezierPath addLineToPoint: CGPointMake(82, 50.49)]; - [bezierPath addCurveToPoint: CGPointMake(84.72, 51) controlPoint1: CGPointMake(82.56, 50.75) controlPoint2: CGPointMake(83.64, 51)]; - [bezierPath addCurveToPoint: CGPointMake(90, 43.82) controlPoint1: CGPointMake(87.76, 51) controlPoint2: CGPointMake(90, 48.82)]; - [bezierPath addCurveToPoint: CGPointMake(85, 37) controlPoint1: CGPointMake(90, 39.54) controlPoint2: CGPointMake(88.04, 37)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(97, 48)]; - [bezierPath addCurveToPoint: CGPointMake(108, 41.5) controlPoint1: CGPointMake(97, 42.72) controlPoint2: CGPointMake(102.19, 41.82)]; - [bezierPath addLineToPoint: CGPointMake(108, 40)]; - [bezierPath addCurveToPoint: CGPointMake(104.5, 37) controlPoint1: CGPointMake(108, 37.61) controlPoint2: CGPointMake(106.96, 37)]; - [bezierPath addCurveToPoint: CGPointMake(98.9, 38.24) controlPoint1: CGPointMake(102.68, 37) controlPoint2: CGPointMake(100.18, 37.64)]; - [bezierPath addLineToPoint: CGPointMake(97.9, 35.6)]; - [bezierPath addCurveToPoint: CGPointMake(104.5, 34) controlPoint1: CGPointMake(99.43, 34.93) controlPoint2: CGPointMake(101.93, 34)]; - [bezierPath addCurveToPoint: CGPointMake(111.99, 40.7) controlPoint1: CGPointMake(109.1, 34) controlPoint2: CGPointMake(111.99, 36.03)]; - [bezierPath addLineToPoint: CGPointMake(111.99, 52.66)]; - [bezierPath addCurveToPoint: CGPointMake(105.07, 54) controlPoint1: CGPointMake(110.6, 53.4) controlPoint2: CGPointMake(107.78, 54)]; - [bezierPath addCurveToPoint: CGPointMake(97, 48) controlPoint1: CGPointMake(99.54, 54) controlPoint2: CGPointMake(97, 51.73)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(100.5, 48)]; - [bezierPath addCurveToPoint: CGPointMake(105, 51) controlPoint1: CGPointMake(100.5, 50.01) controlPoint2: CGPointMake(102.04, 51)]; - [bezierPath addLineToPoint: CGPointMake(108, 51)]; - [bezierPath addLineToPoint: CGPointMake(108, 44)]; - [bezierPath addCurveToPoint: CGPointMake(100.5, 48) controlPoint1: CGPointMake(104.08, 44.21) controlPoint2: CGPointMake(100.5, 44.62)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(121.79, 54)]; - [bezierPath addCurveToPoint: CGPointMake(116, 52.65) controlPoint1: CGPointMake(119.62, 54) controlPoint2: CGPointMake(117.35, 53.39)]; - [bezierPath addLineToPoint: CGPointMake(117.28, 49.65)]; - [bezierPath addCurveToPoint: CGPointMake(121.69, 50.9) controlPoint1: CGPointMake(118.24, 50.26) controlPoint2: CGPointMake(120.28, 50.9)]; - [bezierPath addCurveToPoint: CGPointMake(125.07, 48.26) controlPoint1: CGPointMake(123.72, 50.9) controlPoint2: CGPointMake(125.07, 49.86)]; - [bezierPath addCurveToPoint: CGPointMake(121.76, 45.12) controlPoint1: CGPointMake(125.07, 46.51) controlPoint2: CGPointMake(123.66, 45.84)]; - [bezierPath addCurveToPoint: CGPointMake(116.48, 39.38) controlPoint1: CGPointMake(119.28, 44.16) controlPoint2: CGPointMake(116.48, 42.98)]; - [bezierPath addCurveToPoint: CGPointMake(123, 34) controlPoint1: CGPointMake(116.48, 36.21) controlPoint2: CGPointMake(118.86, 34)]; - [bezierPath addCurveToPoint: CGPointMake(128.41, 35.35) controlPoint1: CGPointMake(125.24, 34) controlPoint2: CGPointMake(127.1, 34.57)]; - [bezierPath addLineToPoint: CGPointMake(127.24, 38.06)]; - [bezierPath addCurveToPoint: CGPointMake(123.41, 36.92) controlPoint1: CGPointMake(126.41, 37.53) controlPoint2: CGPointMake(124.76, 36.92)]; - [bezierPath addCurveToPoint: CGPointMake(120.34, 39.38) controlPoint1: CGPointMake(121.45, 36.92) controlPoint2: CGPointMake(120.34, 37.99)]; - [bezierPath addCurveToPoint: CGPointMake(123.55, 42.45) controlPoint1: CGPointMake(120.34, 41.13) controlPoint2: CGPointMake(121.72, 41.74)]; - [bezierPath addCurveToPoint: CGPointMake(129, 48.3) controlPoint1: CGPointMake(126.14, 43.45) controlPoint2: CGPointMake(129, 44.55)]; - [bezierPath addCurveToPoint: CGPointMake(121.79, 54) controlPoint1: CGPointMake(129, 51.75) controlPoint2: CGPointMake(126.45, 54)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(136, 46)]; - [bezierPath addCurveToPoint: CGPointMake(142.08, 50.94) controlPoint1: CGPointMake(136.39, 49.41) controlPoint2: CGPointMake(138.84, 50.94)]; - [bezierPath addCurveToPoint: CGPointMake(147.39, 49.78) controlPoint1: CGPointMake(144.01, 50.94) controlPoint2: CGPointMake(146.08, 50.48)]; - [bezierPath addLineToPoint: CGPointMake(148.54, 52.66)]; - [bezierPath addCurveToPoint: CGPointMake(141.83, 54) controlPoint1: CGPointMake(147.04, 53.44) controlPoint2: CGPointMake(144.47, 54)]; - [bezierPath addCurveToPoint: CGPointMake(132, 44.04) controlPoint1: CGPointMake(135.77, 54) controlPoint2: CGPointMake(132, 50.1)]; - [bezierPath addCurveToPoint: CGPointMake(141, 34) controlPoint1: CGPointMake(132, 38.24) controlPoint2: CGPointMake(135.62, 34)]; - [bezierPath addCurveToPoint: CGPointMake(149, 42.6) controlPoint1: CGPointMake(145.99, 34) controlPoint2: CGPointMake(149, 37.5)]; - [bezierPath addCurveToPoint: CGPointMake(148.96, 44.04) controlPoint1: CGPointMake(149, 43.06) controlPoint2: CGPointMake(149, 43.55)]; - [bezierPath addLineToPoint: CGPointMake(136, 46)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(140.98, 37.08)]; - [bezierPath addCurveToPoint: CGPointMake(135.95, 43.27) controlPoint1: CGPointMake(137.98, 37.08) controlPoint2: CGPointMake(136.02, 39.33)]; - [bezierPath addLineToPoint: CGPointMake(145.26, 42)]; - [bezierPath addCurveToPoint: CGPointMake(140.98, 37.08) controlPoint1: CGPointMake(145.22, 38.7) controlPoint2: CGPointMake(143.54, 37.08)]; - [bezierPath addLineToPoint: CGPointMake(140.98, 37.08)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [self.color setFill]; - [bezierPath fill]; - } - } - } -} - -- (void)updateConstraints { - NSLayoutConstraint *aspectRatioConstraint = [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:(self.artDimensions.width / self.artDimensions.height) - constant:0.0f]; - aspectRatioConstraint.priority = UILayoutPriorityRequired; - - [self addConstraints:@[aspectRatioConstraint]]; - - [super updateConstraints]; -} - -- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(__unused UILayoutConstraintAxis)axis { - return UILayoutPriorityRequired; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.h deleted file mode 100755 index aa2251de..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIDinersClubVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.m deleted file mode 100755 index 8dbc16d4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDinersClubVectorArtView.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "BTUIDinersClubVectorArtView.h" - -@implementation BTUIDinersClubVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.019 green: 0.213 blue: 0.52 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - - //// Page-1 - { - //// Diners-Club - { - //// Shape - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(46, 44)]; - [bezierPath addCurveToPoint: CGPointMake(64, 28) controlPoint1: CGPointMake(55.5, 44.04) controlPoint2: CGPointMake(64, 36.64)]; - [bezierPath addCurveToPoint: CGPointMake(46, 11) controlPoint1: CGPointMake(64, 17.8) controlPoint2: CGPointMake(55.5, 11)]; - [bezierPath addLineToPoint: CGPointMake(38, 11)]; - [bezierPath addCurveToPoint: CGPointMake(21, 28) controlPoint1: CGPointMake(28.76, 11) controlPoint2: CGPointMake(21, 17.8)]; - [bezierPath addCurveToPoint: CGPointMake(38, 44) controlPoint1: CGPointMake(21, 36.65) controlPoint2: CGPointMake(28.76, 44.04)]; - [bezierPath addLineToPoint: CGPointMake(46, 44)]; - [bezierPath addLineToPoint: CGPointMake(46, 44)]; - [bezierPath addLineToPoint: CGPointMake(46, 44)]; - [bezierPath addLineToPoint: CGPointMake(46, 44)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(40.6, 36.8)]; - [bezier2Path addLineToPoint: CGPointMake(40.6, 18.2)]; - [bezier2Path addCurveToPoint: CGPointMake(46.8, 27.5) controlPoint1: CGPointMake(44.22, 19.63) controlPoint2: CGPointMake(46.79, 23.25)]; - [bezier2Path addCurveToPoint: CGPointMake(40.6, 36.8) controlPoint1: CGPointMake(46.79, 31.75) controlPoint2: CGPointMake(44.22, 35.36)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(27.17, 27.5)]; - [bezier2Path addCurveToPoint: CGPointMake(33.37, 18.2) controlPoint1: CGPointMake(27.18, 23.26) controlPoint2: CGPointMake(29.74, 19.64)]; - [bezier2Path addLineToPoint: CGPointMake(33.37, 36.8)]; - [bezier2Path addCurveToPoint: CGPointMake(27.17, 27.5) controlPoint1: CGPointMake(29.74, 35.36) controlPoint2: CGPointMake(27.18, 31.75)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(37.5, 12)]; - [bezier2Path addCurveToPoint: CGPointMake(22, 27.5) controlPoint1: CGPointMake(28.94, 12) controlPoint2: CGPointMake(22, 18.94)]; - [bezier2Path addCurveToPoint: CGPointMake(37.5, 43) controlPoint1: CGPointMake(22, 36.06) controlPoint2: CGPointMake(28.94, 43)]; - [bezier2Path addCurveToPoint: CGPointMake(53, 27.5) controlPoint1: CGPointMake(46.06, 43) controlPoint2: CGPointMake(53, 36.06)]; - [bezier2Path addCurveToPoint: CGPointMake(37.5, 12) controlPoint1: CGPointMake(53, 18.94) controlPoint2: CGPointMake(46.06, 12)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier2Path fill]; - } - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.h deleted file mode 100755 index ba9aa798..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIDiscoverVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.m deleted file mode 100755 index c4d3f3db..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIDiscoverVectorArtView.m +++ /dev/null @@ -1,213 +0,0 @@ -#import "BTUIDiscoverVectorArtView.h" - -@implementation BTUIDiscoverVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color2 = [UIColor colorWithRed: 0.879 green: 0.425 blue: 0.167 alpha: 1]; - UIColor* color1 = [UIColor colorWithRed: 0.042 green: 0.053 blue: 0.066 alpha: 1]; - - //// Page-1 - { - //// Discover - { - //// Group 4 - { - //// Group 5 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(13.13, 22)]; - [bezierPath addLineToPoint: CGPointMake(10, 22)]; - [bezierPath addLineToPoint: CGPointMake(10, 33)]; - [bezierPath addLineToPoint: CGPointMake(13.12, 33)]; - [bezierPath addCurveToPoint: CGPointMake(17.02, 31.73) controlPoint1: CGPointMake(14.77, 33) controlPoint2: CGPointMake(15.97, 32.61)]; - [bezierPath addCurveToPoint: CGPointMake(19, 27.51) controlPoint1: CGPointMake(18.26, 30.69) controlPoint2: CGPointMake(19, 29.12)]; - [bezierPath addCurveToPoint: CGPointMake(13.13, 22) controlPoint1: CGPointMake(19, 24.26) controlPoint2: CGPointMake(16.59, 22)]; - [bezierPath addLineToPoint: CGPointMake(13.13, 22)]; - [bezierPath addLineToPoint: CGPointMake(13.13, 22)]; - [bezierPath addLineToPoint: CGPointMake(13.13, 22)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(15.74, 30.16)]; - [bezierPath addCurveToPoint: CGPointMake(12.61, 31) controlPoint1: CGPointMake(15.02, 30.75) controlPoint2: CGPointMake(14.09, 31)]; - [bezierPath addLineToPoint: CGPointMake(12, 31)]; - [bezierPath addLineToPoint: CGPointMake(12, 24)]; - [bezierPath addLineToPoint: CGPointMake(12.61, 24)]; - [bezierPath addCurveToPoint: CGPointMake(15.74, 24.86) controlPoint1: CGPointMake(14.09, 24) controlPoint2: CGPointMake(14.98, 24.24)]; - [bezierPath addCurveToPoint: CGPointMake(17, 27.49) controlPoint1: CGPointMake(16.53, 25.49) controlPoint2: CGPointMake(17, 26.47)]; - [bezierPath addCurveToPoint: CGPointMake(15.74, 30.16) controlPoint1: CGPointMake(17, 28.51) controlPoint2: CGPointMake(16.53, 29.52)]; - [bezierPath addLineToPoint: CGPointMake(15.74, 30.16)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(20, 22)]; - [bezier2Path addLineToPoint: CGPointMake(22, 22)]; - [bezier2Path addLineToPoint: CGPointMake(22, 33)]; - [bezier2Path addLineToPoint: CGPointMake(20, 33)]; - [bezier2Path addLineToPoint: CGPointMake(20, 33)]; - [bezier2Path addLineToPoint: CGPointMake(20, 22)]; - [bezier2Path addLineToPoint: CGPointMake(20, 22)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(27.09, 26.23)]; - [bezier3Path addCurveToPoint: CGPointMake(25.55, 24.9) controlPoint1: CGPointMake(25.9, 25.77) controlPoint2: CGPointMake(25.55, 25.47)]; - [bezier3Path addCurveToPoint: CGPointMake(27.02, 23.73) controlPoint1: CGPointMake(25.55, 24.23) controlPoint2: CGPointMake(26.17, 23.73)]; - [bezier3Path addCurveToPoint: CGPointMake(28.62, 24.58) controlPoint1: CGPointMake(27.62, 23.73) controlPoint2: CGPointMake(28.1, 23.98)]; - [bezier3Path addLineToPoint: CGPointMake(29.65, 23.17)]; - [bezier3Path addCurveToPoint: CGPointMake(26.67, 22) controlPoint1: CGPointMake(28.8, 22.4) controlPoint2: CGPointMake(27.78, 22)]; - [bezier3Path addCurveToPoint: CGPointMake(23.52, 25.03) controlPoint1: CGPointMake(24.88, 22) controlPoint2: CGPointMake(23.52, 23.3)]; - [bezier3Path addCurveToPoint: CGPointMake(26.01, 27.93) controlPoint1: CGPointMake(23.52, 26.48) controlPoint2: CGPointMake(24.15, 27.23)]; - [bezier3Path addCurveToPoint: CGPointMake(27.37, 28.53) controlPoint1: CGPointMake(26.78, 28.21) controlPoint2: CGPointMake(27.17, 28.4)]; - [bezier3Path addCurveToPoint: CGPointMake(27.97, 29.62) controlPoint1: CGPointMake(27.77, 28.8) controlPoint2: CGPointMake(27.97, 29.18)]; - [bezier3Path addCurveToPoint: CGPointMake(26.43, 31.11) controlPoint1: CGPointMake(27.97, 30.48) controlPoint2: CGPointMake(27.31, 31.11)]; - [bezier3Path addCurveToPoint: CGPointMake(24.27, 29.7) controlPoint1: CGPointMake(25.49, 31.11) controlPoint2: CGPointMake(24.73, 30.62)]; - [bezier3Path addLineToPoint: CGPointMake(23, 30.99)]; - [bezier3Path addCurveToPoint: CGPointMake(26.51, 33) controlPoint1: CGPointMake(23.91, 32.38) controlPoint2: CGPointMake(25, 33)]; - [bezier3Path addCurveToPoint: CGPointMake(30, 29.53) controlPoint1: CGPointMake(28.56, 33) controlPoint2: CGPointMake(30, 31.57)]; - [bezier3Path addCurveToPoint: CGPointMake(27.09, 26.23) controlPoint1: CGPointMake(30, 27.85) controlPoint2: CGPointMake(29.33, 27.09)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(31, 27.51)]; - [bezier4Path addCurveToPoint: CGPointMake(36.47, 33) controlPoint1: CGPointMake(31, 30.6) controlPoint2: CGPointMake(33.39, 33)]; - [bezier4Path addCurveToPoint: CGPointMake(39, 32.39) controlPoint1: CGPointMake(37.34, 33) controlPoint2: CGPointMake(38.08, 32.83)]; - [bezier4Path addLineToPoint: CGPointMake(39, 29.97)]; - [bezier4Path addCurveToPoint: CGPointMake(36.56, 31.12) controlPoint1: CGPointMake(38.19, 30.79) controlPoint2: CGPointMake(37.48, 31.12)]; - [bezier4Path addCurveToPoint: CGPointMake(33.08, 27.49) controlPoint1: CGPointMake(34.53, 31.12) controlPoint2: CGPointMake(33.08, 29.62)]; - [bezier4Path addCurveToPoint: CGPointMake(36.47, 23.88) controlPoint1: CGPointMake(33.08, 25.47) controlPoint2: CGPointMake(34.57, 23.88)]; - [bezier4Path addCurveToPoint: CGPointMake(39, 25.06) controlPoint1: CGPointMake(37.43, 23.88) controlPoint2: CGPointMake(38.16, 24.22)]; - [bezier4Path addLineToPoint: CGPointMake(39, 22.64)]; - [bezier4Path addCurveToPoint: CGPointMake(36.51, 22) controlPoint1: CGPointMake(38.11, 22.19) controlPoint2: CGPointMake(37.38, 22)]; - [bezier4Path addCurveToPoint: CGPointMake(31, 27.51) controlPoint1: CGPointMake(33.45, 22) controlPoint2: CGPointMake(31, 24.45)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(55.99, 29.2)]; - [bezier5Path addLineToPoint: CGPointMake(53.22, 22)]; - [bezier5Path addLineToPoint: CGPointMake(51, 22)]; - [bezier5Path addLineToPoint: CGPointMake(55.42, 33)]; - [bezier5Path addLineToPoint: CGPointMake(56.51, 33)]; - [bezier5Path addLineToPoint: CGPointMake(61, 22)]; - [bezier5Path addLineToPoint: CGPointMake(58.8, 22)]; - [bezier5Path addLineToPoint: CGPointMake(55.99, 29.2)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(62, 33)]; - [bezier6Path addLineToPoint: CGPointMake(68, 33)]; - [bezier6Path addLineToPoint: CGPointMake(68, 31.14)]; - [bezier6Path addLineToPoint: CGPointMake(64.11, 31.14)]; - [bezier6Path addLineToPoint: CGPointMake(64.11, 28.17)]; - [bezier6Path addLineToPoint: CGPointMake(67.85, 28.17)]; - [bezier6Path addLineToPoint: CGPointMake(67.85, 26.3)]; - [bezier6Path addLineToPoint: CGPointMake(64.11, 26.3)]; - [bezier6Path addLineToPoint: CGPointMake(64.11, 23.86)]; - [bezier6Path addLineToPoint: CGPointMake(68, 23.86)]; - [bezier6Path addLineToPoint: CGPointMake(68, 22)]; - [bezier6Path addLineToPoint: CGPointMake(62, 22)]; - [bezier6Path addLineToPoint: CGPointMake(62, 33)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(77.05, 25.25)]; - [bezier7Path addCurveToPoint: CGPointMake(73.17, 22) controlPoint1: CGPointMake(77.05, 23.19) controlPoint2: CGPointMake(75.64, 22)]; - [bezier7Path addLineToPoint: CGPointMake(70, 22)]; - [bezier7Path addLineToPoint: CGPointMake(70, 33)]; - [bezier7Path addLineToPoint: CGPointMake(72.14, 33)]; - [bezier7Path addLineToPoint: CGPointMake(72.14, 28.58)]; - [bezier7Path addLineToPoint: CGPointMake(72.42, 28.58)]; - [bezier7Path addLineToPoint: CGPointMake(75.37, 33)]; - [bezier7Path addLineToPoint: CGPointMake(78, 33)]; - [bezier7Path addLineToPoint: CGPointMake(74.55, 28.37)]; - [bezier7Path addCurveToPoint: CGPointMake(77.05, 25.25) controlPoint1: CGPointMake(76.16, 28.04) controlPoint2: CGPointMake(77.05, 26.93)]; - [bezier7Path addCurveToPoint: CGPointMake(77.05, 25.25) controlPoint1: CGPointMake(77.05, 25.25) controlPoint2: CGPointMake(77.05, 26.93)]; - [bezier7Path addLineToPoint: CGPointMake(77.05, 25.25)]; - [bezier7Path addLineToPoint: CGPointMake(77.05, 25.25)]; - [bezier7Path closePath]; - [bezier7Path moveToPoint: CGPointMake(72.69, 27)]; - [bezier7Path addLineToPoint: CGPointMake(72, 27)]; - [bezier7Path addLineToPoint: CGPointMake(72, 24)]; - [bezier7Path addLineToPoint: CGPointMake(72.73, 24)]; - [bezier7Path addCurveToPoint: CGPointMake(75, 25.47) controlPoint1: CGPointMake(74.2, 24) controlPoint2: CGPointMake(75, 24.51)]; - [bezier7Path addCurveToPoint: CGPointMake(72.69, 27) controlPoint1: CGPointMake(75, 26.46) controlPoint2: CGPointMake(74.2, 27)]; - [bezier7Path addLineToPoint: CGPointMake(72.69, 27)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(45.5, 33)]; - [bezier8Path addCurveToPoint: CGPointMake(51, 27.5) controlPoint1: CGPointMake(48.54, 33) controlPoint2: CGPointMake(51, 30.54)]; - [bezier8Path addCurveToPoint: CGPointMake(45.5, 22) controlPoint1: CGPointMake(51, 24.46) controlPoint2: CGPointMake(48.54, 22)]; - [bezier8Path addCurveToPoint: CGPointMake(40, 27.5) controlPoint1: CGPointMake(42.46, 22) controlPoint2: CGPointMake(40, 24.46)]; - [bezier8Path addCurveToPoint: CGPointMake(45.5, 33) controlPoint1: CGPointMake(40, 30.54) controlPoint2: CGPointMake(42.46, 33)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier8Path fill]; - } - } - } - } - - -} -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.h deleted file mode 100755 index bcfb5b31..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIJCBVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.m deleted file mode 100755 index d806e837..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIJCBVectorArtView.m +++ /dev/null @@ -1,179 +0,0 @@ -#import "BTUIJCBVectorArtView.h" - -@implementation BTUIJCBVectorArtView - -- (void)drawArt { - //// General Declarations - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGContextRef context = UIGraphicsGetCurrentContext(); - - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.262 green: 0.646 blue: 0.146 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 0.279 green: 0.659 blue: 0.143 alpha: 1]; - UIColor* color3 = [UIColor colorWithRed: 0.041 green: 0.33 blue: 0.659 alpha: 1]; - UIColor* color4 = [UIColor colorWithRed: 0.041 green: 0.341 blue: 0.673 alpha: 1]; - UIColor* color5 = [UIColor colorWithRed: 0.833 green: 0 blue: 0.166 alpha: 1]; - UIColor* color6 = [UIColor colorWithRed: 0.852 green: 0 blue: 0.169 alpha: 1]; - - //// Gradient Declarations - NSArray* linearGradient3Colors = [NSArray arrayWithObjects: - (id)color5.CGColor, - (id)color6.CGColor, nil]; - CGFloat linearGradient3Locations[] = {0, 1}; - CGGradientRef linearGradient3 = CGGradientCreateWithColors(colorSpace, (CFArrayRef)linearGradient3Colors, linearGradient3Locations); - NSArray* linearGradient1Colors = [NSArray arrayWithObjects: - (id)color1.CGColor, - (id)color2.CGColor, nil]; - CGFloat linearGradient1Locations[] = {0, 1}; - CGGradientRef linearGradient1 = CGGradientCreateWithColors(colorSpace, (CFArrayRef)linearGradient1Colors, linearGradient1Locations); - NSArray* linearGradient2Colors = [NSArray arrayWithObjects: - (id)color3.CGColor, - (id)color4.CGColor, nil]; - CGFloat linearGradient2Locations[] = {0, 1}; - CGGradientRef linearGradient2 = CGGradientCreateWithColors(colorSpace, (CFArrayRef)linearGradient2Colors, linearGradient2Locations); - - - - //// Page-1 - { - //// JCB - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(55.66, 28.16)]; - [bezierPath addCurveToPoint: CGPointMake(58.73, 28.16) controlPoint1: CGPointMake(56.68, 28.16) controlPoint2: CGPointMake(57.71, 28.16)]; - [bezierPath addCurveToPoint: CGPointMake(59.1, 28.16) controlPoint1: CGPointMake(58.82, 28.16) controlPoint2: CGPointMake(59.01, 28.16)]; - [bezierPath addLineToPoint: CGPointMake(59.1, 28.16)]; - [bezierPath addCurveToPoint: CGPointMake(59.1, 31.02) controlPoint1: CGPointMake(60.5, 28.45) controlPoint2: CGPointMake(60.5, 30.63)]; - [bezierPath addLineToPoint: CGPointMake(59.1, 31.02)]; - [bezierPath addCurveToPoint: CGPointMake(58.73, 31.02) controlPoint1: CGPointMake(59.01, 31.02) controlPoint2: CGPointMake(58.92, 31.02)]; - [bezierPath addCurveToPoint: CGPointMake(55.66, 31.02) controlPoint1: CGPointMake(57.71, 31.02) controlPoint2: CGPointMake(56.68, 31.02)]; - [bezierPath addLineToPoint: CGPointMake(55.66, 28.16)]; - [bezierPath addLineToPoint: CGPointMake(55.66, 28.16)]; - [bezierPath addLineToPoint: CGPointMake(55.66, 28.16)]; - [bezierPath addLineToPoint: CGPointMake(55.66, 28.16)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(59.75, 24.79)]; - [bezierPath addCurveToPoint: CGPointMake(58.73, 26.47) controlPoint1: CGPointMake(59.94, 25.58) controlPoint2: CGPointMake(59.47, 26.28)]; - [bezierPath addCurveToPoint: CGPointMake(58.45, 26.47) controlPoint1: CGPointMake(58.64, 26.47) controlPoint2: CGPointMake(58.54, 26.47)]; - [bezierPath addCurveToPoint: CGPointMake(55.66, 26.47) controlPoint1: CGPointMake(57.52, 26.47) controlPoint2: CGPointMake(56.59, 26.47)]; - [bezierPath addLineToPoint: CGPointMake(55.66, 23.8)]; - [bezierPath addCurveToPoint: CGPointMake(58.45, 23.8) controlPoint1: CGPointMake(56.59, 23.8) controlPoint2: CGPointMake(57.52, 23.8)]; - [bezierPath addLineToPoint: CGPointMake(58.45, 23.8)]; - [bezierPath addCurveToPoint: CGPointMake(58.73, 23.8) controlPoint1: CGPointMake(58.54, 23.8) controlPoint2: CGPointMake(58.64, 23.8)]; - [bezierPath addLineToPoint: CGPointMake(58.73, 23.8)]; - [bezierPath addCurveToPoint: CGPointMake(59.75, 24.79) controlPoint1: CGPointMake(59.19, 23.9) controlPoint2: CGPointMake(59.66, 24.3)]; - [bezierPath addLineToPoint: CGPointMake(59.75, 24.79)]; - [bezierPath addLineToPoint: CGPointMake(59.75, 24.79)]; - [bezierPath addLineToPoint: CGPointMake(59.75, 24.79)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(66.54, 38.54)]; - [bezierPath addCurveToPoint: CGPointMake(61.98, 43.89) controlPoint1: CGPointMake(66.54, 41.12) controlPoint2: CGPointMake(64.31, 43.29)]; - [bezierPath addCurveToPoint: CGPointMake(52.59, 43.99) controlPoint1: CGPointMake(60.87, 44.18) controlPoint2: CGPointMake(52.59, 43.99)]; - [bezierPath addLineToPoint: CGPointMake(52.59, 33.1)]; - [bezierPath addCurveToPoint: CGPointMake(58.82, 33.1) controlPoint1: CGPointMake(52.59, 33.1) controlPoint2: CGPointMake(56.87, 33.1)]; - [bezierPath addCurveToPoint: CGPointMake(64.49, 30.93) controlPoint1: CGPointMake(60.68, 33.1) controlPoint2: CGPointMake(63.66, 33.2)]; - [bezierPath addCurveToPoint: CGPointMake(61.61, 27.36) controlPoint1: CGPointMake(65.24, 28.75) controlPoint2: CGPointMake(63.29, 27.46)]; - [bezierPath addLineToPoint: CGPointMake(61.61, 27.26)]; - [bezierPath addCurveToPoint: CGPointMake(63.84, 23.9) controlPoint1: CGPointMake(63.1, 27.07) controlPoint2: CGPointMake(64.49, 25.68)]; - [bezierPath addCurveToPoint: CGPointMake(61.15, 22.22) controlPoint1: CGPointMake(63.47, 22.71) controlPoint2: CGPointMake(62.26, 22.32)]; - [bezierPath addCurveToPoint: CGPointMake(52.5, 22.22) controlPoint1: CGPointMake(59.47, 22.02) controlPoint2: CGPointMake(52.5, 22.22)]; - [bezierPath addLineToPoint: CGPointMake(52.5, 16.48)]; - [bezierPath addCurveToPoint: CGPointMake(52.59, 15.39) controlPoint1: CGPointMake(52.5, 16.08) controlPoint2: CGPointMake(52.5, 15.69)]; - [bezierPath addCurveToPoint: CGPointMake(57.99, 10.54) controlPoint1: CGPointMake(53.06, 12.92) controlPoint2: CGPointMake(55.66, 10.64)]; - [bezierPath addCurveToPoint: CGPointMake(66.35, 10.54) controlPoint1: CGPointMake(59.66, 10.45) controlPoint2: CGPointMake(66.35, 10.54)]; - [bezierPath addLineToPoint: CGPointMake(66.54, 38.54)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - CGContextSaveGState(context); - [bezierPath addClip]; - CGContextDrawLinearGradient(context, linearGradient1, - CGPointMake(52.5, 27.28), - CGPointMake(66.54, 27.28), - kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation); - CGContextRestoreGState(context); - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(20.6, 30.23)]; - [bezier2Path addCurveToPoint: CGPointMake(20.5, 30.13) controlPoint1: CGPointMake(20.6, 30.23) controlPoint2: CGPointMake(20.5, 30.23)]; - [bezier2Path addLineToPoint: CGPointMake(20.5, 16.55)]; - [bezier2Path addCurveToPoint: CGPointMake(25.41, 10.54) controlPoint1: CGPointMake(20.5, 13.59) controlPoint2: CGPointMake(22.51, 10.74)]; - [bezier2Path addCurveToPoint: CGPointMake(34.54, 10.54) controlPoint1: CGPointMake(27.22, 10.45) controlPoint2: CGPointMake(34.54, 10.54)]; - [bezier2Path addLineToPoint: CGPointMake(34.54, 38.59)]; - [bezier2Path addCurveToPoint: CGPointMake(28.62, 44.01) controlPoint1: CGPointMake(34.54, 41.55) controlPoint2: CGPointMake(31.53, 43.91)]; - [bezier2Path addCurveToPoint: CGPointMake(20.5, 44.01) controlPoint1: CGPointMake(26.82, 44.1) controlPoint2: CGPointMake(20.5, 44.01)]; - [bezier2Path addLineToPoint: CGPointMake(20.5, 32.49)]; - [bezier2Path addCurveToPoint: CGPointMake(30.13, 32.59) controlPoint1: CGPointMake(23.61, 33.28) controlPoint2: CGPointMake(27.12, 33.67)]; - [bezier2Path addCurveToPoint: CGPointMake(32.53, 28.75) controlPoint1: CGPointMake(31.83, 31.9) controlPoint2: CGPointMake(32.53, 30.62)]; - [bezier2Path addLineToPoint: CGPointMake(32.53, 22.35)]; - [bezier2Path addCurveToPoint: CGPointMake(27.52, 22.35) controlPoint1: CGPointMake(30.93, 22.35) controlPoint2: CGPointMake(29.12, 22.35)]; - [bezier2Path addLineToPoint: CGPointMake(27.52, 28.75)]; - [bezier2Path addCurveToPoint: CGPointMake(22.41, 31.01) controlPoint1: CGPointMake(27.52, 32.1) controlPoint2: CGPointMake(24.51, 31.7)]; - [bezier2Path addCurveToPoint: CGPointMake(20.6, 30.23) controlPoint1: CGPointMake(21.8, 30.72) controlPoint2: CGPointMake(21.2, 30.42)]; - [bezier2Path addLineToPoint: CGPointMake(20.6, 30.23)]; - [bezier2Path addLineToPoint: CGPointMake(20.6, 30.23)]; - [bezier2Path addLineToPoint: CGPointMake(20.6, 30.23)]; - [bezier2Path addLineToPoint: CGPointMake(20.6, 30.23)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - CGContextSaveGState(context); - [bezier2Path addClip]; - CGContextDrawLinearGradient(context, linearGradient2, - CGPointMake(20.5, 27.28), - CGPointMake(34.54, 27.28), - kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation); - CGContextRestoreGState(context); - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(36.5, 23.72)]; - [bezier3Path addLineToPoint: CGPointMake(36.5, 16.53)]; - [bezier3Path addCurveToPoint: CGPointMake(41.37, 10.62) controlPoint1: CGPointMake(36.5, 13.87) controlPoint2: CGPointMake(38.84, 11.12)]; - [bezier3Path addCurveToPoint: CGPointMake(50.54, 10.52) controlPoint1: CGPointMake(42.49, 10.43) controlPoint2: CGPointMake(50.54, 10.52)]; - [bezier3Path addLineToPoint: CGPointMake(50.54, 38.59)]; - [bezier3Path addCurveToPoint: CGPointMake(45.02, 44.01) controlPoint1: CGPointMake(50.54, 41.54) controlPoint2: CGPointMake(47.83, 43.81)]; - [bezier3Path addCurveToPoint: CGPointMake(36.5, 44.01) controlPoint1: CGPointMake(43.33, 44.1) controlPoint2: CGPointMake(36.5, 44.01)]; - [bezier3Path addLineToPoint: CGPointMake(36.5, 31.3)]; - [bezier3Path addCurveToPoint: CGPointMake(46.05, 32.88) controlPoint1: CGPointMake(38.84, 33.37) controlPoint2: CGPointMake(43.15, 33.27)]; - [bezier3Path addCurveToPoint: CGPointMake(48.57, 32.39) controlPoint1: CGPointMake(46.89, 32.78) controlPoint2: CGPointMake(47.73, 32.58)]; - [bezier3Path addLineToPoint: CGPointMake(48.57, 30.02)]; - [bezier3Path addCurveToPoint: CGPointMake(41.84, 30.81) controlPoint1: CGPointMake(46.61, 31.01) controlPoint2: CGPointMake(43.89, 31.89)]; - [bezier3Path addCurveToPoint: CGPointMake(39.96, 27.95) controlPoint1: CGPointMake(40.71, 30.22) controlPoint2: CGPointMake(40.06, 29.14)]; - [bezier3Path addCurveToPoint: CGPointMake(39.96, 26.97) controlPoint1: CGPointMake(39.96, 27.66) controlPoint2: CGPointMake(39.96, 27.36)]; - [bezier3Path addCurveToPoint: CGPointMake(46.7, 24.02) controlPoint1: CGPointMake(40.24, 23.33) controlPoint2: CGPointMake(44.18, 23.23)]; - [bezier3Path addCurveToPoint: CGPointMake(48.57, 24.8) controlPoint1: CGPointMake(47.36, 24.21) controlPoint2: CGPointMake(48.01, 24.51)]; - [bezier3Path addLineToPoint: CGPointMake(48.57, 22.44)]; - [bezier3Path addCurveToPoint: CGPointMake(39.5, 22.24) controlPoint1: CGPointMake(45.67, 21.75) controlPoint2: CGPointMake(42.49, 21.36)]; - [bezier3Path addCurveToPoint: CGPointMake(36.5, 23.72) controlPoint1: CGPointMake(38.65, 22.64) controlPoint2: CGPointMake(37.25, 23.03)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - CGContextSaveGState(context); - [bezier3Path addClip]; - CGContextDrawLinearGradient(context, linearGradient3, - CGPointMake(36.5, 27.28), - CGPointMake(50.54, 27.28), - kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation); - CGContextRestoreGState(context); - } - } - - //// Cleanup - CGGradientRelease(linearGradient3); - CGGradientRelease(linearGradient1); - CGGradientRelease(linearGradient2); - CGColorSpaceRelease(colorSpace); -} - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.h deleted file mode 100755 index 7b631958..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIMaestroVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.m deleted file mode 100755 index 81dd8706..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMaestroVectorArtView.m +++ /dev/null @@ -1,309 +0,0 @@ -#import "BTUIMaestroVectorArtView.h" - -@implementation BTUIMaestroVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color3 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - UIColor* color1 = [UIColor colorWithRed: 0.067 green: 0.541 blue: 0.834 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 0.899 green: 0 blue: 0.139 alpha: 1]; - - //// Page-1 - { - //// Maestro - { - //// Shape - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(43.91, 40.1)]; - [bezierPath addCurveToPoint: CGPointMake(49.5, 27.5) controlPoint1: CGPointMake(47.34, 36.99) controlPoint2: CGPointMake(49.5, 32.5)]; - [bezierPath addCurveToPoint: CGPointMake(43.91, 14.9) controlPoint1: CGPointMake(49.5, 22.5) controlPoint2: CGPointMake(47.34, 18.01)]; - [bezierPath addCurveToPoint: CGPointMake(32.5, 10.5) controlPoint1: CGPointMake(40.89, 12.17) controlPoint2: CGPointMake(36.89, 10.5)]; - [bezierPath addCurveToPoint: CGPointMake(15.5, 27.5) controlPoint1: CGPointMake(23.11, 10.5) controlPoint2: CGPointMake(15.5, 18.11)]; - [bezierPath addCurveToPoint: CGPointMake(32.5, 44.5) controlPoint1: CGPointMake(15.5, 36.89) controlPoint2: CGPointMake(23.11, 44.5)]; - [bezierPath addCurveToPoint: CGPointMake(43.91, 40.1) controlPoint1: CGPointMake(36.89, 44.5) controlPoint2: CGPointMake(40.89, 42.83)]; - [bezierPath addLineToPoint: CGPointMake(43.91, 40.1)]; - [bezierPath addLineToPoint: CGPointMake(43.91, 40.1)]; - [bezierPath addLineToPoint: CGPointMake(43.91, 40.1)]; - [bezierPath addLineToPoint: CGPointMake(43.91, 40.1)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(54.81, 11)]; - [bezier2Path addCurveToPoint: CGPointMake(43.27, 15.4) controlPoint1: CGPointMake(50.36, 11) controlPoint2: CGPointMake(46.32, 12.67)]; - [bezier2Path addCurveToPoint: CGPointMake(41.53, 17.2) controlPoint1: CGPointMake(42.64, 15.96) controlPoint2: CGPointMake(42.06, 16.56)]; - [bezier2Path addLineToPoint: CGPointMake(45, 17.2)]; - [bezier2Path addCurveToPoint: CGPointMake(46.31, 19) controlPoint1: CGPointMake(45.48, 17.77) controlPoint2: CGPointMake(45.91, 18.37)]; - [bezier2Path addLineToPoint: CGPointMake(40.22, 19)]; - [bezier2Path addCurveToPoint: CGPointMake(39.23, 20.8) controlPoint1: CGPointMake(39.85, 19.58) controlPoint2: CGPointMake(39.52, 20.18)]; - [bezier2Path addLineToPoint: CGPointMake(47.3, 20.8)]; - [bezier2Path addCurveToPoint: CGPointMake(48.03, 22.6) controlPoint1: CGPointMake(47.58, 21.38) controlPoint2: CGPointMake(47.82, 21.98)]; - [bezier2Path addLineToPoint: CGPointMake(38.5, 22.6)]; - [bezier2Path addCurveToPoint: CGPointMake(38, 24.4) controlPoint1: CGPointMake(38.3, 23.19) controlPoint2: CGPointMake(38.13, 23.79)]; - [bezier2Path addLineToPoint: CGPointMake(48.53, 24.4)]; - [bezier2Path addCurveToPoint: CGPointMake(48.92, 28) controlPoint1: CGPointMake(48.78, 25.56) controlPoint2: CGPointMake(48.92, 26.76)]; - [bezier2Path addCurveToPoint: CGPointMake(48.03, 33.4) controlPoint1: CGPointMake(48.92, 29.89) controlPoint2: CGPointMake(48.61, 31.7)]; - [bezier2Path addLineToPoint: CGPointMake(38.5, 33.4)]; - [bezier2Path addCurveToPoint: CGPointMake(39.23, 35.2) controlPoint1: CGPointMake(38.71, 34.02) controlPoint2: CGPointMake(38.95, 34.62)]; - [bezier2Path addLineToPoint: CGPointMake(47.3, 35.2)]; - [bezier2Path addCurveToPoint: CGPointMake(46.31, 37) controlPoint1: CGPointMake(47.01, 35.82) controlPoint2: CGPointMake(46.68, 36.42)]; - [bezier2Path addLineToPoint: CGPointMake(40.22, 37)]; - [bezier2Path addCurveToPoint: CGPointMake(41.53, 38.8) controlPoint1: CGPointMake(40.62, 37.63) controlPoint2: CGPointMake(41.05, 38.23)]; - [bezier2Path addLineToPoint: CGPointMake(45, 38.8)]; - [bezier2Path addCurveToPoint: CGPointMake(43.27, 40.6) controlPoint1: CGPointMake(44.47, 39.44) controlPoint2: CGPointMake(43.89, 40.04)]; - [bezier2Path addCurveToPoint: CGPointMake(54.81, 45) controlPoint1: CGPointMake(46.32, 43.33) controlPoint2: CGPointMake(50.36, 45)]; - [bezier2Path addCurveToPoint: CGPointMake(72, 28) controlPoint1: CGPointMake(64.3, 45) controlPoint2: CGPointMake(72, 37.39)]; - [bezier2Path addCurveToPoint: CGPointMake(54.81, 11) controlPoint1: CGPointMake(72, 18.61) controlPoint2: CGPointMake(64.3, 11)]; - [bezier2Path addLineToPoint: CGPointMake(54.81, 11)]; - [bezier2Path addLineToPoint: CGPointMake(54.81, 11)]; - [bezier2Path addLineToPoint: CGPointMake(54.81, 11)]; - [bezier2Path addLineToPoint: CGPointMake(54.81, 11)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(30.6, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(28.45, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(29.73, 25.44)]; - [bezier3Path addLineToPoint: CGPointMake(26.79, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(24.83, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(24.47, 25.48)]; - [bezier3Path addLineToPoint: CGPointMake(23.19, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(21.24, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(22.91, 23.4)]; - [bezier3Path addLineToPoint: CGPointMake(26.26, 23.4)]; - [bezier3Path addLineToPoint: CGPointMake(26.44, 28.85)]; - [bezier3Path addLineToPoint: CGPointMake(28.8, 23.4)]; - [bezier3Path addLineToPoint: CGPointMake(32.29, 23.4)]; - [bezier3Path addLineToPoint: CGPointMake(30.6, 32.21)]; - [bezier3Path addLineToPoint: CGPointMake(30.6, 32.21)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(54.6, 32.12)]; - [bezier4Path addCurveToPoint: CGPointMake(53.06, 32.36) controlPoint1: CGPointMake(54.01, 32.29) controlPoint2: CGPointMake(53.55, 32.36)]; - [bezier4Path addCurveToPoint: CGPointMake(51.36, 30.78) controlPoint1: CGPointMake(51.96, 32.36) controlPoint2: CGPointMake(51.36, 31.8)]; - [bezier4Path addCurveToPoint: CGPointMake(51.42, 30.14) controlPoint1: CGPointMake(51.36, 30.58) controlPoint2: CGPointMake(51.38, 30.37)]; - [bezier4Path addLineToPoint: CGPointMake(51.55, 29.44)]; - [bezier4Path addLineToPoint: CGPointMake(51.65, 28.87)]; - [bezier4Path addLineToPoint: CGPointMake(52.65, 23.4)]; - [bezier4Path addLineToPoint: CGPointMake(54.78, 23.4)]; - [bezier4Path addLineToPoint: CGPointMake(54.47, 25.04)]; - [bezier4Path addLineToPoint: CGPointMake(55.57, 25.04)]; - [bezier4Path addLineToPoint: CGPointMake(55.27, 26.79)]; - [bezier4Path addLineToPoint: CGPointMake(54.17, 26.79)]; - [bezier4Path addLineToPoint: CGPointMake(53.61, 29.78)]; - [bezier4Path addCurveToPoint: CGPointMake(53.57, 30.07) controlPoint1: CGPointMake(53.58, 29.91) controlPoint2: CGPointMake(53.57, 30.01)]; - [bezier4Path addCurveToPoint: CGPointMake(54.3, 30.61) controlPoint1: CGPointMake(53.57, 30.44) controlPoint2: CGPointMake(53.79, 30.61)]; - [bezier4Path addCurveToPoint: CGPointMake(54.88, 30.54) controlPoint1: CGPointMake(54.55, 30.61) controlPoint2: CGPointMake(54.74, 30.58)]; - [bezier4Path addLineToPoint: CGPointMake(54.6, 32.12)]; - [bezier4Path addLineToPoint: CGPointMake(54.6, 32.12)]; - [bezier4Path addLineToPoint: CGPointMake(54.6, 32.12)]; - [bezier4Path addLineToPoint: CGPointMake(54.6, 32.12)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(60.87, 25.1)]; - [bezier5Path addCurveToPoint: CGPointMake(60.63, 25.03) controlPoint1: CGPointMake(60.69, 25.03) controlPoint2: CGPointMake(60.65, 25.03)]; - [bezier5Path addCurveToPoint: CGPointMake(60.44, 24.98) controlPoint1: CGPointMake(60.51, 25) controlPoint2: CGPointMake(60.45, 24.99)]; - [bezier5Path addCurveToPoint: CGPointMake(60.23, 24.97) controlPoint1: CGPointMake(60.38, 24.97) controlPoint2: CGPointMake(60.31, 24.97)]; - [bezier5Path addCurveToPoint: CGPointMake(58.36, 26.13) controlPoint1: CGPointMake(59.52, 24.97) controlPoint2: CGPointMake(59.01, 25.28)]; - [bezier5Path addLineToPoint: CGPointMake(58.55, 25.04)]; - [bezier5Path addLineToPoint: CGPointMake(56.6, 25.04)]; - [bezier5Path addLineToPoint: CGPointMake(55.29, 32.21)]; - [bezier5Path addLineToPoint: CGPointMake(57.44, 32.21)]; - [bezier5Path addCurveToPoint: CGPointMake(59.57, 27.06) controlPoint1: CGPointMake(58.21, 27.83) controlPoint2: CGPointMake(58.54, 27.06)]; - [bezier5Path addCurveToPoint: CGPointMake(59.84, 27.08) controlPoint1: CGPointMake(59.65, 27.06) controlPoint2: CGPointMake(59.74, 27.07)]; - [bezier5Path addLineToPoint: CGPointMake(60.09, 27.13)]; - [bezier5Path addLineToPoint: CGPointMake(60.87, 25.1)]; - [bezier5Path addLineToPoint: CGPointMake(60.87, 25.1)]; - [bezier5Path addLineToPoint: CGPointMake(60.87, 25.1)]; - [bezier5Path addLineToPoint: CGPointMake(60.87, 25.1)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(46.09, 27.31)]; - [bezier6Path addCurveToPoint: CGPointMake(47.74, 29.31) controlPoint1: CGPointMake(46.09, 28.21) controlPoint2: CGPointMake(46.59, 28.84)]; - [bezier6Path addCurveToPoint: CGPointMake(48.76, 30.1) controlPoint1: CGPointMake(48.62, 29.67) controlPoint2: CGPointMake(48.76, 29.77)]; - [bezier6Path addCurveToPoint: CGPointMake(47.51, 30.75) controlPoint1: CGPointMake(48.76, 30.54) controlPoint2: CGPointMake(48.37, 30.75)]; - [bezier6Path addCurveToPoint: CGPointMake(45.56, 30.46) controlPoint1: CGPointMake(46.86, 30.75) controlPoint2: CGPointMake(46.26, 30.66)]; - [bezier6Path addLineToPoint: CGPointMake(45.26, 32.11)]; - [bezier6Path addLineToPoint: CGPointMake(45.36, 32.13)]; - [bezier6Path addLineToPoint: CGPointMake(45.76, 32.2)]; - [bezier6Path addCurveToPoint: CGPointMake(46.33, 32.27) controlPoint1: CGPointMake(45.89, 32.23) controlPoint2: CGPointMake(46.08, 32.25)]; - [bezier6Path addCurveToPoint: CGPointMake(47.52, 32.33) controlPoint1: CGPointMake(46.84, 32.31) controlPoint2: CGPointMake(47.24, 32.33)]; - [bezier6Path addCurveToPoint: CGPointMake(50.88, 29.93) controlPoint1: CGPointMake(49.82, 32.33) controlPoint2: CGPointMake(50.88, 31.57)]; - [bezier6Path addCurveToPoint: CGPointMake(49.34, 27.94) controlPoint1: CGPointMake(50.88, 28.95) controlPoint2: CGPointMake(50.43, 28.37)]; - [bezier6Path addCurveToPoint: CGPointMake(48.33, 27.16) controlPoint1: CGPointMake(48.43, 27.58) controlPoint2: CGPointMake(48.33, 27.5)]; - [bezier6Path addCurveToPoint: CGPointMake(49.39, 26.58) controlPoint1: CGPointMake(48.33, 26.78) controlPoint2: CGPointMake(48.69, 26.58)]; - [bezier6Path addCurveToPoint: CGPointMake(50.95, 26.68) controlPoint1: CGPointMake(49.82, 26.58) controlPoint2: CGPointMake(50.4, 26.62)]; - [bezier6Path addLineToPoint: CGPointMake(51.26, 25.03)]; - [bezier6Path addCurveToPoint: CGPointMake(49.35, 24.89) controlPoint1: CGPointMake(50.7, 24.95) controlPoint2: CGPointMake(49.85, 24.89)]; - [bezier6Path addCurveToPoint: CGPointMake(46.09, 27.31) controlPoint1: CGPointMake(46.92, 24.89) controlPoint2: CGPointMake(46.08, 25.99)]; - [bezier6Path addLineToPoint: CGPointMake(46.09, 27.31)]; - [bezier6Path addLineToPoint: CGPointMake(46.09, 27.31)]; - [bezier6Path addLineToPoint: CGPointMake(46.09, 27.31)]; - [bezier6Path addLineToPoint: CGPointMake(46.09, 27.31)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(37.58, 32.21)]; - [bezier7Path addLineToPoint: CGPointMake(35.8, 32.21)]; - [bezier7Path addLineToPoint: CGPointMake(35.84, 31.47)]; - [bezier7Path addCurveToPoint: CGPointMake(33.58, 32.34) controlPoint1: CGPointMake(35.29, 32.06) controlPoint2: CGPointMake(34.57, 32.34)]; - [bezier7Path addCurveToPoint: CGPointMake(31.62, 30.38) controlPoint1: CGPointMake(32.42, 32.34) controlPoint2: CGPointMake(31.62, 31.54)]; - [bezier7Path addCurveToPoint: CGPointMake(35.39, 27.61) controlPoint1: CGPointMake(31.62, 28.63) controlPoint2: CGPointMake(33.01, 27.61)]; - [bezier7Path addCurveToPoint: CGPointMake(36.27, 27.67) controlPoint1: CGPointMake(35.64, 27.61) controlPoint2: CGPointMake(35.95, 27.63)]; - [bezier7Path addCurveToPoint: CGPointMake(36.35, 27.2) controlPoint1: CGPointMake(36.34, 27.43) controlPoint2: CGPointMake(36.35, 27.33)]; - [bezier7Path addCurveToPoint: CGPointMake(34.98, 26.55) controlPoint1: CGPointMake(36.35, 26.73) controlPoint2: CGPointMake(35.98, 26.55)]; - [bezier7Path addCurveToPoint: CGPointMake(33.19, 26.75) controlPoint1: CGPointMake(34.36, 26.55) controlPoint2: CGPointMake(33.67, 26.63)]; - [bezier7Path addLineToPoint: CGPointMake(32.89, 26.83)]; - [bezier7Path addLineToPoint: CGPointMake(32.7, 26.87)]; - [bezier7Path addLineToPoint: CGPointMake(33, 25.26)]; - [bezier7Path addCurveToPoint: CGPointMake(35.57, 24.88) controlPoint1: CGPointMake(34.07, 24.99) controlPoint2: CGPointMake(34.78, 24.88)]; - [bezier7Path addCurveToPoint: CGPointMake(38.39, 26.98) controlPoint1: CGPointMake(37.42, 24.88) controlPoint2: CGPointMake(38.39, 25.61)]; - [bezier7Path addCurveToPoint: CGPointMake(38.22, 28.4) controlPoint1: CGPointMake(38.39, 27.34) controlPoint2: CGPointMake(38.36, 27.61)]; - [bezier7Path addLineToPoint: CGPointMake(37.77, 30.95)]; - [bezier7Path addLineToPoint: CGPointMake(37.69, 31.4)]; - [bezier7Path addLineToPoint: CGPointMake(37.64, 31.77)]; - [bezier7Path addLineToPoint: CGPointMake(37.6, 32.02)]; - [bezier7Path addLineToPoint: CGPointMake(37.58, 32.21)]; - [bezier7Path addLineToPoint: CGPointMake(37.58, 32.21)]; - [bezier7Path addLineToPoint: CGPointMake(37.58, 32.21)]; - [bezier7Path addLineToPoint: CGPointMake(37.58, 32.21)]; - [bezier7Path closePath]; - [bezier7Path moveToPoint: CGPointMake(36.01, 29.02)]; - [bezier7Path addCurveToPoint: CGPointMake(35.53, 28.99) controlPoint1: CGPointMake(35.79, 28.99) controlPoint2: CGPointMake(35.69, 28.99)]; - [bezier7Path addCurveToPoint: CGPointMake(33.7, 30.08) controlPoint1: CGPointMake(34.32, 28.99) controlPoint2: CGPointMake(33.7, 29.36)]; - [bezier7Path addCurveToPoint: CGPointMake(34.47, 30.81) controlPoint1: CGPointMake(33.7, 30.53) controlPoint2: CGPointMake(34, 30.81)]; - [bezier7Path addCurveToPoint: CGPointMake(36.01, 29.02) controlPoint1: CGPointMake(35.35, 30.81) controlPoint2: CGPointMake(35.98, 30.08)]; - [bezier7Path addLineToPoint: CGPointMake(36.01, 29.02)]; - [bezier7Path addLineToPoint: CGPointMake(36.01, 29.02)]; - [bezier7Path addLineToPoint: CGPointMake(36.01, 29.02)]; - [bezier7Path addLineToPoint: CGPointMake(36.01, 29.02)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(44.63, 32.06)]; - [bezier8Path addCurveToPoint: CGPointMake(42.43, 32.35) controlPoint1: CGPointMake(43.89, 32.25) controlPoint2: CGPointMake(43.18, 32.35)]; - [bezier8Path addCurveToPoint: CGPointMake(38.77, 29.14) controlPoint1: CGPointMake(40.02, 32.35) controlPoint2: CGPointMake(38.77, 31.24)]; - [bezier8Path addCurveToPoint: CGPointMake(42.53, 24.86) controlPoint1: CGPointMake(38.77, 26.68) controlPoint2: CGPointMake(40.36, 24.86)]; - [bezier8Path addCurveToPoint: CGPointMake(45.42, 27.47) controlPoint1: CGPointMake(44.29, 24.86) controlPoint2: CGPointMake(45.42, 25.88)]; - [bezier8Path addCurveToPoint: CGPointMake(45.16, 29.24) controlPoint1: CGPointMake(45.42, 28) controlPoint2: CGPointMake(45.35, 28.51)]; - [bezier8Path addLineToPoint: CGPointMake(40.89, 29.24)]; - [bezier8Path addCurveToPoint: CGPointMake(40.87, 29.47) controlPoint1: CGPointMake(40.87, 29.35) controlPoint2: CGPointMake(40.87, 29.4)]; - [bezier8Path addCurveToPoint: CGPointMake(42.75, 30.72) controlPoint1: CGPointMake(40.87, 30.3) controlPoint2: CGPointMake(41.5, 30.72)]; - [bezier8Path addCurveToPoint: CGPointMake(44.98, 30.27) controlPoint1: CGPointMake(43.52, 30.72) controlPoint2: CGPointMake(44.21, 30.58)]; - [bezier8Path addLineToPoint: CGPointMake(44.63, 32.06)]; - [bezier8Path addLineToPoint: CGPointMake(44.63, 32.06)]; - [bezier8Path addLineToPoint: CGPointMake(44.63, 32.06)]; - [bezier8Path addLineToPoint: CGPointMake(44.63, 32.06)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(43.48, 27.79)]; - [bezier8Path addCurveToPoint: CGPointMake(43.5, 27.43) controlPoint1: CGPointMake(43.49, 27.64) controlPoint2: CGPointMake(43.5, 27.52)]; - [bezier8Path addCurveToPoint: CGPointMake(42.48, 26.5) controlPoint1: CGPointMake(43.5, 26.84) controlPoint2: CGPointMake(43.12, 26.5)]; - [bezier8Path addCurveToPoint: CGPointMake(41.11, 27.79) controlPoint1: CGPointMake(41.8, 26.5) controlPoint2: CGPointMake(41.31, 26.96)]; - [bezier8Path addLineToPoint: CGPointMake(43.48, 27.79)]; - [bezier8Path addLineToPoint: CGPointMake(43.48, 27.79)]; - [bezier8Path addLineToPoint: CGPointMake(43.48, 27.79)]; - [bezier8Path addLineToPoint: CGPointMake(43.48, 27.79)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(67.55, 28.96)]; - [bezier9Path addCurveToPoint: CGPointMake(63.38, 32.4) controlPoint1: CGPointMake(67.23, 31.35) controlPoint2: CGPointMake(65.57, 32.4)]; - [bezier9Path addCurveToPoint: CGPointMake(59.96, 29.1) controlPoint1: CGPointMake(60.95, 32.4) controlPoint2: CGPointMake(59.96, 30.92)]; - [bezier9Path addCurveToPoint: CGPointMake(64.19, 24.84) controlPoint1: CGPointMake(59.96, 26.56) controlPoint2: CGPointMake(61.63, 24.84)]; - [bezier9Path addCurveToPoint: CGPointMake(67.6, 28.07) controlPoint1: CGPointMake(66.42, 24.84) controlPoint2: CGPointMake(67.6, 26.25)]; - [bezier9Path addCurveToPoint: CGPointMake(67.55, 28.96) controlPoint1: CGPointMake(67.6, 28.52) controlPoint2: CGPointMake(67.6, 28.55)]; - [bezier9Path addLineToPoint: CGPointMake(67.55, 28.96)]; - [bezier9Path addLineToPoint: CGPointMake(67.55, 28.96)]; - [bezier9Path addLineToPoint: CGPointMake(67.55, 28.96)]; - [bezier9Path addLineToPoint: CGPointMake(67.55, 28.96)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(65.33, 28.05)]; - [bezier9Path addCurveToPoint: CGPointMake(64.15, 26.59) controlPoint1: CGPointMake(65.33, 27.3) controlPoint2: CGPointMake(65.03, 26.59)]; - [bezier9Path addCurveToPoint: CGPointMake(62.38, 29.04) controlPoint1: CGPointMake(63.06, 26.59) controlPoint2: CGPointMake(62.38, 27.89)]; - [bezier9Path addCurveToPoint: CGPointMake(63.61, 30.66) controlPoint1: CGPointMake(62.38, 30.02) controlPoint2: CGPointMake(62.84, 30.67)]; - [bezier9Path addCurveToPoint: CGPointMake(65.26, 28.9) controlPoint1: CGPointMake(64.08, 30.66) controlPoint2: CGPointMake(65.07, 30.02)]; - [bezier9Path addCurveToPoint: CGPointMake(65.33, 28.05) controlPoint1: CGPointMake(65.31, 28.64) controlPoint2: CGPointMake(65.33, 28.35)]; - [bezier9Path addLineToPoint: CGPointMake(65.33, 28.05)]; - [bezier9Path addLineToPoint: CGPointMake(65.33, 28.05)]; - [bezier9Path addLineToPoint: CGPointMake(65.33, 28.05)]; - [bezier9Path addLineToPoint: CGPointMake(65.33, 28.05)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier9Path fill]; - } - } - } -} -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.h deleted file mode 100755 index 6ad97efe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIMasterCardVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.m deleted file mode 100755 index 7a4a371d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIMasterCardVectorArtView.m +++ /dev/null @@ -1,3247 +0,0 @@ -#import "BTUIMasterCardVectorArtView.h" - -@implementation BTUIMasterCardVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color1 = [UIColor colorWithRed: 0.93 green: 0.619 blue: 0.186 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 0.8 green: 0.039 blue: 0.147 alpha: 1]; - UIColor* color3 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - - //// Page-1 - { - //// MasterCard - { - //// Group 4 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(54.97, 45)]; - [bezierPath addLineToPoint: CGPointMake(55.85, 44.98)]; - [bezierPath addLineToPoint: CGPointMake(56.71, 44.91)]; - [bezierPath addLineToPoint: CGPointMake(57.56, 44.81)]; - [bezierPath addLineToPoint: CGPointMake(58.4, 44.66)]; - [bezierPath addLineToPoint: CGPointMake(59.22, 44.47)]; - [bezierPath addLineToPoint: CGPointMake(60.03, 44.24)]; - [bezierPath addLineToPoint: CGPointMake(60.82, 43.97)]; - [bezierPath addLineToPoint: CGPointMake(61.6, 43.66)]; - [bezierPath addLineToPoint: CGPointMake(62.35, 43.32)]; - [bezierPath addLineToPoint: CGPointMake(63.09, 42.95)]; - [bezierPath addLineToPoint: CGPointMake(63.8, 42.53)]; - [bezierPath addLineToPoint: CGPointMake(64.49, 42.09)]; - [bezierPath addLineToPoint: CGPointMake(65.16, 41.62)]; - [bezierPath addLineToPoint: CGPointMake(65.8, 41.11)]; - [bezierPath addLineToPoint: CGPointMake(66.42, 40.58)]; - [bezierPath addLineToPoint: CGPointMake(67.01, 40.01)]; - [bezierPath addLineToPoint: CGPointMake(67.58, 39.42)]; - [bezierPath addLineToPoint: CGPointMake(68.11, 38.8)]; - [bezierPath addLineToPoint: CGPointMake(68.62, 38.16)]; - [bezierPath addLineToPoint: CGPointMake(69.09, 37.49)]; - [bezierPath addLineToPoint: CGPointMake(69.53, 36.8)]; - [bezierPath addLineToPoint: CGPointMake(69.95, 36.09)]; - [bezierPath addLineToPoint: CGPointMake(70.32, 35.35)]; - [bezierPath addLineToPoint: CGPointMake(70.66, 34.6)]; - [bezierPath addLineToPoint: CGPointMake(70.97, 33.82)]; - [bezierPath addLineToPoint: CGPointMake(71.24, 33.03)]; - [bezierPath addLineToPoint: CGPointMake(71.47, 32.22)]; - [bezierPath addLineToPoint: CGPointMake(71.66, 31.4)]; - [bezierPath addLineToPoint: CGPointMake(71.81, 30.56)]; - [bezierPath addLineToPoint: CGPointMake(71.91, 29.71)]; - [bezierPath addLineToPoint: CGPointMake(71.98, 28.85)]; - [bezierPath addLineToPoint: CGPointMake(72, 27.97)]; - [bezierPath addLineToPoint: CGPointMake(71.98, 27.1)]; - [bezierPath addLineToPoint: CGPointMake(71.91, 26.24)]; - [bezierPath addLineToPoint: CGPointMake(71.81, 25.39)]; - [bezierPath addLineToPoint: CGPointMake(71.66, 24.56)]; - [bezierPath addLineToPoint: CGPointMake(71.47, 23.74)]; - [bezierPath addLineToPoint: CGPointMake(71.24, 22.93)]; - [bezierPath addLineToPoint: CGPointMake(70.97, 22.14)]; - [bezierPath addLineToPoint: CGPointMake(70.66, 21.37)]; - [bezierPath addLineToPoint: CGPointMake(70.32, 20.62)]; - [bezierPath addLineToPoint: CGPointMake(69.95, 19.89)]; - [bezierPath addLineToPoint: CGPointMake(69.53, 19.18)]; - [bezierPath addLineToPoint: CGPointMake(69.09, 18.49)]; - [bezierPath addLineToPoint: CGPointMake(68.62, 17.82)]; - [bezierPath addLineToPoint: CGPointMake(68.11, 17.19)]; - [bezierPath addLineToPoint: CGPointMake(67.58, 16.57)]; - [bezierPath addLineToPoint: CGPointMake(67.01, 15.98)]; - [bezierPath addLineToPoint: CGPointMake(66.42, 15.42)]; - [bezierPath addLineToPoint: CGPointMake(65.8, 14.88)]; - [bezierPath addLineToPoint: CGPointMake(65.16, 14.38)]; - [bezierPath addLineToPoint: CGPointMake(64.49, 13.9)]; - [bezierPath addLineToPoint: CGPointMake(63.8, 13.46)]; - [bezierPath addLineToPoint: CGPointMake(63.09, 13.05)]; - [bezierPath addLineToPoint: CGPointMake(62.35, 12.68)]; - [bezierPath addLineToPoint: CGPointMake(61.6, 12.34)]; - [bezierPath addLineToPoint: CGPointMake(60.82, 12.03)]; - [bezierPath addLineToPoint: CGPointMake(60.03, 11.76)]; - [bezierPath addLineToPoint: CGPointMake(59.22, 11.53)]; - [bezierPath addLineToPoint: CGPointMake(58.4, 11.34)]; - [bezierPath addLineToPoint: CGPointMake(57.56, 11.19)]; - [bezierPath addLineToPoint: CGPointMake(56.71, 11.09)]; - [bezierPath addLineToPoint: CGPointMake(55.85, 11.02)]; - [bezierPath addLineToPoint: CGPointMake(54.97, 11)]; - [bezierPath addLineToPoint: CGPointMake(54.1, 11.02)]; - [bezierPath addLineToPoint: CGPointMake(53.23, 11.09)]; - [bezierPath addLineToPoint: CGPointMake(52.38, 11.19)]; - [bezierPath addLineToPoint: CGPointMake(51.54, 11.34)]; - [bezierPath addLineToPoint: CGPointMake(50.72, 11.53)]; - [bezierPath addLineToPoint: CGPointMake(49.92, 11.76)]; - [bezierPath addLineToPoint: CGPointMake(49.13, 12.03)]; - [bezierPath addLineToPoint: CGPointMake(48.36, 12.34)]; - [bezierPath addLineToPoint: CGPointMake(47.61, 12.68)]; - [bezierPath addLineToPoint: CGPointMake(46.88, 13.05)]; - [bezierPath addLineToPoint: CGPointMake(46.17, 13.46)]; - [bezierPath addLineToPoint: CGPointMake(45.48, 13.9)]; - [bezierPath addLineToPoint: CGPointMake(44.81, 14.38)]; - [bezierPath addLineToPoint: CGPointMake(44.17, 14.88)]; - [bezierPath addLineToPoint: CGPointMake(43.56, 15.42)]; - [bezierPath addLineToPoint: CGPointMake(42.97, 15.98)]; - [bezierPath addLineToPoint: CGPointMake(42.4, 16.57)]; - [bezierPath addLineToPoint: CGPointMake(41.87, 17.19)]; - [bezierPath addLineToPoint: CGPointMake(41.37, 17.82)]; - [bezierPath addLineToPoint: CGPointMake(40.9, 18.49)]; - [bezierPath addLineToPoint: CGPointMake(40.45, 19.18)]; - [bezierPath addLineToPoint: CGPointMake(40.05, 19.89)]; - [bezierPath addLineToPoint: CGPointMake(39.67, 20.62)]; - [bezierPath addLineToPoint: CGPointMake(39.33, 21.37)]; - [bezierPath addLineToPoint: CGPointMake(39.03, 22.14)]; - [bezierPath addLineToPoint: CGPointMake(38.76, 22.93)]; - [bezierPath addLineToPoint: CGPointMake(38.53, 23.74)]; - [bezierPath addLineToPoint: CGPointMake(38.34, 24.56)]; - [bezierPath addLineToPoint: CGPointMake(38.19, 25.39)]; - [bezierPath addLineToPoint: CGPointMake(38.09, 26.24)]; - [bezierPath addLineToPoint: CGPointMake(38.02, 27.1)]; - [bezierPath addLineToPoint: CGPointMake(38, 27.97)]; - [bezierPath addLineToPoint: CGPointMake(38.02, 28.85)]; - [bezierPath addLineToPoint: CGPointMake(38.09, 29.71)]; - [bezierPath addLineToPoint: CGPointMake(38.19, 30.56)]; - [bezierPath addLineToPoint: CGPointMake(38.34, 31.4)]; - [bezierPath addLineToPoint: CGPointMake(38.53, 32.22)]; - [bezierPath addLineToPoint: CGPointMake(38.76, 33.03)]; - [bezierPath addLineToPoint: CGPointMake(39.03, 33.82)]; - [bezierPath addLineToPoint: CGPointMake(39.33, 34.6)]; - [bezierPath addLineToPoint: CGPointMake(39.67, 35.35)]; - [bezierPath addLineToPoint: CGPointMake(40.05, 36.09)]; - [bezierPath addLineToPoint: CGPointMake(40.45, 36.8)]; - [bezierPath addLineToPoint: CGPointMake(40.9, 37.49)]; - [bezierPath addLineToPoint: CGPointMake(41.37, 38.16)]; - [bezierPath addLineToPoint: CGPointMake(41.87, 38.8)]; - [bezierPath addLineToPoint: CGPointMake(42.4, 39.42)]; - [bezierPath addLineToPoint: CGPointMake(42.97, 40.01)]; - [bezierPath addLineToPoint: CGPointMake(43.56, 40.58)]; - [bezierPath addLineToPoint: CGPointMake(44.17, 41.11)]; - [bezierPath addLineToPoint: CGPointMake(44.81, 41.62)]; - [bezierPath addLineToPoint: CGPointMake(45.48, 42.09)]; - [bezierPath addLineToPoint: CGPointMake(46.17, 42.53)]; - [bezierPath addLineToPoint: CGPointMake(46.88, 42.95)]; - [bezierPath addLineToPoint: CGPointMake(47.61, 43.32)]; - [bezierPath addLineToPoint: CGPointMake(48.36, 43.66)]; - [bezierPath addLineToPoint: CGPointMake(49.13, 43.97)]; - [bezierPath addLineToPoint: CGPointMake(49.92, 44.24)]; - [bezierPath addLineToPoint: CGPointMake(50.72, 44.47)]; - [bezierPath addLineToPoint: CGPointMake(51.54, 44.66)]; - [bezierPath addLineToPoint: CGPointMake(52.38, 44.81)]; - [bezierPath addLineToPoint: CGPointMake(53.23, 44.91)]; - [bezierPath addLineToPoint: CGPointMake(54.1, 44.98)]; - [bezierPath addLineToPoint: CGPointMake(54.97, 45)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(33.03, 45)]; - [bezier2Path addLineToPoint: CGPointMake(33.9, 44.98)]; - [bezier2Path addLineToPoint: CGPointMake(34.77, 44.91)]; - [bezier2Path addLineToPoint: CGPointMake(35.62, 44.81)]; - [bezier2Path addLineToPoint: CGPointMake(36.46, 44.66)]; - [bezier2Path addLineToPoint: CGPointMake(37.28, 44.47)]; - [bezier2Path addLineToPoint: CGPointMake(38.08, 44.24)]; - [bezier2Path addLineToPoint: CGPointMake(38.87, 43.97)]; - [bezier2Path addLineToPoint: CGPointMake(39.64, 43.66)]; - [bezier2Path addLineToPoint: CGPointMake(40.39, 43.32)]; - [bezier2Path addLineToPoint: CGPointMake(41.12, 42.95)]; - [bezier2Path addLineToPoint: CGPointMake(41.83, 42.53)]; - [bezier2Path addLineToPoint: CGPointMake(42.52, 42.09)]; - [bezier2Path addLineToPoint: CGPointMake(43.19, 41.62)]; - [bezier2Path addLineToPoint: CGPointMake(43.83, 41.11)]; - [bezier2Path addLineToPoint: CGPointMake(44.44, 40.58)]; - [bezier2Path addLineToPoint: CGPointMake(45.03, 40.01)]; - [bezier2Path addLineToPoint: CGPointMake(45.6, 39.42)]; - [bezier2Path addLineToPoint: CGPointMake(46.13, 38.8)]; - [bezier2Path addLineToPoint: CGPointMake(46.63, 38.16)]; - [bezier2Path addLineToPoint: CGPointMake(47.1, 37.49)]; - [bezier2Path addLineToPoint: CGPointMake(47.55, 36.8)]; - [bezier2Path addLineToPoint: CGPointMake(47.95, 36.09)]; - [bezier2Path addLineToPoint: CGPointMake(48.33, 35.35)]; - [bezier2Path addLineToPoint: CGPointMake(48.67, 34.6)]; - [bezier2Path addLineToPoint: CGPointMake(48.97, 33.82)]; - [bezier2Path addLineToPoint: CGPointMake(49.24, 33.03)]; - [bezier2Path addLineToPoint: CGPointMake(49.47, 32.22)]; - [bezier2Path addLineToPoint: CGPointMake(49.66, 31.4)]; - [bezier2Path addLineToPoint: CGPointMake(49.81, 30.56)]; - [bezier2Path addLineToPoint: CGPointMake(49.91, 29.71)]; - [bezier2Path addLineToPoint: CGPointMake(49.98, 28.85)]; - [bezier2Path addLineToPoint: CGPointMake(50, 27.97)]; - [bezier2Path addLineToPoint: CGPointMake(49.98, 27.1)]; - [bezier2Path addLineToPoint: CGPointMake(49.91, 26.24)]; - [bezier2Path addLineToPoint: CGPointMake(49.81, 25.39)]; - [bezier2Path addLineToPoint: CGPointMake(49.66, 24.56)]; - [bezier2Path addLineToPoint: CGPointMake(49.47, 23.74)]; - [bezier2Path addLineToPoint: CGPointMake(49.24, 22.93)]; - [bezier2Path addLineToPoint: CGPointMake(48.97, 22.14)]; - [bezier2Path addLineToPoint: CGPointMake(48.67, 21.37)]; - [bezier2Path addLineToPoint: CGPointMake(48.33, 20.62)]; - [bezier2Path addLineToPoint: CGPointMake(47.95, 19.89)]; - [bezier2Path addLineToPoint: CGPointMake(47.55, 19.18)]; - [bezier2Path addLineToPoint: CGPointMake(47.1, 18.49)]; - [bezier2Path addLineToPoint: CGPointMake(46.63, 17.82)]; - [bezier2Path addLineToPoint: CGPointMake(46.13, 17.19)]; - [bezier2Path addLineToPoint: CGPointMake(45.6, 16.57)]; - [bezier2Path addLineToPoint: CGPointMake(45.03, 15.98)]; - [bezier2Path addLineToPoint: CGPointMake(44.44, 15.42)]; - [bezier2Path addLineToPoint: CGPointMake(43.83, 14.88)]; - [bezier2Path addLineToPoint: CGPointMake(43.19, 14.38)]; - [bezier2Path addLineToPoint: CGPointMake(42.52, 13.9)]; - [bezier2Path addLineToPoint: CGPointMake(41.83, 13.46)]; - [bezier2Path addLineToPoint: CGPointMake(41.12, 13.05)]; - [bezier2Path addLineToPoint: CGPointMake(40.39, 12.68)]; - [bezier2Path addLineToPoint: CGPointMake(39.64, 12.34)]; - [bezier2Path addLineToPoint: CGPointMake(38.87, 12.03)]; - [bezier2Path addLineToPoint: CGPointMake(38.08, 11.76)]; - [bezier2Path addLineToPoint: CGPointMake(37.28, 11.53)]; - [bezier2Path addLineToPoint: CGPointMake(36.46, 11.34)]; - [bezier2Path addLineToPoint: CGPointMake(35.62, 11.19)]; - [bezier2Path addLineToPoint: CGPointMake(34.77, 11.09)]; - [bezier2Path addLineToPoint: CGPointMake(33.9, 11.02)]; - [bezier2Path addLineToPoint: CGPointMake(33.03, 11)]; - [bezier2Path addLineToPoint: CGPointMake(32.15, 11.02)]; - [bezier2Path addLineToPoint: CGPointMake(31.29, 11.09)]; - [bezier2Path addLineToPoint: CGPointMake(30.44, 11.19)]; - [bezier2Path addLineToPoint: CGPointMake(29.6, 11.34)]; - [bezier2Path addLineToPoint: CGPointMake(28.78, 11.53)]; - [bezier2Path addLineToPoint: CGPointMake(27.97, 11.76)]; - [bezier2Path addLineToPoint: CGPointMake(27.18, 12.03)]; - [bezier2Path addLineToPoint: CGPointMake(26.4, 12.34)]; - [bezier2Path addLineToPoint: CGPointMake(25.65, 12.68)]; - [bezier2Path addLineToPoint: CGPointMake(24.91, 13.05)]; - [bezier2Path addLineToPoint: CGPointMake(24.2, 13.46)]; - [bezier2Path addLineToPoint: CGPointMake(23.51, 13.9)]; - [bezier2Path addLineToPoint: CGPointMake(22.84, 14.38)]; - [bezier2Path addLineToPoint: CGPointMake(22.2, 14.88)]; - [bezier2Path addLineToPoint: CGPointMake(21.58, 15.42)]; - [bezier2Path addLineToPoint: CGPointMake(20.99, 15.98)]; - [bezier2Path addLineToPoint: CGPointMake(20.42, 16.57)]; - [bezier2Path addLineToPoint: CGPointMake(19.89, 17.19)]; - [bezier2Path addLineToPoint: CGPointMake(19.38, 17.82)]; - [bezier2Path addLineToPoint: CGPointMake(18.91, 18.49)]; - [bezier2Path addLineToPoint: CGPointMake(18.47, 19.18)]; - [bezier2Path addLineToPoint: CGPointMake(18.05, 19.89)]; - [bezier2Path addLineToPoint: CGPointMake(17.68, 20.62)]; - [bezier2Path addLineToPoint: CGPointMake(17.34, 21.37)]; - [bezier2Path addLineToPoint: CGPointMake(17.03, 22.14)]; - [bezier2Path addLineToPoint: CGPointMake(16.76, 22.93)]; - [bezier2Path addLineToPoint: CGPointMake(16.53, 23.74)]; - [bezier2Path addLineToPoint: CGPointMake(16.34, 24.56)]; - [bezier2Path addLineToPoint: CGPointMake(16.2, 25.39)]; - [bezier2Path addLineToPoint: CGPointMake(16.09, 26.24)]; - [bezier2Path addLineToPoint: CGPointMake(16.02, 27.1)]; - [bezier2Path addLineToPoint: CGPointMake(16, 27.97)]; - [bezier2Path addLineToPoint: CGPointMake(16.02, 28.85)]; - [bezier2Path addLineToPoint: CGPointMake(16.09, 29.71)]; - [bezier2Path addLineToPoint: CGPointMake(16.2, 30.56)]; - [bezier2Path addLineToPoint: CGPointMake(16.34, 31.4)]; - [bezier2Path addLineToPoint: CGPointMake(16.53, 32.22)]; - [bezier2Path addLineToPoint: CGPointMake(16.76, 33.03)]; - [bezier2Path addLineToPoint: CGPointMake(17.03, 33.82)]; - [bezier2Path addLineToPoint: CGPointMake(17.34, 34.6)]; - [bezier2Path addLineToPoint: CGPointMake(17.68, 35.35)]; - [bezier2Path addLineToPoint: CGPointMake(18.05, 36.09)]; - [bezier2Path addLineToPoint: CGPointMake(18.47, 36.8)]; - [bezier2Path addLineToPoint: CGPointMake(18.91, 37.49)]; - [bezier2Path addLineToPoint: CGPointMake(19.38, 38.16)]; - [bezier2Path addLineToPoint: CGPointMake(19.89, 38.8)]; - [bezier2Path addLineToPoint: CGPointMake(20.42, 39.42)]; - [bezier2Path addLineToPoint: CGPointMake(20.99, 40.01)]; - [bezier2Path addLineToPoint: CGPointMake(21.58, 40.58)]; - [bezier2Path addLineToPoint: CGPointMake(22.2, 41.11)]; - [bezier2Path addLineToPoint: CGPointMake(22.84, 41.62)]; - [bezier2Path addLineToPoint: CGPointMake(23.51, 42.09)]; - [bezier2Path addLineToPoint: CGPointMake(24.2, 42.53)]; - [bezier2Path addLineToPoint: CGPointMake(24.91, 42.95)]; - [bezier2Path addLineToPoint: CGPointMake(25.65, 43.32)]; - [bezier2Path addLineToPoint: CGPointMake(26.4, 43.66)]; - [bezier2Path addLineToPoint: CGPointMake(27.18, 43.97)]; - [bezier2Path addLineToPoint: CGPointMake(27.97, 44.24)]; - [bezier2Path addLineToPoint: CGPointMake(28.78, 44.47)]; - [bezier2Path addLineToPoint: CGPointMake(29.6, 44.66)]; - [bezier2Path addLineToPoint: CGPointMake(30.44, 44.81)]; - [bezier2Path addLineToPoint: CGPointMake(31.29, 44.91)]; - [bezier2Path addLineToPoint: CGPointMake(32.15, 44.98)]; - [bezier2Path addLineToPoint: CGPointMake(33.03, 45)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(41.68, 17.72)]; - [bezier3Path addLineToPoint: CGPointMake(50.65, 17.72)]; - [bezier3Path addLineToPoint: CGPointMake(50.65, 16.81)]; - [bezier3Path addLineToPoint: CGPointMake(42.46, 16.81)]; - [bezier3Path addLineToPoint: CGPointMake(41.68, 17.72)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(40.34, 19.76)]; - [bezier4Path addLineToPoint: CGPointMake(50.65, 19.76)]; - [bezier4Path addLineToPoint: CGPointMake(50.65, 18.85)]; - [bezier4Path addLineToPoint: CGPointMake(40.88, 18.85)]; - [bezier4Path addLineToPoint: CGPointMake(40.34, 19.76)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(39.34, 21.8)]; - [bezier5Path addLineToPoint: CGPointMake(50.65, 21.8)]; - [bezier5Path addLineToPoint: CGPointMake(50.65, 20.88)]; - [bezier5Path addLineToPoint: CGPointMake(39.73, 20.88)]; - [bezier5Path addLineToPoint: CGPointMake(39.34, 21.8)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(38.65, 23.83)]; - [bezier6Path addLineToPoint: CGPointMake(50.65, 23.83)]; - [bezier6Path addLineToPoint: CGPointMake(50.65, 22.92)]; - [bezier6Path addLineToPoint: CGPointMake(38.93, 22.92)]; - [bezier6Path addLineToPoint: CGPointMake(38.65, 23.83)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(39.05, 33.68)]; - [bezier7Path addLineToPoint: CGPointMake(50.68, 33.68)]; - [bezier7Path addLineToPoint: CGPointMake(50.68, 32.77)]; - [bezier7Path addLineToPoint: CGPointMake(38.76, 32.77)]; - [bezier7Path addLineToPoint: CGPointMake(39.05, 33.68)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(39.9, 35.72)]; - [bezier8Path addLineToPoint: CGPointMake(50.68, 35.72)]; - [bezier8Path addLineToPoint: CGPointMake(50.68, 34.8)]; - [bezier8Path addLineToPoint: CGPointMake(39.48, 34.8)]; - [bezier8Path addLineToPoint: CGPointMake(39.9, 35.72)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(41.11, 37.75)]; - [bezier9Path addLineToPoint: CGPointMake(50.68, 37.75)]; - [bezier9Path addLineToPoint: CGPointMake(50.68, 36.84)]; - [bezier9Path addLineToPoint: CGPointMake(40.54, 36.84)]; - [bezier9Path addLineToPoint: CGPointMake(41.11, 37.75)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier9Path fill]; - - - //// Bezier 10 Drawing - UIBezierPath* bezier10Path = [UIBezierPath bezierPath]; - [bezier10Path moveToPoint: CGPointMake(42.77, 39.79)]; - [bezier10Path addLineToPoint: CGPointMake(50.68, 39.79)]; - [bezier10Path addLineToPoint: CGPointMake(50.68, 38.87)]; - [bezier10Path addLineToPoint: CGPointMake(41.97, 38.87)]; - [bezier10Path addLineToPoint: CGPointMake(42.77, 39.79)]; - [bezier10Path closePath]; - bezier10Path.miterLimit = 4; - - bezier10Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier10Path fill]; - - - //// Bezier 11 Drawing - UIBezierPath* bezier11Path = [UIBezierPath bezierPath]; - [bezier11Path moveToPoint: CGPointMake(38.24, 25.87)]; - [bezier11Path addLineToPoint: CGPointMake(50.65, 25.87)]; - [bezier11Path addLineToPoint: CGPointMake(50.65, 24.95)]; - [bezier11Path addLineToPoint: CGPointMake(38.42, 24.95)]; - [bezier11Path addLineToPoint: CGPointMake(38.24, 25.87)]; - [bezier11Path closePath]; - bezier11Path.miterLimit = 4; - - bezier11Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier11Path fill]; - - - //// Bezier 12 Drawing - UIBezierPath* bezier12Path = [UIBezierPath bezierPath]; - [bezier12Path moveToPoint: CGPointMake(45.8, 31.65)]; - [bezier12Path addLineToPoint: CGPointMake(50.53, 31.65)]; - [bezier12Path addLineToPoint: CGPointMake(50.53, 30.73)]; - [bezier12Path addLineToPoint: CGPointMake(45.97, 30.73)]; - [bezier12Path addLineToPoint: CGPointMake(45.8, 31.65)]; - [bezier12Path closePath]; - bezier12Path.miterLimit = 4; - - bezier12Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier12Path fill]; - - - //// Bezier 13 Drawing - UIBezierPath* bezier13Path = [UIBezierPath bezierPath]; - [bezier13Path moveToPoint: CGPointMake(46.18, 29.62)]; - [bezier13Path addLineToPoint: CGPointMake(50.53, 29.62)]; - [bezier13Path addLineToPoint: CGPointMake(50.53, 28.7)]; - [bezier13Path addLineToPoint: CGPointMake(46.35, 28.7)]; - [bezier13Path addLineToPoint: CGPointMake(46.18, 29.62)]; - [bezier13Path closePath]; - bezier13Path.miterLimit = 4; - - bezier13Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier13Path fill]; - - - //// Bezier 14 Drawing - UIBezierPath* bezier14Path = [UIBezierPath bezierPath]; - [bezier14Path moveToPoint: CGPointMake(37.93, 28.7)]; - [bezier14Path addLineToPoint: CGPointMake(39.16, 28.7)]; - [bezier14Path addLineToPoint: CGPointMake(39.16, 29.62)]; - [bezier14Path addLineToPoint: CGPointMake(37.99, 29.62)]; - [bezier14Path addLineToPoint: CGPointMake(37.93, 28.7)]; - [bezier14Path closePath]; - bezier14Path.miterLimit = 4; - - bezier14Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier14Path fill]; - - - //// Bezier 15 Drawing - UIBezierPath* bezier15Path = [UIBezierPath bezierPath]; - [bezier15Path moveToPoint: CGPointMake(35.63, 27.59)]; - [bezier15Path addLineToPoint: CGPointMake(35.55, 27.58)]; - [bezier15Path addLineToPoint: CGPointMake(35.48, 27.57)]; - [bezier15Path addLineToPoint: CGPointMake(35.4, 27.56)]; - [bezier15Path addLineToPoint: CGPointMake(35.33, 27.55)]; - [bezier15Path addLineToPoint: CGPointMake(35.26, 27.53)]; - [bezier15Path addLineToPoint: CGPointMake(35.18, 27.52)]; - [bezier15Path addLineToPoint: CGPointMake(35.11, 27.51)]; - [bezier15Path addLineToPoint: CGPointMake(35.03, 27.5)]; - [bezier15Path addLineToPoint: CGPointMake(34.95, 27.49)]; - [bezier15Path addLineToPoint: CGPointMake(34.86, 27.48)]; - [bezier15Path addLineToPoint: CGPointMake(34.76, 27.48)]; - [bezier15Path addLineToPoint: CGPointMake(34.65, 27.47)]; - [bezier15Path addLineToPoint: CGPointMake(34.53, 27.47)]; - [bezier15Path addLineToPoint: CGPointMake(34.4, 27.48)]; - [bezier15Path addLineToPoint: CGPointMake(34.25, 27.49)]; - [bezier15Path addLineToPoint: CGPointMake(34.09, 27.5)]; - [bezier15Path addLineToPoint: CGPointMake(33.97, 27.52)]; - [bezier15Path addLineToPoint: CGPointMake(33.86, 27.53)]; - [bezier15Path addLineToPoint: CGPointMake(33.77, 27.57)]; - [bezier15Path addLineToPoint: CGPointMake(33.68, 27.6)]; - [bezier15Path addLineToPoint: CGPointMake(33.6, 27.64)]; - [bezier15Path addLineToPoint: CGPointMake(33.53, 27.69)]; - [bezier15Path addLineToPoint: CGPointMake(33.47, 27.74)]; - [bezier15Path addLineToPoint: CGPointMake(33.42, 27.8)]; - [bezier15Path addLineToPoint: CGPointMake(33.39, 27.86)]; - [bezier15Path addLineToPoint: CGPointMake(33.36, 27.92)]; - [bezier15Path addLineToPoint: CGPointMake(33.35, 27.99)]; - [bezier15Path addLineToPoint: CGPointMake(33.35, 28.06)]; - [bezier15Path addLineToPoint: CGPointMake(33.36, 28.13)]; - [bezier15Path addLineToPoint: CGPointMake(33.39, 28.21)]; - [bezier15Path addLineToPoint: CGPointMake(33.43, 28.28)]; - [bezier15Path addLineToPoint: CGPointMake(33.49, 28.35)]; - [bezier15Path addLineToPoint: CGPointMake(33.6, 28.46)]; - [bezier15Path addLineToPoint: CGPointMake(33.74, 28.55)]; - [bezier15Path addLineToPoint: CGPointMake(33.9, 28.62)]; - [bezier15Path addLineToPoint: CGPointMake(34.07, 28.68)]; - [bezier15Path addLineToPoint: CGPointMake(34.25, 28.74)]; - [bezier15Path addLineToPoint: CGPointMake(34.44, 28.8)]; - [bezier15Path addLineToPoint: CGPointMake(34.63, 28.87)]; - [bezier15Path addLineToPoint: CGPointMake(34.81, 28.95)]; - [bezier15Path addLineToPoint: CGPointMake(34.98, 29.04)]; - [bezier15Path addLineToPoint: CGPointMake(35.14, 29.16)]; - [bezier15Path addLineToPoint: CGPointMake(35.28, 29.3)]; - [bezier15Path addLineToPoint: CGPointMake(35.4, 29.48)]; - [bezier15Path addLineToPoint: CGPointMake(35.49, 29.7)]; - [bezier15Path addLineToPoint: CGPointMake(35.55, 29.95)]; - [bezier15Path addLineToPoint: CGPointMake(35.57, 30.26)]; - [bezier15Path addLineToPoint: CGPointMake(35.55, 30.62)]; - [bezier15Path addLineToPoint: CGPointMake(35.51, 30.89)]; - [bezier15Path addLineToPoint: CGPointMake(35.44, 31.12)]; - [bezier15Path addLineToPoint: CGPointMake(35.35, 31.34)]; - [bezier15Path addLineToPoint: CGPointMake(35.24, 31.53)]; - [bezier15Path addLineToPoint: CGPointMake(35.11, 31.69)]; - [bezier15Path addLineToPoint: CGPointMake(34.96, 31.83)]; - [bezier15Path addLineToPoint: CGPointMake(34.8, 31.96)]; - [bezier15Path addLineToPoint: CGPointMake(34.62, 32.07)]; - [bezier15Path addLineToPoint: CGPointMake(34.44, 32.15)]; - [bezier15Path addLineToPoint: CGPointMake(34.25, 32.23)]; - [bezier15Path addLineToPoint: CGPointMake(34.06, 32.28)]; - [bezier15Path addLineToPoint: CGPointMake(33.86, 32.33)]; - [bezier15Path addLineToPoint: CGPointMake(33.66, 32.36)]; - [bezier15Path addLineToPoint: CGPointMake(33.48, 32.38)]; - [bezier15Path addLineToPoint: CGPointMake(33.29, 32.39)]; - [bezier15Path addLineToPoint: CGPointMake(33.11, 32.4)]; - [bezier15Path addLineToPoint: CGPointMake(32.87, 32.4)]; - [bezier15Path addLineToPoint: CGPointMake(32.64, 32.39)]; - [bezier15Path addLineToPoint: CGPointMake(32.44, 32.39)]; - [bezier15Path addLineToPoint: CGPointMake(32.25, 32.39)]; - [bezier15Path addLineToPoint: CGPointMake(32.08, 32.38)]; - [bezier15Path addLineToPoint: CGPointMake(31.93, 32.37)]; - [bezier15Path addLineToPoint: CGPointMake(31.79, 32.36)]; - [bezier15Path addLineToPoint: CGPointMake(31.66, 32.34)]; - [bezier15Path addLineToPoint: CGPointMake(31.54, 32.33)]; - [bezier15Path addLineToPoint: CGPointMake(31.43, 32.31)]; - [bezier15Path addLineToPoint: CGPointMake(31.32, 32.29)]; - [bezier15Path addLineToPoint: CGPointMake(31.23, 32.26)]; - [bezier15Path addLineToPoint: CGPointMake(31.13, 32.24)]; - [bezier15Path addLineToPoint: CGPointMake(30.95, 32.17)]; - [bezier15Path addLineToPoint: CGPointMake(30.85, 32.13)]; - [bezier15Path addLineToPoint: CGPointMake(31.11, 30.88)]; - [bezier15Path addLineToPoint: CGPointMake(31.16, 30.89)]; - [bezier15Path addLineToPoint: CGPointMake(31.22, 30.9)]; - [bezier15Path addLineToPoint: CGPointMake(31.3, 30.93)]; - [bezier15Path addLineToPoint: CGPointMake(31.4, 30.95)]; - [bezier15Path addLineToPoint: CGPointMake(31.5, 30.97)]; - [bezier15Path addLineToPoint: CGPointMake(31.62, 31)]; - [bezier15Path addLineToPoint: CGPointMake(31.74, 31.02)]; - [bezier15Path addLineToPoint: CGPointMake(31.88, 31.05)]; - [bezier15Path addLineToPoint: CGPointMake(32.02, 31.07)]; - [bezier15Path addLineToPoint: CGPointMake(32.17, 31.09)]; - [bezier15Path addLineToPoint: CGPointMake(32.32, 31.11)]; - [bezier15Path addLineToPoint: CGPointMake(32.48, 31.13)]; - [bezier15Path addLineToPoint: CGPointMake(32.65, 31.13)]; - [bezier15Path addLineToPoint: CGPointMake(32.81, 31.14)]; - [bezier15Path addLineToPoint: CGPointMake(32.98, 31.14)]; - [bezier15Path addLineToPoint: CGPointMake(33.14, 31.13)]; - [bezier15Path addLineToPoint: CGPointMake(33.31, 31.1)]; - [bezier15Path addLineToPoint: CGPointMake(33.44, 31.05)]; - [bezier15Path addLineToPoint: CGPointMake(33.54, 30.99)]; - [bezier15Path addLineToPoint: CGPointMake(33.62, 30.91)]; - [bezier15Path addLineToPoint: CGPointMake(33.68, 30.83)]; - [bezier15Path addLineToPoint: CGPointMake(33.72, 30.74)]; - [bezier15Path addLineToPoint: CGPointMake(33.75, 30.65)]; - [bezier15Path addLineToPoint: CGPointMake(33.77, 30.56)]; - [bezier15Path addLineToPoint: CGPointMake(33.78, 30.4)]; - [bezier15Path addLineToPoint: CGPointMake(33.73, 30.26)]; - [bezier15Path addLineToPoint: CGPointMake(33.64, 30.14)]; - [bezier15Path addLineToPoint: CGPointMake(33.49, 30.05)]; - [bezier15Path addLineToPoint: CGPointMake(33.32, 29.96)]; - [bezier15Path addLineToPoint: CGPointMake(33.12, 29.87)]; - [bezier15Path addLineToPoint: CGPointMake(32.9, 29.79)]; - [bezier15Path addLineToPoint: CGPointMake(32.68, 29.7)]; - [bezier15Path addLineToPoint: CGPointMake(32.45, 29.6)]; - [bezier15Path addLineToPoint: CGPointMake(32.24, 29.48)]; - [bezier15Path addLineToPoint: CGPointMake(32.04, 29.33)]; - [bezier15Path addLineToPoint: CGPointMake(31.85, 29.16)]; - [bezier15Path addLineToPoint: CGPointMake(31.71, 28.94)]; - [bezier15Path addLineToPoint: CGPointMake(31.61, 28.68)]; - [bezier15Path addLineToPoint: CGPointMake(31.56, 28.38)]; - [bezier15Path addLineToPoint: CGPointMake(31.56, 28.01)]; - [bezier15Path addLineToPoint: CGPointMake(31.59, 27.79)]; - [bezier15Path addLineToPoint: CGPointMake(31.63, 27.58)]; - [bezier15Path addLineToPoint: CGPointMake(31.69, 27.39)]; - [bezier15Path addLineToPoint: CGPointMake(31.76, 27.2)]; - [bezier15Path addLineToPoint: CGPointMake(31.85, 27.03)]; - [bezier15Path addLineToPoint: CGPointMake(31.95, 26.89)]; - [bezier15Path addLineToPoint: CGPointMake(32.07, 26.74)]; - [bezier15Path addLineToPoint: CGPointMake(32.21, 26.62)]; - [bezier15Path addLineToPoint: CGPointMake(32.38, 26.51)]; - [bezier15Path addLineToPoint: CGPointMake(32.56, 26.42)]; - [bezier15Path addLineToPoint: CGPointMake(32.76, 26.33)]; - [bezier15Path addLineToPoint: CGPointMake(32.99, 26.27)]; - [bezier15Path addLineToPoint: CGPointMake(33.25, 26.22)]; - [bezier15Path addLineToPoint: CGPointMake(33.53, 26.18)]; - [bezier15Path addLineToPoint: CGPointMake(33.84, 26.16)]; - [bezier15Path addLineToPoint: CGPointMake(34.17, 26.15)]; - [bezier15Path addLineToPoint: CGPointMake(34.38, 26.15)]; - [bezier15Path addLineToPoint: CGPointMake(34.58, 26.16)]; - [bezier15Path addLineToPoint: CGPointMake(34.75, 26.16)]; - [bezier15Path addLineToPoint: CGPointMake(34.91, 26.17)]; - [bezier15Path addLineToPoint: CGPointMake(35.05, 26.18)]; - [bezier15Path addLineToPoint: CGPointMake(35.18, 26.19)]; - [bezier15Path addLineToPoint: CGPointMake(35.3, 26.2)]; - [bezier15Path addLineToPoint: CGPointMake(35.4, 26.21)]; - [bezier15Path addLineToPoint: CGPointMake(35.5, 26.22)]; - [bezier15Path addLineToPoint: CGPointMake(35.58, 26.24)]; - [bezier15Path addLineToPoint: CGPointMake(35.65, 26.25)]; - [bezier15Path addLineToPoint: CGPointMake(35.72, 26.26)]; - [bezier15Path addLineToPoint: CGPointMake(35.78, 26.28)]; - [bezier15Path addLineToPoint: CGPointMake(35.83, 26.28)]; - [bezier15Path addLineToPoint: CGPointMake(35.88, 26.29)]; - [bezier15Path addLineToPoint: CGPointMake(35.92, 26.3)]; - [bezier15Path addLineToPoint: CGPointMake(35.63, 27.59)]; - [bezier15Path closePath]; - bezier15Path.miterLimit = 4; - - bezier15Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier15Path fill]; - - - //// Bezier 16 Drawing - UIBezierPath* bezier16Path = [UIBezierPath bezierPath]; - [bezier16Path moveToPoint: CGPointMake(35.63, 27.59)]; - [bezier16Path addLineToPoint: CGPointMake(35.63, 27.59)]; - [bezier16Path addLineToPoint: CGPointMake(35.55, 27.58)]; - [bezier16Path addLineToPoint: CGPointMake(35.48, 27.57)]; - [bezier16Path addLineToPoint: CGPointMake(35.4, 27.56)]; - [bezier16Path addLineToPoint: CGPointMake(35.33, 27.55)]; - [bezier16Path addLineToPoint: CGPointMake(35.26, 27.53)]; - [bezier16Path addLineToPoint: CGPointMake(35.18, 27.52)]; - [bezier16Path addLineToPoint: CGPointMake(35.11, 27.51)]; - [bezier16Path addLineToPoint: CGPointMake(35.03, 27.5)]; - [bezier16Path addLineToPoint: CGPointMake(34.95, 27.49)]; - [bezier16Path addLineToPoint: CGPointMake(34.86, 27.48)]; - [bezier16Path addLineToPoint: CGPointMake(34.76, 27.48)]; - [bezier16Path addLineToPoint: CGPointMake(34.65, 27.47)]; - [bezier16Path addLineToPoint: CGPointMake(34.53, 27.47)]; - [bezier16Path addLineToPoint: CGPointMake(34.4, 27.48)]; - [bezier16Path addLineToPoint: CGPointMake(34.25, 27.49)]; - [bezier16Path addLineToPoint: CGPointMake(34.09, 27.5)]; - [bezier16Path addLineToPoint: CGPointMake(33.97, 27.52)]; - [bezier16Path addLineToPoint: CGPointMake(33.86, 27.53)]; - [bezier16Path addLineToPoint: CGPointMake(33.77, 27.57)]; - [bezier16Path addLineToPoint: CGPointMake(33.68, 27.6)]; - [bezier16Path addLineToPoint: CGPointMake(33.6, 27.64)]; - [bezier16Path addLineToPoint: CGPointMake(33.53, 27.69)]; - [bezier16Path addLineToPoint: CGPointMake(33.47, 27.74)]; - [bezier16Path addLineToPoint: CGPointMake(33.42, 27.8)]; - [bezier16Path addLineToPoint: CGPointMake(33.39, 27.86)]; - [bezier16Path addLineToPoint: CGPointMake(33.36, 27.92)]; - [bezier16Path addLineToPoint: CGPointMake(33.35, 27.99)]; - [bezier16Path addLineToPoint: CGPointMake(33.35, 28.06)]; - [bezier16Path addLineToPoint: CGPointMake(33.36, 28.13)]; - [bezier16Path addLineToPoint: CGPointMake(33.39, 28.21)]; - [bezier16Path addLineToPoint: CGPointMake(33.43, 28.28)]; - [bezier16Path addLineToPoint: CGPointMake(33.49, 28.35)]; - [bezier16Path addLineToPoint: CGPointMake(33.6, 28.46)]; - [bezier16Path addLineToPoint: CGPointMake(33.74, 28.55)]; - [bezier16Path addLineToPoint: CGPointMake(33.9, 28.62)]; - [bezier16Path addLineToPoint: CGPointMake(34.07, 28.68)]; - [bezier16Path addLineToPoint: CGPointMake(34.25, 28.74)]; - [bezier16Path addLineToPoint: CGPointMake(34.44, 28.8)]; - [bezier16Path addLineToPoint: CGPointMake(34.63, 28.87)]; - [bezier16Path addLineToPoint: CGPointMake(34.81, 28.95)]; - [bezier16Path addLineToPoint: CGPointMake(34.98, 29.04)]; - [bezier16Path addLineToPoint: CGPointMake(35.14, 29.16)]; - [bezier16Path addLineToPoint: CGPointMake(35.28, 29.3)]; - [bezier16Path addLineToPoint: CGPointMake(35.4, 29.48)]; - [bezier16Path addLineToPoint: CGPointMake(35.49, 29.7)]; - [bezier16Path addLineToPoint: CGPointMake(35.55, 29.95)]; - [bezier16Path addLineToPoint: CGPointMake(35.57, 30.26)]; - [bezier16Path addLineToPoint: CGPointMake(35.55, 30.62)]; - [bezier16Path addLineToPoint: CGPointMake(35.51, 30.89)]; - [bezier16Path addLineToPoint: CGPointMake(35.44, 31.12)]; - [bezier16Path addLineToPoint: CGPointMake(35.35, 31.34)]; - [bezier16Path addLineToPoint: CGPointMake(35.24, 31.53)]; - [bezier16Path addLineToPoint: CGPointMake(35.11, 31.69)]; - [bezier16Path addLineToPoint: CGPointMake(34.96, 31.83)]; - [bezier16Path addLineToPoint: CGPointMake(34.8, 31.96)]; - [bezier16Path addLineToPoint: CGPointMake(34.62, 32.07)]; - [bezier16Path addLineToPoint: CGPointMake(34.44, 32.15)]; - [bezier16Path addLineToPoint: CGPointMake(34.25, 32.23)]; - [bezier16Path addLineToPoint: CGPointMake(34.06, 32.28)]; - [bezier16Path addLineToPoint: CGPointMake(33.86, 32.33)]; - [bezier16Path addLineToPoint: CGPointMake(33.66, 32.36)]; - [bezier16Path addLineToPoint: CGPointMake(33.48, 32.38)]; - [bezier16Path addLineToPoint: CGPointMake(33.29, 32.39)]; - [bezier16Path addLineToPoint: CGPointMake(33.11, 32.4)]; - [bezier16Path addLineToPoint: CGPointMake(32.87, 32.4)]; - [bezier16Path addLineToPoint: CGPointMake(32.64, 32.39)]; - [bezier16Path addLineToPoint: CGPointMake(32.44, 32.39)]; - [bezier16Path addLineToPoint: CGPointMake(32.25, 32.39)]; - [bezier16Path addLineToPoint: CGPointMake(32.08, 32.38)]; - [bezier16Path addLineToPoint: CGPointMake(31.93, 32.37)]; - [bezier16Path addLineToPoint: CGPointMake(31.79, 32.36)]; - [bezier16Path addLineToPoint: CGPointMake(31.66, 32.34)]; - [bezier16Path addLineToPoint: CGPointMake(31.54, 32.33)]; - [bezier16Path addLineToPoint: CGPointMake(31.43, 32.31)]; - [bezier16Path addLineToPoint: CGPointMake(31.32, 32.29)]; - [bezier16Path addLineToPoint: CGPointMake(31.23, 32.26)]; - [bezier16Path addLineToPoint: CGPointMake(31.13, 32.24)]; - [bezier16Path addLineToPoint: CGPointMake(30.95, 32.17)]; - [bezier16Path addLineToPoint: CGPointMake(30.85, 32.13)]; - [bezier16Path addLineToPoint: CGPointMake(31.11, 30.88)]; - [bezier16Path addLineToPoint: CGPointMake(31.16, 30.89)]; - [bezier16Path addLineToPoint: CGPointMake(31.22, 30.9)]; - [bezier16Path addLineToPoint: CGPointMake(31.3, 30.93)]; - [bezier16Path addLineToPoint: CGPointMake(31.4, 30.95)]; - [bezier16Path addLineToPoint: CGPointMake(31.5, 30.97)]; - [bezier16Path addLineToPoint: CGPointMake(31.62, 31)]; - [bezier16Path addLineToPoint: CGPointMake(31.74, 31.02)]; - [bezier16Path addLineToPoint: CGPointMake(31.88, 31.05)]; - [bezier16Path addLineToPoint: CGPointMake(32.02, 31.07)]; - [bezier16Path addLineToPoint: CGPointMake(32.17, 31.09)]; - [bezier16Path addLineToPoint: CGPointMake(32.32, 31.11)]; - [bezier16Path addLineToPoint: CGPointMake(32.48, 31.13)]; - [bezier16Path addLineToPoint: CGPointMake(32.65, 31.13)]; - [bezier16Path addLineToPoint: CGPointMake(32.81, 31.14)]; - [bezier16Path addLineToPoint: CGPointMake(32.98, 31.14)]; - [bezier16Path addLineToPoint: CGPointMake(33.14, 31.13)]; - [bezier16Path addLineToPoint: CGPointMake(33.31, 31.1)]; - [bezier16Path addLineToPoint: CGPointMake(33.44, 31.05)]; - [bezier16Path addLineToPoint: CGPointMake(33.54, 30.99)]; - [bezier16Path addLineToPoint: CGPointMake(33.62, 30.91)]; - [bezier16Path addLineToPoint: CGPointMake(33.68, 30.83)]; - [bezier16Path addLineToPoint: CGPointMake(33.72, 30.74)]; - [bezier16Path addLineToPoint: CGPointMake(33.75, 30.65)]; - [bezier16Path addLineToPoint: CGPointMake(33.77, 30.56)]; - [bezier16Path addLineToPoint: CGPointMake(33.78, 30.4)]; - [bezier16Path addLineToPoint: CGPointMake(33.73, 30.26)]; - [bezier16Path addLineToPoint: CGPointMake(33.64, 30.14)]; - [bezier16Path addLineToPoint: CGPointMake(33.49, 30.05)]; - [bezier16Path addLineToPoint: CGPointMake(33.32, 29.96)]; - [bezier16Path addLineToPoint: CGPointMake(33.12, 29.87)]; - [bezier16Path addLineToPoint: CGPointMake(32.9, 29.79)]; - [bezier16Path addLineToPoint: CGPointMake(32.68, 29.7)]; - [bezier16Path addLineToPoint: CGPointMake(32.45, 29.6)]; - [bezier16Path addLineToPoint: CGPointMake(32.24, 29.48)]; - [bezier16Path addLineToPoint: CGPointMake(32.04, 29.33)]; - [bezier16Path addLineToPoint: CGPointMake(31.85, 29.16)]; - [bezier16Path addLineToPoint: CGPointMake(31.71, 28.94)]; - [bezier16Path addLineToPoint: CGPointMake(31.61, 28.68)]; - [bezier16Path addLineToPoint: CGPointMake(31.56, 28.38)]; - [bezier16Path addLineToPoint: CGPointMake(31.56, 28.01)]; - [bezier16Path addLineToPoint: CGPointMake(31.59, 27.79)]; - [bezier16Path addLineToPoint: CGPointMake(31.63, 27.58)]; - [bezier16Path addLineToPoint: CGPointMake(31.69, 27.39)]; - [bezier16Path addLineToPoint: CGPointMake(31.76, 27.2)]; - [bezier16Path addLineToPoint: CGPointMake(31.85, 27.03)]; - [bezier16Path addLineToPoint: CGPointMake(31.95, 26.89)]; - [bezier16Path addLineToPoint: CGPointMake(32.07, 26.74)]; - [bezier16Path addLineToPoint: CGPointMake(32.21, 26.62)]; - [bezier16Path addLineToPoint: CGPointMake(32.38, 26.51)]; - [bezier16Path addLineToPoint: CGPointMake(32.56, 26.42)]; - [bezier16Path addLineToPoint: CGPointMake(32.76, 26.33)]; - [bezier16Path addLineToPoint: CGPointMake(32.99, 26.27)]; - [bezier16Path addLineToPoint: CGPointMake(33.25, 26.22)]; - [bezier16Path addLineToPoint: CGPointMake(33.53, 26.18)]; - [bezier16Path addLineToPoint: CGPointMake(33.84, 26.16)]; - [bezier16Path addLineToPoint: CGPointMake(34.17, 26.15)]; - [bezier16Path addLineToPoint: CGPointMake(34.38, 26.15)]; - [bezier16Path addLineToPoint: CGPointMake(34.58, 26.16)]; - [bezier16Path addLineToPoint: CGPointMake(34.75, 26.16)]; - [bezier16Path addLineToPoint: CGPointMake(34.91, 26.17)]; - [bezier16Path addLineToPoint: CGPointMake(35.05, 26.18)]; - [bezier16Path addLineToPoint: CGPointMake(35.18, 26.19)]; - [bezier16Path addLineToPoint: CGPointMake(35.3, 26.2)]; - [bezier16Path addLineToPoint: CGPointMake(35.4, 26.21)]; - [bezier16Path addLineToPoint: CGPointMake(35.5, 26.22)]; - [bezier16Path addLineToPoint: CGPointMake(35.58, 26.24)]; - [bezier16Path addLineToPoint: CGPointMake(35.65, 26.25)]; - [bezier16Path addLineToPoint: CGPointMake(35.72, 26.26)]; - [bezier16Path addLineToPoint: CGPointMake(35.78, 26.28)]; - [bezier16Path addLineToPoint: CGPointMake(35.83, 26.28)]; - [bezier16Path addLineToPoint: CGPointMake(35.88, 26.29)]; - [bezier16Path addLineToPoint: CGPointMake(35.92, 26.3)]; - [bezier16Path addLineToPoint: CGPointMake(35.63, 27.59)]; - [bezier16Path closePath]; - bezier16Path.miterLimit = 4; - - bezier16Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier16Path.lineWidth = 0.5; - [bezier16Path stroke]; - - - //// Bezier 17 Drawing - UIBezierPath* bezier17Path = [UIBezierPath bezierPath]; - [bezier17Path moveToPoint: CGPointMake(36.98, 24.89)]; - [bezier17Path addLineToPoint: CGPointMake(38.56, 24.89)]; - [bezier17Path addLineToPoint: CGPointMake(38.33, 26.27)]; - [bezier17Path addLineToPoint: CGPointMake(39.28, 26.27)]; - [bezier17Path addLineToPoint: CGPointMake(39.07, 27.56)]; - [bezier17Path addLineToPoint: CGPointMake(38.07, 27.53)]; - [bezier17Path addLineToPoint: CGPointMake(37.53, 30.71)]; - [bezier17Path addLineToPoint: CGPointMake(37.52, 30.82)]; - [bezier17Path addLineToPoint: CGPointMake(37.55, 30.92)]; - [bezier17Path addLineToPoint: CGPointMake(37.6, 30.99)]; - [bezier17Path addLineToPoint: CGPointMake(37.68, 31.05)]; - [bezier17Path addLineToPoint: CGPointMake(37.78, 31.09)]; - [bezier17Path addLineToPoint: CGPointMake(37.89, 31.13)]; - [bezier17Path addLineToPoint: CGPointMake(38.02, 31.15)]; - [bezier17Path addLineToPoint: CGPointMake(38.16, 31.16)]; - [bezier17Path addLineToPoint: CGPointMake(38.28, 31.16)]; - [bezier17Path addLineToPoint: CGPointMake(38.4, 31.14)]; - [bezier17Path addLineToPoint: CGPointMake(38.5, 31.13)]; - [bezier17Path addLineToPoint: CGPointMake(38.59, 31.1)]; - [bezier17Path addLineToPoint: CGPointMake(38.66, 31.08)]; - [bezier17Path addLineToPoint: CGPointMake(38.71, 31.06)]; - [bezier17Path addLineToPoint: CGPointMake(38.75, 31.05)]; - [bezier17Path addLineToPoint: CGPointMake(38.76, 31.05)]; - [bezier17Path addLineToPoint: CGPointMake(38.56, 32.11)]; - [bezier17Path addLineToPoint: CGPointMake(38.52, 32.13)]; - [bezier17Path addLineToPoint: CGPointMake(38.48, 32.16)]; - [bezier17Path addLineToPoint: CGPointMake(38.44, 32.18)]; - [bezier17Path addLineToPoint: CGPointMake(38.4, 32.2)]; - [bezier17Path addLineToPoint: CGPointMake(38.36, 32.22)]; - [bezier17Path addLineToPoint: CGPointMake(38.32, 32.24)]; - [bezier17Path addLineToPoint: CGPointMake(38.27, 32.25)]; - [bezier17Path addLineToPoint: CGPointMake(38.21, 32.27)]; - [bezier17Path addLineToPoint: CGPointMake(38.16, 32.29)]; - [bezier17Path addLineToPoint: CGPointMake(38.1, 32.3)]; - [bezier17Path addLineToPoint: CGPointMake(38.03, 32.31)]; - [bezier17Path addLineToPoint: CGPointMake(37.96, 32.32)]; - [bezier17Path addLineToPoint: CGPointMake(37.89, 32.33)]; - [bezier17Path addLineToPoint: CGPointMake(37.8, 32.35)]; - [bezier17Path addLineToPoint: CGPointMake(37.71, 32.36)]; - [bezier17Path addLineToPoint: CGPointMake(37.62, 32.37)]; - [bezier17Path addLineToPoint: CGPointMake(37.18, 32.37)]; - [bezier17Path addLineToPoint: CGPointMake(36.96, 32.35)]; - [bezier17Path addLineToPoint: CGPointMake(36.76, 32.33)]; - [bezier17Path addLineToPoint: CGPointMake(36.57, 32.29)]; - [bezier17Path addLineToPoint: CGPointMake(36.42, 32.25)]; - [bezier17Path addLineToPoint: CGPointMake(36.29, 32.2)]; - [bezier17Path addLineToPoint: CGPointMake(36.18, 32.15)]; - [bezier17Path addLineToPoint: CGPointMake(36.08, 32.08)]; - [bezier17Path addLineToPoint: CGPointMake(36.01, 32)]; - [bezier17Path addLineToPoint: CGPointMake(35.95, 31.92)]; - [bezier17Path addLineToPoint: CGPointMake(35.91, 31.83)]; - [bezier17Path addLineToPoint: CGPointMake(35.89, 31.73)]; - [bezier17Path addLineToPoint: CGPointMake(35.87, 31.62)]; - [bezier17Path addLineToPoint: CGPointMake(35.86, 31.5)]; - [bezier17Path addLineToPoint: CGPointMake(35.86, 31.38)]; - [bezier17Path addLineToPoint: CGPointMake(35.88, 31.25)]; - [bezier17Path addLineToPoint: CGPointMake(35.9, 31.1)]; - [bezier17Path addLineToPoint: CGPointMake(36.98, 24.89)]; - [bezier17Path closePath]; - bezier17Path.miterLimit = 4; - - bezier17Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier17Path fill]; - - - //// Bezier 18 Drawing - UIBezierPath* bezier18Path = [UIBezierPath bezierPath]; - [bezier18Path moveToPoint: CGPointMake(36.98, 24.89)]; - [bezier18Path addLineToPoint: CGPointMake(38.56, 24.89)]; - [bezier18Path addLineToPoint: CGPointMake(38.33, 26.27)]; - [bezier18Path addLineToPoint: CGPointMake(39.28, 26.27)]; - [bezier18Path addLineToPoint: CGPointMake(39.07, 27.56)]; - [bezier18Path addLineToPoint: CGPointMake(38.07, 27.53)]; - [bezier18Path addLineToPoint: CGPointMake(37.53, 30.71)]; - [bezier18Path addLineToPoint: CGPointMake(37.52, 30.82)]; - [bezier18Path addLineToPoint: CGPointMake(37.55, 30.92)]; - [bezier18Path addLineToPoint: CGPointMake(37.6, 30.99)]; - [bezier18Path addLineToPoint: CGPointMake(37.68, 31.05)]; - [bezier18Path addLineToPoint: CGPointMake(37.78, 31.09)]; - [bezier18Path addLineToPoint: CGPointMake(37.89, 31.13)]; - [bezier18Path addLineToPoint: CGPointMake(38.02, 31.15)]; - [bezier18Path addLineToPoint: CGPointMake(38.16, 31.16)]; - [bezier18Path addLineToPoint: CGPointMake(38.28, 31.16)]; - [bezier18Path addLineToPoint: CGPointMake(38.4, 31.14)]; - [bezier18Path addLineToPoint: CGPointMake(38.5, 31.13)]; - [bezier18Path addLineToPoint: CGPointMake(38.59, 31.1)]; - [bezier18Path addLineToPoint: CGPointMake(38.66, 31.08)]; - [bezier18Path addLineToPoint: CGPointMake(38.71, 31.06)]; - [bezier18Path addLineToPoint: CGPointMake(38.75, 31.05)]; - [bezier18Path addLineToPoint: CGPointMake(38.76, 31.05)]; - [bezier18Path addLineToPoint: CGPointMake(38.56, 32.11)]; - [bezier18Path addLineToPoint: CGPointMake(38.52, 32.13)]; - [bezier18Path addLineToPoint: CGPointMake(38.48, 32.16)]; - [bezier18Path addLineToPoint: CGPointMake(38.44, 32.18)]; - [bezier18Path addLineToPoint: CGPointMake(38.4, 32.2)]; - [bezier18Path addLineToPoint: CGPointMake(38.36, 32.22)]; - [bezier18Path addLineToPoint: CGPointMake(38.32, 32.24)]; - [bezier18Path addLineToPoint: CGPointMake(38.27, 32.25)]; - [bezier18Path addLineToPoint: CGPointMake(38.21, 32.27)]; - [bezier18Path addLineToPoint: CGPointMake(38.16, 32.29)]; - [bezier18Path addLineToPoint: CGPointMake(38.1, 32.3)]; - [bezier18Path addLineToPoint: CGPointMake(38.03, 32.31)]; - [bezier18Path addLineToPoint: CGPointMake(37.96, 32.32)]; - [bezier18Path addLineToPoint: CGPointMake(37.89, 32.33)]; - [bezier18Path addLineToPoint: CGPointMake(37.8, 32.35)]; - [bezier18Path addLineToPoint: CGPointMake(37.71, 32.36)]; - [bezier18Path addLineToPoint: CGPointMake(37.62, 32.37)]; - [bezier18Path addLineToPoint: CGPointMake(37.18, 32.37)]; - [bezier18Path addLineToPoint: CGPointMake(36.96, 32.35)]; - [bezier18Path addLineToPoint: CGPointMake(36.76, 32.33)]; - [bezier18Path addLineToPoint: CGPointMake(36.57, 32.29)]; - [bezier18Path addLineToPoint: CGPointMake(36.42, 32.25)]; - [bezier18Path addLineToPoint: CGPointMake(36.29, 32.2)]; - [bezier18Path addLineToPoint: CGPointMake(36.18, 32.15)]; - [bezier18Path addLineToPoint: CGPointMake(36.08, 32.08)]; - [bezier18Path addLineToPoint: CGPointMake(36.01, 32)]; - [bezier18Path addLineToPoint: CGPointMake(35.95, 31.92)]; - [bezier18Path addLineToPoint: CGPointMake(35.91, 31.83)]; - [bezier18Path addLineToPoint: CGPointMake(35.89, 31.73)]; - [bezier18Path addLineToPoint: CGPointMake(35.87, 31.62)]; - [bezier18Path addLineToPoint: CGPointMake(35.86, 31.5)]; - [bezier18Path addLineToPoint: CGPointMake(35.86, 31.38)]; - [bezier18Path addLineToPoint: CGPointMake(35.88, 31.25)]; - [bezier18Path addLineToPoint: CGPointMake(35.9, 31.1)]; - [bezier18Path addLineToPoint: CGPointMake(36.98, 24.89)]; - [bezier18Path closePath]; - bezier18Path.miterLimit = 4; - - bezier18Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier18Path.lineWidth = 0.5; - [bezier18Path stroke]; - - - //// Bezier 19 Drawing - UIBezierPath* bezier19Path = [UIBezierPath bezierPath]; - [bezier19Path moveToPoint: CGPointMake(40.52, 29.8)]; - [bezier19Path addLineToPoint: CGPointMake(40.51, 29.9)]; - [bezier19Path addLineToPoint: CGPointMake(40.53, 30.01)]; - [bezier19Path addLineToPoint: CGPointMake(40.55, 30.12)]; - [bezier19Path addLineToPoint: CGPointMake(40.59, 30.23)]; - [bezier19Path addLineToPoint: CGPointMake(40.63, 30.33)]; - [bezier19Path addLineToPoint: CGPointMake(40.7, 30.44)]; - [bezier19Path addLineToPoint: CGPointMake(40.76, 30.53)]; - [bezier19Path addLineToPoint: CGPointMake(40.84, 30.63)]; - [bezier19Path addLineToPoint: CGPointMake(40.93, 30.72)]; - [bezier19Path addLineToPoint: CGPointMake(41.02, 30.8)]; - [bezier19Path addLineToPoint: CGPointMake(41.12, 30.87)]; - [bezier19Path addLineToPoint: CGPointMake(41.23, 30.93)]; - [bezier19Path addLineToPoint: CGPointMake(41.34, 30.98)]; - [bezier19Path addLineToPoint: CGPointMake(41.45, 31.02)]; - [bezier19Path addLineToPoint: CGPointMake(41.57, 31.05)]; - [bezier19Path addLineToPoint: CGPointMake(41.72, 31.07)]; - [bezier19Path addLineToPoint: CGPointMake(41.86, 31.09)]; - [bezier19Path addLineToPoint: CGPointMake(42.01, 31.1)]; - [bezier19Path addLineToPoint: CGPointMake(42.15, 31.12)]; - [bezier19Path addLineToPoint: CGPointMake(42.3, 31.12)]; - [bezier19Path addLineToPoint: CGPointMake(42.46, 31.12)]; - [bezier19Path addLineToPoint: CGPointMake(42.6, 31.12)]; - [bezier19Path addLineToPoint: CGPointMake(42.76, 31.1)]; - [bezier19Path addLineToPoint: CGPointMake(42.91, 31.08)]; - [bezier19Path addLineToPoint: CGPointMake(43.06, 31.05)]; - [bezier19Path addLineToPoint: CGPointMake(43.22, 31.02)]; - [bezier19Path addLineToPoint: CGPointMake(43.38, 30.97)]; - [bezier19Path addLineToPoint: CGPointMake(43.54, 30.9)]; - [bezier19Path addLineToPoint: CGPointMake(43.7, 30.84)]; - [bezier19Path addLineToPoint: CGPointMake(43.86, 30.75)]; - [bezier19Path addLineToPoint: CGPointMake(44.03, 30.65)]; - [bezier19Path addLineToPoint: CGPointMake(43.8, 32.05)]; - [bezier19Path addLineToPoint: CGPointMake(43.71, 32.09)]; - [bezier19Path addLineToPoint: CGPointMake(43.62, 32.14)]; - [bezier19Path addLineToPoint: CGPointMake(43.53, 32.17)]; - [bezier19Path addLineToPoint: CGPointMake(43.44, 32.21)]; - [bezier19Path addLineToPoint: CGPointMake(43.36, 32.24)]; - [bezier19Path addLineToPoint: CGPointMake(43.26, 32.27)]; - [bezier19Path addLineToPoint: CGPointMake(43.17, 32.29)]; - [bezier19Path addLineToPoint: CGPointMake(43.08, 32.31)]; - [bezier19Path addLineToPoint: CGPointMake(42.97, 32.32)]; - [bezier19Path addLineToPoint: CGPointMake(42.86, 32.33)]; - [bezier19Path addLineToPoint: CGPointMake(42.74, 32.35)]; - [bezier19Path addLineToPoint: CGPointMake(42.61, 32.36)]; - [bezier19Path addLineToPoint: CGPointMake(42.46, 32.36)]; - [bezier19Path addLineToPoint: CGPointMake(42.31, 32.36)]; - [bezier19Path addLineToPoint: CGPointMake(42.13, 32.37)]; - [bezier19Path addLineToPoint: CGPointMake(41.94, 32.37)]; - [bezier19Path addLineToPoint: CGPointMake(41.66, 32.36)]; - [bezier19Path addLineToPoint: CGPointMake(41.38, 32.33)]; - [bezier19Path addLineToPoint: CGPointMake(41.09, 32.29)]; - [bezier19Path addLineToPoint: CGPointMake(40.81, 32.23)]; - [bezier19Path addLineToPoint: CGPointMake(40.53, 32.14)]; - [bezier19Path addLineToPoint: CGPointMake(40.26, 32.03)]; - [bezier19Path addLineToPoint: CGPointMake(40.01, 31.89)]; - [bezier19Path addLineToPoint: CGPointMake(39.77, 31.72)]; - [bezier19Path addLineToPoint: CGPointMake(39.55, 31.53)]; - [bezier19Path addLineToPoint: CGPointMake(39.35, 31.3)]; - [bezier19Path addLineToPoint: CGPointMake(39.19, 31.04)]; - [bezier19Path addLineToPoint: CGPointMake(39.05, 30.73)]; - [bezier19Path addLineToPoint: CGPointMake(38.95, 30.4)]; - [bezier19Path addLineToPoint: CGPointMake(38.89, 30.02)]; - [bezier19Path addLineToPoint: CGPointMake(38.87, 29.6)]; - [bezier19Path addLineToPoint: CGPointMake(38.9, 29.13)]; - [bezier19Path addLineToPoint: CGPointMake(38.93, 28.95)]; - [bezier19Path addLineToPoint: CGPointMake(38.96, 28.74)]; - [bezier19Path addLineToPoint: CGPointMake(39.01, 28.51)]; - [bezier19Path addLineToPoint: CGPointMake(39.07, 28.27)]; - [bezier19Path addLineToPoint: CGPointMake(39.15, 28.03)]; - [bezier19Path addLineToPoint: CGPointMake(39.26, 27.78)]; - [bezier19Path addLineToPoint: CGPointMake(39.39, 27.53)]; - [bezier19Path addLineToPoint: CGPointMake(39.55, 27.3)]; - [bezier19Path addLineToPoint: CGPointMake(39.73, 27.07)]; - [bezier19Path addLineToPoint: CGPointMake(39.95, 26.85)]; - [bezier19Path addLineToPoint: CGPointMake(40.2, 26.66)]; - [bezier19Path addLineToPoint: CGPointMake(40.49, 26.49)]; - [bezier19Path addLineToPoint: CGPointMake(40.82, 26.34)]; - [bezier19Path addLineToPoint: CGPointMake(41.19, 26.24)]; - [bezier19Path addLineToPoint: CGPointMake(41.6, 26.17)]; - [bezier19Path addLineToPoint: CGPointMake(42.06, 26.15)]; - [bezier19Path addLineToPoint: CGPointMake(42.28, 26.16)]; - [bezier19Path addLineToPoint: CGPointMake(42.51, 26.18)]; - [bezier19Path addLineToPoint: CGPointMake(42.75, 26.22)]; - [bezier19Path addLineToPoint: CGPointMake(42.98, 26.28)]; - [bezier19Path addLineToPoint: CGPointMake(43.21, 26.36)]; - [bezier19Path addLineToPoint: CGPointMake(43.43, 26.46)]; - [bezier19Path addLineToPoint: CGPointMake(43.63, 26.6)]; - [bezier19Path addLineToPoint: CGPointMake(43.82, 26.76)]; - [bezier19Path addLineToPoint: CGPointMake(43.99, 26.95)]; - [bezier19Path addLineToPoint: CGPointMake(44.13, 27.18)]; - [bezier19Path addLineToPoint: CGPointMake(44.25, 27.44)]; - [bezier19Path addLineToPoint: CGPointMake(44.33, 27.74)]; - [bezier19Path addLineToPoint: CGPointMake(44.37, 28.09)]; - [bezier19Path addLineToPoint: CGPointMake(44.38, 28.47)]; - [bezier19Path addLineToPoint: CGPointMake(44.34, 28.91)]; - [bezier19Path addLineToPoint: CGPointMake(44.25, 29.38)]; - [bezier19Path addLineToPoint: CGPointMake(44.23, 29.73)]; - [bezier19Path addLineToPoint: CGPointMake(40.08, 29.73)]; - [bezier19Path addLineToPoint: CGPointMake(40.34, 28.61)]; - [bezier19Path addLineToPoint: CGPointMake(42.83, 28.61)]; - [bezier19Path addLineToPoint: CGPointMake(42.84, 28.47)]; - [bezier19Path addLineToPoint: CGPointMake(42.84, 28.33)]; - [bezier19Path addLineToPoint: CGPointMake(42.83, 28.21)]; - [bezier19Path addLineToPoint: CGPointMake(42.8, 28.09)]; - [bezier19Path addLineToPoint: CGPointMake(42.76, 27.98)]; - [bezier19Path addLineToPoint: CGPointMake(42.72, 27.89)]; - [bezier19Path addLineToPoint: CGPointMake(42.67, 27.8)]; - [bezier19Path addLineToPoint: CGPointMake(42.61, 27.72)]; - [bezier19Path addLineToPoint: CGPointMake(42.54, 27.65)]; - [bezier19Path addLineToPoint: CGPointMake(42.47, 27.6)]; - [bezier19Path addLineToPoint: CGPointMake(42.38, 27.55)]; - [bezier19Path addLineToPoint: CGPointMake(42.3, 27.5)]; - [bezier19Path addLineToPoint: CGPointMake(42.2, 27.47)]; - [bezier19Path addLineToPoint: CGPointMake(42.11, 27.44)]; - [bezier19Path addLineToPoint: CGPointMake(42.02, 27.43)]; - [bezier19Path addLineToPoint: CGPointMake(41.91, 27.41)]; - [bezier19Path addLineToPoint: CGPointMake(41.81, 27.42)]; - [bezier19Path addLineToPoint: CGPointMake(41.7, 27.44)]; - [bezier19Path addLineToPoint: CGPointMake(41.61, 27.46)]; - [bezier19Path addLineToPoint: CGPointMake(41.51, 27.49)]; - [bezier19Path addLineToPoint: CGPointMake(41.41, 27.54)]; - [bezier19Path addLineToPoint: CGPointMake(41.33, 27.59)]; - [bezier19Path addLineToPoint: CGPointMake(41.24, 27.65)]; - [bezier19Path addLineToPoint: CGPointMake(41.17, 27.72)]; - [bezier19Path addLineToPoint: CGPointMake(41.09, 27.8)]; - [bezier19Path addLineToPoint: CGPointMake(41.03, 27.89)]; - [bezier19Path addLineToPoint: CGPointMake(40.96, 27.98)]; - [bezier19Path addLineToPoint: CGPointMake(40.91, 28.08)]; - [bezier19Path addLineToPoint: CGPointMake(40.86, 28.18)]; - [bezier19Path addLineToPoint: CGPointMake(40.82, 28.29)]; - [bezier19Path addLineToPoint: CGPointMake(40.79, 28.41)]; - [bezier19Path addLineToPoint: CGPointMake(40.76, 28.52)]; - [bezier19Path addLineToPoint: CGPointMake(40.54, 29.7)]; - [bezier19Path addLineToPoint: CGPointMake(40.52, 29.8)]; - [bezier19Path closePath]; - bezier19Path.miterLimit = 4; - - bezier19Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier19Path fill]; - - - //// Bezier 20 Drawing - UIBezierPath* bezier20Path = [UIBezierPath bezierPath]; - [bezier20Path moveToPoint: CGPointMake(40.63, 28.52)]; - [bezier20Path addLineToPoint: CGPointMake(40.54, 29.7)]; - [bezier20Path addLineToPoint: CGPointMake(40.52, 29.8)]; - [bezier20Path addLineToPoint: CGPointMake(40.51, 29.9)]; - [bezier20Path addLineToPoint: CGPointMake(40.53, 30.01)]; - [bezier20Path addLineToPoint: CGPointMake(40.55, 30.12)]; - [bezier20Path addLineToPoint: CGPointMake(40.59, 30.23)]; - [bezier20Path addLineToPoint: CGPointMake(40.63, 30.33)]; - [bezier20Path addLineToPoint: CGPointMake(40.7, 30.44)]; - [bezier20Path addLineToPoint: CGPointMake(40.76, 30.53)]; - [bezier20Path addLineToPoint: CGPointMake(40.84, 30.63)]; - [bezier20Path addLineToPoint: CGPointMake(40.93, 30.72)]; - [bezier20Path addLineToPoint: CGPointMake(41.02, 30.8)]; - [bezier20Path addLineToPoint: CGPointMake(41.12, 30.87)]; - [bezier20Path addLineToPoint: CGPointMake(41.23, 30.93)]; - [bezier20Path addLineToPoint: CGPointMake(41.34, 30.98)]; - [bezier20Path addLineToPoint: CGPointMake(41.45, 31.02)]; - [bezier20Path addLineToPoint: CGPointMake(41.57, 31.05)]; - [bezier20Path addLineToPoint: CGPointMake(41.72, 31.07)]; - [bezier20Path addLineToPoint: CGPointMake(41.86, 31.09)]; - [bezier20Path addLineToPoint: CGPointMake(42.01, 31.1)]; - [bezier20Path addLineToPoint: CGPointMake(42.15, 31.12)]; - [bezier20Path addLineToPoint: CGPointMake(42.3, 31.12)]; - [bezier20Path addLineToPoint: CGPointMake(42.46, 31.12)]; - [bezier20Path addLineToPoint: CGPointMake(42.6, 31.12)]; - [bezier20Path addLineToPoint: CGPointMake(42.76, 31.1)]; - [bezier20Path addLineToPoint: CGPointMake(42.91, 31.08)]; - [bezier20Path addLineToPoint: CGPointMake(43.06, 31.05)]; - [bezier20Path addLineToPoint: CGPointMake(43.22, 31.02)]; - [bezier20Path addLineToPoint: CGPointMake(43.38, 30.97)]; - [bezier20Path addLineToPoint: CGPointMake(43.54, 30.9)]; - [bezier20Path addLineToPoint: CGPointMake(43.7, 30.84)]; - [bezier20Path addLineToPoint: CGPointMake(43.86, 30.75)]; - [bezier20Path addLineToPoint: CGPointMake(44.03, 30.65)]; - [bezier20Path addLineToPoint: CGPointMake(43.8, 32.05)]; - [bezier20Path addLineToPoint: CGPointMake(43.71, 32.09)]; - [bezier20Path addLineToPoint: CGPointMake(43.62, 32.14)]; - [bezier20Path addLineToPoint: CGPointMake(43.53, 32.17)]; - [bezier20Path addLineToPoint: CGPointMake(43.44, 32.21)]; - [bezier20Path addLineToPoint: CGPointMake(43.36, 32.24)]; - [bezier20Path addLineToPoint: CGPointMake(43.26, 32.27)]; - [bezier20Path addLineToPoint: CGPointMake(43.17, 32.29)]; - [bezier20Path addLineToPoint: CGPointMake(43.08, 32.31)]; - [bezier20Path addLineToPoint: CGPointMake(42.97, 32.32)]; - [bezier20Path addLineToPoint: CGPointMake(42.86, 32.33)]; - [bezier20Path addLineToPoint: CGPointMake(42.74, 32.35)]; - [bezier20Path addLineToPoint: CGPointMake(42.61, 32.36)]; - [bezier20Path addLineToPoint: CGPointMake(42.46, 32.36)]; - [bezier20Path addLineToPoint: CGPointMake(42.31, 32.36)]; - [bezier20Path addLineToPoint: CGPointMake(42.13, 32.37)]; - [bezier20Path addLineToPoint: CGPointMake(41.94, 32.37)]; - [bezier20Path addLineToPoint: CGPointMake(41.66, 32.36)]; - [bezier20Path addLineToPoint: CGPointMake(41.38, 32.33)]; - [bezier20Path addLineToPoint: CGPointMake(41.09, 32.29)]; - [bezier20Path addLineToPoint: CGPointMake(40.81, 32.23)]; - [bezier20Path addLineToPoint: CGPointMake(40.53, 32.14)]; - [bezier20Path addLineToPoint: CGPointMake(40.26, 32.03)]; - [bezier20Path addLineToPoint: CGPointMake(40.01, 31.89)]; - [bezier20Path addLineToPoint: CGPointMake(39.77, 31.72)]; - [bezier20Path addLineToPoint: CGPointMake(39.55, 31.53)]; - [bezier20Path addLineToPoint: CGPointMake(39.35, 31.3)]; - [bezier20Path addLineToPoint: CGPointMake(39.19, 31.04)]; - [bezier20Path addLineToPoint: CGPointMake(39.05, 30.73)]; - [bezier20Path addLineToPoint: CGPointMake(38.95, 30.4)]; - [bezier20Path addLineToPoint: CGPointMake(38.89, 30.02)]; - [bezier20Path addLineToPoint: CGPointMake(38.87, 29.6)]; - [bezier20Path addLineToPoint: CGPointMake(38.9, 29.13)]; - [bezier20Path addLineToPoint: CGPointMake(38.93, 28.95)]; - [bezier20Path addLineToPoint: CGPointMake(38.96, 28.74)]; - [bezier20Path addLineToPoint: CGPointMake(39.01, 28.51)]; - [bezier20Path addLineToPoint: CGPointMake(39.07, 28.27)]; - [bezier20Path addLineToPoint: CGPointMake(39.15, 28.03)]; - [bezier20Path addLineToPoint: CGPointMake(39.26, 27.78)]; - [bezier20Path addLineToPoint: CGPointMake(39.39, 27.53)]; - [bezier20Path addLineToPoint: CGPointMake(39.55, 27.3)]; - [bezier20Path addLineToPoint: CGPointMake(39.73, 27.07)]; - [bezier20Path addLineToPoint: CGPointMake(39.95, 26.85)]; - [bezier20Path addLineToPoint: CGPointMake(40.2, 26.66)]; - [bezier20Path addLineToPoint: CGPointMake(40.49, 26.49)]; - [bezier20Path addLineToPoint: CGPointMake(40.82, 26.34)]; - [bezier20Path addLineToPoint: CGPointMake(41.19, 26.24)]; - [bezier20Path addLineToPoint: CGPointMake(41.6, 26.17)]; - [bezier20Path addLineToPoint: CGPointMake(42.06, 26.15)]; - [bezier20Path addLineToPoint: CGPointMake(42.28, 26.16)]; - [bezier20Path addLineToPoint: CGPointMake(42.51, 26.18)]; - [bezier20Path addLineToPoint: CGPointMake(42.75, 26.22)]; - [bezier20Path addLineToPoint: CGPointMake(42.98, 26.28)]; - [bezier20Path addLineToPoint: CGPointMake(43.21, 26.36)]; - [bezier20Path addLineToPoint: CGPointMake(43.43, 26.46)]; - [bezier20Path addLineToPoint: CGPointMake(43.63, 26.6)]; - [bezier20Path addLineToPoint: CGPointMake(43.82, 26.76)]; - [bezier20Path addLineToPoint: CGPointMake(43.99, 26.95)]; - [bezier20Path addLineToPoint: CGPointMake(44.13, 27.18)]; - [bezier20Path addLineToPoint: CGPointMake(44.25, 27.44)]; - [bezier20Path addLineToPoint: CGPointMake(44.33, 27.74)]; - [bezier20Path addLineToPoint: CGPointMake(44.37, 28.09)]; - [bezier20Path addLineToPoint: CGPointMake(44.38, 28.47)]; - [bezier20Path addLineToPoint: CGPointMake(44.34, 28.91)]; - [bezier20Path addLineToPoint: CGPointMake(44.25, 29.38)]; - [bezier20Path addLineToPoint: CGPointMake(44.23, 29.73)]; - [bezier20Path addLineToPoint: CGPointMake(40.14, 29.7)]; - [bezier20Path addLineToPoint: CGPointMake(40.34, 28.61)]; - [bezier20Path addLineToPoint: CGPointMake(42.83, 28.61)]; - [bezier20Path addLineToPoint: CGPointMake(42.84, 28.47)]; - [bezier20Path addLineToPoint: CGPointMake(42.84, 28.33)]; - [bezier20Path addLineToPoint: CGPointMake(42.83, 28.21)]; - [bezier20Path addLineToPoint: CGPointMake(42.8, 28.09)]; - [bezier20Path addLineToPoint: CGPointMake(42.76, 27.98)]; - [bezier20Path addLineToPoint: CGPointMake(42.72, 27.89)]; - [bezier20Path addLineToPoint: CGPointMake(42.67, 27.8)]; - [bezier20Path addLineToPoint: CGPointMake(42.61, 27.72)]; - [bezier20Path addLineToPoint: CGPointMake(42.54, 27.65)]; - [bezier20Path addLineToPoint: CGPointMake(42.47, 27.6)]; - [bezier20Path addLineToPoint: CGPointMake(42.38, 27.55)]; - [bezier20Path addLineToPoint: CGPointMake(42.3, 27.5)]; - [bezier20Path addLineToPoint: CGPointMake(42.2, 27.47)]; - [bezier20Path addLineToPoint: CGPointMake(42.11, 27.44)]; - [bezier20Path addLineToPoint: CGPointMake(42.02, 27.43)]; - [bezier20Path addLineToPoint: CGPointMake(41.91, 27.41)]; - [bezier20Path addLineToPoint: CGPointMake(41.81, 27.42)]; - [bezier20Path addLineToPoint: CGPointMake(41.7, 27.44)]; - [bezier20Path addLineToPoint: CGPointMake(41.61, 27.46)]; - [bezier20Path addLineToPoint: CGPointMake(41.51, 27.49)]; - [bezier20Path addLineToPoint: CGPointMake(41.41, 27.54)]; - [bezier20Path addLineToPoint: CGPointMake(41.33, 27.59)]; - [bezier20Path addLineToPoint: CGPointMake(41.24, 27.65)]; - [bezier20Path addLineToPoint: CGPointMake(41.17, 27.72)]; - [bezier20Path addLineToPoint: CGPointMake(41.09, 27.8)]; - [bezier20Path addLineToPoint: CGPointMake(41.03, 27.89)]; - [bezier20Path addLineToPoint: CGPointMake(40.96, 27.98)]; - [bezier20Path addLineToPoint: CGPointMake(40.91, 28.08)]; - [bezier20Path addLineToPoint: CGPointMake(40.86, 28.18)]; - [bezier20Path addLineToPoint: CGPointMake(40.82, 28.29)]; - [bezier20Path addLineToPoint: CGPointMake(40.79, 28.41)]; - [bezier20Path addLineToPoint: CGPointMake(40.76, 28.52)]; - [bezier20Path addLineToPoint: CGPointMake(40.54, 29.7)]; - bezier20Path.miterLimit = 4; - - bezier20Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier20Path.lineWidth = 0.5; - [bezier20Path stroke]; - - - //// Bezier 21 Drawing - UIBezierPath* bezier21Path = [UIBezierPath bezierPath]; - [bezier21Path moveToPoint: CGPointMake(39.5, 28.5)]; - [bezier21Path addLineToPoint: CGPointMake(39.5, 30.5)]; - [bezier21Path addLineToPoint: CGPointMake(40.5, 30.5)]; - [bezier21Path addLineToPoint: CGPointMake(40.62, 28.5)]; - [bezier21Path addLineToPoint: CGPointMake(39.5, 28.5)]; - [bezier21Path closePath]; - bezier21Path.miterLimit = 4; - - bezier21Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier21Path fill]; - - - //// Bezier 22 Drawing - UIBezierPath* bezier22Path = [UIBezierPath bezierPath]; - [bezier22Path moveToPoint: CGPointMake(54.12, 26.61)]; - [bezier22Path addLineToPoint: CGPointMake(54.04, 26.57)]; - [bezier22Path addLineToPoint: CGPointMake(53.97, 26.54)]; - [bezier22Path addLineToPoint: CGPointMake(53.89, 26.5)]; - [bezier22Path addLineToPoint: CGPointMake(53.8, 26.46)]; - [bezier22Path addLineToPoint: CGPointMake(53.72, 26.42)]; - [bezier22Path addLineToPoint: CGPointMake(53.52, 26.36)]; - [bezier22Path addLineToPoint: CGPointMake(53.42, 26.32)]; - [bezier22Path addLineToPoint: CGPointMake(53.31, 26.29)]; - [bezier22Path addLineToPoint: CGPointMake(53.2, 26.27)]; - [bezier22Path addLineToPoint: CGPointMake(53.09, 26.25)]; - [bezier22Path addLineToPoint: CGPointMake(52.97, 26.23)]; - [bezier22Path addLineToPoint: CGPointMake(52.83, 26.22)]; - [bezier22Path addLineToPoint: CGPointMake(52.7, 26.21)]; - [bezier22Path addLineToPoint: CGPointMake(52.28, 26.21)]; - [bezier22Path addLineToPoint: CGPointMake(52.13, 26.22)]; - [bezier22Path addLineToPoint: CGPointMake(51.98, 26.24)]; - [bezier22Path addLineToPoint: CGPointMake(51.82, 26.26)]; - [bezier22Path addLineToPoint: CGPointMake(51.66, 26.31)]; - [bezier22Path addLineToPoint: CGPointMake(51.5, 26.37)]; - [bezier22Path addLineToPoint: CGPointMake(51.34, 26.45)]; - [bezier22Path addLineToPoint: CGPointMake(51.18, 26.55)]; - [bezier22Path addLineToPoint: CGPointMake(51.03, 26.68)]; - [bezier22Path addLineToPoint: CGPointMake(50.88, 26.83)]; - [bezier22Path addLineToPoint: CGPointMake(50.74, 27.01)]; - [bezier22Path addLineToPoint: CGPointMake(50.6, 27.22)]; - [bezier22Path addLineToPoint: CGPointMake(50.48, 27.47)]; - [bezier22Path addLineToPoint: CGPointMake(50.36, 27.76)]; - [bezier22Path addLineToPoint: CGPointMake(50.25, 28.08)]; - [bezier22Path addLineToPoint: CGPointMake(50.16, 28.44)]; - [bezier22Path addLineToPoint: CGPointMake(50.12, 28.64)]; - [bezier22Path addLineToPoint: CGPointMake(50.1, 28.84)]; - [bezier22Path addLineToPoint: CGPointMake(50.09, 29.04)]; - [bezier22Path addLineToPoint: CGPointMake(50.1, 29.24)]; - [bezier22Path addLineToPoint: CGPointMake(50.11, 29.43)]; - [bezier22Path addLineToPoint: CGPointMake(50.15, 29.61)]; - [bezier22Path addLineToPoint: CGPointMake(50.2, 29.78)]; - [bezier22Path addLineToPoint: CGPointMake(50.27, 29.95)]; - [bezier22Path addLineToPoint: CGPointMake(50.35, 30.11)]; - [bezier22Path addLineToPoint: CGPointMake(50.45, 30.26)]; - [bezier22Path addLineToPoint: CGPointMake(50.57, 30.39)]; - [bezier22Path addLineToPoint: CGPointMake(50.71, 30.51)]; - [bezier22Path addLineToPoint: CGPointMake(50.86, 30.61)]; - [bezier22Path addLineToPoint: CGPointMake(51.04, 30.69)]; - [bezier22Path addLineToPoint: CGPointMake(51.24, 30.77)]; - [bezier22Path addLineToPoint: CGPointMake(51.45, 30.82)]; - [bezier22Path addLineToPoint: CGPointMake(51.53, 30.84)]; - [bezier22Path addLineToPoint: CGPointMake(51.61, 30.85)]; - [bezier22Path addLineToPoint: CGPointMake(51.71, 30.87)]; - [bezier22Path addLineToPoint: CGPointMake(51.83, 30.88)]; - [bezier22Path addLineToPoint: CGPointMake(51.95, 30.89)]; - [bezier22Path addLineToPoint: CGPointMake(52.23, 30.89)]; - [bezier22Path addLineToPoint: CGPointMake(52.37, 30.88)]; - [bezier22Path addLineToPoint: CGPointMake(52.52, 30.86)]; - [bezier22Path addLineToPoint: CGPointMake(52.66, 30.83)]; - [bezier22Path addLineToPoint: CGPointMake(52.81, 30.79)]; - [bezier22Path addLineToPoint: CGPointMake(52.95, 30.75)]; - [bezier22Path addLineToPoint: CGPointMake(53.09, 30.68)]; - [bezier22Path addLineToPoint: CGPointMake(53.22, 30.61)]; - [bezier22Path addLineToPoint: CGPointMake(53.34, 30.52)]; - [bezier22Path addLineToPoint: CGPointMake(53.46, 30.42)]; - [bezier22Path addLineToPoint: CGPointMake(53.2, 31.94)]; - [bezier22Path addLineToPoint: CGPointMake(53.17, 31.96)]; - [bezier22Path addLineToPoint: CGPointMake(53.13, 32)]; - [bezier22Path addLineToPoint: CGPointMake(53.09, 32.04)]; - [bezier22Path addLineToPoint: CGPointMake(53.03, 32.07)]; - [bezier22Path addLineToPoint: CGPointMake(52.97, 32.12)]; - [bezier22Path addLineToPoint: CGPointMake(52.89, 32.16)]; - [bezier22Path addLineToPoint: CGPointMake(52.8, 32.2)]; - [bezier22Path addLineToPoint: CGPointMake(52.7, 32.23)]; - [bezier22Path addLineToPoint: CGPointMake(52.57, 32.27)]; - [bezier22Path addLineToPoint: CGPointMake(52.42, 32.3)]; - [bezier22Path addLineToPoint: CGPointMake(52.25, 32.32)]; - [bezier22Path addLineToPoint: CGPointMake(52.05, 32.35)]; - [bezier22Path addLineToPoint: CGPointMake(51.83, 32.36)]; - [bezier22Path addLineToPoint: CGPointMake(51.57, 32.36)]; - [bezier22Path addLineToPoint: CGPointMake(51.28, 32.36)]; - [bezier22Path addLineToPoint: CGPointMake(50.96, 32.34)]; - [bezier22Path addLineToPoint: CGPointMake(50.7, 32.31)]; - [bezier22Path addLineToPoint: CGPointMake(50.44, 32.25)]; - [bezier22Path addLineToPoint: CGPointMake(50.18, 32.17)]; - [bezier22Path addLineToPoint: CGPointMake(49.91, 32.05)]; - [bezier22Path addLineToPoint: CGPointMake(49.66, 31.92)]; - [bezier22Path addLineToPoint: CGPointMake(49.42, 31.75)]; - [bezier22Path addLineToPoint: CGPointMake(49.2, 31.55)]; - [bezier22Path addLineToPoint: CGPointMake(48.99, 31.32)]; - [bezier22Path addLineToPoint: CGPointMake(48.8, 31.06)]; - [bezier22Path addLineToPoint: CGPointMake(48.64, 30.78)]; - [bezier22Path addLineToPoint: CGPointMake(48.5, 30.46)]; - [bezier22Path addLineToPoint: CGPointMake(48.4, 30.11)]; - [bezier22Path addLineToPoint: CGPointMake(48.33, 29.73)]; - [bezier22Path addLineToPoint: CGPointMake(48.31, 29.33)]; - [bezier22Path addLineToPoint: CGPointMake(48.32, 28.88)]; - [bezier22Path addLineToPoint: CGPointMake(48.38, 28.41)]; - [bezier22Path addLineToPoint: CGPointMake(48.43, 28.18)]; - [bezier22Path addLineToPoint: CGPointMake(48.48, 27.95)]; - [bezier22Path addLineToPoint: CGPointMake(48.54, 27.73)]; - [bezier22Path addLineToPoint: CGPointMake(48.59, 27.52)]; - [bezier22Path addLineToPoint: CGPointMake(48.66, 27.32)]; - [bezier22Path addLineToPoint: CGPointMake(48.73, 27.12)]; - [bezier22Path addLineToPoint: CGPointMake(48.8, 26.93)]; - [bezier22Path addLineToPoint: CGPointMake(48.88, 26.75)]; - [bezier22Path addLineToPoint: CGPointMake(48.97, 26.58)]; - [bezier22Path addLineToPoint: CGPointMake(49.05, 26.41)]; - [bezier22Path addLineToPoint: CGPointMake(49.15, 26.25)]; - [bezier22Path addLineToPoint: CGPointMake(49.25, 26.11)]; - [bezier22Path addLineToPoint: CGPointMake(49.36, 25.96)]; - [bezier22Path addLineToPoint: CGPointMake(49.47, 25.83)]; - [bezier22Path addLineToPoint: CGPointMake(49.58, 25.7)]; - [bezier22Path addLineToPoint: CGPointMake(49.7, 25.58)]; - [bezier22Path addLineToPoint: CGPointMake(49.83, 25.47)]; - [bezier22Path addLineToPoint: CGPointMake(49.97, 25.36)]; - [bezier22Path addLineToPoint: CGPointMake(50.1, 25.26)]; - [bezier22Path addLineToPoint: CGPointMake(50.24, 25.17)]; - [bezier22Path addLineToPoint: CGPointMake(50.4, 25.09)]; - [bezier22Path addLineToPoint: CGPointMake(50.55, 25.01)]; - [bezier22Path addLineToPoint: CGPointMake(50.71, 24.94)]; - [bezier22Path addLineToPoint: CGPointMake(50.88, 24.88)]; - [bezier22Path addLineToPoint: CGPointMake(51.05, 24.82)]; - [bezier22Path addLineToPoint: CGPointMake(51.23, 24.78)]; - [bezier22Path addLineToPoint: CGPointMake(51.41, 24.74)]; - [bezier22Path addLineToPoint: CGPointMake(51.61, 24.7)]; - [bezier22Path addLineToPoint: CGPointMake(51.8, 24.68)]; - [bezier22Path addLineToPoint: CGPointMake(52, 24.65)]; - [bezier22Path addLineToPoint: CGPointMake(52.21, 24.64)]; - [bezier22Path addLineToPoint: CGPointMake(52.43, 24.64)]; - [bezier22Path addLineToPoint: CGPointMake(52.61, 24.64)]; - [bezier22Path addLineToPoint: CGPointMake(52.78, 24.65)]; - [bezier22Path addLineToPoint: CGPointMake(52.95, 24.67)]; - [bezier22Path addLineToPoint: CGPointMake(53.13, 24.69)]; - [bezier22Path addLineToPoint: CGPointMake(53.28, 24.72)]; - [bezier22Path addLineToPoint: CGPointMake(53.44, 24.75)]; - [bezier22Path addLineToPoint: CGPointMake(53.59, 24.78)]; - [bezier22Path addLineToPoint: CGPointMake(53.72, 24.81)]; - [bezier22Path addLineToPoint: CGPointMake(53.85, 24.85)]; - [bezier22Path addLineToPoint: CGPointMake(53.97, 24.88)]; - [bezier22Path addLineToPoint: CGPointMake(54.08, 24.92)]; - [bezier22Path addLineToPoint: CGPointMake(54.17, 24.95)]; - [bezier22Path addLineToPoint: CGPointMake(54.25, 24.98)]; - [bezier22Path addLineToPoint: CGPointMake(54.31, 25)]; - [bezier22Path addLineToPoint: CGPointMake(54.37, 25.02)]; - [bezier22Path addLineToPoint: CGPointMake(54.4, 25.03)]; - [bezier22Path addLineToPoint: CGPointMake(54.12, 26.61)]; - [bezier22Path closePath]; - bezier22Path.miterLimit = 4; - - bezier22Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier22Path fill]; - - - //// Bezier 23 Drawing - UIBezierPath* bezier23Path = [UIBezierPath bezierPath]; - [bezier23Path moveToPoint: CGPointMake(54.12, 26.61)]; - [bezier23Path addLineToPoint: CGPointMake(54.12, 26.61)]; - [bezier23Path addLineToPoint: CGPointMake(54.04, 26.57)]; - [bezier23Path addLineToPoint: CGPointMake(53.97, 26.54)]; - [bezier23Path addLineToPoint: CGPointMake(53.89, 26.5)]; - [bezier23Path addLineToPoint: CGPointMake(53.8, 26.46)]; - [bezier23Path addLineToPoint: CGPointMake(53.72, 26.42)]; - [bezier23Path addLineToPoint: CGPointMake(53.52, 26.36)]; - [bezier23Path addLineToPoint: CGPointMake(53.42, 26.32)]; - [bezier23Path addLineToPoint: CGPointMake(53.31, 26.29)]; - [bezier23Path addLineToPoint: CGPointMake(53.2, 26.27)]; - [bezier23Path addLineToPoint: CGPointMake(53.09, 26.25)]; - [bezier23Path addLineToPoint: CGPointMake(52.97, 26.23)]; - [bezier23Path addLineToPoint: CGPointMake(52.83, 26.22)]; - [bezier23Path addLineToPoint: CGPointMake(52.7, 26.21)]; - [bezier23Path addLineToPoint: CGPointMake(52.28, 26.21)]; - [bezier23Path addLineToPoint: CGPointMake(52.13, 26.22)]; - [bezier23Path addLineToPoint: CGPointMake(51.98, 26.24)]; - [bezier23Path addLineToPoint: CGPointMake(51.82, 26.26)]; - [bezier23Path addLineToPoint: CGPointMake(51.66, 26.31)]; - [bezier23Path addLineToPoint: CGPointMake(51.5, 26.37)]; - [bezier23Path addLineToPoint: CGPointMake(51.34, 26.45)]; - [bezier23Path addLineToPoint: CGPointMake(51.18, 26.55)]; - [bezier23Path addLineToPoint: CGPointMake(51.03, 26.68)]; - [bezier23Path addLineToPoint: CGPointMake(50.88, 26.83)]; - [bezier23Path addLineToPoint: CGPointMake(50.74, 27.01)]; - [bezier23Path addLineToPoint: CGPointMake(50.6, 27.22)]; - [bezier23Path addLineToPoint: CGPointMake(50.48, 27.47)]; - [bezier23Path addLineToPoint: CGPointMake(50.36, 27.76)]; - [bezier23Path addLineToPoint: CGPointMake(50.25, 28.08)]; - [bezier23Path addLineToPoint: CGPointMake(50.16, 28.44)]; - [bezier23Path addLineToPoint: CGPointMake(50.12, 28.64)]; - [bezier23Path addLineToPoint: CGPointMake(50.1, 28.84)]; - [bezier23Path addLineToPoint: CGPointMake(50.09, 29.04)]; - [bezier23Path addLineToPoint: CGPointMake(50.1, 29.24)]; - [bezier23Path addLineToPoint: CGPointMake(50.11, 29.43)]; - [bezier23Path addLineToPoint: CGPointMake(50.15, 29.61)]; - [bezier23Path addLineToPoint: CGPointMake(50.2, 29.78)]; - [bezier23Path addLineToPoint: CGPointMake(50.27, 29.95)]; - [bezier23Path addLineToPoint: CGPointMake(50.35, 30.11)]; - [bezier23Path addLineToPoint: CGPointMake(50.45, 30.26)]; - [bezier23Path addLineToPoint: CGPointMake(50.57, 30.39)]; - [bezier23Path addLineToPoint: CGPointMake(50.71, 30.51)]; - [bezier23Path addLineToPoint: CGPointMake(50.86, 30.61)]; - [bezier23Path addLineToPoint: CGPointMake(51.04, 30.69)]; - [bezier23Path addLineToPoint: CGPointMake(51.24, 30.77)]; - [bezier23Path addLineToPoint: CGPointMake(51.45, 30.82)]; - [bezier23Path addLineToPoint: CGPointMake(51.53, 30.84)]; - [bezier23Path addLineToPoint: CGPointMake(51.61, 30.85)]; - [bezier23Path addLineToPoint: CGPointMake(51.71, 30.87)]; - [bezier23Path addLineToPoint: CGPointMake(51.83, 30.88)]; - [bezier23Path addLineToPoint: CGPointMake(51.95, 30.89)]; - [bezier23Path addLineToPoint: CGPointMake(52.23, 30.89)]; - [bezier23Path addLineToPoint: CGPointMake(52.37, 30.88)]; - [bezier23Path addLineToPoint: CGPointMake(52.52, 30.86)]; - [bezier23Path addLineToPoint: CGPointMake(52.66, 30.83)]; - [bezier23Path addLineToPoint: CGPointMake(52.81, 30.79)]; - [bezier23Path addLineToPoint: CGPointMake(52.95, 30.75)]; - [bezier23Path addLineToPoint: CGPointMake(53.09, 30.68)]; - [bezier23Path addLineToPoint: CGPointMake(53.22, 30.61)]; - [bezier23Path addLineToPoint: CGPointMake(53.34, 30.52)]; - [bezier23Path addLineToPoint: CGPointMake(53.46, 30.42)]; - [bezier23Path addLineToPoint: CGPointMake(53.2, 31.94)]; - [bezier23Path addLineToPoint: CGPointMake(53.17, 31.96)]; - [bezier23Path addLineToPoint: CGPointMake(53.13, 32)]; - [bezier23Path addLineToPoint: CGPointMake(53.09, 32.04)]; - [bezier23Path addLineToPoint: CGPointMake(53.03, 32.07)]; - [bezier23Path addLineToPoint: CGPointMake(52.97, 32.12)]; - [bezier23Path addLineToPoint: CGPointMake(52.89, 32.16)]; - [bezier23Path addLineToPoint: CGPointMake(52.8, 32.2)]; - [bezier23Path addLineToPoint: CGPointMake(52.7, 32.23)]; - [bezier23Path addLineToPoint: CGPointMake(52.57, 32.27)]; - [bezier23Path addLineToPoint: CGPointMake(52.42, 32.3)]; - [bezier23Path addLineToPoint: CGPointMake(52.25, 32.32)]; - [bezier23Path addLineToPoint: CGPointMake(52.05, 32.35)]; - [bezier23Path addLineToPoint: CGPointMake(51.83, 32.36)]; - [bezier23Path addLineToPoint: CGPointMake(51.57, 32.36)]; - [bezier23Path addLineToPoint: CGPointMake(51.28, 32.36)]; - [bezier23Path addLineToPoint: CGPointMake(50.96, 32.34)]; - [bezier23Path addLineToPoint: CGPointMake(50.7, 32.31)]; - [bezier23Path addLineToPoint: CGPointMake(50.44, 32.25)]; - [bezier23Path addLineToPoint: CGPointMake(50.18, 32.17)]; - [bezier23Path addLineToPoint: CGPointMake(49.91, 32.05)]; - [bezier23Path addLineToPoint: CGPointMake(49.66, 31.92)]; - [bezier23Path addLineToPoint: CGPointMake(49.42, 31.75)]; - [bezier23Path addLineToPoint: CGPointMake(49.2, 31.55)]; - [bezier23Path addLineToPoint: CGPointMake(48.99, 31.32)]; - [bezier23Path addLineToPoint: CGPointMake(48.8, 31.06)]; - [bezier23Path addLineToPoint: CGPointMake(48.64, 30.78)]; - [bezier23Path addLineToPoint: CGPointMake(48.5, 30.46)]; - [bezier23Path addLineToPoint: CGPointMake(48.4, 30.11)]; - [bezier23Path addLineToPoint: CGPointMake(48.33, 29.73)]; - [bezier23Path addLineToPoint: CGPointMake(48.31, 29.33)]; - [bezier23Path addLineToPoint: CGPointMake(48.32, 28.88)]; - [bezier23Path addLineToPoint: CGPointMake(48.38, 28.41)]; - [bezier23Path addLineToPoint: CGPointMake(48.43, 28.18)]; - [bezier23Path addLineToPoint: CGPointMake(48.48, 27.95)]; - [bezier23Path addLineToPoint: CGPointMake(48.54, 27.73)]; - [bezier23Path addLineToPoint: CGPointMake(48.59, 27.52)]; - [bezier23Path addLineToPoint: CGPointMake(48.66, 27.32)]; - [bezier23Path addLineToPoint: CGPointMake(48.73, 27.12)]; - [bezier23Path addLineToPoint: CGPointMake(48.8, 26.93)]; - [bezier23Path addLineToPoint: CGPointMake(48.88, 26.75)]; - [bezier23Path addLineToPoint: CGPointMake(48.97, 26.58)]; - [bezier23Path addLineToPoint: CGPointMake(49.05, 26.41)]; - [bezier23Path addLineToPoint: CGPointMake(49.15, 26.25)]; - [bezier23Path addLineToPoint: CGPointMake(49.25, 26.11)]; - [bezier23Path addLineToPoint: CGPointMake(49.36, 25.96)]; - [bezier23Path addLineToPoint: CGPointMake(49.47, 25.83)]; - [bezier23Path addLineToPoint: CGPointMake(49.58, 25.7)]; - [bezier23Path addLineToPoint: CGPointMake(49.7, 25.58)]; - [bezier23Path addLineToPoint: CGPointMake(49.83, 25.47)]; - [bezier23Path addLineToPoint: CGPointMake(49.97, 25.36)]; - [bezier23Path addLineToPoint: CGPointMake(50.1, 25.26)]; - [bezier23Path addLineToPoint: CGPointMake(50.24, 25.17)]; - [bezier23Path addLineToPoint: CGPointMake(50.4, 25.09)]; - [bezier23Path addLineToPoint: CGPointMake(50.55, 25.01)]; - [bezier23Path addLineToPoint: CGPointMake(50.71, 24.94)]; - [bezier23Path addLineToPoint: CGPointMake(50.88, 24.88)]; - [bezier23Path addLineToPoint: CGPointMake(51.05, 24.82)]; - [bezier23Path addLineToPoint: CGPointMake(51.23, 24.78)]; - [bezier23Path addLineToPoint: CGPointMake(51.41, 24.74)]; - [bezier23Path addLineToPoint: CGPointMake(51.61, 24.7)]; - [bezier23Path addLineToPoint: CGPointMake(51.8, 24.68)]; - [bezier23Path addLineToPoint: CGPointMake(52, 24.65)]; - [bezier23Path addLineToPoint: CGPointMake(52.21, 24.64)]; - [bezier23Path addLineToPoint: CGPointMake(52.43, 24.64)]; - [bezier23Path addLineToPoint: CGPointMake(52.61, 24.64)]; - [bezier23Path addLineToPoint: CGPointMake(52.78, 24.65)]; - [bezier23Path addLineToPoint: CGPointMake(52.95, 24.67)]; - [bezier23Path addLineToPoint: CGPointMake(53.13, 24.69)]; - [bezier23Path addLineToPoint: CGPointMake(53.28, 24.72)]; - [bezier23Path addLineToPoint: CGPointMake(53.44, 24.75)]; - [bezier23Path addLineToPoint: CGPointMake(53.59, 24.78)]; - [bezier23Path addLineToPoint: CGPointMake(53.72, 24.81)]; - [bezier23Path addLineToPoint: CGPointMake(53.85, 24.85)]; - [bezier23Path addLineToPoint: CGPointMake(53.97, 24.88)]; - [bezier23Path addLineToPoint: CGPointMake(54.08, 24.92)]; - [bezier23Path addLineToPoint: CGPointMake(54.17, 24.95)]; - [bezier23Path addLineToPoint: CGPointMake(54.25, 24.98)]; - [bezier23Path addLineToPoint: CGPointMake(54.31, 25)]; - [bezier23Path addLineToPoint: CGPointMake(54.37, 25.02)]; - [bezier23Path addLineToPoint: CGPointMake(54.4, 25.03)]; - [bezier23Path addLineToPoint: CGPointMake(54.12, 26.61)]; - [bezier23Path closePath]; - bezier23Path.miterLimit = 4; - - bezier23Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier23Path.lineWidth = 0.5; - [bezier23Path stroke]; - - - //// Bezier 24 Drawing - UIBezierPath* bezier24Path = [UIBezierPath bezierPath]; - [bezier24Path moveToPoint: CGPointMake(68.13, 32.37)]; - [bezier24Path addLineToPoint: CGPointMake(66.56, 32.37)]; - [bezier24Path addLineToPoint: CGPointMake(66.67, 31.74)]; - [bezier24Path addLineToPoint: CGPointMake(66.67, 31.68)]; - [bezier24Path addLineToPoint: CGPointMake(66.58, 31.79)]; - [bezier24Path addLineToPoint: CGPointMake(66.48, 31.9)]; - [bezier24Path addLineToPoint: CGPointMake(66.39, 31.99)]; - [bezier24Path addLineToPoint: CGPointMake(66.28, 32.07)]; - [bezier24Path addLineToPoint: CGPointMake(66.18, 32.14)]; - [bezier24Path addLineToPoint: CGPointMake(66.08, 32.2)]; - [bezier24Path addLineToPoint: CGPointMake(65.98, 32.25)]; - [bezier24Path addLineToPoint: CGPointMake(65.87, 32.31)]; - [bezier24Path addLineToPoint: CGPointMake(65.76, 32.35)]; - [bezier24Path addLineToPoint: CGPointMake(65.65, 32.37)]; - [bezier24Path addLineToPoint: CGPointMake(65.54, 32.4)]; - [bezier24Path addLineToPoint: CGPointMake(65.43, 32.42)]; - [bezier24Path addLineToPoint: CGPointMake(65.32, 32.44)]; - [bezier24Path addLineToPoint: CGPointMake(65.21, 32.45)]; - [bezier24Path addLineToPoint: CGPointMake(65.09, 32.45)]; - [bezier24Path addLineToPoint: CGPointMake(64.98, 32.45)]; - [bezier24Path addLineToPoint: CGPointMake(64.68, 32.43)]; - [bezier24Path addLineToPoint: CGPointMake(64.41, 32.37)]; - [bezier24Path addLineToPoint: CGPointMake(64.16, 32.27)]; - [bezier24Path addLineToPoint: CGPointMake(63.93, 32.14)]; - [bezier24Path addLineToPoint: CGPointMake(63.73, 31.98)]; - [bezier24Path addLineToPoint: CGPointMake(63.54, 31.78)]; - [bezier24Path addLineToPoint: CGPointMake(63.38, 31.57)]; - [bezier24Path addLineToPoint: CGPointMake(63.25, 31.33)]; - [bezier24Path addLineToPoint: CGPointMake(63.13, 31.08)]; - [bezier24Path addLineToPoint: CGPointMake(63.04, 30.81)]; - [bezier24Path addLineToPoint: CGPointMake(62.98, 30.53)]; - [bezier24Path addLineToPoint: CGPointMake(62.94, 30.24)]; - [bezier24Path addLineToPoint: CGPointMake(62.92, 29.95)]; - [bezier24Path addLineToPoint: CGPointMake(62.92, 29.65)]; - [bezier24Path addLineToPoint: CGPointMake(62.95, 29.36)]; - [bezier24Path addLineToPoint: CGPointMake(63, 29.07)]; - [bezier24Path addLineToPoint: CGPointMake(63.09, 28.74)]; - [bezier24Path addLineToPoint: CGPointMake(63.19, 28.42)]; - [bezier24Path addLineToPoint: CGPointMake(63.31, 28.13)]; - [bezier24Path addLineToPoint: CGPointMake(63.45, 27.85)]; - [bezier24Path addLineToPoint: CGPointMake(63.6, 27.6)]; - [bezier24Path addLineToPoint: CGPointMake(63.77, 27.37)]; - [bezier24Path addLineToPoint: CGPointMake(63.95, 27.16)]; - [bezier24Path addLineToPoint: CGPointMake(64.14, 26.98)]; - [bezier24Path addLineToPoint: CGPointMake(64.34, 26.81)]; - [bezier24Path addLineToPoint: CGPointMake(64.55, 26.67)]; - [bezier24Path addLineToPoint: CGPointMake(64.76, 26.54)]; - [bezier24Path addLineToPoint: CGPointMake(64.98, 26.45)]; - [bezier24Path addLineToPoint: CGPointMake(65.21, 26.37)]; - [bezier24Path addLineToPoint: CGPointMake(65.43, 26.32)]; - [bezier24Path addLineToPoint: CGPointMake(65.66, 26.28)]; - [bezier24Path addLineToPoint: CGPointMake(65.9, 26.27)]; - [bezier24Path addLineToPoint: CGPointMake(66.06, 26.28)]; - [bezier24Path addLineToPoint: CGPointMake(66.22, 26.29)]; - [bezier24Path addLineToPoint: CGPointMake(66.37, 26.32)]; - [bezier24Path addLineToPoint: CGPointMake(66.51, 26.36)]; - [bezier24Path addLineToPoint: CGPointMake(66.64, 26.41)]; - [bezier24Path addLineToPoint: CGPointMake(66.75, 26.46)]; - [bezier24Path addLineToPoint: CGPointMake(66.86, 26.52)]; - [bezier24Path addLineToPoint: CGPointMake(66.97, 26.58)]; - [bezier24Path addLineToPoint: CGPointMake(67.06, 26.65)]; - [bezier24Path addLineToPoint: CGPointMake(67.14, 26.73)]; - [bezier24Path addLineToPoint: CGPointMake(67.22, 26.8)]; - [bezier24Path addLineToPoint: CGPointMake(67.29, 26.87)]; - [bezier24Path addLineToPoint: CGPointMake(67.34, 26.95)]; - [bezier24Path addLineToPoint: CGPointMake(67.39, 27.02)]; - [bezier24Path addLineToPoint: CGPointMake(67.44, 27.09)]; - [bezier24Path addLineToPoint: CGPointMake(67.47, 27.16)]; - [bezier24Path addLineToPoint: CGPointMake(67.87, 24.92)]; - [bezier24Path addLineToPoint: CGPointMake(69.42, 24.92)]; - [bezier24Path addLineToPoint: CGPointMake(68.13, 32.37)]; - [bezier24Path closePath]; - bezier24Path.miterLimit = 4; - - bezier24Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier24Path fill]; - - - //// Bezier 25 Drawing - UIBezierPath* bezier25Path = [UIBezierPath bezierPath]; - [bezier25Path moveToPoint: CGPointMake(68.13, 32.37)]; - [bezier25Path addLineToPoint: CGPointMake(66.56, 32.37)]; - [bezier25Path addLineToPoint: CGPointMake(66.67, 31.74)]; - [bezier25Path addLineToPoint: CGPointMake(66.67, 31.68)]; - [bezier25Path addLineToPoint: CGPointMake(66.58, 31.79)]; - [bezier25Path addLineToPoint: CGPointMake(66.48, 31.9)]; - [bezier25Path addLineToPoint: CGPointMake(66.39, 31.99)]; - [bezier25Path addLineToPoint: CGPointMake(66.28, 32.07)]; - [bezier25Path addLineToPoint: CGPointMake(66.18, 32.14)]; - [bezier25Path addLineToPoint: CGPointMake(66.08, 32.2)]; - [bezier25Path addLineToPoint: CGPointMake(65.98, 32.25)]; - [bezier25Path addLineToPoint: CGPointMake(65.87, 32.31)]; - [bezier25Path addLineToPoint: CGPointMake(65.76, 32.35)]; - [bezier25Path addLineToPoint: CGPointMake(65.65, 32.37)]; - [bezier25Path addLineToPoint: CGPointMake(65.54, 32.4)]; - [bezier25Path addLineToPoint: CGPointMake(65.43, 32.42)]; - [bezier25Path addLineToPoint: CGPointMake(65.32, 32.44)]; - [bezier25Path addLineToPoint: CGPointMake(65.21, 32.45)]; - [bezier25Path addLineToPoint: CGPointMake(65.09, 32.45)]; - [bezier25Path addLineToPoint: CGPointMake(64.98, 32.45)]; - [bezier25Path addLineToPoint: CGPointMake(64.68, 32.43)]; - [bezier25Path addLineToPoint: CGPointMake(64.41, 32.37)]; - [bezier25Path addLineToPoint: CGPointMake(64.16, 32.27)]; - [bezier25Path addLineToPoint: CGPointMake(63.93, 32.14)]; - [bezier25Path addLineToPoint: CGPointMake(63.73, 31.98)]; - [bezier25Path addLineToPoint: CGPointMake(63.54, 31.78)]; - [bezier25Path addLineToPoint: CGPointMake(63.38, 31.57)]; - [bezier25Path addLineToPoint: CGPointMake(63.25, 31.33)]; - [bezier25Path addLineToPoint: CGPointMake(63.13, 31.08)]; - [bezier25Path addLineToPoint: CGPointMake(63.04, 30.81)]; - [bezier25Path addLineToPoint: CGPointMake(62.98, 30.53)]; - [bezier25Path addLineToPoint: CGPointMake(62.94, 30.24)]; - [bezier25Path addLineToPoint: CGPointMake(62.92, 29.95)]; - [bezier25Path addLineToPoint: CGPointMake(62.92, 29.65)]; - [bezier25Path addLineToPoint: CGPointMake(62.95, 29.36)]; - [bezier25Path addLineToPoint: CGPointMake(63, 29.07)]; - [bezier25Path addLineToPoint: CGPointMake(63.09, 28.74)]; - [bezier25Path addLineToPoint: CGPointMake(63.19, 28.42)]; - [bezier25Path addLineToPoint: CGPointMake(63.31, 28.13)]; - [bezier25Path addLineToPoint: CGPointMake(63.45, 27.85)]; - [bezier25Path addLineToPoint: CGPointMake(63.6, 27.6)]; - [bezier25Path addLineToPoint: CGPointMake(63.77, 27.37)]; - [bezier25Path addLineToPoint: CGPointMake(63.95, 27.16)]; - [bezier25Path addLineToPoint: CGPointMake(64.14, 26.98)]; - [bezier25Path addLineToPoint: CGPointMake(64.34, 26.81)]; - [bezier25Path addLineToPoint: CGPointMake(64.55, 26.67)]; - [bezier25Path addLineToPoint: CGPointMake(64.76, 26.54)]; - [bezier25Path addLineToPoint: CGPointMake(64.98, 26.45)]; - [bezier25Path addLineToPoint: CGPointMake(65.21, 26.37)]; - [bezier25Path addLineToPoint: CGPointMake(65.43, 26.32)]; - [bezier25Path addLineToPoint: CGPointMake(65.66, 26.28)]; - [bezier25Path addLineToPoint: CGPointMake(65.9, 26.27)]; - [bezier25Path addLineToPoint: CGPointMake(66.06, 26.28)]; - [bezier25Path addLineToPoint: CGPointMake(66.22, 26.29)]; - [bezier25Path addLineToPoint: CGPointMake(66.37, 26.32)]; - [bezier25Path addLineToPoint: CGPointMake(66.51, 26.36)]; - [bezier25Path addLineToPoint: CGPointMake(66.64, 26.41)]; - [bezier25Path addLineToPoint: CGPointMake(66.75, 26.46)]; - [bezier25Path addLineToPoint: CGPointMake(66.86, 26.52)]; - [bezier25Path addLineToPoint: CGPointMake(66.97, 26.58)]; - [bezier25Path addLineToPoint: CGPointMake(67.06, 26.65)]; - [bezier25Path addLineToPoint: CGPointMake(67.14, 26.73)]; - [bezier25Path addLineToPoint: CGPointMake(67.22, 26.8)]; - [bezier25Path addLineToPoint: CGPointMake(67.29, 26.87)]; - [bezier25Path addLineToPoint: CGPointMake(67.34, 26.95)]; - [bezier25Path addLineToPoint: CGPointMake(67.39, 27.02)]; - [bezier25Path addLineToPoint: CGPointMake(67.44, 27.09)]; - [bezier25Path addLineToPoint: CGPointMake(67.47, 27.16)]; - [bezier25Path addLineToPoint: CGPointMake(67.87, 24.92)]; - [bezier25Path addLineToPoint: CGPointMake(69.42, 24.92)]; - [bezier25Path addLineToPoint: CGPointMake(68.13, 32.37)]; - [bezier25Path closePath]; - bezier25Path.miterLimit = 4; - - bezier25Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier25Path.lineWidth = 0.5; - [bezier25Path stroke]; - - - //// Bezier 26 Drawing - UIBezierPath* bezier26Path = [UIBezierPath bezierPath]; - [bezier26Path moveToPoint: CGPointMake(65.55, 30.99)]; - [bezier26Path addLineToPoint: CGPointMake(65.71, 30.98)]; - [bezier26Path addLineToPoint: CGPointMake(65.86, 30.94)]; - [bezier26Path addLineToPoint: CGPointMake(66, 30.9)]; - [bezier26Path addLineToPoint: CGPointMake(66.13, 30.84)]; - [bezier26Path addLineToPoint: CGPointMake(66.25, 30.77)]; - [bezier26Path addLineToPoint: CGPointMake(66.36, 30.69)]; - [bezier26Path addLineToPoint: CGPointMake(66.47, 30.59)]; - [bezier26Path addLineToPoint: CGPointMake(66.57, 30.49)]; - [bezier26Path addLineToPoint: CGPointMake(66.65, 30.38)]; - [bezier26Path addLineToPoint: CGPointMake(66.73, 30.25)]; - [bezier26Path addLineToPoint: CGPointMake(66.81, 30.12)]; - [bezier26Path addLineToPoint: CGPointMake(66.87, 29.98)]; - [bezier26Path addLineToPoint: CGPointMake(66.93, 29.84)]; - [bezier26Path addLineToPoint: CGPointMake(66.97, 29.69)]; - [bezier26Path addLineToPoint: CGPointMake(67.01, 29.54)]; - [bezier26Path addLineToPoint: CGPointMake(67.04, 29.38)]; - [bezier26Path addLineToPoint: CGPointMake(67.07, 29.23)]; - [bezier26Path addLineToPoint: CGPointMake(67.09, 29.06)]; - [bezier26Path addLineToPoint: CGPointMake(67.09, 28.91)]; - [bezier26Path addLineToPoint: CGPointMake(67.08, 28.75)]; - [bezier26Path addLineToPoint: CGPointMake(67.06, 28.6)]; - [bezier26Path addLineToPoint: CGPointMake(67.04, 28.46)]; - [bezier26Path addLineToPoint: CGPointMake(67, 28.32)]; - [bezier26Path addLineToPoint: CGPointMake(66.95, 28.19)]; - [bezier26Path addLineToPoint: CGPointMake(66.9, 28.08)]; - [bezier26Path addLineToPoint: CGPointMake(66.83, 27.97)]; - [bezier26Path addLineToPoint: CGPointMake(66.76, 27.88)]; - [bezier26Path addLineToPoint: CGPointMake(66.67, 27.8)]; - [bezier26Path addLineToPoint: CGPointMake(66.57, 27.73)]; - [bezier26Path addLineToPoint: CGPointMake(66.47, 27.68)]; - [bezier26Path addLineToPoint: CGPointMake(66.36, 27.65)]; - [bezier26Path addLineToPoint: CGPointMake(66.24, 27.64)]; - [bezier26Path addLineToPoint: CGPointMake(66.09, 27.65)]; - [bezier26Path addLineToPoint: CGPointMake(65.95, 27.68)]; - [bezier26Path addLineToPoint: CGPointMake(65.82, 27.72)]; - [bezier26Path addLineToPoint: CGPointMake(65.69, 27.78)]; - [bezier26Path addLineToPoint: CGPointMake(65.57, 27.85)]; - [bezier26Path addLineToPoint: CGPointMake(65.46, 27.94)]; - [bezier26Path addLineToPoint: CGPointMake(65.36, 28.04)]; - [bezier26Path addLineToPoint: CGPointMake(65.26, 28.15)]; - [bezier26Path addLineToPoint: CGPointMake(65.18, 28.27)]; - [bezier26Path addLineToPoint: CGPointMake(65.1, 28.41)]; - [bezier26Path addLineToPoint: CGPointMake(65.02, 28.54)]; - [bezier26Path addLineToPoint: CGPointMake(64.96, 28.69)]; - [bezier26Path addLineToPoint: CGPointMake(64.91, 28.84)]; - [bezier26Path addLineToPoint: CGPointMake(64.86, 29)]; - [bezier26Path addLineToPoint: CGPointMake(64.81, 29.16)]; - [bezier26Path addLineToPoint: CGPointMake(64.78, 29.33)]; - [bezier26Path addLineToPoint: CGPointMake(64.75, 29.58)]; - [bezier26Path addLineToPoint: CGPointMake(64.76, 29.85)]; - [bezier26Path addLineToPoint: CGPointMake(64.8, 30.13)]; - [bezier26Path addLineToPoint: CGPointMake(64.88, 30.4)]; - [bezier26Path addLineToPoint: CGPointMake(64.99, 30.63)]; - [bezier26Path addLineToPoint: CGPointMake(65.14, 30.82)]; - [bezier26Path addLineToPoint: CGPointMake(65.33, 30.94)]; - [bezier26Path addLineToPoint: CGPointMake(65.55, 30.99)]; - [bezier26Path closePath]; - bezier26Path.miterLimit = 4; - - bezier26Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier26Path fill]; - - - //// Bezier 27 Drawing - UIBezierPath* bezier27Path = [UIBezierPath bezierPath]; - [bezier27Path moveToPoint: CGPointMake(30.59, 31.1)]; - [bezier27Path addLineToPoint: CGPointMake(30.36, 32.37)]; - [bezier27Path addLineToPoint: CGPointMake(28.93, 32.37)]; - [bezier27Path addLineToPoint: CGPointMake(28.97, 32.13)]; - [bezier27Path addLineToPoint: CGPointMake(29, 31.92)]; - [bezier27Path addLineToPoint: CGPointMake(29.02, 31.76)]; - [bezier27Path addLineToPoint: CGPointMake(29.04, 31.68)]; - [bezier27Path addLineToPoint: CGPointMake(28.96, 31.77)]; - [bezier27Path addLineToPoint: CGPointMake(28.87, 31.86)]; - [bezier27Path addLineToPoint: CGPointMake(28.76, 31.95)]; - [bezier27Path addLineToPoint: CGPointMake(28.64, 32.03)]; - [bezier27Path addLineToPoint: CGPointMake(28.51, 32.11)]; - [bezier27Path addLineToPoint: CGPointMake(28.36, 32.17)]; - [bezier27Path addLineToPoint: CGPointMake(28.22, 32.24)]; - [bezier27Path addLineToPoint: CGPointMake(28.06, 32.3)]; - [bezier27Path addLineToPoint: CGPointMake(27.9, 32.35)]; - [bezier27Path addLineToPoint: CGPointMake(27.73, 32.39)]; - [bezier27Path addLineToPoint: CGPointMake(27.57, 32.43)]; - [bezier27Path addLineToPoint: CGPointMake(27.4, 32.45)]; - [bezier27Path addLineToPoint: CGPointMake(27.23, 32.46)]; - [bezier27Path addLineToPoint: CGPointMake(27.07, 32.46)]; - [bezier27Path addLineToPoint: CGPointMake(26.91, 32.45)]; - [bezier27Path addLineToPoint: CGPointMake(26.75, 32.43)]; - [bezier27Path addLineToPoint: CGPointMake(26.55, 32.37)]; - [bezier27Path addLineToPoint: CGPointMake(26.37, 32.32)]; - [bezier27Path addLineToPoint: CGPointMake(26.21, 32.24)]; - [bezier27Path addLineToPoint: CGPointMake(26.07, 32.16)]; - [bezier27Path addLineToPoint: CGPointMake(25.94, 32.07)]; - [bezier27Path addLineToPoint: CGPointMake(25.83, 31.96)]; - [bezier27Path addLineToPoint: CGPointMake(25.74, 31.86)]; - [bezier27Path addLineToPoint: CGPointMake(25.66, 31.74)]; - [bezier27Path addLineToPoint: CGPointMake(25.59, 31.62)]; - [bezier27Path addLineToPoint: CGPointMake(25.53, 31.5)]; - [bezier27Path addLineToPoint: CGPointMake(25.49, 31.37)]; - [bezier27Path addLineToPoint: CGPointMake(25.45, 31.25)]; - [bezier27Path addLineToPoint: CGPointMake(25.43, 31.12)]; - [bezier27Path addLineToPoint: CGPointMake(25.41, 30.98)]; - [bezier27Path addLineToPoint: CGPointMake(25.4, 30.86)]; - [bezier27Path addLineToPoint: CGPointMake(25.4, 30.73)]; - [bezier27Path addLineToPoint: CGPointMake(25.42, 30.51)]; - [bezier27Path addLineToPoint: CGPointMake(25.45, 30.3)]; - [bezier27Path addLineToPoint: CGPointMake(25.51, 30.1)]; - [bezier27Path addLineToPoint: CGPointMake(25.59, 29.91)]; - [bezier27Path addLineToPoint: CGPointMake(25.68, 29.73)]; - [bezier27Path addLineToPoint: CGPointMake(25.78, 29.56)]; - [bezier27Path addLineToPoint: CGPointMake(25.9, 29.4)]; - [bezier27Path addLineToPoint: CGPointMake(26.04, 29.26)]; - [bezier27Path addLineToPoint: CGPointMake(26.18, 29.13)]; - [bezier27Path addLineToPoint: CGPointMake(26.34, 29.01)]; - [bezier27Path addLineToPoint: CGPointMake(26.5, 28.9)]; - [bezier27Path addLineToPoint: CGPointMake(26.67, 28.81)]; - [bezier27Path addLineToPoint: CGPointMake(26.85, 28.73)]; - [bezier27Path addLineToPoint: CGPointMake(27.04, 28.67)]; - [bezier27Path addLineToPoint: CGPointMake(27.24, 28.62)]; - [bezier27Path addLineToPoint: CGPointMake(27.44, 28.58)]; - [bezier27Path addLineToPoint: CGPointMake(27.45, 28.58)]; - [bezier27Path addLineToPoint: CGPointMake(27.48, 28.58)]; - [bezier27Path addLineToPoint: CGPointMake(27.52, 28.57)]; - [bezier27Path addLineToPoint: CGPointMake(27.58, 28.56)]; - [bezier27Path addLineToPoint: CGPointMake(27.65, 28.55)]; - [bezier27Path addLineToPoint: CGPointMake(27.73, 28.55)]; - [bezier27Path addLineToPoint: CGPointMake(27.81, 28.54)]; - [bezier27Path addLineToPoint: CGPointMake(27.91, 28.52)]; - [bezier27Path addLineToPoint: CGPointMake(28.01, 28.51)]; - [bezier27Path addLineToPoint: CGPointMake(28.1, 28.5)]; - [bezier27Path addLineToPoint: CGPointMake(28.2, 28.5)]; - [bezier27Path addLineToPoint: CGPointMake(28.3, 28.49)]; - [bezier27Path addLineToPoint: CGPointMake(28.39, 28.48)]; - [bezier27Path addLineToPoint: CGPointMake(28.47, 28.47)]; - [bezier27Path addLineToPoint: CGPointMake(28.55, 28.47)]; - [bezier27Path addLineToPoint: CGPointMake(28.75, 28.47)]; - [bezier27Path addLineToPoint: CGPointMake(28.88, 28.47)]; - [bezier27Path addLineToPoint: CGPointMake(29.01, 28.48)]; - [bezier27Path addLineToPoint: CGPointMake(29.13, 28.48)]; - [bezier27Path addLineToPoint: CGPointMake(29.23, 28.49)]; - [bezier27Path addLineToPoint: CGPointMake(29.31, 28.49)]; - [bezier27Path addLineToPoint: CGPointMake(29.37, 28.5)]; - [bezier27Path addLineToPoint: CGPointMake(29.39, 28.5)]; - [bezier27Path addLineToPoint: CGPointMake(29.4, 28.46)]; - [bezier27Path addLineToPoint: CGPointMake(29.43, 28.35)]; - [bezier27Path addLineToPoint: CGPointMake(29.46, 28.23)]; - [bezier27Path addLineToPoint: CGPointMake(29.47, 28.13)]; - [bezier27Path addLineToPoint: CGPointMake(29.45, 28)]; - [bezier27Path addLineToPoint: CGPointMake(29.4, 27.89)]; - [bezier27Path addLineToPoint: CGPointMake(29.33, 27.78)]; - [bezier27Path addLineToPoint: CGPointMake(29.24, 27.7)]; - [bezier27Path addLineToPoint: CGPointMake(29.13, 27.63)]; - [bezier27Path addLineToPoint: CGPointMake(29.01, 27.57)]; - [bezier27Path addLineToPoint: CGPointMake(28.88, 27.54)]; - [bezier27Path addLineToPoint: CGPointMake(28.73, 27.53)]; - [bezier27Path addLineToPoint: CGPointMake(28.57, 27.52)]; - [bezier27Path addLineToPoint: CGPointMake(28.4, 27.52)]; - [bezier27Path addLineToPoint: CGPointMake(28.22, 27.52)]; - [bezier27Path addLineToPoint: CGPointMake(28.04, 27.52)]; - [bezier27Path addLineToPoint: CGPointMake(27.85, 27.53)]; - [bezier27Path addLineToPoint: CGPointMake(27.67, 27.55)]; - [bezier27Path addLineToPoint: CGPointMake(27.49, 27.57)]; - [bezier27Path addLineToPoint: CGPointMake(27.31, 27.59)]; - [bezier27Path addLineToPoint: CGPointMake(27.14, 27.61)]; - [bezier27Path addLineToPoint: CGPointMake(26.97, 27.64)]; - [bezier27Path addLineToPoint: CGPointMake(26.83, 27.67)]; - [bezier27Path addLineToPoint: CGPointMake(26.69, 27.7)]; - [bezier27Path addLineToPoint: CGPointMake(26.56, 27.73)]; - [bezier27Path addLineToPoint: CGPointMake(26.46, 27.77)]; - [bezier27Path addLineToPoint: CGPointMake(26.38, 27.81)]; - [bezier27Path addLineToPoint: CGPointMake(26.32, 27.84)]; - [bezier27Path addLineToPoint: CGPointMake(26.72, 26.47)]; - [bezier27Path addLineToPoint: CGPointMake(26.85, 26.42)]; - [bezier27Path addLineToPoint: CGPointMake(26.97, 26.37)]; - [bezier27Path addLineToPoint: CGPointMake(27.11, 26.33)]; - [bezier27Path addLineToPoint: CGPointMake(27.25, 26.3)]; - [bezier27Path addLineToPoint: CGPointMake(27.38, 26.28)]; - [bezier27Path addLineToPoint: CGPointMake(27.53, 26.25)]; - [bezier27Path addLineToPoint: CGPointMake(27.68, 26.23)]; - [bezier27Path addLineToPoint: CGPointMake(27.83, 26.22)]; - [bezier27Path addLineToPoint: CGPointMake(27.99, 26.21)]; - [bezier27Path addLineToPoint: CGPointMake(28.16, 26.2)]; - [bezier27Path addLineToPoint: CGPointMake(28.33, 26.2)]; - [bezier27Path addLineToPoint: CGPointMake(28.88, 26.2)]; - [bezier27Path addLineToPoint: CGPointMake(29.08, 26.2)]; - [bezier27Path addLineToPoint: CGPointMake(29.27, 26.21)]; - [bezier27Path addLineToPoint: CGPointMake(29.43, 26.22)]; - [bezier27Path addLineToPoint: CGPointMake(29.61, 26.25)]; - [bezier27Path addLineToPoint: CGPointMake(29.78, 26.29)]; - [bezier27Path addLineToPoint: CGPointMake(29.96, 26.34)]; - [bezier27Path addLineToPoint: CGPointMake(30.14, 26.41)]; - [bezier27Path addLineToPoint: CGPointMake(30.31, 26.49)]; - [bezier27Path addLineToPoint: CGPointMake(30.48, 26.58)]; - [bezier27Path addLineToPoint: CGPointMake(30.64, 26.69)]; - [bezier27Path addLineToPoint: CGPointMake(30.78, 26.82)]; - [bezier27Path addLineToPoint: CGPointMake(30.91, 26.95)]; - [bezier27Path addLineToPoint: CGPointMake(31.02, 27.11)]; - [bezier27Path addLineToPoint: CGPointMake(31.11, 27.28)]; - [bezier27Path addLineToPoint: CGPointMake(31.16, 27.46)]; - [bezier27Path addLineToPoint: CGPointMake(31.2, 27.65)]; - [bezier27Path addLineToPoint: CGPointMake(31.2, 27.87)]; - [bezier27Path addLineToPoint: CGPointMake(31.16, 28.1)]; - [bezier27Path addLineToPoint: CGPointMake(30.59, 31.1)]; - [bezier27Path closePath]; - bezier27Path.miterLimit = 4; - - bezier27Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier27Path fill]; - - - //// Bezier 28 Drawing - UIBezierPath* bezier28Path = [UIBezierPath bezierPath]; - [bezier28Path moveToPoint: CGPointMake(30.59, 31.1)]; - [bezier28Path addLineToPoint: CGPointMake(30.36, 32.37)]; - [bezier28Path addLineToPoint: CGPointMake(28.93, 32.37)]; - [bezier28Path addLineToPoint: CGPointMake(28.97, 32.13)]; - [bezier28Path addLineToPoint: CGPointMake(29, 31.92)]; - [bezier28Path addLineToPoint: CGPointMake(29.02, 31.76)]; - [bezier28Path addLineToPoint: CGPointMake(29.04, 31.68)]; - [bezier28Path addLineToPoint: CGPointMake(28.96, 31.77)]; - [bezier28Path addLineToPoint: CGPointMake(28.87, 31.86)]; - [bezier28Path addLineToPoint: CGPointMake(28.76, 31.95)]; - [bezier28Path addLineToPoint: CGPointMake(28.64, 32.03)]; - [bezier28Path addLineToPoint: CGPointMake(28.51, 32.11)]; - [bezier28Path addLineToPoint: CGPointMake(28.36, 32.17)]; - [bezier28Path addLineToPoint: CGPointMake(28.22, 32.24)]; - [bezier28Path addLineToPoint: CGPointMake(28.06, 32.3)]; - [bezier28Path addLineToPoint: CGPointMake(27.9, 32.35)]; - [bezier28Path addLineToPoint: CGPointMake(27.73, 32.39)]; - [bezier28Path addLineToPoint: CGPointMake(27.57, 32.43)]; - [bezier28Path addLineToPoint: CGPointMake(27.4, 32.45)]; - [bezier28Path addLineToPoint: CGPointMake(27.23, 32.46)]; - [bezier28Path addLineToPoint: CGPointMake(27.07, 32.46)]; - [bezier28Path addLineToPoint: CGPointMake(26.91, 32.45)]; - [bezier28Path addLineToPoint: CGPointMake(26.75, 32.43)]; - [bezier28Path addLineToPoint: CGPointMake(26.55, 32.37)]; - [bezier28Path addLineToPoint: CGPointMake(26.37, 32.32)]; - [bezier28Path addLineToPoint: CGPointMake(26.21, 32.24)]; - [bezier28Path addLineToPoint: CGPointMake(26.07, 32.16)]; - [bezier28Path addLineToPoint: CGPointMake(25.94, 32.07)]; - [bezier28Path addLineToPoint: CGPointMake(25.83, 31.96)]; - [bezier28Path addLineToPoint: CGPointMake(25.74, 31.86)]; - [bezier28Path addLineToPoint: CGPointMake(25.66, 31.74)]; - [bezier28Path addLineToPoint: CGPointMake(25.59, 31.62)]; - [bezier28Path addLineToPoint: CGPointMake(25.53, 31.5)]; - [bezier28Path addLineToPoint: CGPointMake(25.49, 31.37)]; - [bezier28Path addLineToPoint: CGPointMake(25.45, 31.25)]; - [bezier28Path addLineToPoint: CGPointMake(25.43, 31.12)]; - [bezier28Path addLineToPoint: CGPointMake(25.41, 30.98)]; - [bezier28Path addLineToPoint: CGPointMake(25.4, 30.86)]; - [bezier28Path addLineToPoint: CGPointMake(25.4, 30.73)]; - [bezier28Path addLineToPoint: CGPointMake(25.42, 30.51)]; - [bezier28Path addLineToPoint: CGPointMake(25.45, 30.3)]; - [bezier28Path addLineToPoint: CGPointMake(25.51, 30.1)]; - [bezier28Path addLineToPoint: CGPointMake(25.59, 29.91)]; - [bezier28Path addLineToPoint: CGPointMake(25.68, 29.73)]; - [bezier28Path addLineToPoint: CGPointMake(25.78, 29.56)]; - [bezier28Path addLineToPoint: CGPointMake(25.9, 29.4)]; - [bezier28Path addLineToPoint: CGPointMake(26.04, 29.26)]; - [bezier28Path addLineToPoint: CGPointMake(26.18, 29.13)]; - [bezier28Path addLineToPoint: CGPointMake(26.34, 29.01)]; - [bezier28Path addLineToPoint: CGPointMake(26.5, 28.9)]; - [bezier28Path addLineToPoint: CGPointMake(26.67, 28.81)]; - [bezier28Path addLineToPoint: CGPointMake(26.85, 28.73)]; - [bezier28Path addLineToPoint: CGPointMake(27.04, 28.67)]; - [bezier28Path addLineToPoint: CGPointMake(27.24, 28.62)]; - [bezier28Path addLineToPoint: CGPointMake(27.44, 28.58)]; - [bezier28Path addLineToPoint: CGPointMake(27.45, 28.58)]; - [bezier28Path addLineToPoint: CGPointMake(27.48, 28.58)]; - [bezier28Path addLineToPoint: CGPointMake(27.52, 28.57)]; - [bezier28Path addLineToPoint: CGPointMake(27.58, 28.56)]; - [bezier28Path addLineToPoint: CGPointMake(27.65, 28.55)]; - [bezier28Path addLineToPoint: CGPointMake(27.73, 28.55)]; - [bezier28Path addLineToPoint: CGPointMake(27.81, 28.54)]; - [bezier28Path addLineToPoint: CGPointMake(27.91, 28.52)]; - [bezier28Path addLineToPoint: CGPointMake(28.01, 28.51)]; - [bezier28Path addLineToPoint: CGPointMake(28.1, 28.5)]; - [bezier28Path addLineToPoint: CGPointMake(28.2, 28.5)]; - [bezier28Path addLineToPoint: CGPointMake(28.3, 28.49)]; - [bezier28Path addLineToPoint: CGPointMake(28.39, 28.48)]; - [bezier28Path addLineToPoint: CGPointMake(28.47, 28.47)]; - [bezier28Path addLineToPoint: CGPointMake(28.55, 28.47)]; - [bezier28Path addLineToPoint: CGPointMake(28.75, 28.47)]; - [bezier28Path addLineToPoint: CGPointMake(28.88, 28.47)]; - [bezier28Path addLineToPoint: CGPointMake(29.01, 28.48)]; - [bezier28Path addLineToPoint: CGPointMake(29.13, 28.48)]; - [bezier28Path addLineToPoint: CGPointMake(29.23, 28.49)]; - [bezier28Path addLineToPoint: CGPointMake(29.31, 28.49)]; - [bezier28Path addLineToPoint: CGPointMake(29.37, 28.5)]; - [bezier28Path addLineToPoint: CGPointMake(29.39, 28.5)]; - [bezier28Path addLineToPoint: CGPointMake(29.4, 28.46)]; - [bezier28Path addLineToPoint: CGPointMake(29.43, 28.35)]; - [bezier28Path addLineToPoint: CGPointMake(29.46, 28.23)]; - [bezier28Path addLineToPoint: CGPointMake(29.47, 28.13)]; - [bezier28Path addLineToPoint: CGPointMake(29.45, 28)]; - [bezier28Path addLineToPoint: CGPointMake(29.4, 27.89)]; - [bezier28Path addLineToPoint: CGPointMake(29.33, 27.78)]; - [bezier28Path addLineToPoint: CGPointMake(29.24, 27.7)]; - [bezier28Path addLineToPoint: CGPointMake(29.13, 27.63)]; - [bezier28Path addLineToPoint: CGPointMake(29.01, 27.57)]; - [bezier28Path addLineToPoint: CGPointMake(28.88, 27.54)]; - [bezier28Path addLineToPoint: CGPointMake(28.73, 27.53)]; - [bezier28Path addLineToPoint: CGPointMake(28.57, 27.52)]; - [bezier28Path addLineToPoint: CGPointMake(28.4, 27.52)]; - [bezier28Path addLineToPoint: CGPointMake(28.22, 27.52)]; - [bezier28Path addLineToPoint: CGPointMake(28.04, 27.52)]; - [bezier28Path addLineToPoint: CGPointMake(27.85, 27.53)]; - [bezier28Path addLineToPoint: CGPointMake(27.67, 27.55)]; - [bezier28Path addLineToPoint: CGPointMake(27.49, 27.57)]; - [bezier28Path addLineToPoint: CGPointMake(27.31, 27.59)]; - [bezier28Path addLineToPoint: CGPointMake(27.14, 27.61)]; - [bezier28Path addLineToPoint: CGPointMake(26.97, 27.64)]; - [bezier28Path addLineToPoint: CGPointMake(26.83, 27.67)]; - [bezier28Path addLineToPoint: CGPointMake(26.69, 27.7)]; - [bezier28Path addLineToPoint: CGPointMake(26.56, 27.73)]; - [bezier28Path addLineToPoint: CGPointMake(26.46, 27.77)]; - [bezier28Path addLineToPoint: CGPointMake(26.38, 27.81)]; - [bezier28Path addLineToPoint: CGPointMake(26.32, 27.84)]; - [bezier28Path addLineToPoint: CGPointMake(26.72, 26.47)]; - [bezier28Path addLineToPoint: CGPointMake(26.85, 26.42)]; - [bezier28Path addLineToPoint: CGPointMake(26.97, 26.37)]; - [bezier28Path addLineToPoint: CGPointMake(27.11, 26.33)]; - [bezier28Path addLineToPoint: CGPointMake(27.25, 26.3)]; - [bezier28Path addLineToPoint: CGPointMake(27.38, 26.28)]; - [bezier28Path addLineToPoint: CGPointMake(27.53, 26.25)]; - [bezier28Path addLineToPoint: CGPointMake(27.68, 26.23)]; - [bezier28Path addLineToPoint: CGPointMake(27.83, 26.22)]; - [bezier28Path addLineToPoint: CGPointMake(27.99, 26.21)]; - [bezier28Path addLineToPoint: CGPointMake(28.16, 26.2)]; - [bezier28Path addLineToPoint: CGPointMake(28.33, 26.2)]; - [bezier28Path addLineToPoint: CGPointMake(28.88, 26.2)]; - [bezier28Path addLineToPoint: CGPointMake(29.08, 26.2)]; - [bezier28Path addLineToPoint: CGPointMake(29.27, 26.21)]; - [bezier28Path addLineToPoint: CGPointMake(29.43, 26.22)]; - [bezier28Path addLineToPoint: CGPointMake(29.61, 26.25)]; - [bezier28Path addLineToPoint: CGPointMake(29.78, 26.29)]; - [bezier28Path addLineToPoint: CGPointMake(29.96, 26.34)]; - [bezier28Path addLineToPoint: CGPointMake(30.14, 26.41)]; - [bezier28Path addLineToPoint: CGPointMake(30.31, 26.49)]; - [bezier28Path addLineToPoint: CGPointMake(30.48, 26.58)]; - [bezier28Path addLineToPoint: CGPointMake(30.64, 26.69)]; - [bezier28Path addLineToPoint: CGPointMake(30.78, 26.82)]; - [bezier28Path addLineToPoint: CGPointMake(30.91, 26.95)]; - [bezier28Path addLineToPoint: CGPointMake(31.02, 27.11)]; - [bezier28Path addLineToPoint: CGPointMake(31.11, 27.28)]; - [bezier28Path addLineToPoint: CGPointMake(31.16, 27.46)]; - [bezier28Path addLineToPoint: CGPointMake(31.2, 27.65)]; - [bezier28Path addLineToPoint: CGPointMake(31.2, 27.87)]; - [bezier28Path addLineToPoint: CGPointMake(31.16, 28.1)]; - [bezier28Path addLineToPoint: CGPointMake(30.59, 31.1)]; - [bezier28Path closePath]; - bezier28Path.miterLimit = 4; - - bezier28Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier28Path.lineWidth = 0.5; - [bezier28Path stroke]; - - - //// Bezier 29 Drawing - UIBezierPath* bezier29Path = [UIBezierPath bezierPath]; - [bezier29Path moveToPoint: CGPointMake(29.22, 29.62)]; - [bezier29Path addLineToPoint: CGPointMake(29.21, 29.59)]; - [bezier29Path addLineToPoint: CGPointMake(29.19, 29.56)]; - [bezier29Path addLineToPoint: CGPointMake(29.16, 29.54)]; - [bezier29Path addLineToPoint: CGPointMake(29.1, 29.53)]; - [bezier29Path addLineToPoint: CGPointMake(29.04, 29.52)]; - [bezier29Path addLineToPoint: CGPointMake(28.96, 29.52)]; - [bezier29Path addLineToPoint: CGPointMake(28.79, 29.52)]; - [bezier29Path addLineToPoint: CGPointMake(28.7, 29.52)]; - [bezier29Path addLineToPoint: CGPointMake(28.6, 29.53)]; - [bezier29Path addLineToPoint: CGPointMake(28.51, 29.54)]; - [bezier29Path addLineToPoint: CGPointMake(28.42, 29.56)]; - [bezier29Path addLineToPoint: CGPointMake(28.34, 29.57)]; - [bezier29Path addLineToPoint: CGPointMake(28.26, 29.58)]; - [bezier29Path addLineToPoint: CGPointMake(28.19, 29.6)]; - [bezier29Path addLineToPoint: CGPointMake(28.12, 29.62)]; - [bezier29Path addLineToPoint: CGPointMake(28.08, 29.63)]; - [bezier29Path addLineToPoint: CGPointMake(28.04, 29.65)]; - [bezier29Path addLineToPoint: CGPointMake(27.98, 29.67)]; - [bezier29Path addLineToPoint: CGPointMake(27.91, 29.7)]; - [bezier29Path addLineToPoint: CGPointMake(27.84, 29.73)]; - [bezier29Path addLineToPoint: CGPointMake(27.77, 29.77)]; - [bezier29Path addLineToPoint: CGPointMake(27.69, 29.81)]; - [bezier29Path addLineToPoint: CGPointMake(27.61, 29.86)]; - [bezier29Path addLineToPoint: CGPointMake(27.53, 29.91)]; - [bezier29Path addLineToPoint: CGPointMake(27.46, 29.97)]; - [bezier29Path addLineToPoint: CGPointMake(27.39, 30.04)]; - [bezier29Path addLineToPoint: CGPointMake(27.33, 30.11)]; - [bezier29Path addLineToPoint: CGPointMake(27.27, 30.18)]; - [bezier29Path addLineToPoint: CGPointMake(27.23, 30.26)]; - [bezier29Path addLineToPoint: CGPointMake(27.2, 30.35)]; - [bezier29Path addLineToPoint: CGPointMake(27.18, 30.44)]; - [bezier29Path addLineToPoint: CGPointMake(27.17, 30.64)]; - [bezier29Path addLineToPoint: CGPointMake(27.2, 30.79)]; - [bezier29Path addLineToPoint: CGPointMake(27.26, 30.9)]; - [bezier29Path addLineToPoint: CGPointMake(27.33, 30.99)]; - [bezier29Path addLineToPoint: CGPointMake(27.42, 31.05)]; - [bezier29Path addLineToPoint: CGPointMake(27.52, 31.08)]; - [bezier29Path addLineToPoint: CGPointMake(27.61, 31.1)]; - [bezier29Path addLineToPoint: CGPointMake(27.7, 31.1)]; - [bezier29Path addLineToPoint: CGPointMake(27.87, 31.1)]; - [bezier29Path addLineToPoint: CGPointMake(28.02, 31.08)]; - [bezier29Path addLineToPoint: CGPointMake(28.17, 31.06)]; - [bezier29Path addLineToPoint: CGPointMake(28.3, 31.02)]; - [bezier29Path addLineToPoint: CGPointMake(28.41, 30.98)]; - [bezier29Path addLineToPoint: CGPointMake(28.52, 30.93)]; - [bezier29Path addLineToPoint: CGPointMake(28.62, 30.88)]; - [bezier29Path addLineToPoint: CGPointMake(28.71, 30.82)]; - [bezier29Path addLineToPoint: CGPointMake(28.78, 30.76)]; - [bezier29Path addLineToPoint: CGPointMake(28.85, 30.69)]; - [bezier29Path addLineToPoint: CGPointMake(28.9, 30.63)]; - [bezier29Path addLineToPoint: CGPointMake(28.95, 30.56)]; - [bezier29Path addLineToPoint: CGPointMake(28.99, 30.5)]; - [bezier29Path addLineToPoint: CGPointMake(29.02, 30.43)]; - [bezier29Path addLineToPoint: CGPointMake(29.05, 30.36)]; - [bezier29Path addLineToPoint: CGPointMake(29.07, 30.3)]; - [bezier29Path addLineToPoint: CGPointMake(29.12, 30.14)]; - [bezier29Path addLineToPoint: CGPointMake(29.16, 29.95)]; - [bezier29Path addLineToPoint: CGPointMake(29.19, 29.77)]; - [bezier29Path addLineToPoint: CGPointMake(29.22, 29.62)]; - [bezier29Path closePath]; - bezier29Path.miterLimit = 4; - - bezier29Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier29Path fill]; - - - //// Bezier 30 Drawing - UIBezierPath* bezier30Path = [UIBezierPath bezierPath]; - [bezier30Path moveToPoint: CGPointMake(18.61, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(17.06, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(18.35, 24.89)]; - [bezier30Path addLineToPoint: CGPointMake(21.05, 24.89)]; - [bezier30Path addLineToPoint: CGPointMake(21.3, 29.33)]; - [bezier30Path addLineToPoint: CGPointMake(23.17, 24.89)]; - [bezier30Path addLineToPoint: CGPointMake(25.98, 24.89)]; - [bezier30Path addLineToPoint: CGPointMake(24.66, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(23.11, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(24.09, 26.78)]; - [bezier30Path addLineToPoint: CGPointMake(24.03, 26.78)]; - [bezier30Path addLineToPoint: CGPointMake(21.71, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(19.96, 32.37)]; - [bezier30Path addLineToPoint: CGPointMake(19.95, 32.13)]; - [bezier30Path addLineToPoint: CGPointMake(19.91, 31.51)]; - [bezier30Path addLineToPoint: CGPointMake(19.86, 30.63)]; - [bezier30Path addLineToPoint: CGPointMake(19.74, 28.6)]; - [bezier30Path addLineToPoint: CGPointMake(19.69, 27.71)]; - [bezier30Path addLineToPoint: CGPointMake(19.65, 27.06)]; - [bezier30Path addLineToPoint: CGPointMake(19.64, 26.78)]; - [bezier30Path addLineToPoint: CGPointMake(19.56, 26.78)]; - [bezier30Path addLineToPoint: CGPointMake(18.61, 32.37)]; - [bezier30Path closePath]; - bezier30Path.miterLimit = 4; - - bezier30Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier30Path fill]; - - - //// Bezier 31 Drawing - UIBezierPath* bezier31Path = [UIBezierPath bezierPath]; - [bezier31Path moveToPoint: CGPointMake(18.61, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(17.06, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(18.35, 24.89)]; - [bezier31Path addLineToPoint: CGPointMake(21.05, 24.89)]; - [bezier31Path addLineToPoint: CGPointMake(21.3, 29.33)]; - [bezier31Path addLineToPoint: CGPointMake(23.17, 24.89)]; - [bezier31Path addLineToPoint: CGPointMake(25.98, 24.89)]; - [bezier31Path addLineToPoint: CGPointMake(24.66, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(23.11, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(24.09, 26.78)]; - [bezier31Path addLineToPoint: CGPointMake(24.03, 26.78)]; - [bezier31Path addLineToPoint: CGPointMake(21.71, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(19.96, 32.37)]; - [bezier31Path addLineToPoint: CGPointMake(19.95, 32.13)]; - [bezier31Path addLineToPoint: CGPointMake(19.91, 31.51)]; - [bezier31Path addLineToPoint: CGPointMake(19.86, 30.63)]; - [bezier31Path addLineToPoint: CGPointMake(19.74, 28.6)]; - [bezier31Path addLineToPoint: CGPointMake(19.69, 27.71)]; - [bezier31Path addLineToPoint: CGPointMake(19.65, 27.06)]; - [bezier31Path addLineToPoint: CGPointMake(19.64, 26.78)]; - [bezier31Path addLineToPoint: CGPointMake(19.56, 26.78)]; - [bezier31Path addLineToPoint: CGPointMake(18.61, 32.37)]; - [bezier31Path closePath]; - bezier31Path.miterLimit = 4; - - bezier31Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier31Path.lineWidth = 0.5; - [bezier31Path stroke]; - - - //// Bezier 32 Drawing - UIBezierPath* bezier32Path = [UIBezierPath bezierPath]; - [bezier32Path moveToPoint: CGPointMake(58.85, 31.1)]; - [bezier32Path addLineToPoint: CGPointMake(58.61, 32.37)]; - [bezier32Path addLineToPoint: CGPointMake(57.18, 32.37)]; - [bezier32Path addLineToPoint: CGPointMake(57.2, 32.13)]; - [bezier32Path addLineToPoint: CGPointMake(57.2, 31.93)]; - [bezier32Path addLineToPoint: CGPointMake(57.2, 31.78)]; - [bezier32Path addLineToPoint: CGPointMake(57.21, 31.71)]; - [bezier32Path addLineToPoint: CGPointMake(57.14, 31.79)]; - [bezier32Path addLineToPoint: CGPointMake(57.05, 31.88)]; - [bezier32Path addLineToPoint: CGPointMake(56.95, 31.96)]; - [bezier32Path addLineToPoint: CGPointMake(56.84, 32.04)]; - [bezier32Path addLineToPoint: CGPointMake(56.72, 32.11)]; - [bezier32Path addLineToPoint: CGPointMake(56.58, 32.18)]; - [bezier32Path addLineToPoint: CGPointMake(56.44, 32.25)]; - [bezier32Path addLineToPoint: CGPointMake(56.3, 32.31)]; - [bezier32Path addLineToPoint: CGPointMake(56.14, 32.35)]; - [bezier32Path addLineToPoint: CGPointMake(55.98, 32.4)]; - [bezier32Path addLineToPoint: CGPointMake(55.82, 32.43)]; - [bezier32Path addLineToPoint: CGPointMake(55.66, 32.45)]; - [bezier32Path addLineToPoint: CGPointMake(55.5, 32.46)]; - [bezier32Path addLineToPoint: CGPointMake(55.34, 32.46)]; - [bezier32Path addLineToPoint: CGPointMake(55.19, 32.45)]; - [bezier32Path addLineToPoint: CGPointMake(55.03, 32.43)]; - [bezier32Path addLineToPoint: CGPointMake(54.83, 32.37)]; - [bezier32Path addLineToPoint: CGPointMake(54.65, 32.32)]; - [bezier32Path addLineToPoint: CGPointMake(54.49, 32.24)]; - [bezier32Path addLineToPoint: CGPointMake(54.34, 32.16)]; - [bezier32Path addLineToPoint: CGPointMake(54.21, 32.07)]; - [bezier32Path addLineToPoint: CGPointMake(54.1, 31.96)]; - [bezier32Path addLineToPoint: CGPointMake(54.01, 31.86)]; - [bezier32Path addLineToPoint: CGPointMake(53.93, 31.74)]; - [bezier32Path addLineToPoint: CGPointMake(53.87, 31.62)]; - [bezier32Path addLineToPoint: CGPointMake(53.81, 31.5)]; - [bezier32Path addLineToPoint: CGPointMake(53.77, 31.37)]; - [bezier32Path addLineToPoint: CGPointMake(53.74, 31.25)]; - [bezier32Path addLineToPoint: CGPointMake(53.72, 31.12)]; - [bezier32Path addLineToPoint: CGPointMake(53.7, 30.98)]; - [bezier32Path addLineToPoint: CGPointMake(53.69, 30.86)]; - [bezier32Path addLineToPoint: CGPointMake(53.69, 30.73)]; - [bezier32Path addLineToPoint: CGPointMake(53.7, 30.51)]; - [bezier32Path addLineToPoint: CGPointMake(53.73, 30.3)]; - [bezier32Path addLineToPoint: CGPointMake(53.79, 30.1)]; - [bezier32Path addLineToPoint: CGPointMake(53.86, 29.91)]; - [bezier32Path addLineToPoint: CGPointMake(53.95, 29.73)]; - [bezier32Path addLineToPoint: CGPointMake(54.05, 29.56)]; - [bezier32Path addLineToPoint: CGPointMake(54.17, 29.4)]; - [bezier32Path addLineToPoint: CGPointMake(54.3, 29.26)]; - [bezier32Path addLineToPoint: CGPointMake(54.45, 29.13)]; - [bezier32Path addLineToPoint: CGPointMake(54.61, 29.01)]; - [bezier32Path addLineToPoint: CGPointMake(54.77, 28.9)]; - [bezier32Path addLineToPoint: CGPointMake(54.95, 28.81)]; - [bezier32Path addLineToPoint: CGPointMake(55.12, 28.73)]; - [bezier32Path addLineToPoint: CGPointMake(55.31, 28.67)]; - [bezier32Path addLineToPoint: CGPointMake(55.5, 28.62)]; - [bezier32Path addLineToPoint: CGPointMake(55.69, 28.58)]; - [bezier32Path addLineToPoint: CGPointMake(55.7, 28.58)]; - [bezier32Path addLineToPoint: CGPointMake(55.73, 28.58)]; - [bezier32Path addLineToPoint: CGPointMake(55.77, 28.57)]; - [bezier32Path addLineToPoint: CGPointMake(55.83, 28.56)]; - [bezier32Path addLineToPoint: CGPointMake(55.9, 28.55)]; - [bezier32Path addLineToPoint: CGPointMake(55.98, 28.55)]; - [bezier32Path addLineToPoint: CGPointMake(56.07, 28.54)]; - [bezier32Path addLineToPoint: CGPointMake(56.16, 28.52)]; - [bezier32Path addLineToPoint: CGPointMake(56.26, 28.51)]; - [bezier32Path addLineToPoint: CGPointMake(56.36, 28.5)]; - [bezier32Path addLineToPoint: CGPointMake(56.46, 28.5)]; - [bezier32Path addLineToPoint: CGPointMake(56.55, 28.49)]; - [bezier32Path addLineToPoint: CGPointMake(56.64, 28.48)]; - [bezier32Path addLineToPoint: CGPointMake(56.72, 28.47)]; - [bezier32Path addLineToPoint: CGPointMake(56.8, 28.47)]; - [bezier32Path addLineToPoint: CGPointMake(57, 28.47)]; - [bezier32Path addLineToPoint: CGPointMake(57.14, 28.47)]; - [bezier32Path addLineToPoint: CGPointMake(57.27, 28.48)]; - [bezier32Path addLineToPoint: CGPointMake(57.4, 28.48)]; - [bezier32Path addLineToPoint: CGPointMake(57.5, 28.49)]; - [bezier32Path addLineToPoint: CGPointMake(57.59, 28.49)]; - [bezier32Path addLineToPoint: CGPointMake(57.65, 28.5)]; - [bezier32Path addLineToPoint: CGPointMake(57.67, 28.5)]; - [bezier32Path addLineToPoint: CGPointMake(57.68, 28.46)]; - [bezier32Path addLineToPoint: CGPointMake(57.7, 28.35)]; - [bezier32Path addLineToPoint: CGPointMake(57.71, 28.23)]; - [bezier32Path addLineToPoint: CGPointMake(57.73, 28.13)]; - [bezier32Path addLineToPoint: CGPointMake(57.7, 28)]; - [bezier32Path addLineToPoint: CGPointMake(57.66, 27.89)]; - [bezier32Path addLineToPoint: CGPointMake(57.58, 27.78)]; - [bezier32Path addLineToPoint: CGPointMake(57.5, 27.7)]; - [bezier32Path addLineToPoint: CGPointMake(57.4, 27.63)]; - [bezier32Path addLineToPoint: CGPointMake(57.28, 27.57)]; - [bezier32Path addLineToPoint: CGPointMake(57.15, 27.54)]; - [bezier32Path addLineToPoint: CGPointMake(57.01, 27.53)]; - [bezier32Path addLineToPoint: CGPointMake(56.85, 27.52)]; - [bezier32Path addLineToPoint: CGPointMake(56.68, 27.52)]; - [bezier32Path addLineToPoint: CGPointMake(56.51, 27.52)]; - [bezier32Path addLineToPoint: CGPointMake(56.32, 27.52)]; - [bezier32Path addLineToPoint: CGPointMake(56.14, 27.53)]; - [bezier32Path addLineToPoint: CGPointMake(55.95, 27.55)]; - [bezier32Path addLineToPoint: CGPointMake(55.77, 27.57)]; - [bezier32Path addLineToPoint: CGPointMake(55.6, 27.59)]; - [bezier32Path addLineToPoint: CGPointMake(55.43, 27.61)]; - [bezier32Path addLineToPoint: CGPointMake(55.26, 27.64)]; - [bezier32Path addLineToPoint: CGPointMake(55.11, 27.67)]; - [bezier32Path addLineToPoint: CGPointMake(54.98, 27.7)]; - [bezier32Path addLineToPoint: CGPointMake(54.85, 27.73)]; - [bezier32Path addLineToPoint: CGPointMake(54.75, 27.77)]; - [bezier32Path addLineToPoint: CGPointMake(54.67, 27.81)]; - [bezier32Path addLineToPoint: CGPointMake(54.61, 27.84)]; - [bezier32Path addLineToPoint: CGPointMake(55, 26.47)]; - [bezier32Path addLineToPoint: CGPointMake(55.13, 26.42)]; - [bezier32Path addLineToPoint: CGPointMake(55.26, 26.37)]; - [bezier32Path addLineToPoint: CGPointMake(55.39, 26.33)]; - [bezier32Path addLineToPoint: CGPointMake(55.53, 26.3)]; - [bezier32Path addLineToPoint: CGPointMake(55.67, 26.28)]; - [bezier32Path addLineToPoint: CGPointMake(55.81, 26.25)]; - [bezier32Path addLineToPoint: CGPointMake(55.96, 26.23)]; - [bezier32Path addLineToPoint: CGPointMake(56.11, 26.22)]; - [bezier32Path addLineToPoint: CGPointMake(56.27, 26.21)]; - [bezier32Path addLineToPoint: CGPointMake(56.44, 26.2)]; - [bezier32Path addLineToPoint: CGPointMake(56.6, 26.2)]; - [bezier32Path addLineToPoint: CGPointMake(57.14, 26.2)]; - [bezier32Path addLineToPoint: CGPointMake(57.33, 26.2)]; - [bezier32Path addLineToPoint: CGPointMake(57.53, 26.21)]; - [bezier32Path addLineToPoint: CGPointMake(57.69, 26.22)]; - [bezier32Path addLineToPoint: CGPointMake(57.86, 26.25)]; - [bezier32Path addLineToPoint: CGPointMake(58.03, 26.29)]; - [bezier32Path addLineToPoint: CGPointMake(58.22, 26.34)]; - [bezier32Path addLineToPoint: CGPointMake(58.39, 26.41)]; - [bezier32Path addLineToPoint: CGPointMake(58.57, 26.49)]; - [bezier32Path addLineToPoint: CGPointMake(58.74, 26.58)]; - [bezier32Path addLineToPoint: CGPointMake(58.9, 26.69)]; - [bezier32Path addLineToPoint: CGPointMake(59.04, 26.82)]; - [bezier32Path addLineToPoint: CGPointMake(59.17, 26.95)]; - [bezier32Path addLineToPoint: CGPointMake(59.29, 27.11)]; - [bezier32Path addLineToPoint: CGPointMake(59.37, 27.28)]; - [bezier32Path addLineToPoint: CGPointMake(59.43, 27.46)]; - [bezier32Path addLineToPoint: CGPointMake(59.47, 27.65)]; - [bezier32Path addLineToPoint: CGPointMake(59.47, 27.87)]; - [bezier32Path addLineToPoint: CGPointMake(59.44, 28.1)]; - [bezier32Path addLineToPoint: CGPointMake(58.85, 31.1)]; - [bezier32Path closePath]; - bezier32Path.miterLimit = 4; - - bezier32Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier32Path fill]; - - - //// Bezier 33 Drawing - UIBezierPath* bezier33Path = [UIBezierPath bezierPath]; - [bezier33Path moveToPoint: CGPointMake(58.61, 32.41)]; - [bezier33Path addLineToPoint: CGPointMake(58.65, 32.37)]; - [bezier33Path addLineToPoint: CGPointMake(58.88, 31.11)]; - [bezier33Path addLineToPoint: CGPointMake(58.81, 31.1)]; - [bezier33Path addLineToPoint: CGPointMake(58.58, 32.36)]; - [bezier33Path addLineToPoint: CGPointMake(58.61, 32.33)]; - [bezier33Path addLineToPoint: CGPointMake(58.61, 32.41)]; - [bezier33Path addLineToPoint: CGPointMake(58.64, 32.4)]; - [bezier33Path addLineToPoint: CGPointMake(58.65, 32.37)]; - [bezier33Path addLineToPoint: CGPointMake(58.61, 32.41)]; - [bezier33Path closePath]; - bezier33Path.miterLimit = 4; - - bezier33Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier33Path fill]; - - - //// Bezier 34 Drawing - UIBezierPath* bezier34Path = [UIBezierPath bezierPath]; - [bezier34Path moveToPoint: CGPointMake(57.15, 32.37)]; - [bezier34Path addLineToPoint: CGPointMake(57.18, 32.41)]; - [bezier34Path addLineToPoint: CGPointMake(58.61, 32.41)]; - [bezier34Path addLineToPoint: CGPointMake(58.61, 32.33)]; - [bezier34Path addLineToPoint: CGPointMake(57.18, 32.33)]; - [bezier34Path addLineToPoint: CGPointMake(57.22, 32.37)]; - [bezier34Path addLineToPoint: CGPointMake(57.15, 32.37)]; - [bezier34Path addLineToPoint: CGPointMake(57.14, 32.41)]; - [bezier34Path addLineToPoint: CGPointMake(57.18, 32.41)]; - [bezier34Path addLineToPoint: CGPointMake(57.15, 32.37)]; - [bezier34Path closePath]; - bezier34Path.miterLimit = 4; - - bezier34Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier34Path fill]; - - - //// Bezier 35 Drawing - UIBezierPath* bezier35Path = [UIBezierPath bezierPath]; - [bezier35Path moveToPoint: CGPointMake(57.24, 31.73)]; - [bezier35Path addLineToPoint: CGPointMake(57.19, 31.69)]; - [bezier35Path addLineToPoint: CGPointMake(57.17, 31.78)]; - [bezier35Path addLineToPoint: CGPointMake(57.16, 31.93)]; - [bezier35Path addLineToPoint: CGPointMake(57.16, 32.13)]; - [bezier35Path addLineToPoint: CGPointMake(57.15, 32.37)]; - [bezier35Path addLineToPoint: CGPointMake(57.22, 32.37)]; - [bezier35Path addLineToPoint: CGPointMake(57.23, 32.13)]; - [bezier35Path addLineToPoint: CGPointMake(57.24, 31.93)]; - [bezier35Path addLineToPoint: CGPointMake(57.24, 31.78)]; - [bezier35Path addLineToPoint: CGPointMake(57.24, 31.73)]; - [bezier35Path addLineToPoint: CGPointMake(57.18, 31.69)]; - [bezier35Path addLineToPoint: CGPointMake(57.24, 31.73)]; - [bezier35Path closePath]; - bezier35Path.miterLimit = 4; - - bezier35Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier35Path fill]; - - - //// Bezier 36 Drawing - UIBezierPath* bezier36Path = [UIBezierPath bezierPath]; - [bezier36Path moveToPoint: CGPointMake(55.03, 32.46)]; - [bezier36Path addLineToPoint: CGPointMake(55.03, 32.46)]; - [bezier36Path addLineToPoint: CGPointMake(55.19, 32.48)]; - [bezier36Path addLineToPoint: CGPointMake(55.34, 32.5)]; - [bezier36Path addLineToPoint: CGPointMake(55.5, 32.49)]; - [bezier36Path addLineToPoint: CGPointMake(55.66, 32.48)]; - [bezier36Path addLineToPoint: CGPointMake(55.83, 32.46)]; - [bezier36Path addLineToPoint: CGPointMake(55.99, 32.43)]; - [bezier36Path addLineToPoint: CGPointMake(56.15, 32.39)]; - [bezier36Path addLineToPoint: CGPointMake(56.31, 32.34)]; - [bezier36Path addLineToPoint: CGPointMake(56.45, 32.28)]; - [bezier36Path addLineToPoint: CGPointMake(56.6, 32.21)]; - [bezier36Path addLineToPoint: CGPointMake(56.73, 32.15)]; - [bezier36Path addLineToPoint: CGPointMake(56.85, 32.07)]; - [bezier36Path addLineToPoint: CGPointMake(56.97, 31.99)]; - [bezier36Path addLineToPoint: CGPointMake(57.08, 31.91)]; - [bezier36Path addLineToPoint: CGPointMake(57.17, 31.82)]; - [bezier36Path addLineToPoint: CGPointMake(57.24, 31.73)]; - [bezier36Path addLineToPoint: CGPointMake(57.18, 31.69)]; - [bezier36Path addLineToPoint: CGPointMake(57.11, 31.77)]; - [bezier36Path addLineToPoint: CGPointMake(57.03, 31.85)]; - [bezier36Path addLineToPoint: CGPointMake(56.93, 31.93)]; - [bezier36Path addLineToPoint: CGPointMake(56.82, 32.01)]; - [bezier36Path addLineToPoint: CGPointMake(56.7, 32.08)]; - [bezier36Path addLineToPoint: CGPointMake(56.56, 32.15)]; - [bezier36Path addLineToPoint: CGPointMake(56.43, 32.21)]; - [bezier36Path addLineToPoint: CGPointMake(56.29, 32.27)]; - [bezier36Path addLineToPoint: CGPointMake(56.14, 32.32)]; - [bezier36Path addLineToPoint: CGPointMake(55.98, 32.36)]; - [bezier36Path addLineToPoint: CGPointMake(55.82, 32.39)]; - [bezier36Path addLineToPoint: CGPointMake(55.66, 32.41)]; - [bezier36Path addLineToPoint: CGPointMake(55.5, 32.43)]; - [bezier36Path addLineToPoint: CGPointMake(55.34, 32.43)]; - [bezier36Path addLineToPoint: CGPointMake(55.19, 32.41)]; - [bezier36Path addLineToPoint: CGPointMake(55.04, 32.39)]; - [bezier36Path addLineToPoint: CGPointMake(55.03, 32.46)]; - [bezier36Path closePath]; - bezier36Path.miterLimit = 4; - - bezier36Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier36Path fill]; - - - //// Bezier 37 Drawing - UIBezierPath* bezier37Path = [UIBezierPath bezierPath]; - [bezier37Path moveToPoint: CGPointMake(53.65, 30.73)]; - [bezier37Path addLineToPoint: CGPointMake(53.65, 30.73)]; - [bezier37Path addLineToPoint: CGPointMake(53.65, 30.86)]; - [bezier37Path addLineToPoint: CGPointMake(53.67, 30.98)]; - [bezier37Path addLineToPoint: CGPointMake(53.68, 31.12)]; - [bezier37Path addLineToPoint: CGPointMake(53.71, 31.25)]; - [bezier37Path addLineToPoint: CGPointMake(53.73, 31.38)]; - [bezier37Path addLineToPoint: CGPointMake(53.78, 31.51)]; - [bezier37Path addLineToPoint: CGPointMake(53.83, 31.64)]; - [bezier37Path addLineToPoint: CGPointMake(53.91, 31.76)]; - [bezier37Path addLineToPoint: CGPointMake(53.99, 31.88)]; - [bezier37Path addLineToPoint: CGPointMake(54.08, 31.99)]; - [bezier37Path addLineToPoint: CGPointMake(54.19, 32.09)]; - [bezier37Path addLineToPoint: CGPointMake(54.32, 32.19)]; - [bezier37Path addLineToPoint: CGPointMake(54.47, 32.28)]; - [bezier37Path addLineToPoint: CGPointMake(54.63, 32.35)]; - [bezier37Path addLineToPoint: CGPointMake(54.82, 32.41)]; - [bezier37Path addLineToPoint: CGPointMake(55.03, 32.46)]; - [bezier37Path addLineToPoint: CGPointMake(55.04, 32.39)]; - [bezier37Path addLineToPoint: CGPointMake(54.83, 32.34)]; - [bezier37Path addLineToPoint: CGPointMake(54.66, 32.28)]; - [bezier37Path addLineToPoint: CGPointMake(54.5, 32.21)]; - [bezier37Path addLineToPoint: CGPointMake(54.36, 32.13)]; - [bezier37Path addLineToPoint: CGPointMake(54.24, 32.04)]; - [bezier37Path addLineToPoint: CGPointMake(54.13, 31.94)]; - [bezier37Path addLineToPoint: CGPointMake(54.04, 31.83)]; - [bezier37Path addLineToPoint: CGPointMake(53.96, 31.72)]; - [bezier37Path addLineToPoint: CGPointMake(53.9, 31.61)]; - [bezier37Path addLineToPoint: CGPointMake(53.85, 31.49)]; - [bezier37Path addLineToPoint: CGPointMake(53.8, 31.37)]; - [bezier37Path addLineToPoint: CGPointMake(53.77, 31.24)]; - [bezier37Path addLineToPoint: CGPointMake(53.75, 31.11)]; - [bezier37Path addLineToPoint: CGPointMake(53.73, 30.98)]; - [bezier37Path addLineToPoint: CGPointMake(53.72, 30.86)]; - [bezier37Path addLineToPoint: CGPointMake(53.73, 30.73)]; - [bezier37Path addLineToPoint: CGPointMake(53.65, 30.73)]; - [bezier37Path closePath]; - bezier37Path.miterLimit = 4; - - bezier37Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier37Path fill]; - - - //// Bezier 38 Drawing - UIBezierPath* bezier38Path = [UIBezierPath bezierPath]; - [bezier38Path moveToPoint: CGPointMake(55.69, 28.55)]; - [bezier38Path addLineToPoint: CGPointMake(55.69, 28.55)]; - [bezier38Path addLineToPoint: CGPointMake(55.49, 28.58)]; - [bezier38Path addLineToPoint: CGPointMake(55.3, 28.63)]; - [bezier38Path addLineToPoint: CGPointMake(55.11, 28.7)]; - [bezier38Path addLineToPoint: CGPointMake(54.93, 28.78)]; - [bezier38Path addLineToPoint: CGPointMake(54.75, 28.87)]; - [bezier38Path addLineToPoint: CGPointMake(54.58, 28.98)]; - [bezier38Path addLineToPoint: CGPointMake(54.43, 29.1)]; - [bezier38Path addLineToPoint: CGPointMake(54.28, 29.24)]; - [bezier38Path addLineToPoint: CGPointMake(54.14, 29.38)]; - [bezier38Path addLineToPoint: CGPointMake(54.02, 29.54)]; - [bezier38Path addLineToPoint: CGPointMake(53.91, 29.71)]; - [bezier38Path addLineToPoint: CGPointMake(53.83, 29.9)]; - [bezier38Path addLineToPoint: CGPointMake(53.75, 30.09)]; - [bezier38Path addLineToPoint: CGPointMake(53.7, 30.3)]; - [bezier38Path addLineToPoint: CGPointMake(53.67, 30.51)]; - [bezier38Path addLineToPoint: CGPointMake(53.65, 30.73)]; - [bezier38Path addLineToPoint: CGPointMake(53.73, 30.73)]; - [bezier38Path addLineToPoint: CGPointMake(53.73, 30.51)]; - [bezier38Path addLineToPoint: CGPointMake(53.77, 30.31)]; - [bezier38Path addLineToPoint: CGPointMake(53.82, 30.11)]; - [bezier38Path addLineToPoint: CGPointMake(53.89, 29.92)]; - [bezier38Path addLineToPoint: CGPointMake(53.98, 29.74)]; - [bezier38Path addLineToPoint: CGPointMake(54.08, 29.58)]; - [bezier38Path addLineToPoint: CGPointMake(54.2, 29.42)]; - [bezier38Path addLineToPoint: CGPointMake(54.33, 29.28)]; - [bezier38Path addLineToPoint: CGPointMake(54.47, 29.16)]; - [bezier38Path addLineToPoint: CGPointMake(54.63, 29.04)]; - [bezier38Path addLineToPoint: CGPointMake(54.79, 28.94)]; - [bezier38Path addLineToPoint: CGPointMake(54.96, 28.84)]; - [bezier38Path addLineToPoint: CGPointMake(55.13, 28.76)]; - [bezier38Path addLineToPoint: CGPointMake(55.32, 28.7)]; - [bezier38Path addLineToPoint: CGPointMake(55.51, 28.65)]; - [bezier38Path addLineToPoint: CGPointMake(55.69, 28.62)]; - [bezier38Path addLineToPoint: CGPointMake(55.69, 28.55)]; - [bezier38Path closePath]; - bezier38Path.miterLimit = 4; - - bezier38Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier38Path fill]; - - - //// Bezier 39 Drawing - UIBezierPath* bezier39Path = [UIBezierPath bezierPath]; - [bezier39Path moveToPoint: CGPointMake(56.87, 28.43)]; - [bezier39Path addLineToPoint: CGPointMake(56.8, 28.43)]; - [bezier39Path addLineToPoint: CGPointMake(56.72, 28.44)]; - [bezier39Path addLineToPoint: CGPointMake(56.64, 28.45)]; - [bezier39Path addLineToPoint: CGPointMake(56.55, 28.45)]; - [bezier39Path addLineToPoint: CGPointMake(56.46, 28.46)]; - [bezier39Path addLineToPoint: CGPointMake(56.36, 28.47)]; - [bezier39Path addLineToPoint: CGPointMake(56.26, 28.48)]; - [bezier39Path addLineToPoint: CGPointMake(56.16, 28.49)]; - [bezier39Path addLineToPoint: CGPointMake(56.07, 28.5)]; - [bezier39Path addLineToPoint: CGPointMake(55.98, 28.51)]; - [bezier39Path addLineToPoint: CGPointMake(55.9, 28.52)]; - [bezier39Path addLineToPoint: CGPointMake(55.83, 28.53)]; - [bezier39Path addLineToPoint: CGPointMake(55.77, 28.54)]; - [bezier39Path addLineToPoint: CGPointMake(55.73, 28.54)]; - [bezier39Path addLineToPoint: CGPointMake(55.7, 28.55)]; - [bezier39Path addLineToPoint: CGPointMake(55.69, 28.55)]; - [bezier39Path addLineToPoint: CGPointMake(55.69, 28.62)]; - [bezier39Path addLineToPoint: CGPointMake(55.7, 28.62)]; - [bezier39Path addLineToPoint: CGPointMake(55.74, 28.61)]; - [bezier39Path addLineToPoint: CGPointMake(55.77, 28.6)]; - [bezier39Path addLineToPoint: CGPointMake(55.83, 28.6)]; - [bezier39Path addLineToPoint: CGPointMake(55.9, 28.59)]; - [bezier39Path addLineToPoint: CGPointMake(55.98, 28.58)]; - [bezier39Path addLineToPoint: CGPointMake(56.07, 28.57)]; - [bezier39Path addLineToPoint: CGPointMake(56.16, 28.56)]; - [bezier39Path addLineToPoint: CGPointMake(56.26, 28.55)]; - [bezier39Path addLineToPoint: CGPointMake(56.36, 28.54)]; - [bezier39Path addLineToPoint: CGPointMake(56.46, 28.53)]; - [bezier39Path addLineToPoint: CGPointMake(56.55, 28.52)]; - [bezier39Path addLineToPoint: CGPointMake(56.64, 28.51)]; - [bezier39Path addLineToPoint: CGPointMake(56.72, 28.51)]; - [bezier39Path addLineToPoint: CGPointMake(56.87, 28.51)]; - [bezier39Path addLineToPoint: CGPointMake(56.87, 28.43)]; - [bezier39Path closePath]; - bezier39Path.miterLimit = 4; - - bezier39Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier39Path fill]; - - - //// Bezier 40 Drawing - UIBezierPath* bezier40Path = [UIBezierPath bezierPath]; - [bezier40Path moveToPoint: CGPointMake(57.63, 28.49)]; - [bezier40Path addLineToPoint: CGPointMake(57.67, 28.46)]; - [bezier40Path addLineToPoint: CGPointMake(57.65, 28.46)]; - [bezier40Path addLineToPoint: CGPointMake(57.59, 28.46)]; - [bezier40Path addLineToPoint: CGPointMake(57.5, 28.45)]; - [bezier40Path addLineToPoint: CGPointMake(57.4, 28.44)]; - [bezier40Path addLineToPoint: CGPointMake(57.14, 28.44)]; - [bezier40Path addLineToPoint: CGPointMake(57, 28.43)]; - [bezier40Path addLineToPoint: CGPointMake(56.87, 28.43)]; - [bezier40Path addLineToPoint: CGPointMake(56.87, 28.51)]; - [bezier40Path addLineToPoint: CGPointMake(57.14, 28.51)]; - [bezier40Path addLineToPoint: CGPointMake(57.27, 28.52)]; - [bezier40Path addLineToPoint: CGPointMake(57.5, 28.52)]; - [bezier40Path addLineToPoint: CGPointMake(57.59, 28.52)]; - [bezier40Path addLineToPoint: CGPointMake(57.65, 28.53)]; - [bezier40Path addLineToPoint: CGPointMake(57.67, 28.53)]; - [bezier40Path addLineToPoint: CGPointMake(57.7, 28.5)]; - [bezier40Path addLineToPoint: CGPointMake(57.67, 28.53)]; - [bezier40Path addLineToPoint: CGPointMake(57.7, 28.54)]; - [bezier40Path addLineToPoint: CGPointMake(57.7, 28.5)]; - [bezier40Path addLineToPoint: CGPointMake(57.63, 28.49)]; - [bezier40Path closePath]; - bezier40Path.miterLimit = 4; - - bezier40Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier40Path fill]; - - - //// Bezier 41 Drawing - UIBezierPath* bezier41Path = [UIBezierPath bezierPath]; - [bezier41Path moveToPoint: CGPointMake(57.69, 28.13)]; - [bezier41Path addLineToPoint: CGPointMake(57.69, 28.13)]; - [bezier41Path addLineToPoint: CGPointMake(57.68, 28.23)]; - [bezier41Path addLineToPoint: CGPointMake(57.66, 28.35)]; - [bezier41Path addLineToPoint: CGPointMake(57.65, 28.45)]; - [bezier41Path addLineToPoint: CGPointMake(57.63, 28.49)]; - [bezier41Path addLineToPoint: CGPointMake(57.7, 28.5)]; - [bezier41Path addLineToPoint: CGPointMake(57.71, 28.46)]; - [bezier41Path addLineToPoint: CGPointMake(57.73, 28.36)]; - [bezier41Path addLineToPoint: CGPointMake(57.75, 28.23)]; - [bezier41Path addLineToPoint: CGPointMake(57.77, 28.13)]; - [bezier41Path addLineToPoint: CGPointMake(57.69, 28.13)]; - [bezier41Path closePath]; - bezier41Path.miterLimit = 4; - - bezier41Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier41Path fill]; - - - //// Bezier 42 Drawing - UIBezierPath* bezier42Path = [UIBezierPath bezierPath]; - [bezier42Path moveToPoint: CGPointMake(57.01, 27.56)]; - [bezier42Path addLineToPoint: CGPointMake(57.01, 27.57)]; - [bezier42Path addLineToPoint: CGPointMake(57.14, 27.57)]; - [bezier42Path addLineToPoint: CGPointMake(57.26, 27.61)]; - [bezier42Path addLineToPoint: CGPointMake(57.38, 27.66)]; - [bezier42Path addLineToPoint: CGPointMake(57.48, 27.73)]; - [bezier42Path addLineToPoint: CGPointMake(57.55, 27.81)]; - [bezier42Path addLineToPoint: CGPointMake(57.62, 27.9)]; - [bezier42Path addLineToPoint: CGPointMake(57.67, 28.01)]; - [bezier42Path addLineToPoint: CGPointMake(57.69, 28.13)]; - [bezier42Path addLineToPoint: CGPointMake(57.76, 28.13)]; - [bezier42Path addLineToPoint: CGPointMake(57.74, 28)]; - [bezier42Path addLineToPoint: CGPointMake(57.69, 27.87)]; - [bezier42Path addLineToPoint: CGPointMake(57.61, 27.76)]; - [bezier42Path addLineToPoint: CGPointMake(57.52, 27.67)]; - [bezier42Path addLineToPoint: CGPointMake(57.41, 27.59)]; - [bezier42Path addLineToPoint: CGPointMake(57.29, 27.54)]; - [bezier42Path addLineToPoint: CGPointMake(57.16, 27.51)]; - [bezier42Path addLineToPoint: CGPointMake(57.01, 27.49)]; - [bezier42Path addLineToPoint: CGPointMake(57.01, 27.56)]; - [bezier42Path closePath]; - bezier42Path.miterLimit = 4; - - bezier42Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier42Path fill]; - - - //// Bezier 43 Drawing - UIBezierPath* bezier43Path = [UIBezierPath bezierPath]; - [bezier43Path moveToPoint: CGPointMake(54.57, 27.84)]; - [bezier43Path addLineToPoint: CGPointMake(54.63, 27.87)]; - [bezier43Path addLineToPoint: CGPointMake(54.69, 27.84)]; - [bezier43Path addLineToPoint: CGPointMake(54.76, 27.8)]; - [bezier43Path addLineToPoint: CGPointMake(54.86, 27.77)]; - [bezier43Path addLineToPoint: CGPointMake(54.98, 27.73)]; - [bezier43Path addLineToPoint: CGPointMake(55.12, 27.71)]; - [bezier43Path addLineToPoint: CGPointMake(55.27, 27.68)]; - [bezier43Path addLineToPoint: CGPointMake(55.43, 27.65)]; - [bezier43Path addLineToPoint: CGPointMake(55.6, 27.63)]; - [bezier43Path addLineToPoint: CGPointMake(55.77, 27.6)]; - [bezier43Path addLineToPoint: CGPointMake(55.95, 27.59)]; - [bezier43Path addLineToPoint: CGPointMake(56.14, 27.57)]; - [bezier43Path addLineToPoint: CGPointMake(56.32, 27.56)]; - [bezier43Path addLineToPoint: CGPointMake(56.85, 27.56)]; - [bezier43Path addLineToPoint: CGPointMake(57.01, 27.56)]; - [bezier43Path addLineToPoint: CGPointMake(57.01, 27.49)]; - [bezier43Path addLineToPoint: CGPointMake(56.85, 27.49)]; - [bezier43Path addLineToPoint: CGPointMake(56.68, 27.48)]; - [bezier43Path addLineToPoint: CGPointMake(56.51, 27.48)]; - [bezier43Path addLineToPoint: CGPointMake(56.32, 27.49)]; - [bezier43Path addLineToPoint: CGPointMake(56.14, 27.5)]; - [bezier43Path addLineToPoint: CGPointMake(55.95, 27.52)]; - [bezier43Path addLineToPoint: CGPointMake(55.77, 27.53)]; - [bezier43Path addLineToPoint: CGPointMake(55.6, 27.56)]; - [bezier43Path addLineToPoint: CGPointMake(55.42, 27.58)]; - [bezier43Path addLineToPoint: CGPointMake(55.25, 27.61)]; - [bezier43Path addLineToPoint: CGPointMake(55.11, 27.64)]; - [bezier43Path addLineToPoint: CGPointMake(54.97, 27.67)]; - [bezier43Path addLineToPoint: CGPointMake(54.84, 27.7)]; - [bezier43Path addLineToPoint: CGPointMake(54.74, 27.73)]; - [bezier43Path addLineToPoint: CGPointMake(54.65, 27.77)]; - [bezier43Path addLineToPoint: CGPointMake(54.58, 27.81)]; - [bezier43Path addLineToPoint: CGPointMake(54.64, 27.85)]; - [bezier43Path addLineToPoint: CGPointMake(54.57, 27.84)]; - [bezier43Path closePath]; - bezier43Path.miterLimit = 4; - - bezier43Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier43Path fill]; - - - //// Bezier 44 Drawing - UIBezierPath* bezier44Path = [UIBezierPath bezierPath]; - [bezier44Path moveToPoint: CGPointMake(54.99, 26.44)]; - [bezier44Path addLineToPoint: CGPointMake(54.97, 26.46)]; - [bezier44Path addLineToPoint: CGPointMake(54.57, 27.84)]; - [bezier44Path addLineToPoint: CGPointMake(54.64, 27.85)]; - [bezier44Path addLineToPoint: CGPointMake(55.04, 26.48)]; - [bezier44Path addLineToPoint: CGPointMake(55.02, 26.5)]; - [bezier44Path addLineToPoint: CGPointMake(54.99, 26.44)]; - [bezier44Path addLineToPoint: CGPointMake(54.98, 26.44)]; - [bezier44Path addLineToPoint: CGPointMake(54.97, 26.46)]; - [bezier44Path addLineToPoint: CGPointMake(54.99, 26.44)]; - [bezier44Path closePath]; - bezier44Path.miterLimit = 4; - - bezier44Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier44Path fill]; - - - //// Bezier 45 Drawing - UIBezierPath* bezier45Path = [UIBezierPath bezierPath]; - [bezier45Path moveToPoint: CGPointMake(57.53, 26.17)]; - [bezier45Path addLineToPoint: CGPointMake(57.53, 26.17)]; - [bezier45Path addLineToPoint: CGPointMake(57.33, 26.16)]; - [bezier45Path addLineToPoint: CGPointMake(57.14, 26.16)]; - [bezier45Path addLineToPoint: CGPointMake(56.6, 26.16)]; - [bezier45Path addLineToPoint: CGPointMake(56.44, 26.17)]; - [bezier45Path addLineToPoint: CGPointMake(56.27, 26.17)]; - [bezier45Path addLineToPoint: CGPointMake(56.11, 26.19)]; - [bezier45Path addLineToPoint: CGPointMake(55.96, 26.2)]; - [bezier45Path addLineToPoint: CGPointMake(55.81, 26.22)]; - [bezier45Path addLineToPoint: CGPointMake(55.66, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(55.52, 26.27)]; - [bezier45Path addLineToPoint: CGPointMake(55.39, 26.3)]; - [bezier45Path addLineToPoint: CGPointMake(55.25, 26.34)]; - [bezier45Path addLineToPoint: CGPointMake(55.12, 26.38)]; - [bezier45Path addLineToPoint: CGPointMake(54.99, 26.44)]; - [bezier45Path addLineToPoint: CGPointMake(55.02, 26.5)]; - [bezier45Path addLineToPoint: CGPointMake(55.14, 26.45)]; - [bezier45Path addLineToPoint: CGPointMake(55.27, 26.41)]; - [bezier45Path addLineToPoint: CGPointMake(55.4, 26.37)]; - [bezier45Path addLineToPoint: CGPointMake(55.53, 26.34)]; - [bezier45Path addLineToPoint: CGPointMake(55.68, 26.31)]; - [bezier45Path addLineToPoint: CGPointMake(55.82, 26.29)]; - [bezier45Path addLineToPoint: CGPointMake(55.96, 26.26)]; - [bezier45Path addLineToPoint: CGPointMake(56.11, 26.25)]; - [bezier45Path addLineToPoint: CGPointMake(56.27, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(56.44, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(57.14, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(57.33, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(57.53, 26.24)]; - [bezier45Path addLineToPoint: CGPointMake(57.53, 26.17)]; - [bezier45Path closePath]; - bezier45Path.miterLimit = 4; - - bezier45Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier45Path fill]; - - - //// Bezier 46 Drawing - UIBezierPath* bezier46Path = [UIBezierPath bezierPath]; - [bezier46Path moveToPoint: CGPointMake(59.48, 28.1)]; - [bezier46Path addLineToPoint: CGPointMake(59.48, 28.1)]; - [bezier46Path addLineToPoint: CGPointMake(59.51, 27.87)]; - [bezier46Path addLineToPoint: CGPointMake(59.51, 27.65)]; - [bezier46Path addLineToPoint: CGPointMake(59.47, 27.45)]; - [bezier46Path addLineToPoint: CGPointMake(59.41, 27.27)]; - [bezier46Path addLineToPoint: CGPointMake(59.31, 27.09)]; - [bezier46Path addLineToPoint: CGPointMake(59.2, 26.93)]; - [bezier46Path addLineToPoint: CGPointMake(59.06, 26.79)]; - [bezier46Path addLineToPoint: CGPointMake(58.92, 26.66)]; - [bezier46Path addLineToPoint: CGPointMake(58.76, 26.55)]; - [bezier46Path addLineToPoint: CGPointMake(58.59, 26.45)]; - [bezier46Path addLineToPoint: CGPointMake(58.4, 26.37)]; - [bezier46Path addLineToPoint: CGPointMake(58.23, 26.3)]; - [bezier46Path addLineToPoint: CGPointMake(58.04, 26.25)]; - [bezier46Path addLineToPoint: CGPointMake(57.86, 26.21)]; - [bezier46Path addLineToPoint: CGPointMake(57.69, 26.19)]; - [bezier46Path addLineToPoint: CGPointMake(57.53, 26.17)]; - [bezier46Path addLineToPoint: CGPointMake(57.53, 26.24)]; - [bezier46Path addLineToPoint: CGPointMake(57.69, 26.25)]; - [bezier46Path addLineToPoint: CGPointMake(57.85, 26.28)]; - [bezier46Path addLineToPoint: CGPointMake(58.03, 26.32)]; - [bezier46Path addLineToPoint: CGPointMake(58.2, 26.37)]; - [bezier46Path addLineToPoint: CGPointMake(58.38, 26.44)]; - [bezier46Path addLineToPoint: CGPointMake(58.55, 26.52)]; - [bezier46Path addLineToPoint: CGPointMake(58.72, 26.61)]; - [bezier46Path addLineToPoint: CGPointMake(58.88, 26.72)]; - [bezier46Path addLineToPoint: CGPointMake(59.02, 26.85)]; - [bezier46Path addLineToPoint: CGPointMake(59.14, 26.98)]; - [bezier46Path addLineToPoint: CGPointMake(59.26, 27.12)]; - [bezier46Path addLineToPoint: CGPointMake(59.34, 27.29)]; - [bezier46Path addLineToPoint: CGPointMake(59.4, 27.47)]; - [bezier46Path addLineToPoint: CGPointMake(59.44, 27.65)]; - [bezier46Path addLineToPoint: CGPointMake(59.44, 27.87)]; - [bezier46Path addLineToPoint: CGPointMake(59.41, 28.09)]; - [bezier46Path addLineToPoint: CGPointMake(59.48, 28.1)]; - [bezier46Path closePath]; - bezier46Path.miterLimit = 4; - - bezier46Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier46Path fill]; - - - //// Bezier 47 Drawing - UIBezierPath* bezier47Path = [UIBezierPath bezierPath]; - [bezier47Path moveToPoint: CGPointMake(58.88, 31.11)]; - [bezier47Path addLineToPoint: CGPointMake(58.88, 31.11)]; - [bezier47Path addLineToPoint: CGPointMake(59.48, 28.1)]; - [bezier47Path addLineToPoint: CGPointMake(59.41, 28.09)]; - [bezier47Path addLineToPoint: CGPointMake(58.81, 31.1)]; - [bezier47Path addLineToPoint: CGPointMake(58.88, 31.11)]; - [bezier47Path closePath]; - bezier47Path.miterLimit = 4; - - bezier47Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier47Path fill]; - - - //// Bezier 48 Drawing - UIBezierPath* bezier48Path = [UIBezierPath bezierPath]; - [bezier48Path moveToPoint: CGPointMake(57.47, 29.62)]; - [bezier48Path addLineToPoint: CGPointMake(57.46, 29.58)]; - [bezier48Path addLineToPoint: CGPointMake(57.44, 29.56)]; - [bezier48Path addLineToPoint: CGPointMake(57.4, 29.54)]; - [bezier48Path addLineToPoint: CGPointMake(57.34, 29.52)]; - [bezier48Path addLineToPoint: CGPointMake(57.28, 29.52)]; - [bezier48Path addLineToPoint: CGPointMake(57.2, 29.51)]; - [bezier48Path addLineToPoint: CGPointMake(57.12, 29.51)]; - [bezier48Path addLineToPoint: CGPointMake(57.03, 29.52)]; - [bezier48Path addLineToPoint: CGPointMake(56.94, 29.53)]; - [bezier48Path addLineToPoint: CGPointMake(56.85, 29.54)]; - [bezier48Path addLineToPoint: CGPointMake(56.76, 29.55)]; - [bezier48Path addLineToPoint: CGPointMake(56.67, 29.56)]; - [bezier48Path addLineToPoint: CGPointMake(56.59, 29.58)]; - [bezier48Path addLineToPoint: CGPointMake(56.51, 29.59)]; - [bezier48Path addLineToPoint: CGPointMake(56.44, 29.61)]; - [bezier48Path addLineToPoint: CGPointMake(56.38, 29.62)]; - [bezier48Path addLineToPoint: CGPointMake(56.34, 29.62)]; - [bezier48Path addLineToPoint: CGPointMake(56.3, 29.64)]; - [bezier48Path addLineToPoint: CGPointMake(56.24, 29.66)]; - [bezier48Path addLineToPoint: CGPointMake(56.18, 29.68)]; - [bezier48Path addLineToPoint: CGPointMake(56.1, 29.71)]; - [bezier48Path addLineToPoint: CGPointMake(56.03, 29.75)]; - [bezier48Path addLineToPoint: CGPointMake(55.95, 29.79)]; - [bezier48Path addLineToPoint: CGPointMake(55.88, 29.84)]; - [bezier48Path addLineToPoint: CGPointMake(55.81, 29.89)]; - [bezier48Path addLineToPoint: CGPointMake(55.73, 29.95)]; - [bezier48Path addLineToPoint: CGPointMake(55.67, 30.02)]; - [bezier48Path addLineToPoint: CGPointMake(55.61, 30.09)]; - [bezier48Path addLineToPoint: CGPointMake(55.56, 30.17)]; - [bezier48Path addLineToPoint: CGPointMake(55.52, 30.26)]; - [bezier48Path addLineToPoint: CGPointMake(55.48, 30.35)]; - [bezier48Path addLineToPoint: CGPointMake(55.47, 30.44)]; - [bezier48Path addLineToPoint: CGPointMake(55.46, 30.64)]; - [bezier48Path addLineToPoint: CGPointMake(55.49, 30.79)]; - [bezier48Path addLineToPoint: CGPointMake(55.53, 30.9)]; - [bezier48Path addLineToPoint: CGPointMake(55.6, 30.99)]; - [bezier48Path addLineToPoint: CGPointMake(55.69, 31.05)]; - [bezier48Path addLineToPoint: CGPointMake(55.78, 31.08)]; - [bezier48Path addLineToPoint: CGPointMake(55.88, 31.1)]; - [bezier48Path addLineToPoint: CGPointMake(55.98, 31.1)]; - [bezier48Path addLineToPoint: CGPointMake(56.15, 31.1)]; - [bezier48Path addLineToPoint: CGPointMake(56.31, 31.08)]; - [bezier48Path addLineToPoint: CGPointMake(56.46, 31.05)]; - [bezier48Path addLineToPoint: CGPointMake(56.59, 31.01)]; - [bezier48Path addLineToPoint: CGPointMake(56.71, 30.97)]; - [bezier48Path addLineToPoint: CGPointMake(56.82, 30.92)]; - [bezier48Path addLineToPoint: CGPointMake(56.92, 30.86)]; - [bezier48Path addLineToPoint: CGPointMake(57.01, 30.79)]; - [bezier48Path addLineToPoint: CGPointMake(57.09, 30.73)]; - [bezier48Path addLineToPoint: CGPointMake(57.16, 30.65)]; - [bezier48Path addLineToPoint: CGPointMake(57.22, 30.59)]; - [bezier48Path addLineToPoint: CGPointMake(57.28, 30.51)]; - [bezier48Path addLineToPoint: CGPointMake(57.32, 30.44)]; - [bezier48Path addLineToPoint: CGPointMake(57.34, 30.38)]; - [bezier48Path addLineToPoint: CGPointMake(57.37, 30.31)]; - [bezier48Path addLineToPoint: CGPointMake(57.38, 30.24)]; - [bezier48Path addLineToPoint: CGPointMake(57.41, 30.08)]; - [bezier48Path addLineToPoint: CGPointMake(57.44, 29.92)]; - [bezier48Path addLineToPoint: CGPointMake(57.46, 29.76)]; - [bezier48Path addLineToPoint: CGPointMake(57.47, 29.62)]; - [bezier48Path closePath]; - bezier48Path.miterLimit = 4; - - bezier48Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier48Path fill]; - - - //// Bezier 49 Drawing - UIBezierPath* bezier49Path = [UIBezierPath bezierPath]; - [bezier49Path moveToPoint: CGPointMake(59.27, 32.37)]; - [bezier49Path addLineToPoint: CGPointMake(60.88, 32.37)]; - [bezier49Path addLineToPoint: CGPointMake(61.46, 29.13)]; - [bezier49Path addLineToPoint: CGPointMake(61.48, 29)]; - [bezier49Path addLineToPoint: CGPointMake(61.51, 28.88)]; - [bezier49Path addLineToPoint: CGPointMake(61.55, 28.75)]; - [bezier49Path addLineToPoint: CGPointMake(61.59, 28.63)]; - [bezier49Path addLineToPoint: CGPointMake(61.65, 28.5)]; - [bezier49Path addLineToPoint: CGPointMake(61.72, 28.38)]; - [bezier49Path addLineToPoint: CGPointMake(61.79, 28.27)]; - [bezier49Path addLineToPoint: CGPointMake(61.88, 28.16)]; - [bezier49Path addLineToPoint: CGPointMake(61.98, 28.06)]; - [bezier49Path addLineToPoint: CGPointMake(62.1, 27.97)]; - [bezier49Path addLineToPoint: CGPointMake(62.23, 27.89)]; - [bezier49Path addLineToPoint: CGPointMake(62.38, 27.82)]; - [bezier49Path addLineToPoint: CGPointMake(62.54, 27.76)]; - [bezier49Path addLineToPoint: CGPointMake(62.72, 27.72)]; - [bezier49Path addLineToPoint: CGPointMake(62.92, 27.68)]; - [bezier49Path addLineToPoint: CGPointMake(63.15, 27.67)]; - [bezier49Path addLineToPoint: CGPointMake(63.29, 27.67)]; - [bezier49Path addLineToPoint: CGPointMake(63.54, 26.21)]; - [bezier49Path addLineToPoint: CGPointMake(63.38, 26.22)]; - [bezier49Path addLineToPoint: CGPointMake(63.23, 26.24)]; - [bezier49Path addLineToPoint: CGPointMake(63.09, 26.26)]; - [bezier49Path addLineToPoint: CGPointMake(62.95, 26.3)]; - [bezier49Path addLineToPoint: CGPointMake(62.83, 26.35)]; - [bezier49Path addLineToPoint: CGPointMake(62.71, 26.41)]; - [bezier49Path addLineToPoint: CGPointMake(62.59, 26.47)]; - [bezier49Path addLineToPoint: CGPointMake(62.49, 26.54)]; - [bezier49Path addLineToPoint: CGPointMake(62.38, 26.62)]; - [bezier49Path addLineToPoint: CGPointMake(62.29, 26.7)]; - [bezier49Path addLineToPoint: CGPointMake(62.19, 26.79)]; - [bezier49Path addLineToPoint: CGPointMake(62.1, 26.88)]; - [bezier49Path addLineToPoint: CGPointMake(62.02, 26.98)]; - [bezier49Path addLineToPoint: CGPointMake(61.93, 27.08)]; - [bezier49Path addLineToPoint: CGPointMake(61.85, 27.19)]; - [bezier49Path addLineToPoint: CGPointMake(61.77, 27.3)]; - [bezier49Path addLineToPoint: CGPointMake(61.94, 26.27)]; - [bezier49Path addLineToPoint: CGPointMake(60.34, 26.27)]; - [bezier49Path addLineToPoint: CGPointMake(59.27, 32.37)]; - [bezier49Path closePath]; - bezier49Path.miterLimit = 4; - - bezier49Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier49Path fill]; - - - //// Bezier 50 Drawing - UIBezierPath* bezier50Path = [UIBezierPath bezierPath]; - [bezier50Path moveToPoint: CGPointMake(59.27, 32.37)]; - [bezier50Path addLineToPoint: CGPointMake(60.88, 32.37)]; - [bezier50Path addLineToPoint: CGPointMake(61.46, 29.13)]; - [bezier50Path addLineToPoint: CGPointMake(61.48, 29)]; - [bezier50Path addLineToPoint: CGPointMake(61.51, 28.88)]; - [bezier50Path addLineToPoint: CGPointMake(61.55, 28.75)]; - [bezier50Path addLineToPoint: CGPointMake(61.59, 28.63)]; - [bezier50Path addLineToPoint: CGPointMake(61.65, 28.5)]; - [bezier50Path addLineToPoint: CGPointMake(61.72, 28.38)]; - [bezier50Path addLineToPoint: CGPointMake(61.79, 28.27)]; - [bezier50Path addLineToPoint: CGPointMake(61.88, 28.16)]; - [bezier50Path addLineToPoint: CGPointMake(61.98, 28.06)]; - [bezier50Path addLineToPoint: CGPointMake(62.1, 27.97)]; - [bezier50Path addLineToPoint: CGPointMake(62.23, 27.89)]; - [bezier50Path addLineToPoint: CGPointMake(62.38, 27.82)]; - [bezier50Path addLineToPoint: CGPointMake(62.54, 27.76)]; - [bezier50Path addLineToPoint: CGPointMake(62.72, 27.72)]; - [bezier50Path addLineToPoint: CGPointMake(62.92, 27.68)]; - [bezier50Path addLineToPoint: CGPointMake(63.15, 27.67)]; - [bezier50Path addLineToPoint: CGPointMake(63.29, 27.67)]; - [bezier50Path addLineToPoint: CGPointMake(63.54, 26.21)]; - [bezier50Path addLineToPoint: CGPointMake(63.38, 26.22)]; - [bezier50Path addLineToPoint: CGPointMake(63.23, 26.24)]; - [bezier50Path addLineToPoint: CGPointMake(63.09, 26.26)]; - [bezier50Path addLineToPoint: CGPointMake(62.95, 26.3)]; - [bezier50Path addLineToPoint: CGPointMake(62.83, 26.35)]; - [bezier50Path addLineToPoint: CGPointMake(62.71, 26.41)]; - [bezier50Path addLineToPoint: CGPointMake(62.59, 26.47)]; - [bezier50Path addLineToPoint: CGPointMake(62.49, 26.54)]; - [bezier50Path addLineToPoint: CGPointMake(62.38, 26.62)]; - [bezier50Path addLineToPoint: CGPointMake(62.29, 26.7)]; - [bezier50Path addLineToPoint: CGPointMake(62.19, 26.79)]; - [bezier50Path addLineToPoint: CGPointMake(62.1, 26.88)]; - [bezier50Path addLineToPoint: CGPointMake(62.02, 26.98)]; - [bezier50Path addLineToPoint: CGPointMake(61.93, 27.08)]; - [bezier50Path addLineToPoint: CGPointMake(61.85, 27.19)]; - [bezier50Path addLineToPoint: CGPointMake(61.77, 27.3)]; - [bezier50Path addLineToPoint: CGPointMake(61.94, 26.27)]; - [bezier50Path addLineToPoint: CGPointMake(60.34, 26.27)]; - [bezier50Path addLineToPoint: CGPointMake(59.27, 32.37)]; - [bezier50Path closePath]; - bezier50Path.miterLimit = 4; - - bezier50Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier50Path.lineWidth = 0.5; - [bezier50Path stroke]; - - - //// Bezier 51 Drawing - UIBezierPath* bezier51Path = [UIBezierPath bezierPath]; - [bezier51Path moveToPoint: CGPointMake(44.2, 32.37)]; - [bezier51Path addLineToPoint: CGPointMake(45.83, 32.37)]; - [bezier51Path addLineToPoint: CGPointMake(46.38, 29.13)]; - [bezier51Path addLineToPoint: CGPointMake(46.4, 29)]; - [bezier51Path addLineToPoint: CGPointMake(46.46, 28.76)]; - [bezier51Path addLineToPoint: CGPointMake(46.5, 28.65)]; - [bezier51Path addLineToPoint: CGPointMake(46.54, 28.54)]; - [bezier51Path addLineToPoint: CGPointMake(46.6, 28.43)]; - [bezier51Path addLineToPoint: CGPointMake(46.67, 28.33)]; - [bezier51Path addLineToPoint: CGPointMake(46.75, 28.23)]; - [bezier51Path addLineToPoint: CGPointMake(46.84, 28.14)]; - [bezier51Path addLineToPoint: CGPointMake(46.94, 28.06)]; - [bezier51Path addLineToPoint: CGPointMake(47.07, 27.99)]; - [bezier51Path addLineToPoint: CGPointMake(47.2, 27.93)]; - [bezier51Path addLineToPoint: CGPointMake(47.36, 27.88)]; - [bezier51Path addLineToPoint: CGPointMake(47.54, 27.83)]; - [bezier51Path addLineToPoint: CGPointMake(47.73, 27.8)]; - [bezier51Path addLineToPoint: CGPointMake(47.96, 27.78)]; - [bezier51Path addLineToPoint: CGPointMake(47.97, 27.78)]; - [bezier51Path addLineToPoint: CGPointMake(48, 27.79)]; - [bezier51Path addLineToPoint: CGPointMake(48.02, 27.8)]; - [bezier51Path addLineToPoint: CGPointMake(48.05, 27.8)]; - [bezier51Path addLineToPoint: CGPointMake(48.08, 27.8)]; - [bezier51Path addLineToPoint: CGPointMake(48.1, 27.81)]; - [bezier51Path addLineToPoint: CGPointMake(48.12, 27.81)]; - [bezier51Path addLineToPoint: CGPointMake(48.13, 27.81)]; - [bezier51Path addLineToPoint: CGPointMake(48.13, 27.79)]; - [bezier51Path addLineToPoint: CGPointMake(48.15, 27.72)]; - [bezier51Path addLineToPoint: CGPointMake(48.17, 27.62)]; - [bezier51Path addLineToPoint: CGPointMake(48.2, 27.49)]; - [bezier51Path addLineToPoint: CGPointMake(48.24, 27.35)]; - [bezier51Path addLineToPoint: CGPointMake(48.28, 27.19)]; - [bezier51Path addLineToPoint: CGPointMake(48.33, 27.03)]; - [bezier51Path addLineToPoint: CGPointMake(48.38, 26.87)]; - [bezier51Path addLineToPoint: CGPointMake(48.43, 26.76)]; - [bezier51Path addLineToPoint: CGPointMake(48.49, 26.65)]; - [bezier51Path addLineToPoint: CGPointMake(48.54, 26.54)]; - [bezier51Path addLineToPoint: CGPointMake(48.6, 26.45)]; - [bezier51Path addLineToPoint: CGPointMake(48.65, 26.36)]; - [bezier51Path addLineToPoint: CGPointMake(48.69, 26.29)]; - [bezier51Path addLineToPoint: CGPointMake(48.72, 26.25)]; - [bezier51Path addLineToPoint: CGPointMake(48.73, 26.24)]; - [bezier51Path addLineToPoint: CGPointMake(48.72, 26.24)]; - [bezier51Path addLineToPoint: CGPointMake(48.7, 26.23)]; - [bezier51Path addLineToPoint: CGPointMake(48.67, 26.22)]; - [bezier51Path addLineToPoint: CGPointMake(48.63, 26.22)]; - [bezier51Path addLineToPoint: CGPointMake(48.59, 26.22)]; - [bezier51Path addLineToPoint: CGPointMake(48.55, 26.21)]; - [bezier51Path addLineToPoint: CGPointMake(48.51, 26.21)]; - [bezier51Path addLineToPoint: CGPointMake(48.47, 26.21)]; - [bezier51Path addLineToPoint: CGPointMake(48.29, 26.22)]; - [bezier51Path addLineToPoint: CGPointMake(48.13, 26.24)]; - [bezier51Path addLineToPoint: CGPointMake(47.98, 26.26)]; - [bezier51Path addLineToPoint: CGPointMake(47.85, 26.3)]; - [bezier51Path addLineToPoint: CGPointMake(47.72, 26.34)]; - [bezier51Path addLineToPoint: CGPointMake(47.6, 26.4)]; - [bezier51Path addLineToPoint: CGPointMake(47.49, 26.46)]; - [bezier51Path addLineToPoint: CGPointMake(47.39, 26.53)]; - [bezier51Path addLineToPoint: CGPointMake(47.29, 26.6)]; - [bezier51Path addLineToPoint: CGPointMake(47.2, 26.69)]; - [bezier51Path addLineToPoint: CGPointMake(47.11, 26.77)]; - [bezier51Path addLineToPoint: CGPointMake(47.03, 26.87)]; - [bezier51Path addLineToPoint: CGPointMake(46.94, 26.96)]; - [bezier51Path addLineToPoint: CGPointMake(46.86, 27.07)]; - [bezier51Path addLineToPoint: CGPointMake(46.78, 27.19)]; - [bezier51Path addLineToPoint: CGPointMake(46.69, 27.3)]; - [bezier51Path addLineToPoint: CGPointMake(46.9, 26.27)]; - [bezier51Path addLineToPoint: CGPointMake(45.26, 26.27)]; - [bezier51Path addLineToPoint: CGPointMake(44.2, 32.37)]; - [bezier51Path closePath]; - bezier51Path.miterLimit = 4; - - bezier51Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier51Path fill]; - - - //// Bezier 52 Drawing - UIBezierPath* bezier52Path = [UIBezierPath bezierPath]; - [bezier52Path moveToPoint: CGPointMake(44.2, 32.37)]; - [bezier52Path addLineToPoint: CGPointMake(45.83, 32.37)]; - [bezier52Path addLineToPoint: CGPointMake(46.38, 29.13)]; - [bezier52Path addLineToPoint: CGPointMake(46.4, 29)]; - [bezier52Path addLineToPoint: CGPointMake(46.46, 28.76)]; - [bezier52Path addLineToPoint: CGPointMake(46.5, 28.65)]; - [bezier52Path addLineToPoint: CGPointMake(46.54, 28.54)]; - [bezier52Path addLineToPoint: CGPointMake(46.6, 28.43)]; - [bezier52Path addLineToPoint: CGPointMake(46.67, 28.33)]; - [bezier52Path addLineToPoint: CGPointMake(46.75, 28.23)]; - [bezier52Path addLineToPoint: CGPointMake(46.84, 28.14)]; - [bezier52Path addLineToPoint: CGPointMake(46.94, 28.06)]; - [bezier52Path addLineToPoint: CGPointMake(47.07, 27.99)]; - [bezier52Path addLineToPoint: CGPointMake(47.2, 27.93)]; - [bezier52Path addLineToPoint: CGPointMake(47.36, 27.88)]; - [bezier52Path addLineToPoint: CGPointMake(47.54, 27.83)]; - [bezier52Path addLineToPoint: CGPointMake(47.73, 27.8)]; - [bezier52Path addLineToPoint: CGPointMake(47.96, 27.78)]; - [bezier52Path addLineToPoint: CGPointMake(47.97, 27.78)]; - [bezier52Path addLineToPoint: CGPointMake(48, 27.79)]; - [bezier52Path addLineToPoint: CGPointMake(48.02, 27.8)]; - [bezier52Path addLineToPoint: CGPointMake(48.05, 27.8)]; - [bezier52Path addLineToPoint: CGPointMake(48.08, 27.8)]; - [bezier52Path addLineToPoint: CGPointMake(48.1, 27.81)]; - [bezier52Path addLineToPoint: CGPointMake(48.12, 27.81)]; - [bezier52Path addLineToPoint: CGPointMake(48.13, 27.81)]; - [bezier52Path addLineToPoint: CGPointMake(48.13, 27.79)]; - [bezier52Path addLineToPoint: CGPointMake(48.15, 27.72)]; - [bezier52Path addLineToPoint: CGPointMake(48.17, 27.62)]; - [bezier52Path addLineToPoint: CGPointMake(48.2, 27.49)]; - [bezier52Path addLineToPoint: CGPointMake(48.24, 27.35)]; - [bezier52Path addLineToPoint: CGPointMake(48.28, 27.19)]; - [bezier52Path addLineToPoint: CGPointMake(48.33, 27.03)]; - [bezier52Path addLineToPoint: CGPointMake(48.38, 26.87)]; - [bezier52Path addLineToPoint: CGPointMake(48.43, 26.76)]; - [bezier52Path addLineToPoint: CGPointMake(48.49, 26.65)]; - [bezier52Path addLineToPoint: CGPointMake(48.54, 26.54)]; - [bezier52Path addLineToPoint: CGPointMake(48.6, 26.45)]; - [bezier52Path addLineToPoint: CGPointMake(48.65, 26.36)]; - [bezier52Path addLineToPoint: CGPointMake(48.69, 26.29)]; - [bezier52Path addLineToPoint: CGPointMake(48.72, 26.25)]; - [bezier52Path addLineToPoint: CGPointMake(48.73, 26.24)]; - [bezier52Path addLineToPoint: CGPointMake(48.72, 26.24)]; - [bezier52Path addLineToPoint: CGPointMake(48.7, 26.23)]; - [bezier52Path addLineToPoint: CGPointMake(48.67, 26.22)]; - [bezier52Path addLineToPoint: CGPointMake(48.63, 26.22)]; - [bezier52Path addLineToPoint: CGPointMake(48.59, 26.22)]; - [bezier52Path addLineToPoint: CGPointMake(48.55, 26.21)]; - [bezier52Path addLineToPoint: CGPointMake(48.51, 26.21)]; - [bezier52Path addLineToPoint: CGPointMake(48.47, 26.21)]; - [bezier52Path addLineToPoint: CGPointMake(48.29, 26.22)]; - [bezier52Path addLineToPoint: CGPointMake(48.13, 26.24)]; - [bezier52Path addLineToPoint: CGPointMake(47.98, 26.26)]; - [bezier52Path addLineToPoint: CGPointMake(47.85, 26.3)]; - [bezier52Path addLineToPoint: CGPointMake(47.72, 26.34)]; - [bezier52Path addLineToPoint: CGPointMake(47.6, 26.4)]; - [bezier52Path addLineToPoint: CGPointMake(47.49, 26.46)]; - [bezier52Path addLineToPoint: CGPointMake(47.39, 26.53)]; - [bezier52Path addLineToPoint: CGPointMake(47.29, 26.6)]; - [bezier52Path addLineToPoint: CGPointMake(47.2, 26.69)]; - [bezier52Path addLineToPoint: CGPointMake(47.11, 26.77)]; - [bezier52Path addLineToPoint: CGPointMake(47.03, 26.87)]; - [bezier52Path addLineToPoint: CGPointMake(46.94, 26.96)]; - [bezier52Path addLineToPoint: CGPointMake(46.86, 27.07)]; - [bezier52Path addLineToPoint: CGPointMake(46.78, 27.19)]; - [bezier52Path addLineToPoint: CGPointMake(46.69, 27.3)]; - [bezier52Path addLineToPoint: CGPointMake(46.9, 26.27)]; - [bezier52Path addLineToPoint: CGPointMake(45.26, 26.27)]; - [bezier52Path addLineToPoint: CGPointMake(44.2, 32.37)]; - [bezier52Path closePath]; - bezier52Path.miterLimit = 4; - - bezier52Path.usesEvenOddFillRule = YES; - - [color3 setStroke]; - bezier52Path.lineWidth = 0.5; - [bezier52Path stroke]; - } - } - } -} -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.h deleted file mode 100755 index 829b5d85..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIPayPalMonogramCardView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.m deleted file mode 100755 index 8067f798..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalMonogramCardView.m +++ /dev/null @@ -1,147 +0,0 @@ -#import "BTUIPayPalMonogramCardView.h" - -@implementation BTUIPayPalMonogramCardView - -- (void)drawArt { - //// Color Declarations - UIColor* color3 = [UIColor colorWithRed: 0.092 green: 0.106 blue: 0.242 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 0.132 green: 0.488 blue: 0.713 alpha: 1]; - UIColor* color1 = [UIColor colorWithRed: 0.115 green: 0.145 blue: 0.34 alpha: 1]; - - //// Page-1 - { - //// PayPal - { - //// pp_m_rgb - { - //// Group-5 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(60.96, 32.7)]; - [bezierPath addCurveToPoint: CGPointMake(62.99, 27.37) controlPoint1: CGPointMake(61.89, 31.21) controlPoint2: CGPointMake(62.58, 29.42)]; - [bezierPath addCurveToPoint: CGPointMake(63.2, 22.57) controlPoint1: CGPointMake(63.36, 25.57) controlPoint2: CGPointMake(63.43, 23.95)]; - [bezierPath addCurveToPoint: CGPointMake(61.44, 18.87) controlPoint1: CGPointMake(62.96, 21.11) controlPoint2: CGPointMake(62.36, 19.86)]; - [bezierPath addCurveToPoint: CGPointMake(59.32, 17.31) controlPoint1: CGPointMake(60.89, 18.26) controlPoint2: CGPointMake(60.17, 17.74)]; - [bezierPath addLineToPoint: CGPointMake(59.29, 17.29)]; - [bezierPath addLineToPoint: CGPointMake(59.29, 17.28)]; - [bezierPath addLineToPoint: CGPointMake(59.3, 17.26)]; - [bezierPath addCurveToPoint: CGPointMake(59.26, 12.67) controlPoint1: CGPointMake(59.59, 15.46) controlPoint2: CGPointMake(59.58, 13.96)]; - [bezierPath addCurveToPoint: CGPointMake(57.27, 9.1) controlPoint1: CGPointMake(58.94, 11.37) controlPoint2: CGPointMake(58.29, 10.2)]; - [bezierPath addCurveToPoint: CGPointMake(45.87, 5.66) controlPoint1: CGPointMake(55.17, 6.81) controlPoint2: CGPointMake(51.33, 5.66)]; - [bezierPath addLineToPoint: CGPointMake(30.88, 5.66)]; - [bezierPath addCurveToPoint: CGPointMake(28.81, 7.34) controlPoint1: CGPointMake(29.84, 5.66) controlPoint2: CGPointMake(28.97, 6.36)]; - [bezierPath addLineToPoint: CGPointMake(22.56, 45)]; - [bezierPath addCurveToPoint: CGPointMake(22.85, 45.95) controlPoint1: CGPointMake(22.51, 45.34) controlPoint2: CGPointMake(22.61, 45.69)]; - [bezierPath addCurveToPoint: CGPointMake(23.79, 46.36) controlPoint1: CGPointMake(23.08, 46.21) controlPoint2: CGPointMake(23.43, 46.36)]; - [bezierPath addLineToPoint: CGPointMake(33.1, 46.36)]; - [bezierPath addLineToPoint: CGPointMake(33.09, 46.42)]; - [bezierPath addLineToPoint: CGPointMake(32.45, 50.27)]; - [bezierPath addCurveToPoint: CGPointMake(32.7, 51.09) controlPoint1: CGPointMake(32.4, 50.57) controlPoint2: CGPointMake(32.49, 50.87)]; - [bezierPath addCurveToPoint: CGPointMake(33.52, 51.45) controlPoint1: CGPointMake(32.9, 51.32) controlPoint2: CGPointMake(33.2, 51.45)]; - [bezierPath addLineToPoint: CGPointMake(41.32, 51.45)]; - [bezierPath addCurveToPoint: CGPointMake(43.13, 49.99) controlPoint1: CGPointMake(42.22, 51.45) controlPoint2: CGPointMake(42.98, 50.84)]; - [bezierPath addLineToPoint: CGPointMake(43.2, 49.61)]; - [bezierPath addLineToPoint: CGPointMake(44.67, 40.74)]; - [bezierPath addLineToPoint: CGPointMake(44.77, 40.25)]; - [bezierPath addCurveToPoint: CGPointMake(46.67, 38.71) controlPoint1: CGPointMake(44.92, 39.36) controlPoint2: CGPointMake(45.72, 38.71)]; - [bezierPath addLineToPoint: CGPointMake(47.84, 38.71)]; - [bezierPath addCurveToPoint: CGPointMake(57.6, 36.2) controlPoint1: CGPointMake(51.85, 38.71) controlPoint2: CGPointMake(55.14, 37.86)]; - [bezierPath addCurveToPoint: CGPointMake(60.96, 32.7) controlPoint1: CGPointMake(58.94, 35.29) controlPoint2: CGPointMake(60.07, 34.11)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(37.87, 17.32)]; - [bezier2Path addCurveToPoint: CGPointMake(38.91, 15.98) controlPoint1: CGPointMake(37.97, 16.72) controlPoint2: CGPointMake(38.37, 16.23)]; - [bezier2Path addCurveToPoint: CGPointMake(39.72, 15.81) controlPoint1: CGPointMake(39.16, 15.87) controlPoint2: CGPointMake(39.43, 15.81)]; - [bezier2Path addLineToPoint: CGPointMake(51.48, 15.81)]; - [bezier2Path addCurveToPoint: CGPointMake(55.35, 16.08) controlPoint1: CGPointMake(52.87, 15.81) controlPoint2: CGPointMake(54.17, 15.89)]; - [bezier2Path addCurveToPoint: CGPointMake(56.34, 16.26) controlPoint1: CGPointMake(55.69, 16.13) controlPoint2: CGPointMake(56.02, 16.19)]; - [bezier2Path addCurveToPoint: CGPointMake(57.28, 16.48) controlPoint1: CGPointMake(56.66, 16.32) controlPoint2: CGPointMake(56.97, 16.4)]; - [bezier2Path addCurveToPoint: CGPointMake(57.72, 16.62) controlPoint1: CGPointMake(57.43, 16.53) controlPoint2: CGPointMake(57.57, 16.57)]; - [bezier2Path addCurveToPoint: CGPointMake(59.35, 17.27) controlPoint1: CGPointMake(58.3, 16.8) controlPoint2: CGPointMake(58.85, 17.02)]; - [bezier2Path addCurveToPoint: CGPointMake(57.31, 9.07) controlPoint1: CGPointMake(59.93, 13.7) controlPoint2: CGPointMake(59.34, 11.27)]; - [bezier2Path addCurveToPoint: CGPointMake(45.87, 5.61) controlPoint1: CGPointMake(55.08, 6.65) controlPoint2: CGPointMake(51.04, 5.61)]; - [bezier2Path addLineToPoint: CGPointMake(30.88, 5.61)]; - [bezier2Path addCurveToPoint: CGPointMake(28.76, 7.33) controlPoint1: CGPointMake(29.82, 5.61) controlPoint2: CGPointMake(28.92, 6.34)]; - [bezier2Path addLineToPoint: CGPointMake(22.52, 44.99)]; - [bezier2Path addCurveToPoint: CGPointMake(23.79, 46.41) controlPoint1: CGPointMake(22.39, 45.74) controlPoint2: CGPointMake(23, 46.41)]; - [bezier2Path addLineToPoint: CGPointMake(33.04, 46.41)]; - [bezier2Path addLineToPoint: CGPointMake(37.87, 17.32)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(59.35, 17.27)]; - [bezier3Path addLineToPoint: CGPointMake(59.35, 17.27)]; - [bezier3Path addCurveToPoint: CGPointMake(59.19, 18.1) controlPoint1: CGPointMake(59.3, 17.54) controlPoint2: CGPointMake(59.25, 17.82)]; - [bezier3Path addCurveToPoint: CGPointMake(41.81, 31.1) controlPoint1: CGPointMake(57.21, 27.76) controlPoint2: CGPointMake(50.45, 31.1)]; - [bezier3Path addLineToPoint: CGPointMake(37.41, 31.1)]; - [bezier3Path addCurveToPoint: CGPointMake(35.3, 32.82) controlPoint1: CGPointMake(36.35, 31.1) controlPoint2: CGPointMake(35.46, 31.83)]; - [bezier3Path addLineToPoint: CGPointMake(32.41, 50.26)]; - [bezier3Path addCurveToPoint: CGPointMake(33.52, 51.5) controlPoint1: CGPointMake(32.3, 50.91) controlPoint2: CGPointMake(32.83, 51.5)]; - [bezier3Path addLineToPoint: CGPointMake(41.32, 51.5)]; - [bezier3Path addCurveToPoint: CGPointMake(43.17, 49.99) controlPoint1: CGPointMake(42.24, 51.5) controlPoint2: CGPointMake(43.03, 50.86)]; - [bezier3Path addLineToPoint: CGPointMake(43.25, 49.62)]; - [bezier3Path addLineToPoint: CGPointMake(44.72, 40.75)]; - [bezier3Path addLineToPoint: CGPointMake(44.82, 40.26)]; - [bezier3Path addCurveToPoint: CGPointMake(46.67, 38.75) controlPoint1: CGPointMake(44.96, 39.39) controlPoint2: CGPointMake(45.75, 38.75)]; - [bezier3Path addLineToPoint: CGPointMake(47.84, 38.75)]; - [bezier3Path addCurveToPoint: CGPointMake(63.04, 27.38) controlPoint1: CGPointMake(55.39, 38.75) controlPoint2: CGPointMake(61.31, 35.83)]; - [bezier3Path addCurveToPoint: CGPointMake(61.48, 18.84) controlPoint1: CGPointMake(63.77, 23.85) controlPoint2: CGPointMake(63.39, 20.91)]; - [bezier3Path addCurveToPoint: CGPointMake(59.35, 17.27) controlPoint1: CGPointMake(60.9, 18.21) controlPoint2: CGPointMake(60.18, 17.69)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier3Path fill]; - } - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(54.19, 19.56)]; - [bezier4Path addCurveToPoint: CGPointMake(53.5, 19.4) controlPoint1: CGPointMake(53.97, 19.5) controlPoint2: CGPointMake(53.74, 19.45)]; - [bezier4Path addCurveToPoint: CGPointMake(52.76, 19.26) controlPoint1: CGPointMake(53.26, 19.35) controlPoint2: CGPointMake(53.01, 19.3)]; - [bezier4Path addCurveToPoint: CGPointMake(49.88, 19.06) controlPoint1: CGPointMake(51.88, 19.13) controlPoint2: CGPointMake(50.92, 19.06)]; - [bezier4Path addLineToPoint: CGPointMake(41.15, 19.06)]; - [bezier4Path addCurveToPoint: CGPointMake(40.55, 19.19) controlPoint1: CGPointMake(40.94, 19.06) controlPoint2: CGPointMake(40.73, 19.11)]; - [bezier4Path addCurveToPoint: CGPointMake(39.77, 20.18) controlPoint1: CGPointMake(40.15, 19.38) controlPoint2: CGPointMake(39.85, 19.74)]; - [bezier4Path addLineToPoint: CGPointMake(37.92, 31.39)]; - [bezier4Path addLineToPoint: CGPointMake(37.86, 31.71)]; - [bezier4Path addCurveToPoint: CGPointMake(39.43, 30.43) controlPoint1: CGPointMake(37.99, 30.98) controlPoint2: CGPointMake(38.65, 30.43)]; - [bezier4Path addLineToPoint: CGPointMake(42.7, 30.43)]; - [bezier4Path addCurveToPoint: CGPointMake(55.61, 20.77) controlPoint1: CGPointMake(49.12, 30.43) controlPoint2: CGPointMake(54.15, 27.95)]; - [bezier4Path addCurveToPoint: CGPointMake(55.73, 20.15) controlPoint1: CGPointMake(55.66, 20.56) controlPoint2: CGPointMake(55.69, 20.35)]; - [bezier4Path addCurveToPoint: CGPointMake(54.52, 19.66) controlPoint1: CGPointMake(55.36, 19.96) controlPoint2: CGPointMake(54.95, 19.8)]; - [bezier4Path addCurveToPoint: CGPointMake(54.19, 19.56) controlPoint1: CGPointMake(54.41, 19.63) controlPoint2: CGPointMake(54.3, 19.6)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier4Path fill]; - } - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.h deleted file mode 100755 index e148dfa4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUIPayPalWordmarkVectorArtView.h" - -@interface BTUIPayPalWordmarkCompactVectorArtView : BTUIPayPalWordmarkVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.m deleted file mode 100755 index 8f8caed7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkCompactVectorArtView.m +++ /dev/null @@ -1,395 +0,0 @@ -#import "BTUIPayPalWordmarkCompactVectorArtView.h" -#import "BTUI.h" - -@interface BTUIPayPalWordmarkCompactVectorArtView () -@property (nonatomic, assign) BOOL includePadding; -@end - -@implementation BTUIPayPalWordmarkCompactVectorArtView - -- (instancetype)initWithPadding { - self = [super init]; - if (self) { - self.includePadding = YES; - [self setupWithArtDimensions:CGSizeMake(158, 88)]; - } - return self; -} - -- (instancetype)init { - self = [super init]; - if (self) { - [self setupWithArtDimensions:CGSizeMake(284.0f, 80.0f)]; - } - return self; -} - -- (void)setupWithArtDimensions:(CGSize)artDimensions { - self.artDimensions = artDimensions; - self.opaque = NO; - self.theme = [BTUI braintreeTheme]; -} - -- (void)drawArt -{ - if (self.includePadding) { - //// Color Declarations - UIColor* payColor = [self.theme payBlue]; //[UIColor colorWithRed: 0.005 green: 0.123 blue: 0.454 alpha: 1]; - UIColor* palColor = [self.theme palBlue]; //[UIColor colorWithRed: 0.066 green: 0.536 blue: 0.839 alpha: 1]; - - //// Assets - { - //// button-paypal - { - //// Rectangle Drawing - - - //// logo/paypal - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(102.29, 34.76)]; - [bezierPath addCurveToPoint: CGPointMake(96.25, 38.4) controlPoint1: CGPointMake(101.73, 38.4) controlPoint2: CGPointMake(98.95, 38.4)]; - [bezierPath addLineToPoint: CGPointMake(94.72, 38.4)]; - [bezierPath addLineToPoint: CGPointMake(95.8, 31.6)]; - [bezierPath addCurveToPoint: CGPointMake(96.63, 30.89) controlPoint1: CGPointMake(95.86, 31.19) controlPoint2: CGPointMake(96.22, 30.89)]; - [bezierPath addLineToPoint: CGPointMake(97.33, 30.89)]; - [bezierPath addCurveToPoint: CGPointMake(101.79, 31.93) controlPoint1: CGPointMake(99.17, 30.89) controlPoint2: CGPointMake(100.9, 30.89)]; - [bezierPath addCurveToPoint: CGPointMake(102.29, 34.76) controlPoint1: CGPointMake(102.33, 32.55) controlPoint2: CGPointMake(102.49, 33.48)]; - [bezierPath addLineToPoint: CGPointMake(102.29, 34.76)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(91, 25)]; - [bezierPath addCurveToPoint: CGPointMake(89.56, 26.45) controlPoint1: CGPointMake(90.31, 25) controlPoint2: CGPointMake(89.67, 25.76)]; - [bezierPath addLineToPoint: CGPointMake(85.5, 53)]; - [bezierPath addCurveToPoint: CGPointMake(86.5, 54) controlPoint1: CGPointMake(85.42, 53.51) controlPoint2: CGPointMake(85.98, 54)]; - [bezierPath addLineToPoint: CGPointMake(91.5, 54)]; - [bezierPath addCurveToPoint: CGPointMake(92.5, 53) controlPoint1: CGPointMake(91.99, 54) controlPoint2: CGPointMake(92.42, 53.48)]; - [bezierPath addLineToPoint: CGPointMake(93.64, 45.22)]; - [bezierPath addCurveToPoint: CGPointMake(95.04, 44.03) controlPoint1: CGPointMake(93.75, 44.54) controlPoint2: CGPointMake(94.34, 44.03)]; - [bezierPath addLineToPoint: CGPointMake(98.25, 44.03)]; - [bezierPath addCurveToPoint: CGPointMake(109.81, 34.4) controlPoint1: CGPointMake(104.94, 44.03) controlPoint2: CGPointMake(108.8, 40.8)]; - [bezierPath addCurveToPoint: CGPointMake(108.52, 27.85) controlPoint1: CGPointMake(110.27, 31.59) controlPoint2: CGPointMake(109.83, 29.39)]; - [bezierPath addCurveToPoint: CGPointMake(101, 25) controlPoint1: CGPointMake(107.07, 26.16) controlPoint2: CGPointMake(104.4, 25)]; - [bezierPath addLineToPoint: CGPointMake(91, 25)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(123.7, 44.09)]; - [bezierPath addCurveToPoint: CGPointMake(118.21, 48.73) controlPoint1: CGPointMake(123.22, 46.87) controlPoint2: CGPointMake(121.02, 48.73)]; - [bezierPath addCurveToPoint: CGPointMake(114.94, 47.42) controlPoint1: CGPointMake(116.79, 48.73) controlPoint2: CGPointMake(115.67, 48.28)]; - [bezierPath addCurveToPoint: CGPointMake(114.18, 44.01) controlPoint1: CGPointMake(114.22, 46.57) controlPoint2: CGPointMake(113.95, 45.36)]; - [bezierPath addCurveToPoint: CGPointMake(119.63, 39.33) controlPoint1: CGPointMake(114.61, 41.26) controlPoint2: CGPointMake(116.86, 39.33)]; - [bezierPath addCurveToPoint: CGPointMake(122.87, 40.66) controlPoint1: CGPointMake(121.01, 39.33) controlPoint2: CGPointMake(122.13, 39.79)]; - [bezierPath addCurveToPoint: CGPointMake(123.7, 44.09) controlPoint1: CGPointMake(123.62, 41.53) controlPoint2: CGPointMake(123.91, 42.75)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(131.15, 34.46)]; - [bezierPath addLineToPoint: CGPointMake(126.25, 34.46)]; - [bezierPath addCurveToPoint: CGPointMake(125.41, 35.19) controlPoint1: CGPointMake(125.83, 34.46) controlPoint2: CGPointMake(125.48, 34.77)]; - [bezierPath addLineToPoint: CGPointMake(125.2, 36.57)]; - [bezierPath addLineToPoint: CGPointMake(124.85, 36.07)]; - [bezierPath addCurveToPoint: CGPointMake(119.07, 34) controlPoint1: CGPointMake(123.79, 34.52) controlPoint2: CGPointMake(121.43, 34)]; - [bezierPath addCurveToPoint: CGPointMake(108.15, 43.92) controlPoint1: CGPointMake(113.67, 34) controlPoint2: CGPointMake(109.05, 38.13)]; - [bezierPath addCurveToPoint: CGPointMake(109.97, 51.49) controlPoint1: CGPointMake(107.68, 46.81) controlPoint2: CGPointMake(108.34, 49.57)]; - [bezierPath addCurveToPoint: CGPointMake(116.13, 54) controlPoint1: CGPointMake(111.46, 53.26) controlPoint2: CGPointMake(113.59, 54)]; - [bezierPath addCurveToPoint: CGPointMake(122.91, 51.18) controlPoint1: CGPointMake(120.49, 54) controlPoint2: CGPointMake(122.91, 51.18)]; - [bezierPath addLineToPoint: CGPointMake(122.69, 52.55)]; - [bezierPath addCurveToPoint: CGPointMake(123.53, 53.54) controlPoint1: CGPointMake(122.61, 53.07) controlPoint2: CGPointMake(123.01, 53.54)]; - [bezierPath addLineToPoint: CGPointMake(127.94, 53.54)]; - [bezierPath addCurveToPoint: CGPointMake(129.34, 52.33) controlPoint1: CGPointMake(128.64, 53.54) controlPoint2: CGPointMake(129.23, 53.03)]; - [bezierPath addLineToPoint: CGPointMake(131.99, 35.46)]; - [bezierPath addCurveToPoint: CGPointMake(131.15, 34.46) controlPoint1: CGPointMake(132.07, 34.94) controlPoint2: CGPointMake(131.67, 34.46)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(137, 27)]; - [bezierPath addLineToPoint: CGPointMake(133, 53)]; - [bezierPath addCurveToPoint: CGPointMake(134, 54) controlPoint1: CGPointMake(132.93, 53.54) controlPoint2: CGPointMake(133.34, 54)]; - [bezierPath addLineToPoint: CGPointMake(138, 54)]; - [bezierPath addCurveToPoint: CGPointMake(140, 53) controlPoint1: CGPointMake(138.98, 54) controlPoint2: CGPointMake(139.59, 53.5)]; - [bezierPath addLineToPoint: CGPointMake(144, 27)]; - [bezierPath addCurveToPoint: CGPointMake(143, 26) controlPoint1: CGPointMake(144.07, 26.46) controlPoint2: CGPointMake(143.66, 26)]; - [bezierPath addLineToPoint: CGPointMake(138, 26)]; - [bezierPath addCurveToPoint: CGPointMake(137, 27) controlPoint1: CGPointMake(137.79, 26) controlPoint2: CGPointMake(137.42, 26.3)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [palColor setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(29.84, 34.76)]; - [bezier2Path addCurveToPoint: CGPointMake(23.81, 38.4) controlPoint1: CGPointMake(29.29, 38.4) controlPoint2: CGPointMake(26.5, 38.4)]; - [bezier2Path addLineToPoint: CGPointMake(22.28, 38.4)]; - [bezier2Path addLineToPoint: CGPointMake(23.35, 31.6)]; - [bezier2Path addCurveToPoint: CGPointMake(24.19, 30.89) controlPoint1: CGPointMake(23.42, 31.19) controlPoint2: CGPointMake(23.77, 30.89)]; - [bezier2Path addLineToPoint: CGPointMake(24.89, 30.89)]; - [bezier2Path addCurveToPoint: CGPointMake(29.35, 31.93) controlPoint1: CGPointMake(26.72, 30.89) controlPoint2: CGPointMake(28.45, 30.89)]; - [bezier2Path addCurveToPoint: CGPointMake(29.84, 34.76) controlPoint1: CGPointMake(29.88, 32.55) controlPoint2: CGPointMake(30.04, 33.48)]; - [bezier2Path addLineToPoint: CGPointMake(29.84, 34.76)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(18.5, 25)]; - [bezier2Path addCurveToPoint: CGPointMake(17, 26.5) controlPoint1: CGPointMake(17.81, 25) controlPoint2: CGPointMake(17.11, 25.82)]; - [bezier2Path addLineToPoint: CGPointMake(13, 53)]; - [bezier2Path addCurveToPoint: CGPointMake(14, 54) controlPoint1: CGPointMake(12.92, 53.51) controlPoint2: CGPointMake(13.48, 54)]; - [bezier2Path addLineToPoint: CGPointMake(18.5, 54)]; - [bezier2Path addCurveToPoint: CGPointMake(20, 52.5) controlPoint1: CGPointMake(19.19, 54) controlPoint2: CGPointMake(19.89, 53.18)]; - [bezier2Path addLineToPoint: CGPointMake(21.2, 45.22)]; - [bezier2Path addCurveToPoint: CGPointMake(22.59, 44.03) controlPoint1: CGPointMake(21.31, 44.54) controlPoint2: CGPointMake(21.9, 44.03)]; - [bezier2Path addLineToPoint: CGPointMake(25.81, 44.03)]; - [bezier2Path addCurveToPoint: CGPointMake(37.37, 34.4) controlPoint1: CGPointMake(32.5, 44.03) controlPoint2: CGPointMake(36.36, 40.8)]; - [bezier2Path addCurveToPoint: CGPointMake(36.07, 27.85) controlPoint1: CGPointMake(37.82, 31.59) controlPoint2: CGPointMake(37.39, 29.39)]; - [bezier2Path addCurveToPoint: CGPointMake(28.5, 25) controlPoint1: CGPointMake(34.63, 26.16) controlPoint2: CGPointMake(31.9, 25)]; - [bezier2Path addLineToPoint: CGPointMake(18.5, 25)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(52.25, 44.09)]; - [bezier2Path addCurveToPoint: CGPointMake(46.76, 48.73) controlPoint1: CGPointMake(51.78, 46.87) controlPoint2: CGPointMake(49.57, 48.73)]; - [bezier2Path addCurveToPoint: CGPointMake(43.49, 47.42) controlPoint1: CGPointMake(45.35, 48.73) controlPoint2: CGPointMake(44.22, 48.28)]; - [bezier2Path addCurveToPoint: CGPointMake(42.73, 44.01) controlPoint1: CGPointMake(42.77, 46.57) controlPoint2: CGPointMake(42.5, 45.36)]; - [bezier2Path addCurveToPoint: CGPointMake(48.18, 39.33) controlPoint1: CGPointMake(43.17, 41.26) controlPoint2: CGPointMake(45.41, 39.33)]; - [bezier2Path addCurveToPoint: CGPointMake(51.42, 40.66) controlPoint1: CGPointMake(49.56, 39.33) controlPoint2: CGPointMake(50.69, 39.79)]; - [bezier2Path addCurveToPoint: CGPointMake(52.25, 44.09) controlPoint1: CGPointMake(52.17, 41.53) controlPoint2: CGPointMake(52.46, 42.75)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(54.5, 34)]; - [bezier2Path addCurveToPoint: CGPointMake(53.5, 35) controlPoint1: CGPointMake(54.08, 34) controlPoint2: CGPointMake(53.56, 34.58)]; - [bezier2Path addLineToPoint: CGPointMake(53.2, 36.57)]; - [bezier2Path addLineToPoint: CGPointMake(52.85, 36.07)]; - [bezier2Path addCurveToPoint: CGPointMake(47.07, 34) controlPoint1: CGPointMake(51.79, 34.52) controlPoint2: CGPointMake(49.43, 34)]; - [bezier2Path addCurveToPoint: CGPointMake(36.15, 43.92) controlPoint1: CGPointMake(41.67, 34) controlPoint2: CGPointMake(37.05, 38.13)]; - [bezier2Path addCurveToPoint: CGPointMake(37.97, 51.49) controlPoint1: CGPointMake(35.68, 46.81) controlPoint2: CGPointMake(36.34, 49.57)]; - [bezier2Path addCurveToPoint: CGPointMake(44.13, 54) controlPoint1: CGPointMake(39.46, 53.26) controlPoint2: CGPointMake(41.59, 54)]; - [bezier2Path addCurveToPoint: CGPointMake(50.91, 51.18) controlPoint1: CGPointMake(48.49, 54) controlPoint2: CGPointMake(50.91, 51.18)]; - [bezier2Path addLineToPoint: CGPointMake(50.5, 53)]; - [bezier2Path addCurveToPoint: CGPointMake(51.5, 54) controlPoint1: CGPointMake(50.42, 53.52) controlPoint2: CGPointMake(50.98, 54)]; - [bezier2Path addLineToPoint: CGPointMake(56, 54)]; - [bezier2Path addCurveToPoint: CGPointMake(57.5, 52.5) controlPoint1: CGPointMake(56.7, 54) controlPoint2: CGPointMake(57.39, 53.2)]; - [bezier2Path addLineToPoint: CGPointMake(60, 35)]; - [bezier2Path addCurveToPoint: CGPointMake(59, 34) controlPoint1: CGPointMake(60.08, 34.48) controlPoint2: CGPointMake(59.52, 34)]; - [bezier2Path addLineToPoint: CGPointMake(54.5, 34)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(80, 34)]; - [bezier2Path addCurveToPoint: CGPointMake(79, 35.04) controlPoint1: CGPointMake(79.67, 34) controlPoint2: CGPointMake(79.22, 34.24)]; - [bezier2Path addLineToPoint: CGPointMake(72, 44.4)]; - [bezier2Path addLineToPoint: CGPointMake(69, 35.04)]; - [bezier2Path addCurveToPoint: CGPointMake(68, 34) controlPoint1: CGPointMake(68.97, 34.42) controlPoint2: CGPointMake(68.41, 34)]; - [bezier2Path addLineToPoint: CGPointMake(63, 34)]; - [bezier2Path addCurveToPoint: CGPointMake(62, 35.04) controlPoint1: CGPointMake(62.27, 34) controlPoint2: CGPointMake(61.86, 34.58)]; - [bezier2Path addLineToPoint: CGPointMake(68, 51.68)]; - [bezier2Path addLineToPoint: CGPointMake(62, 58.96)]; - [bezier2Path addCurveToPoint: CGPointMake(63, 60) controlPoint1: CGPointMake(61.97, 59.21) controlPoint2: CGPointMake(62.38, 60)]; - [bezier2Path addLineToPoint: CGPointMake(68, 60)]; - [bezier2Path addCurveToPoint: CGPointMake(69, 58.96) controlPoint1: CGPointMake(68.54, 60) controlPoint2: CGPointMake(68.98, 59.77)]; - [bezier2Path addLineToPoint: CGPointMake(86, 35.04)]; - [bezier2Path addCurveToPoint: CGPointMake(85, 34) controlPoint1: CGPointMake(86.24, 34.79) controlPoint2: CGPointMake(85.83, 34)]; - [bezier2Path addLineToPoint: CGPointMake(80, 34)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [payColor setFill]; - [bezier2Path fill]; - } - } - } - } else { - //// Color Declarations - UIColor* color0 = [self.theme palBlue]; - UIColor* color1 = [self.theme payBlue]; - - //// PayPal - { - //// Group 2 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(189.07, 1.49)]; - [bezierPath addLineToPoint: CGPointMake(167.92, 1.49)]; - [bezierPath addCurveToPoint: CGPointMake(165.02, 3.97) controlPoint1: CGPointMake(166.48, 1.49) controlPoint2: CGPointMake(165.24, 2.54)]; - [bezierPath addLineToPoint: CGPointMake(156.47, 58.2)]; - [bezierPath addCurveToPoint: CGPointMake(158.21, 60.24) controlPoint1: CGPointMake(156.3, 59.27) controlPoint2: CGPointMake(157.12, 60.24)]; - [bezierPath addLineToPoint: CGPointMake(169.06, 60.24)]; - [bezierPath addCurveToPoint: CGPointMake(171.09, 58.5) controlPoint1: CGPointMake(170.07, 60.24) controlPoint2: CGPointMake(170.93, 59.5)]; - [bezierPath addLineToPoint: CGPointMake(173.52, 43.13)]; - [bezierPath addCurveToPoint: CGPointMake(176.42, 40.65) controlPoint1: CGPointMake(173.74, 41.7) controlPoint2: CGPointMake(174.97, 40.65)]; - [bezierPath addLineToPoint: CGPointMake(183.11, 40.65)]; - [bezierPath addCurveToPoint: CGPointMake(207.18, 20.54) controlPoint1: CGPointMake(197.04, 40.65) controlPoint2: CGPointMake(205.08, 33.91)]; - [bezierPath addCurveToPoint: CGPointMake(204.49, 6.89) controlPoint1: CGPointMake(208.13, 14.7) controlPoint2: CGPointMake(207.22, 10.11)]; - [bezierPath addCurveToPoint: CGPointMake(189.07, 1.49) controlPoint1: CGPointMake(201.48, 3.36) controlPoint2: CGPointMake(196.15, 1.49)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(191.51, 21.3)]; - [bezierPath addCurveToPoint: CGPointMake(178.95, 28.89) controlPoint1: CGPointMake(190.36, 28.89) controlPoint2: CGPointMake(184.56, 28.89)]; - [bezierPath addLineToPoint: CGPointMake(175.76, 28.89)]; - [bezierPath addLineToPoint: CGPointMake(178, 14.71)]; - [bezierPath addCurveToPoint: CGPointMake(179.74, 13.23) controlPoint1: CGPointMake(178.13, 13.86) controlPoint2: CGPointMake(178.87, 13.23)]; - [bezierPath addLineToPoint: CGPointMake(181.2, 13.23)]; - [bezierPath addCurveToPoint: CGPointMake(190.48, 15.4) controlPoint1: CGPointMake(185.02, 13.23) controlPoint2: CGPointMake(188.62, 13.23)]; - [bezierPath addCurveToPoint: CGPointMake(191.51, 21.3) controlPoint1: CGPointMake(191.6, 16.7) controlPoint2: CGPointMake(191.93, 18.63)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - [color0 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(38.22, 1.49)]; - [bezier2Path addLineToPoint: CGPointMake(17.07, 1.49)]; - [bezier2Path addCurveToPoint: CGPointMake(14.17, 3.97) controlPoint1: CGPointMake(15.62, 1.49) controlPoint2: CGPointMake(14.39, 2.54)]; - [bezier2Path addLineToPoint: CGPointMake(5.61, 58.2)]; - [bezier2Path addCurveToPoint: CGPointMake(7.36, 60.24) controlPoint1: CGPointMake(5.45, 59.27) controlPoint2: CGPointMake(6.27, 60.24)]; - [bezier2Path addLineToPoint: CGPointMake(17.45, 60.24)]; - [bezier2Path addCurveToPoint: CGPointMake(20.36, 57.76) controlPoint1: CGPointMake(18.9, 60.24) controlPoint2: CGPointMake(20.13, 59.19)]; - [bezier2Path addLineToPoint: CGPointMake(22.67, 43.13)]; - [bezier2Path addCurveToPoint: CGPointMake(25.57, 40.65) controlPoint1: CGPointMake(22.89, 41.7) controlPoint2: CGPointMake(24.12, 40.65)]; - [bezier2Path addLineToPoint: CGPointMake(32.26, 40.65)]; - [bezier2Path addCurveToPoint: CGPointMake(56.33, 20.54) controlPoint1: CGPointMake(46.19, 40.65) controlPoint2: CGPointMake(54.23, 33.91)]; - [bezier2Path addCurveToPoint: CGPointMake(53.64, 6.89) controlPoint1: CGPointMake(57.28, 14.7) controlPoint2: CGPointMake(56.37, 10.11)]; - [bezier2Path addCurveToPoint: CGPointMake(38.22, 1.49) controlPoint1: CGPointMake(50.63, 3.36) controlPoint2: CGPointMake(45.3, 1.49)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(40.66, 21.3)]; - [bezier2Path addCurveToPoint: CGPointMake(28.1, 28.89) controlPoint1: CGPointMake(39.51, 28.89) controlPoint2: CGPointMake(33.71, 28.89)]; - [bezier2Path addLineToPoint: CGPointMake(24.91, 28.89)]; - [bezier2Path addLineToPoint: CGPointMake(27.15, 14.71)]; - [bezier2Path addCurveToPoint: CGPointMake(28.89, 13.23) controlPoint1: CGPointMake(27.28, 13.86) controlPoint2: CGPointMake(28.02, 13.23)]; - [bezier2Path addLineToPoint: CGPointMake(30.35, 13.23)]; - [bezier2Path addCurveToPoint: CGPointMake(39.63, 15.4) controlPoint1: CGPointMake(34.17, 13.23) controlPoint2: CGPointMake(37.77, 13.23)]; - [bezier2Path addCurveToPoint: CGPointMake(40.66, 21.3) controlPoint1: CGPointMake(40.74, 16.7) controlPoint2: CGPointMake(41.08, 18.63)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(101.44, 21.06)]; - [bezier3Path addLineToPoint: CGPointMake(91.31, 21.06)]; - [bezier3Path addCurveToPoint: CGPointMake(89.57, 22.54) controlPoint1: CGPointMake(90.44, 21.06) controlPoint2: CGPointMake(89.7, 21.69)]; - [bezier3Path addLineToPoint: CGPointMake(89.12, 25.38)]; - [bezier3Path addLineToPoint: CGPointMake(88.41, 24.35)]; - [bezier3Path addCurveToPoint: CGPointMake(76.45, 20.1) controlPoint1: CGPointMake(86.22, 21.17) controlPoint2: CGPointMake(81.33, 20.1)]; - [bezier3Path addCurveToPoint: CGPointMake(53.85, 40.47) controlPoint1: CGPointMake(65.26, 20.1) controlPoint2: CGPointMake(55.71, 28.58)]; - [bezier3Path addCurveToPoint: CGPointMake(57.62, 56.03) controlPoint1: CGPointMake(52.88, 46.41) controlPoint2: CGPointMake(54.25, 52.08)]; - [bezier3Path addCurveToPoint: CGPointMake(70.37, 61.18) controlPoint1: CGPointMake(60.71, 59.67) controlPoint2: CGPointMake(65.12, 61.18)]; - [bezier3Path addCurveToPoint: CGPointMake(84.39, 55.39) controlPoint1: CGPointMake(79.39, 61.18) controlPoint2: CGPointMake(84.39, 55.39)]; - [bezier3Path addLineToPoint: CGPointMake(83.94, 58.2)]; - [bezier3Path addCurveToPoint: CGPointMake(85.68, 60.24) controlPoint1: CGPointMake(83.77, 59.27) controlPoint2: CGPointMake(84.6, 60.24)]; - [bezier3Path addLineToPoint: CGPointMake(94.8, 60.24)]; - [bezier3Path addCurveToPoint: CGPointMake(97.7, 57.76) controlPoint1: CGPointMake(96.25, 60.24) controlPoint2: CGPointMake(97.48, 59.19)]; - [bezier3Path addLineToPoint: CGPointMake(103.18, 23.09)]; - [bezier3Path addCurveToPoint: CGPointMake(101.44, 21.06) controlPoint1: CGPointMake(103.35, 22.02) controlPoint2: CGPointMake(102.52, 21.06)]; - [bezier3Path closePath]; - [bezier3Path moveToPoint: CGPointMake(87.32, 40.77)]; - [bezier3Path addCurveToPoint: CGPointMake(75.89, 50.44) controlPoint1: CGPointMake(86.34, 46.55) controlPoint2: CGPointMake(81.75, 50.44)]; - [bezier3Path addCurveToPoint: CGPointMake(69.09, 47.71) controlPoint1: CGPointMake(72.95, 50.44) controlPoint2: CGPointMake(70.6, 49.49)]; - [bezier3Path addCurveToPoint: CGPointMake(67.5, 40.59) controlPoint1: CGPointMake(67.59, 45.93) controlPoint2: CGPointMake(67.03, 43.4)]; - [bezier3Path addCurveToPoint: CGPointMake(78.85, 30.85) controlPoint1: CGPointMake(68.42, 34.86) controlPoint2: CGPointMake(73.08, 30.85)]; - [bezier3Path addCurveToPoint: CGPointMake(85.61, 33.61) controlPoint1: CGPointMake(81.73, 30.85) controlPoint2: CGPointMake(84.07, 31.8)]; - [bezier3Path addCurveToPoint: CGPointMake(87.32, 40.77) controlPoint1: CGPointMake(87.16, 35.42) controlPoint2: CGPointMake(87.77, 37.97)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(252.29, 21.06)]; - [bezier4Path addLineToPoint: CGPointMake(242.16, 21.06)]; - [bezier4Path addCurveToPoint: CGPointMake(240.42, 22.54) controlPoint1: CGPointMake(241.29, 21.06) controlPoint2: CGPointMake(240.55, 21.69)]; - [bezier4Path addLineToPoint: CGPointMake(239.97, 25.38)]; - [bezier4Path addLineToPoint: CGPointMake(239.27, 24.35)]; - [bezier4Path addCurveToPoint: CGPointMake(227.3, 20.1) controlPoint1: CGPointMake(237.07, 21.17) controlPoint2: CGPointMake(232.18, 20.1)]; - [bezier4Path addCurveToPoint: CGPointMake(204.7, 40.47) controlPoint1: CGPointMake(216.12, 20.1) controlPoint2: CGPointMake(206.56, 28.58)]; - [bezier4Path addCurveToPoint: CGPointMake(208.47, 56.03) controlPoint1: CGPointMake(203.73, 46.41) controlPoint2: CGPointMake(205.1, 52.08)]; - [bezier4Path addCurveToPoint: CGPointMake(221.22, 61.18) controlPoint1: CGPointMake(211.56, 59.67) controlPoint2: CGPointMake(215.97, 61.18)]; - [bezier4Path addCurveToPoint: CGPointMake(235.24, 55.39) controlPoint1: CGPointMake(230.24, 61.18) controlPoint2: CGPointMake(235.24, 55.39)]; - [bezier4Path addLineToPoint: CGPointMake(234.79, 58.2)]; - [bezier4Path addCurveToPoint: CGPointMake(236.53, 60.24) controlPoint1: CGPointMake(234.62, 59.27) controlPoint2: CGPointMake(235.45, 60.24)]; - [bezier4Path addLineToPoint: CGPointMake(245.65, 60.24)]; - [bezier4Path addCurveToPoint: CGPointMake(248.56, 57.76) controlPoint1: CGPointMake(247.1, 60.24) controlPoint2: CGPointMake(248.33, 59.19)]; - [bezier4Path addLineToPoint: CGPointMake(254.03, 23.09)]; - [bezier4Path addCurveToPoint: CGPointMake(252.29, 21.06) controlPoint1: CGPointMake(254.2, 22.02) controlPoint2: CGPointMake(253.37, 21.06)]; - [bezier4Path closePath]; - [bezier4Path moveToPoint: CGPointMake(238.17, 40.77)]; - [bezier4Path addCurveToPoint: CGPointMake(226.74, 50.44) controlPoint1: CGPointMake(237.19, 46.55) controlPoint2: CGPointMake(232.6, 50.44)]; - [bezier4Path addCurveToPoint: CGPointMake(219.94, 47.71) controlPoint1: CGPointMake(223.8, 50.44) controlPoint2: CGPointMake(221.45, 49.49)]; - [bezier4Path addCurveToPoint: CGPointMake(218.35, 40.59) controlPoint1: CGPointMake(218.44, 45.93) controlPoint2: CGPointMake(217.88, 43.4)]; - [bezier4Path addCurveToPoint: CGPointMake(229.7, 30.85) controlPoint1: CGPointMake(219.26, 34.86) controlPoint2: CGPointMake(223.93, 30.85)]; - [bezier4Path addCurveToPoint: CGPointMake(236.46, 33.61) controlPoint1: CGPointMake(232.58, 30.85) controlPoint2: CGPointMake(234.91, 31.8)]; - [bezier4Path addCurveToPoint: CGPointMake(238.17, 40.77) controlPoint1: CGPointMake(238.01, 35.42) controlPoint2: CGPointMake(238.62, 37.97)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - [color0 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(155.38, 21.06)]; - [bezier5Path addLineToPoint: CGPointMake(145.2, 21.06)]; - [bezier5Path addCurveToPoint: CGPointMake(142.76, 22.34) controlPoint1: CGPointMake(144.22, 21.06) controlPoint2: CGPointMake(143.31, 21.54)]; - [bezier5Path addLineToPoint: CGPointMake(128.72, 43.02)]; - [bezier5Path addLineToPoint: CGPointMake(122.77, 23.15)]; - [bezier5Path addCurveToPoint: CGPointMake(119.96, 21.06) controlPoint1: CGPointMake(122.4, 21.91) controlPoint2: CGPointMake(121.26, 21.06)]; - [bezier5Path addLineToPoint: CGPointMake(109.95, 21.06)]; - [bezier5Path addCurveToPoint: CGPointMake(108.28, 23.39) controlPoint1: CGPointMake(108.74, 21.06) controlPoint2: CGPointMake(107.89, 22.24)]; - [bezier5Path addLineToPoint: CGPointMake(119.49, 56.29)]; - [bezier5Path addLineToPoint: CGPointMake(108.95, 71.16)]; - [bezier5Path addCurveToPoint: CGPointMake(110.39, 73.95) controlPoint1: CGPointMake(108.12, 72.33) controlPoint2: CGPointMake(108.96, 73.95)]; - [bezier5Path addLineToPoint: CGPointMake(120.56, 73.95)]; - [bezier5Path addCurveToPoint: CGPointMake(122.97, 72.68) controlPoint1: CGPointMake(121.52, 73.95) controlPoint2: CGPointMake(122.42, 73.47)]; - [bezier5Path addLineToPoint: CGPointMake(156.82, 23.82)]; - [bezier5Path addCurveToPoint: CGPointMake(155.38, 21.06) controlPoint1: CGPointMake(157.63, 22.65) controlPoint2: CGPointMake(156.8, 21.06)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(264.22, 2.98)]; - [bezier6Path addLineToPoint: CGPointMake(255.54, 58.21)]; - [bezier6Path addCurveToPoint: CGPointMake(257.29, 60.24) controlPoint1: CGPointMake(255.38, 59.27) controlPoint2: CGPointMake(256.2, 60.24)]; - [bezier6Path addLineToPoint: CGPointMake(266.01, 60.24)]; - [bezier6Path addCurveToPoint: CGPointMake(268.92, 57.76) controlPoint1: CGPointMake(267.46, 60.24) controlPoint2: CGPointMake(268.69, 59.19)]; - [bezier6Path addLineToPoint: CGPointMake(277.48, 3.53)]; - [bezier6Path addCurveToPoint: CGPointMake(275.73, 1.49) controlPoint1: CGPointMake(277.64, 2.46) controlPoint2: CGPointMake(276.82, 1.49)]; - [bezier6Path addLineToPoint: CGPointMake(265.96, 1.49)]; - [bezier6Path addCurveToPoint: CGPointMake(264.22, 2.98) controlPoint1: CGPointMake(265.1, 1.49) controlPoint2: CGPointMake(264.36, 2.12)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - [color0 setFill]; - [bezier6Path fill]; - } - } - } -} - -- (void)updateConstraints { - NSLayoutConstraint *aspectRatioConstraint = [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:(self.artDimensions.width / self.artDimensions.height) - constant:0.0f]; - aspectRatioConstraint.priority = UILayoutPriorityRequired; - - [self addConstraint:aspectRatioConstraint]; - - [super updateConstraints]; -} - -- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(__unused UILayoutConstraintAxis)axis { - return UILayoutPriorityRequired; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.h deleted file mode 100755 index dd629a53..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.h +++ /dev/null @@ -1,28 +0,0 @@ -#import -#import "BTUIVectorArtView.h" - -@class BTUI; - -@interface BTUIPayPalWordmarkVectorArtView : BTUIVectorArtView - -@property (nonatomic, strong) BTUI *theme; - -/*! - @brief Initializes a PayPal Wordmark with padding - - @discussion This view includes built-in padding to ensure consistent typographical baseline alignment with Venmo and Coinbase wordmarks. - - @return A PayPal Wordmark with padding -*/ -- (instancetype)initWithPadding; - -/*! - @brief Initializes a PayPal Wordmark - - @discusion This view does not include built-in padding. - - @return A PayPal Wordmark -*/ -- (instancetype)init; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.m deleted file mode 100755 index fad67888..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIPayPalWordmarkVectorArtView.m +++ /dev/null @@ -1,375 +0,0 @@ -#import "BTUIPayPalWordmarkVectorArtView.h" -#import "BTUI.h" - -@interface BTUIPayPalWordmarkVectorArtView () -@property (nonatomic, assign) BOOL includePadding; -@end - -@implementation BTUIPayPalWordmarkVectorArtView - -- (instancetype)initWithPadding { - self = [super init]; - if (self) { - self.includePadding = YES; - [self setupWithArtDimensions:CGSizeMake(200, 50)]; - } - return self; -} - -- (instancetype)init { - self = [super init]; - if (self) { - [self setupWithArtDimensions:CGSizeMake(284.0f, 80.0f)]; - } - return self; -} - -- (void)setupWithArtDimensions:(CGSize)artDimensions { - self.artDimensions = artDimensions; - self.opaque = NO; - self.theme = [BTUI braintreeTheme]; -} - -- (void)drawArt -{ - if (!self.includePadding) { - [self drawWithoutPadding]; - } else { - [self drawWithPadding]; - } -} - -- (void)drawWithoutPadding { -} - -- (void)drawWithPadding { - //// Color Declarations - UIColor* color2 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 0.68]; - UIColor* color3 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 0.7]; - UIColor* color1 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - - //// Page-1 - { - //// paypal_monogram-wordmark-3d-copy - { - //// Group 4 - { - //// logo - { - //// wordmark - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(81.45, 22.34)]; - [bezierPath addCurveToPoint: CGPointMake(78.78, 24) controlPoint1: CGPointMake(81.2, 24) controlPoint2: CGPointMake(79.97, 24)]; - [bezierPath addLineToPoint: CGPointMake(78.1, 24)]; - [bezierPath addLineToPoint: CGPointMake(78.58, 20.9)]; - [bezierPath addCurveToPoint: CGPointMake(78.95, 20.57) controlPoint1: CGPointMake(78.61, 20.71) controlPoint2: CGPointMake(78.76, 20.57)]; - [bezierPath addLineToPoint: CGPointMake(79.26, 20.57)]; - [bezierPath addCurveToPoint: CGPointMake(81.23, 21.05) controlPoint1: CGPointMake(80.07, 20.57) controlPoint2: CGPointMake(80.83, 20.57)]; - [bezierPath addCurveToPoint: CGPointMake(81.45, 22.34) controlPoint1: CGPointMake(81.46, 21.33) controlPoint2: CGPointMake(81.54, 21.75)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(80.93, 18)]; - [bezierPath addLineToPoint: CGPointMake(76.44, 18)]; - [bezierPath addCurveToPoint: CGPointMake(75.82, 18.54) controlPoint1: CGPointMake(76.13, 18) controlPoint2: CGPointMake(75.87, 18.23)]; - [bezierPath addLineToPoint: CGPointMake(74, 30.42)]; - [bezierPath addCurveToPoint: CGPointMake(74.37, 30.87) controlPoint1: CGPointMake(73.97, 30.66) controlPoint2: CGPointMake(74.14, 30.87)]; - [bezierPath addLineToPoint: CGPointMake(76.68, 30.87)]; - [bezierPath addCurveToPoint: CGPointMake(77.11, 30.49) controlPoint1: CGPointMake(76.89, 30.87) controlPoint2: CGPointMake(77.08, 30.71)]; - [bezierPath addLineToPoint: CGPointMake(77.63, 27.12)]; - [bezierPath addCurveToPoint: CGPointMake(78.24, 26.58) controlPoint1: CGPointMake(77.67, 26.81) controlPoint2: CGPointMake(77.93, 26.58)]; - [bezierPath addLineToPoint: CGPointMake(79.66, 26.58)]; - [bezierPath addCurveToPoint: CGPointMake(84.77, 22.17) controlPoint1: CGPointMake(82.62, 26.58) controlPoint2: CGPointMake(84.33, 25.1)]; - [bezierPath addCurveToPoint: CGPointMake(84.2, 19.18) controlPoint1: CGPointMake(84.98, 20.89) controlPoint2: CGPointMake(84.78, 19.89)]; - [bezierPath addCurveToPoint: CGPointMake(80.93, 18) controlPoint1: CGPointMake(83.56, 18.41) controlPoint2: CGPointMake(82.43, 18)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(49.45, 22.34)]; - [bezier2Path addCurveToPoint: CGPointMake(46.78, 24) controlPoint1: CGPointMake(49.2, 24) controlPoint2: CGPointMake(47.97, 24)]; - [bezier2Path addLineToPoint: CGPointMake(46.1, 24)]; - [bezier2Path addLineToPoint: CGPointMake(46.58, 20.9)]; - [bezier2Path addCurveToPoint: CGPointMake(46.95, 20.57) controlPoint1: CGPointMake(46.6, 20.71) controlPoint2: CGPointMake(46.76, 20.57)]; - [bezier2Path addLineToPoint: CGPointMake(47.26, 20.57)]; - [bezier2Path addCurveToPoint: CGPointMake(49.23, 21.05) controlPoint1: CGPointMake(48.07, 20.57) controlPoint2: CGPointMake(48.83, 20.57)]; - [bezier2Path addCurveToPoint: CGPointMake(49.45, 22.34) controlPoint1: CGPointMake(49.46, 21.33) controlPoint2: CGPointMake(49.54, 21.75)]; - [bezier2Path closePath]; - [bezier2Path moveToPoint: CGPointMake(48.93, 18)]; - [bezier2Path addLineToPoint: CGPointMake(44.44, 18)]; - [bezier2Path addCurveToPoint: CGPointMake(43.82, 18.54) controlPoint1: CGPointMake(44.13, 18) controlPoint2: CGPointMake(43.87, 18.23)]; - [bezier2Path addLineToPoint: CGPointMake(42, 30.42)]; - [bezier2Path addCurveToPoint: CGPointMake(42.37, 30.87) controlPoint1: CGPointMake(41.97, 30.66) controlPoint2: CGPointMake(42.14, 30.87)]; - [bezier2Path addLineToPoint: CGPointMake(44.52, 30.87)]; - [bezier2Path addCurveToPoint: CGPointMake(45.13, 30.32) controlPoint1: CGPointMake(44.83, 30.87) controlPoint2: CGPointMake(45.09, 30.64)]; - [bezier2Path addLineToPoint: CGPointMake(45.62, 27.12)]; - [bezier2Path addCurveToPoint: CGPointMake(46.24, 26.58) controlPoint1: CGPointMake(45.67, 26.81) controlPoint2: CGPointMake(45.93, 26.58)]; - [bezier2Path addLineToPoint: CGPointMake(47.66, 26.58)]; - [bezier2Path addCurveToPoint: CGPointMake(52.77, 22.17) controlPoint1: CGPointMake(50.62, 26.58) controlPoint2: CGPointMake(52.33, 25.1)]; - [bezier2Path addCurveToPoint: CGPointMake(52.2, 19.18) controlPoint1: CGPointMake(52.97, 20.89) controlPoint2: CGPointMake(52.78, 19.89)]; - [bezier2Path addCurveToPoint: CGPointMake(48.93, 18) controlPoint1: CGPointMake(51.56, 18.41) controlPoint2: CGPointMake(50.43, 18)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(59.17, 26.53)]; - [bezier3Path addCurveToPoint: CGPointMake(56.75, 28.64) controlPoint1: CGPointMake(58.97, 27.79) controlPoint2: CGPointMake(57.99, 28.64)]; - [bezier3Path addCurveToPoint: CGPointMake(55.3, 28.05) controlPoint1: CGPointMake(56.12, 28.64) controlPoint2: CGPointMake(55.62, 28.44)]; - [bezier3Path addCurveToPoint: CGPointMake(54.97, 26.49) controlPoint1: CGPointMake(54.98, 27.66) controlPoint2: CGPointMake(54.86, 27.1)]; - [bezier3Path addCurveToPoint: CGPointMake(57.38, 24.35) controlPoint1: CGPointMake(55.16, 25.23) controlPoint2: CGPointMake(56.15, 24.35)]; - [bezier3Path addCurveToPoint: CGPointMake(58.81, 24.96) controlPoint1: CGPointMake(57.99, 24.35) controlPoint2: CGPointMake(58.48, 24.56)]; - [bezier3Path addCurveToPoint: CGPointMake(59.17, 26.53) controlPoint1: CGPointMake(59.14, 25.36) controlPoint2: CGPointMake(59.27, 25.91)]; - [bezier3Path closePath]; - [bezier3Path moveToPoint: CGPointMake(62.17, 22.21)]; - [bezier3Path addLineToPoint: CGPointMake(60.02, 22.21)]; - [bezier3Path addCurveToPoint: CGPointMake(59.65, 22.54) controlPoint1: CGPointMake(59.84, 22.21) controlPoint2: CGPointMake(59.68, 22.35)]; - [bezier3Path addLineToPoint: CGPointMake(59.56, 23.15)]; - [bezier3Path addLineToPoint: CGPointMake(59.41, 22.93)]; - [bezier3Path addCurveToPoint: CGPointMake(56.87, 22) controlPoint1: CGPointMake(58.94, 22.23) controlPoint2: CGPointMake(57.9, 22)]; - [bezier3Path addCurveToPoint: CGPointMake(52.06, 26.46) controlPoint1: CGPointMake(54.49, 22) controlPoint2: CGPointMake(52.46, 23.86)]; - [bezier3Path addCurveToPoint: CGPointMake(52.87, 29.87) controlPoint1: CGPointMake(51.86, 27.76) controlPoint2: CGPointMake(52.15, 29)]; - [bezier3Path addCurveToPoint: CGPointMake(55.57, 31) controlPoint1: CGPointMake(53.52, 30.67) controlPoint2: CGPointMake(54.46, 31)]; - [bezier3Path addCurveToPoint: CGPointMake(58.55, 29.73) controlPoint1: CGPointMake(57.49, 31) controlPoint2: CGPointMake(58.55, 29.73)]; - [bezier3Path addLineToPoint: CGPointMake(58.46, 30.34)]; - [bezier3Path addCurveToPoint: CGPointMake(58.82, 30.79) controlPoint1: CGPointMake(58.42, 30.58) controlPoint2: CGPointMake(58.59, 30.79)]; - [bezier3Path addLineToPoint: CGPointMake(60.76, 30.79)]; - [bezier3Path addCurveToPoint: CGPointMake(61.38, 30.25) controlPoint1: CGPointMake(61.07, 30.79) controlPoint2: CGPointMake(61.33, 30.56)]; - [bezier3Path addLineToPoint: CGPointMake(62.54, 22.65)]; - [bezier3Path addCurveToPoint: CGPointMake(62.17, 22.21) controlPoint1: CGPointMake(62.58, 22.42) controlPoint2: CGPointMake(62.4, 22.21)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(91.18, 26.53)]; - [bezier4Path addCurveToPoint: CGPointMake(88.75, 28.64) controlPoint1: CGPointMake(90.97, 27.79) controlPoint2: CGPointMake(89.99, 28.64)]; - [bezier4Path addCurveToPoint: CGPointMake(87.3, 28.05) controlPoint1: CGPointMake(88.12, 28.64) controlPoint2: CGPointMake(87.62, 28.44)]; - [bezier4Path addCurveToPoint: CGPointMake(86.97, 26.49) controlPoint1: CGPointMake(86.99, 27.66) controlPoint2: CGPointMake(86.87, 27.1)]; - [bezier4Path addCurveToPoint: CGPointMake(89.38, 24.35) controlPoint1: CGPointMake(87.16, 25.23) controlPoint2: CGPointMake(88.15, 24.35)]; - [bezier4Path addCurveToPoint: CGPointMake(90.81, 24.96) controlPoint1: CGPointMake(89.99, 24.35) controlPoint2: CGPointMake(90.48, 24.56)]; - [bezier4Path addCurveToPoint: CGPointMake(91.18, 26.53) controlPoint1: CGPointMake(91.14, 25.36) controlPoint2: CGPointMake(91.27, 25.91)]; - [bezier4Path closePath]; - [bezier4Path moveToPoint: CGPointMake(94.18, 22.21)]; - [bezier4Path addLineToPoint: CGPointMake(92.02, 22.21)]; - [bezier4Path addCurveToPoint: CGPointMake(91.65, 22.54) controlPoint1: CGPointMake(91.84, 22.21) controlPoint2: CGPointMake(91.68, 22.35)]; - [bezier4Path addLineToPoint: CGPointMake(91.56, 23.15)]; - [bezier4Path addLineToPoint: CGPointMake(91.41, 22.93)]; - [bezier4Path addCurveToPoint: CGPointMake(88.87, 22) controlPoint1: CGPointMake(90.94, 22.23) controlPoint2: CGPointMake(89.9, 22)]; - [bezier4Path addCurveToPoint: CGPointMake(84.06, 26.46) controlPoint1: CGPointMake(86.49, 22) controlPoint2: CGPointMake(84.46, 23.86)]; - [bezier4Path addCurveToPoint: CGPointMake(84.87, 29.87) controlPoint1: CGPointMake(83.86, 27.76) controlPoint2: CGPointMake(84.15, 29)]; - [bezier4Path addCurveToPoint: CGPointMake(87.58, 31) controlPoint1: CGPointMake(85.52, 30.67) controlPoint2: CGPointMake(86.46, 31)]; - [bezier4Path addCurveToPoint: CGPointMake(90.55, 29.73) controlPoint1: CGPointMake(89.49, 31) controlPoint2: CGPointMake(90.55, 29.73)]; - [bezier4Path addLineToPoint: CGPointMake(90.46, 30.34)]; - [bezier4Path addCurveToPoint: CGPointMake(90.83, 30.79) controlPoint1: CGPointMake(90.42, 30.58) controlPoint2: CGPointMake(90.6, 30.79)]; - [bezier4Path addLineToPoint: CGPointMake(92.77, 30.79)]; - [bezier4Path addCurveToPoint: CGPointMake(93.38, 30.25) controlPoint1: CGPointMake(93.07, 30.79) controlPoint2: CGPointMake(93.33, 30.56)]; - [bezier4Path addLineToPoint: CGPointMake(94.55, 22.65)]; - [bezier4Path addCurveToPoint: CGPointMake(94.18, 22.21) controlPoint1: CGPointMake(94.58, 22.42) controlPoint2: CGPointMake(94.41, 22.21)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(73.02, 22)]; - [bezier5Path addLineToPoint: CGPointMake(70.86, 22)]; - [bezier5Path addCurveToPoint: CGPointMake(70.35, 22.28) controlPoint1: CGPointMake(70.66, 22) controlPoint2: CGPointMake(70.46, 22.11)]; - [bezier5Path addLineToPoint: CGPointMake(67.36, 26.81)]; - [bezier5Path addLineToPoint: CGPointMake(66.1, 22.46)]; - [bezier5Path addCurveToPoint: CGPointMake(65.5, 22) controlPoint1: CGPointMake(66.02, 22.19) controlPoint2: CGPointMake(65.78, 22)]; - [bezier5Path addLineToPoint: CGPointMake(63.37, 22)]; - [bezier5Path addCurveToPoint: CGPointMake(63.02, 22.51) controlPoint1: CGPointMake(63.12, 22) controlPoint2: CGPointMake(62.94, 22.26)]; - [bezier5Path addLineToPoint: CGPointMake(65.4, 29.72)]; - [bezier5Path addLineToPoint: CGPointMake(63.16, 32.97)]; - [bezier5Path addCurveToPoint: CGPointMake(63.47, 33.58) controlPoint1: CGPointMake(62.99, 33.23) controlPoint2: CGPointMake(63.16, 33.58)]; - [bezier5Path addLineToPoint: CGPointMake(65.63, 33.58)]; - [bezier5Path addCurveToPoint: CGPointMake(66.14, 33.31) controlPoint1: CGPointMake(65.83, 33.58) controlPoint2: CGPointMake(66.02, 33.48)]; - [bezier5Path addLineToPoint: CGPointMake(73.33, 22.61)]; - [bezier5Path addCurveToPoint: CGPointMake(73.02, 22) controlPoint1: CGPointMake(73.5, 22.35) controlPoint2: CGPointMake(73.33, 22)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(96.85, 18.33)]; - [bezier6Path addLineToPoint: CGPointMake(95, 30.42)]; - [bezier6Path addCurveToPoint: CGPointMake(95.37, 30.87) controlPoint1: CGPointMake(94.97, 30.66) controlPoint2: CGPointMake(95.14, 30.87)]; - [bezier6Path addLineToPoint: CGPointMake(97.23, 30.87)]; - [bezier6Path addCurveToPoint: CGPointMake(97.84, 30.32) controlPoint1: CGPointMake(97.54, 30.87) controlPoint2: CGPointMake(97.8, 30.64)]; - [bezier6Path addLineToPoint: CGPointMake(99.66, 18.45)]; - [bezier6Path addCurveToPoint: CGPointMake(99.29, 18) controlPoint1: CGPointMake(99.7, 18.21) controlPoint2: CGPointMake(99.52, 18)]; - [bezier6Path addLineToPoint: CGPointMake(97.22, 18)]; - [bezier6Path addCurveToPoint: CGPointMake(96.85, 18.33) controlPoint1: CGPointMake(97.03, 18) controlPoint2: CGPointMake(96.88, 18.14)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - } - - - //// monogram - { - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(37.4, 24.5)]; - [bezier7Path addCurveToPoint: CGPointMake(37.48, 22.4) controlPoint1: CGPointMake(37.55, 23.71) controlPoint2: CGPointMake(37.57, 23)]; - [bezier7Path addCurveToPoint: CGPointMake(36.77, 20.78) controlPoint1: CGPointMake(37.38, 21.76) controlPoint2: CGPointMake(37.14, 21.22)]; - [bezier7Path addCurveToPoint: CGPointMake(35.91, 20.1) controlPoint1: CGPointMake(36.54, 20.52) controlPoint2: CGPointMake(36.25, 20.29)]; - [bezier7Path addCurveToPoint: CGPointMake(35.88, 18.08) controlPoint1: CGPointMake(36.02, 19.3) controlPoint2: CGPointMake(36.01, 18.64)]; - [bezier7Path addCurveToPoint: CGPointMake(35.08, 16.52) controlPoint1: CGPointMake(35.75, 17.51) controlPoint2: CGPointMake(35.49, 17)]; - [bezier7Path addCurveToPoint: CGPointMake(30.46, 15.02) controlPoint1: CGPointMake(34.23, 15.53) controlPoint2: CGPointMake(32.67, 15.02)]; - [bezier7Path addLineToPoint: CGPointMake(24.39, 15.02)]; - [bezier7Path addCurveToPoint: CGPointMake(23.55, 15.75) controlPoint1: CGPointMake(23.97, 15.02) controlPoint2: CGPointMake(23.62, 15.33)]; - [bezier7Path addLineToPoint: CGPointMake(21.03, 32.18)]; - [bezier7Path addCurveToPoint: CGPointMake(21.14, 32.6) controlPoint1: CGPointMake(21, 32.33) controlPoint2: CGPointMake(21.04, 32.48)]; - [bezier7Path addCurveToPoint: CGPointMake(21.52, 32.78) controlPoint1: CGPointMake(21.24, 32.71) controlPoint2: CGPointMake(21.37, 32.78)]; - [bezier7Path addLineToPoint: CGPointMake(25.29, 32.78)]; - [bezier7Path addLineToPoint: CGPointMake(25.03, 34.48)]; - [bezier7Path addCurveToPoint: CGPointMake(25.13, 34.84) controlPoint1: CGPointMake(25.01, 34.61) controlPoint2: CGPointMake(25.05, 34.74)]; - [bezier7Path addCurveToPoint: CGPointMake(25.46, 35) controlPoint1: CGPointMake(25.21, 34.94) controlPoint2: CGPointMake(25.33, 35)]; - [bezier7Path addLineToPoint: CGPointMake(28.62, 35)]; - [bezier7Path addCurveToPoint: CGPointMake(29.35, 34.36) controlPoint1: CGPointMake(28.99, 35) controlPoint2: CGPointMake(29.29, 34.73)]; - [bezier7Path addLineToPoint: CGPointMake(29.38, 34.19)]; - [bezier7Path addLineToPoint: CGPointMake(29.98, 30.33)]; - [bezier7Path addLineToPoint: CGPointMake(30.02, 30.11)]; - [bezier7Path addCurveToPoint: CGPointMake(30.79, 29.44) controlPoint1: CGPointMake(30.08, 29.72) controlPoint2: CGPointMake(30.4, 29.44)]; - [bezier7Path addLineToPoint: CGPointMake(31.26, 29.44)]; - [bezier7Path addCurveToPoint: CGPointMake(35.21, 28.34) controlPoint1: CGPointMake(32.88, 29.44) controlPoint2: CGPointMake(34.21, 29.07)]; - [bezier7Path addCurveToPoint: CGPointMake(36.57, 26.82) controlPoint1: CGPointMake(35.76, 27.95) controlPoint2: CGPointMake(36.21, 27.43)]; - [bezier7Path addCurveToPoint: CGPointMake(37.4, 24.5) controlPoint1: CGPointMake(36.95, 26.17) controlPoint2: CGPointMake(37.23, 25.39)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(27.34, 20.29)]; - [bezier8Path addCurveToPoint: CGPointMake(27.91, 19.71) controlPoint1: CGPointMake(27.25, 19.81) controlPoint2: CGPointMake(27.41, 19.59)]; - [bezier8Path addCurveToPoint: CGPointMake(27.91, 19.12) controlPoint1: CGPointMake(27.73, 19.44) controlPoint2: CGPointMake(27.84, 19.41)]; - [bezier8Path addLineToPoint: CGPointMake(32.52, 19.12)]; - [bezier8Path addCurveToPoint: CGPointMake(34.25, 19.71) controlPoint1: CGPointMake(33.27, 19.41) controlPoint2: CGPointMake(33.8, 19.45)]; - [bezier8Path addCurveToPoint: CGPointMake(34.82, 19.71) controlPoint1: CGPointMake(34.41, 19.55) controlPoint2: CGPointMake(34.55, 19.58)]; - [bezier8Path addCurveToPoint: CGPointMake(34.82, 19.71) controlPoint1: CGPointMake(34.8, 19.63) controlPoint2: CGPointMake(34.93, 19.67)]; - [bezier8Path addCurveToPoint: CGPointMake(35.4, 19.71) controlPoint1: CGPointMake(35.11, 19.72) controlPoint2: CGPointMake(35.17, 19.74)]; - [bezier8Path addCurveToPoint: CGPointMake(35.98, 20.29) controlPoint1: CGPointMake(35.47, 19.84) controlPoint2: CGPointMake(35.69, 19.93)]; - [bezier8Path addCurveToPoint: CGPointMake(34.82, 16.76) controlPoint1: CGPointMake(36.13, 18.5) controlPoint2: CGPointMake(35.89, 17.45)]; - [bezier8Path addCurveToPoint: CGPointMake(30.22, 15) controlPoint1: CGPointMake(34.16, 15.45) controlPoint2: CGPointMake(32.53, 15)]; - [bezier8Path addLineToPoint: CGPointMake(24.46, 15)]; - [bezier8Path addCurveToPoint: CGPointMake(23.3, 15.59) controlPoint1: CGPointMake(23.96, 15) controlPoint2: CGPointMake(23.6, 15.32)]; - [bezier8Path addLineToPoint: CGPointMake(21, 32.06)]; - [bezier8Path addCurveToPoint: CGPointMake(21.58, 32.65) controlPoint1: CGPointMake(20.96, 32.36) controlPoint2: CGPointMake(21.2, 32.65)]; - [bezier8Path addLineToPoint: CGPointMake(25.03, 32.65)]; - [bezier8Path addLineToPoint: CGPointMake(26.18, 26.76)]; - [bezier8Path addLineToPoint: CGPointMake(27.34, 20.29)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(35.4, 19.71)]; - [bezier9Path addCurveToPoint: CGPointMake(34.82, 19.12) controlPoint1: CGPointMake(35.01, 19.38) controlPoint2: CGPointMake(34.88, 19.35)]; - [bezier9Path addCurveToPoint: CGPointMake(34.25, 19.12) controlPoint1: CGPointMake(34.62, 19.29) controlPoint2: CGPointMake(34.49, 19.26)]; - [bezier9Path addCurveToPoint: CGPointMake(32.52, 19.12) controlPoint1: CGPointMake(33.87, 19.16) controlPoint2: CGPointMake(33.34, 19.12)]; - [bezier9Path addLineToPoint: CGPointMake(27.91, 19.12)]; - [bezier9Path addCurveToPoint: CGPointMake(27.91, 19.12) controlPoint1: CGPointMake(27.87, 19.12) controlPoint2: CGPointMake(27.76, 19.15)]; - [bezier9Path addCurveToPoint: CGPointMake(27.34, 19.71) controlPoint1: CGPointMake(27.43, 19.31) controlPoint2: CGPointMake(27.27, 19.53)]; - [bezier9Path addLineToPoint: CGPointMake(26.18, 26.76)]; - [bezier9Path addLineToPoint: CGPointMake(26.18, 26.76)]; - [bezier9Path addCurveToPoint: CGPointMake(26.76, 26.18) controlPoint1: CGPointMake(26.25, 26.32) controlPoint2: CGPointMake(26.61, 25.99)]; - [bezier9Path addLineToPoint: CGPointMake(29.06, 26.18)]; - [bezier9Path addCurveToPoint: CGPointMake(35.98, 20.29) controlPoint1: CGPointMake(32.35, 25.99) controlPoint2: CGPointMake(35.11, 24.49)]; - [bezier9Path addCurveToPoint: CGPointMake(35.98, 19.71) controlPoint1: CGPointMake(35.94, 20.02) controlPoint2: CGPointMake(35.96, 19.9)]; - [bezier9Path addCurveToPoint: CGPointMake(35.4, 19.71) controlPoint1: CGPointMake(35.77, 19.66) controlPoint2: CGPointMake(35.55, 19.56)]; - [bezier9Path addCurveToPoint: CGPointMake(35.4, 19.71) controlPoint1: CGPointMake(35.25, 19.46) controlPoint2: CGPointMake(35.19, 19.44)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color3 setFill]; - [bezier9Path fill]; - } - } - - - //// Rectangle Drawing - CGRect rectangleRect = CGRectMake(106, 15, 79, 32); - NSMutableParagraphStyle* rectangleStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; - [rectangleStyle setAlignment: NSTextAlignmentLeft]; - - NSDictionary* rectangleFontAttributes = @{NSFontAttributeName: [UIFont fontWithName: @"HelveticaNeue-Bold" size: 16], NSForegroundColorAttributeName: color1, NSParagraphStyleAttributeName: rectangleStyle}; - - [@"Check out" drawInRect: rectangleRect withAttributes: rectangleFontAttributes]; - } - } - } - - - -} - -- (void)updateConstraints { - NSLayoutConstraint *aspectRatioConstraint = [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:(self.artDimensions.width / self.artDimensions.height) - constant:0.0f]; - aspectRatioConstraint.priority = UILayoutPriorityRequired; - - [self addConstraint:aspectRatioConstraint]; - - [super updateConstraints]; -} - -- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(__unused UILayoutConstraintAxis)axis { - return UILayoutPriorityRequired; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.h deleted file mode 100755 index f1e80cce..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIUnionPayVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.m deleted file mode 100755 index f2bfce4b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnionPayVectorArtView.m +++ /dev/null @@ -1,481 +0,0 @@ -#import "BTUIUnionPayVectorArtView.h" - -@implementation BTUIUnionPayVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; - UIColor* color2 = [UIColor colorWithRed: 0 green: 0.616 blue: 0.647 alpha: 1]; - UIColor* color3 = [UIColor colorWithRed: 0 green: 0.447 blue: 0.737 alpha: 1]; - UIColor* color4 = [UIColor colorWithRed: 0.929 green: 0.11 blue: 0.141 alpha: 1]; - - //// Group - { - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(27.72, 43.3)]; - [bezier4Path addLineToPoint: CGPointMake(34.69, 12.7)]; - [bezier4Path addCurveToPoint: CGPointMake(39.74, 9.03) controlPoint1: CGPointMake(35.15, 10.69) controlPoint2: CGPointMake(37.71, 9.07)]; - [bezier4Path addLineToPoint: CGPointMake(26.2, 9.03)]; - [bezier4Path addCurveToPoint: CGPointMake(21.08, 12.7) controlPoint1: CGPointMake(24.15, 9.03) controlPoint2: CGPointMake(21.53, 10.66)]; - [bezier4Path addLineToPoint: CGPointMake(14.11, 43.3)]; - [bezier4Path addCurveToPoint: CGPointMake(14.03, 43.86) controlPoint1: CGPointMake(14.06, 43.48) controlPoint2: CGPointMake(14.03, 43.68)]; - [bezier4Path addLineToPoint: CGPointMake(14.03, 44.44)]; - [bezier4Path addCurveToPoint: CGPointMake(16.92, 47) controlPoint1: CGPointMake(14.16, 45.89) controlPoint2: CGPointMake(15.3, 46.97)]; - [bezier4Path addLineToPoint: CGPointMake(30.53, 47)]; - [bezier4Path addCurveToPoint: CGPointMake(27.72, 43.3) controlPoint1: CGPointMake(28.53, 46.95) controlPoint2: CGPointMake(27.27, 45.31)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - [color4 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(50.34, 9.03)]; - [bezier5Path addLineToPoint: CGPointMake(39.84, 9.03)]; - [bezier5Path addCurveToPoint: CGPointMake(39.76, 9.03) controlPoint1: CGPointMake(39.81, 9.03) controlPoint2: CGPointMake(39.79, 9.03)]; - [bezier5Path addLineToPoint: CGPointMake(50.34, 9.03)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - [[UIColor blackColor] setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(44.2, 43.3)]; - [bezier6Path addLineToPoint: CGPointMake(51.17, 12.7)]; - [bezier6Path addCurveToPoint: CGPointMake(56.19, 9.03) controlPoint1: CGPointMake(51.63, 10.71) controlPoint2: CGPointMake(54.16, 9.1)]; - [bezier6Path addLineToPoint: CGPointMake(50.34, 9.03)]; - [bezier6Path addLineToPoint: CGPointMake(39.76, 9.03)]; - [bezier6Path addCurveToPoint: CGPointMake(34.72, 12.7) controlPoint1: CGPointMake(37.74, 9.07) controlPoint2: CGPointMake(35.18, 10.69)]; - [bezier6Path addLineToPoint: CGPointMake(27.75, 43.3)]; - [bezier6Path addCurveToPoint: CGPointMake(30.56, 46.97) controlPoint1: CGPointMake(27.29, 45.31) controlPoint2: CGPointMake(28.54, 46.95)]; - [bezier6Path addLineToPoint: CGPointMake(47.04, 46.97)]; - [bezier6Path addCurveToPoint: CGPointMake(44.2, 43.3) controlPoint1: CGPointMake(45.01, 46.95) controlPoint2: CGPointMake(43.74, 45.31)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - [color3 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(70.99, 9.03)]; - [bezier7Path addLineToPoint: CGPointMake(56.24, 9.03)]; - [bezier7Path addLineToPoint: CGPointMake(56.24, 9.03)]; - [bezier7Path addLineToPoint: CGPointMake(56.21, 9.03)]; - [bezier7Path addCurveToPoint: CGPointMake(51.19, 12.7) controlPoint1: CGPointMake(54.18, 9.07) controlPoint2: CGPointMake(51.65, 10.71)]; - [bezier7Path addLineToPoint: CGPointMake(44.22, 43.3)]; - [bezier7Path addCurveToPoint: CGPointMake(47.03, 46.97) controlPoint1: CGPointMake(43.76, 45.31) controlPoint2: CGPointMake(45.01, 46.95)]; - [bezier7Path addLineToPoint: CGPointMake(49.04, 46.97)]; - [bezier7Path addLineToPoint: CGPointMake(58.19, 46.97)]; - [bezier7Path addLineToPoint: CGPointMake(62.55, 46.97)]; - [bezier7Path addCurveToPoint: CGPointMake(66.91, 43.33) controlPoint1: CGPointMake(64.53, 46.87) controlPoint2: CGPointMake(66.45, 45.29)]; - [bezier7Path addLineToPoint: CGPointMake(73.88, 12.72)]; - [bezier7Path addCurveToPoint: CGPointMake(70.99, 9.03) controlPoint1: CGPointMake(74.31, 10.69) controlPoint2: CGPointMake(73.05, 9.03)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - [color2 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(40.04, 31.34)]; - [bezier8Path addLineToPoint: CGPointMake(40.3, 31.34)]; - [bezier8Path addCurveToPoint: CGPointMake(40.75, 31.12) controlPoint1: CGPointMake(40.53, 31.34) controlPoint2: CGPointMake(40.7, 31.27)]; - [bezier8Path addLineToPoint: CGPointMake(41.41, 30.14)]; - [bezier8Path addLineToPoint: CGPointMake(43.19, 30.14)]; - [bezier8Path addLineToPoint: CGPointMake(42.81, 30.79)]; - [bezier8Path addLineToPoint: CGPointMake(44.93, 30.79)]; - [bezier8Path addLineToPoint: CGPointMake(44.66, 31.8)]; - [bezier8Path addLineToPoint: CGPointMake(42.12, 31.8)]; - [bezier8Path addCurveToPoint: CGPointMake(41.03, 32.42) controlPoint1: CGPointMake(41.81, 32.22) controlPoint2: CGPointMake(41.46, 32.45)]; - [bezier8Path addLineToPoint: CGPointMake(39.71, 32.42)]; - [bezier8Path addLineToPoint: CGPointMake(40.04, 31.34)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(39.76, 32.78)]; - [bezier8Path addLineToPoint: CGPointMake(44.45, 32.78)]; - [bezier8Path addLineToPoint: CGPointMake(44.15, 33.86)]; - [bezier8Path addLineToPoint: CGPointMake(42.27, 33.86)]; - [bezier8Path addLineToPoint: CGPointMake(41.99, 34.91)]; - [bezier8Path addLineToPoint: CGPointMake(43.82, 34.91)]; - [bezier8Path addLineToPoint: CGPointMake(43.51, 35.99)]; - [bezier8Path addLineToPoint: CGPointMake(41.69, 35.99)]; - [bezier8Path addLineToPoint: CGPointMake(41.26, 37.52)]; - [bezier8Path addCurveToPoint: CGPointMake(41.66, 37.87) controlPoint1: CGPointMake(41.15, 37.77) controlPoint2: CGPointMake(41.28, 37.9)]; - [bezier8Path addLineToPoint: CGPointMake(43.16, 37.87)]; - [bezier8Path addLineToPoint: CGPointMake(42.88, 38.88)]; - [bezier8Path addLineToPoint: CGPointMake(40.02, 38.88)]; - [bezier8Path addCurveToPoint: CGPointMake(39.46, 37.95) controlPoint1: CGPointMake(39.48, 38.88) controlPoint2: CGPointMake(39.28, 38.57)]; - [bezier8Path addLineToPoint: CGPointMake(39.99, 35.98)]; - [bezier8Path addLineToPoint: CGPointMake(38.83, 35.98)]; - [bezier8Path addLineToPoint: CGPointMake(39.13, 34.91)]; - [bezier8Path addLineToPoint: CGPointMake(40.3, 34.91)]; - [bezier8Path addLineToPoint: CGPointMake(40.57, 33.85)]; - [bezier8Path addLineToPoint: CGPointMake(39.46, 33.85)]; - [bezier8Path addLineToPoint: CGPointMake(39.76, 32.78)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(47.24, 30.11)]; - [bezier8Path addLineToPoint: CGPointMake(47.17, 30.74)]; - [bezier8Path addCurveToPoint: CGPointMake(48.87, 30.08) controlPoint1: CGPointMake(47.17, 30.74) controlPoint2: CGPointMake(48.05, 30.08)]; - [bezier8Path addLineToPoint: CGPointMake(51.83, 30.08)]; - [bezier8Path addLineToPoint: CGPointMake(50.69, 34.16)]; - [bezier8Path addCurveToPoint: CGPointMake(49.47, 34.86) controlPoint1: CGPointMake(50.59, 34.64) controlPoint2: CGPointMake(50.18, 34.86)]; - [bezier8Path addLineToPoint: CGPointMake(46.1, 34.86)]; - [bezier8Path addLineToPoint: CGPointMake(45.31, 37.73)]; - [bezier8Path addCurveToPoint: CGPointMake(45.49, 37.95) controlPoint1: CGPointMake(45.26, 37.88) controlPoint2: CGPointMake(45.34, 37.95)]; - [bezier8Path addLineToPoint: CGPointMake(46.15, 37.95)]; - [bezier8Path addLineToPoint: CGPointMake(45.9, 38.83)]; - [bezier8Path addLineToPoint: CGPointMake(44.25, 38.83)]; - [bezier8Path addCurveToPoint: CGPointMake(43.44, 38.25) controlPoint1: CGPointMake(43.62, 38.83) controlPoint2: CGPointMake(43.34, 38.63)]; - [bezier8Path addLineToPoint: CGPointMake(45.67, 30.11)]; - [bezier8Path addLineToPoint: CGPointMake(47.24, 30.11)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(49.75, 31.27)]; - [bezier8Path addLineToPoint: CGPointMake(47.11, 31.27)]; - [bezier8Path addLineToPoint: CGPointMake(46.81, 32.38)]; - [bezier8Path addCurveToPoint: CGPointMake(47.97, 32.05) controlPoint1: CGPointMake(46.81, 32.38) controlPoint2: CGPointMake(47.24, 32.05)]; - [bezier8Path addCurveToPoint: CGPointMake(49.54, 32.05) controlPoint1: CGPointMake(48.71, 32.05) controlPoint2: CGPointMake(49.54, 32.05)]; - [bezier8Path addLineToPoint: CGPointMake(49.75, 31.27)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(48.79, 33.81)]; - [bezier8Path addCurveToPoint: CGPointMake(49.11, 33.58) controlPoint1: CGPointMake(48.99, 33.83) controlPoint2: CGPointMake(49.09, 33.76)]; - [bezier8Path addLineToPoint: CGPointMake(49.27, 33)]; - [bezier8Path addLineToPoint: CGPointMake(46.6, 33)]; - [bezier8Path addLineToPoint: CGPointMake(46.37, 33.8)]; - [bezier8Path addLineToPoint: CGPointMake(48.79, 33.81)]; - [bezier8Path addLineToPoint: CGPointMake(48.79, 33.81)]; - [bezier8Path closePath]; - [bezier8Path moveToPoint: CGPointMake(46.99, 35.11)]; - [bezier8Path addLineToPoint: CGPointMake(48.51, 35.11)]; - [bezier8Path addLineToPoint: CGPointMake(48.48, 35.77)]; - [bezier8Path addLineToPoint: CGPointMake(48.89, 35.77)]; - [bezier8Path addCurveToPoint: CGPointMake(49.2, 35.57) controlPoint1: CGPointMake(49.1, 35.77) controlPoint2: CGPointMake(49.2, 35.69)]; - [bezier8Path addLineToPoint: CGPointMake(49.33, 35.14)]; - [bezier8Path addLineToPoint: CGPointMake(50.59, 35.14)]; - [bezier8Path addLineToPoint: CGPointMake(50.41, 35.77)]; - [bezier8Path addCurveToPoint: CGPointMake(49.27, 36.57) controlPoint1: CGPointMake(50.26, 36.29) controlPoint2: CGPointMake(49.88, 36.55)]; - [bezier8Path addLineToPoint: CGPointMake(48.46, 36.57)]; - [bezier8Path addLineToPoint: CGPointMake(48.46, 37.7)]; - [bezier8Path addCurveToPoint: CGPointMake(48.94, 37.98) controlPoint1: CGPointMake(48.44, 37.88) controlPoint2: CGPointMake(48.61, 37.98)]; - [bezier8Path addLineToPoint: CGPointMake(49.71, 37.98)]; - [bezier8Path addLineToPoint: CGPointMake(49.45, 38.86)]; - [bezier8Path addLineToPoint: CGPointMake(47.63, 38.86)]; - [bezier8Path addCurveToPoint: CGPointMake(46.87, 38.13) controlPoint1: CGPointMake(47.12, 38.88) controlPoint2: CGPointMake(46.87, 38.63)]; - [bezier8Path addLineToPoint: CGPointMake(46.99, 35.11)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - [color setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(53.5, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(53.86, 30.16)]; - [bezier9Path addLineToPoint: CGPointMake(55.66, 30.16)]; - [bezier9Path addLineToPoint: CGPointMake(55.58, 30.61)]; - [bezier9Path addCurveToPoint: CGPointMake(57.15, 30.16) controlPoint1: CGPointMake(55.58, 30.61) controlPoint2: CGPointMake(56.49, 30.16)]; - [bezier9Path addCurveToPoint: CGPointMake(59.36, 30.16) controlPoint1: CGPointMake(57.81, 30.16) controlPoint2: CGPointMake(59.36, 30.16)]; - [bezier9Path addLineToPoint: CGPointMake(59, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(58.65, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(56.98, 37.22)]; - [bezier9Path addLineToPoint: CGPointMake(57.33, 37.22)]; - [bezier9Path addLineToPoint: CGPointMake(57, 38.38)]; - [bezier9Path addLineToPoint: CGPointMake(56.65, 38.38)]; - [bezier9Path addLineToPoint: CGPointMake(56.5, 38.88)]; - [bezier9Path addLineToPoint: CGPointMake(54.78, 38.88)]; - [bezier9Path addLineToPoint: CGPointMake(54.93, 38.38)]; - [bezier9Path addLineToPoint: CGPointMake(51.5, 38.38)]; - [bezier9Path addLineToPoint: CGPointMake(51.83, 37.22)]; - [bezier9Path addLineToPoint: CGPointMake(52.18, 37.22)]; - [bezier9Path addLineToPoint: CGPointMake(53.86, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(53.5, 31.39)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(55.43, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(54.97, 32.98)]; - [bezier9Path addCurveToPoint: CGPointMake(56.42, 32.6) controlPoint1: CGPointMake(54.97, 32.98) controlPoint2: CGPointMake(55.76, 32.67)]; - [bezier9Path addCurveToPoint: CGPointMake(56.77, 31.39) controlPoint1: CGPointMake(56.57, 32.05) controlPoint2: CGPointMake(56.77, 31.39)]; - [bezier9Path addLineToPoint: CGPointMake(55.43, 31.39)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(54.74, 33.71)]; - [bezier9Path addLineToPoint: CGPointMake(54.29, 35.36)]; - [bezier9Path addCurveToPoint: CGPointMake(55.76, 34.91) controlPoint1: CGPointMake(54.29, 35.36) controlPoint2: CGPointMake(55.15, 34.94)]; - [bezier9Path addCurveToPoint: CGPointMake(56.11, 33.71) controlPoint1: CGPointMake(55.94, 34.28) controlPoint2: CGPointMake(56.11, 33.71)]; - [bezier9Path addLineToPoint: CGPointMake(54.74, 33.71)]; - [bezier9Path addLineToPoint: CGPointMake(54.74, 33.71)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(55.1, 37.23)]; - [bezier9Path addLineToPoint: CGPointMake(55.45, 36.02)]; - [bezier9Path addLineToPoint: CGPointMake(54.11, 36.02)]; - [bezier9Path addLineToPoint: CGPointMake(53.76, 37.23)]; - [bezier9Path addLineToPoint: CGPointMake(55.1, 37.23)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(59.43, 30.06)]; - [bezier9Path addLineToPoint: CGPointMake(61.11, 30.06)]; - [bezier9Path addLineToPoint: CGPointMake(61.18, 30.69)]; - [bezier9Path addCurveToPoint: CGPointMake(61.46, 30.92) controlPoint1: CGPointMake(61.18, 30.84) controlPoint2: CGPointMake(61.26, 30.92)]; - [bezier9Path addLineToPoint: CGPointMake(61.77, 30.92)]; - [bezier9Path addLineToPoint: CGPointMake(61.46, 31.97)]; - [bezier9Path addLineToPoint: CGPointMake(60.22, 31.97)]; - [bezier9Path addCurveToPoint: CGPointMake(59.48, 31.42) controlPoint1: CGPointMake(59.73, 32) controlPoint2: CGPointMake(59.51, 31.82)]; - [bezier9Path addLineToPoint: CGPointMake(59.43, 30.06)]; - [bezier9Path closePath]; - [bezier9Path moveToPoint: CGPointMake(58.93, 32.3)]; - [bezier9Path addLineToPoint: CGPointMake(64.38, 32.3)]; - [bezier9Path addLineToPoint: CGPointMake(64.05, 33.43)]; - [bezier9Path addLineToPoint: CGPointMake(62.3, 33.43)]; - [bezier9Path addLineToPoint: CGPointMake(62, 34.46)]; - [bezier9Path addLineToPoint: CGPointMake(63.72, 34.46)]; - [bezier9Path addLineToPoint: CGPointMake(63.39, 35.59)]; - [bezier9Path addLineToPoint: CGPointMake(61.46, 35.59)]; - [bezier9Path addLineToPoint: CGPointMake(61.04, 36.25)]; - [bezier9Path addLineToPoint: CGPointMake(61.97, 36.25)]; - [bezier9Path addLineToPoint: CGPointMake(62.2, 37.55)]; - [bezier9Path addCurveToPoint: CGPointMake(62.56, 37.76) controlPoint1: CGPointMake(62.23, 37.68) controlPoint2: CGPointMake(62.35, 37.76)]; - [bezier9Path addLineToPoint: CGPointMake(62.86, 37.76)]; - [bezier9Path addLineToPoint: CGPointMake(62.56, 38.84)]; - [bezier9Path addLineToPoint: CGPointMake(61.52, 38.84)]; - [bezier9Path addCurveToPoint: CGPointMake(60.68, 38.31) controlPoint1: CGPointMake(60.99, 38.86) controlPoint2: CGPointMake(60.71, 38.69)]; - [bezier9Path addLineToPoint: CGPointMake(60.43, 37.1)]; - [bezier9Path addLineToPoint: CGPointMake(59.57, 38.38)]; - [bezier9Path addCurveToPoint: CGPointMake(58.63, 38.89) controlPoint1: CGPointMake(59.36, 38.73) controlPoint2: CGPointMake(59.06, 38.91)]; - [bezier9Path addLineToPoint: CGPointMake(57.03, 38.89)]; - [bezier9Path addLineToPoint: CGPointMake(57.33, 37.81)]; - [bezier9Path addLineToPoint: CGPointMake(57.84, 37.81)]; - [bezier9Path addCurveToPoint: CGPointMake(58.37, 37.53) controlPoint1: CGPointMake(58.05, 37.81) controlPoint2: CGPointMake(58.22, 37.71)]; - [bezier9Path addLineToPoint: CGPointMake(59.72, 35.6)]; - [bezier9Path addLineToPoint: CGPointMake(57.97, 35.6)]; - [bezier9Path addLineToPoint: CGPointMake(58.3, 34.46)]; - [bezier9Path addLineToPoint: CGPointMake(60.17, 34.46)]; - [bezier9Path addLineToPoint: CGPointMake(60.48, 33.43)]; - [bezier9Path addLineToPoint: CGPointMake(58.6, 33.43)]; - [bezier9Path addLineToPoint: CGPointMake(58.93, 32.3)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - [color setFill]; - [bezier9Path fill]; - - - //// Bezier 10 Drawing - UIBezierPath* bezier10Path = [UIBezierPath bezierPath]; - [bezier10Path moveToPoint: CGPointMake(28.48, 24.68)]; - [bezier10Path addCurveToPoint: CGPointMake(27.04, 27.02) controlPoint1: CGPointMake(28.28, 25.69) controlPoint2: CGPointMake(27.8, 26.47)]; - [bezier10Path addCurveToPoint: CGPointMake(24.18, 27.82) controlPoint1: CGPointMake(26.31, 27.55) controlPoint2: CGPointMake(25.34, 27.82)]; - [bezier10Path addCurveToPoint: CGPointMake(21.77, 26.99) controlPoint1: CGPointMake(23.09, 27.82) controlPoint2: CGPointMake(22.28, 27.55)]; - [bezier10Path addCurveToPoint: CGPointMake(21.24, 25.49) controlPoint1: CGPointMake(21.41, 26.59) controlPoint2: CGPointMake(21.24, 26.09)]; - [bezier10Path addCurveToPoint: CGPointMake(21.34, 24.68) controlPoint1: CGPointMake(21.24, 25.24) controlPoint2: CGPointMake(21.26, 24.96)]; - [bezier10Path addLineToPoint: CGPointMake(22.58, 18.75)]; - [bezier10Path addLineToPoint: CGPointMake(24.46, 18.75)]; - [bezier10Path addLineToPoint: CGPointMake(23.24, 24.63)]; - [bezier10Path addCurveToPoint: CGPointMake(23.19, 25.09) controlPoint1: CGPointMake(23.21, 24.78) controlPoint2: CGPointMake(23.19, 24.94)]; - [bezier10Path addCurveToPoint: CGPointMake(23.42, 25.81) controlPoint1: CGPointMake(23.19, 25.39) controlPoint2: CGPointMake(23.27, 25.64)]; - [bezier10Path addCurveToPoint: CGPointMake(24.51, 26.24) controlPoint1: CGPointMake(23.65, 26.09) controlPoint2: CGPointMake(24.01, 26.24)]; - [bezier10Path addCurveToPoint: CGPointMake(25.93, 25.81) controlPoint1: CGPointMake(25.1, 26.24) controlPoint2: CGPointMake(25.57, 26.09)]; - [bezier10Path addCurveToPoint: CGPointMake(26.64, 24.61) controlPoint1: CGPointMake(26.31, 25.54) controlPoint2: CGPointMake(26.54, 25.13)]; - [bezier10Path addLineToPoint: CGPointMake(27.88, 18.73)]; - [bezier10Path addLineToPoint: CGPointMake(29.76, 18.73)]; - [bezier10Path addLineToPoint: CGPointMake(28.48, 24.68)]; - [bezier10Path closePath]; - bezier10Path.miterLimit = 4; - - [color setFill]; - [bezier10Path fill]; - - - //// Bezier 11 Drawing - UIBezierPath* bezier11Path = [UIBezierPath bezierPath]; - [bezier11Path moveToPoint: CGPointMake(30.21, 22.35)]; - [bezier11Path addLineToPoint: CGPointMake(31.53, 22.35)]; - [bezier11Path addLineToPoint: CGPointMake(31.37, 23.1)]; - [bezier11Path addLineToPoint: CGPointMake(31.58, 22.87)]; - [bezier11Path addCurveToPoint: CGPointMake(33.15, 22.19) controlPoint1: CGPointMake(32.01, 22.42) controlPoint2: CGPointMake(32.54, 22.19)]; - [bezier11Path addCurveToPoint: CGPointMake(34.37, 22.67) controlPoint1: CGPointMake(33.71, 22.19) controlPoint2: CGPointMake(34.11, 22.34)]; - [bezier11Path addCurveToPoint: CGPointMake(34.57, 24) controlPoint1: CGPointMake(34.62, 23) controlPoint2: CGPointMake(34.67, 23.45)]; - [bezier11Path addLineToPoint: CGPointMake(33.84, 27.62)]; - [bezier11Path addLineToPoint: CGPointMake(32.47, 27.62)]; - [bezier11Path addLineToPoint: CGPointMake(33.13, 24.36)]; - [bezier11Path addCurveToPoint: CGPointMake(33.08, 23.6) controlPoint1: CGPointMake(33.2, 24.03) controlPoint2: CGPointMake(33.18, 23.78)]; - [bezier11Path addCurveToPoint: CGPointMake(32.49, 23.35) controlPoint1: CGPointMake(32.98, 23.45) controlPoint2: CGPointMake(32.77, 23.35)]; - [bezier11Path addCurveToPoint: CGPointMake(31.61, 23.68) controlPoint1: CGPointMake(32.14, 23.35) controlPoint2: CGPointMake(31.86, 23.45)]; - [bezier11Path addCurveToPoint: CGPointMake(31.13, 24.58) controlPoint1: CGPointMake(31.36, 23.9) controlPoint2: CGPointMake(31.2, 24.2)]; - [bezier11Path addLineToPoint: CGPointMake(30.52, 27.62)]; - [bezier11Path addLineToPoint: CGPointMake(29.15, 27.62)]; - [bezier11Path addLineToPoint: CGPointMake(30.21, 22.35)]; - [bezier11Path closePath]; - bezier11Path.miterLimit = 4; - - [color setFill]; - [bezier11Path fill]; - - - //// Bezier 12 Drawing - UIBezierPath* bezier12Path = [UIBezierPath bezierPath]; - [bezier12Path moveToPoint: CGPointMake(45.42, 22.35)]; - [bezier12Path addLineToPoint: CGPointMake(46.74, 22.35)]; - [bezier12Path addLineToPoint: CGPointMake(46.59, 23.1)]; - [bezier12Path addLineToPoint: CGPointMake(46.76, 22.87)]; - [bezier12Path addCurveToPoint: CGPointMake(48.33, 22.19) controlPoint1: CGPointMake(47.19, 22.42) controlPoint2: CGPointMake(47.73, 22.19)]; - [bezier12Path addCurveToPoint: CGPointMake(49.55, 22.67) controlPoint1: CGPointMake(48.89, 22.19) controlPoint2: CGPointMake(49.3, 22.34)]; - [bezier12Path addCurveToPoint: CGPointMake(49.76, 24) controlPoint1: CGPointMake(49.8, 23) controlPoint2: CGPointMake(49.88, 23.45)]; - [bezier12Path addLineToPoint: CGPointMake(49.02, 27.62)]; - [bezier12Path addLineToPoint: CGPointMake(47.65, 27.62)]; - [bezier12Path addLineToPoint: CGPointMake(48.31, 24.36)]; - [bezier12Path addCurveToPoint: CGPointMake(48.26, 23.6) controlPoint1: CGPointMake(48.39, 24.03) controlPoint2: CGPointMake(48.36, 23.78)]; - [bezier12Path addCurveToPoint: CGPointMake(47.68, 23.35) controlPoint1: CGPointMake(48.16, 23.45) controlPoint2: CGPointMake(47.96, 23.35)]; - [bezier12Path addCurveToPoint: CGPointMake(46.79, 23.68) controlPoint1: CGPointMake(47.32, 23.35) controlPoint2: CGPointMake(47.05, 23.45)]; - [bezier12Path addCurveToPoint: CGPointMake(46.31, 24.58) controlPoint1: CGPointMake(46.54, 23.9) controlPoint2: CGPointMake(46.39, 24.2)]; - [bezier12Path addLineToPoint: CGPointMake(45.7, 27.62)]; - [bezier12Path addLineToPoint: CGPointMake(44.34, 27.62)]; - [bezier12Path addLineToPoint: CGPointMake(45.42, 22.35)]; - [bezier12Path closePath]; - bezier12Path.miterLimit = 4; - - [color setFill]; - [bezier12Path fill]; - - - //// Bezier 13 Drawing - UIBezierPath* bezier13Path = [UIBezierPath bezierPath]; - [bezier13Path moveToPoint: CGPointMake(36.37, 22.35)]; - [bezier13Path addLineToPoint: CGPointMake(37.84, 22.35)]; - [bezier13Path addLineToPoint: CGPointMake(36.7, 27.65)]; - [bezier13Path addLineToPoint: CGPointMake(35.23, 27.65)]; - [bezier13Path addLineToPoint: CGPointMake(36.37, 22.35)]; - [bezier13Path closePath]; - [bezier13Path moveToPoint: CGPointMake(36.82, 20.41)]; - [bezier13Path addLineToPoint: CGPointMake(38.29, 20.41)]; - [bezier13Path addLineToPoint: CGPointMake(38.02, 21.69)]; - [bezier13Path addLineToPoint: CGPointMake(36.55, 21.69)]; - [bezier13Path addLineToPoint: CGPointMake(36.82, 20.41)]; - [bezier13Path closePath]; - bezier13Path.miterLimit = 4; - - [color setFill]; - [bezier13Path fill]; - - - //// Bezier 14 Drawing - UIBezierPath* bezier14Path = [UIBezierPath bezierPath]; - [bezier14Path moveToPoint: CGPointMake(39.13, 27.25)]; - [bezier14Path addCurveToPoint: CGPointMake(38.55, 25.76) controlPoint1: CGPointMake(38.75, 26.89) controlPoint2: CGPointMake(38.55, 26.39)]; - [bezier14Path addCurveToPoint: CGPointMake(38.57, 25.41) controlPoint1: CGPointMake(38.55, 25.66) controlPoint2: CGPointMake(38.55, 25.53)]; - [bezier14Path addCurveToPoint: CGPointMake(38.62, 25.03) controlPoint1: CGPointMake(38.6, 25.28) controlPoint2: CGPointMake(38.6, 25.13)]; - [bezier14Path addCurveToPoint: CGPointMake(39.74, 22.97) controlPoint1: CGPointMake(38.8, 24.18) controlPoint2: CGPointMake(39.18, 23.5)]; - [bezier14Path addCurveToPoint: CGPointMake(41.79, 22.22) controlPoint1: CGPointMake(40.32, 22.47) controlPoint2: CGPointMake(41, 22.22)]; - [bezier14Path addCurveToPoint: CGPointMake(43.36, 22.77) controlPoint1: CGPointMake(42.45, 22.22) controlPoint2: CGPointMake(42.98, 22.39)]; - [bezier14Path addCurveToPoint: CGPointMake(43.95, 24.28) controlPoint1: CGPointMake(43.74, 23.15) controlPoint2: CGPointMake(43.95, 23.62)]; - [bezier14Path addCurveToPoint: CGPointMake(43.92, 24.66) controlPoint1: CGPointMake(43.95, 24.38) controlPoint2: CGPointMake(43.95, 24.51)]; - [bezier14Path addCurveToPoint: CGPointMake(43.87, 25.06) controlPoint1: CGPointMake(43.89, 24.78) controlPoint2: CGPointMake(43.89, 24.93)]; - [bezier14Path addCurveToPoint: CGPointMake(42.76, 27.07) controlPoint1: CGPointMake(43.69, 25.92) controlPoint2: CGPointMake(43.34, 26.59)]; - [bezier14Path addCurveToPoint: CGPointMake(40.7, 27.82) controlPoint1: CGPointMake(42.17, 27.57) controlPoint2: CGPointMake(41.49, 27.82)]; - [bezier14Path addCurveToPoint: CGPointMake(39.13, 27.25) controlPoint1: CGPointMake(40.04, 27.78) controlPoint2: CGPointMake(39.51, 27.6)]; - [bezier14Path closePath]; - [bezier14Path moveToPoint: CGPointMake(41.94, 26.19)]; - [bezier14Path addCurveToPoint: CGPointMake(42.5, 24.94) controlPoint1: CGPointMake(42.19, 25.92) controlPoint2: CGPointMake(42.4, 25.49)]; - [bezier14Path addCurveToPoint: CGPointMake(42.55, 24.66) controlPoint1: CGPointMake(42.53, 24.86) controlPoint2: CGPointMake(42.53, 24.76)]; - [bezier14Path addCurveToPoint: CGPointMake(42.58, 24.41) controlPoint1: CGPointMake(42.55, 24.56) controlPoint2: CGPointMake(42.58, 24.48)]; - [bezier14Path addCurveToPoint: CGPointMake(42.32, 23.65) controlPoint1: CGPointMake(42.58, 24.08) controlPoint2: CGPointMake(42.5, 23.83)]; - [bezier14Path addCurveToPoint: CGPointMake(41.61, 23.38) controlPoint1: CGPointMake(42.15, 23.48) controlPoint2: CGPointMake(41.92, 23.38)]; - [bezier14Path addCurveToPoint: CGPointMake(40.63, 23.8) controlPoint1: CGPointMake(41.21, 23.38) controlPoint2: CGPointMake(40.88, 23.53)]; - [bezier14Path addCurveToPoint: CGPointMake(40.07, 25.09) controlPoint1: CGPointMake(40.37, 24.08) controlPoint2: CGPointMake(40.17, 24.51)]; - [bezier14Path addCurveToPoint: CGPointMake(40.02, 25.34) controlPoint1: CGPointMake(40.04, 25.16) controlPoint2: CGPointMake(40.04, 25.26)]; - [bezier14Path addCurveToPoint: CGPointMake(40.02, 25.59) controlPoint1: CGPointMake(40.02, 25.41) controlPoint2: CGPointMake(40.02, 25.51)]; - [bezier14Path addCurveToPoint: CGPointMake(40.27, 26.34) controlPoint1: CGPointMake(40.02, 25.91) controlPoint2: CGPointMake(40.1, 26.17)]; - [bezier14Path addCurveToPoint: CGPointMake(40.98, 26.62) controlPoint1: CGPointMake(40.45, 26.52) controlPoint2: CGPointMake(40.68, 26.62)]; - [bezier14Path addCurveToPoint: CGPointMake(41.94, 26.19) controlPoint1: CGPointMake(41.34, 26.62) controlPoint2: CGPointMake(41.66, 26.47)]; - [bezier14Path closePath]; - bezier14Path.miterLimit = 4; - - [color setFill]; - [bezier14Path fill]; - - - //// Bezier 15 Drawing - UIBezierPath* bezier15Path = [UIBezierPath bezierPath]; - [bezier15Path moveToPoint: CGPointMake(51.96, 19.05)]; - [bezier15Path addLineToPoint: CGPointMake(55.81, 19.05)]; - [bezier15Path addCurveToPoint: CGPointMake(57.51, 19.56) controlPoint1: CGPointMake(56.54, 19.05) controlPoint2: CGPointMake(57.13, 19.23)]; - [bezier15Path addCurveToPoint: CGPointMake(58.09, 20.99) controlPoint1: CGPointMake(57.89, 19.89) controlPoint2: CGPointMake(58.09, 20.36)]; - [bezier15Path addLineToPoint: CGPointMake(58.09, 21.02)]; - [bezier15Path addCurveToPoint: CGPointMake(58.07, 21.42) controlPoint1: CGPointMake(58.09, 21.14) controlPoint2: CGPointMake(58.09, 21.27)]; - [bezier15Path addCurveToPoint: CGPointMake(57.99, 21.85) controlPoint1: CGPointMake(58.04, 21.57) controlPoint2: CGPointMake(58.02, 21.7)]; - [bezier15Path addCurveToPoint: CGPointMake(56.83, 23.83) controlPoint1: CGPointMake(57.81, 22.68) controlPoint2: CGPointMake(57.43, 23.33)]; - [bezier15Path addCurveToPoint: CGPointMake(54.67, 24.58) controlPoint1: CGPointMake(56.22, 24.33) controlPoint2: CGPointMake(55.48, 24.58)]; - [bezier15Path addLineToPoint: CGPointMake(52.62, 24.58)]; - [bezier15Path addLineToPoint: CGPointMake(51.98, 27.7)]; - [bezier15Path addLineToPoint: CGPointMake(50.18, 27.7)]; - [bezier15Path addLineToPoint: CGPointMake(51.96, 19.05)]; - [bezier15Path closePath]; - [bezier15Path moveToPoint: CGPointMake(52.92, 23.05)]; - [bezier15Path addLineToPoint: CGPointMake(54.64, 23.05)]; - [bezier15Path addCurveToPoint: CGPointMake(55.71, 22.75) controlPoint1: CGPointMake(55.1, 23.05) controlPoint2: CGPointMake(55.45, 22.95)]; - [bezier15Path addCurveToPoint: CGPointMake(56.24, 21.79) controlPoint1: CGPointMake(55.96, 22.54) controlPoint2: CGPointMake(56.14, 22.22)]; - [bezier15Path addCurveToPoint: CGPointMake(56.26, 21.56) controlPoint1: CGPointMake(56.26, 21.72) controlPoint2: CGPointMake(56.26, 21.64)]; - [bezier15Path addCurveToPoint: CGPointMake(56.29, 21.39) controlPoint1: CGPointMake(56.26, 21.51) controlPoint2: CGPointMake(56.29, 21.44)]; - [bezier15Path addCurveToPoint: CGPointMake(55.96, 20.73) controlPoint1: CGPointMake(56.29, 21.08) controlPoint2: CGPointMake(56.19, 20.86)]; - [bezier15Path addCurveToPoint: CGPointMake(54.92, 20.53) controlPoint1: CGPointMake(55.73, 20.58) controlPoint2: CGPointMake(55.4, 20.53)]; - [bezier15Path addLineToPoint: CGPointMake(53.48, 20.53)]; - [bezier15Path addLineToPoint: CGPointMake(52.92, 23.05)]; - [bezier15Path closePath]; - bezier15Path.miterLimit = 4; - - [color setFill]; - [bezier15Path fill]; - - - //// Bezier 16 Drawing - UIBezierPath* bezier16Path = [UIBezierPath bezierPath]; - [bezier16Path moveToPoint: CGPointMake(66.13, 28.68)]; - [bezier16Path addCurveToPoint: CGPointMake(64.71, 30.89) controlPoint1: CGPointMake(65.57, 29.86) controlPoint2: CGPointMake(65.01, 30.56)]; - [bezier16Path addCurveToPoint: CGPointMake(62.25, 31.9) controlPoint1: CGPointMake(64.4, 31.22) controlPoint2: CGPointMake(63.77, 31.95)]; - [bezier16Path addLineToPoint: CGPointMake(62.38, 30.99)]; - [bezier16Path addCurveToPoint: CGPointMake(64.74, 28.08) controlPoint1: CGPointMake(63.64, 30.62) controlPoint2: CGPointMake(64.33, 28.86)]; - [bezier16Path addLineToPoint: CGPointMake(64.28, 22.37)]; - [bezier16Path addLineToPoint: CGPointMake(65.27, 22.35)]; - [bezier16Path addLineToPoint: CGPointMake(66.1, 22.35)]; - [bezier16Path addLineToPoint: CGPointMake(66.18, 25.92)]; - [bezier16Path addLineToPoint: CGPointMake(67.72, 22.35)]; - [bezier16Path addLineToPoint: CGPointMake(69.3, 22.35)]; - [bezier16Path addLineToPoint: CGPointMake(66.13, 28.68)]; - [bezier16Path closePath]; - bezier16Path.miterLimit = 4; - - [color setFill]; - [bezier16Path fill]; - - - //// Bezier 17 Drawing - UIBezierPath* bezier17Path = [UIBezierPath bezierPath]; - [bezier17Path moveToPoint: CGPointMake(61.74, 22.77)]; - [bezier17Path addLineToPoint: CGPointMake(61.11, 23.2)]; - [bezier17Path addCurveToPoint: CGPointMake(58.72, 22.9) controlPoint1: CGPointMake(60.45, 22.69) controlPoint2: CGPointMake(59.86, 22.4)]; - [bezier17Path addCurveToPoint: CGPointMake(60.15, 27.29) controlPoint1: CGPointMake(57.15, 23.62) controlPoint2: CGPointMake(55.86, 29.1)]; - [bezier17Path addLineToPoint: CGPointMake(60.4, 27.57)]; - [bezier17Path addLineToPoint: CGPointMake(62.1, 27.62)]; - [bezier17Path addLineToPoint: CGPointMake(63.21, 22.62)]; - [bezier17Path addLineToPoint: CGPointMake(61.74, 22.77)]; - [bezier17Path closePath]; - [bezier17Path moveToPoint: CGPointMake(60.78, 25.51)]; - [bezier17Path addCurveToPoint: CGPointMake(59.44, 26.69) controlPoint1: CGPointMake(60.5, 26.31) controlPoint2: CGPointMake(59.89, 26.82)]; - [bezier17Path addCurveToPoint: CGPointMake(59.06, 24.98) controlPoint1: CGPointMake(58.95, 26.54) controlPoint2: CGPointMake(58.8, 25.79)]; - [bezier17Path addCurveToPoint: CGPointMake(60.4, 23.8) controlPoint1: CGPointMake(59.34, 24.18) controlPoint2: CGPointMake(59.94, 23.68)]; - [bezier17Path addCurveToPoint: CGPointMake(60.78, 25.51) controlPoint1: CGPointMake(60.88, 23.95) controlPoint2: CGPointMake(61.06, 24.71)]; - [bezier17Path closePath]; - bezier17Path.miterLimit = 4; - - [color setFill]; - [bezier17Path fill]; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.h deleted file mode 100755 index fff4f3be..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIUnknownCardVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.m deleted file mode 100755 index 45d5badd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIUnknownCardVectorArtView.m +++ /dev/null @@ -1,306 +0,0 @@ -#import "BTUIUnknownCardVectorArtView.h" -#import "BTUI.h" - -@implementation BTUIUnknownCardVectorArtView - -- (void)drawArt { - - //// Color Declarations - UIColor* color2 = [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 0.099]; - UIColor* color1 = self.highlightColor ?: color2; - - //// Page-1 - { - //// Unknown - { - //// Card-# - { - //// CC-numbers - { - //// CC-number - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(6, 30)]; - [bezierPath addLineToPoint: CGPointMake(8, 30)]; - [bezierPath addLineToPoint: CGPointMake(8, 36)]; - [bezierPath addLineToPoint: CGPointMake(6, 36)]; - [bezierPath addLineToPoint: CGPointMake(6, 30)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(10, 30)]; - [bezier2Path addLineToPoint: CGPointMake(12, 30)]; - [bezier2Path addLineToPoint: CGPointMake(12, 36)]; - [bezier2Path addLineToPoint: CGPointMake(10, 36)]; - [bezier2Path addLineToPoint: CGPointMake(10, 30)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(14, 30)]; - [bezier3Path addLineToPoint: CGPointMake(16, 30)]; - [bezier3Path addLineToPoint: CGPointMake(16, 36)]; - [bezier3Path addLineToPoint: CGPointMake(14, 36)]; - [bezier3Path addLineToPoint: CGPointMake(14, 30)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(18, 30)]; - [bezier4Path addLineToPoint: CGPointMake(20, 30)]; - [bezier4Path addLineToPoint: CGPointMake(20, 36)]; - [bezier4Path addLineToPoint: CGPointMake(18, 36)]; - [bezier4Path addLineToPoint: CGPointMake(18, 30)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(26, 30)]; - [bezier5Path addLineToPoint: CGPointMake(28, 30)]; - [bezier5Path addLineToPoint: CGPointMake(28, 36)]; - [bezier5Path addLineToPoint: CGPointMake(26, 36)]; - [bezier5Path addLineToPoint: CGPointMake(26, 30)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier5Path fill]; - - - //// Bezier 6 Drawing - UIBezierPath* bezier6Path = [UIBezierPath bezierPath]; - [bezier6Path moveToPoint: CGPointMake(30, 30)]; - [bezier6Path addLineToPoint: CGPointMake(32, 30)]; - [bezier6Path addLineToPoint: CGPointMake(32, 36)]; - [bezier6Path addLineToPoint: CGPointMake(30, 36)]; - [bezier6Path addLineToPoint: CGPointMake(30, 30)]; - [bezier6Path closePath]; - bezier6Path.miterLimit = 4; - - bezier6Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier6Path fill]; - - - //// Bezier 7 Drawing - UIBezierPath* bezier7Path = [UIBezierPath bezierPath]; - [bezier7Path moveToPoint: CGPointMake(34, 30)]; - [bezier7Path addLineToPoint: CGPointMake(36, 30)]; - [bezier7Path addLineToPoint: CGPointMake(36, 36)]; - [bezier7Path addLineToPoint: CGPointMake(34, 36)]; - [bezier7Path addLineToPoint: CGPointMake(34, 30)]; - [bezier7Path closePath]; - bezier7Path.miterLimit = 4; - - bezier7Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier7Path fill]; - - - //// Bezier 8 Drawing - UIBezierPath* bezier8Path = [UIBezierPath bezierPath]; - [bezier8Path moveToPoint: CGPointMake(38, 30)]; - [bezier8Path addLineToPoint: CGPointMake(40, 30)]; - [bezier8Path addLineToPoint: CGPointMake(40, 36)]; - [bezier8Path addLineToPoint: CGPointMake(38, 36)]; - [bezier8Path addLineToPoint: CGPointMake(38, 30)]; - [bezier8Path closePath]; - bezier8Path.miterLimit = 4; - - bezier8Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier8Path fill]; - - - //// Bezier 9 Drawing - UIBezierPath* bezier9Path = [UIBezierPath bezierPath]; - [bezier9Path moveToPoint: CGPointMake(46, 30)]; - [bezier9Path addLineToPoint: CGPointMake(48, 30)]; - [bezier9Path addLineToPoint: CGPointMake(48, 36)]; - [bezier9Path addLineToPoint: CGPointMake(46, 36)]; - [bezier9Path addLineToPoint: CGPointMake(46, 30)]; - [bezier9Path closePath]; - bezier9Path.miterLimit = 4; - - bezier9Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier9Path fill]; - - - //// Bezier 10 Drawing - UIBezierPath* bezier10Path = [UIBezierPath bezierPath]; - [bezier10Path moveToPoint: CGPointMake(50, 30)]; - [bezier10Path addLineToPoint: CGPointMake(52, 30)]; - [bezier10Path addLineToPoint: CGPointMake(52, 36)]; - [bezier10Path addLineToPoint: CGPointMake(50, 36)]; - [bezier10Path addLineToPoint: CGPointMake(50, 30)]; - [bezier10Path closePath]; - bezier10Path.miterLimit = 4; - - bezier10Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier10Path fill]; - - - //// Bezier 11 Drawing - UIBezierPath* bezier11Path = [UIBezierPath bezierPath]; - [bezier11Path moveToPoint: CGPointMake(54, 30)]; - [bezier11Path addLineToPoint: CGPointMake(56, 30)]; - [bezier11Path addLineToPoint: CGPointMake(56, 36)]; - [bezier11Path addLineToPoint: CGPointMake(54, 36)]; - [bezier11Path addLineToPoint: CGPointMake(54, 30)]; - [bezier11Path closePath]; - bezier11Path.miterLimit = 4; - - bezier11Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier11Path fill]; - - - //// Bezier 12 Drawing - UIBezierPath* bezier12Path = [UIBezierPath bezierPath]; - [bezier12Path moveToPoint: CGPointMake(58, 30)]; - [bezier12Path addLineToPoint: CGPointMake(60, 30)]; - [bezier12Path addLineToPoint: CGPointMake(60, 36)]; - [bezier12Path addLineToPoint: CGPointMake(58, 36)]; - [bezier12Path addLineToPoint: CGPointMake(58, 30)]; - [bezier12Path closePath]; - bezier12Path.miterLimit = 4; - - bezier12Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier12Path fill]; - - - //// Bezier 13 Drawing - UIBezierPath* bezier13Path = [UIBezierPath bezierPath]; - [bezier13Path moveToPoint: CGPointMake(66, 30)]; - [bezier13Path addLineToPoint: CGPointMake(68, 30)]; - [bezier13Path addLineToPoint: CGPointMake(68, 36)]; - [bezier13Path addLineToPoint: CGPointMake(66, 36)]; - [bezier13Path addLineToPoint: CGPointMake(66, 30)]; - [bezier13Path closePath]; - bezier13Path.miterLimit = 4; - - bezier13Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier13Path fill]; - - - //// Bezier 14 Drawing - UIBezierPath* bezier14Path = [UIBezierPath bezierPath]; - [bezier14Path moveToPoint: CGPointMake(70, 30)]; - [bezier14Path addLineToPoint: CGPointMake(72, 30)]; - [bezier14Path addLineToPoint: CGPointMake(72, 36)]; - [bezier14Path addLineToPoint: CGPointMake(70, 36)]; - [bezier14Path addLineToPoint: CGPointMake(70, 30)]; - [bezier14Path closePath]; - bezier14Path.miterLimit = 4; - - bezier14Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier14Path fill]; - - - //// Bezier 15 Drawing - UIBezierPath* bezier15Path = [UIBezierPath bezierPath]; - [bezier15Path moveToPoint: CGPointMake(74, 30)]; - [bezier15Path addLineToPoint: CGPointMake(76, 30)]; - [bezier15Path addLineToPoint: CGPointMake(76, 36)]; - [bezier15Path addLineToPoint: CGPointMake(74, 36)]; - [bezier15Path addLineToPoint: CGPointMake(74, 30)]; - [bezier15Path closePath]; - bezier15Path.miterLimit = 4; - - bezier15Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier15Path fill]; - - - //// Bezier 16 Drawing - UIBezierPath* bezier16Path = [UIBezierPath bezierPath]; - [bezier16Path moveToPoint: CGPointMake(78, 30)]; - [bezier16Path addLineToPoint: CGPointMake(80, 30)]; - [bezier16Path addLineToPoint: CGPointMake(80, 36)]; - [bezier16Path addLineToPoint: CGPointMake(78, 36)]; - [bezier16Path addLineToPoint: CGPointMake(78, 30)]; - [bezier16Path closePath]; - bezier16Path.miterLimit = 4; - - bezier16Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier16Path fill]; - } - - - //// Rectangle Drawing - UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRect: CGRectMake(26, 42, 14, 2)]; - [color2 setFill]; - [rectanglePath fill]; - - - //// Rectangle 2 Drawing - UIBezierPath* rectangle2Path = [UIBezierPath bezierPathWithRect: CGRectMake(6, 46, 34, 2)]; - [color2 setFill]; - [rectangle2Path fill]; - } - - - //// Rounded Rectangle Drawing - UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(6, 6, 14, 14) cornerRadius: 0.75]; - [color2 setFill]; - [roundedRectanglePath fill]; - - - //// Rounded Rectangle 2 Drawing - UIBezierPath* roundedRectangle2Path = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(72, 40, 8, 8) cornerRadius: 0.75]; - [color2 setFill]; - [roundedRectangle2Path fill]; - } - } - } -} -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.h deleted file mode 100755 index 5e232168..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIVenmoMonogramCardView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.m deleted file mode 100755 index 18b86927..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoMonogramCardView.m +++ /dev/null @@ -1,36 +0,0 @@ -#import "BTUIVenmoMonogramCardView.h" - -@implementation BTUIVenmoMonogramCardView - -- (void)drawArt { - //// Color Declarations - UIColor* fillColor = [UIColor colorWithRed: 0.201 green: 0.463 blue: 0.682 alpha: 1]; - - //// Page-1 - { - //// Artboard-1 - { - //// Fill-1 Drawing - UIBezierPath* fill1Path = [UIBezierPath bezierPath]; - [fill1Path moveToPoint: CGPointMake(59.25, 9)]; - [fill1Path addCurveToPoint: CGPointMake(61.25, 16.65) controlPoint1: CGPointMake(60.63, 11.3) controlPoint2: CGPointMake(61.25, 13.66)]; - [fill1Path addCurveToPoint: CGPointMake(46.66, 47.26) controlPoint1: CGPointMake(61.25, 26.18) controlPoint2: CGPointMake(53.2, 38.57)]; - [fill1Path addLineToPoint: CGPointMake(31.74, 47.26)]; - [fill1Path addLineToPoint: CGPointMake(25.75, 11.09)]; - [fill1Path addLineToPoint: CGPointMake(38.82, 9.83)]; - [fill1Path addLineToPoint: CGPointMake(41.98, 35.57)]; - [fill1Path addCurveToPoint: CGPointMake(48.59, 17.84) controlPoint1: CGPointMake(44.94, 30.7) controlPoint2: CGPointMake(48.59, 23.05)]; - [fill1Path addCurveToPoint: CGPointMake(47.35, 11.43) controlPoint1: CGPointMake(48.59, 14.98) controlPoint2: CGPointMake(48.11, 13.04)]; - [fill1Path addLineToPoint: CGPointMake(59.25, 9)]; - [fill1Path closePath]; - fill1Path.miterLimit = 4; - - fill1Path.usesEvenOddFillRule = YES; - - [fillColor setFill]; - [fill1Path fill]; - } - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.h deleted file mode 100755 index 37c8059b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "BTUIVectorArtView.h" - -@interface BTUIVenmoWordmarkVectorArtView : BTUIVectorArtView - -@property (nonatomic, strong) UIColor *color; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.m deleted file mode 100755 index 9deb4c3f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVenmoWordmarkVectorArtView.m +++ /dev/null @@ -1,189 +0,0 @@ -#import "BTUIVenmoWordmarkVectorArtView.h" - -@implementation BTUIVenmoWordmarkVectorArtView - -- (id)init { - self = [super init]; - if (self) { - self.artDimensions = CGSizeMake(132, 88); - self.opaque = NO; - } - return self; -} - -- (void)setColor:(UIColor *)color { - _color = color; - [self setNeedsDisplay]; -} - -- (void)drawArt { - //// Color Declarations - UIColor* color = self.color; //[UIColor colorWithRed: 0.194 green: 0.507 blue: 0.764 alpha: 1]; - - //// Assets - { - //// button-venmo - { - //// Rectangle Drawing - - - //// logo/venmo - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(70.02, 53.98)]; - [bezierPath addCurveToPoint: CGPointMake(70.02, 52.78) controlPoint1: CGPointMake(70.02, 53.43) controlPoint2: CGPointMake(69.97, 53.09)]; - [bezierPath addCurveToPoint: CGPointMake(72.56, 36.46) controlPoint1: CGPointMake(70.87, 47.34) controlPoint2: CGPointMake(71.77, 41.9)]; - [bezierPath addCurveToPoint: CGPointMake(74.94, 34.44) controlPoint1: CGPointMake(72.87, 34.33) controlPoint2: CGPointMake(72.83, 34.43)]; - [bezierPath addCurveToPoint: CGPointMake(76.91, 34.43) controlPoint1: CGPointMake(75.59, 34.44) controlPoint2: CGPointMake(76.25, 34.48)]; - [bezierPath addCurveToPoint: CGPointMake(78.78, 35.72) controlPoint1: CGPointMake(77.84, 34.35) controlPoint2: CGPointMake(78.63, 34.46)]; - [bezierPath addCurveToPoint: CGPointMake(79.63, 35.35) controlPoint1: CGPointMake(79.13, 35.57) controlPoint2: CGPointMake(79.39, 35.49)]; - [bezierPath addCurveToPoint: CGPointMake(83.08, 34.11) controlPoint1: CGPointMake(80.7, 34.71) controlPoint2: CGPointMake(81.84, 34.3)]; - [bezierPath addCurveToPoint: CGPointMake(87.94, 35.56) controlPoint1: CGPointMake(84.94, 33.83) controlPoint2: CGPointMake(86.59, 34.13)]; - [bezierPath addCurveToPoint: CGPointMake(88.47, 35.99) controlPoint1: CGPointMake(88.08, 35.71) controlPoint2: CGPointMake(88.26, 35.82)]; - [bezierPath addCurveToPoint: CGPointMake(90.53, 34.9) controlPoint1: CGPointMake(89.16, 35.62) controlPoint2: CGPointMake(89.83, 35.22)]; - [bezierPath addCurveToPoint: CGPointMake(96.29, 34.23) controlPoint1: CGPointMake(92.38, 34.05) controlPoint2: CGPointMake(94.29, 33.75)]; - [bezierPath addCurveToPoint: CGPointMake(99, 37.48) controlPoint1: CGPointMake(97.97, 34.63) controlPoint2: CGPointMake(98.97, 35.72)]; - [bezierPath addCurveToPoint: CGPointMake(98.7, 41.97) controlPoint1: CGPointMake(99.02, 38.98) controlPoint2: CGPointMake(98.91, 40.49)]; - [bezierPath addCurveToPoint: CGPointMake(97.05, 52.6) controlPoint1: CGPointMake(98.2, 45.52) controlPoint2: CGPointMake(97.6, 49.06)]; - [bezierPath addCurveToPoint: CGPointMake(95.52, 53.99) controlPoint1: CGPointMake(96.84, 53.93) controlPoint2: CGPointMake(96.8, 53.99)]; - [bezierPath addCurveToPoint: CGPointMake(91.7, 53.99) controlPoint1: CGPointMake(94.24, 54) controlPoint2: CGPointMake(92.97, 54)]; - [bezierPath addCurveToPoint: CGPointMake(90.47, 53.9) controlPoint1: CGPointMake(91.34, 53.99) controlPoint2: CGPointMake(90.98, 53.94)]; - [bezierPath addCurveToPoint: CGPointMake(90.55, 52.4) controlPoint1: CGPointMake(90.5, 53.35) controlPoint2: CGPointMake(90.48, 52.87)]; - [bezierPath addCurveToPoint: CGPointMake(92.22, 41.39) controlPoint1: CGPointMake(91.1, 48.73) controlPoint2: CGPointMake(91.66, 45.06)]; - [bezierPath addCurveToPoint: CGPointMake(92.28, 40.52) controlPoint1: CGPointMake(92.26, 41.1) controlPoint2: CGPointMake(92.32, 40.8)]; - [bezierPath addCurveToPoint: CGPointMake(91.24, 39.51) controlPoint1: CGPointMake(92.21, 39.89) controlPoint2: CGPointMake(91.84, 39.46)]; - [bezierPath addCurveToPoint: CGPointMake(89.13, 40.07) controlPoint1: CGPointMake(90.52, 39.58) controlPoint2: CGPointMake(89.78, 39.77)]; - [bezierPath addCurveToPoint: CGPointMake(88.65, 41.13) controlPoint1: CGPointMake(88.86, 40.2) controlPoint2: CGPointMake(88.71, 40.75)]; - [bezierPath addCurveToPoint: CGPointMake(87.43, 48.92) controlPoint1: CGPointMake(88.22, 43.72) controlPoint2: CGPointMake(87.83, 46.32)]; - [bezierPath addCurveToPoint: CGPointMake(86.63, 53.9) controlPoint1: CGPointMake(87.17, 50.56) controlPoint2: CGPointMake(86.91, 52.2)]; - [bezierPath addLineToPoint: CGPointMake(80.17, 53.9)]; - [bezierPath addCurveToPoint: CGPointMake(80.62, 50.53) controlPoint1: CGPointMake(80.33, 52.73) controlPoint2: CGPointMake(80.45, 51.62)]; - [bezierPath addCurveToPoint: CGPointMake(81.96, 42.12) controlPoint1: CGPointMake(81.06, 47.72) controlPoint2: CGPointMake(81.52, 44.93)]; - [bezierPath addCurveToPoint: CGPointMake(82.02, 40.63) controlPoint1: CGPointMake(82.03, 41.63) controlPoint2: CGPointMake(82.08, 41.12)]; - [bezierPath addCurveToPoint: CGPointMake(81.53, 39.69) controlPoint1: CGPointMake(81.97, 40.29) controlPoint2: CGPointMake(81.79, 39.88)]; - [bezierPath addCurveToPoint: CGPointMake(78.43, 40.93) controlPoint1: CGPointMake(80.64, 39.03) controlPoint2: CGPointMake(78.64, 39.84)]; - [bezierPath addCurveToPoint: CGPointMake(77.86, 44.51) controlPoint1: CGPointMake(78.2, 42.12) controlPoint2: CGPointMake(78.04, 43.32)]; - [bezierPath addCurveToPoint: CGPointMake(76.58, 53.05) controlPoint1: CGPointMake(77.43, 47.36) controlPoint2: CGPointMake(77, 50.2)]; - [bezierPath addCurveToPoint: CGPointMake(75.81, 53.98) controlPoint1: CGPointMake(76.51, 53.55) controlPoint2: CGPointMake(76.4, 53.97)]; - [bezierPath addCurveToPoint: CGPointMake(70.02, 53.98) controlPoint1: CGPointMake(73.93, 53.98) controlPoint2: CGPointMake(72.05, 53.98)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(65.64, 53.85)]; - [bezierPath addCurveToPoint: CGPointMake(59.25, 53.73) controlPoint1: CGPointMake(64, 54.09) controlPoint2: CGPointMake(60.19, 54.03)]; - [bezierPath addCurveToPoint: CGPointMake(59.71, 50.43) controlPoint1: CGPointMake(59.4, 52.64) controlPoint2: CGPointMake(59.54, 51.53)]; - [bezierPath addCurveToPoint: CGPointMake(61.06, 41.78) controlPoint1: CGPointMake(60.16, 47.55) controlPoint2: CGPointMake(60.61, 44.67)]; - [bezierPath addCurveToPoint: CGPointMake(58.66, 39.69) controlPoint1: CGPointMake(61.39, 39.72) controlPoint2: CGPointMake(60.6, 39.04)]; - [bezierPath addCurveToPoint: CGPointMake(57.43, 41.2) controlPoint1: CGPointMake(57.9, 39.94) controlPoint2: CGPointMake(57.55, 40.4)]; - [bezierPath addCurveToPoint: CGPointMake(55.71, 52.57) controlPoint1: CGPointMake(56.88, 45) controlPoint2: CGPointMake(56.29, 48.78)]; - [bezierPath addCurveToPoint: CGPointMake(54.19, 53.98) controlPoint1: CGPointMake(55.51, 53.92) controlPoint2: CGPointMake(55.46, 53.97)]; - [bezierPath addCurveToPoint: CGPointMake(49, 53.98) controlPoint1: CGPointMake(52.51, 53.99) controlPoint2: CGPointMake(50.84, 53.98)]; - [bezierPath addCurveToPoint: CGPointMake(49.38, 50.94) controlPoint1: CGPointMake(49.13, 52.89) controlPoint2: CGPointMake(49.22, 51.91)]; - [bezierPath addCurveToPoint: CGPointMake(51.46, 37.73) controlPoint1: CGPointMake(50.06, 46.54) controlPoint2: CGPointMake(50.76, 42.14)]; - [bezierPath addCurveToPoint: CGPointMake(51.8, 35.38) controlPoint1: CGPointMake(51.58, 36.95) controlPoint2: CGPointMake(51.71, 36.17)]; - [bezierPath addCurveToPoint: CGPointMake(52.73, 34.45) controlPoint1: CGPointMake(51.86, 34.79) controlPoint2: CGPointMake(52.12, 34.45)]; - [bezierPath addCurveToPoint: CGPointMake(56.91, 34.44) controlPoint1: CGPointMake(54.12, 34.45) controlPoint2: CGPointMake(55.52, 34.47)]; - [bezierPath addCurveToPoint: CGPointMake(57.91, 35.69) controlPoint1: CGPointMake(57.69, 34.43) controlPoint2: CGPointMake(57.61, 35.12)]; - [bezierPath addCurveToPoint: CGPointMake(59.21, 35.06) controlPoint1: CGPointMake(58.36, 35.47) controlPoint2: CGPointMake(58.79, 35.27)]; - [bezierPath addCurveToPoint: CGPointMake(65.29, 34.26) controlPoint1: CGPointMake(61.15, 34.1) controlPoint2: CGPointMake(63.16, 33.69)]; - [bezierPath addCurveToPoint: CGPointMake(67.84, 37) controlPoint1: CGPointMake(66.7, 34.64) controlPoint2: CGPointMake(67.49, 35.55)]; - [bezierPath addCurveToPoint: CGPointMake(67.73, 40.97) controlPoint1: CGPointMake(68.17, 38.36) controlPoint2: CGPointMake(67.92, 39.67)]; - [bezierPath addCurveToPoint: CGPointMake(65.8, 53.33) controlPoint1: CGPointMake(67.14, 45.1) controlPoint2: CGPointMake(66.45, 49.21)]; - [bezierPath addCurveToPoint: CGPointMake(65.64, 53.85) controlPoint1: CGPointMake(65.77, 53.49) controlPoint2: CGPointMake(65.71, 53.64)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(118.98, 42.12)]; - [bezierPath addCurveToPoint: CGPointMake(117.38, 48.99) controlPoint1: CGPointMake(119.11, 44.56) controlPoint2: CGPointMake(118.6, 46.87)]; - [bezierPath addCurveToPoint: CGPointMake(108.97, 54) controlPoint1: CGPointMake(115.52, 52.2) controlPoint2: CGPointMake(112.75, 53.97)]; - [bezierPath addCurveToPoint: CGPointMake(105.76, 53.8) controlPoint1: CGPointMake(107.9, 54) controlPoint2: CGPointMake(106.8, 54.02)]; - [bezierPath addCurveToPoint: CGPointMake(101.19, 49.25) controlPoint1: CGPointMake(103.3, 53.26) controlPoint2: CGPointMake(101.73, 51.62)]; - [bezierPath addCurveToPoint: CGPointMake(102.47, 38.85) controlPoint1: CGPointMake(100.37, 45.67) controlPoint2: CGPointMake(100.59, 42.13)]; - [bezierPath addCurveToPoint: CGPointMake(109.3, 34.21) controlPoint1: CGPointMake(103.99, 36.22) controlPoint2: CGPointMake(106.29, 34.71)]; - [bezierPath addCurveToPoint: CGPointMake(113.49, 34.2) controlPoint1: CGPointMake(110.7, 33.97) controlPoint2: CGPointMake(112.08, 33.96)]; - [bezierPath addCurveToPoint: CGPointMake(118.97, 40.15) controlPoint1: CGPointMake(116.67, 34.74) controlPoint2: CGPointMake(118.72, 36.92)]; - [bezierPath addCurveToPoint: CGPointMake(118.98, 42.12) controlPoint1: CGPointMake(119.02, 40.8) controlPoint2: CGPointMake(118.98, 41.46)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(107.37, 45.48)]; - [bezierPath addCurveToPoint: CGPointMake(107.54, 45.5) controlPoint1: CGPointMake(107.43, 45.48) controlPoint2: CGPointMake(107.48, 45.49)]; - [bezierPath addCurveToPoint: CGPointMake(107.55, 47.1) controlPoint1: CGPointMake(107.54, 46.04) controlPoint2: CGPointMake(107.5, 46.57)]; - [bezierPath addCurveToPoint: CGPointMake(108.89, 48.99) controlPoint1: CGPointMake(107.64, 48.09) controlPoint2: CGPointMake(108.18, 48.82)]; - [bezierPath addCurveToPoint: CGPointMake(110.96, 47.92) controlPoint1: CGPointMake(109.58, 49.16) controlPoint2: CGPointMake(110.4, 48.74)]; - [bezierPath addCurveToPoint: CGPointMake(111.09, 47.71) controlPoint1: CGPointMake(111, 47.85) controlPoint2: CGPointMake(111.05, 47.79)]; - [bezierPath addCurveToPoint: CGPointMake(112.18, 40.52) controlPoint1: CGPointMake(112.23, 45.43) controlPoint2: CGPointMake(112.51, 43.02)]; - [bezierPath addCurveToPoint: CGPointMake(111.11, 39.14) controlPoint1: CGPointMake(112.1, 39.9) controlPoint2: CGPointMake(111.81, 39.33)]; - [bezierPath addCurveToPoint: CGPointMake(109.2, 39.73) controlPoint1: CGPointMake(110.36, 38.95) controlPoint2: CGPointMake(109.66, 39.14)]; - [bezierPath addCurveToPoint: CGPointMake(108.08, 41.75) controlPoint1: CGPointMake(108.73, 40.33) controlPoint2: CGPointMake(108.29, 41.03)]; - [bezierPath addCurveToPoint: CGPointMake(107.37, 45.48) controlPoint1: CGPointMake(107.74, 42.96) controlPoint2: CGPointMake(107.6, 44.23)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(12, 35.08)]; - [bezierPath addCurveToPoint: CGPointMake(13.83, 34.83) controlPoint1: CGPointMake(12.73, 34.98) controlPoint2: CGPointMake(13.28, 34.89)]; - [bezierPath addCurveToPoint: CGPointMake(17.44, 34.46) controlPoint1: CGPointMake(15.03, 34.69) controlPoint2: CGPointMake(16.24, 34.55)]; - [bezierPath addCurveToPoint: CGPointMake(18.72, 35.54) controlPoint1: CGPointMake(18.39, 34.39) controlPoint2: CGPointMake(18.6, 34.58)]; - [bezierPath addCurveToPoint: CGPointMake(19.75, 44.26) controlPoint1: CGPointMake(19.08, 38.45) controlPoint2: CGPointMake(19.4, 41.36)]; - [bezierPath addCurveToPoint: CGPointMake(20.28, 47.47) controlPoint1: CGPointMake(19.87, 45.33) controlPoint2: CGPointMake(20.02, 46.39)]; - [bezierPath addCurveToPoint: CGPointMake(23.06, 41.7) controlPoint1: CGPointMake(21.55, 45.7) controlPoint2: CGPointMake(22.38, 43.74)]; - [bezierPath addCurveToPoint: CGPointMake(23.16, 35.38) controlPoint1: CGPointMake(23.75, 39.62) controlPoint2: CGPointMake(23.88, 37.53)]; - [bezierPath addCurveToPoint: CGPointMake(23.98, 34.99) controlPoint1: CGPointMake(23.49, 35.22) controlPoint2: CGPointMake(23.72, 35.05)]; - [bezierPath addCurveToPoint: CGPointMake(28.25, 34.07) controlPoint1: CGPointMake(25.4, 34.67) controlPoint2: CGPointMake(26.82, 34.36)]; - [bezierPath addCurveToPoint: CGPointMake(29.46, 34.73) controlPoint1: CGPointMake(29.01, 33.91) controlPoint2: CGPointMake(29.17, 33.97)]; - [bezierPath addCurveToPoint: CGPointMake(29.93, 36.66) controlPoint1: CGPointMake(29.69, 35.35) controlPoint2: CGPointMake(29.86, 36.01)]; - [bezierPath addCurveToPoint: CGPointMake(28.75, 43.64) controlPoint1: CGPointMake(30.19, 39.1) controlPoint2: CGPointMake(29.68, 41.41)]; - [bezierPath addCurveToPoint: CGPointMake(23.03, 53.4) controlPoint1: CGPointMake(27.27, 47.16) controlPoint2: CGPointMake(25.23, 50.33)]; - [bezierPath addCurveToPoint: CGPointMake(22.17, 53.97) controlPoint1: CGPointMake(22.84, 53.67) controlPoint2: CGPointMake(22.46, 53.96)]; - [bezierPath addCurveToPoint: CGPointMake(15.03, 54) controlPoint1: CGPointMake(19.83, 54.02) controlPoint2: CGPointMake(17.49, 54)]; - [bezierPath addCurveToPoint: CGPointMake(13.49, 44.53) controlPoint1: CGPointMake(14.51, 50.78) controlPoint2: CGPointMake(13.99, 47.65)]; - [bezierPath addCurveToPoint: CGPointMake(12, 35.08) controlPoint1: CGPointMake(12.99, 41.41) controlPoint2: CGPointMake(12.4, 38.31)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(38.37, 45.72)]; - [bezierPath addCurveToPoint: CGPointMake(41.21, 48.8) controlPoint1: CGPointMake(38.38, 47.8) controlPoint2: CGPointMake(39.3, 48.75)]; - [bezierPath addCurveToPoint: CGPointMake(45.43, 47.88) controlPoint1: CGPointMake(42.69, 48.84) controlPoint2: CGPointMake(44.07, 48.4)]; - [bezierPath addCurveToPoint: CGPointMake(46.75, 47.34) controlPoint1: CGPointMake(45.8, 47.73) controlPoint2: CGPointMake(46.18, 47.57)]; - [bezierPath addCurveToPoint: CGPointMake(45.97, 52.45) controlPoint1: CGPointMake(46.49, 49.15) controlPoint2: CGPointMake(46.28, 50.81)]; - [bezierPath addCurveToPoint: CGPointMake(45.18, 53.12) controlPoint1: CGPointMake(45.92, 52.72) controlPoint2: CGPointMake(45.5, 53.03)]; - [bezierPath addCurveToPoint: CGPointMake(42.05, 53.85) controlPoint1: CGPointMake(44.15, 53.42) controlPoint2: CGPointMake(43.11, 53.75)]; - [bezierPath addCurveToPoint: CGPointMake(37.72, 53.88) controlPoint1: CGPointMake(40.62, 53.98) controlPoint2: CGPointMake(39.14, 54.06)]; - [bezierPath addCurveToPoint: CGPointMake(31.74, 47.78) controlPoint1: CGPointMake(34.3, 53.45) controlPoint2: CGPointMake(32.15, 51.27)]; - [bezierPath addCurveToPoint: CGPointMake(34.04, 38.05) controlPoint1: CGPointMake(31.32, 44.29) controlPoint2: CGPointMake(31.95, 40.99)]; - [bezierPath addCurveToPoint: CGPointMake(44.6, 34.35) controlPoint1: CGPointMake(36.45, 34.65) controlPoint2: CGPointMake(40.9, 33.31)]; - [bezierPath addCurveToPoint: CGPointMake(46.79, 42.8) controlPoint1: CGPointMake(48.43, 35.42) controlPoint2: CGPointMake(49.6, 39.99)]; - [bezierPath addCurveToPoint: CGPointMake(41.48, 45.3) controlPoint1: CGPointMake(45.32, 44.27) controlPoint2: CGPointMake(43.45, 44.9)]; - [bezierPath addCurveToPoint: CGPointMake(38.37, 45.72) controlPoint1: CGPointMake(40.48, 45.5) controlPoint2: CGPointMake(39.45, 45.58)]; - [bezierPath closePath]; - [bezierPath moveToPoint: CGPointMake(38.49, 42.08)]; - [bezierPath addCurveToPoint: CGPointMake(42.3, 40.96) controlPoint1: CGPointMake(40.01, 42.18) controlPoint2: CGPointMake(41.22, 41.79)]; - [bezierPath addCurveToPoint: CGPointMake(42.73, 40.36) controlPoint1: CGPointMake(42.49, 40.82) controlPoint2: CGPointMake(42.63, 40.58)]; - [bezierPath addCurveToPoint: CGPointMake(42.52, 38.87) controlPoint1: CGPointMake(42.96, 39.83) controlPoint2: CGPointMake(42.92, 39.31)]; - [bezierPath addCurveToPoint: CGPointMake(41.16, 38.52) controlPoint1: CGPointMake(42.16, 38.46) controlPoint2: CGPointMake(41.68, 38.36)]; - [bezierPath addCurveToPoint: CGPointMake(40.36, 38.85) controlPoint1: CGPointMake(40.88, 38.6) controlPoint2: CGPointMake(40.59, 38.69)]; - [bezierPath addCurveToPoint: CGPointMake(38.49, 42.08) controlPoint1: CGPointMake(39.31, 39.6) controlPoint2: CGPointMake(38.62, 40.57)]; - [bezierPath addLineToPoint: CGPointMake(38.49, 42.08)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color setFill]; - [bezierPath fill]; - } - } - } -} - -- (void)updateConstraints { - NSLayoutConstraint *aspectRatioConstraint = [NSLayoutConstraint constraintWithItem:self - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationEqual - toItem:self - attribute:NSLayoutAttributeHeight - multiplier:(self.artDimensions.width / self.artDimensions.height) - constant:0.0f]; - aspectRatioConstraint.priority = UILayoutPriorityRequired; - - [self addConstraint:aspectRatioConstraint]; - - [super updateConstraints]; -} - -- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(__unused UILayoutConstraintAxis)axis { - return UILayoutPriorityRequired; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.h deleted file mode 100755 index 85165937..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BTUICardVectorArtView.h" - -@interface BTUIVisaVectorArtView : BTUICardVectorArtView - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.m deleted file mode 100755 index 4ff958a3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUI/Views/Vector Art/BTUIVisaVectorArtView.m +++ /dev/null @@ -1,128 +0,0 @@ -#import "BTUIVisaVectorArtView.h" - -@implementation BTUIVisaVectorArtView - -- (void)drawArt { - //// Color Declarations - UIColor* color2 = [UIColor colorWithRed: 0.914 green: 0.555 blue: 0.193 alpha: 1]; - UIColor* color1 = [UIColor colorWithRed: 0.033 green: 0.277 blue: 0.542 alpha: 1]; - - //// Page-1 - { - //// Visa - { - //// Group 3 - { - //// Bezier Drawing - UIBezierPath* bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint: CGPointMake(37.45, 38.09)]; - [bezierPath addLineToPoint: CGPointMake(32.1, 38.09)]; - [bezierPath addLineToPoint: CGPointMake(35.45, 17)]; - [bezierPath addLineToPoint: CGPointMake(40.8, 17)]; - [bezierPath addLineToPoint: CGPointMake(37.45, 38.09)]; - [bezierPath closePath]; - bezierPath.miterLimit = 4; - - bezierPath.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezierPath fill]; - - - //// Bezier 2 Drawing - UIBezierPath* bezier2Path = [UIBezierPath bezierPath]; - [bezier2Path moveToPoint: CGPointMake(27.58, 17)]; - [bezier2Path addLineToPoint: CGPointMake(22.48, 31.5)]; - [bezier2Path addLineToPoint: CGPointMake(21.88, 28.38)]; - [bezier2Path addLineToPoint: CGPointMake(21.88, 28.38)]; - [bezier2Path addLineToPoint: CGPointMake(20.07, 18.9)]; - [bezier2Path addCurveToPoint: CGPointMake(17.53, 17) controlPoint1: CGPointMake(20.07, 18.9) controlPoint2: CGPointMake(19.86, 17)]; - [bezier2Path addLineToPoint: CGPointMake(9.1, 17)]; - [bezier2Path addLineToPoint: CGPointMake(9, 17.36)]; - [bezier2Path addCurveToPoint: CGPointMake(14.6, 19.77) controlPoint1: CGPointMake(9, 17.36) controlPoint2: CGPointMake(11.58, 17.91)]; - [bezier2Path addLineToPoint: CGPointMake(19.25, 38.09)]; - [bezier2Path addLineToPoint: CGPointMake(24.83, 38.09)]; - [bezier2Path addLineToPoint: CGPointMake(33.34, 17)]; - [bezier2Path addLineToPoint: CGPointMake(27.58, 17)]; - [bezier2Path closePath]; - bezier2Path.miterLimit = 4; - - bezier2Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier2Path fill]; - - - //// Bezier 3 Drawing - UIBezierPath* bezier3Path = [UIBezierPath bezierPath]; - [bezier3Path moveToPoint: CGPointMake(63.99, 30.63)]; - [bezier3Path addLineToPoint: CGPointMake(66.8, 22.74)]; - [bezier3Path addLineToPoint: CGPointMake(68.38, 30.63)]; - [bezier3Path addLineToPoint: CGPointMake(63.99, 30.63)]; - [bezier3Path addLineToPoint: CGPointMake(63.99, 30.63)]; - [bezier3Path addLineToPoint: CGPointMake(63.99, 30.63)]; - [bezier3Path addLineToPoint: CGPointMake(63.99, 30.63)]; - [bezier3Path closePath]; - [bezier3Path moveToPoint: CGPointMake(69.88, 38.09)]; - [bezier3Path addLineToPoint: CGPointMake(74.79, 38.09)]; - [bezier3Path addLineToPoint: CGPointMake(70.51, 17)]; - [bezier3Path addLineToPoint: CGPointMake(66.2, 17)]; - [bezier3Path addCurveToPoint: CGPointMake(63.73, 18.57) controlPoint1: CGPointMake(64.22, 17) controlPoint2: CGPointMake(63.73, 18.57)]; - [bezier3Path addLineToPoint: CGPointMake(55.75, 38.09)]; - [bezier3Path addLineToPoint: CGPointMake(61.33, 38.09)]; - [bezier3Path addLineToPoint: CGPointMake(62.45, 34.96)]; - [bezier3Path addLineToPoint: CGPointMake(69.25, 34.96)]; - [bezier3Path addLineToPoint: CGPointMake(69.88, 38.09)]; - [bezier3Path addLineToPoint: CGPointMake(69.88, 38.09)]; - [bezier3Path closePath]; - bezier3Path.miterLimit = 4; - - bezier3Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier3Path fill]; - - - //// Bezier 4 Drawing - UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; - [bezier4Path moveToPoint: CGPointMake(56.14, 22.45)]; - [bezier4Path addLineToPoint: CGPointMake(56.9, 17.92)]; - [bezier4Path addCurveToPoint: CGPointMake(52.09, 17) controlPoint1: CGPointMake(56.9, 17.92) controlPoint2: CGPointMake(54.55, 17)]; - [bezier4Path addCurveToPoint: CGPointMake(43.12, 23.98) controlPoint1: CGPointMake(49.43, 17) controlPoint2: CGPointMake(43.12, 18.19)]; - [bezier4Path addCurveToPoint: CGPointMake(50.53, 32.36) controlPoint1: CGPointMake(43.12, 29.43) controlPoint2: CGPointMake(50.53, 29.5)]; - [bezier4Path addCurveToPoint: CGPointMake(41.7, 32.9) controlPoint1: CGPointMake(50.53, 35.22) controlPoint2: CGPointMake(43.89, 34.71)]; - [bezier4Path addLineToPoint: CGPointMake(40.9, 37.64)]; - [bezier4Path addCurveToPoint: CGPointMake(46.94, 38.83) controlPoint1: CGPointMake(40.9, 37.64) controlPoint2: CGPointMake(43.29, 38.83)]; - [bezier4Path addCurveToPoint: CGPointMake(56.11, 31.61) controlPoint1: CGPointMake(50.6, 38.83) controlPoint2: CGPointMake(56.11, 36.89)]; - [bezier4Path addCurveToPoint: CGPointMake(48.64, 23.23) controlPoint1: CGPointMake(56.11, 26.13) controlPoint2: CGPointMake(48.64, 25.62)]; - [bezier4Path addCurveToPoint: CGPointMake(56.14, 22.45) controlPoint1: CGPointMake(48.64, 20.85) controlPoint2: CGPointMake(53.85, 21.15)]; - [bezier4Path closePath]; - bezier4Path.miterLimit = 4; - - bezier4Path.usesEvenOddFillRule = YES; - - [color1 setFill]; - [bezier4Path fill]; - - - //// Bezier 5 Drawing - UIBezierPath* bezier5Path = [UIBezierPath bezierPath]; - [bezier5Path moveToPoint: CGPointMake(21.88, 28.38)]; - [bezier5Path addLineToPoint: CGPointMake(20.07, 18.9)]; - [bezier5Path addCurveToPoint: CGPointMake(17.53, 17) controlPoint1: CGPointMake(20.07, 18.9) controlPoint2: CGPointMake(19.86, 17)]; - [bezier5Path addLineToPoint: CGPointMake(9.1, 17)]; - [bezier5Path addLineToPoint: CGPointMake(9, 17.36)]; - [bezier5Path addCurveToPoint: CGPointMake(16.95, 21.45) controlPoint1: CGPointMake(9, 17.36) controlPoint2: CGPointMake(13.06, 18.22)]; - [bezier5Path addCurveToPoint: CGPointMake(21.88, 28.38) controlPoint1: CGPointMake(20.66, 24.53) controlPoint2: CGPointMake(21.88, 28.38)]; - [bezier5Path closePath]; - bezier5Path.miterLimit = 4; - - bezier5Path.usesEvenOddFillRule = YES; - - [color2 setFill]; - [bezier5Path fill]; - } - } - } -} -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardCapabilities.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardCapabilities.m deleted file mode 100755 index d54d9f14..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardCapabilities.m +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTCardCapabilities.h" - -@implementation BTCardCapabilities - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ isUnionPay = %@, isDebit = %@, isSupported = %@, supportsTwoStepAuthAndCapture = %@", [super description], @(self.isUnionPay), @(self.isDebit), @(self.isSupported), @(self.supportsTwoStepAuthAndCapture)]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardClient+UnionPay.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardClient+UnionPay.m deleted file mode 100755 index 0a2b82b2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTCardClient+UnionPay.m +++ /dev/null @@ -1,140 +0,0 @@ -#import "BTCardClient+UnionPay.h" -#import "BTCardCapabilities.h" -#import "BTConfiguration+UnionPay.h" -#if __has_include("BraintreeCore.h") -#import "BTAPIClient_Internal.h" -#import "BTCardClient_Internal.h" -#import "BTCardRequest.h" -#else -#import -#import -#import -#endif - -@implementation BTCardClient (UnionPay) - -+ (void)load { - if (self == [BTCardClient class]) { - [[BTTokenizationService sharedService] registerType:@"UnionPayCard" withTokenizationBlock:^(BTAPIClient * _Nonnull apiClient, NSDictionary * _Nullable options, void (^completion)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error)) { - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [[BTCard alloc] initWithParameters:options]; - BTCardRequest *request = [[BTCardRequest alloc] initWithCard:card]; - request.mobileCountryCode = options[@"mobileCountryCode"]; - request.smsCode = options[@"smsCode"]; - - [client tokenizeCard:request options:nil completion:completion]; - }]; - } -} - -#pragma mark - Public methods - -- (void)fetchCapabilities:(NSString *)cardNumber - completion:(void (^)(BTCardCapabilities * _Nullable, NSError * _Nullable))completion -{ - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - completion(nil, error); - return; - } - - if (!configuration.isUnionPayEnabled) { - NSError *error = [NSError errorWithDomain:BTCardClientErrorDomain code:BTCardClientErrorTypePaymentOptionNotEnabled userInfo:@{NSLocalizedDescriptionKey: @"UnionPay is not enabled for this merchant"}]; - completion(nil, error); - return; - } - - [self.apiClient GET:@"v1/payment_methods/credit_cards/capabilities" - parameters:@{@"credit_card[number]" : cardNumber} - completion:^(BTJSON * _Nullable body, __unused NSHTTPURLResponse * _Nullable response, NSError * _Nullable error) - { - if (error) { - [self sendUnionPayEvent:@"capabilities-failed"]; - completion(nil, error); - } else { - [self sendUnionPayEvent:@"capabilities-received"]; - - BTCardCapabilities *cardCapabilities = [[BTCardCapabilities alloc] init]; - cardCapabilities.isUnionPay = [body[@"isUnionPay"] isTrue]; - cardCapabilities.isDebit = [body[@"isDebit"] isTrue]; - cardCapabilities.supportsTwoStepAuthAndCapture = [body[@"unionPay"][@"supportsTwoStepAuthAndCapture"] isTrue]; - cardCapabilities.isSupported = [body[@"unionPay"][@"isSupported"] isTrue]; - completion(cardCapabilities, nil); - } - }]; - }]; -} - -- (void)enrollCard:(BTCardRequest *)request - completion:(nonnull void (^)(NSString * _Nullable, BOOL, NSError * _Nullable))completion -{ - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - [self invokeBlock:completion onMainThreadWithEnrollmentID:nil smsCodeRequired:NO error:error]; - return; - } - - if (!configuration.isUnionPayEnabled) { - NSError *error = [NSError errorWithDomain:BTCardClientErrorDomain code:BTCardClientErrorTypePaymentOptionNotEnabled userInfo:@{NSLocalizedDescriptionKey: @"UnionPay is not enabled for this merchant"}]; - [self invokeBlock:completion onMainThreadWithEnrollmentID:nil smsCodeRequired:NO error:error]; - return; - } - - NSMutableDictionary *enrollmentParameters = [NSMutableDictionary dictionary]; - BTCard *card = request.card; - if (card.number) { - enrollmentParameters[@"number"] = card.number; - } - if (card.expirationMonth) { - enrollmentParameters[@"expiration_month"] = card.expirationMonth; - } - if (card.expirationYear) { - enrollmentParameters[@"expiration_year"] = card.expirationYear; - } - if (request.mobileCountryCode) { - enrollmentParameters[@"mobile_country_code"] = request.mobileCountryCode; - } - if (request.mobilePhoneNumber) { - enrollmentParameters[@"mobile_number"] = request.mobilePhoneNumber; - } - - [self.apiClient POST:@"v1/union_pay_enrollments" - parameters:@{ @"union_pay_enrollment": enrollmentParameters } - completion:^(BTJSON * _Nullable body, __unused NSHTTPURLResponse * _Nullable response, NSError * _Nullable error) - { - if (error) { - [self sendUnionPayEvent:@"enrollment-failed"]; - - NSError *callbackError = error; - NSHTTPURLResponse *response = error.userInfo[BTHTTPURLResponseKey]; - if (response.statusCode == 422) { - callbackError = [NSError errorWithDomain:BTCardClientErrorDomain - code:BTCardClientErrorTypeCustomerInputInvalid - userInfo:[self.class validationErrorUserInfo:error.userInfo]]; - } - - [self invokeBlock:completion onMainThreadWithEnrollmentID:nil smsCodeRequired:NO error:callbackError]; - return; - } - - [self sendUnionPayEvent:@"enrollment-succeeded"]; - BOOL smsCodeRequired = ![body[@"smsCodeRequired"] isNull] && [body[@"smsCodeRequired"] isTrue]; - [self invokeBlock:completion onMainThreadWithEnrollmentID:[body[@"unionPayEnrollmentId"] asString] smsCodeRequired:smsCodeRequired error:nil]; - }]; - }]; -} - -#pragma mark - Helper methods - -- (void)invokeBlock:(nonnull void (^)(NSString * _Nullable, BOOL, NSError * _Nullable))completion onMainThreadWithEnrollmentID:(nullable NSString *)enrollmentID smsCodeRequired:(BOOL)smsCodeRequired error:(nullable NSError *)error { - dispatch_async(dispatch_get_main_queue(), ^{ - completion(enrollmentID, smsCodeRequired, error); - }); -} - -- (void)sendUnionPayEvent:(nonnull NSString *)event { - NSString *fullEvent = [NSString stringWithFormat:@"ios.%@.unionpay.%@", self.apiClient.metadata.integrationString, event]; - [self.apiClient sendAnalyticsEvent:fullEvent]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTConfiguration+UnionPay.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTConfiguration+UnionPay.m deleted file mode 100755 index 2e897ea8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/BTConfiguration+UnionPay.m +++ /dev/null @@ -1,9 +0,0 @@ -#import "BTConfiguration+UnionPay.h" - -@implementation BTConfiguration (UnionPay) - -- (BOOL)isUnionPayEnabled { - return [self.json[@"unionPay"][@"enabled"] isTrue]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardCapabilities.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardCapabilities.h deleted file mode 100755 index a7b56c4b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardCapabilities.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface BTCardCapabilities : NSObject - -@property (nonatomic, assign) BOOL isUnionPay; -@property (nonatomic, assign) BOOL isDebit; -@property (nonatomic, assign) BOOL supportsTwoStepAuthAndCapture; -@property (nonatomic, assign) BOOL isSupported; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardClient+UnionPay.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardClient+UnionPay.h deleted file mode 100755 index 9c06f679..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTCardClient+UnionPay.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma message "⚠️ Braintree's UnionPay API for iOS is currently in beta and may change." - -#if __has_include("BraintreeCard.h") -#import "BraintreeCard.h" -#else -#import -#endif - -@class BTCardCapabilities, BTCardRequest; - -NS_ASSUME_NONNULL_BEGIN - -@interface BTCardClient (UnionPay) - -/*! - @brief Fetches the capabilities of a card number. - - @discussion This should be used to look up a card PAN to see whether it is UnionPay, and if so, what is required to tokenize it. - - @param cardNumber The card number. - @param completion A completion block that is invoked when the card capabilities have been fetched. -*/ -- (void)fetchCapabilities:(NSString *)cardNumber - completion:(void (^)(BTCardCapabilities * _Nullable cardCapabilities, NSError * _Nullable error))completion; - -/*! - @brief Enrolls a UnionPay card and returns an enrollment ID. The `enrollmentID` property of `BTCardRequest` must be set to this IDbefore the card can be tokenized. - - @discussion Attempting to enroll cards that do not require enrollment -- including non-UnionPay cards -- will cause an error. This - can be prevented by checking the card's capabilities first. - - @param request A card tokenization request that contains a card, mobile phone number, and country code. Cannot be `nil`. - @param completion A callback block that will be invoked on the main thread when enrollment has completed. When enrollment succeeds, `error` is `nil`, `enrollmentID` contains the enrollment ID, and `smsCodeRequired` indicates whether an SMS code was sent to the customer. If an SMS code is not sent, tokenization can occur immediately afterwards. - @see -fetchCapabilities:completion: - @see BTCardClient -tokenizeCard:options:completion: -*/ -- (void)enrollCard:(BTCardRequest *)request - completion:(void (^)(NSString * _Nullable enrollmentID, BOOL smsCodeRequired, NSError * _Nullable error))completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTConfiguration+UnionPay.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTConfiguration+UnionPay.h deleted file mode 100755 index 0d62a81a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BTConfiguration+UnionPay.h +++ /dev/null @@ -1,14 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTConfiguration (UnionPay) - -/*! - @brief Indicates whether UnionPay is enabled for the merchant account. -*/ -@property (nonatomic, readonly, assign) BOOL isUnionPayEnabled; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BraintreeUnionPay.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BraintreeUnionPay.h deleted file mode 100755 index 98e3f15c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeUnionPay/Public/BraintreeUnionPay.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -FOUNDATION_EXPORT double BraintreeUnionPayVersionNumber; - -FOUNDATION_EXPORT const unsigned char BraintreeUnionPayVersionString[]; - -#if __has_include("BraintreeCard.h") -#import "BraintreeCard.h" -#else -#import -#endif -#import "BTCardCapabilities.h" -#import "BTCardClient+UnionPay.h" -#import "BTConfiguration+UnionPay.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTConfiguration+Venmo.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTConfiguration+Venmo.m deleted file mode 100755 index 26e43bb8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTConfiguration+Venmo.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "BTConfiguration+Venmo.h" - -@implementation BTConfiguration (Venmo) - -+ (void)enableVenmo:(BOOL) __unused isEnabled { /* NO OP */ } - -- (BOOL)isVenmoEnabled { - return (self.venmoAccessToken != nil); -} - -- (NSString*)venmoAccessToken { - return [self.json[@"payWithVenmo"][@"accessToken"] asString]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce.m deleted file mode 100755 index 34d73ba6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce.m +++ /dev/null @@ -1,27 +0,0 @@ -#import "BTVenmoAccountNonce.h" - -@interface BTVenmoAccountNonce () -@property (nonatomic, readwrite, copy) NSString *username; -@end - -@implementation BTVenmoAccountNonce - -- (instancetype)initWithPaymentMethodNonce:(NSString *)nonce - description:(__unused NSString *)description - username:(NSString *)username - isDefault:(BOOL)isDefault -{ - if (self = [super initWithNonce:nonce localizedDescription:username type:@"Venmo" isDefault:isDefault]) { - _username = username; - } - return self; -} - -+ (instancetype)venmoAccountWithJSON:(BTJSON *)venmoAccountJSON { - return [[[self class] alloc] initWithPaymentMethodNonce:[venmoAccountJSON[@"nonce"] asString] - description:[venmoAccountJSON[@"description"] asString] - username:[venmoAccountJSON[@"details"][@"username"] asString] - isDefault:[venmoAccountJSON[@"default"] isTrue]]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce_Internal.h deleted file mode 100755 index 32c5ea97..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAccountNonce_Internal.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "BTVenmoAccountNonce.h" -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTVenmoAccountNonce () - -- (instancetype)initWithPaymentMethodNonce:(NSString *)nonce - description:(NSString *)description - username:(NSString *)username - isDefault:(BOOL)isDefault; - -+ (instancetype)venmoAccountWithJSON:(BTJSON *)venmoAccountJSON; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.h deleted file mode 100755 index 763aecbe..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.h +++ /dev/null @@ -1,35 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@class BTClientMetadata; - -@interface BTVenmoAppSwitchRequestURL : NSObject - -/*! - @brief The base app switch URL for Venmo. Does not include specific parameters. -*/ -+ (NSURL *)baseAppSwitchURL; - -/*! - Create an app switch URL - - @param merchantID The merchant ID - @param accessToken The access token used by the venmo app to tokenize on behalf of the merchant - @param scheme The return URL scheme, e.g. "com.yourcompany.Your-App.payments" - @param bundleName The bundle display name for the current app - @param environment The environment, e.g. "production" or "sandbox" - @param metadata Additional braintree metadata - - @return The resulting URL, or `nil` if any of the parameters are `nil`. -*/ -+ (nullable NSURL *)appSwitchURLForMerchantID:(NSString *)merchantID - accessToken:(NSString *)accessToken - returnURLScheme:(NSString *)scheme - bundleDisplayName:(NSString *)bundleName - environment:(NSString *)environment - metadata:(BTClientMetadata *)metadata; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.m deleted file mode 100755 index 1821fa5d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchRequestURL.m +++ /dev/null @@ -1,78 +0,0 @@ -#import - -#import "BTVenmoAppSwitchRequestURL.h" -#import "Braintree-Version.h" - -#if __has_include("BraintreeCore.h") -#import "BTURLUtils.h" -#import "BTClientMetadata.h" -#else -#import -#endif - -#define kXCallbackTemplate @"scheme://x-callback-url/path" -#define kVenmoScheme @"com.venmo.touch.v2" - -@implementation BTVenmoAppSwitchRequestURL - -+ (NSURL *)baseAppSwitchURL { - return [self appSwitchBaseURLComponents].URL; -} - -+(NSURL *)appSwitchURLForMerchantID:(NSString *)merchantID - accessToken:(NSString *)accessToken - returnURLScheme:(NSString *)scheme - bundleDisplayName:(NSString *)bundleName - environment:(NSString *)environment - metadata:(BTClientMetadata *)metadata -{ - NSURL *successReturnURL = [self returnURLWithScheme:scheme result:@"success"]; - NSURL *errorReturnURL = [self returnURLWithScheme:scheme result:@"error"]; - NSURL *cancelReturnURL = [self returnURLWithScheme:scheme result:@"cancel"]; - if (!successReturnURL || !errorReturnURL || !cancelReturnURL || !accessToken || !metadata || !scheme || !bundleName || !environment || !merchantID) { - return nil; - } - - NSMutableDictionary *braintreeData = [@{@"_meta": @{ - @"version": BRAINTREE_VERSION, - @"sessionId": [metadata sessionId], - @"integration": [metadata integrationString], - @"platform": @"ios" - } - } mutableCopy]; - - NSData *serializedBraintreeData = [NSJSONSerialization dataWithJSONObject:braintreeData options:0 error:NULL]; - NSString *base64EncodedBraintreeData = [serializedBraintreeData base64EncodedStringWithOptions:0]; - - NSMutableDictionary *appSwitchParameters = [@{@"x-success": successReturnURL, - @"x-error": errorReturnURL, - @"x-cancel": cancelReturnURL, - @"x-source": bundleName, - @"braintree_merchant_id": merchantID, - @"braintree_access_token": accessToken, - @"braintree_environment": environment, - @"braintree_sdk_data": base64EncodedBraintreeData, - } mutableCopy]; - - NSURLComponents *components = [self appSwitchBaseURLComponents]; - components.percentEncodedQuery = [BTURLUtils queryStringWithDictionary:appSwitchParameters]; - return components.URL; -} - -#pragma mark Internal Helpers - -+ (NSURL *)returnURLWithScheme:(NSString *)scheme result:(NSString *)result { - NSURLComponents *components = [NSURLComponents componentsWithString:kXCallbackTemplate]; - components.scheme = scheme; - components.percentEncodedPath = [NSString stringWithFormat:@"/vzero/auth/venmo/%@", result]; - return components.URL; -} - -+ (NSURLComponents *)appSwitchBaseURLComponents { - NSURLComponents *components = [NSURLComponents componentsWithString:kXCallbackTemplate]; - components.scheme = kVenmoScheme; - components.percentEncodedPath = @"/vzero/auth"; - return components; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.h deleted file mode 100755 index e52f2666..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.h +++ /dev/null @@ -1,58 +0,0 @@ -#import - -extern NSString *const BTVenmoAppSwitchReturnURLErrorDomain; - -typedef NS_ENUM(NSUInteger, BTVenmoAppSwitchReturnURLState) { - BTVenmoAppSwitchReturnURLStateSucceeded, - BTVenmoAppSwitchReturnURLStateFailed, - BTVenmoAppSwitchReturnURLStateCanceled, - BTVenmoAppSwitchReturnURLStateUnknown -}; - -/*! - @brief This class interprets URLs received from the Venmo app via app switch returns. - - @discussion Venmo Touch app switch authorization requests should result in success, failure or user-initiated cancelation. These states are communicated in the url. -*/ -@interface BTVenmoAppSwitchReturnURL : NSObject - -/*! - @brief Evaluates whether the url-sourceApplication pair represents a valid Venmo Touch return. - - @param url an app switch return URL - @param sourceApplication an app switch source application - - @return YES if the url-sourceApplication pair likely represent a Venmo Touch app switch return -*/ -+ (BOOL)isValidURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; - -/*! - @brief Initializes a new BTVenmoAppSwitchReturnURL - - @param url an incoming app switch url - - @return An initialized app switch return url -*/ -- (instancetype)initWithURL:(NSURL *)url; - -/*! - @brief The overall status of the app switch - success, failure or cancelation -*/ -@property (nonatomic, assign, readonly) BTVenmoAppSwitchReturnURLState state; - -/*! - @brief The nonce from the return URL. -*/ -@property (nonatomic, copy, readonly) NSString *nonce; - -/*! - @brief The username from the return URL. -*/ -@property (nonatomic, copy, readonly) NSString *username; - -/*! - @brief If the return URL's state is BTVenmoAppSwitchReturnURLStateFailed, the error returned from Venmo via the app switch. -*/ -@property (nonatomic, strong, readonly) NSError *error; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.m deleted file mode 100755 index 59d031bf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoAppSwitchReturnURL.m +++ /dev/null @@ -1,44 +0,0 @@ -#import "BTVenmoAppSwitchReturnURL.h" -#import "BTURLUtils.h" - -NSString *const BTVenmoAppSwitchReturnURLErrorDomain = @"com.braintreepayments.BTVenmoAppSwitchReturnURLErrorDomain"; - -@implementation BTVenmoAppSwitchReturnURL - -+ (BOOL)isValidURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - return [self isVenmoSourceApplication:sourceApplication] || [self isFakeWalletURL:url andSourceApplication:sourceApplication]; -} - -- (instancetype)initWithURL:(NSURL *)url { - self = [self init]; - if (self) { - NSDictionary *parameters = [BTURLUtils dictionaryForQueryString:url.query]; - if ([url.path isEqualToString:@"/vzero/auth/venmo/success"]) { - _state = BTVenmoAppSwitchReturnURLStateSucceeded; - _nonce = parameters[@"paymentMethodNonce"]; - _username = parameters[@"username"]; - } else if ([url.path isEqualToString:@"/vzero/auth/venmo/error"]) { - _state = BTVenmoAppSwitchReturnURLStateFailed; - NSString *errorMessage = parameters[@"errorMessage"]; - NSInteger errorCode = [parameters[@"errorCode"] integerValue]; - _error = [NSError errorWithDomain:BTVenmoAppSwitchReturnURLErrorDomain code:errorCode userInfo:(errorMessage != nil ? @{ NSLocalizedDescriptionKey: errorMessage } : nil)]; - } else if ([url.path isEqualToString:@"/vzero/auth/venmo/cancel"]) { - _state = BTVenmoAppSwitchReturnURLStateCanceled; - } else { - _state = BTVenmoAppSwitchReturnURLStateUnknown; - } - } - return self; -} - -#pragma mark Internal Helpers - -+ (BOOL)isVenmoSourceApplication:(NSString *)sourceApplication { - return [sourceApplication hasPrefix:@"net.kortina.labs.Venmo"]; -} - -+ (BOOL)isFakeWalletURL:(NSURL *)url andSourceApplication:(NSString *)sourceApplication { - return [sourceApplication isEqualToString:@"com.paypal.PPClient.Debug"] && [url.host isEqualToString:@"x-callback-url"] && [url.path hasPrefix:@"/vzero/auth/venmo/"]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver.m b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver.m deleted file mode 100755 index a8fa58c4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver.m +++ /dev/null @@ -1,358 +0,0 @@ -#import "BTConfiguration+Venmo.h" -#if __has_include("BTLogger_Internal.h") -#import "BTLogger_Internal.h" -#else -#import -#endif -#import "BTVenmoDriver_Internal.h" -#import "BTVenmoAccountNonce_Internal.h" -#import "BTAPIClient_Internal.h" -#import "BTVenmoAppSwitchRequestURL.h" -#import "BTVenmoAppSwitchReturnURL.h" -#import "Braintree-Version.h" -#import - -@interface BTVenmoDriver () - -@property (nonatomic, copy) void (^appSwitchCompletionBlock)(BTVenmoAccountNonce *, NSError *); - -@end - -NSString * const BTVenmoDriverErrorDomain = @"com.braintreepayments.BTVenmoDriverErrorDomain"; - -@implementation BTVenmoDriver - -static BTVenmoDriver *appSwitchedDriver; - -+ (void)load { - if (self == [BTVenmoDriver class]) { - [[BTAppSwitch sharedInstance] registerAppSwitchHandler:self]; - [[BTTokenizationService sharedService] registerType:@"Venmo" withTokenizationBlock:^(BTAPIClient *apiClient, __unused NSDictionary *options, void (^completionBlock)(BTPaymentMethodNonce *paymentMethodNonce, NSError *error)) { - BTVenmoDriver *driver = [[BTVenmoDriver alloc] initWithAPIClient:apiClient]; - driver.appSwitchDelegate = options[BTTokenizationServiceAppSwitchDelegateOption]; - [driver authorizeAccountAndVault:YES completion:completionBlock]; - }]; - - [[BTPaymentMethodNonceParser sharedParser] registerType:@"VenmoAccount" withParsingBlock:^BTPaymentMethodNonce * _Nullable(BTJSON * _Nonnull venmoJSON) { - return [BTVenmoAccountNonce venmoAccountWithJSON:venmoJSON]; - }]; - } -} - -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient { - if (self = [super init]) { - _apiClient = [apiClient copyWithSource:BTClientMetadataSourceVenmoApp integration:apiClient.metadata.integration]; - } - return self; -} - -- (instancetype)init { - return nil; -} - -#pragma mark - Accessors - -- (id)application { - if (!_application) { - _application = [UIApplication sharedApplication]; - } - return _application; -} - -- (NSBundle *)bundle { - if (!_bundle) { - _bundle = [NSBundle mainBundle]; - } - return _bundle; -} - -- (UIDevice *)device { - if (!_device) { - _device = [UIDevice currentDevice]; - } - return _device; -} - -- (NSString *)returnURLScheme { - if (!_returnURLScheme) { - _returnURLScheme = [BTAppSwitch sharedInstance].returnURLScheme; - } - return _returnURLScheme; -} - -#pragma mark - Tokenization - -- (void)authorizeAccountWithCompletion:(void (^)(BTVenmoAccountNonce *venmoAccount, NSError *configurationError))completionBlock { - [self authorizeAccountAndVault:NO completion:completionBlock]; -} - -- (void)authorizeAccountAndVault:(BOOL)vault completion:(void (^)(BTVenmoAccountNonce *venmoAccount, NSError *configurationError))completionBlock { - if (!self.apiClient) { - NSError *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeIntegration - userInfo:@{NSLocalizedDescriptionKey: @"BTVenmoDriver failed because BTAPIClient is nil."}]; - completionBlock(nil, error); - return; - } - - if (self.returnURLScheme == nil || [self.returnURLScheme isEqualToString:@""]) { - [[BTLogger sharedLogger] critical:@"Venmo requires a return URL scheme to be configured via [BTAppSwitch setReturnURLScheme:]"]; - NSError *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeAppNotAvailable - userInfo:@{NSLocalizedDescriptionKey: @"UIApplication failed to perform app switch to Venmo."}]; - completionBlock(nil, error); - return; - } else if (![NSBundle mainBundle].bundleIdentifier || ![self.returnURLScheme hasPrefix:[NSBundle mainBundle].bundleIdentifier]) { - [[BTLogger sharedLogger] critical:@"Venmo requires [BTAppSwitch setReturnURLScheme:] to be configured to begin with your app's bundle ID (%@). Currently, it is set to (%@) ", [NSBundle mainBundle].bundleIdentifier, self.returnURLScheme]; - } - - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *configurationError) { - if (configurationError) { - completionBlock(nil, configurationError); - return; - } - - NSError *error; - if (![self verifyAppSwitchWithConfiguration:configuration error:&error]) { - completionBlock(nil, error); - return; - } - - BTMutableClientMetadata *metadata = [self.apiClient.metadata mutableCopy]; - metadata.source = BTClientMetadataSourceVenmoApp; - NSString *bundleDisplayName = [self.bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"]; - - BTJSON *venmoMerchantId = configuration.json[@"payWithVenmo"][@"merchantId"]; - if ([venmoMerchantId isError]) { - completionBlock(nil, [venmoMerchantId asError]); - return; - } - - BTJSON *venmoMerchantEnvironment = configuration.json[@"payWithVenmo"][@"environment"]; - if ([venmoMerchantEnvironment isError]) { - completionBlock(nil, [venmoMerchantEnvironment asError]); - return; - } - - NSURL *appSwitchURL = [BTVenmoAppSwitchRequestURL appSwitchURLForMerchantID:[venmoMerchantId asString] - accessToken:configuration.venmoAccessToken - returnURLScheme:self.returnURLScheme - bundleDisplayName:bundleDisplayName - environment:[venmoMerchantEnvironment asString] - metadata:[self.apiClient metadata]]; - - if (!appSwitchURL) { - error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeInvalidRequestURL - userInfo:@{NSLocalizedDescriptionKey: @"Failed to create Venmo app switch request URL."}]; - completionBlock(nil, error); - return; - } - - [self informDelegateWillPerformAppSwitch]; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 - if ([self.application respondsToSelector:@selector(openURL:options:completionHandler:)]) { - [self.application openURL:appSwitchURL options:[NSDictionary dictionary] completionHandler:^(BOOL success) { - [self invokedOpenURLSuccessfully:success shouldVault:vault completion:completionBlock]; - }]; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - BOOL success = [self.application openURL:appSwitchURL]; - [self invokedOpenURLSuccessfully:success shouldVault:vault completion:completionBlock]; -#pragma clang diagnostic pop - } -#else -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - BOOL success = [self.application openURL:appSwitchURL]; - [self invokedOpenURLSuccessfully:success shouldVault:vault completion:completionBlock]; -#pragma clang diagnostic pop -#endif - }]; -} - -- (void)invokedOpenURLSuccessfully:(BOOL)success shouldVault:(BOOL)vault completion:(void (^)(BTVenmoAccountNonce *venmoAccount, NSError *configurationError))completionBlock { - self.shouldVault = success && vault; - - if (success) { - [self informDelegateDidPerformAppSwitch]; - self.appSwitchCompletionBlock = completionBlock; - appSwitchedDriver = self; - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.initiate.success"]; - } else { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.initiate.error.failure"]; - NSError *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeAppSwitchFailed - userInfo:@{NSLocalizedDescriptionKey: @"UIApplication failed to perform app switch to Venmo."}]; - completionBlock(nil, error); - } -} - -#pragma mark - Vaulting - -- (void)vaultVenmoAccountNonce:(NSString *)nonce { - NSMutableDictionary *params = [NSMutableDictionary new]; - params[@"venmoAccount"] = @{ - @"nonce": nonce - }; - - [self.apiClient POST:@"v1/payment_methods/venmo_accounts" - parameters:params - completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - [self informDelegateWillProcessAppSwitchReturn]; - - if (error) { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.vault.failure"]; - self.appSwitchCompletionBlock(nil, error); - } else { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.vault.success"]; - BTJSON *venmoAccountJson = body[@"venmoAccounts"][0]; - self.appSwitchCompletionBlock([BTVenmoAccountNonce venmoAccountWithJSON:venmoAccountJson], venmoAccountJson.asError); - } - self.appSwitchCompletionBlock = nil; - }]; -} - -#pragma mark - App switch - -- (BOOL)isiOSAppAvailableForAppSwitch { - BOOL isAtLeastIos9 = ([[self.device systemVersion] intValue] >= 9); - return [self.application canOpenURL:[BTVenmoAppSwitchRequestURL baseAppSwitchURL]] && isAtLeastIos9; -} - -+ (void)handleAppSwitchReturnURL:(NSURL *)url { - [appSwitchedDriver handleOpenURL:url]; - appSwitchedDriver = nil; -} - -+ (BOOL)canHandleAppSwitchReturnURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { - return [BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:sourceApplication]; -} - -- (void)handleOpenURL:(NSURL *)url { - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:url]; - - switch (returnURL.state) { - case BTVenmoAppSwitchReturnURLStateSucceeded: { - - NSError *error = nil; - if (!returnURL.nonce) { - error = [NSError errorWithDomain:BTVenmoDriverErrorDomain code:BTVenmoDriverErrorTypeInvalidReturnURL userInfo:@{NSLocalizedDescriptionKey: @"Return URL is missing nonce"}]; - } else if (!returnURL.username) { - error = [NSError errorWithDomain:BTVenmoDriverErrorDomain code:BTVenmoDriverErrorTypeInvalidReturnURL userInfo:@{NSLocalizedDescriptionKey: @"Return URL is missing username"}]; - } - - if (error) { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.handle.client-failure"]; - self.appSwitchCompletionBlock(nil, error); - self.appSwitchCompletionBlock = nil; - return; - } - - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.handle.success"]; - - if (self.shouldVault) { - [self vaultVenmoAccountNonce:returnURL.nonce]; - } else { - [self informDelegateWillProcessAppSwitchReturn]; - - BTJSON *json = [[BTJSON alloc] initWithValue:@{ - @"nonce": returnURL.nonce, - @"details": @{@"username": returnURL.username}, - @"description": returnURL.username - }]; - BTVenmoAccountNonce *card = [BTVenmoAccountNonce venmoAccountWithJSON:json]; - self.appSwitchCompletionBlock(card, nil); - self.appSwitchCompletionBlock = nil; - } - break; - } - case BTVenmoAppSwitchReturnURLStateFailed: { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.handle.failed"]; - self.appSwitchCompletionBlock(nil, returnURL.error); - self.appSwitchCompletionBlock = nil; - break; - } - case BTVenmoAppSwitchReturnURLStateCanceled: { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.handle.cancel"]; - self.appSwitchCompletionBlock(nil, nil); - self.appSwitchCompletionBlock = nil; - break; - } - default: - // should not happen - break; - } -} - -#pragma mark - Helpers - -- (BOOL)verifyAppSwitchWithConfiguration:(BTConfiguration *)configuration error:(NSError * __autoreleasing *)error { - - if (!configuration.isVenmoEnabled) { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.initiate.error.disabled"]; - if (error) { - *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeDisabled - userInfo:@{ NSLocalizedDescriptionKey:@"Venmo is not enabled for this merchant account." }]; - } - return NO; - } - - if (![self isiOSAppAvailableForAppSwitch]) { - [self.apiClient sendAnalyticsEvent:@"ios.pay-with-venmo.appswitch.initiate.error.unavailable"]; - if (error) { - *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeAppNotAvailable - userInfo:@{ NSLocalizedDescriptionKey:@"The Venmo app is not installed on this device, or it is not configured or available for app switch." }]; - } - return NO; - } - - NSString *bundleDisplayName = [self.bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"]; - if (!bundleDisplayName) { - if (error) { - *error = [NSError errorWithDomain:BTVenmoDriverErrorDomain - code:BTVenmoDriverErrorTypeBundleDisplayNameMissing - userInfo:@{NSLocalizedDescriptionKey: @"CFBundleDisplayName must be non-nil. Please set 'Bundle display name' in your Info.plist."}]; - } - return NO; - } - - return YES; -} - -#pragma mark - Delegate Informers - -- (void)informDelegateWillPerformAppSwitch { - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchWillSwitchNotification object:self userInfo:nil]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillPerformAppSwitch:)]) { - [self.appSwitchDelegate appSwitcherWillPerformAppSwitch:self]; - } -} - -- (void)informDelegateDidPerformAppSwitch { - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchDidSwitchNotification object:self userInfo:@{ BTAppSwitchNotificationTargetKey : @(BTAppSwitchTargetNativeApp) } ]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcher:didPerformSwitchToTarget:)]) { - [self.appSwitchDelegate appSwitcher:self didPerformSwitchToTarget:BTAppSwitchTargetNativeApp]; - } -} - -- (void)informDelegateWillProcessAppSwitchReturn { - NSNotification *notification = [[NSNotification alloc] initWithName:BTAppSwitchWillProcessPaymentInfoNotification object:self userInfo:nil]; - [[NSNotificationCenter defaultCenter] postNotification:notification]; - - if ([self.appSwitchDelegate respondsToSelector:@selector(appSwitcherWillProcessPaymentInfo:)]) { - [self.appSwitchDelegate appSwitcherWillProcessPaymentInfo:self]; - } -} - - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver_Internal.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver_Internal.h deleted file mode 100755 index 395f289e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/BTVenmoDriver_Internal.h +++ /dev/null @@ -1,38 +0,0 @@ -#import -#import "BTVenmoDriver.h" - -@interface BTVenmoDriver () - -/*! - @discussion Defaults to [UIApplication sharedApplication], but exposed for unit tests to inject test doubles - to prevent calls to openURL. Its type is `id` and not `UIApplication` because trying to subclass - UIApplication is not possible, since it enforces that only one instance can ever exist -*/ -@property (nonatomic, strong) id application; - -/*! - @brief Defaults to [NSBundle mainBundle], but exposed for unit tests to inject test doubles to stub values in infoDictionary -*/ -@property (nonatomic, strong) NSBundle *bundle; - -/*! - @brief Defaults to [UIDevice currentDevice], but exposed for unit tests to inject different devices - */ -@property (nonatomic, strong) UIDevice *device; - -/*! - @brief Defaults to use [BTAppSwitchHandler sharedInstance].returnURLScheme, but exposed for unit tests to stub returnURLScheme. -*/ -@property (nonatomic, copy) NSString *returnURLScheme; - -/*! - @brief Exposed for testing to get the instance of BTAPIClient after it has been copied by `copyWithSource:integration:` -*/ -@property (nonatomic, strong) BTAPIClient *apiClient; - -/*! - @brief Stored property used to determine whether a venmo account nonce should be vaulted after an app switch return - */ -@property (nonatomic, assign) BOOL shouldVault; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTConfiguration+Venmo.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTConfiguration+Venmo.h deleted file mode 100755 index b9722434..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTConfiguration+Venmo.h +++ /dev/null @@ -1,26 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTConfiguration (Venmo) - -/*! - @discussion Force Venmo to be enabled. If false, Drop-In will not display the Venmo button and [BTVenmoDriver authorizationWithCompletion:] will return an error. - When set to true the Venmo button will be visible if it is also setup properly. - Defaults to false during the limited availability phase. -*/ -+ (void)enableVenmo:(BOOL)isEnabled DEPRECATED_MSG_ATTRIBUTE("Pay with Venmo no longer relies on a user whitelist, thus this method is not needed"); - -/*! - @brief Indicates whether Venmo is enabled for the merchant account. -*/ -@property (nonatomic, readonly, assign) BOOL isVenmoEnabled; - -/*! - @brief Returns the Access Token used by the Venmo app to tokenize on behalf of the merchant -*/ -@property (nonatomic, readonly, assign) NSString *venmoAccessToken; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoAccountNonce.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoAccountNonce.h deleted file mode 100755 index dc7a2be6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoAccountNonce.h +++ /dev/null @@ -1,15 +0,0 @@ -#import -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif - -@interface BTVenmoAccountNonce : BTPaymentMethodNonce - -/*! - @brief The username associated with the Venmo account -*/ -@property (nonatomic, nullable, readonly, copy) NSString *username; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoDriver.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoDriver.h deleted file mode 100755 index f43b1d01..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BTVenmoDriver.h +++ /dev/null @@ -1,81 +0,0 @@ -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTVenmoAccountNonce.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -extern NSString * const BTVenmoDriverErrorDomain; - -typedef NS_ENUM(NSInteger, BTVenmoDriverErrorType) { - BTVenmoDriverErrorTypeUnknown = 0, - - /// Venmo is disabled in configuration - BTVenmoDriverErrorTypeDisabled, - - /// App is not installed on device - BTVenmoDriverErrorTypeAppNotAvailable, - - /// Bundle display name must be present - BTVenmoDriverErrorTypeBundleDisplayNameMissing, - - /// UIApplication failed to switch to Venmo app - BTVenmoDriverErrorTypeAppSwitchFailed, - - /// Return URL was invalid - BTVenmoDriverErrorTypeInvalidReturnURL, - - /// Braintree SDK is integrated incorrectly - BTVenmoDriverErrorTypeIntegration, - - /// Request URL was invalid, configuration may be missing required values - BTVenmoDriverErrorTypeInvalidRequestURL, -}; - -@interface BTVenmoDriver : NSObject - -/*! - @brief Initialize a new Venmo driver instance. - - @param apiClient The API client -*/ -- (instancetype)initWithAPIClient:(BTAPIClient *)apiClient NS_DESIGNATED_INITIALIZER; - - -- (instancetype)init __attribute__((unavailable("Please use initWithAPIClient:"))); - -/*! - @brief Initiates Venmo login via app switch, which returns a BTVenmoAccountNonce when successful. - - @param vault Whether to automatically vault the Venmo Account. Vaulting will only occur if a client token with a customer_id is being used. - @param completionBlock This completion will be invoked when app switch is complete or an error occurs. - On success, you will receive an instance of `BTVenmoAccountNonce`; on failure, an error; on user - cancellation, you will receive `nil` for both parameters. -*/ -- (void)authorizeAccountAndVault:(BOOL)vault completion:(void (^)(BTVenmoAccountNonce * _Nullable venmoAccount, NSError * _Nullable error))completionBlock; - -/*! - @brief Initiates Venmo login via app switch, which returns a BTVenmoAccountNonce when successful. - - @param completionBlock This completion will be invoked when app switch is complete or an error occurs. - On success, you will receive an instance of `BTVenmoAccountNonce`; on failure, an error; on user - cancellation, you will receive `nil` for both parameters. -*/ -- (void)authorizeAccountWithCompletion:(void (^)(BTVenmoAccountNonce * _Nullable venmoAccount, NSError * _Nullable error))completionBlock DEPRECATED_MSG_ATTRIBUTE("Use [BTVenmoDriver authorizeAccountAndVault:completion instead"); - -/*! - @brief Returns true if the proper Venmo app is installed and configured correctly, returns false otherwise. -*/ -- (BOOL)isiOSAppAvailableForAppSwitch; - -/*! - @brief An optional delegate for receiving notifications about the lifecycle of a Venmo app switch, as well as updating your UI -*/ -@property (nonatomic, weak, nullable) id appSwitchDelegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BraintreeVenmo.h b/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BraintreeVenmo.h deleted file mode 100755 index 2983992a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/BraintreeVenmo/Public/BraintreeVenmo.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -FOUNDATION_EXPORT double BraintreeVenmoVersionNumber; - -FOUNDATION_EXPORT const unsigned char BraintreeVenmoVersionString[]; - -#if __has_include("BraintreeCore.h") -#import "BraintreeCore.h" -#else -#import -#endif -#import "BTConfiguration+Venmo.h" -#import "BTVenmoDriver.h" -#import "BTVenmoAccountNonce.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/CHANGELOG.md b/examples/braintree/ios/Frameworks/Braintree/CHANGELOG.md deleted file mode 100755 index b5fc89f1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/CHANGELOG.md +++ /dev/null @@ -1,706 +0,0 @@ -# Braintree iOS SDK Release Notes - -## 4.8.4 (2017-06-26) - -* Update to Kount 3.2 -* Update Demo to support Xcode9 (Beta 1) and iOS11 -* Update README - -## 4.8.3 (2017-05-30) - -* Fix Pay with Venmo bug - -## 4.8.2 (2017-05-11) - -* Add PayPal Credit support to PayPal Billing Agreements flow -* Add V3 Client Token support -* Enable client side vaulting of Venmo nonces -* Fix potential memory leak issue [#312](https://github.com/braintree/braintree_ios/issues/312) -* Fix bug causing random crashes in 3DS flow [#329](https://github.com/braintree/braintree_ios/issues/329) - -## 4.8.1 (2017-04-07) - -* Optimize BTAPIClient:initWithAuthorization: when using a client token -* Fix invalid documentation tags - -## 4.8.0 (2017-03-30) - -* Enable PayPal Credit -* Add support for `displayName` and `landing_page_type` PayPal options -* Fix issue with 3DS error callbacks [#318](https://github.com/braintree/braintree_ios/issues/318) -* Resolve build error in Xcode 8.3 - -## 4.7.5 (2017-02-22) - -* Fix issue where PayPal correlation_id was not set correctly -* Add support for custom PayPal authentication handler -* Update docs to specify Xcode 8+ requirement -* Fix header import in BTAnalyticsMetadata.m -* Additional tuning for Travis CI - -## 4.7.4 (2017-01-13) - -* Update UnitTests to Swift 3 -* Update PayPal header docs -* Update CocoaDocs and remove styling - -## 4.7.3 (2016-11-18) - -* Allow `BraintreeCore` to be compatible with App Extensions -* Fix `BraintreePayPal` use of `queryItems` for iOS 7 compatibility -* Present SFSafariViewControllers from the top UIViewController via Drop-in to avoid blank SFSafariViewController - * Set `BTPaymentRequest` `presentViewControllersFromTop` to `YES` to opt in to this behavior -* Fix `@param` warning for incorrect argument name -* Fix CocoaDocs and add styling - -## 4.7.2 (2016-11-08) - -* Update Apple-Pay - * Fix issue when using `BTConfiguration:applePaySupportedNetworks` with `Discover` enabled on devices `= iOS 9.0 - -## 4.2.0 (2016-02-04) - -* Open source PayPal One Touch library - * Source code for PayPal One Touch library is now included in Braintree iOS SDK repository - * Added CocoaPods subspecs for PayPalOneTouch and PayPalDataCollector -* Improve `BTPaymentButton` - * Payment button displays payment options based on configuration - * Shows loading activity indicator when fetching configuration - * Updated style for PayPal button when PayPal is the only available payment option - * Can manually configure available payment options via `enabledPaymentOptions` property -* Added `setCardNumber:` and `setCardExpirationMonth:year:` to `BTDropInViewController` - * Drop-in card form can be prepopulated, e.g. by card.io -* Deprecate `BTDataCollector` `payPalClientMetadataID` and `collectPayPalClientMetadataId` - * Use `PPDataCollector` `collectPayPalDeviceData` when you only need to collect PayPal device data -* Add Travis CI to run tests - -## 4.1.3 (2016-01-08) - -* Prevent crash when `BTPayPalDriver` instantiates `SFSafariViewController` with an invalid URL, and return an error instead -* Update `BTTokenizationService` `allTypes` property to be `NSArray ` - -## 4.1.2 (2015-12-09) - -* Workaround for Swift compiler bug that causes `BTJSON` to conflict with Alamofire (see Issue [#195](https://github.com/braintree/braintree_ios/issues/195)) - * For the merchant apps that read their configuration directly from `BTJSON` via Objective-C, you may need to switch from dot syntax to square brackets to call `BTJSON` methods -* Ignore `UIAlertView` deprecation warning in `BTDropInErrorAlert` - -## 4.1.1 (2015-12-08) - -* Bug fix for Drop-in view controller showing empty `BTPaymentButton` -* Update Kount to 2.6.2 - -## 4.1.0 (2015-12-07) - -* Limited release of Pay With Venmo - * Contact [pay-with-venmo@braintreepayments.com](mailto:pay-with-venmo@braintreepayments.com) if you are interested in early access -* Fix for Carthage integrations: remove reference to Braintree developer team from Xcode framework targets -* Streamlined vector graphics for JCB logo to reduce build time of BraintreeUI - -## 4.0.2 (2015-11-30) - -* If the Client Token has a Customer ID, Drop-in will automatically fetch the customer's vaulted payment methods. - * A bug in 4.0.0-4.0.1 prevented Drop-in from fetching payment methods even if a Customer ID is provided in the Client Token; apps needed to call `fetchPaymentMethodsOnCompletion` before presenting Drop-in. - * You can still call `fetchPaymentMethodsOnCompletion` to pre-fetch payment methods, so that Drop-in doesn't need to show its own loading activity indicator. -* Prevent calling requestsDismissalOfViewController on iOS 8 when there is nothing to dismiss. (Merge [#199](https://github.com/braintree/braintree_ios/pull/199) - thanks, @Reflejo!) -* Drop-in Add Payment Method fixes - * Show/hide CVV and postal code fields without flicker - * Use Save bar button item in upper right to add additional payment methods -* `BTPayPalDriver` will not call `BTAppSwitchDelegate` callback methods when `SFSafariViewController` is presented (Issue [#188](https://github.com/braintree/braintree_ios/issues/188)) - -## 4.0.1 (2015-11-17) - -* Drop-in fixes - * Fixed a bug that prevented cards from being vaulted. - * Note: [BTCard's behavior has changed slightly](https://github.com/braintree/braintree_ios/commit/18b67d3). - * Fixed a bug that prevented card types from being parsed. - * Updated Demo to use paymentRequest and always call completionBlock. -* Resolved an analyzer warning in BTAPIClient.m. - -## 4.0.0 (2015-11-09) - -* Remodel the iOS SDK into frameworks with smaller filesize and greater flexibility. -* The public API has changed significantly in this release. For details, see the [v4 Migration Guide](Docs/Braintree-4.0-Migration-Guide.md) and the public header files. -* APIs have been refactored to use completion blocks instead of delegate methods. -* BTPaymentProvider has been removed. Instead, use payment option frameworks. For example, import BraintreeApplePay and use BTApplePayClient. -* Added support for [Tokenization Keys](https://developers.braintreepayments.com/guides/authorization/tokenization-key) in addition to Client Tokens. -* All methods and properties have been updated with nullability annotations. -* Added support for Carthage in addition to CocoaPods. -* PayPal One Touch is greatly improved in this release. It's slimmer and provides a better user experience, with browser switch on iOS 8 and SFSafariViewController on iOS 9. -* Added support for PayPal billing agreements (the New Vault Flow) and one-time payments. -* Drop-in is now part of the new BraintreeUI framework. BraintreeUI has been refactored for greater flexibility; it will automatically exclude any payment options that are not included in your build (as determined by CocoaPods subspecs or Carthage frameworks). -* Venmo One Touch has been excluded from this version. To join the beta for Pay with Venmo, contact Braintree Support. -* BTData has been renamed to BTDataCollector. -* BTPaymentMethod has been renamed to BTPaymentMethodNonce. - -As always, feel free to [open an Issue](https://github.com/braintree/braintree_ios/issues/new) with any questions or suggestions that you have. - -## 3.9.7 (2015-12-21) - -* Ignore `UIAlertView` deprecation warning in `BTDropInErrorAlert` - -## 3.9.6 (2015-10-08) - -* Update Kount DeviceCollectorSDK to v2.6.2 to [fix #175](https://github.com/braintree/braintree_ios/issues/175) (thanks, @keith) - -## 3.9.5 (2015-10-05) - -* Add runtime checks before using new features in Apple Pay iOS 9 - * Bug in 3.9.4 caused `shippingContact`, `billingContact`, and `paymentMethod` to be used on < iOS 9 devices, which causes unrecognized selector crashes - -## 3.9.4 (2015-09-25) - -* :rotating_light: This version requires Xcode 7 and iOS SDK 9.0+ -* Update README.md and Braintree Demo app for iOS 9 and Xcode 7 -* Update PayPal mSDK to 2.12.1 with bitcode -* Update Kount library with bitcode support -* Update Apple Pay support for iOS 9. `BTApplePayPaymentMethod` changes: - * Deprecate `ABRecordRef` properties: `billingAddress` and `shippingAddress` - * Add `PKContact` properties: `billingContact` and `shippingContact` - -## 3.9.2-pre6 (2015-08-28) -* PayPal - * Fix canOpenUrl warnings in iOS9 -* Added `PayerId` and `ClientMetadataId` to `BTPayPalPaymentMethod` - -## 3.9.2-pre5 (2015-08-19) -* PayPal - * Fix Billing Agreements support - * Update PayPal One Touch Core - -## 3.9.2-pre4 (2015-08-04) -* PayPal - * Update support for PayPal Checkout - * Add support for PayPal Billing Agreement authorization - * Update PayPal One Touch Core - -## 4.0.0-pre2 (2015-06-23) - -* PayPal - * For single payments, `BTPayPalPaymentMethod` now provides `firstName`, `lastName`, `phone`, `billingAddress`, and `shippingAddress` properties. - * For future payments, add support for additional scopes. - * Add demo for PayPal Checkout and scopes. -* Change @import to #import (#124). -* Add accessibility label to BTUICTAControl. - -## 4.0.0-pre1 - -* Replace mSDK with One Touch Core - * This replaces PayPal in-app login with browser switch for future payments consent - * This adds the capability to perform checkout (single payments) with One Touch - -## 3.9.3 (2015-08-31) - -* Xcode 7 support -* Improved Swift interface with nullability annotations and lightweight generics -* Update PayPal mSDK to 2.11.4-bt1 - * Remove checking via canOpenURL: -* Bug fix for `BTPaymentButton` edge case where it choose the wrong payment option when the option availability changes after UI setup. - -## 3.9.2 (2015-07-08) - -* :rotating_light: This version requires Xcode 6.3+ (otherwise you'll get duplicate symbol errors) -* :rotating_light: New: `Accelerate.framework` must be linked to your project (CocoaPods should do this automatically) -* Remove Coinbase CocoaPods library as an external dependency - * Integrating Coinbase SDK is no longer a prerequisite for manual integrations - * No change to Braintree Coinbase support; existing integrations remain unaffected - * Braintree iOS SDK now vendors Coinbase SDK -* Add session ID to analytics tracking data -* Add `BTPayPalScopeAddress` -* Update PayPal mSDK to 2.11.1-bt1 - * Requires Xcode 6.3+ - * Fix an iPad display issue - * Improve mSDK screen blurring when app is backgrounded. NOTE: This change requires that you add `Accelerate.framework` to your project - * Bug fixes - -## 3.9.1 (2015-06-12) - -* Add support for additional scopes during PayPal authorization - * Specifically supporting the `address` scope - * BTPayPalPaymentMethod now has a `billingAddress` property that is set when an address is present. This property is of type `BTPostalAddress`. - -## 3.8.2 (2015-06-04) - -* Fix bug in Demo app - * Menu button now works correctly -* Fix bug with PayPal app switching - * The bug occurred when installing a new app after the Braintree SDK had been initialized. When attempting to authorize with PayPal in this scenario, the SDK would switch to the `wallet` and launch the `in-app` authorization. - -## 3.8.1 (2015-05-22) - -* 3D Secure only: :rotating_light: Breaking API Changes for 3D Secure :rotating_light: - * Fix a bug in native mobile 3D Secure that, in some cases, prevented access to the new nonce. - * Your delegate will now receive `-paymentMethodCreator:didCreatePaymentMethod:` even when liability shift is not possible and/or liability was not shifted. - * You must check `threeDSecureInfo` to determine whether liability shift is possible and liability was shifted. This property is now of type `BTThreeDSecureInfo`. Example: - -```objectivec -- (void)paymentMethodCreator:(__unused id)sender didCreatePaymentMethod:(BTPaymentMethod *)paymentMethod { - - if ([paymentMethod isKindOfClass:[BTCardPaymentMethod class]]) { - BTCardPaymentMethod *cardPaymentMethod = (BTCardPaymentMethod *)paymentMethod; - if (cardPaymentMethod.threeDSecureInfo.liabilityShiftPossible && - cardPaymentMethod.threeDSecureInfo.liabilityShifted) { - - NSLog(@"liability shift possible and liability shifted"); - - } else { - - NSLog(@"3D Secure authentication was attempted but liability shift is not possible"); - - } - } -} -``` - -* Important: Since `cardPaymentMethod.threeDSecureInfo.liabilityShiftPossible` and `cardPaymentMethod.threeDSecureInfo.liabilityShifted` are client-side values, they should be used for UI flow only. They should not be trusted for your server-side risk assessment. To require 3D Secure in cases where the buyer's card is enrolled for 3D Secure, set the `required` option to `true` in your server integration. [See our 3D Secure docs for more details.](https://developers.braintreepayments.com/guides/3d-secure) - -## 3.8.0 (2015-05-21) - -* Work around iOS 8.0-8.2 bug in UITextField - * Fix subtle bug in Drop-in and BTUICardFormView float label behavior -* It is now possible to set number, expiry, cvv and postal code field values programmatically in BTUICardFormView - * This is useful for making the card form compatible with card.io - -## 3.8.0-rc3 (2015-05-11) - -* Upgrade PayPal mSDK to 2.10.1 -* Revamp Demo app -* Merge with 3.7.x changes - -## 3.8.0-rc2 (2015-04-20) - -* Coinbase improvements - * Resolved: Drop-in will now automatically save Coinbase accounts in the vault - * Coinbase accounts now appear correctly in Drop-in - * Expose method to disable Coinbase in Drop-in -* Demo app: Look sharp on iPhone 6 hi-res displays -* Modified `BTUIPayPalWordmarkVectorArtView`, `BTUIVenmoWordmarkVectorArtView` slightly to - help logo alignment in `BTPaymentButton` and your payment buttons - -## 3.8.0-rc1 (2015-04-03) - -* Coinbase integration - beta release - * Coinbase is now available in closed beta. See [the Coinbase page on our website](https://www.braintreepayments.com/features/coinbase) to join the beta. - * Coinbase UI is integrated with Drop-in and BTPaymentButton - * Known issue: Drop-in vaulting behavior for Coinbase accounts -* [Internal only] Introduced a new asynchronous initializer for creating the `Braintree` object - -## 3.7.2 (2015-04-23) - -* Bugfixes - * Fix recognition of Discover, JCB, Maestro and Diners Club in certain cases ([Thanks, @RyPoints!](https://github.com/braintree/braintree_ios/pull/117)) - * Fix a bug in Drop-in that prevented Venmo from appearing if PayPal was disabled - * Revise text for certain Venmo One Touch errors in Drop-in - * Fix [compile error](https://github.com/braintree/braintree_ios/issues/106) that could occur when 'No Common Blocks' is Yes -* Demo app - * Look sharp on iPhone 6 hi-res displays - * Improve direct Apple Pay integration: use recommended tokenization method and handle Cancel gracefully -* Update tooling for Xcode 6.3 -* Improve Apple Pay error handling -* Localization helpers now fall-back to [NSBundle mainBundle] if the expected i18n bundle resource is not found - -## 3.7.1 (2015-03-27) - -* Update PayPal Mobile SDK to new version (PayPal-iOS-SDK 2.8.5-bt1) - * Change "Send Payment" button to simply "Pay" - * Minor fixes -* Remove `en_UK` from Braintree-Demo-Info.plist (while keeping `en_GB`) -* Fix for Venmo button in BTPaymentButton [#103](https://github.com/braintree/braintree_ios/issues/103) -* Fix issue with wrapping text in Drop-in ([thanks nirinchev](https://github.com/braintree/braintree_ios/pull/107)) -* Update [manual integration doc](Docs/Manual%20Integration.md) - -## 3.7.0 (2015-03-02) - -* Refactor and improve SSL Pinning code -* Update PayPal Mobile SDK to new version (PayPal-iOS-SDK 2.8.4-bt1) that does not include card.io. - * :rotating_light: Please note! :rotating_light: - - This change breaks builds that depend on a workaround introduced in 3.4.0 that added card.io headers to fix [card.io duplicate symbol issues](https://github.com/braintree/braintree_ios/issues/53). - - Since card.io is not officially part of the Braintree API, and since the headers were only included as part of a workaround for use by a small group of developers, this potentially-breaking change is not accompanied by a major version release. - - If your build breaks due to this change, you can re-add card.io to your project's Podfile: - - pod 'CardIO', '~> 4.0' - - And adjust your card.io imports to: - - #import - -## 3.6.1 (2015-02-24) - -* Fixes - * Remove `GCC_TREAT_WARNINGS_AS_ERRORS` and `GCC_WARN_ABOUT_MISSING_NEWLINE` config from podspec. - -## 3.6.0 (2015-02-20) - -* Features - * Beta support for native mobile 3D Secure - * Requires additional import of a new subspec in your Podfile, `pod "Braintree/3d-secure"` - * See `BTThreeDSecure` for full more details - * Make Apple Pay a build option, enabled via `Braintree/Apple-Pay` subspec, - which adds a `BT_ENABLE_APPLE_PAY=1` preprocesor macro. - * Addresses an issue [reported by developers attempting to submit v.zero integrations without Apple Pay to the app store](https://github.com/braintree/braintree_ios/issues/60). -* Enhancements - * Minor updates to UK localization - * Expose a new `status` property on `BTPaymentProvider`, which exposes the current status of payment method creation (Thanks, @Reflejo!) -* Bug fixes - * Fix swift build by making BTClient_Metadata.h private (https://github.com/braintree/braintree_ios/pull/84 and https://github.com/braintree/braintree_ios/pull/85) - * Drop-in - Auto-correction and auto-capitalization improvements for postal code field in BTUICardFormView - * Remove private header `BTClient_Metadata.h` from public headers -* Internal changes - * Simplifications to API response parsing logic - -## 3.5.0 (2014-12-03) - -* Add localizations to UI and Drop-in subspecs: - * Danish (`da`) - * German (`de`) - * Additional English locales (`en_AU`, `en_CA`, `en_UK`, `en_GB`) - * Spanish (`es` and `es_ES`) - * French (`fr`, `fr_CA`, `fr_FR`) - * Hebrew (`he`) - * Italian (`it`) - * Norwegian (`nb`) - * Dutch (`nl`) - * Polish (`pl`) - * Portugese (`pt`) - * Russian (`ru`) - * Swedish (`sv`) - * Turkish (`tr`) - * Chinese (`zh-Hans`) -* Add newlines to all files to support `GCC_WARN_ABOUT_MISSING_NEWLINE` - -## 3.4.2 (2014-11-19) - -* Upgrade PayPal Mobile SDK to version 2.7.1 - * Fixes symbol conflicts with 1Password - * Upgrades embedded card.io library to version 3.10.1 - -## 3.4.1 (2014-11-05) - -* Bug fixes - * Remove duplicate symbols with 1Password SDK by upgrading internal PayPal SDK - -## 3.4.0 (2014-10-27) - -* Features - * Stable Apple Pay support - * New method in `Braintree` for tokenizing a `PKPayment` into a nonce - * This is useful for merchants who integrate with Apple Pay using `PassKit`, rather than `BTPaymentProvider` - * `BTPaymentProvider` support for Apple Pay - * `BTApplePayPaymentMethod` with nonce and address information - * `BTData` now includes PayPal application correlation ID in device data blob - * Card.IO headers are now included in SDK - * In-App PayPal login now supports 1Password - -* API Changes and Deprecations - * `-[Braintree tokenizeCard:completion:]` and `-[BTClient saveCardWithRequest:success:failure:]` now take an extensible "request" object as an argument to pass the various raw card details: - * The previous signatures that accepted raw details in the arguments are now deprecated. - * These will be removed in the next major version (4.0.0). - -* Integration - * This SDK now officially supports integration without CocoaPods - * Please see `docs/Manual Integration.md` - * Report bugs with these new integration instructions via [Github](https://github.com/braintree/braintree_ios/issues/new) - * Project Organization - * All library code is now located under `/Braintree` - -* Bug fixes - * Fix a number of minor static analysis recommendations - * Avoid potential nil-block crasher - * Fix iOS 8 `CoreLocation` deprecation in `BTData` - * Fix double-dismisal bug in presentation of in-app PayPal login in Drop-in - -* New minimum requirements - * Xcode 6+ - * Base SDK iOS 8+ (still compatible with iOS 7+ deployment target) - -## 3.3.1 (2014-09-16) - -* Enhancements - * Update Kount library to 2.5.3, which removes use of IDFA - * Use @import for system frameworks -* Fixes - * Crasher in Drop-in that treats BTPaymentButton like a UIControl - * Xcode 6 and iOS 8 deprecations - * Bug in BTPaymentButton intrinsic size height calculation - * Autolayout ambiguity in demo app - -## 3.3.0 (2014-09-08) - -* Features - * App switch based payments for Venmo and PayPal ("One Touch") - * New methods for registering a URL Scheme: `+[Braintree setReturnURLScheme:]` and `+[Braintree handleOpenURL:]` - * PayPal continues to have a view controller option for in-app login - * Both providers can be enabled via the Control Panel and client-side overrides - * See [the docs](https://developers.braintreepayments.com/ios/guides/one-touch) for full upgrade instructions - * Unified Payment Button (`BTPaymentButton`) for Venmo and/or PayPal payments - * New UI and API designs for PayPal button - * All new Venmo button - * Unified mechanism for custom (headless) multi-provider payments (`BTPaymentProvider`) - -* Enhancements - * Minor fixes - * Test improvements - * Internal API tweaks - * Update PayPal implementation to always support PayPal display email/phone across client and server - * Your PayPal app (client ID) must now have the email scope capability. This is default for Braintree-provisioned PayPal apps. - * Improved Braintree-Demo app that demonstrates many integration styles - * Upgraded underlying PayPal Mobile SDK - -* Deprecations (For each item: deprecated functionality -> suggested replacement) - * `BTPayPalButton` -> `BTPaymentButton` - * `-[Braintree payPalButtonWithDelegate:]` -> `-[Braintree paymentButtonWithDelegate:]` - * `BTPayPalButtonDelegate` -> `BTPaymentCreationDelegate` - -* Known Issues - * Crasher when app switching to Venmo and `CFBundleDisplayName` is unavailable. - * Workaround: add a value for `CFBundleDisplayName` in your `Info.plist` - -## 3.2.0 (2014-09-02) - -* Update BTData (fraud) API to match Braintree-Data.js - * New method `collectDeviceData` provides a device data format that is identical to the JSON generated by Braintree-Data.js -* Minor improvements to developer demo app (Braintree Demo) - -## 3.1.3 (2014-08-22) - -* Fix another PayPal payment method display issue in Drop-in UI - -## 3.1.2 (2014-08-21) - -* Fixes - * Minor internationalization issue - * PayPal payment method display issue in Drop-in UI - -## 3.1.1 (2014-08-17) - -* Enhancements - * Accept four digit years in expiry field - * Internationalize - * Support iOS 8 SDK -* Integration changes - * Merge `api` and `API` directory content - * Deprecate `savePaypalPaymentMethodWithAuthCode:correlationId:success:failure` in favor of - `savePaypalPaymentMethodWithAuthCode:applicationCorrelationID:success:failure` - -## 3.1.0 (2014-07-22) - -* Integration Change: - * `Braintree/data` is no longer a default subspec. If you are currently using `BTData`, please add `pod "Braintree/data"` to your `Podfile`. - -## 3.0.1 (2014-07-21) - -* Enhancements - * Add support for [PayPal Application Correlation ID](https://github.com/paypal/PayPal-iOS-SDK/blob/master/docs/future_payments_mobile.md#obtain-an-application-correlation-id) - -## 3.0.0 (2014-07-09) - -Initial release of 3.0.0 - -https://www.braintreepayments.com/v.zero - -* Enhancements since rc8 - * Added details to DEVELOPMENT.md - * Updated demo app to not use removed card properties - * Updated PayPal acceptance tests - -## 3.0.0-rc8 - -* Breaking Change - * Renamed a method in `BTDropInViewControllerDelegate` to send - cancelation messages to user. All errors within Drop-in are now - handled internally with user interaction. - * Removed completion block interface on `BTDropInViewController` - * Removed crufty `BTMerchantIntegrationErrorUnknown` which was unused -* Enhancements - * Added basic analytics instrumentation - * Improved Drop-in's error handling - * BTPayPalPaymentMethod now implements `NSMutableCopying` - -## 3.0.0-rc7 - -* Breaking Change - * Based on feedback from our beta developers, we have removed the block-based interfaces from - Braintree and BTPayPalButton. - * If you were previously relying on the completion block for receiving a payment method nonce, - you should replace that code with a delegate method implementation which reads the nonce from - the BTPaymentMethod object it receives. - -* Bug fixes: - * Fix Braintree/PayPal subspec build - -## 3.0.0-rc6 - -* Bug fixes: - * Fix issue with incorrect nesting of credit-card params in API requests, which caused - incorrect behavior while validating credit cards in custom and Drop-in. - * Bugfixes and improvements to demo app - * Fix crasher in demo app when PayPal is not enabled - * Demo App now points to a publicly accessible merchant server - -* Enhancements: - * Drop-in now supports server-side validation, including CVV/AVS verification failure - * Drop-in's customer-facing error handling is now consistent and allows for retry - * Increased robustness of API layer - -* Features: - * :new: `BTData` - Advanced fraud solution based on Kount SDK - -## 3.0.0-rc5 - -* :rotating_light: Remove dependency on AFNetworking! -* :rotating_light: Rename `BTPayPalControl` -> `BTPayPalButton`. -* Security - Enforce SSL Pinning against a set of vendored SSL certificates -* Drop-in - * Improve visual customizability and respect tint color - * UI and Layout improvements - * Detailing and polish -* UI - * Float labels on credit card form fields - * Vibration upon critical validation errors :vibration_mode: - -Thanks for the feedback so far. Keep it coming! - -## 3.0.0-rc4 - -* UX/UI improvements in card form and Drop-in - * PayPal button and payment method view are full width - * Vibration on invalid entry - * Improved spinners and loading states - * Detailing and polish -* Add support for v2 client tokens, which are base64 encoded - * Reverse compatibility with v1 client tokens is still supported -* Clean up documentation - -## 3.0.0-rc3 - -* Fix crashes when adding PayPal an additional payment method, when displaying PayPal as a payment method, and in offline mode -* Add `dropInViewControllerWillComplete` delegate method. -* Add transitions, activity indicators, and streamline some parts of UI. -* Simplify implementation of `BTPayPalButton`. -* :rotating_light: Remove `BTDropInViewController shouldDisplayPaymentMethodsOnFile` property. - -## 3.0.0-rc2 - -* :rotating_light: Breaking API Changes :rotating_light: - * Reduce BTPayPalButton API - * Rename a number of classes, methods, and files, e.g. `BTCard` -> `BTCardPaymentMethod`. - -## 3.0.0-rc1 - -* First release candidate of the 3.0.0 version of the iOS SDK. -* Known issues: - * Pre-release public APIs - * SSL pinning not yet added - * Incomplete / unpolished UI - * Minor UX card validation issues in the card form - * Drop-in UX flow issues and unaddressed edge cases - diff --git a/examples/braintree/ios/Frameworks/Braintree/CONTRIBUTING.md b/examples/braintree/ios/Frameworks/Braintree/CONTRIBUTING.md deleted file mode 100755 index bbb3afb1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ -# Contribute - -Thanks for considering contributing to this project. Ways you can help: - -* [Create a pull request](https://help.github.com/articles/creating-a-pull-request) -* [Add an issue](https://github.com/braintree/braintree_ios/issues) -* [Contact us](README.md#feedback) with feedback - -## Development - -Clone this repo, then install the project's development dependencies: - -``` -gem install bundler -bundle install -``` - -This installs [CocoaPods](http://cocoapods.org/), which you can then use to obtain all the iOS dependencies: - -``` -pod install -``` - -Read our [development guidelines](DEVELOPMENT.md) to get a sense of how we think about working on this codebase. - -## Environments - -The architecture of the Client API means that you'll need to develop against a merchant server when developing braintree-ios. The merchant server uses a server side client library such as [`braintree_ruby`](https://github.com/braintree/braintree_ruby) to coordinate with a particular Braintree Gateway environment. The various Gateway environments, such as `development`, `sandbox` and `production`, in turn determine the specific behaviors around merchant accounts, credit cards, PayPal, etc. - - -## Tests - -Use [Rake](http://rake.rubyforge.org/) to run tests, generate docs, or create releases. To view available rake tasks: - -``` -rake -T -``` diff --git a/examples/braintree/ios/Frameworks/Braintree/DEVELOPMENT.md b/examples/braintree/ios/Frameworks/Braintree/DEVELOPMENT.md deleted file mode 100755 index 8876a29b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/DEVELOPMENT.md +++ /dev/null @@ -1,63 +0,0 @@ -# Braintree-iOS Development Notes - -This document outlines development practices that we follow internally while developing this SDK. - -## Development Merchant Server - -The included demo app utilizes a test merchant server hosted on heroku ([https://braintree-sample-merchant.herokuapp.com](https://braintree-sample-merchant.herokuapp.com)). It -produces client tokens that point to Braintree's Sandbox Environment. - -## Tests - -There are a number of test targets for each section of the project. You can run all tests on the command line with `bundle && rake spec:all`. - -It's a good idea to run `rake`, which runs all unit tests, before committing. - -The integration tests require a full Braintree stack running on localhost. - -## Architecture - -See [Frameworks](Frameworks.markdown) for an overview of the components that comprise this SDK. - -## Environmental Assumptions - -* See [Requirements](https://developers.braintreepayments.com/guides/client-sdk/setup/ios/v4#requirements) -* iPhone and iPad of all sizes and resolutions and the Simulator -* CocoaPods -* `BT` namespace is reserved for Braintree -* Host app does not integrate the [PayPal iOS SDK](https://github.com/paypal/paypal-ios-sdk) -* Host app does not integrate with the Kount SDK -* Host app does not integrate with [card.io](https://www.card.io/) -* Host app has a secure, authenticated server with a [Braintree server-side integration](https://developers.braintreepayments.com/ios/start/hello-server) - -## Committing - -* Commits should be small but atomic. Tests should always be passing; the product should always function appropriately. -* Commit messages should be concise and descriptive. -* Commit messages may reference the trello board by ID or URL. (Sorry, these are not externally viewable.) - -## Deployment and Code Organization - -* Code on master is assumed to be in a relatively good state at all times - * Tests should be passing, all demo apps should run - * Functionality and user experience should be cohesive - * Dead code should be kept to a minimum -* Versioned deployments are tagged with their version numbers - * Version numbers conform to [SEMVER](http://semver.org) - * These versions are more heavily tested - * We will provide support for these versions and commit to maintaining backwards compatibility on our servers -* Pull requests are welcome - * Feel free to create an issue on GitHub before investing development time -* As needed, the Braintree team may develop features privately - * If our internal and public branches get out of sync, we will reconcile this with merges (as opposed to rebasing) - * In general, we will try to develop in the open as much as possible - -## Releasing - -The release process is self-documented in a number of rake tasks. - -To release a new version of the SDK publicly, invoke an incantation that looks like this: - -```sh -rake release && rake publish && rake distribute -``` diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Braintree-Demo.entitlements b/examples/braintree/ios/Frameworks/Braintree/Demo/Braintree-Demo.entitlements deleted file mode 100755 index 8edb6509..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Braintree-Demo.entitlements +++ /dev/null @@ -1,11 +0,0 @@ - - - - - com.apple.developer.in-app-payments - - merchant.com.braintreepayments.Braintree-Demo - merchant.com.braintreepayments.sandbox.Braintree-Demo - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/project.pbxproj b/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/project.pbxproj deleted file mode 100755 index a5904795..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,371 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A74D4AF51BFBB3FB00BF36CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74D4AF41BFBB3FB00BF36CD /* AppDelegate.swift */; }; - A74D4AF71BFBB3FB00BF36CD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74D4AF61BFBB3FB00BF36CD /* ViewController.swift */; }; - A74D4AFA1BFBB3FB00BF36CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A74D4AF81BFBB3FB00BF36CD /* Main.storyboard */; }; - A74D4AFC1BFBB3FB00BF36CD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A74D4AFB1BFBB3FB00BF36CD /* Assets.xcassets */; }; - A74D4AFF1BFBB3FB00BF36CD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A74D4AFD1BFBB3FB00BF36CD /* LaunchScreen.storyboard */; }; - A74D4B341BFBBA1A00BF36CD /* Braintree3DSecure.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B271BFBB55600BF36CD /* Braintree3DSecure.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B361BFBBA1A00BF36CD /* BraintreeApplePay.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B281BFBB55600BF36CD /* BraintreeApplePay.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B381BFBBA1A00BF36CD /* BraintreeCard.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B291BFBB55600BF36CD /* BraintreeCard.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B3A1BFBBA1A00BF36CD /* BraintreeCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B251BFBB4C100BF36CD /* BraintreeCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B3C1BFBBA1A00BF36CD /* BraintreeDataCollector.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2A1BFBB55600BF36CD /* BraintreeDataCollector.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B3E1BFBBA1A00BF36CD /* BraintreePayPal.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2B1BFBB55600BF36CD /* BraintreePayPal.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A74D4B401BFBBA1A00BF36CD /* BraintreeUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2C1BFBB55600BF36CD /* BraintreeUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A77B38DB1BFBEE64002716C1 /* Braintree3DSecure.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B271BFBB55600BF36CD /* Braintree3DSecure.framework */; }; - A77B38DC1BFBEE64002716C1 /* BraintreeApplePay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B281BFBB55600BF36CD /* BraintreeApplePay.framework */; }; - A77B38DD1BFBEE64002716C1 /* BraintreeCard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B291BFBB55600BF36CD /* BraintreeCard.framework */; }; - A77B38DE1BFBEE64002716C1 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B251BFBB4C100BF36CD /* BraintreeCore.framework */; }; - A77B38DF1BFBEE64002716C1 /* BraintreeDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2A1BFBB55600BF36CD /* BraintreeDataCollector.framework */; }; - A77B38E01BFBEE64002716C1 /* BraintreePayPal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2B1BFBB55600BF36CD /* BraintreePayPal.framework */; }; - A77B38E11BFBEE64002716C1 /* BraintreeUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A74D4B2C1BFBB55600BF36CD /* BraintreeUI.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - A74D4B211BFBB46C00BF36CD /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - A74D4B3A1BFBBA1A00BF36CD /* BraintreeCore.framework in Embed Frameworks */, - A74D4B381BFBBA1A00BF36CD /* BraintreeCard.framework in Embed Frameworks */, - A74D4B341BFBBA1A00BF36CD /* Braintree3DSecure.framework in Embed Frameworks */, - A74D4B401BFBBA1A00BF36CD /* BraintreeUI.framework in Embed Frameworks */, - A74D4B361BFBBA1A00BF36CD /* BraintreeApplePay.framework in Embed Frameworks */, - A74D4B3E1BFBBA1A00BF36CD /* BraintreePayPal.framework in Embed Frameworks */, - A74D4B3C1BFBBA1A00BF36CD /* BraintreeDataCollector.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - A74D4AF11BFBB3FB00BF36CD /* CarthageTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarthageTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A74D4AF41BFBB3FB00BF36CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - A74D4AF61BFBB3FB00BF36CD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - A74D4AF91BFBB3FB00BF36CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - A74D4AFB1BFBB3FB00BF36CD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - A74D4AFE1BFBB3FB00BF36CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - A74D4B001BFBB3FB00BF36CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A74D4B251BFBB4C100BF36CD /* BraintreeCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeCore.framework; path = ../../Carthage/Build/iOS/BraintreeCore.framework; sourceTree = ""; }; - A74D4B271BFBB55600BF36CD /* Braintree3DSecure.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Braintree3DSecure.framework; path = ../../Carthage/Build/iOS/Braintree3DSecure.framework; sourceTree = ""; }; - A74D4B281BFBB55600BF36CD /* BraintreeApplePay.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeApplePay.framework; path = ../../Carthage/Build/iOS/BraintreeApplePay.framework; sourceTree = ""; }; - A74D4B291BFBB55600BF36CD /* BraintreeCard.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeCard.framework; path = ../../Carthage/Build/iOS/BraintreeCard.framework; sourceTree = ""; }; - A74D4B2A1BFBB55600BF36CD /* BraintreeDataCollector.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeDataCollector.framework; path = ../../Carthage/Build/iOS/BraintreeDataCollector.framework; sourceTree = ""; }; - A74D4B2B1BFBB55600BF36CD /* BraintreePayPal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreePayPal.framework; path = ../../Carthage/Build/iOS/BraintreePayPal.framework; sourceTree = ""; }; - A74D4B2C1BFBB55600BF36CD /* BraintreeUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeUI.framework; path = ../../Carthage/Build/iOS/BraintreeUI.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A74D4AEE1BFBB3FB00BF36CD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A77B38DB1BFBEE64002716C1 /* Braintree3DSecure.framework in Frameworks */, - A77B38DC1BFBEE64002716C1 /* BraintreeApplePay.framework in Frameworks */, - A77B38DD1BFBEE64002716C1 /* BraintreeCard.framework in Frameworks */, - A77B38DE1BFBEE64002716C1 /* BraintreeCore.framework in Frameworks */, - A77B38DF1BFBEE64002716C1 /* BraintreeDataCollector.framework in Frameworks */, - A77B38E01BFBEE64002716C1 /* BraintreePayPal.framework in Frameworks */, - A77B38E11BFBEE64002716C1 /* BraintreeUI.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A74D4AE81BFBB3FB00BF36CD = { - isa = PBXGroup; - children = ( - A74D4B271BFBB55600BF36CD /* Braintree3DSecure.framework */, - A74D4B281BFBB55600BF36CD /* BraintreeApplePay.framework */, - A74D4B291BFBB55600BF36CD /* BraintreeCard.framework */, - A74D4B251BFBB4C100BF36CD /* BraintreeCore.framework */, - A74D4B2A1BFBB55600BF36CD /* BraintreeDataCollector.framework */, - A74D4B2B1BFBB55600BF36CD /* BraintreePayPal.framework */, - A74D4B2C1BFBB55600BF36CD /* BraintreeUI.framework */, - A74D4AF31BFBB3FB00BF36CD /* CarthageTest */, - A74D4AF21BFBB3FB00BF36CD /* Products */, - ); - sourceTree = ""; - }; - A74D4AF21BFBB3FB00BF36CD /* Products */ = { - isa = PBXGroup; - children = ( - A74D4AF11BFBB3FB00BF36CD /* CarthageTest.app */, - ); - name = Products; - sourceTree = ""; - }; - A74D4AF31BFBB3FB00BF36CD /* CarthageTest */ = { - isa = PBXGroup; - children = ( - A74D4AF41BFBB3FB00BF36CD /* AppDelegate.swift */, - A74D4AF61BFBB3FB00BF36CD /* ViewController.swift */, - A74D4AF81BFBB3FB00BF36CD /* Main.storyboard */, - A74D4AFB1BFBB3FB00BF36CD /* Assets.xcassets */, - A74D4AFD1BFBB3FB00BF36CD /* LaunchScreen.storyboard */, - A74D4B001BFBB3FB00BF36CD /* Info.plist */, - ); - path = CarthageTest; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - A74D4AF01BFBB3FB00BF36CD /* CarthageTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = A74D4B031BFBB3FB00BF36CD /* Build configuration list for PBXNativeTarget "CarthageTest" */; - buildPhases = ( - A74D4AED1BFBB3FB00BF36CD /* Sources */, - A74D4AEE1BFBB3FB00BF36CD /* Frameworks */, - A74D4AEF1BFBB3FB00BF36CD /* Resources */, - A74D4B211BFBB46C00BF36CD /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CarthageTest; - productName = CarthageTest; - productReference = A74D4AF11BFBB3FB00BF36CD /* CarthageTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A74D4AE91BFBB3FB00BF36CD /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0830; - ORGANIZATIONNAME = Braintree; - TargetAttributes = { - A74D4AF01BFBB3FB00BF36CD = { - CreatedOnToolsVersion = 7.1.1; - DevelopmentTeam = 43253H4X22; - LastSwiftMigration = 0830; - }; - }; - }; - buildConfigurationList = A74D4AEC1BFBB3FB00BF36CD /* Build configuration list for PBXProject "CarthageTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = A74D4AE81BFBB3FB00BF36CD; - productRefGroup = A74D4AF21BFBB3FB00BF36CD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A74D4AF01BFBB3FB00BF36CD /* CarthageTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - A74D4AEF1BFBB3FB00BF36CD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A74D4AFF1BFBB3FB00BF36CD /* LaunchScreen.storyboard in Resources */, - A74D4AFC1BFBB3FB00BF36CD /* Assets.xcassets in Resources */, - A74D4AFA1BFBB3FB00BF36CD /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - A74D4AED1BFBB3FB00BF36CD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A74D4AF71BFBB3FB00BF36CD /* ViewController.swift in Sources */, - A74D4AF51BFBB3FB00BF36CD /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - A74D4AF81BFBB3FB00BF36CD /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - A74D4AF91BFBB3FB00BF36CD /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - A74D4AFD1BFBB3FB00BF36CD /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - A74D4AFE1BFBB3FB00BF36CD /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - A74D4B011BFBB3FB00BF36CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - A74D4B021BFBB3FB00BF36CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A74D4B041BFBB3FB00BF36CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 43253H4X22; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - "$(PROJECT_DIR)/../../Carthage/Build/iOS", - ); - INFOPLIST_FILE = CarthageTest/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.CarthageTest; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - A74D4B051BFBB3FB00BF36CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 43253H4X22; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - "$(PROJECT_DIR)/../../Carthage/Build/iOS", - ); - INFOPLIST_FILE = CarthageTest/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.CarthageTest; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A74D4AEC1BFBB3FB00BF36CD /* Build configuration list for PBXProject "CarthageTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A74D4B011BFBB3FB00BF36CD /* Debug */, - A74D4B021BFBB3FB00BF36CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A74D4B031BFBB3FB00BF36CD /* Build configuration list for PBXNativeTarget "CarthageTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A74D4B041BFBB3FB00BF36CD /* Debug */, - A74D4B051BFBB3FB00BF36CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A74D4AE91BFBB3FB00BF36CD /* Project object */; -} diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/AppDelegate.swift b/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/AppDelegate.swift deleted file mode 100755 index d386cb23..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/AppDelegate.swift +++ /dev/null @@ -1,38 +0,0 @@ -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - -} - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/ViewController.swift b/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/ViewController.swift deleted file mode 100755 index e4918404..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -import UIKit -import Braintree3DSecure -import BraintreeApplePay -import BraintreeCard -import BraintreeCore -import BraintreeDataCollector -import BraintreePayPal -import BraintreeUI - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.h deleted file mode 100755 index 19f757de..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -@interface BraintreeDemoBaseViewController : UIViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization NS_DESIGNATED_INITIALIZER; - -@property (nonatomic, weak) void (^progressBlock)(NSString *newStatus); -@property (nonatomic, weak) void (^completionBlock)(BTPaymentMethodNonce *paymentMethodNonce); -@property (nonatomic, weak) void (^transactionBlock)(); - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.m deleted file mode 100755 index 8120be21..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoBaseViewController.m +++ /dev/null @@ -1,21 +0,0 @@ -#import "BraintreeDemoBaseViewController.h" - -@implementation BraintreeDemoBaseViewController - -- (instancetype)initWithCoder:(__unused NSCoder *)aDecoder { - return [self initWithAuthorization:nil]; -} - -- (instancetype)initWithNibName:(__unused NSString *)nibNameOrNil bundle:(__unused NSBundle *)nibBundleOrNil { - return [self initWithAuthorization:nil]; -} - -- (instancetype)initWithAuthorization:(__unused NSString *)authorization { - if ([self class] == [BraintreeDemoBaseViewController class]) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Subclasses must override initWithAuthorization:" userInfo:nil]; - } - - return [super initWithNibName:nil bundle:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.h deleted file mode 100755 index 74d19999..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import "BraintreeDemoBaseViewController.h" -#import - -@interface BraintreeDemoPaymentButtonBaseViewController : BraintreeDemoBaseViewController - -@property (nonatomic, strong) BTAPIClient *apiClient; -@property (nonatomic, strong) UIView *paymentButton; - -/// A factory method that subclasses must implement to return a payment button view. -- (UIView *)createPaymentButton; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.m deleted file mode 100755 index 24d96f57..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Base View Controllers/BraintreeDemoPaymentButtonBaseViewController.m +++ /dev/null @@ -1,40 +0,0 @@ -#import "BraintreeDemoBTPaymentButtonViewController.h" -#import -#import "BraintreeDemoPaymentButtonBaseViewController.h" -#import - -@implementation BraintreeDemoPaymentButtonBaseViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization { - self = [super initWithAuthorization:authorization]; - if (self) { - self.apiClient = [[BTAPIClient alloc] initWithAuthorization:authorization]; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = @"Payment Button"; - - [self.view setBackgroundColor:[UIColor colorWithRed:250.0f/255.0f green:253.0f/255.0f blue:255.0f/255.0f alpha:1.0f]]; - - self.paymentButton = [self createPaymentButton]; - [self.view addSubview:self.paymentButton]; - - [self.paymentButton autoCenterInSuperviewMargins]; - // This margin is important for the Apple Pay button. - // BTPaymentButton looks fine without, but it's also not too terrible with it. - [self.paymentButton autoPinEdgeToSuperviewEdge:ALEdgeLeading withInset:20]; - [self.paymentButton autoPinEdgeToSuperviewEdge:ALEdgeTrailing withInset:20]; - [self.paymentButton autoSetDimension:ALDimensionHeight toSize:44 relation:NSLayoutRelationGreaterThanOrEqual]; -} - -- (UIView *)createPaymentButton { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"Subclasses of BraintreeDemoPaymentButtonViewController must override createPaymentButton. BraintreeDemoPaymentButtonViewController should not be initialized directly." - userInfo:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.h deleted file mode 100755 index 5a2be227..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -@interface BraintreeDemoAppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.m deleted file mode 100755 index 7fd941b8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoAppDelegate.m +++ /dev/null @@ -1,119 +0,0 @@ -#import "BraintreeDemoAppDelegate.h" -#import "BraintreeDemoSettings.h" -#import "BraintreeDemoSlideNavigationController.h" -#import "BraintreeDemoDemoContainmentViewController.h" -#import - -#if DEBUG -#import -#endif - -NSString *BraintreeDemoAppDelegatePaymentsURLScheme = @"com.braintreepayments.Demo.payments"; - -@implementation BraintreeDemoAppDelegate - -- (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions { - [self setupAppearance]; - [self registerDefaultsFromSettings]; - - [BTAppSwitch setReturnURLScheme:BraintreeDemoAppDelegatePaymentsURLScheme]; - - BraintreeDemoDemoContainmentViewController *rootViewController = [[BraintreeDemoDemoContainmentViewController alloc] init]; - BraintreeDemoSlideNavigationController *slideNav = [[BraintreeDemoSlideNavigationController alloc] initWithRootViewController:rootViewController]; - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - self.window.rootViewController = slideNav; - [self.window makeKeyAndVisible]; - return YES; -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 -- (BOOL)application:(__unused UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { - if ([[url.scheme lowercaseString] isEqualToString:[BraintreeDemoAppDelegatePaymentsURLScheme lowercaseString]]) { - return [BTAppSwitch handleOpenURL:url options:options]; - } - return YES; -} -#endif - -// Deprecated in iOS 9, but necessary to support < versions -- (BOOL)application:(__unused UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(__unused id)annotation { - if ([[url.scheme lowercaseString] isEqualToString:[BraintreeDemoAppDelegatePaymentsURLScheme lowercaseString]]) { - return [BTAppSwitch handleOpenURL:url sourceApplication:sourceApplication]; - } - return YES; -} - -- (void)setupAppearance { - UIColor *pleasantGray = [UIColor colorWithWhite:42/255.0f alpha:1.0f]; - - [[UIToolbar appearance] setBarTintColor:pleasantGray]; - [[UIToolbar appearance] setBarStyle:UIBarStyleBlackTranslucent]; -} - -- (void)registerDefaultsFromSettings { - // Check for testing arguments - if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-EnvironmentSandbox"]) { - [[NSUserDefaults standardUserDefaults] setInteger:BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant forKey:BraintreeDemoSettingsEnvironmentDefaultsKey]; - }else if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-EnvironmentProduction"]) { - [[NSUserDefaults standardUserDefaults] setInteger:BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant forKey:BraintreeDemoSettingsEnvironmentDefaultsKey]; - } - - if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-TokenizationKey"]) { - [[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"BraintreeDemoUseTokenizationKey"]; - }else if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-ClientToken"]) { - [[NSUserDefaults standardUserDefaults] setBool:FALSE forKey:@"BraintreeDemoUseTokenizationKey"]; - // Use random users for testing with Client Tokens - [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"BraintreeDemoCustomerIdentifier"]; - } - - [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"BraintreeDemoSettingsAuthorizationOverride"]; - for (NSString* arg in [[NSProcessInfo processInfo] arguments]) { - if ([arg rangeOfString:@"-Integration:"].location != NSNotFound) { - NSString* testIntegration = [arg stringByReplacingOccurrencesOfString:@"-Integration:" withString:@""]; - [[NSUserDefaults standardUserDefaults] setObject:testIntegration forKey:@"BraintreeDemoSettingsIntegration"]; - } else if ([arg rangeOfString:@"-Authorization:"].location != NSNotFound) { - NSString* testIntegration = [arg stringByReplacingOccurrencesOfString:@"-Authorization:" withString:@""]; - [[NSUserDefaults standardUserDefaults] setObject:testIntegration forKey:@"BraintreeDemoSettingsAuthorizationOverride"]; - } - } - - if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-ClientTokenVersion2"]) { - [[NSUserDefaults standardUserDefaults] setObject:@"2" forKey:@"BraintreeDemoSettingsClientTokenVersionDefaultsKey"]; - }else if ([[[NSProcessInfo processInfo] arguments] containsObject:@"-ClientTokenVersion3"]) { - [[NSUserDefaults standardUserDefaults] setObject:@"3" forKey:@"BraintreeDemoSettingsClientTokenVersionDefaultsKey"]; - } - // End checking for testing arguments - - - NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"]; - if(!settingsBundle) { - NSLog(@"Could not find Settings.bundle"); - return; - } - - NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]]; - NSArray *preferences = [settings objectForKey:@"PreferenceSpecifiers"]; - - NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]]; - for (NSDictionary *prefSpecification in preferences) { - NSString *key = [prefSpecification objectForKey:@"Key"]; - if(key && [[prefSpecification allKeys] containsObject:@"DefaultValue"]) { - [defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key]; - } - } - - [[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister]; -} - - -#if DEBUG -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [super touchesBegan:touches withEvent:event]; - CGPoint location = [[[event allTouches] anyObject] locationInView:[self window]]; - if(location.y > 0 && location.y < [[UIApplication sharedApplication] statusBarFrame].size.height) { - [[FLEXManager sharedManager] showExplorer]; - } -} -#endif - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.h deleted file mode 100755 index 8bdb6bfa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface BraintreeDemoDemoContainmentViewController : UIViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.m deleted file mode 100755 index e59a8a7d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoDemoContainmentViewController.m +++ /dev/null @@ -1,285 +0,0 @@ -#import "BraintreeDemoDemoContainmentViewController.h" - -#import -#import -#import -#import - -#import "BraintreeDemoMerchantAPI.h" -#import "BraintreeDemoBaseViewController.h" -#import "BraintreeDemoIntegrationViewController.h" -#import "BraintreeDemoSlideNavigationController.h" -#import "BraintreeDemoSettings.h" - -@interface BraintreeDemoDemoContainmentViewController () -@property (nonatomic, strong) UIBarButtonItem *statusItem; -@property (nonatomic, strong) BTPaymentMethodNonce *latestTokenizedPayment; -@property (nonatomic, strong) BraintreeDemoBaseViewController *currentDemoViewController; -@property (nonatomic, strong) UIViewController *rightMenu; -@end - -@implementation BraintreeDemoDemoContainmentViewController - -- (void)viewDidLoad { - self.title = @"Braintree"; - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action: @selector(tappedRefresh)]; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStylePlain target:self action: @selector(tappedSettings)]; - self.view.backgroundColor = [UIColor whiteColor]; - [self.navigationController setToolbarHidden:NO]; - [super viewDidLoad]; - [self setupToolbar]; - [self reloadIntegration]; - [self setupRightMenu]; -} - -- (void)setupToolbar { - UIBarButtonItem *flexSpaceLeft = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace - target:nil - action:nil]; - UIBarButtonItem *flexSpaceRight = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace - target:nil - action:nil]; - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - button.titleLabel.numberOfLines = 0; - [button setTitle:@"Ready" forState:UIControlStateNormal]; - [button.titleLabel setTextColor:[UIColor whiteColor]]; - [button addTarget:self action:@selector(tappedStatus) forControlEvents:UIControlEventTouchUpInside]; - button.titleLabel.textAlignment = NSTextAlignmentCenter; - button.titleLabel.font = [UIFont systemFontOfSize:14]; - CGRect f = self.navigationController.navigationBar.frame; - [button setFrame:CGRectMake(0, 0, f.size.width, f.size.height)]; - // Use custom view with button so the text can span multiple lines - self.statusItem = [[UIBarButtonItem alloc] initWithCustomView:button]; - self.statusItem.enabled = NO; - self.toolbarItems = @[flexSpaceLeft, self.statusItem, flexSpaceRight]; -} - -- (void)setupRightMenu { - BraintreeDemoIntegrationViewController *ivc = [[BraintreeDemoIntegrationViewController alloc] init]; - ivc.delegate = self; - UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:ivc]; - self.rightMenu = nc; - [BraintreeDemoSlideNavigationController sharedInstance].rightMenu = self.rightMenu; -} - -- (BOOL)slideNavigationControllerShouldDisplayRightMenu { - return YES; -} - - -#pragma mark - UI Updates - -- (void)setLatestTokenizedPayment:(id)latestPaymentMethodOrNonce { - _latestTokenizedPayment = latestPaymentMethodOrNonce; - - if (latestPaymentMethodOrNonce) { - self.statusItem.enabled = YES; - } -} - -- (void)updateStatus:(NSString *)status { - [(UIButton *)self.statusItem.customView setTitle:status forState:UIControlStateNormal]; - NSLog(@"%@", ((UIButton *)self.statusItem.customView).titleLabel.text); -} - - -#pragma mark - UI Handlers - -- (void)tappedStatus { - NSLog(@"Tapped status!"); - - if (self.latestTokenizedPayment) { - NSString *nonce = self.latestTokenizedPayment.nonce; - [self updateStatus:@"Creating Transaction…"]; - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; - if ([self.latestTokenizedPayment.type isEqualToString:@"UnionPay"]){ - [[BraintreeDemoMerchantAPI sharedService] makeTransactionWithPaymentMethodNonce:nonce - merchantAccountId:@"fake_switch_usd" - completion:^(NSString *transactionId, NSError *error){ - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - self.latestTokenizedPayment = nil; - if (error) { - [self updateStatus:error.localizedDescription]; - } else { - [self updateStatus:transactionId]; - } - }]; - } else { - [[BraintreeDemoMerchantAPI sharedService] makeTransactionWithPaymentMethodNonce:nonce - completion:^(NSString *transactionId, NSError *error){ - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - self.latestTokenizedPayment = nil; - if (error) { - [self updateStatus:error.localizedDescription]; - } else { - [self updateStatus:transactionId]; - } - }]; - } - } -} - -- (IBAction)tappedRefresh { - [self reloadIntegration]; -} - -- (IBAction)tappedSettings { - IASKAppSettingsViewController *appSettingsViewController = [[IASKAppSettingsViewController alloc] init]; - appSettingsViewController.delegate = self; - UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:appSettingsViewController]; - [self presentViewController:nav animated:YES completion:nil]; -} - - -#pragma mark - Demo Integration Lifecycle - - -- (void)reloadIntegration { - if (self.currentDemoViewController) { - [self.currentDemoViewController willMoveToParentViewController:nil]; - [self.currentDemoViewController removeFromParentViewController]; - [self.currentDemoViewController.view removeFromSuperview]; - } - - self.title = @"Braintree"; - - if ([BraintreeDemoSettings authorizationOverride]) { - self.currentDemoViewController = [self instantiateCurrentIntegrationViewControllerWithAuthorization:[BraintreeDemoSettings authorizationOverride]]; - return; - } - - if ([BraintreeDemoSettings useTokenizationKey]) { - [self updateStatus:@"Using Tokenization Key"]; - - // If we're using a Tokenization Key, then we're not using a Customer. - NSString *tokenizationKey; - switch ([BraintreeDemoSettings currentEnvironment]) { - case BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant: - tokenizationKey = @"sandbox_9dbg82cq_dcpspy2brwdjr3qn"; - break; - case BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant: - tokenizationKey = @"production_t2wns2y2_dfy45jdj3dxkmz5m"; - break; - case BraintreeDemoTransactionServiceEnvironmentCustomMerchant: - default: - tokenizationKey = @"development_testing_integration_merchant_id"; - break; - } - - self.currentDemoViewController = [self instantiateCurrentIntegrationViewControllerWithAuthorization:tokenizationKey]; - return; - } - - [self updateStatus:@"Fetching Client Token…"]; - - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; - - [[BraintreeDemoMerchantAPI sharedService] createCustomerAndFetchClientTokenWithCompletion:^(NSString *clientToken, NSError *error) { - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - if (error) { - [self updateStatus:error.localizedDescription]; - } else { - [self updateStatus:@"Using Client Token"]; - self.currentDemoViewController = [self instantiateCurrentIntegrationViewControllerWithAuthorization:clientToken]; - } - }]; -} - -- (void)setCurrentDemoViewController:(BraintreeDemoBaseViewController *)currentDemoViewController { - _currentDemoViewController = currentDemoViewController; - - if (!_currentDemoViewController) { - [self updateStatus:@"Demo not available"]; - return; - } - - [self updateStatus:[NSString stringWithFormat:@"Presenting %@", NSStringFromClass([_currentDemoViewController class])]]; - _currentDemoViewController.progressBlock = [self progressBlock]; - _currentDemoViewController.completionBlock = [self completionBlock]; - _currentDemoViewController.transactionBlock = [self transactionBlock]; - - [self containIntegrationViewController:_currentDemoViewController]; - - self.title = _currentDemoViewController.title; -} - -- (BraintreeDemoBaseViewController *)instantiateCurrentIntegrationViewControllerWithAuthorization:(NSString *)authorization { - NSString *integrationName = [[NSUserDefaults standardUserDefaults] stringForKey:@"BraintreeDemoSettingsIntegration"]; - NSLog(@"Loading integration: %@", integrationName); - - Class integrationClass = NSClassFromString(integrationName); - if (![integrationClass isSubclassOfClass:[BraintreeDemoBaseViewController class]]) { - NSLog(@"%@ is not a valid BraintreeDemoBaseViewController", integrationName); - return nil; - } - - return [(BraintreeDemoBaseViewController *)[integrationClass alloc] initWithAuthorization:authorization]; -} - -- (void)containIntegrationViewController:(UIViewController *)viewController { - [self addChildViewController:viewController]; - - [self.view addSubview:viewController.view]; - - [viewController.view autoPinToTopLayoutGuideOfViewController:self withInset:0]; - [viewController.view autoPinToBottomLayoutGuideOfViewController:self withInset:0]; - [viewController.view autoPinEdgeToSuperviewEdge:ALEdgeLeading]; - [viewController.view autoPinEdgeToSuperviewEdge:ALEdgeTrailing]; - - [viewController didMoveToParentViewController:self]; -} - - -#pragma mark - Progress and Completion Blocks - -- (void (^)(NSString *message))progressBlock { - // This class is responsible for retaining the progress block - static id block; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - block = ^(NSString *message){ - [self updateStatus:message]; - }; - }); - return block; -} - -- (void (^)(BTPaymentMethodNonce *tokenized))completionBlock { - // This class is responsible for retaining the completion block - static id block; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - block = ^(id tokenized){ - self.latestTokenizedPayment = tokenized; - [self updateStatus:[NSString stringWithFormat:@"Got a nonce. Tap to make a transaction."]]; - }; - }); - return block; -} - -- (void (^)())transactionBlock { - // This class is responsible for retaining the completion block - static id block; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - block = ^(){ - [self tappedStatus]; - }; - }); - return block; -} - -#pragma mark IASKSettingsDelegate - -- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender { - [sender dismissViewControllerAnimated:YES completion:nil]; - [self reloadIntegration]; -} - -#pragma mark IntegrationViewControllerDelegate - -- (void)integrationViewController:(__unused BraintreeDemoIntegrationViewController *)integrationViewController didChangeAppSetting:(__unused NSDictionary *)appSetting { - [self reloadIntegration]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.h deleted file mode 100755 index 33d50698..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -#import - -@class BraintreeDemoIntegrationViewController; - -@protocol IntegrationViewControllerDelegate - -- (void)integrationViewController:(BraintreeDemoIntegrationViewController *)integrationViewController didChangeAppSetting:(NSDictionary *)appSetting; - -@end - -@interface BraintreeDemoIntegrationViewController : UIViewController - -@property (nonatomic, weak) id delegate; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.m deleted file mode 100755 index 6b6520e9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoIntegrationViewController.m +++ /dev/null @@ -1,63 +0,0 @@ -#import "BraintreeDemoIntegrationViewController.h" -#import -#import -#import -#import -#import - -@interface BraintreeDemoIntegrationViewController () -@property (nonatomic, strong) IASKSpecifierValuesViewController *targetViewController; -@property (nonatomic, strong) IASKAppSettingsViewController *appSettingsViewController; -@property (nonatomic, strong) IASKSpecifier *specifier; -@end - -@implementation BraintreeDemoIntegrationViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"Integrations"; - - // Integrations table view - self.targetViewController = [[IASKSpecifierValuesViewController alloc] init]; - self.appSettingsViewController = [[IASKAppSettingsViewController alloc] init]; - self.appSettingsViewController.delegate = self; - - // Find the "Integration" specifier - IASKSettingsReader *reader = self.appSettingsViewController.settingsReader; - for (NSInteger section = 0; section < reader.numberOfSections; section++) { - for (NSInteger row = 0; row < [reader numberOfRowsForSection:section]; row++) { - IASKSpecifier *specifier = [reader specifierForIndexPath:[NSIndexPath indexPathForRow:row inSection:section]]; - if ([specifier.title isEqualToString:@"Integration"]) { - self.specifier = specifier; - break; - } - } - } - - [self.targetViewController setCurrentSpecifier:self.specifier]; - self.targetViewController.settingsReader = reader; - self.targetViewController.settingsStore = self.appSettingsViewController.settingsStore; - IASK_IF_IOS7_OR_GREATER(self.targetViewController.view.tintColor = self.appSettingsViewController.view.tintColor;) - - // Add table view to self - SlideNavigationController *snc = [SlideNavigationController sharedInstance]; - self.edgesForExtendedLayout = UIRectEdgeNone; - self.targetViewController.view.frame = CGRectMake(snc.portraitSlideOffset, 0, self.view.bounds.size.width - snc.portraitSlideOffset, self.view.bounds.size.height); - [self.targetViewController viewWillAppear:NO]; // required. not animated - [self.view addSubview:self.targetViewController.view]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appSettingChangedNotification:) name:kIASKAppSettingChanged object:nil]; -} - -- (void)appSettingChangedNotification:(NSNotification *)notification { - SlideNavigationController *snc = [SlideNavigationController sharedInstance]; - if (snc.isMenuOpen) { - [self.delegate integrationViewController:self didChangeAppSetting:notification.userInfo]; - [snc closeMenuWithCompletion:nil]; - } -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.h deleted file mode 100755 index 91763d31..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "SlideNavigationController.h" - -@interface BraintreeDemoSlideNavigationController : SlideNavigationController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.m deleted file mode 100755 index d82afb8c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/BraintreeDemoSlideNavigationController.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "BraintreeDemoSlideNavigationController.h" - -@implementation BraintreeDemoSlideNavigationController - -- (void)navigationController:(__unused UINavigationController *)navigationController - willShowViewController:(__unused UIViewController *)viewController - animated:(__unused BOOL)animated -{} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Launch Screen.storyboard b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Launch Screen.storyboard deleted file mode 100755 index 822ad78b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Launch Screen.storyboard +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.h deleted file mode 100755 index ed51d91a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.h +++ /dev/null @@ -1,32 +0,0 @@ -#import - -extern NSString *BraintreeDemoSettingsEnvironmentDefaultsKey; -extern NSString *BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey; -extern NSString *BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey; - -typedef NS_ENUM(NSInteger, BraintreeDemoTransactionServiceEnvironment) { - BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant = 0, - BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant = 1, - BraintreeDemoTransactionServiceEnvironmentCustomMerchant = 2, -}; - -typedef NS_ENUM(NSInteger, BraintreeDemoTransactionServiceThreeDSecureRequiredStatus) { - BraintreeDemoTransactionServiceThreeDSecureRequiredStatusDefault = 0, - BraintreeDemoTransactionServiceThreeDSecureRequiredStatusRequired = 1, - BraintreeDemoTransactionServiceThreeDSecureRequiredStatusNotRequired = 2, -}; - -@interface BraintreeDemoSettings : NSObject - -+ (BraintreeDemoTransactionServiceEnvironment)currentEnvironment; -+ (NSString *)currentEnvironmentName; -+ (NSString *)currentEnvironmentURLString; -+ (NSString *)authorizationOverride; -+ (BOOL)useTokenizationKey; -+ (BraintreeDemoTransactionServiceThreeDSecureRequiredStatus)threeDSecureRequiredStatus; -+ (BOOL)useModalPresentation; -+ (BOOL)customerPresent; -+ (NSString *)customerIdentifier; -+ (NSString *)clientTokenVersion; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.m deleted file mode 100755 index e16bd2c6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/BraintreeDemoSettings.m +++ /dev/null @@ -1,69 +0,0 @@ -#import "BraintreeDemoSettings.h" - -NSString *BraintreeDemoSettingsEnvironmentDefaultsKey = @"BraintreeDemoSettingsEnvironmentDefaultsKey"; -NSString *BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey = @"BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey"; -NSString *BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey = @"BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey"; - -@implementation BraintreeDemoSettings - -+ (BraintreeDemoTransactionServiceEnvironment)currentEnvironment { - return [[NSUserDefaults standardUserDefaults] integerForKey:BraintreeDemoSettingsEnvironmentDefaultsKey]; -} - -+ (NSString *)currentEnvironmentName { - BraintreeDemoTransactionServiceEnvironment env = [self currentEnvironment]; - switch (env) { - case BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant: - return @"Sandbox"; - case BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant: - return @"Production"; - case BraintreeDemoTransactionServiceEnvironmentCustomMerchant: { - NSString *shortTitle = [[NSUserDefaults standardUserDefaults] stringForKey:BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey]; - shortTitle = [[shortTitle stringByReplacingOccurrencesOfString:@"http://" withString:@""] stringByReplacingOccurrencesOfString:@"https://" withString:@""]; - return shortTitle; - } - } - return @"(invalid)"; -} - -+ (NSString *)currentEnvironmentURLString { - switch ([self currentEnvironment]) { - case BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant: - return @"https://braintree-sample-merchant.herokuapp.com"; - case BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant: - return @"https://executive-sample-merchant.herokuapp.com"; - case BraintreeDemoTransactionServiceEnvironmentCustomMerchant: - return [[NSUserDefaults standardUserDefaults] stringForKey:BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey]; - } -} - -+ (NSString *)authorizationOverride { - return [[NSUserDefaults standardUserDefaults] stringForKey:@"BraintreeDemoSettingsAuthorizationOverride"]; -} - -+ (BOOL)useTokenizationKey { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"BraintreeDemoUseTokenizationKey"]; -} - -+ (BraintreeDemoTransactionServiceThreeDSecureRequiredStatus)threeDSecureRequiredStatus { - return [[NSUserDefaults standardUserDefaults] integerForKey:BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey]; -} - -+ (BOOL)useModalPresentation { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"BraintreeDemoChooserViewControllerShouldUseModalPresentationDefaultsKey"]; -} - - -+ (BOOL)customerPresent { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"BraintreeDemoCustomerPresent"]; -} - -+ (NSString *)customerIdentifier { - return [[NSUserDefaults standardUserDefaults] stringForKey:@"BraintreeDemoCustomerIdentifier"]; -} - -+ (NSString *)clientTokenVersion { - return [[NSUserDefaults standardUserDefaults] stringForKey:@"BraintreeDemoSettingsClientTokenVersionDefaultsKey"]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/Settings.bundle/Root.plist b/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/Settings.bundle/Root.plist deleted file mode 100755 index 1f072f32..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Demo Base/Settings/Settings.bundle/Root.plist +++ /dev/null @@ -1,228 +0,0 @@ - - - - - PreferenceSpecifiers - - - Type - PSMultiValueSpecifier - DisplaySortedByTitle - - Title - Integration - Key - BraintreeDemoSettingsIntegration - DefaultValue - BraintreeDemoDropInViewController - Titles - - Drop In (Legacy) - PayPal - Future Payment - PayPal - Billing Agreement - PayPal - Scopes - PayPal - One-Time Payment - Credit Card Tokenization - Combined - BTPaymentButton - PayPal - BTUIPayPalButton - Venmo - BTUIVenmoButton - Venmo - Custom Button - PayPal - Custom Button - Apple Pay - PassKit - Drop In - UI Components - Credit Cards - 3D Secure - Combined - Custom Button - Fraud Protection - BTDataCollector - UnionPay - PayPal Credit - - Values - - BraintreeDemoDropInLegacyViewController - BraintreeDemoPayPalForceFuturePaymentViewController - BraintreeDemoPayPalBillingAgreementViewController - BraintreeDemoPayPalScopesViewController - BraintreeDemoPayPalOneTimePaymentViewController - BraintreeDemoCardTokenizationViewController - BraintreeDemoBTPaymentButtonViewController - BraintreeDemoBTUIPayPalButtonViewController - BraintreeDemoBTUIVenmoButtonViewController - BraintreeDemoCustomVenmoButtonViewController - BraintreeDemoCustomPayPalButtonViewController - BraintreeDemoApplePayPassKitViewController - BraintreeDemoDropInViewController - BraintreeDemoUIWidgetsViewController - BraintreeDemoThreeDSecureViewController - BraintreeDemoCustomMultiPayViewController - BraintreeDemoBTDataCollectorViewController - BraintreeDemoUnionPayViewController - BraintreeDemoPayPalCreditPaymentViewController - - - - Type - PSMultiValueSpecifier - Title - Environment - Key - BraintreeDemoSettingsEnvironmentDefaultsKey - DefaultValue - 0 - ShortTitles - - Sandbox - Production - Custom (enter below) - - Titles - - Sandbox (braintree-sample-merchant) - Production (executive-sample-merchant) - Custom (URL on previous screen) - - Values - - 0 - 1 - 2 - - - - Type - PSTextFieldSpecifier - Title - Custom Base URL - Key - BraintreeDemoSettingsCustomEnvironmentURLDefaultsKey - IASKTextAlignment - IASKUITextAlignmentRight - - - Type - PSToggleSwitchSpecifier - Title - Use Tokenization Key - Key - BraintreeDemoUseTokenizationKey - DefaultValue - - - - Type - PSGroupSpecifier - Title - Customer - - - Type - PSToggleSwitchSpecifier - Title - Include Customer in Client Token - Key - BraintreeDemoCustomerPresent - DefaultValue - - - - Type - PSTextFieldSpecifier - Title - Customer ID (Random if Blank) - Key - BraintreeDemoCustomerIdentifier - - - Type - PSGroupSpecifier - Title - 3D Secure - - - Type - PSMultiValueSpecifier - Title - Required (3DS Transaction Option) - Key - BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey - Values - - 0 - 1 - 2 - - DefaultValue - 0 - Titles - - Default (Required if 3DS Verification present) - Required - Optional (required = false) - - ShortTitles - - Default - Required - Optional - - - - Type - PSGroupSpecifier - Title - UX - - - Type - PSToggleSwitchSpecifier - DefaultValue - - Title - Modal Presentation - Key - BraintreeDemoChooserViewControllerShouldUseModalPresentationDefaultsKey - - - Type - PSToggleSwitchSpecifier - Title - Coinbase Disabled - Key - BraintreeDemoCoinbaseDisabledDefaultsKey - DefaultValue - - - - Type - PSGroupSpecifier - Title - Client Token Version - - - Type - PSMultiValueSpecifier - Title - Client Token Version - Key - BraintreeDemoSettingsClientTokenVersionDefaultsKey - Values - - 2 - 3 - - DefaultValue - 2 - Titles - - v2 - v3 - - ShortTitles - - v2 - v3 - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.h deleted file mode 100755 index 74dc2ad0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoApplePayPassKitViewController : BraintreeDemoPaymentButtonBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.m deleted file mode 100755 index cfb49473..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Apple Pay - PassKit/BraintreeDemoApplePayPassKitViewController.m +++ /dev/null @@ -1,183 +0,0 @@ -#import "BraintreeDemoApplePayPassKitViewController.h" -#import "BraintreeDemoSettings.h" -#import -#import - -@import PassKit; - -@interface BraintreeDemoApplePayPassKitViewController () -@property (nonatomic, strong) UILabel *label; -@property (nonatomic, strong) BTApplePayClient *applePayClient; -@end - -@implementation BraintreeDemoApplePayPassKitViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.applePayClient = [[BTApplePayClient alloc] initWithAPIClient:self.apiClient]; - - self.label = [[UILabel alloc] init]; - self.label.numberOfLines = 1; - self.label.textAlignment = NSTextAlignmentCenter; - [self.view addSubview:self.label]; - - if (self.paymentButton) { - [self.label autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.paymentButton withOffset:8]; - [self.label autoPinEdgeToSuperviewEdge:ALEdgeLeft]; - [self.label autoPinEdgeToSuperviewEdge:ALEdgeRight]; - [self.label autoAlignAxisToSuperviewMarginAxis:ALAxisVertical]; - } - - self.title = @"Apple Pay via PassKit"; -} - -- (UIControl *)createPaymentButton { - if (![PKPaymentAuthorizationViewController class]) { - self.progressBlock(@"Apple Pay is not available on this version of iOS"); - return nil; - } - if (![PKPaymentAuthorizationViewController canMakePayments]) { - self.progressBlock(@"canMakePayments returns NO, hiding Apple Pay button"); - return nil; - } - - // Discover and PrivateLabel were added in iOS 9.0 - // At this time, we have not tested these options - if (![PKPaymentAuthorizationViewController canMakePayments]) { - self.progressBlock(@"canMakePayments returns NO, hiding Apple Pay button"); - return nil; - } - - UIButton *button; - BOOL pkPaymentButtonAvailable = NO; - - // When compiling with an iOS 8.3 or higher SDK, we can check for - // the PKPaymentButton, which was added in iOS 8.3. Note that we - // still need to check, because the deployment target may be < 8.3 -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80300 - pkPaymentButtonAvailable = [PKPaymentButton class] != nil; - if (pkPaymentButtonAvailable) { - button = [PKPaymentButton buttonWithType:PKPaymentButtonTypePlain style:PKPaymentButtonStyleBlack]; - } -#endif - // If we're compiling with an older version of the iOS SDK (very rare), - // we should not use the `PKPaymentButton` at all - not even to check - // whether it's available. - if (pkPaymentButtonAvailable == NO) { - // Create a custom button - button = [UIButton buttonWithType:UIButtonTypeSystem]; - [button setTintColor:[UIColor blackColor]]; - [button.titleLabel setFont:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:36]]; - [button setTitle:@"PAY WITH APPLE PAY" forState:UIControlStateNormal]; - } - [button addTarget:self action:@selector(tappedApplePayButton) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedApplePayButton { - self.progressBlock(@"Constructing PKPaymentRequest"); - - [self.applePayClient paymentRequest:^(PKPaymentRequest * _Nullable paymentRequest, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - return; - } - - // Requiring PKAddressFieldPostalAddress crashes Simulator - //paymentRequest.requiredBillingAddressFields = PKAddressFieldName|PKAddressFieldPostalAddress; - paymentRequest.requiredBillingAddressFields = PKAddressFieldName; - - PKShippingMethod *shippingMethod1 = [PKShippingMethod summaryItemWithLabel:@"✈️ Fast Shipping" amount:[NSDecimalNumber decimalNumberWithString:@"4.99"]]; - shippingMethod1.detail = @"Fast but expensive"; - shippingMethod1.identifier = @"fast"; - PKShippingMethod *shippingMethod2 = [PKShippingMethod summaryItemWithLabel:@"🐢 Slow Shipping" amount:[NSDecimalNumber decimalNumberWithString:@"0.00"]]; - shippingMethod2.detail = @"Slow but free"; - shippingMethod2.identifier = @"slow"; - PKShippingMethod *shippingMethod3 = [PKShippingMethod summaryItemWithLabel:@"💣 Unavailable Shipping" amount:[NSDecimalNumber decimalNumberWithString:@"0xdeadbeef"]]; - shippingMethod3.detail = @"It will make Apple Pay fail"; - shippingMethod3.identifier = @"fail"; - paymentRequest.shippingMethods = @[shippingMethod1, shippingMethod2, shippingMethod3]; - paymentRequest.requiredShippingAddressFields = PKAddressFieldAll; - paymentRequest.paymentSummaryItems = @[ - [PKPaymentSummaryItem summaryItemWithLabel:@"SOME ITEM" amount:[NSDecimalNumber decimalNumberWithString:@"10"]], - [PKPaymentSummaryItem summaryItemWithLabel:@"SHIPPING" amount:shippingMethod1.amount], - [PKPaymentSummaryItem summaryItemWithLabel:@"BRAINTREE" amount:[NSDecimalNumber decimalNumberWithString:@"14.99"]] - ]; - - paymentRequest.merchantCapabilities = PKMerchantCapability3DS; - if ([paymentRequest respondsToSelector:@selector(setShippingType:)]) { - paymentRequest.shippingType = PKShippingTypeDelivery; - } - - PKPaymentAuthorizationViewController *viewController = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:paymentRequest]; - viewController.delegate = self; - - self.progressBlock(@"Presenting Apple Pay Sheet"); - [self presentViewController:viewController animated:YES completion:nil]; - }]; -} - - -#pragma mark PKPaymentAuthorizationViewControllerDelegate - -- (void)paymentAuthorizationViewControllerDidFinish:(__unused PKPaymentAuthorizationViewController *)controller { - [controller dismissViewControllerAnimated:YES completion:nil]; -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment handler:(void (^)(PKPaymentAuthorizationResult * _Nonnull))completion { - self.progressBlock(@"Apple Pay Did Authorize Payment"); - [self.applePayClient tokenizeApplePayPayment:payment completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - completion([[PKPaymentAuthorizationResult alloc] initWithStatus:PKPaymentAuthorizationStatusFailure errors:nil]); - } else { - self.label.text = tokenizedApplePayPayment.nonce; - self.completionBlock(tokenizedApplePayPayment); - completion([[PKPaymentAuthorizationResult alloc] initWithStatus:PKPaymentAuthorizationStatusSuccess errors:nil]); - } - }]; -} -#endif - -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller - didAuthorizePayment:(PKPayment *)payment - completion:(void (^)(PKPaymentAuthorizationStatus status))completion { - self.progressBlock(@"Apple Pay Did Authorize Payment"); - [self.applePayClient tokenizeApplePayPayment:payment completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - completion(PKPaymentAuthorizationStatusFailure); - } else { - self.label.text = tokenizedApplePayPayment.nonce; - self.completionBlock(tokenizedApplePayPayment); - completion(PKPaymentAuthorizationStatusSuccess); - } - }]; -} - -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller - didSelectShippingMethod:(PKShippingMethod *)shippingMethod - completion:(void (^)(PKPaymentAuthorizationStatus, NSArray * _Nonnull))completion -{ - PKPaymentSummaryItem *testItem = [PKPaymentSummaryItem summaryItemWithLabel:@"SOME ITEM" amount:[NSDecimalNumber decimalNumberWithString:@"10"]]; - if ([shippingMethod.identifier isEqualToString:@"fast"]) { - completion(PKPaymentAuthorizationStatusSuccess, - @[ - testItem, - [PKPaymentSummaryItem summaryItemWithLabel:@"SHIPPING" amount:shippingMethod.amount], - [PKPaymentSummaryItem summaryItemWithLabel:@"BRAINTREE" amount:[testItem.amount decimalNumberByAdding:shippingMethod.amount]], - ]); - } else if ([shippingMethod.identifier isEqualToString:@"fail"]) { - completion(PKPaymentAuthorizationStatusFailure, @[testItem]); - } else { - completion(PKPaymentAuthorizationStatusSuccess, @[testItem]); - } -} - -- (void)paymentAuthorizationViewControllerWillAuthorizePayment:(__unused PKPaymentAuthorizationViewController *)controller { - self.progressBlock(@"Apple Pay will Authorize Payment"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.h deleted file mode 100755 index 4b25a39b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.h +++ /dev/null @@ -1,8 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoBTPaymentButtonViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.m deleted file mode 100755 index 1092c61c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - BTPaymentButton/BraintreeDemoBTPaymentButtonViewController.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "BraintreeDemoBTPaymentButtonViewController.h" -#import -#import -#import - -@interface BraintreeDemoBTPaymentButtonViewController () -@end - -@implementation BraintreeDemoBTPaymentButtonViewController - -- (UIView *)createPaymentButton { - BTPaymentButton *paymentButton = [[BTPaymentButton alloc] initWithAPIClient:self.apiClient completion:^(BTPaymentMethodNonce *paymentMethodNonce, NSError *error) { - if (paymentMethodNonce) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [paymentMethodNonce debugDescription]); - self.completionBlock(paymentMethodNonce); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; - paymentButton.appSwitchDelegate = self; - paymentButton.viewControllerPresentingDelegate = self; - return paymentButton; -} - - -- (void)appSwitcherWillPerformAppSwitch:(__unused id)appSwitcher { - self.progressBlock(@"Will perform app switch"); -} - -- (void)appSwitcher:(__unused id)appSwitcher didPerformSwitchToTarget:(__unused BTAppSwitchTarget)target { - self.progressBlock(@"Did perform app switch"); -} - -- (void)appSwitcherWillProcessPaymentInfo:(__unused id)appSwitcher { - self.progressBlock(@"Processing payment info..."); -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.h deleted file mode 100755 index 46836214..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoCustomMultiPayViewController : BraintreeDemoPaymentButtonBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.m deleted file mode 100755 index b763e793..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Combined Button - Custom Multi-Pay Button/BraintreeDemoCustomMultiPayViewController.m +++ /dev/null @@ -1,178 +0,0 @@ -#import "BraintreeDemoCustomMultiPayViewController.h" -#import -#import -#import - -@interface BraintreeDemoCustomMultiPayViewController () -@property(nonatomic, strong) BTUICardFormView *cardForm; -@property (nonatomic, strong) UINavigationController *cardFormNavigationViewController; -@property (nonatomic, weak) UIBarButtonItem *saveButton; -@end - -@implementation BraintreeDemoCustomMultiPayViewController - -#pragma mark - Lifecycle & Setup - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"Custom Payment Button"; -} - -- (UIView *)createPaymentButton { - UIView *view = [[UIView alloc] initForAutoLayout]; - - UIButton *venmoButton = [UIButton buttonWithType:UIButtonTypeSystem]; - venmoButton.translatesAutoresizingMaskIntoConstraints = NO; - venmoButton.titleLabel.font = [UIFont fontWithName:@"AmericanTypewriter" size:[UIFont systemFontSize]]; - venmoButton.backgroundColor = [[BTUI braintreeTheme] venmoPrimaryBlue]; - [venmoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [venmoButton setTitle:@"Venmo" forState:UIControlStateNormal]; - - UIButton *payPalButton = [UIButton buttonWithType:UIButtonTypeSystem]; - payPalButton.translatesAutoresizingMaskIntoConstraints = NO; - payPalButton.titleLabel.font = [UIFont fontWithName:@"GillSans-BoldItalic" size:[UIFont systemFontSize]]; - payPalButton.backgroundColor = [[BTUI braintreeTheme] palBlue]; - [payPalButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [payPalButton setTitle:@"PayPal" forState:UIControlStateNormal]; - - UIButton *cardButton = [UIButton buttonWithType:UIButtonTypeSystem]; - cardButton.translatesAutoresizingMaskIntoConstraints = NO; - cardButton.backgroundColor = [UIColor bt_colorFromHex:@"DDDECB" alpha:1.0f]; - [cardButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; - [cardButton setTitle:@"💳" forState:UIControlStateNormal]; - - [venmoButton addTarget:self action:@selector(tappedVenmo:) forControlEvents:UIControlEventTouchUpInside]; - [payPalButton addTarget:self action:@selector(tappedPayPal:) forControlEvents:UIControlEventTouchUpInside]; - [cardButton addTarget:self action:@selector(tappedCard:) forControlEvents:UIControlEventTouchUpInside]; - - [view addSubview:payPalButton]; - [view addSubview:venmoButton]; - [view addSubview:cardButton]; - - [venmoButton autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:payPalButton]; - [payPalButton autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:cardButton]; - - [venmoButton autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:0]; - [venmoButton autoPinEdge:ALEdgeRight toEdge:ALEdgeLeft ofView:payPalButton]; - [payPalButton autoPinEdge:ALEdgeRight toEdge:ALEdgeLeft ofView:cardButton]; - [cardButton autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:0]; - - [venmoButton autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:0]; - [venmoButton autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:0]; - [payPalButton autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:0]; - [payPalButton autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:0]; - [cardButton autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:0]; - [cardButton autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:0]; - - [view autoMatchDimension:ALDimensionHeight toDimension:ALDimensionHeight ofView:venmoButton]; - - return view; -} - -#pragma mark - Actions - -- (IBAction)tappedVenmo:(__unused UIButton *)button { - [self tokenizeType:@"Venmo"]; -} - -- (IBAction)tappedPayPal:(__unused UIButton *)button { - [self tokenizeType:@"PayPal"]; -} - -- (IBAction)tappedCard:(UIButton *)button { - self.cardForm = [[BTUICardFormView alloc] initForAutoLayout]; - self.cardForm.optionalFields = BTUICardFormOptionalFieldsAll; - - UIViewController *cardFormViewController = [[UIViewController alloc] init]; - cardFormViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel - target:self - action:@selector(cancelCardVC)]; - UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave - target:self - action:@selector(saveCardVC)]; - cardFormViewController.navigationItem.rightBarButtonItem = saveButton; - cardFormViewController.navigationItem.rightBarButtonItem.style = UIBarButtonItemStyleDone; - cardFormViewController.navigationItem.rightBarButtonItem.enabled = NO; - self.saveButton = saveButton; - - cardFormViewController.title = @"💳"; - [cardFormViewController.view addSubview:self.cardForm]; - cardFormViewController.view.backgroundColor = button.backgroundColor; - - [self.cardForm autoPinToTopLayoutGuideOfViewController:cardFormViewController withInset:40]; - [self.cardForm autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:0]; - [self.cardForm autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:0]; - - self.cardFormNavigationViewController = [[UINavigationController alloc] initWithRootViewController:cardFormViewController]; - - [self.cardForm addObserver:self forKeyPath:@"valid" options:0 context:NULL]; - - [self presentViewController:self.cardFormNavigationViewController animated:YES completion:nil]; -} - -#pragma mark - Private methods - -- (void)tokenizeType:(NSString *)type { - [[BTTokenizationService sharedService] tokenizeType:type options:@{ BTTokenizationServiceViewPresentingDelegateOption: self } withAPIClient:self.apiClient completion:^(BTPaymentMethodNonce * _Nonnull paymentMethodNonce, NSError * _Nonnull error) { - if (paymentMethodNonce) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [paymentMethodNonce debugDescription]); - self.completionBlock(paymentMethodNonce); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -- (void)cancelCardVC { - [self.cardForm removeObserver:self forKeyPath:@"valid"]; - [self dismissViewControllerAnimated:YES completion:nil]; -} - -- (void)saveCardVC { - [self cancelCardVC]; - - BTCard *card = [[BTCard alloc] init]; - card.number = self.cardForm.number; - card.expirationMonth = self.cardForm.expirationMonth; - card.expirationYear = self.cardForm.expirationYear; - card.cvv = self.cardForm.cvv; - card.postalCode = self.cardForm.postalCode; - card.shouldValidate = NO; - - BTCardClient *cardClient = [[BTCardClient alloc] initWithAPIClient:self.apiClient]; - [cardClient tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - if (tokenizedCard) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [tokenizedCard debugDescription]); - self.completionBlock(tokenizedCard); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -#pragma mark - KVO - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - if ([keyPath isEqualToString:@"valid"]) { - self.saveButton.enabled = self.cardForm.valid; - } else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.h deleted file mode 100755 index 587bd89b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoCardTokenizationViewController : BraintreeDemoBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.m deleted file mode 100755 index 7a947945..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.m +++ /dev/null @@ -1,106 +0,0 @@ -#import "BraintreeDemoCardTokenizationViewController.h" -#import "BraintreeDemoSettings.h" -#import -#import - - -@interface BraintreeDemoCardTokenizationViewController () - -@property (nonatomic, strong) IBOutlet UITextField *cardNumberField; -@property (nonatomic, strong) IBOutlet UITextField *expirationMonthField; -@property (nonatomic, strong) IBOutlet UITextField *expirationYearField; - -@property (weak, nonatomic) IBOutlet UIButton *cardIOButton; -@property (weak, nonatomic) IBOutlet UIButton *autofillButton; -@property (weak, nonatomic) IBOutlet UIButton *submitButton; -@property (nonatomic, strong) BTAPIClient *apiClient; - -@end - -@implementation BraintreeDemoCardTokenizationViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization { - if (self = [super initWithAuthorization:authorization]) { - _apiClient = [[BTAPIClient alloc] initWithAuthorization:authorization]; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = @"Card Tokenization"; - self.edgesForExtendedLayout = UIRectEdgeBottom; - - [CardIOUtilities preload]; -} - -- (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)cardInfo inPaymentViewController:(CardIOPaymentViewController *)paymentViewController { - self.progressBlock([NSString stringWithFormat:@"Scanned a card with Card.IO: %@", [cardInfo redactedCardNumber]]); - - if (cardInfo.expiryYear) { - self.expirationYearField.text = [NSString stringWithFormat:@"%d", (int)cardInfo.expiryYear]; - } - - if (cardInfo.expiryMonth) { - self.expirationMonthField.text = [NSString stringWithFormat:@"%d", (int)cardInfo.expiryMonth]; - } - - self.cardNumberField.text = cardInfo.cardNumber; - - [paymentViewController dismissViewControllerAnimated:YES completion:nil]; -} - -- (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)paymentViewController { - [paymentViewController dismissViewControllerAnimated:YES completion:nil]; -} - -- (IBAction)submitForm { - self.progressBlock(@"Tokenizing card details!"); - - BTCardClient *cardClient = [[BTCardClient alloc] initWithAPIClient:self.apiClient]; - BTCard *card = [[BTCard alloc] initWithNumber:self.cardNumberField.text - expirationMonth:self.expirationMonthField.text - expirationYear:self.expirationYearField.text - cvv:nil]; - - [self setFieldsEnabled:NO]; - [cardClient tokenizeCard:card completion:^(BTCardNonce *tokenized, NSError *error) { - [self setFieldsEnabled:YES]; - if (error) { - self.progressBlock(error.localizedDescription); - NSLog(@"Error: %@", error); - return; - } - - self.completionBlock(tokenized); - }]; -} - -- (IBAction)setupDemoData { - self.cardNumberField.text = @"4111111111111111"; - self.expirationMonthField.text = @"12"; - self.expirationYearField.text = @"2038"; -} - -- (IBAction)presentCardIO { - CardIOPaymentViewController *cardIO = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self]; - cardIO.collectExpiry = YES; - cardIO.collectCVV = NO; - cardIO.useCardIOLogo = YES; - cardIO.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; - [self presentViewController:cardIO animated:YES completion:nil]; - -} - -- (void)setFieldsEnabled:(BOOL)enabled { - self.cardNumberField.enabled = enabled; - self.expirationMonthField.enabled = enabled; - self.expirationYearField.enabled = enabled; - self.submitButton.enabled = enabled; - self.cardIOButton.enabled = enabled; - self.autofillButton.enabled = enabled; - -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.xib b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.xib deleted file mode 100755 index be012cc4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Card Tokenization/BraintreeDemoCardTokenizationViewController.xib +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.h deleted file mode 100755 index 799b8e3c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@class BTThreeDSecureDriver; - -@interface BraintreeDemoThreeDSecureViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.m deleted file mode 100755 index f20570c3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Credit Cards - 3D Secure/BraintreeDemoThreeDSecureViewController.m +++ /dev/null @@ -1,126 +0,0 @@ -#import "BraintreeDemoThreeDSecureViewController.h" -#import "ALView+PureLayout.h" - -#import -#import - -@interface BraintreeDemoThreeDSecureViewController () -@property (nonatomic, strong) BTUICardFormView *cardFormView; -@property (nonatomic, strong) UILabel *callbackCountLabel; -@property (nonatomic) int callbackCount; -@end - -@implementation BraintreeDemoThreeDSecureViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"3D Secure"; - - self.cardFormView = [[BTUICardFormView alloc] initForAutoLayout]; - self.cardFormView.optionalFields = BTUICardFormOptionalFieldsNone; - [self.view addSubview:self.cardFormView]; - [self.cardFormView autoPinEdgeToSuperviewEdge:ALEdgeTop]; - [self.cardFormView autoPinEdgeToSuperviewEdge:ALEdgeLeft]; - [self.cardFormView autoPinEdgeToSuperviewEdge:ALEdgeRight]; -} - -- (UIView *)createPaymentButton { - UIButton *verifyNewCardButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [verifyNewCardButton setTitle:@"Tokenize and Verify New Card" forState:UIControlStateNormal]; - [verifyNewCardButton addTarget:self action:@selector(tappedToVerifyNewCard) forControlEvents:UIControlEventTouchUpInside]; - - UIView *threeDSecureButtonsContainer = [[UIView alloc] initForAutoLayout]; - [threeDSecureButtonsContainer addSubview:verifyNewCardButton]; - - [verifyNewCardButton autoPinEdgeToSuperviewEdge:ALEdgeTop]; - - [verifyNewCardButton autoAlignAxisToSuperviewMarginAxis:ALAxisVertical]; - - self.callbackCountLabel = [[UILabel alloc] initForAutoLayout]; - self.callbackCountLabel.textAlignment = NSTextAlignmentCenter; - self.callbackCountLabel.font = [UIFont systemFontOfSize:UIFont.smallSystemFontSize]; - [threeDSecureButtonsContainer addSubview:self.callbackCountLabel]; - [self.callbackCountLabel autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:verifyNewCardButton withOffset:20]; - [self.callbackCountLabel autoPinEdgeToSuperviewEdge:ALEdgeLeft]; - [self.callbackCountLabel autoPinEdgeToSuperviewEdge:ALEdgeRight]; - self.callbackCount = 0; - [self updateCallbackCount]; - - return threeDSecureButtonsContainer; -} - -- (BTCard *)newCard { - BTCard *card = [[BTCard alloc] init]; - if (self.cardFormView.valid && - self.cardFormView.number && - self.cardFormView.expirationMonth && - self.cardFormView.expirationYear) { - card.number = self.cardFormView.number; - card.expirationMonth = self.cardFormView.expirationMonth; - card.expirationYear = self.cardFormView.expirationYear; - } else { - [self.cardFormView showTopLevelError:@"Not valid. Using default 3DS test card..."]; - card.number = @"4000000000000002"; - card.expirationMonth = @"12"; - card.expirationYear = @"2020"; - } - return card; -} - -- (void)updateCallbackCount { - self.callbackCountLabel.text = [NSString stringWithFormat:@"Callback Count: %i", self.callbackCount]; -} - -/// "Tokenize and Verify New Card" -- (void)tappedToVerifyNewCard { - self.callbackCount = 0; - [self updateCallbackCount]; - - BTCard *card = [self newCard]; - - self.progressBlock([NSString stringWithFormat:@"Tokenizing card ending in %@", [card.number substringFromIndex:(card.number.length - 4)]]); - - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:self.apiClient]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - - if (error) { - self.progressBlock(error.localizedDescription); - return; - } - - self.progressBlock(@"Tokenized card, now verifying with 3DS"); - - BTThreeDSecureDriver *threeDSecure = [[BTThreeDSecureDriver alloc] initWithAPIClient:self.apiClient delegate:self]; - - [threeDSecure verifyCardWithNonce:tokenizedCard.nonce - amount:[NSDecimalNumber decimalNumberWithString:@"10"] - completion:^(BTThreeDSecureCardNonce * _Nullable threeDSecureCard, NSError * _Nullable error) - { - self.callbackCount++; - [self updateCallbackCount]; - if (error) { - self.progressBlock(error.localizedDescription); - } else if (threeDSecureCard) { - self.completionBlock(threeDSecureCard); - - if (threeDSecureCard.liabilityShiftPossible && threeDSecureCard.liabilityShifted) { - self.progressBlock(@"Liability shift possible and liability shifted"); - } else { - self.progressBlock(@"3D Secure authentication was attempted but liability shift is not possible"); - } - } else { - self.progressBlock(@"Cancelled🎲"); - } - }]; - }]; -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(__unused UIViewController *)viewController { - [self dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.h deleted file mode 100755 index dd74f490..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoDropInLegacyViewController : BraintreeDemoBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.m deleted file mode 100755 index 4382775b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In Old/BraintreeDemoDropInLegacyViewController.m +++ /dev/null @@ -1,97 +0,0 @@ -#import "BraintreeDemoDropInLegacyViewController.h" - -#import -#import -#import -#import -#import "BraintreeDemoSettings.h" - -@interface BraintreeDemoDropInLegacyViewController () - -@property (nonatomic, strong) BTAPIClient *apiClient; - -@end - -@implementation BraintreeDemoDropInLegacyViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization { - if (self = [super initWithAuthorization:authorization]) { - _apiClient = [[BTAPIClient alloc] initWithAuthorization:authorization]; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = @"Drop In (Legacy)"; - - UIButton *dropInButton = [UIButton buttonWithType:UIButtonTypeSystem]; - dropInButton.translatesAutoresizingMaskIntoConstraints = NO; - [dropInButton addTarget:self action:@selector(tappedToShowDropIn) forControlEvents:UIControlEventTouchUpInside]; - [dropInButton setBackgroundColor:[UIColor redColor]]; - [dropInButton setTitleColor:[UIColor whiteColor]forState:UIControlStateNormal]; - dropInButton.layer.cornerRadius = 5.0f; - dropInButton.contentEdgeInsets = UIEdgeInsetsMake(8, 8, 8, 8); - [dropInButton setTitle:@"Buy Now" forState:UIControlStateNormal]; - [dropInButton sizeToFit]; - - [self.view addSubview:dropInButton]; - [dropInButton autoCenterInSuperview]; - - self.progressBlock(@"Ready to present Drop In (Old)"); -} - -- (void)tappedToShowDropIn { - BTPaymentRequest *paymentRequest = [[BTPaymentRequest alloc] init]; - paymentRequest.summaryTitle = @"Our Fancy Magazine"; - paymentRequest.summaryDescription = @"53 Week Subscription"; - paymentRequest.displayAmount = @"$19.00"; - paymentRequest.callToActionText = @"$19 - Subscribe Now"; - paymentRequest.shouldHideCallToAction = NO; - BTDropInViewController *dropIn = [[BTDropInViewController alloc] initWithAPIClient:self.apiClient]; - dropIn.delegate = self; - dropIn.paymentRequest = paymentRequest; - dropIn.title = @"Check Out"; - - if ([BraintreeDemoSettings useModalPresentation]) { - self.progressBlock(@"Presenting Drop In Modally"); - dropIn.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(tappedCancel)]; - UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:dropIn]; - [self presentViewController:nav animated:YES completion:nil]; - } else { - self.progressBlock(@"Pushing Drop In on nav stack"); - [self.navigationController pushViewController:dropIn animated:YES]; - } -} - - -- (void)tappedCancel { - self.progressBlock(@"Dismissing Drop In"); - [self dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma mark - BTDropInViewControllerDelegate - -// Renamed from -dropInViewController:didSucceedWithPaymentMethod: -- (void)dropInViewController:(BTDropInViewController *)viewController didSucceedWithTokenization:(BTPaymentMethodNonce *)paymentMethodNonce { - if ([BraintreeDemoSettings useModalPresentation]) { - [viewController dismissViewControllerAnimated:YES completion:^{ - self.completionBlock(paymentMethodNonce); - }]; - } else { - [self.navigationController popViewControllerAnimated:YES]; - self.completionBlock(paymentMethodNonce); - } -} - -- (void)dropInViewControllerWillComplete:(__unused BTDropInViewController *)viewController { - self.progressBlock(@"Drop In Will Complete"); -} - -- (void)dropInViewControllerDidCancel:(BTDropInViewController *)viewController { - self.progressBlock(@"User Canceled Drop In"); - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.h deleted file mode 100755 index 0696111f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoDropInViewController : BraintreeDemoBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.m deleted file mode 100755 index c0eaf828..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Drop In/BraintreeDemoDropInViewController.m +++ /dev/null @@ -1,328 +0,0 @@ -#import "BraintreeDemoDropInViewController.h" - -#import -#import -#import -#import -#import "BraintreeUIKit.h" -#import "BraintreeDemoSettings.h" -#import "BTPaymentSelectionViewController.h" -#import - -@interface BraintreeDemoDropInViewController () - -@property (nonatomic, strong) BTUIKPaymentOptionCardView *paymentMethodTypeIcon; -@property (nonatomic, strong) UILabel *paymentMethodTypeLabel; -@property (nonatomic, strong) UILabel *cartLabel; -@property (nonatomic, strong) UILabel *itemLabel; -@property (nonatomic, strong) UILabel *priceLabel; -@property (nonatomic, strong) UILabel *paymentMethodHeaderLabel; -@property (nonatomic, strong) UIButton *dropInButton; -@property (nonatomic, strong) UIButton *purchaseButton; -@property (nonatomic, strong) UISegmentedControl *dropinThemeSwitch; -@property (nonatomic, strong) NSString *authorizationString; -@property (nonatomic) BOOL useApplePay; -@property (nonatomic, strong) BTPaymentMethodNonce *selectedNonce; -@property (nonatomic, strong) NSArray *checkoutConstraints; -@end - -@implementation BraintreeDemoDropInViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization { - if (self = [super initWithAuthorization:authorization]) { - - self.authorizationString = authorization; - } - return self; -} - -- (void) updatePaymentMethod:(BTPaymentMethodNonce*)paymentMethodNonce { - self.paymentMethodTypeLabel.hidden = paymentMethodNonce == nil; - self.paymentMethodTypeIcon.hidden = paymentMethodNonce == nil; - if (paymentMethodNonce != nil) { - BTUIKPaymentOptionType paymentMethodType = [BTUIKViewUtil paymentOptionTypeForPaymentInfoType:paymentMethodNonce.type]; - self.paymentMethodTypeIcon.paymentOptionType = paymentMethodType; - [self.paymentMethodTypeLabel setText:paymentMethodNonce.localizedDescription]; - } - [self updatePaymentMethodConstraints]; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"Drop-in"; - self.cartLabel = [[UILabel alloc] init]; - [self.cartLabel setText:@"CART"]; - self.cartLabel.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; - [self.cartLabel setTextColor:[UIColor grayColor]]; - self.cartLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.cartLabel]; - - self.itemLabel = [[UILabel alloc] init]; - [self.itemLabel setText:@"1 Sock"]; - self.itemLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.itemLabel]; - - self.priceLabel = [[UILabel alloc] init]; - [self.priceLabel setText:@"$100"]; - self.priceLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.priceLabel]; - - self.paymentMethodHeaderLabel = [[UILabel alloc] init]; - [self.paymentMethodHeaderLabel setText:@"PAYMENT METHODS"]; - [self.paymentMethodHeaderLabel setTextColor:[UIColor grayColor]]; - self.paymentMethodHeaderLabel.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; - self.paymentMethodHeaderLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.paymentMethodHeaderLabel]; - - self.dropInButton = [[UIButton alloc] init]; - [self.dropInButton setTitle:@"Select Payment Method" forState:UIControlStateNormal]; - [self.dropInButton setTitleColor:self.view.tintColor forState:UIControlStateNormal]; - self.dropInButton.translatesAutoresizingMaskIntoConstraints = NO; - [self.dropInButton addTarget:self action:@selector(tappedToShowDropIn) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:self.dropInButton]; - - self.purchaseButton = [[UIButton alloc] init]; - [self.purchaseButton setTitle:@"Complete Purchase" forState:UIControlStateNormal]; - [self.purchaseButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [self.purchaseButton setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.8] forState:UIControlStateHighlighted]; - self.purchaseButton.backgroundColor = self.view.tintColor; - self.purchaseButton.translatesAutoresizingMaskIntoConstraints = NO; - - [self.purchaseButton addTarget:self action:@selector(purchaseButtonPressed) forControlEvents:UIControlEventTouchUpInside]; - self.purchaseButton.layer.cornerRadius = 4.0; - [self.view addSubview:self.purchaseButton]; - - self.paymentMethodTypeIcon = [BTUIKPaymentOptionCardView new]; - self.paymentMethodTypeIcon.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.paymentMethodTypeIcon]; - self.paymentMethodTypeIcon.hidden = YES; - - self.paymentMethodTypeLabel = [[UILabel alloc] init]; - self.paymentMethodTypeLabel.translatesAutoresizingMaskIntoConstraints = NO; - [self.view addSubview:self.paymentMethodTypeLabel]; - self.paymentMethodTypeLabel.hidden = YES; - - self.dropinThemeSwitch = [[UISegmentedControl alloc] initWithItems:@[@"Light Theme", @"Dark Theme"]]; - self.dropinThemeSwitch.translatesAutoresizingMaskIntoConstraints = NO; - self.dropinThemeSwitch.selectedSegmentIndex = 0; - [self.view addSubview:self.dropinThemeSwitch]; - - [self updatePaymentMethodConstraints]; - - self.progressBlock(@"Fetching customer's payment methods..."); - self.useApplePay = NO; - - [BTDropInResult fetchDropInResultForAuthorization:self.authorizationString handler:^(BTDropInResult * _Nullable result, NSError * _Nullable error) { - if (error) { - self.progressBlock([NSString stringWithFormat:@"Error: %@", error.localizedDescription]); - NSLog(@"Error: %@", error); - } else { - if (result.paymentOptionType == BTUIKPaymentOptionTypeApplePay) { - self.progressBlock(@"Ready for checkout..."); - [self setupApplePay]; - } else { - self.useApplePay = NO; - self.selectedNonce = result.paymentMethod; - self.progressBlock(@"Ready for checkout..."); - [self updatePaymentMethod:self.selectedNonce]; - } - } - }]; -} - -- (void) setupApplePay { - self.paymentMethodTypeLabel.hidden = NO; - self.paymentMethodTypeIcon.hidden = NO; - self.paymentMethodTypeIcon.paymentOptionType = BTUIKPaymentOptionTypeApplePay; - [self.paymentMethodTypeLabel setText:@"Apple Pay"]; - self.useApplePay = YES; - [self updatePaymentMethodConstraints]; -} - -#pragma mark Constraints - -- (void)updatePaymentMethodConstraints { - if (self.checkoutConstraints) { - [NSLayoutConstraint deactivateConstraints:self.checkoutConstraints]; - } - NSDictionary *viewBindings = @{ - @"view": self, - @"cartLabel": self.cartLabel, - @"itemLabel": self.itemLabel, - @"priceLabel": self.priceLabel, - @"paymentMethodHeaderLabel": self.paymentMethodHeaderLabel, - @"dropInButton": self.dropInButton, - @"paymentMethodTypeIcon": self.paymentMethodTypeIcon, - @"paymentMethodTypeLabel": self.paymentMethodTypeLabel, - @"purchaseButton":self.purchaseButton, - @"dropinThemeSwitch":self.dropinThemeSwitch - }; - - NSMutableArray *newConstraints = [NSMutableArray new]; - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[cartLabel]-|" options:0 metrics:nil views:viewBindings]]; - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[purchaseButton]-|" options:0 metrics:nil views:viewBindings]]; - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(20)-[cartLabel]-[itemLabel]-[paymentMethodHeaderLabel]" options:0 metrics:nil views:viewBindings]]; - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[itemLabel]-[priceLabel]-|" options:NSLayoutFormatAlignAllTop metrics:nil views:viewBindings]]; - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[paymentMethodHeaderLabel]-|" options:0 metrics:nil views:viewBindings]]; - - if (!self.paymentMethodTypeIcon.hidden && !self.paymentMethodTypeLabel.hidden) { - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[paymentMethodHeaderLabel]-[paymentMethodTypeIcon(29)]-[dropInButton]" options:0 metrics:nil views:viewBindings]]; - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[paymentMethodTypeIcon(45)]-[paymentMethodTypeLabel]" options:NSLayoutFormatAlignAllCenterY metrics:nil views:viewBindings]]; - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[dropInButton]-|" options:0 metrics:nil views:viewBindings]]; - [self.dropInButton setTitle:@"Change Payment Method" forState:UIControlStateNormal]; - self.purchaseButton.backgroundColor = self.view.tintColor; - self.purchaseButton.enabled = YES; - } else { - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[paymentMethodHeaderLabel]-[dropInButton]" options:0 metrics:nil views:viewBindings]]; - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[dropInButton]-|" options:0 metrics:nil views:viewBindings]]; - [self.dropInButton setTitle:@"Add Payment Method" forState:UIControlStateNormal]; - self.purchaseButton.backgroundColor = [UIColor lightGrayColor]; - self.purchaseButton.enabled = NO; - } - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[dropInButton]-(20)-[purchaseButton]-(20)-[dropinThemeSwitch]" options:0 metrics:nil views:viewBindings]]; - - [newConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[dropinThemeSwitch]-|" options:0 metrics:nil views:viewBindings]]; - - self.checkoutConstraints = newConstraints; - [self.view addConstraints:self.checkoutConstraints]; -} - -#pragma mark Button Handlers - -- (void)purchaseButtonPressed { - if (self.useApplePay) { - - PKPaymentRequest *paymentRequest = [[PKPaymentRequest alloc] init]; - paymentRequest.paymentSummaryItems = @[ - [PKPaymentSummaryItem summaryItemWithLabel:@"Socks" amount:[NSDecimalNumber decimalNumberWithString:@"100"]] - ]; - paymentRequest.supportedNetworks = @[PKPaymentNetworkVisa, PKPaymentNetworkMasterCard, PKPaymentNetworkAmex, PKPaymentNetworkDiscover]; - paymentRequest.merchantCapabilities = PKMerchantCapability3DS; - paymentRequest.currencyCode = @"USD"; - paymentRequest.countryCode = @"US"; - - switch ([BraintreeDemoSettings currentEnvironment]) { - case BraintreeDemoTransactionServiceEnvironmentSandboxBraintreeSampleMerchant: - paymentRequest.merchantIdentifier = @"merchant.com.braintreepayments.sandbox.Braintree-Demo"; - break; - case BraintreeDemoTransactionServiceEnvironmentProductionExecutiveSampleMerchant: - paymentRequest.merchantIdentifier = @"merchant.com.braintreepayments.Braintree-Demo"; - break; - case BraintreeDemoTransactionServiceEnvironmentCustomMerchant: - self.progressBlock(@"Direct Apple Pay integration does not support custom environments in this Demo App"); - break; - } - - PKPaymentAuthorizationViewController *viewController = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:paymentRequest]; - viewController.delegate = self; - - self.progressBlock(@"Presenting Apple Pay Sheet"); - [self presentViewController:viewController animated:YES completion:nil]; - } else { - self.completionBlock(self.selectedNonce); - self.transactionBlock(); - } -} - -- (void)tappedToShowDropIn { - BTDropInRequest *dropInRequest = [[BTDropInRequest alloc] init]; - // To test 3DS - //dropInRequest.amount = @"10.00"; - //dropInRequest.threeDSecureVerification = YES; - if (self.dropinThemeSwitch.selectedSegmentIndex == 0) { - [BTUIKAppearance lightTheme]; - } else { - [BTUIKAppearance darkTheme]; - } - BTDropInController *dropIn = [[BTDropInController alloc] initWithAuthorization:self.authorizationString request:dropInRequest handler:^(BTDropInController * _Nonnull dropInController, BTDropInResult * _Nullable result, NSError * _Nullable error) { - if (error) { - self.progressBlock([NSString stringWithFormat:@"Error: %@", error.localizedDescription]); - NSLog(@"Error: %@", error); - } else if (result.isCancelled) { - self.progressBlock(@"Cancelled🎲"); - } else { - if (result.paymentOptionType == BTUIKPaymentOptionTypeApplePay) { - self.progressBlock(@"Ready for checkout..."); - [self setupApplePay]; - } else { - self.useApplePay = NO; - self.selectedNonce = result.paymentMethod; - self.progressBlock(@"Ready for checkout..."); - [self updatePaymentMethod:self.selectedNonce]; - } - } - [dropInController dismissViewControllerAnimated:YES completion:nil]; - }]; - - [self presentViewController:dropIn animated:YES completion:nil]; -} - -#pragma mark PKPaymentAuthorizationViewControllerDelegate - -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller - didSelectShippingMethod:(PKShippingMethod *)shippingMethod - completion:(void (^)(PKPaymentAuthorizationStatus, NSArray * _Nonnull))completion -{ - PKPaymentSummaryItem *testItem = [PKPaymentSummaryItem summaryItemWithLabel:@"SOME ITEM" amount:[NSDecimalNumber decimalNumberWithString:@"10"]]; - if ([shippingMethod.identifier isEqualToString:@"fast"]) { - completion(PKPaymentAuthorizationStatusSuccess, - @[ - testItem, - [PKPaymentSummaryItem summaryItemWithLabel:@"SHIPPING" amount:shippingMethod.amount], - [PKPaymentSummaryItem summaryItemWithLabel:@"BRAINTREE" amount:[testItem.amount decimalNumberByAdding:shippingMethod.amount]], - ]); - } else if ([shippingMethod.identifier isEqualToString:@"fail"]) { - completion(PKPaymentAuthorizationStatusFailure, @[testItem]); - } else { - completion(PKPaymentAuthorizationStatusSuccess, @[testItem]); - } -} - -- (void)paymentAuthorizationViewControllerDidFinish:(__unused PKPaymentAuthorizationViewController *)controller { - [controller dismissViewControllerAnimated:YES completion:nil]; -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment handler:(void (^)(PKPaymentAuthorizationResult * _Nonnull))completion { - self.progressBlock(@"Apple Pay Did Authorize Payment"); - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:self.authorizationString]; - BTApplePayClient *applePayClient = [[BTApplePayClient alloc] initWithAPIClient:client]; - [applePayClient tokenizeApplePayPayment:payment completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - completion([[PKPaymentAuthorizationResult alloc] initWithStatus:PKPaymentAuthorizationStatusFailure errors:nil]); - } else { - self.completionBlock(tokenizedApplePayPayment); - completion([[PKPaymentAuthorizationResult alloc] initWithStatus:PKPaymentAuthorizationStatusSuccess errors:nil]); - } - }]; -} -#endif - -- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller - didAuthorizePayment:(PKPayment *)payment - completion:(void (^)(PKPaymentAuthorizationStatus status))completion { - self.progressBlock(@"Apple Pay Did Authorize Payment"); - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:self.authorizationString]; - BTApplePayClient *applePayClient = [[BTApplePayClient alloc] initWithAPIClient:client]; - [applePayClient tokenizeApplePayPayment:payment completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - completion(PKPaymentAuthorizationStatusFailure); - } else { - self.completionBlock(tokenizedApplePayPayment); - completion(PKPaymentAuthorizationStatusSuccess); - } - }]; -} - -- (void)paymentAuthorizationViewControllerWillAuthorizePayment:(__unused PKPaymentAuthorizationViewController *)controller { - self.progressBlock(@"Apple Pay will Authorize Payment"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.h deleted file mode 100755 index 801bf94d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoBTDataCollectorViewController : BraintreeDemoBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.m deleted file mode 100755 index 1b2f2b5b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Fraud Protection - BTDataCollector/BraintreeDemoBTDataCollectorViewController.m +++ /dev/null @@ -1,117 +0,0 @@ -#import "BraintreeDemoBTDataCollectorViewController.h" -#import "BTDataCollector.h" -#import -#import "PPDataCollector.h" -#import - -@interface BraintreeDemoBTDataCollectorViewController () -/// Retain BTDataCollector for entire lifecycle of view controller -@property (nonatomic, strong) BTDataCollector *dataCollector; -@property (nonatomic, strong) UILabel *dataLabel; -@property (nonatomic, strong) BTAPIClient *apiClient; -@end - -@implementation BraintreeDemoBTDataCollectorViewController - -- (instancetype)initWithAuthorization:(NSString *)authorization { - if (self = [super initWithAuthorization:authorization]) { - _apiClient = [[BTAPIClient alloc] initWithAuthorization:authorization]; - } - - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.title = @"BTDataCollector Protection"; - - UIButton *collectButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [collectButton setTitle:@"Collect All Data" forState:UIControlStateNormal]; - [collectButton addTarget:self action:@selector(tappedCollect) forControlEvents:UIControlEventTouchUpInside]; - - UIButton *collectKountButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [collectKountButton setTitle:@"Collect Kount Data" forState:UIControlStateNormal]; - [collectKountButton addTarget:self action:@selector(tappedCollectKount) forControlEvents:UIControlEventTouchUpInside]; - - UIButton *collectDysonButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [collectDysonButton setTitle:@"Collect PayPal Data" forState:UIControlStateNormal]; - [collectDysonButton addTarget:self action:@selector(tappedCollectDyson) forControlEvents:UIControlEventTouchUpInside]; - - UIButton *obtainLocationPermissionButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [obtainLocationPermissionButton setTitle:@"Obtain Location Permission" forState:UIControlStateNormal]; - [obtainLocationPermissionButton addTarget:self action:@selector(tappedRequestLocationAuthorization:) forControlEvents:UIControlEventTouchUpInside]; - - self.dataLabel = [[UILabel alloc] init]; - self.dataLabel.numberOfLines = 0; - - [self.view addSubview:collectButton]; - [self.view addSubview:collectKountButton]; - [self.view addSubview:collectDysonButton]; - [self.view addSubview:obtainLocationPermissionButton]; - [self.view addSubview:self.dataLabel]; - - [collectButton autoCenterInSuperviewMargins]; - [collectKountButton autoAlignAxis:ALAxisVertical toSameAxisOfView:collectButton]; - [collectDysonButton autoAlignAxis:ALAxisVertical toSameAxisOfView:collectButton]; - [collectKountButton autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:collectButton]; - [collectDysonButton autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:collectKountButton]; - - [obtainLocationPermissionButton autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:20]; - [obtainLocationPermissionButton autoAlignAxisToSuperviewMarginAxis:ALAxisVertical]; - - [self.dataLabel autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:collectDysonButton]; - [self.dataLabel autoPinEdgeToSuperviewEdge:ALEdgeLeft]; - [self.dataLabel autoPinEdgeToSuperviewEdge:ALEdgeRight]; - [self.dataLabel autoAlignAxisToSuperviewMarginAxis:ALAxisVertical]; - - self.dataCollector = [[BTDataCollector alloc] initWithAPIClient:self.apiClient]; - self.dataCollector.delegate = self; -} - -- (IBAction)tappedCollect -{ self.progressBlock(@"Started collecting all data..."); - [self.dataCollector collectFraudData:^(NSString * _Nonnull deviceData) { - self.dataLabel.text = deviceData; - }]; -} - -- (IBAction)tappedCollectKount { - self.progressBlock(@"Started collecting Kount data..."); - [self.dataCollector collectCardFraudData:^(NSString * _Nonnull deviceData) { - self.dataLabel.text = deviceData; - }]; -} - -- (IBAction)tappedCollectDyson { - self.dataLabel.text = [PPDataCollector collectPayPalDeviceData]; - self.progressBlock(@"Collected PayPal clientMetadataID!"); -} - -- (IBAction)tappedRequestLocationAuthorization:(__unused id)sender { - CLLocationManager *locationManager = [[CLLocationManager alloc] init]; - [locationManager requestWhenInUseAuthorization]; -} - -#pragma mark - BTDataCollectorDelegate - -/// The collector has started. -- (void)dataCollectorDidStart:(__unused BTDataCollector *)dataCollector { - self.progressBlock(@"Data collector did start..."); -} - -/// The collector finished successfully. -- (void)dataCollectorDidComplete:(__unused BTDataCollector *)dataCollector { - self.progressBlock(@"Data collector did complete."); -} - -/// An error occurred. -/// -/// @param error Triggering error -- (void)dataCollector:(__unused BTDataCollector *)dataCollector didFailWithError:(NSError *)error { - self.progressBlock(@"Error collecting data."); - NSLog(@"Error collecting data. error = %@", error); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.h deleted file mode 100755 index e7ab6251..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoBTUIPayPalButtonViewController : BraintreeDemoPaymentButtonBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.m deleted file mode 100755 index 4afef45b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - BTUIPayPalButton/BraintreeDemoBTUIPayPalButtonViewController.m +++ /dev/null @@ -1,61 +0,0 @@ -#import "BraintreeDemoBTUIPayPalButtonViewController.h" -#import "BTUIPaymentButtonCollectionViewCell.h" -#import -#import - -@interface BraintreeDemoBTUIPayPalButtonViewController () -@end - -@implementation BraintreeDemoBTUIPayPalButtonViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"BTUIPayPalButton"; - - self.paymentButton.hidden = YES; - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - self.progressBlock(@"Failed to fetch configuration"); - NSLog(@"Failed to fetch configuration: %@", error); - return; - } - - if (!configuration.isPayPalEnabled) { - self.progressBlock(@"canCreatePaymentMethodWithProviderType: returns NO, hiding PayPal button"); - } else { - self.paymentButton.hidden = NO; - } - }]; -} - -- (UIView *)createPaymentButton { - BTUIPayPalButton *payPalButton = [[BTUIPayPalButton alloc] init]; - [payPalButton addTarget:self action:@selector(tappedPayPalButton) forControlEvents:UIControlEventTouchUpInside]; - return payPalButton; -} - -- (void)tappedPayPalButton { - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - payPalDriver.viewControllerPresentingDelegate = self; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - if (tokenizedPayPalAccount) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [tokenizedPayPalAccount debugDescription]); - self.completionBlock(tokenizedPayPalAccount); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.h deleted file mode 100755 index e271f916..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoPayPalBillingAgreementViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.m deleted file mode 100755 index ffb8087f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Billing Agreement/BraintreeDemoPayPalBillingAgreementViewController.m +++ /dev/null @@ -1,86 +0,0 @@ -#import "BraintreeDemoPayPalBillingAgreementViewController.h" - -#import - -@interface BraintreeDemoPayPalBillingAgreementViewController () -@property(nonatomic, strong) UITextView *infoTextView; - -@end - -@implementation BraintreeDemoPayPalBillingAgreementViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.infoTextView = [[UITextView alloc] initWithFrame:CGRectMake((self.view.bounds.size.width / 2) - 100, (self.view.bounds.size.width / 8) * 7, 200, 100)]; - [self.view addSubview:self.infoTextView]; - self.infoTextView.backgroundColor = [UIColor clearColor]; -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"Billing Agreement with PayPal" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[UIColor colorWithRed:50.0/255 green:50.0/255 blue:255.0/255 alpha:1.0] forState:UIControlStateHighlighted]; - [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled]; - [button addTarget:self action:@selector(tappedPayPalCheckout:) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedPayPalCheckout:(UIButton *)sender { - self.progressBlock(@"Tapped PayPal - initiating checkout using BTPayPalDriver"); - self.infoTextView.text = @""; - [sender setTitle:@"Processing..." forState:UIControlStateDisabled]; - [sender setEnabled:NO]; - - BTPayPalDriver *driver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - driver.appSwitchDelegate = self; - driver.viewControllerPresentingDelegate = self; - BTPayPalRequest *checkout = [[BTPayPalRequest alloc] init]; - [driver requestBillingAgreement:checkout completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalCheckout, NSError * _Nullable error) { - [sender setEnabled:YES]; - - if (error) { - self.progressBlock(error.localizedDescription); - } else if (tokenizedPayPalCheckout) { - self.completionBlock(tokenizedPayPalCheckout); - } else { - self.progressBlock(@"Cancelled"); - } - }]; -} - -#pragma mark BTAppSwitchDelegate - -- (void)appSwitcherWillPerformAppSwitch:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillPerformAppSwitch:"); -} - -- (void)appSwitcherWillProcessPaymentInfo:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillProcessPaymentInfo:"); -} - -- (void)appSwitcher:(__unused id)appSwitcher didPerformSwitchToTarget:(BTAppSwitchTarget)target { - switch (target) { - case BTAppSwitchTargetWebBrowser: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: browser"); - break; - case BTAppSwitchTargetNativeApp: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: app"); - break; - case BTAppSwitchTargetUnknown: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: unknown"); - break; - } -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - self.infoTextView.text = @"DismissalOfViewController Called"; - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.h deleted file mode 100755 index e3ce31be..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoPayPalOneTimePaymentViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.m deleted file mode 100755 index 02a6b4fa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Checkout/BraintreeDemoPayPalOneTimePaymentViewController.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "BraintreeDemoPayPalOneTimePaymentViewController.h" - -#import - -@interface BraintreeDemoPayPalOneTimePaymentViewController () - -@end - -@implementation BraintreeDemoPayPalOneTimePaymentViewController - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"PayPal one-time payment" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[UIColor colorWithRed:50.0/255 green:50.0/255 blue:255.0/255 alpha:1.0] forState:UIControlStateHighlighted]; - [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled]; - [button addTarget:self action:@selector(tappedPayPalOneTimePayment:) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedPayPalOneTimePayment:(UIButton *)sender { - self.progressBlock(@"Tapped PayPal - initiating one-time payment using BTPayPalDriver"); - - [sender setTitle:@"Processing..." forState:UIControlStateDisabled]; - [sender setEnabled:NO]; - - BTPayPalDriver *driver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - driver.appSwitchDelegate = self; - driver.viewControllerPresentingDelegate = self; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"4.30"]; - [driver requestOneTimePayment:request completion:^(BTPayPalAccountNonce * _Nullable payPalAccount, NSError * _Nullable error) { - [sender setEnabled:YES]; - - if (error) { - self.progressBlock(error.localizedDescription); - } else if (payPalAccount) { - self.completionBlock(payPalAccount); - } else { - self.progressBlock(@"Cancelled"); - } - }]; -} - -#pragma mark BTAppSwitchDelegate - -- (void)appSwitcherWillPerformAppSwitch:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillPerformAppSwitch:"); -} - -- (void)appSwitcherWillProcessPaymentInfo:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillProcessPaymentInfo:"); -} - -- (void)appSwitcher:(__unused id)appSwitcher didPerformSwitchToTarget:(BTAppSwitchTarget)target { - switch (target) { - case BTAppSwitchTargetWebBrowser: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: browser"); - break; - case BTAppSwitchTargetNativeApp: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: app"); - break; - case BTAppSwitchTargetUnknown: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: unknown"); - break; - } -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.h deleted file mode 100755 index 294b49ec..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoPayPalCreditPaymentViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.m deleted file mode 100755 index 056ad961..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Credit/BraintreeDemoPayPalCreditPaymentViewController.m +++ /dev/null @@ -1,116 +0,0 @@ -#import "BraintreeDemoPayPalCreditPaymentViewController.h" - -#import - -@interface BraintreeDemoPayPalCreditPaymentViewController () -@property (nonatomic, strong) UISegmentedControl *paypalTypeSwitch; -@end - -@implementation BraintreeDemoPayPalCreditPaymentViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.paypalTypeSwitch = [[UISegmentedControl alloc] initWithItems:@[@"Checkout", @"Billing Agreement"]]; - self.paypalTypeSwitch.translatesAutoresizingMaskIntoConstraints = NO; - self.paypalTypeSwitch.selectedSegmentIndex = 0; - [self.view addSubview:self.paypalTypeSwitch]; - NSDictionary *viewBindings = @{ - @"view": self, - @"paypalTypeSwitch":self.paypalTypeSwitch - }; - - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[paypalTypeSwitch]-(50)-|" options:0 metrics:nil views:viewBindings]]; - - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[paypalTypeSwitch]-|" options:0 metrics:nil views:viewBindings]]; - -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"PayPal with Credit Offered" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[UIColor colorWithRed:50.0/255 green:50.0/255 blue:255.0/255 alpha:1.0] forState:UIControlStateHighlighted]; - [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled]; - [button addTarget:self action:@selector(tappedPayPalOneTimePayment:) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedPayPalOneTimePayment:(UIButton *)sender { - - if (self.paypalTypeSwitch.selectedSegmentIndex == 0) { - self.progressBlock(@"Tapped - initiating Checkout payment with credit offered"); - } else { - self.progressBlock(@"Tapped - initiating Billing Agreement payment with credit offered"); - } - - [sender setTitle:@"Processing..." forState:UIControlStateDisabled]; - [sender setEnabled:NO]; - - BTPayPalDriver *driver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - driver.appSwitchDelegate = self; - driver.viewControllerPresentingDelegate = self; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"4.30"]; - - request.offerCredit = YES; - - if (self.paypalTypeSwitch.selectedSegmentIndex == 0) { - [driver requestOneTimePayment:request completion:^(BTPayPalAccountNonce * _Nullable payPalAccount, NSError * _Nullable error) { - [sender setEnabled:YES]; - - if (error) { - self.progressBlock(error.localizedDescription); - } else if (payPalAccount) { - self.completionBlock(payPalAccount); - } else { - self.progressBlock(@"Cancelled"); - } - }]; - } else { - [driver requestBillingAgreement:request completion:^(BTPayPalAccountNonce * _Nullable payPalAccount, NSError * _Nullable error) { - [sender setEnabled:YES]; - - if (error) { - self.progressBlock(error.localizedDescription); - } else if (payPalAccount) { - self.completionBlock(payPalAccount); - } else { - self.progressBlock(@"Cancelled"); - } - }]; - } -} - -#pragma mark BTAppSwitchDelegate - -- (void)appSwitcherWillPerformAppSwitch:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillPerformAppSwitch:"); -} - -- (void)appSwitcherWillProcessPaymentInfo:(__unused id)appSwitcher { - self.progressBlock(@"paymentDriverWillProcessPaymentInfo:"); -} - -- (void)appSwitcher:(__unused id)appSwitcher didPerformSwitchToTarget:(BTAppSwitchTarget)target { - switch (target) { - case BTAppSwitchTargetWebBrowser: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: browser"); - break; - case BTAppSwitchTargetNativeApp: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: app"); - break; - case BTAppSwitchTargetUnknown: - self.progressBlock(@"appSwitcher:didPerformSwitchToTarget: unknown"); - break; - } -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.h deleted file mode 100755 index 8ef68dce..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoCustomPayPalButtonViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.m deleted file mode 100755 index ac9d1ed7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Custom Button/BraintreeDemoCustomPayPalButtonViewController.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "BraintreeDemoCustomPayPalButtonViewController.h" -#import -#import - -@interface BraintreeDemoCustomPayPalButtonViewController () -@end - -@implementation BraintreeDemoCustomPayPalButtonViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"PayPal (custom button)"; - - self.paymentButton.hidden = YES; - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - return; - } - - if (!configuration.isPayPalEnabled) { - self.progressBlock(@"canCreatePaymentMethodWithProviderType: returns NO, hiding custom PayPal button"); - } else { - self.paymentButton.hidden = NO; - } - }]; -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"PayPal (custom button)" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[[UIColor blueColor] bt_adjustedBrightness:0.5] forState:UIControlStateHighlighted]; - [button addTarget:self action:@selector(tappedCustomPayPal) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedCustomPayPal { - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - payPalDriver.viewControllerPresentingDelegate = self; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - if (tokenizedPayPalAccount) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [tokenizedPayPalAccount debugDescription]); - self.completionBlock(tokenizedPayPalAccount); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.h deleted file mode 100755 index 52e65559..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoPayPalForceFuturePaymentViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.m deleted file mode 100755 index 767a3d7f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Force Future Payment/BraintreeDemoPayPalForceFuturePaymentViewController.m +++ /dev/null @@ -1,63 +0,0 @@ -#import "BraintreeDemoPayPalForceFuturePaymentViewController.h" -#import -#import -#import - -@interface BraintreeDemoPayPalForceFuturePaymentViewController () -@end - -@implementation BraintreeDemoPayPalForceFuturePaymentViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"PayPal (future payment button)"; - - self.paymentButton.hidden = YES; - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - return; - } - - if (!configuration.isPayPalEnabled) { - self.progressBlock(@"canCreatePaymentMethodWithProviderType: returns NO, hiding custom PayPal button"); - } else { - self.paymentButton.hidden = NO; - } - }]; -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"PayPal (future payment button)" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[[UIColor blueColor] bt_adjustedBrightness:0.5] forState:UIControlStateHighlighted]; - [button addTarget:self action:@selector(tappedCustomPayPal) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedCustomPayPal { - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - payPalDriver.viewControllerPresentingDelegate = self; - [payPalDriver authorizeAccountWithAdditionalScopes:[NSSet set] forceFuturePaymentFlow:true completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - if (tokenizedPayPalAccount) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [tokenizedPayPalAccount debugDescription]); - self.completionBlock(tokenizedPayPalAccount); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.h deleted file mode 100755 index b516695f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -@import Foundation; - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoPayPalScopesViewController : BraintreeDemoPaymentButtonBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.m deleted file mode 100755 index 44b204f0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/PayPal - Scopes/BraintreeDemoPayPalScopesViewController.m +++ /dev/null @@ -1,70 +0,0 @@ -#import "BraintreeDemoPayPalScopesViewController.h" - -#import -#import - -@interface BraintreeDemoPayPalScopesViewController () -@property(nonatomic, strong) UITextView *addressTextView; -@end - -@implementation BraintreeDemoPayPalScopesViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.addressTextView = [[UITextView alloc] initWithFrame:CGRectMake((self.view.bounds.size.width / 2) - 100, (self.view.bounds.size.width / 8) * 7, 200, 100)]; - [self.view addSubview:self.addressTextView]; - self.addressTextView.backgroundColor = [UIColor clearColor]; - - self.paymentButton.hidden = YES; - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable configuration, NSError * _Nullable error) { - if (error) { - self.progressBlock(error.localizedDescription); - return; - } - - if (!configuration.isPayPalEnabled) { - self.progressBlock(@"canCreatePaymentMethodWithProviderType: returns NO, hiding custom PayPal button"); - } else { - self.paymentButton.hidden = NO; - } - }]; -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"PayPal (Address Scope)" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setTitleColor:[[UIColor blueColor] bt_adjustedBrightness:0.5] forState:UIControlStateHighlighted]; - [button addTarget:self action:@selector(tappedCustomPayPal) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedCustomPayPal { - BTPayPalDriver *driver = [[BTPayPalDriver alloc] initWithAPIClient:self.apiClient]; - driver.viewControllerPresentingDelegate = self; - self.progressBlock(@"Tapped PayPal - initiating authorization using BTPayPalDriver"); - - [driver authorizeAccountWithAdditionalScopes:[NSSet setWithArray:@[@"address"]] completion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - if (error) { - self.progressBlock(error.localizedDescription); - } else if (tokenizedPayPalAccount) { - self.completionBlock(tokenizedPayPalAccount); - - BTPostalAddress *address = tokenizedPayPalAccount.shippingAddress; - self.addressTextView.text = [NSString stringWithFormat:@"Address:\n%@\n%@\n%@ %@\n%@ %@", address.streetAddress, address.extendedAddress, address.locality, address.region, address.postalCode, address.countryCodeAlpha2]; - } else { - self.progressBlock(@"Cancelled"); - } - }]; -} - -- (void)paymentDriver:(__unused id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - [self presentViewController:viewController animated:YES completion:nil]; -} - -- (void)paymentDriver:(__unused id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - [viewController dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.h deleted file mode 100755 index b7354024..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface BraintreeDemoCardHintViewController : UIViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.m deleted file mode 100755 index 4923b47c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCardHintViewController.m +++ /dev/null @@ -1,40 +0,0 @@ -#import "BraintreeDemoCardHintViewController.h" - -#import "BTUICardHint.h" - -@interface BraintreeDemoCardHintViewController () -@property (weak, nonatomic) IBOutlet BTUICardHint *cardHintView; -@property (weak, nonatomic) IBOutlet BTUICardHint *smallCardHintView; -@end - -@implementation BraintreeDemoCardHintViewController - -- (IBAction)selectedCardType:(UISegmentedControl *)sender { - BTUIPaymentOptionType type = BTUIPaymentOptionTypeUnknown; - switch(sender.selectedSegmentIndex) { - case 0: - type = BTUIPaymentOptionTypeUnknown; - break; - case 1: - type = BTUIPaymentOptionTypeVisa; - break; - case 2: - type = BTUIPaymentOptionTypeMasterCard; - break; - case 3: - type = BTUIPaymentOptionTypeAMEX; - break; - case 4: - type = BTUIPaymentOptionTypeDiscover; - break; - } - [self.cardHintView setCardType:type animated:YES]; - [self.smallCardHintView setCardType:type animated:YES]; -} - -- (IBAction)selectedHintMode:(UISegmentedControl *)sender { - [self.cardHintView setDisplayMode:(sender.selectedSegmentIndex == 0 ? BTCardHintDisplayModeCardType : BTCardHintDisplayModeCVVHint) animated:YES]; - [self.smallCardHintView setDisplayMode:(sender.selectedSegmentIndex == 0 ? BTCardHintDisplayModeCardType : BTCardHintDisplayModeCVVHint) animated:YES]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.h deleted file mode 100755 index 85b38690..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import - -@interface BraintreeDemoCreditCardEntryViewController : UIViewController -@property (weak, nonatomic) IBOutlet BTUICardFormView *cardFormView; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.m deleted file mode 100755 index e7f107ad..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "BraintreeDemoCreditCardEntryViewController.h" -#import - -@interface BraintreeDemoCreditCardEntryViewController () -@property (weak, nonatomic) IBOutlet UITextView *successOutputTextView; - -@end - -@implementation BraintreeDemoCreditCardEntryViewController - -- (void)cardFormViewDidChange:(BTUICardFormView *)cardFormView { - if (cardFormView.valid) { - self.successOutputTextView.text = [NSString stringWithFormat: - @"😍 YOU DID IT \n" - "Number: %@\n" - "Expiration: %@/%@\n" - "CVV: %@\n" - "Postal: %@", - cardFormView.number, - cardFormView.expirationMonth, - cardFormView.expirationYear, - cardFormView.cvv, - cardFormView.postalCode]; - } else { - self.successOutputTextView.text = @"INVALID 🐴"; - } -} -- (IBAction)toggleCVV:(__unused id)sender { - self.cardFormView.optionalFields = self.cardFormView.optionalFields ^ BTUICardFormOptionalFieldsCvv; -} -- (IBAction)togglePostalCode:(__unused id)sender { - self.cardFormView.optionalFields = self.cardFormView.optionalFields ^ BTUICardFormOptionalFieldsPostalCode; -} -- (IBAction)toggleVibrate:(UISwitch *)sender { - self.cardFormView.vibrate = sender.on; -} - -#pragma mark card.io - -- (IBAction)cardIoPressed:(__unused id)sender { - if (![CardIOUtilities canReadCardWithCamera]) { - // Hide your "Scan Card" button, or take other appropriate action... - NSLog(@"can NOT read card with camera"); - - [self addCardFormWithInfo:nil]; - } else { - CardIOPaymentViewController *v = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self]; - - [self presentViewController:v - animated:YES - completion:nil]; - } -} - -- (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)cardInfo inPaymentViewController:(CardIOPaymentViewController *)paymentViewController { - // The full card number is available as info.cardNumber, but don't log that! - NSLog(@"Received card info. Number: %@, expiry: %02lu/%lu, cvv: %@.", cardInfo.redactedCardNumber, (unsigned long)cardInfo.expiryMonth, (unsigned long)cardInfo.expiryYear, cardInfo.cvv); - // Use the card info... - - [paymentViewController dismissViewControllerAnimated:YES completion:^{ - [self addCardFormWithInfo:cardInfo]; - }]; -} - -- (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)paymentViewController { - [paymentViewController dismissViewControllerAnimated:YES - completion:nil]; -} - -- (void)addCardFormWithInfo:(CardIOCreditCardInfo *)info { - BTUICardFormView *cardForm = self.cardFormView; - - if (info) { - cardForm.number = info.cardNumber; - - NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; - dateComponents.month = info.expiryMonth; - dateComponents.year = info.expiryYear; - dateComponents.calendar = [NSCalendar calendarWithIdentifier:NSGregorianCalendar]; - - [cardForm setExpirationDate:dateComponents.date]; - [cardForm setCvv:info.cvv]; - [cardForm setPostalCode:info.postalCode]; - } else { - cardForm.number = @"4111111111111111"; - [cardForm setExpirationDate:[NSDate date]]; - [cardForm setCvv:@"123"]; - [cardForm setPostalCode:@"60606"]; - } - - [self.view addSubview:cardForm]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.xib b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.xib deleted file mode 100755 index f4fbebd0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoCreditCardEntryViewController.xib +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.h deleted file mode 100755 index 71efe8d2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface BraintreeDemoPaymentsUIComponentsViewController : UIViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.m deleted file mode 100755 index fc0d1206..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoPaymentsUIComponentsViewController.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "BraintreeDemoBraintreeUIKitComponentsViewController.h" -#import "BTUIPaymentMethodView.h" -#import "BTUICTAControl.h" - -@interface BraintreeDemoPaymentsUIComponentsViewController () -@property (nonatomic, weak) IBOutlet BTUIPaymentMethodView *cardPaymentMethodView; -@property (nonatomic, weak) IBOutlet UISwitch *processingSwitch; -@property (nonatomic, weak) IBOutlet BTUICTAControl *ctaControl; -@end - -@implementation BraintreeDemoPaymentsUIComponentsViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.processingSwitch setOn:self.cardPaymentMethodView.isProcessing]; -} - -- (IBAction)tappedCTAControl:(__unused id)sender { - NSLog(@"Tapped CTA"); -} - -- (IBAction)tappedSwapCardType { - [self.cardPaymentMethodView setType:((self.cardPaymentMethodView.type+1) % (BTUIPaymentOptionTypePayPal+1))]; -} - -- (IBAction)toggledProcessingState:(UISwitch *)sender { - self.cardPaymentMethodView.processing = sender.on; -} -- (IBAction)toggledCTAEnabled:(UISwitch *)sender { - self.ctaControl.enabled = sender.on; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.h deleted file mode 100755 index ee632a2a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoUIWidgetsViewController : BraintreeDemoBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.m deleted file mode 100755 index 8ddf64ee..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/BraintreeDemoUIWidgetsViewController.m +++ /dev/null @@ -1,32 +0,0 @@ -#import "BraintreeDemoUIWidgetsViewController.h" - - -@interface BraintreeDemoUIWidgetsViewController () -@end - -@implementation BraintreeDemoUIWidgetsViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"UI Components"; - - UIStoryboard *uiStoryboard = [UIStoryboard storyboardWithName:@"UI" bundle:nil]; - - UIViewController *v = [uiStoryboard instantiateInitialViewController]; - - [self addChildViewController:v]; - [self.view addSubview:v.view]; - [v didMoveToParentViewController:self]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [self.navigationController setToolbarHidden:YES animated:animated]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - [self.navigationController setToolbarHidden:NO animated:animated]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/UI.storyboard b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/UI.storyboard deleted file mode 100755 index 6605cf11..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UI Components/UI.storyboard +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.h deleted file mode 100755 index 6400d0b4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "BraintreeDemoBaseViewController.h" - -@interface BraintreeDemoUnionPayViewController : BraintreeDemoBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.m deleted file mode 100755 index a1c46e73..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/UnionPay/BraintreeDemoUnionPayViewController.m +++ /dev/null @@ -1,221 +0,0 @@ -#import "BraintreeDemoUnionPayViewController.h" -#import -#import "BTUICardFormView.h" - -@interface BraintreeDemoUnionPayViewController () - -@property (nonatomic, strong) IBOutlet UITextField *cardNumberField; -@property (nonatomic, strong) IBOutlet UITextField *expirationMonthField; -@property (nonatomic, strong) IBOutlet UITextField *expirationYearField; -@property (nonatomic, strong) BTUICardFormView *cardForm; -@property (nonatomic, strong) UIButton *submitButton; -@property (nonatomic, strong) UIButton *smsButton; -@property (nonatomic, strong) BTAPIClient *apiClient; -@property (nonatomic, strong) BTCardClient *cardClient; -@property (nonatomic, copy) NSString *lastCardNumber; - -@end - -@implementation BraintreeDemoUnionPayViewController - - -- (instancetype)initWithAuthorization:(NSString *)authorization { - if (self = [super initWithAuthorization:authorization]) { - _apiClient = [[BTAPIClient alloc] initWithAuthorization:authorization]; - _cardClient = [[BTCardClient alloc] initWithAPIClient:_apiClient]; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = @"UnionPay"; - self.edgesForExtendedLayout = UIRectEdgeBottom; - - self.cardForm = [[BTUICardFormView alloc] init]; - self.cardForm.optionalFields = BTUICardFormOptionalFieldsCvv; - self.cardForm.translatesAutoresizingMaskIntoConstraints = NO; - self.cardForm.delegate = self; - [self.view addSubview:self.cardForm]; - - self.submitButton = [UIButton buttonWithType:UIButtonTypeSystem]; - self.submitButton.translatesAutoresizingMaskIntoConstraints = NO; - [self.submitButton setTitle:@"Submit" forState:UIControlStateNormal]; - [self.submitButton addTarget:self action:@selector(submit:) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:self.submitButton]; - - self.smsButton = [UIButton buttonWithType:UIButtonTypeSystem]; - self.smsButton.translatesAutoresizingMaskIntoConstraints = NO; - self.smsButton.hidden = YES; - [self.smsButton setTitle:@"Send SMS" forState:UIControlStateNormal]; - [self.smsButton addTarget:self action:@selector(enroll:) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:self.smsButton]; - - [self.view addConstraints:[NSLayoutConstraint - constraintsWithVisualFormat:@"H:|[cardForm]|" - options:NSLayoutFormatDirectionLeadingToTrailing - metrics:nil - views:@{@"cardForm" : self.cardForm}]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.submitButton - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.view - attribute:NSLayoutAttributeCenterX - multiplier:1 - constant:0]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.smsButton - attribute:NSLayoutAttributeCenterX - relatedBy:NSLayoutRelationEqual - toItem:self.view - attribute:NSLayoutAttributeCenterX - multiplier:1 - constant:0]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.cardForm - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationEqual - toItem:self.view - attribute:NSLayoutAttributeTop - multiplier:1 - constant:0]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.cardForm - attribute:NSLayoutAttributeBottom - relatedBy:NSLayoutRelationEqual - toItem:self.smsButton - attribute:NSLayoutAttributeTop - multiplier:1 - constant:0]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.smsButton - attribute:NSLayoutAttributeBottom - relatedBy:NSLayoutRelationEqual - toItem:self.submitButton - attribute:NSLayoutAttributeTop - multiplier:1 - constant:0]]; - [self.view addConstraint:[NSLayoutConstraint - constraintWithItem:self.submitButton - attribute:NSLayoutAttributeBottom - relatedBy:NSLayoutRelationEqual - toItem:self.view - attribute:NSLayoutAttributeBottom - multiplier:1 - constant:0]]; -} - -#pragma mark - Actions - -- (void)enroll:(__unused UIButton *)button { - self.progressBlock(@"Enrolling card"); - - BTCard *card = [[BTCard alloc] initWithNumber:self.cardForm.number expirationMonth:self.cardForm.expirationMonth expirationYear:self.cardForm.expirationYear cvv:self.cardForm.cvv]; -// card.shouldValidate = YES; - BTCardRequest *request = [[BTCardRequest alloc] initWithCard:card]; - request.mobileCountryCode = @"62"; - request.mobilePhoneNumber = self.cardForm.phoneNumber; - - [self.cardClient enrollCard:request completion:^(NSString * _Nullable enrollmentID, BOOL smsCodeRequired, NSError * _Nullable error) { - if (error) { - NSMutableString *errorMessage = [NSMutableString stringWithFormat:@"Error enrolling card: %@", error.localizedDescription]; - if (error.localizedFailureReason) { - [errorMessage appendString:[NSString stringWithFormat:@". %@", error.localizedFailureReason]]; - } - self.progressBlock(errorMessage); - return; - } - - request.enrollmentID = enrollmentID; - - if (smsCodeRequired) { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"SMS Auth Code" message:@"An authorization code has been sent to your mobile phone number. Please enter it here" preferredStyle:UIAlertControllerStyleAlert]; - [alertController addTextFieldWithConfigurationHandler:nil]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Submit" style:UIAlertActionStyleDefault handler:^(__unused UIAlertAction * _Nonnull action) { - UITextField *codeTextField = [alertController.textFields firstObject]; - NSString *authCode = codeTextField.text; - request.smsCode = authCode; - - self.progressBlock(@"Tokenizing card"); - - [self.cardClient tokenizeCard:request options:nil completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - if (error) { - self.progressBlock([NSString stringWithFormat:@"Error tokenizing card: %@", error.localizedDescription]); - return; - } - - self.completionBlock(tokenizedCard); - }]; - }]]; - - [self presentViewController:alertController animated:YES completion:nil]; - } else { - [self.cardClient tokenizeCard:request options:nil completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - if (error) { - NSMutableString *errorMessage = [NSMutableString stringWithFormat:@"Error tokenizing card: %@", error.localizedDescription]; - if (error.localizedFailureReason) { - [errorMessage appendString:[NSString stringWithFormat:@". %@", error.localizedFailureReason]]; - } - self.progressBlock(errorMessage); - return; - } - - self.completionBlock(tokenizedCard); - }]; - } - }]; -} - -- (void)submit:(__unused UIButton *)button { - self.progressBlock(@"Tokenizing card"); - - BTCard *card = [[BTCard alloc] initWithNumber:self.cardForm.number expirationMonth:self.cardForm.expirationMonth expirationYear:self.cardForm.expirationYear cvv:self.cardForm.cvv]; - [self.cardClient tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - if (error) { - self.progressBlock([NSString stringWithFormat:@"Error tokenizing card: %@", error.localizedDescription]); - return; - } - - self.completionBlock(tokenizedCard); - }]; -} - -#pragma mark - Private methods - -- (void)fetchCapabilities:(NSString *)cardNumber { - [self.cardClient fetchCapabilities:cardNumber completion:^(BTCardCapabilities * _Nullable cardCapabilities, NSError * _Nullable error) { - if (error) { - self.progressBlock([NSString stringWithFormat:@"Error fetching capabilities: %@", error.localizedDescription]); - return; - } - - if (cardCapabilities.isSupported) { - self.cardForm.optionalFields = self.cardForm.optionalFields | BTUICardFormOptionalFieldsPhoneNumber; - self.smsButton.hidden = NO; - self.submitButton.hidden = NO; - } else { - self.progressBlock([NSString stringWithFormat:@"This UnionPay card cannot be processed, please try another card."]); - self.submitButton.hidden = YES; - } - - if (cardCapabilities.isDebit) { - NSLog(@"Debit card"); - } else { - NSLog(@"Credit card"); - } - }]; -} - -#pragma mark - BTUICardFormViewDelegate methods - -- (void)cardFormViewDidEndEditing:(BTUICardFormView *)cardFormView { - if (cardFormView.number && - ![cardFormView.number isEqualToString:self.lastCardNumber]) { - [self fetchCapabilities:cardFormView.number]; - self.lastCardNumber = cardFormView.number; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.h deleted file mode 100755 index 66c34c1f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoBTUIVenmoButtonViewController : BraintreeDemoPaymentButtonBaseViewController -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.m deleted file mode 100755 index c55ebb7c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - BTUIVenmoButton/BraintreeDemoBTUIVenmoButtonViewController.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "BraintreeDemoBTUIVenmoButtonViewController.h" -#import -#import - -@interface BraintreeDemoBTUIVenmoButtonViewController () -@property (nonatomic, strong) BTUIVenmoButton *venmoButton; -@end - -@implementation BraintreeDemoBTUIVenmoButtonViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = @"BTUIVenmoButton"; - self.venmoButton.hidden = YES; - [self.apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration * _Nullable __unused configuration, NSError * _Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^{ - if (error) { - self.progressBlock(error.localizedDescription); - NSLog(@"Failed to fetch configuration: %@", error); - return; - } - }); - }]; -} - -- (UIView *)createPaymentButton { - if (!self.venmoButton) { - self.venmoButton = [[BTUIVenmoButton alloc] init]; - [self.venmoButton addTarget:self action:@selector(tappedPayPalButton) forControlEvents:UIControlEventTouchUpInside]; - } - return self.venmoButton; -} - -- (void)tappedPayPalButton { - self.progressBlock(@"Tapped Venmo - initiating Venmo auth"); - - BTVenmoDriver *driver = [[BTVenmoDriver alloc] initWithAPIClient:self.apiClient]; - - [driver authorizeAccountAndVault:YES completion:^(BTVenmoAccountNonce * _Nullable venmoAccount, NSError * _Nullable error) { - if (venmoAccount) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [venmoAccount debugDescription]); - self.completionBlock(venmoAccount); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.h deleted file mode 100755 index f17bc9ef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#import "BraintreeDemoPaymentButtonBaseViewController.h" - -@interface BraintreeDemoCustomVenmoButtonViewController : BraintreeDemoPaymentButtonBaseViewController - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.m deleted file mode 100755 index 2e922aa0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Features/Venmo - Custom Button/BraintreeDemoCustomVenmoButtonViewController.m +++ /dev/null @@ -1,43 +0,0 @@ -#import "BraintreeDemoCustomVenmoButtonViewController.h" -#import -#import - - -@interface BraintreeDemoCustomVenmoButtonViewController () -@property (nonatomic, strong) BTVenmoDriver *venmoDriver; -@end - -@implementation BraintreeDemoCustomVenmoButtonViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.venmoDriver = [[BTVenmoDriver alloc] initWithAPIClient:self.apiClient]; - self.title = @"Custom Venmo Button"; - self.paymentButton.hidden = [self.venmoDriver isiOSAppAvailableForAppSwitch]; -} - -- (UIView *)createPaymentButton { - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"Venmo (custom button)" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor bt_colorFromHex:@"3D95CE" alpha:1.0f] forState:UIControlStateNormal]; - [button setTitleColor:[[UIColor bt_colorFromHex:@"3D95CE" alpha:1.0f] bt_adjustedBrightness:0.7] forState:UIControlStateHighlighted]; - [button addTarget:self action:@selector(tappedCustomVenmo) forControlEvents:UIControlEventTouchUpInside]; - return button; -} - -- (void)tappedCustomVenmo { - self.progressBlock(@"Tapped Venmo - initiating Venmo auth"); - [self.venmoDriver authorizeAccountAndVault:NO completion:^(BTVenmoAccountNonce * _Nullable venmoAccount, NSError * _Nullable error) { - if (venmoAccount) { - self.progressBlock(@"Got a nonce 💎!"); - NSLog(@"%@", [venmoAccount debugDescription]); - self.completionBlock(venmoAccount); - } else if (error) { - self.progressBlock(error.localizedDescription); - } else { - self.progressBlock(@"Canceled 🔰"); - } - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@1x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@1x.png deleted file mode 100755 index 3d059cba..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@1x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@2x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@2x.png deleted file mode 100755 index f3bfe7c0..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad-spotlight@2x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@1x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@1x.png deleted file mode 100755 index c47b7752..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@1x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@2x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@2x.png deleted file mode 100755 index a8c050c1..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-ipad@2x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-spotlight.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-spotlight.png deleted file mode 100755 index f3bfe7c0..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon-spotlight.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon@2x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon@2x.png deleted file mode 100755 index 728c48c1..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone App Icon@2x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone Pro App Icon-ipad@2x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone Pro App Icon-ipad@2x.png deleted file mode 100755 index c94ea173..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/120 - iPhone Pro App Icon-ipad@2x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100755 index b8710e75..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "filename" : "LaunchImageR4.png", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "retina4", - "filename" : "LaunchImage@2x.png", - "minimum-system-version" : "7.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png deleted file mode 100755 index e50e754c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImageR4.png b/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImageR4.png deleted file mode 100755 index 814612e9..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/LaunchImage.launchimage/LaunchImageR4.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.h b/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.h deleted file mode 100755 index 28007571..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -extern NSString *BraintreeDemoMerchantAPIEnvironmentDidChangeNotification; - -@interface BraintreeDemoMerchantAPI : NSObject - -+ (instancetype)sharedService; - -- (void)fetchMerchantConfigWithCompletion:(void (^)(NSString *merchantId, NSError *error))completionBlock; -- (void)createCustomerAndFetchClientTokenWithCompletion:(void (^)(NSString *clientToken, NSError *error))completionBlock; -- (void)makeTransactionWithPaymentMethodNonce:(NSString *)paymentMethodNonce completion:(void (^)(NSString *transactionId, NSError *error))completionBlock; -- (void)makeTransactionWithPaymentMethodNonce:(NSString *)paymentMethodNonce merchantAccountId:(NSString *)merchantAccountId completion:(void (^)(NSString *transactionId, NSError *error))completionBlock; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.m deleted file mode 100755 index fe9b8084..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Merchant API Client/BraintreeDemoMerchantAPI.m +++ /dev/null @@ -1,128 +0,0 @@ -#import "BraintreeDemoMerchantAPI.h" -#import - -#import "BraintreeDemoSettings.h" - -NSString *BraintreeDemoMerchantAPIEnvironmentDidChangeNotification = @"BraintreeDemoTransactionServiceEnvironmentDidChangeNotification"; - -@interface BraintreeDemoMerchantAPI () -@property (nonatomic, strong) AFHTTPRequestOperationManager *sessionManager; -@property (nonatomic, assign) NSString *currentEnvironmentURLString; -@property (nonatomic, assign) BraintreeDemoTransactionServiceThreeDSecureRequiredStatus threeDSecureRequiredStatus; -@end - -@implementation BraintreeDemoMerchantAPI - -+ (instancetype)sharedService { - static BraintreeDemoMerchantAPI *instance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - instance = [[self alloc] init]; - }); - return instance; -} - -- (id)init { - self = [super init]; - if (self) { - self.threeDSecureRequiredStatus = -1; - [self setupSessionManager:nil]; - - // Use KVO because we don't want to be notified while the user types each character of a Custom URL - [[NSUserDefaults standardUserDefaults] addObserver:self forKeyPath:BraintreeDemoSettingsEnvironmentDefaultsKey options:NSKeyValueObservingOptionNew context:NULL]; - [[NSUserDefaults standardUserDefaults] addObserver:self forKeyPath:BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey options:NSKeyValueObservingOptionNew context:NULL]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupSessionManager:) name:UITextFieldTextDidEndEditingNotification object:nil]; - } - return self; -} - -- (void)dealloc { - [[NSUserDefaults standardUserDefaults] removeObserver:self forKeyPath:BraintreeDemoSettingsEnvironmentDefaultsKey]; - [[NSUserDefaults standardUserDefaults] removeObserver:self forKeyPath:BraintreeDemoSettingsThreeDSecureRequiredDefaultsKey]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:nil]; -} - -- (void)observeValueForKeyPath:(__unused NSString *)keyPath ofObject:(__unused id)object change:(__unused NSDictionary *)change context:(__unused void *)context { - [self setupSessionManager:nil]; -} - -- (void)setupSessionManager:(__unused NSNotification *)notif { - if (![self.currentEnvironmentURLString isEqualToString:[BraintreeDemoSettings currentEnvironmentURLString]] || - self.threeDSecureRequiredStatus != [BraintreeDemoSettings threeDSecureRequiredStatus]) - { - self.currentEnvironmentURLString = [BraintreeDemoSettings currentEnvironmentURLString]; - self.threeDSecureRequiredStatus = [BraintreeDemoSettings threeDSecureRequiredStatus]; - self.sessionManager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:[NSURL URLWithString:[BraintreeDemoSettings currentEnvironmentURLString]]]; - [[NSNotificationCenter defaultCenter] postNotificationName:BraintreeDemoMerchantAPIEnvironmentDidChangeNotification object:self]; - } -} - -- (void)fetchMerchantConfigWithCompletion:(void (^)(NSString *merchantId, NSError *error))completionBlock { - [self.sessionManager GET:@"/config/current" - parameters:nil - success:^(__unused AFHTTPRequestOperation *operation, id responseObject) { - if (completionBlock) { - completionBlock(responseObject[@"merchant_id"], nil); - } - } failure:^(__unused AFHTTPRequestOperation *operation, NSError *error) { - completionBlock(nil, error); - }]; -} - -- (void)createCustomerAndFetchClientTokenWithCompletion:(void (^)(NSString *, NSError *))completionBlock { - NSMutableDictionary *parameters = [@{@"version":[BraintreeDemoSettings clientTokenVersion]} mutableCopy]; - if ([BraintreeDemoSettings customerPresent]) { - if ([BraintreeDemoSettings customerIdentifier].length > 0) { - parameters[@"customer_id"] = [BraintreeDemoSettings customerIdentifier]; - } else { - parameters[@"customer_id"] = [[NSUUID UUID] UUIDString]; - } - } - - [self.sessionManager GET:@"/client_token" - parameters:parameters - success:^(__unused AFHTTPRequestOperation *operation, id responseObject) { - completionBlock(responseObject[@"client_token"], nil); - } - failure:^(__unused AFHTTPRequestOperation *operation, NSError *error) { - completionBlock(nil, error); - }]; -} - -- (void)makeTransactionWithPaymentMethodNonce:(NSString *)paymentMethodNonce completion:(void (^)(NSString *transactionId, NSError *error))completionBlock { - [self makeTransactionWithPaymentMethodNonce:paymentMethodNonce - merchantAccountId:nil - completion:completionBlock]; -} - -- (void)makeTransactionWithPaymentMethodNonce:(NSString *)paymentMethodNonce merchantAccountId:(NSString *)merchantAccountId completion:(void (^)(NSString *transactionId, NSError *error))completionBlock { - NSLog(@"Creating a transaction with nonce: %@", paymentMethodNonce); - NSMutableDictionary *parameters; - - switch ([BraintreeDemoSettings threeDSecureRequiredStatus]) { - case BraintreeDemoTransactionServiceThreeDSecureRequiredStatusDefault: - parameters = [@{ @"payment_method_nonce": paymentMethodNonce } mutableCopy]; - break; - case BraintreeDemoTransactionServiceThreeDSecureRequiredStatusRequired: - parameters = [@{ @"payment_method_nonce": paymentMethodNonce, @"three_d_secure_required": @YES, } mutableCopy]; - break; - case BraintreeDemoTransactionServiceThreeDSecureRequiredStatusNotRequired: - parameters = [@{ @"payment_method_nonce": paymentMethodNonce, @"three_d_secure_required": @NO, } mutableCopy]; - break; - } - - if (merchantAccountId != nil) { - [parameters setObject:merchantAccountId forKey:@"merchant_account_id"]; - } - - [self.sessionManager POST:@"/nonce/transaction" - parameters:parameters - success:^(__unused AFHTTPRequestOperation *operation, __unused id responseObject) { - completionBlock(responseObject[@"message"], nil); - } - failure:^(__unused AFHTTPRequestOperation *operation, __unused NSError *error) { - completionBlock(nil, error); - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/README.md b/examples/braintree/ios/Frameworks/Braintree/Demo/README.md deleted file mode 100755 index da5a97d4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Braintree Demo - -This is a universal iOS app that exercises just about every feature of Braintree iOS. - -You can take a look at the classes under [Features](./Features) to get a sense of how this SDK can be used. - -## Usage - -This app allows you to switch between the different features, or sample integrations, that it showcases. Each integration starts with loading a client token from a sample merchant server. This happens automatically when you open the app. Once the client token is loaded, the current integration is shown. - -You can switch between features using the `Settings` menu. This app will remember which feature you last looked at; the in-app settings are synchronized with the iOS Settings app. - -You can reload the current integration by tapping on the the reload button on the upper left. - -The current status is shown on the bottom toolbar. If you've created a payment method nonce, you tap on the status toolbar to create a transaction. - -### Compatibility - -This app should be compiled with a 8.x Base SDK (Xcode 6.x) and has a deployment target of iOS 7.0. - -## Implementation - -This codebase has three primary sections: - -* **Demo Base** - contains boilerplate code that facilitates switching between demo integrations. -* **Merchant API Client** - contains an API client that might be similar to one found in a real app; note that it consumes a _hypothetical merchant_ API, not Braintree's API. -* **Features** - contains a number of Braintree iOS demo integrations. - -Each demo integration must provide a `BraintreeDemoBaseViewController` subclass. Most importantly, the demo provides a `paymentButton`, which is presented to the user when the demo is selected. - -To add a new demo, you will additionally need to register the demo in the [Settings bundle](./Demo Base/Settings/Settings.bundle/Root.plist), identifying the view controller by class name. - -The most common class of integration, which involves presenting the user with a single button—to trigger whatever type of payment experience you choose—can be powered by another base class, `BraintreeDemoPaymentButtonBaseViewController`. - -Your demo view controller may call its `progressBlock` or `completionBlock` in order to update the rest of the app (and the user) about the payment method creation lifecycle. - -### Steps to Add a New Demo - -1. Create a new `BraintreeDemoBaseViewController` subclass in a new directory under Features. -2. Utilize `self.braintree` to implement a Braintree integration, and call `completionBlock` upon successfully creating a payment method. -3. Register this class in the Settings bundle, by adding new items in the `Integration` multi value item, under `titles` and `values`. - -💸👍🏻 diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Info.plist b/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Info.plist deleted file mode 100755 index e26d2ca3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Info.plist +++ /dev/null @@ -1,110 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en_US - CFBundleDisplayName - SDK Demo - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLocalizations - - da - de - en_AU - en_CA - en_GB - en - es_ES - es - fr_CA - fr_FR - fr - he - it - nb - nl - pl - pt - ru - sv - tr - zh-Hans - - CFBundleName - Braintree iOS SDK Demo - CFBundlePackageType - APPL - CFBundleShortVersionString - 4.8.4 - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLName - com.braintreepayments.Demo - CFBundleURLSchemes - - com.braintreepayments.Demo.payments - - - - CFBundleVersion - 4.8.4 - LSApplicationQueriesSchemes - - com.braintreepayments.Demo.payments - com.venmo.touch.v2 - - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - Launch Screen - UIRequiredDeviceCapabilities - - armv7 - - UIRequiresFullScreen - - UIStatusBarHidden - - UIStatusBarStyle - UIStatusBarStyleLightContent - UIStatusBarTintParameters - - UINavigationBar - - Style - UIBarStyleDefault - Translucent - - - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationLandscapeLeft - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Prefix.pch b/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Prefix.pch deleted file mode 100755 index 3d611af3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/Braintree-Demo-Prefix.pch +++ /dev/null @@ -1,2 +0,0 @@ -#import -#import diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/InfoPlist.strings b/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/InfoPlist.strings deleted file mode 100755 index 477b28ff..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/Main.strings b/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/Main.strings deleted file mode 100755 index fdcb4955..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/en.lproj/Main.strings +++ /dev/null @@ -1,63 +0,0 @@ - -/* Class = "IBUILabel"; text = "[braintree payPalControlWithCompletion:];"; ObjectID = "2E9-9x-5fB"; */ -"2E9-9x-5fB.text" = "[braintree paymentButtonWithDelegate:…]"; - -/* Class = "IBUILabel"; text = "Transmit nonce to your server → 💰"; ObjectID = "2q2-ZJ-xOe"; */ -"2q2-ZJ-xOe.text" = "Transmit nonce to your server → 💰"; - -/* Class = "IBUILabel"; text = "Transaction"; ObjectID = "4hk-mK-yky"; */ -"4hk-mK-yky.text" = "Transaction"; - -/* Class = "IBUILabel"; text = "[braintree dropinViewControllerWithCompletion:];"; ObjectID = "9x8-Nu-myL"; */ -"9x8-Nu-myL.text" = "[braintree dropinViewControllerWithCompletion:…];"; - -/* Class = "IBUITableViewSection"; headerTitle = "Step 2: Create Nonce"; ObjectID = "LJb-7g-SHk"; */ -"LJb-7g-SHk.headerTitle" = "Create a Payment Method"; - -/* Class = "IBUILabel"; text = "One Touch"; ObjectID = "PaT-fr-JHw"; */ -"PaT-fr-JHw.text" = "Payment Buttons & One Touch"; - -/* Class = "IBUILabel"; text = "[braintree tokenizeCardWithNumber:…];"; ObjectID = "Rp4-mk-GPh"; */ -"Rp4-mk-GPh.text" = "[braintree tokenizeCardWithNumber:…];"; - -/* Class = "IBUILabel"; text = "(nil)"; ObjectID = "TF6-8A-TuS"; */ -"TF6-8A-TuS.text" = "(nil)"; - -/* Class = "IBUILabel"; text = "Nonce"; ObjectID = "Wbo-0U-3Vw"; */ -"Wbo-0U-3Vw.text" = "Nonce"; - -/* Class = "IBUILabel"; text = "Make a Transaction"; ObjectID = "Wop-mr-JDF"; */ -"Wop-mr-JDF.text" = "Make a Transaction"; - -/* Class = "IBUINavigationItem"; title = "Braintree SDK for iOS"; ObjectID = "ZEn-QI-hbv"; */ -"ZEn-QI-hbv.title" = "v.zero"; - -/* Class = "IBUILabel"; text = "Braintree"; ObjectID = "cV4-n0-2WW"; */ -"cV4-n0-2WW.text" = "Merchant"; - -/* Class = "IBUILabel"; text = "[Braintree braintreeWithClientToken:];"; ObjectID = "ccE-ej-MeD"; */ -"ccE-ej-MeD.text" = "[Braintree braintreeWithClientToken:];"; - -/* Class = "IBUILabel"; text = "Initialize with a Client Token"; ObjectID = "cdT-q9-6cH"; */ -"cdT-q9-6cH.text" = "Initialize with a Client Token"; - -/* Class = "IBUITableViewSection"; headerTitle = "Step 3: Make a Transaction"; ObjectID = "fYo-pp-MTy"; */ -"fYo-pp-MTy.headerTitle" = "Create a Transaction"; - -/* Class = "IBUILabel"; text = "Card Tokenization"; ObjectID = "g1s-7X-ara"; */ -"g1s-7X-ara.text" = "Card Tokenization"; - -/* Class = "IBUILabel"; text = "Drop-In"; ObjectID = "hWi-9S-SNj"; */ -"hWi-9S-SNj.text" = "Drop-In"; - -/* Class = "IBUITableViewSection"; headerTitle = "Library Version"; ObjectID = "hnV-8l-v2h"; */ -"hnV-8l-v2h.headerTitle" = "Library Version"; - -/* Class = "IBUILabel"; text = "pod \"Braintree\""; ObjectID = "ocb-oW-K0r"; */ -"ocb-oW-K0r.text" = "pod \"Braintree\""; - -/* Class = "IBUILabel"; text = "(nil)"; ObjectID = "pZN-Ur-Ks9"; */ -"pZN-Ur-Ks9.text" = "(nil)"; - -/* Class = "IBUILabel"; text = "(nil)"; ObjectID = "zaP-r6-4Ld"; */ -"zaP-r6-4Ld.text" = "(nil)"; diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/main.m b/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/main.m deleted file mode 100755 index f4e520f7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Supporting Files/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "BraintreeDemoAppDelegate.h" - -int main(int argc, char * argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([BraintreeDemoAppDelegate class])); - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-4.0-Migration-Guide.md b/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-4.0-Migration-Guide.md deleted file mode 100755 index a5229199..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-4.0-Migration-Guide.md +++ /dev/null @@ -1 +0,0 @@ -## This document has moved to [Braintree iOS SDK 4.0 Migration Guide](https://developers.braintreepayments.com/guides/client-sdk/migration/ios/v4) diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-Static-Integration-Guide.md b/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-Static-Integration-Guide.md deleted file mode 100755 index 3331c76b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Docs/Braintree-Static-Integration-Guide.md +++ /dev/null @@ -1,52 +0,0 @@ -Static Library Integration Guide ------------------------------------- - -Please follow these instructions to integrate Braintree iOS into your app using the provided static library. - -> Note: We assume that you are using Xcode 8+ and iOS 9.0+ as your Base SDK. - -1. Add the Braintree iOS SDK code to your repository - - [Download the SDK as a ZIP file from GitHub](https://github.com/braintree/braintree_ios/archive/master.zip) and unzip it into your app's root directory in Finder - -2. Open up your app in Xcode - -3. Add Braintree as a subproject - - Open your project and drag the Braintree.xcodeproj file to your Project Navigator under your project. Be sure *NOT* to have the Braintree.xcodeproj open while doing this step. - - ![Screenshot of adding Braintree as a subproject](bt_static_screenshot_sub_project.png) - -4. Add `Braintree` to your build phases (`[Your App Target]` > `Build Phases`) - - `Target Dependencies` - - Click the `+` and add `Braintree` - - ![Screenshot of adding Braintree to Target Dependencies](bt_static_screenshot_target_dependency.gif) - - - `Link Binary With Libraries` - - Click the `+` and add `libBraintree.a` - - ![Screenshot of adding Braintree to Link Bunary With Libraries](bt_static_screenshot_link_binary.gif) - -5. Add `localized strings` to `Copy Bundle Resources` (`[Your App Target]` > `Build Phases`) - - In the Project Navigator, locate the `UI.strings` (`Braintree.xcodeproj` > `BraintreeUI` > `Localization` > `UI.strings`) - - Drag the `UI.strings` file from the Navigator to the `Copy Bundle Resources` panel and drop it - - Repeat for remaining localized strings - - `Drop-In.strings` (`Braintree.xcodeproj` > `BraintreeUI` > `Drop-In` > `Localization` > `Drop-In.strings`) - - `Three-D-Secure.strings` (`Braintree.xcodeproj` > `Braintree3DSecure` > `Localization` > `Three-D-Secure.strings`) - - ![Screenshot of adding localized strings to Copy Bundle Resources](bt_static_screenshot_strings.gif) - -6. Modify your build settings (`[Your App Target]` > `Build Settings`) - - Update `Header Search Paths` - - Add `$(PROJECT_DIR)/braintree_ios` (or whatever the name of the braintree folder at the top level of your project is) - - Be sure to select recursive from the drop down at the right - - ![Screenshot of updating Header Search Paths](bt_static_screenshot_header_search_paths.png) - - - Update `Other Linker Flags` - - Add `-ObjC` - - ![Screenshot of updating Header Search Paths](bt_static_screenshot_linker_flags.png) - -7. `Build and Run` your app to test out the integration - -8. [Integrate the SDK in your checkout form](https://developers.braintreepayments.com/ios/start/overview) diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/Drop-In-Update.md b/examples/braintree/ios/Frameworks/Braintree/Docs/Drop-In-Update.md deleted file mode 100755 index 20040354..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Docs/Drop-In-Update.md +++ /dev/null @@ -1,5 +0,0 @@ -Drop-In Update (Beta) ------------------------------------- - -Please see the [Braintree iOS Drop-In repository](https://github.com/braintree/braintree-ios-drop-in) for the latest Drop-In code. - diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/Manual Integration.md b/examples/braintree/ios/Frameworks/Braintree/Docs/Manual Integration.md deleted file mode 100755 index 56c53ff8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Docs/Manual Integration.md +++ /dev/null @@ -1,56 +0,0 @@ -Manual Integration Without CocoaPods ------------------------------------- - -Please follow these instructions to integrate Braintree iOS into your app without CocoaPods. - -> Note: We assume that you are using Xcode 8+ and iOS 9.0+ as your Base SDK. - -1. Add the Braintree iOS SDK code to your repository - - Use git: `git submodule add https://github.com/braintree/braintree_ios.git` - - Alternatively, you can [download the SDK as a ZIP file from GitHub](https://github.com/braintree/braintree_ios/archive/master.zip) and unzip it into your app's root directory in Finder - - Delete the following folders: `Braintree-Demo`, `Docs`, `IntegrationTests`, `Specs`, `Unit Tests` -2. Open up your app in Xcode -3. Create a new framework target called `Braintree` (please use this exact name) - - In Xcode, select `File` > `New` > `Target` - - Select `Framework & Library` > `Cocoa Touch Framework` - - Use the following options - - Product Name: `Braintree` - - Language: `Objective C` - - Embed in Application: `[your app target]` - - You will now see a new `Braintree` Target Dependency in your main app target (in the first section of `Build Phases`). -4. Add the Braintree code to project - - In Xcode, select `File` > `Add Files to [...]...` - - Navigate to `[Your app project root]/braintree-ios` and select the `Braintree` directory - - Under `Add to targets`, make sure your newly-created framework target `Braintree` is checked and that `[your app target]` is unchecked - - Optionally check `Copy items if needed` - - Click `Add` - ![Screenshot of adding the Braintree files to Braintree target](screenshot_add_files.png) -5. Modify the `Braintree` target's build phases (`Project` > `Braintree` > `Build Phases`) - - In `Compile Sources`, delete all `.md` files (tip: filter by `.md`) - - In `Headers` - - Under `Public`, delete `Braintree.h` - - Select all files under `Project` and drag them to `Public` - - In `Link Binary With Libraries` - - Add the following system frameworks: - - `Contacts` - - `CoreLocation` - - `Foundation` - - `MessageUI` - - `PassKit` - - `SystemConfiguration` - - `UIKit` - - Update `Contacts` to be weak linked by changing its status to `Optional`. - - In `Copy Bundle Resources`, remove everything except the `.strings` files. -6. Modify `Braintree` build settings (`Project` > `Braintree` > `Build Settings`) - - Edit `Public Headers Folder Path` by appending `/Braintree` (e.g. `$(CONTENTS_FOLDER_PATH)/Headers/Braintree`) - - Edit `Other Linker Flags` by adding `-lc++ -ObjC` -7. Modify `[your app target]` build settings (`Project` > `[your app]` > `Build Settings`) - - Set `Always Search User Paths` to `Yes` -8. Modify `[your app target]` build phases (select the `[your app]` target, then `Build Phases`) - - In `Copy Bundle Resources`, add `Drop-In.strings`, `UI.strings` and `Three-D-Secure.strings` from the Braintree framework target (tip: filter by `.strings`) - ![Screenshot of copying bundle resources for i18n](screenshot_copy_bundles.png) -9. Remove the `Braintree` scheme - - In Xcode, select `Product` > `Scheme` > `Manage Schemes...` - - Select the `Braintree` scheme and press the `-` button -10. Build and Run your app to test out the integration -11. [Integrate the SDK in your checkout form](https://developers.braintreepayments.com/ios/start/overview) diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_header_search_paths.png b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_header_search_paths.png deleted file mode 100755 index 9c459315..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_header_search_paths.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_link_binary.gif b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_link_binary.gif deleted file mode 100755 index 380aa99c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_link_binary.gif and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_linker_flags.png b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_linker_flags.png deleted file mode 100755 index 074daee7..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_linker_flags.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_strings.gif b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_strings.gif deleted file mode 100755 index 21c81cce..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_strings.gif and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_sub_project.png b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_sub_project.png deleted file mode 100755 index 49975c75..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_sub_project.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_target_dependency.gif b/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_target_dependency.gif deleted file mode 100755 index 2c429db6..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/bt_static_screenshot_target_dependency.gif and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods-dark.png b/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods-dark.png deleted file mode 100755 index 1d8bff88..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods-dark.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods.png b/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods.png deleted file mode 100755 index 5369faa9..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-payment-methods.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-paypal-method.png b/examples/braintree/ios/Frameworks/Braintree/Docs/saved-paypal-method.png deleted file mode 100755 index deb6449a..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/saved-paypal-method.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_apple_pay.png b/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_apple_pay.png deleted file mode 100755 index 45deb384..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_apple_pay.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_files.png b/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_files.png deleted file mode 100755 index ae64811b..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_add_files.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_copy_bundles.png b/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_copy_bundles.png deleted file mode 100755 index 5625a515..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/Docs/screenshot_copy_bundles.png and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Frameworks.markdown b/examples/braintree/ios/Frameworks/Braintree/Frameworks.markdown deleted file mode 100755 index 73772298..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Frameworks.markdown +++ /dev/null @@ -1,137 +0,0 @@ -# Frameworks - -The Braintree iOS SDK is organized into a family of frameworks. - -### Differences from Braintree-iOS 3.x -* Frameworks and Carthage support -* Client key and JWT instead of client token -* `BTAPIClient` instead of `BTClient` -* `BTTokenized` instead of `BTPaymentMethod` -* Refactored tests and added tests in Swift - - -## BraintreeCore - -This is the core set of models and networking needed to use Braintree in an app or extension. All other frameworks depend on this. - -PRIMARY CLASS: -### `BTAPIClient`: Braintree API client -* Authentication with client key / JWT -* Access configuration from gateway -* Analytics -* HTTP methods on Braintree API endpoints - -#### Other Classes - -* `BTAppSwitch`: Class and protocol for authentication via app switch -* `BTJSON`: JSON parser - -## Payment Options - -The Braintree iOS SDK currently supports 6 payment options. - -1. `BraintreeCard`: Credit and debit card - * No dependencies other than `BraintreeCore` -2. `BraintreeApplePay`: Apple Pay - * Depends on `PassKit` -3. `BraintreePayPal`: PayPal - * No dependencies other than `BraintreeCore` - * Use `BTPaymentDriverDelegate` to receive app switch lifecycle events -4. `BraintreeVenmo`: Venmo - * Depends on `BraintreeCard` -5. `Braintree3DSecure`: 3D Secure - * Depends on `BraintreeCard` - * Use `BTViewControllerPresentingDelegate` (required) for cases when a view controller must be presented for buyer verification -6. `BraintreeCoinbase`: Coinbase - * No dependencies other than `BraintreeCore` - - -## BraintreeCard - -Tokenizes credit or debit cards. - -PRIMARY CLASS: -### `BTCardTokenizationClient`: Tokenizes credit and debit card info - -#### Other Classes - -* `BTCardTokenizationRequest`: Raw credit or debit card data provided by the customer -* `BTTokenizedCard`: A tokenized card that contains a payment method nonce - - -## BraintreeUI - -A pre-built payment form and payment button. - -Optionally uses these payment option frameworks, if present: `BraintreeCard`, `BraintreePayPal`, `BraintreeVenmo`, `BraintreeCoinbase`. - -### Features - -* UI - * Card form -* Drop-in - - -## BraintreePayPal - -Accept payments with PayPal app via PayPal One Touch. - -### Features - -* `BTPayPalDriver`: Coordinates paying with PayPal by switching to the PayPal app or the web browser -* **Future payments** via `-authorizeAccount...` - * `BTTokenizedPayPalAccount`: A tokenized PayPal account that contains a payment method nonce -* **Single payments** via `-checkoutWithCheckoutRequest...` - * `BTTokenizedPayPalCheckout`: A tokenized PayPal checkout that contains a payment method nonce -* `BTPayPalCheckoutRequest`: Options for a PayPal checkout flow - - -## BraintreeVenmo - -**Depends on BraintreeCard.** - -Accept payments with a credit or debit card from the Venmo app via Venmo One Touch. - -### Features - -* `BTVenmoDriver`: Coordinates switching to the Venmo app for the buyer to select a card -* `BTVenmoTokenizedCard`: A tokenized card from Venmo that contains a payment method nonce - - -## BraintreeCoinbase - -Accept bitcoin payments via Coinbase. - -## Features - -* `BTCoinbaseDriver`: Coordinates paying with Coinbase by switching to the Coinbase app or the web browser -* `BTTokenizedCoinbaseAccount`: A tokenized Coinbase account that contains a payment method nonce - - -## BraintreeApplePay - -**Depends on `PassKit`.** - -Accept Apple Pay by using Braintree to process payments. - -### Features - -* `BTApplePayTokenizationClient`: Performs tokenization of a `PKPayment` and returns a tokenized Apple Pay payment instrument -* `BTTokenizedApplePayPayment`: A tokenized Apple Pay payment that contains a payment method nonce - - -## Braintree3DSecure - -**Depends on `BraintreeCard`.** - -Perform 3D Secure verification. - -### Features - -* `BTThreeDSecureDriver`: Coordinates 3D Secure verification via in-app web view -* `BTThreeDSecureVerification`: Card/transactions details to be verified -* `BTThreeDSecureTokenizedCard`: A tokenized card that contains a payment method nonce - * `liabilityShifted`: 3D Secure worked and authentication succeeded. This will also be true if the issuing bank does not support 3D Secure, but the payment method does - * `liabilityShiftPossible`: The payment method was eligible for 3D Secure - * These parameters pass through the client-side first and should not be trusted for your server-side risk assessment - diff --git a/examples/braintree/ios/Frameworks/Braintree/Gemfile b/examples/braintree/ios/Frameworks/Braintree/Gemfile deleted file mode 100755 index 58c410e4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Gemfile +++ /dev/null @@ -1,10 +0,0 @@ -source "https://rubygems.org" - -gem 'cocoapods' -gem 'rake' -gem 'git-pairing' -gem 'highline', :require => 'highline/import' -gem 'rake_commit' -gem 'shenzhen' -gem 'xcpretty' - diff --git a/examples/braintree/ios/Frameworks/Braintree/Gemfile.lock b/examples/braintree/ios/Frameworks/Braintree/Gemfile.lock deleted file mode 100755 index 3a20730f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Gemfile.lock +++ /dev/null @@ -1,128 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (2.3.5) - activesupport (4.2.8) - i18n (~> 0.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - awesome_print (1.6.1) - aws-sdk (1.64.0) - aws-sdk-v1 (= 1.64.0) - aws-sdk-v1 (1.64.0) - json (~> 1.4) - nokogiri (>= 1.4.4) - claide (1.0.1) - cocoapods (1.2.0) - activesupport (>= 4.0.2, < 5) - claide (>= 1.0.1, < 2.0) - cocoapods-core (= 1.2.0) - cocoapods-deintegrate (>= 1.0.1, < 2.0) - cocoapods-downloader (>= 1.1.3, < 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.1.2, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored (~> 1.2) - escape (~> 0.0.4) - fourflusher (~> 2.0.1) - gh_inspector (~> 1.0) - molinillo (~> 0.5.5) - nap (~> 1.0) - ruby-macho (~> 0.2.5) - xcodeproj (>= 1.4.1, < 2.0) - cocoapods-core (1.2.0) - activesupport (>= 4.0.2, < 5) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - cocoapods-deintegrate (1.0.1) - cocoapods-downloader (1.1.3) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.0) - cocoapods-stats (1.0.0) - cocoapods-trunk (1.1.2) - nap (>= 0.8, < 2.0) - netrc (= 0.7.8) - cocoapods-try (1.1.0) - colored (1.2) - colored2 (3.1.2) - commander (4.3.5) - highline (~> 1.7.2) - dotenv (2.0.2) - escape (0.0.4) - faraday (0.8.9) - multipart-post (~> 1.2.0) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - fourflusher (2.0.1) - fuzzy_match (2.0.4) - gh_inspector (1.0.3) - git-pairing (0.5.3) - awesome_print (>= 1.1.0) - highline (>= 1.6.15) - paint (>= 0.8.5) - trollop (>= 2.0) - highline (1.7.3) - i18n (0.8.1) - json (1.8.6) - mini_portile (0.6.2) - minitest (5.10.1) - molinillo (0.5.7) - multipart-post (1.2.0) - nanaimo (0.2.3) - nap (1.1.0) - net-sftp (2.1.2) - net-ssh (>= 2.6.5) - net-ssh (2.9.2) - netrc (0.7.8) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - paint (1.0.0) - plist (3.1.0) - rake (10.4.2) - rake_commit (1.2.0) - ruby-macho (0.2.6) - rubyzip (1.1.7) - security (0.1.3) - shenzhen (0.14.2) - aws-sdk (~> 1.0) - commander (~> 4.3) - dotenv (>= 0.7) - faraday (~> 0.8.9) - faraday_middleware (~> 0.9) - highline (>= 1.7.2) - json (~> 1.8) - net-sftp (~> 2.1.2) - plist (~> 3.1.0) - rubyzip (~> 1.1) - security (~> 0.1.3) - terminal-table (~> 1.4.5) - terminal-table (1.4.5) - thread_safe (0.3.6) - trollop (2.1.2) - tzinfo (1.2.3) - thread_safe (~> 0.1) - xcodeproj (1.4.4) - CFPropertyList (~> 2.3.3) - claide (>= 1.0.1, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.2.3) - xcpretty (0.1.11) - -PLATFORMS - ruby - -DEPENDENCIES - cocoapods - git-pairing - highline - rake - rake_commit - shenzhen - xcpretty - -BUNDLED WITH - 1.13.3 diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTAPIClient_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTAPIClient_IntegrationTests.m deleted file mode 100755 index 19e9375c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTAPIClient_IntegrationTests.m +++ /dev/null @@ -1,53 +0,0 @@ -#import -#import -#import - -@interface BTAPIClient_IntegrationTests : XCTestCase -@end - -@implementation BTAPIClient_IntegrationTests - -- (void)testFetchConfiguration_withTokenizationKey_returnsTheConfiguration { - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [client fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertEqualObjects([configuration.json[@"merchantId"] asString], @"dcpspy2brwdjr3qn"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFetchConfiguration_withClientToken_returnsTheConfiguration { - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [client fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - // Note: client token uses a different merchant ID than the merchant whose tokenization key - // we use in the other test - XCTAssertEqualObjects([configuration.json[@"merchantId"] asString], @"348pk9cgf3bgyw2b"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFetchConfiguration_withVersionThreeClientToken_returnsTheConfiguration { - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN_VERSION_3]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [client fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - // Note: client token uses a different merchant ID than the merchant whose tokenization key - // we use in the other test - XCTAssertEqualObjects([configuration.json[@"merchantId"] asString], @"dcpspy2brwdjr3qn"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTHTTPSSLPinning_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTHTTPSSLPinning_IntegrationTests.m deleted file mode 100755 index b9d1b347..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/BTHTTPSSLPinning_IntegrationTests.m +++ /dev/null @@ -1,108 +0,0 @@ -#import "BTHTTP.h" -#import - -@interface BTHTTPSSLPinning_IntegrationTests : XCTestCase -@end - -@implementation BTHTTPSSLPinning_IntegrationTests - -// Will work when we comply with ATS -- (void)testBTHTTP_whenUsingProductionEnvironmentWithTrustedSSLCertificates_allowsNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"https://api.braintreegateway.com"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"/heartbeat.json" completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - XCTAssertEqualObjects([body[@"heartbeat"] asString], @"d2765eaa0dad9b300b971f074-production"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBTHTTP_whenUsingSandboxEnvironmentWithTrustedSSLCertificates_allowsNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"https://api.sandbox.braintreegateway.com"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"/heartbeat.json" completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - XCTAssertEqualObjects([body[@"heartbeat"] asString], @"d2765eaa0dad9b300b971f074-sandbox"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBTHTTP_whenUsingAServerWithValidCertificateChainWithARootCAThatWeDoNotExplicitlyTrust_doesNotAllowNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"https://www.digicert.com"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"/heartbeat.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(body); - XCTAssertNil(response); - XCTAssertEqualObjects(error.domain, NSURLErrorDomain); - XCTAssertEqual(error.code, NSURLErrorServerCertificateUntrusted); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - SSL Pinning - -#ifdef RUN_SSL_PINNING_SPECS - -- (void)testBTHTTP_whenUsingTrustedPinnedRootCertificates_allowsNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"https://localhost:9443"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - http.pinnedCertificates = @[[NSData dataWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"good_root_cert" ofType:@"der"]]]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBTHTTP_whenUsingUntrustedUnpinnedRootCertificatesFromLegitimateHosts_doesNotallowNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"https://localhost:9444"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - http.pinnedCertificates = @[[NSData dataWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"good_root_cert" ofType:@"der"]]]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"heartbeat" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(body); - XCTAssertNil(response); - XCTAssertEqualObjects(error.domain, NSURLErrorDomain); - XCTAssertEqual(error.code, NSURLErrorServerCertificateUntrusted); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBTHTTP_whenUsingNonSSLConnection_allowsNetworkCommunication { - NSURL *url = [NSURL URLWithString:@"http://localhost:9445/"]; - BTHTTP *http = [[BTHTTP alloc] initWithBaseURL:url tokenizationKey:@"development_testing_integration_merchant_id"]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [http GET:@"heartbeat" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#endif - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.der b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.der deleted file mode 100755 index 45dec5cd..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.der and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.pem deleted file mode 100755 index 4d33be0a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_cert.pem +++ /dev/null @@ -1,63 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - c4:3f:63:74:d1:c2:3f:8b - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=CA, ST=California, O=All That is Evil, OU=All That is Evil Root CA - Validity - Not Before: Jun 4 17:46:36 2014 GMT - Not After : May 11 17:46:36 2114 GMT - Subject: C=CA, ST=California, O=All That is Evil, OU=All That is Evil Root CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:aa:cc:0d:cf:8c:f6:be:8f:61:af:69:09:d8:b4: - 9c:e3:7f:f1:81:1d:4d:c7:72:8f:cc:00:b4:60:01: - 4f:15:39:14:42:34:7f:f5:7c:76:ec:29:20:17:b1: - 44:e8:b8:ad:3a:8f:e1:6c:0f:4f:5d:82:d2:e0:8c: - 91:18:3d:bd:84:a6:58:06:90:d4:06:d3:93:0a:27: - 65:41:9b:8e:46:2d:28:d8:e4:60:d3:ec:ab:08:d5: - 9b:1e:34:1d:c2:ad:e1:23:9b:23:9f:7d:90:57:b5: - e8:8d:a3:12:84:88:7a:e0:79:7b:a1:18:3d:30:2e: - f0:bf:e8:07:e0:bf:2d:32:47 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - C5:27:18:DE:1E:17:5D:AA:D5:49:75:16:A6:45:E1:A6:49:1A:43:E3 - X509v3 Authority Key Identifier: - keyid:C5:27:18:DE:1E:17:5D:AA:D5:49:75:16:A6:45:E1:A6:49:1A:43:E3 - DirName:/C=CA/ST=California/O=All That is Evil/OU=All That is Evil Root CA - serial:C4:3F:63:74:D1:C2:3F:8B - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - a3:8e:07:86:f8:70:56:dc:df:f2:fa:57:fe:a2:b6:fc:db:6e: - a7:b7:ec:f0:51:3a:f0:77:a3:6e:d7:2f:3b:cf:d8:b7:8a:7f: - fd:d0:50:ca:85:77:b4:ce:d2:bf:f4:d2:70:31:ce:c1:9f:f9: - 66:9a:74:7f:2b:97:c1:aa:3c:d2:96:ff:37:e1:1d:c2:10:31: - f4:8b:05:1e:1b:52:0e:52:66:12:eb:0a:b0:2a:4a:88:25:94: - ed:2a:9c:16:03:90:7b:6c:2b:30:78:ce:65:6b:24:e0:f9:e8: - 87:65:2a:e1:5d:3d:ed:ec:84:db:60:3d:23:ab:0f:7e:80:99: - 60:55 ------BEGIN CERTIFICATE----- -MIIDBjCCAm+gAwIBAgIJAMQ/Y3TRwj+LMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV -BAYTAkNBMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRkwFwYDVQQKExBBbGwgVGhhdCBp -cyBFdmlsMSEwHwYDVQQLExhBbGwgVGhhdCBpcyBFdmlsIFJvb3QgQ0EwIBcNMTQw -NjA0MTc0NjM2WhgPMjExNDA1MTExNzQ2MzZaMGAxCzAJBgNVBAYTAkNBMRMwEQYD -VQQIEwpDYWxpZm9ybmlhMRkwFwYDVQQKExBBbGwgVGhhdCBpcyBFdmlsMSEwHwYD -VQQLExhBbGwgVGhhdCBpcyBFdmlsIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEBBQAD -gY0AMIGJAoGBAKrMDc+M9r6PYa9pCdi0nON/8YEdTcdyj8wAtGABTxU5FEI0f/V8 -duwpIBexROi4rTqP4WwPT12C0uCMkRg9vYSmWAaQ1AbTkwonZUGbjkYtKNjkYNPs -qwjVmx40HcKt4SObI599kFe16I2jEoSIeuB5e6EYPTAu8L/oB+C/LTJHAgMBAAGj -gcUwgcIwHQYDVR0OBBYEFMUnGN4eF12q1Ul1FqZF4aZJGkPjMIGSBgNVHSMEgYow -gYeAFMUnGN4eF12q1Ul1FqZF4aZJGkPjoWSkYjBgMQswCQYDVQQGEwJDQTETMBEG -A1UECBMKQ2FsaWZvcm5pYTEZMBcGA1UEChMQQWxsIFRoYXQgaXMgRXZpbDEhMB8G -A1UECxMYQWxsIFRoYXQgaXMgRXZpbCBSb290IENBggkAxD9jdNHCP4swDAYDVR0T -BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCjjgeG+HBW3N/y+lf+orb8226nt+zw -UTrwd6Nu1y87z9i3in/90FDKhXe0ztK/9NJwMc7Bn/lmmnR/K5fBqjzSlv834R3C -EDH0iwUeG1IOUmYS6wqwKkqIJZTtKpwWA5B7bCsweM5layTg+eiHZSrhXT3t7ITb -YD0jqw9+gJlgVQ== ------END CERTIFICATE----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_key.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_key.pem deleted file mode 100755 index 2c86951d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_root_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQCqzA3PjPa+j2GvaQnYtJzjf/GBHU3Hco/MALRgAU8VORRCNH/1 -fHbsKSAXsUTouK06j+FsD09dgtLgjJEYPb2EplgGkNQG05MKJ2VBm45GLSjY5GDT -7KsI1ZseNB3CreEjmyOffZBXteiNoxKEiHrgeXuhGD0wLvC/6Afgvy0yRwIDAQAB -AoGAfdQbEJ9PYRCM7Qe7Y1Wch9ZIe9C07o0t9yNFv7z3IDGPBT9cTeTGUDH0HMBS -fgkgRhaeAlg9Ji0tYpTsiClkJtLx8CRnOJE2ON4DSjV7X24Me4zeEobimWlfNU/6 -R1KGcbHBHlIedf+l0okPdMgveDp/25a/ekZZiv0sYHwI2IECQQDgRzHda1/AMtkH -Wq6Ycemwfu6CYiTDXvK/0ZOLZA/CrOBcWIkSPEAm3Obd5Zkc9XR6og4C7vm86JRo -g4k51honAkEAwvRiWiUGAPDw6htOiSGICBRtjThiwyvTgtQkcqqfilLrMjkLOZ8m -K8dsByfnkpCrv8ZRCTiznBRF43ohtk3a4QJAZsY5Q44AwsKKUaRsfc81l3uTMIxo -7F6GPwB67FVeI4e1CJxJs+GIREbWRLkCARM53TiF0zJPnxG1cG9WYvqJ4QJBAJWg -MRgUkE4KnixfNuCCrr/cxdP8Mbivm08u+KZVE8t7Jm5OX7Ii1o4FKYE4fD/97wNp -9uoH7bndyWH0a4laqaECQFxpY99GqpxsMkcbhsWWDvj4LxocCSfD4vgs8nJJprh5 -mQqau9VfIQFU6ify4C/2I662AG+DkgvFjt1rtow8rMU= ------END RSA PRIVATE KEY----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_cert.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_cert.pem deleted file mode 100755 index 1ddee355..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_cert.pem +++ /dev/null @@ -1,47 +0,0 @@ -Certificate: - Data: - Version: 1 (0x0) - Serial Number: 1 (0x1) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=CA, ST=California, O=All That is Evil, OU=All That is Evil Root CA - Validity - Not Before: Jun 4 17:46:36 2014 GMT - Not After : May 11 17:46:36 2114 GMT - Subject: C=CA, ST=California, O=All That is Evil, OU=All That is Evil Site, CN=* - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:c4:d2:3f:0a:ad:03:b7:fb:fb:c4:0e:b1:39:78: - 18:02:b5:aa:4f:61:4d:6b:55:2c:01:f8:3d:83:32: - 5c:5d:7c:d6:13:cc:e2:c3:15:0b:ed:92:58:35:90: - 49:47:0a:10:36:dc:36:9c:c4:22:75:64:b7:69:8e: - 10:30:bc:64:ac:d8:cf:a5:5d:eb:27:b2:e7:a5:db: - 2e:47:4f:b2:f5:b6:97:da:1a:0a:6e:15:14:fc:4b: - 86:6a:16:b8:93:63:30:32:7f:dd:87:39:01:cc:17: - 27:6c:4e:cc:be:4f:02:75:44:46:fe:52:58:7b:43: - da:a1:36:5b:ec:83:b3:3f:db - Exponent: 65537 (0x10001) - Signature Algorithm: sha1WithRSAEncryption - a8:fe:44:33:5e:88:2c:e5:b7:ea:6a:04:62:92:d8:47:4c:bc: - fd:2f:c3:33:fb:6a:41:67:c8:f4:ae:87:86:89:a9:08:c4:a2: - 56:54:73:42:25:fa:62:59:b4:4f:39:43:9b:63:97:3b:a0:ee: - c9:bd:ff:1f:00:ae:92:52:82:b0:96:34:c9:bd:7a:ec:57:ef: - ba:cf:72:cf:62:bd:17:db:47:b8:58:b5:5b:e9:e4:25:0e:2f: - 7a:41:7a:68:7d:fd:c7:7d:e1:7b:e0:b9:6c:4a:d9:5c:aa:5e: - a1:61:62:80:09:69:59:16:7d:71:18:2b:8e:8f:2f:d5:94:93: - 3c:29 ------BEGIN CERTIFICATE----- -MIICOjCCAaMCAQEwDQYJKoZIhvcNAQEFBQAwYDELMAkGA1UEBhMCQ0ExEzARBgNV -BAgTCkNhbGlmb3JuaWExGTAXBgNVBAoTEEFsbCBUaGF0IGlzIEV2aWwxITAfBgNV -BAsTGEFsbCBUaGF0IGlzIEV2aWwgUm9vdCBDQTAgFw0xNDA2MDQxNzQ2MzZaGA8y -MTE0MDUxMTE3NDYzNlowaTELMAkGA1UEBhMCQ0ExEzARBgNVBAgTCkNhbGlmb3Ju -aWExGTAXBgNVBAoTEEFsbCBUaGF0IGlzIEV2aWwxHjAcBgNVBAsTFUFsbCBUaGF0 -IGlzIEV2aWwgU2l0ZTEKMAgGA1UEAxQBKjCBnzANBgkqhkiG9w0BAQEFAAOBjQAw -gYkCgYEAxNI/Cq0Dt/v7xA6xOXgYArWqT2FNa1UsAfg9gzJcXXzWE8ziwxUL7ZJY -NZBJRwoQNtw2nMQidWS3aY4QMLxkrNjPpV3rJ7LnpdsuR0+y9baX2hoKbhUU/EuG -aha4k2MwMn/dhzkBzBcnbE7Mvk8CdURG/lJYe0PaoTZb7IOzP9sCAwEAATANBgkq -hkiG9w0BAQUFAAOBgQCo/kQzXogs5bfqagRikthHTLz9L8Mz+2pBZ8j0roeGiakI -xKJWVHNCJfpiWbRPOUObY5c7oO7Jvf8fAK6SUoKwljTJvXrsV++6z3LPYr0X20e4 -WLVb6eQlDi96QXpoff3HfeF74LlsStlcql6hYWKACWlZFn1xGCuOjy/VlJM8KQ== ------END CERTIFICATE----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_key.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_key.pem deleted file mode 100755 index 8373ca6d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDE0j8KrQO3+/vEDrE5eBgCtapPYU1rVSwB+D2DMlxdfNYTzOLD -FQvtklg1kElHChA23DacxCJ1ZLdpjhAwvGSs2M+lXesnsuel2y5HT7L1tpfaGgpu -FRT8S4ZqFriTYzAyf92HOQHMFydsTsy+TwJ1REb+Ulh7Q9qhNlvsg7M/2wIDAQAB -AoGBAIHDO90GBJWghHTWWvHQw8PFkeuT8z74gHMr/yIoac0ZKOsVAcwsbBjNi2qF -Hkq/z8DbnwXsKevL40CscPAwxQ4oP4G8K66cdifBd/ErdvuCeynIPleMoCnUc6Ql -q+9sy6UopSoeW6hZ8FpBZN3GdQaGDeFab1Znxd4Ey/kOf0kBAkEA47L7dBw6+iGC -6fZ8icnBZuK7QCQIu089sXwVmnnxjaz4PIjce6H+680ItB2sBlSRUCV+fcM1Sk9S -ta2MR8480QJBAN1Ix7SMK8LXdZuSBgBOH0H4QlUivE9Aa90f2G9yUFn5PRTdxlou -m/vbAQ1YqywUz43RipaIwU+whxSx/a11rOsCQHYg1PNX8gDygch/Z/zT/tIxrpOI -Hj+OzKLXjR2nRfoKUn6VQk2hrW8H4AwRmL1wAjNiQE1eiLcUkARRFQXrqQECQQCy -OH7XdBl+uKd5H5eDwWe9aySJiwtdTQZStuZLhCcg//LpDmFFmsp4gv+K70IVo8Ey -eHSFHymKdCOnUF9+yAr3AkAzTmtyM1fd72u87sIIXP/cwDKBkMTiR9LuMTVY/KWb -JmhCbgijP+58ZvHOOHbmWKDSTK81r0AvBI8F3SyVHPm3 ------END RSA PRIVATE KEY----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_request.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_request.pem deleted file mode 100755 index 9fef5f06..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/evil_site_request.pem +++ /dev/null @@ -1,40 +0,0 @@ -Certificate Request: - Data: - Version: 0 (0x0) - Subject: C=CA, ST=California, O=All That is Evil, OU=All That is Evil Site, CN=* - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:c4:d2:3f:0a:ad:03:b7:fb:fb:c4:0e:b1:39:78: - 18:02:b5:aa:4f:61:4d:6b:55:2c:01:f8:3d:83:32: - 5c:5d:7c:d6:13:cc:e2:c3:15:0b:ed:92:58:35:90: - 49:47:0a:10:36:dc:36:9c:c4:22:75:64:b7:69:8e: - 10:30:bc:64:ac:d8:cf:a5:5d:eb:27:b2:e7:a5:db: - 2e:47:4f:b2:f5:b6:97:da:1a:0a:6e:15:14:fc:4b: - 86:6a:16:b8:93:63:30:32:7f:dd:87:39:01:cc:17: - 27:6c:4e:cc:be:4f:02:75:44:46:fe:52:58:7b:43: - da:a1:36:5b:ec:83:b3:3f:db - Exponent: 65537 (0x10001) - Attributes: - a0:00 - Signature Algorithm: sha1WithRSAEncryption - 35:7e:59:a7:c3:2e:56:7d:3f:8e:e3:63:0d:cc:de:b8:d7:6c: - 3a:d4:10:ab:08:90:ad:bd:af:c4:44:e2:b1:dc:b3:2a:de:1d: - 4c:35:93:fd:4a:95:86:9a:63:64:02:d5:fe:59:57:0a:b1:08: - cc:b5:4a:1b:c8:1d:08:2e:cc:05:98:85:92:5a:69:5f:de:7c: - a2:dc:d0:ef:ad:da:82:a6:a1:7e:0e:72:22:bf:a9:ca:7b:bc: - 3a:11:f7:9e:68:c3:04:40:ad:20:93:fe:d1:32:ab:86:fa:36: - 7c:96:ce:7b:d6:12:ab:3c:e9:a5:62:f6:2c:2d:b3:3d:06:b7: - 3d:f8 ------BEGIN CERTIFICATE REQUEST----- -MIIBqTCCARICAQAwaTELMAkGA1UEBhMCQ0ExEzARBgNVBAgTCkNhbGlmb3JuaWEx -GTAXBgNVBAoTEEFsbCBUaGF0IGlzIEV2aWwxHjAcBgNVBAsTFUFsbCBUaGF0IGlz -IEV2aWwgU2l0ZTEKMAgGA1UEAxQBKjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC -gYEAxNI/Cq0Dt/v7xA6xOXgYArWqT2FNa1UsAfg9gzJcXXzWE8ziwxUL7ZJYNZBJ -RwoQNtw2nMQidWS3aY4QMLxkrNjPpV3rJ7LnpdsuR0+y9baX2hoKbhUU/EuGaha4 -k2MwMn/dhzkBzBcnbE7Mvk8CdURG/lJYe0PaoTZb7IOzP9sCAwEAAaAAMA0GCSqG -SIb3DQEBBQUAA4GBADV+WafDLlZ9P47jYw3M3rjXbDrUEKsIkK29r8RE4rHcsyre -HUw1k/1KlYaaY2QC1f5ZVwqxCMy1ShvIHQguzAWYhZJaaV/efKLc0O+t2oKmoX4O -ciK/qcp7vDoR955owwRArSCT/tEyq4b6NnyWznvWEqs86aVi9iwtsz0Gtz34 ------END CERTIFICATE REQUEST----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_cert.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_cert.pem deleted file mode 100755 index 21352d83..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_cert.pem +++ /dev/null @@ -1,63 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - b9:6f:f6:ef:ab:b7:31:a9 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=CA, ST=California, O=All That is Good, OU=All That is Good Root CA - Validity - Not Before: Jun 4 17:46:36 2014 GMT - Not After : May 11 17:46:36 2114 GMT - Subject: C=CA, ST=California, O=All That is Good, OU=All That is Good Root CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:dd:31:54:4a:7d:8f:5c:37:bd:4c:d5:e8:54:fd: - 06:d2:b9:0e:bd:89:d1:1d:22:17:7a:7e:14:0c:f2: - e6:4f:89:b4:41:ed:08:8d:2a:d1:4d:8e:05:92:ae: - 0c:83:f6:59:59:94:58:ae:15:2b:78:12:94:70:89: - 8a:af:9c:c8:a2:e8:c7:fd:e9:2e:d2:b1:7a:f5:bf: - 18:4c:a9:56:0c:b7:3b:8b:00:96:c6:25:02:ab:f7: - 97:94:30:7c:a0:bf:86:2a:55:2b:56:da:e1:d9:eb: - c1:ed:b1:8b:96:08:9e:26:f8:58:cb:ae:4a:cf:d9: - 4c:73:b2:83:4d:db:d7:68:a7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - C2:D0:38:78:7D:3C:A3:CE:48:F2:25:FD:F9:AC:5B:80:DE:4B:F6:8B - X509v3 Authority Key Identifier: - keyid:C2:D0:38:78:7D:3C:A3:CE:48:F2:25:FD:F9:AC:5B:80:DE:4B:F6:8B - DirName:/C=CA/ST=California/O=All That is Good/OU=All That is Good Root CA - serial:B9:6F:F6:EF:AB:B7:31:A9 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - d1:3b:85:b0:7a:cb:cb:10:4d:cb:97:28:ad:7b:ea:a6:d5:1d: - 98:c7:b4:8c:d9:47:06:bc:ba:c3:aa:64:d5:97:65:d8:78:79: - c9:66:87:9f:8c:aa:eb:ac:d6:65:95:c5:8b:ba:bd:f3:15:54: - 01:64:21:0e:82:98:e8:2a:9c:de:80:a3:90:4f:5f:5a:69:7f: - d2:76:f9:f3:74:99:e2:9e:02:46:af:8c:04:e4:ea:5e:56:ee: - ef:93:ff:0a:72:44:4d:6a:b6:96:de:92:17:a9:3b:8f:86:77: - 49:2a:0a:64:0e:2e:8d:26:04:c5:f6:e6:15:ea:ad:86:62:67: - 14:6c ------BEGIN CERTIFICATE----- -MIIDBjCCAm+gAwIBAgIJALlv9u+rtzGpMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV -BAYTAkNBMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRkwFwYDVQQKExBBbGwgVGhhdCBp -cyBHb29kMSEwHwYDVQQLExhBbGwgVGhhdCBpcyBHb29kIFJvb3QgQ0EwIBcNMTQw -NjA0MTc0NjM2WhgPMjExNDA1MTExNzQ2MzZaMGAxCzAJBgNVBAYTAkNBMRMwEQYD -VQQIEwpDYWxpZm9ybmlhMRkwFwYDVQQKExBBbGwgVGhhdCBpcyBHb29kMSEwHwYD -VQQLExhBbGwgVGhhdCBpcyBHb29kIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEBBQAD -gY0AMIGJAoGBAN0xVEp9j1w3vUzV6FT9BtK5Dr2J0R0iF3p+FAzy5k+JtEHtCI0q -0U2OBZKuDIP2WVmUWK4VK3gSlHCJiq+cyKLox/3pLtKxevW/GEypVgy3O4sAlsYl -Aqv3l5QwfKC/hipVK1ba4dnrwe2xi5YInib4WMuuSs/ZTHOyg03b12inAgMBAAGj -gcUwgcIwHQYDVR0OBBYEFMLQOHh9PKPOSPIl/fmsW4DeS/aLMIGSBgNVHSMEgYow -gYeAFMLQOHh9PKPOSPIl/fmsW4DeS/aLoWSkYjBgMQswCQYDVQQGEwJDQTETMBEG -A1UECBMKQ2FsaWZvcm5pYTEZMBcGA1UEChMQQWxsIFRoYXQgaXMgR29vZDEhMB8G -A1UECxMYQWxsIFRoYXQgaXMgR29vZCBSb290IENBggkAuW/276u3MakwDAYDVR0T -BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQDRO4WwesvLEE3Llyite+qm1R2Yx7SM -2UcGvLrDqmTVl2XYeHnJZoefjKrrrNZllcWLur3zFVQBZCEOgpjoKpzegKOQT19a -aX/SdvnzdJningJGr4wE5OpeVu7vk/8KckRNaraW3pIXqTuPhndJKgpkDi6NJgTF -9uYV6q2GYmcUbA== ------END CERTIFICATE----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_key.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_key.pem deleted file mode 100755 index c9c229a5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_root_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDdMVRKfY9cN71M1ehU/QbSuQ69idEdIhd6fhQM8uZPibRB7QiN -KtFNjgWSrgyD9llZlFiuFSt4EpRwiYqvnMii6Mf96S7SsXr1vxhMqVYMtzuLAJbG -JQKr95eUMHygv4YqVStW2uHZ68HtsYuWCJ4m+FjLrkrP2UxzsoNN29dopwIDAQAB -AoGBAKmOrOzFP2YTnFsQBp9PrzFNhs0onlJU1eaiS0B52q7SAooe59U/I17uJbuB -DDsEVw3iN/CKbd4HcB6scNGZv/ok3spb0We3kwKgii1+qIzmZ3qwkIqnTAhxISTU -QQ9euvPMoPcG1ZyZscU+2ayFGCy+MXQmArIuANlXFMJFp+SRAkEA7t4n9zUTbBk1 -TmSn8mWOUk7C3ir9pfKuY+qEAB8XdW4UTZbPZH0QaiwS+UkPa+byhWHpY4BG8BPR -LMgXLp55MwJBAO0OpCBJcmwV3WggaCRvwdD2hO56mwhuFwJGszxFBHma6/N6iuiB -KcIV3Wg7SwdgUCXNup6SMf6TzRJ8RjTUWr0CQF1Oak4mbW/MaQY2S2RkRzPfkD84 -i9xG79gXw3hIrOEyHrwwLNMUB1Vx4fd+koeTryhrFr/HW+5rz0mu319WiAECQHvW -Ni8Xr0p/cZY/t6exKhK7dV4PdoXE3Qg3XtKRS3ErWS9sSLyFHQdi3LLipqNH0Rau -jlrgDHXtSCfr+9EFThECQAaOPqp2W5OzrXu004VRnyi7W0/zs3ObptiaJJa9meY8 -5tG8cGFBY4lcdv7OkOx1GEDYPQEIyRa6RuzNUmIXwi4= ------END RSA PRIVATE KEY----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_cert.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_cert.pem deleted file mode 100755 index 4f95c27e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_cert.pem +++ /dev/null @@ -1,48 +0,0 @@ -Certificate: - Data: - Version: 1 (0x0) - Serial Number: 1 (0x1) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=CA, ST=California, O=All That is Good, OU=All That is Good Root CA - Validity - Not Before: Jun 4 17:46:36 2014 GMT - Not After : May 11 17:46:36 2114 GMT - Subject: C=CA, ST=California, O=All That is Good, OU=All That is Good Site, CN=localhost - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:ab:c9:bb:0a:6e:7a:b5:d8:40:a2:fb:83:47:e6: - a5:87:08:47:76:d1:ea:e7:16:70:21:cd:18:79:8b: - 27:40:80:10:1a:3b:b3:f8:2f:7b:88:d3:79:1e:b2: - 54:8f:2e:73:41:83:13:6f:8c:6d:58:f8:80:26:19: - 39:ae:8f:d1:c9:c7:c0:52:45:9b:2c:50:39:13:18: - 34:12:10:22:cb:90:a0:64:85:df:b3:7f:c1:17:94: - 50:c1:6b:ee:83:23:72:95:aa:87:2b:6a:0f:89:96: - 8e:85:b4:fc:d6:00:fe:97:a3:46:69:4c:53:67:0d: - 4a:ab:f5:b5:78:c9:88:34:93 - Exponent: 65537 (0x10001) - Signature Algorithm: sha1WithRSAEncryption - 32:b4:ab:b1:27:e1:72:53:fc:74:82:f7:95:6c:7d:ec:0e:f9: - 43:c5:2b:01:46:2f:f9:fd:ac:39:4c:90:4a:69:81:88:a6:fe: - 63:63:9f:a4:23:21:b5:88:53:c5:d4:e1:cf:90:48:eb:a0:eb: - 4a:6a:26:90:b6:ca:c0:fd:04:cd:66:6e:12:e8:63:91:e8:0f: - 46:a9:ff:a8:4a:c1:cf:b4:c4:61:4d:a2:02:25:77:d7:28:05: - 38:58:5c:8e:d2:91:c8:f1:63:d4:fb:4a:4e:6f:0c:2f:66:4d: - b5:54:91:6e:27:1c:8c:d0:e5:a2:73:4c:ae:f8:8d:5a:63:2d: - 96:be ------BEGIN CERTIFICATE----- -MIICQjCCAasCAQEwDQYJKoZIhvcNAQEFBQAwYDELMAkGA1UEBhMCQ0ExEzARBgNV -BAgTCkNhbGlmb3JuaWExGTAXBgNVBAoTEEFsbCBUaGF0IGlzIEdvb2QxITAfBgNV -BAsTGEFsbCBUaGF0IGlzIEdvb2QgUm9vdCBDQTAgFw0xNDA2MDQxNzQ2MzZaGA8y -MTE0MDUxMTE3NDYzNlowcTELMAkGA1UEBhMCQ0ExEzARBgNVBAgTCkNhbGlmb3Ju -aWExGTAXBgNVBAoTEEFsbCBUaGF0IGlzIEdvb2QxHjAcBgNVBAsTFUFsbCBUaGF0 -IGlzIEdvb2QgU2l0ZTESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEB -AQUAA4GNADCBiQKBgQCrybsKbnq12ECi+4NH5qWHCEd20ernFnAhzRh5iydAgBAa -O7P4L3uI03keslSPLnNBgxNvjG1Y+IAmGTmuj9HJx8BSRZssUDkTGDQSECLLkKBk -hd+zf8EXlFDBa+6DI3KVqocrag+Jlo6FtPzWAP6Xo0ZpTFNnDUqr9bV4yYg0kwID -AQABMA0GCSqGSIb3DQEBBQUAA4GBADK0q7En4XJT/HSC95VsfewO+UPFKwFGL/n9 -rDlMkEppgYim/mNjn6QjIbWIU8XU4c+QSOug60pqJpC2ysD9BM1mbhLoY5HoD0ap -/6hKwc+0xGFNogIld9coBThYXI7SkcjxY9T7Sk5vDC9mTbVUkW4nHIzQ5aJzTK74 -jVpjLZa+ ------END CERTIFICATE----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_key.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_key.pem deleted file mode 100755 index 65a6ca55..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXwIBAAKBgQCrybsKbnq12ECi+4NH5qWHCEd20ernFnAhzRh5iydAgBAaO7P4 -L3uI03keslSPLnNBgxNvjG1Y+IAmGTmuj9HJx8BSRZssUDkTGDQSECLLkKBkhd+z -f8EXlFDBa+6DI3KVqocrag+Jlo6FtPzWAP6Xo0ZpTFNnDUqr9bV4yYg0kwIDAQAB -AoGBAKo7zk4YDSIGmoboFsA5n+6gFbF5c/5sDdJxG7/WVZ9lSI+2ejGHXDPK3Eu/ -DGyW60AQVEJGNlXka5lVhgOmIYzjOcd/yEFJm9AvmlPXWVKJ1mpz9geZ1tuT4R+d -zfq15nhJsU226JK1+5Ik0XJoSxEUkct0Mt//VlfDZRlKcE+BAkEA3oIh6hwFDef8 -MbLhjpvELCSXLRPadkBYxxi6pNjsUOI8A0g7IebRKYI9C+rpmTQffOXjYCyKpqep -GqbBkRVOnwJBAMWlM9oD+VZCGnNMQqnXFqSXGCtyftkSSfRFosDZk4cQk/398pVE -v58h0lcQslfH+QC2jNYlpWU5Z4omwiIluY0CQQDePXgGTqo1s4nPUe279JTBymI8 -oeHHzoldgrOZRxjxyKVMWe7F87biELVMm/tqDAePRkYOny51OmzKs9gOQwvdAkEA -tpyU8/KIBXK+DZmAXnwkp54S7tGy8c08Fz3fyl89N6XRlvNzlwcWJWmSdm8u2Hwj -TM1eAt51mrkXOUXmSLaiYQJBAJdjC9KRBorIk0cGS/SKAUn4ysoRgbp+aB3ErHwb -xjMCdohHDaHOJIkL1O8mzt6i3LQMitw+fURcTG2vGvHsS5I= ------END RSA PRIVATE KEY----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_request.pem b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_request.pem deleted file mode 100755 index a36c7eff..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/good_site_request.pem +++ /dev/null @@ -1,41 +0,0 @@ -Certificate Request: - Data: - Version: 0 (0x0) - Subject: C=CA, ST=California, O=All That is Good, OU=All That is Good Site, CN=localhost - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:ab:c9:bb:0a:6e:7a:b5:d8:40:a2:fb:83:47:e6: - a5:87:08:47:76:d1:ea:e7:16:70:21:cd:18:79:8b: - 27:40:80:10:1a:3b:b3:f8:2f:7b:88:d3:79:1e:b2: - 54:8f:2e:73:41:83:13:6f:8c:6d:58:f8:80:26:19: - 39:ae:8f:d1:c9:c7:c0:52:45:9b:2c:50:39:13:18: - 34:12:10:22:cb:90:a0:64:85:df:b3:7f:c1:17:94: - 50:c1:6b:ee:83:23:72:95:aa:87:2b:6a:0f:89:96: - 8e:85:b4:fc:d6:00:fe:97:a3:46:69:4c:53:67:0d: - 4a:ab:f5:b5:78:c9:88:34:93 - Exponent: 65537 (0x10001) - Attributes: - a0:00 - Signature Algorithm: sha1WithRSAEncryption - 4d:4c:d5:31:ef:1c:04:b0:a9:50:f4:98:e9:31:66:b2:44:f2: - 3c:80:97:a0:9b:20:3c:a1:7a:69:33:7f:5a:23:2a:2f:ac:12: - 15:f4:94:54:15:4f:3c:a0:d7:d2:c2:33:7e:e1:fd:c1:10:39: - 39:f2:28:bd:c7:d6:c2:36:c6:a0:d8:5f:d7:2f:56:92:07:e6: - 9d:8b:52:d3:93:0a:34:34:c8:e7:3a:7c:3d:48:73:6c:63:14: - 1f:a7:d1:bd:38:9f:ca:f8:84:33:db:9c:6b:80:86:a2:e5:4d: - 53:7d:c6:98:b3:7e:3a:f1:87:e1:b1:5c:81:dc:50:68:a9:91: - 19:aa ------BEGIN CERTIFICATE REQUEST----- -MIIBsTCCARoCAQAwcTELMAkGA1UEBhMCQ0ExEzARBgNVBAgTCkNhbGlmb3JuaWEx -GTAXBgNVBAoTEEFsbCBUaGF0IGlzIEdvb2QxHjAcBgNVBAsTFUFsbCBUaGF0IGlz -IEdvb2QgU2l0ZTESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQCrybsKbnq12ECi+4NH5qWHCEd20ernFnAhzRh5iydAgBAaO7P4 -L3uI03keslSPLnNBgxNvjG1Y+IAmGTmuj9HJx8BSRZssUDkTGDQSECLLkKBkhd+z -f8EXlFDBa+6DI3KVqocrag+Jlo6FtPzWAP6Xo0ZpTFNnDUqr9bV4yYg0kwIDAQAB -oAAwDQYJKoZIhvcNAQEFBQADgYEATUzVMe8cBLCpUPSY6TFmskTyPICXoJsgPKF6 -aTN/WiMqL6wSFfSUVBVPPKDX0sIzfuH9wRA5OfIovcfWwjbGoNhf1y9WkgfmnYtS -05MKNDTI5zp8PUhzbGMUH6fRvTifyviEM9uca4CGouVNU33GmLN+OvGH4bFcgdxQ -aKmRGao= ------END CERTIFICATE REQUEST----- diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/https_server.rb b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/https_server.rb deleted file mode 100755 index 188f7ed0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/https_server.rb +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env ruby -require 'webrick' -require 'webrick/https' -require 'openssl' - -BEGIN { File.write("#{ $0 }.pid", $$) } -END { File.delete("#{ $0 }.pid") } - -private_key_file = "#{__dir__}/good_site_key.pem" -cert_file = "#{__dir__}/good_site_cert.pem" -root_cert_file = "#{__dir__}/good_root_cert.pem" - -pkey = OpenSSL::PKey::RSA.new(File.read(private_key_file)) -cert = OpenSSL::X509::Certificate.new(File.read(cert_file)) -root_cert = OpenSSL::X509::Certificate.new(File.read(root_cert_file)) - -def log message - puts "[https_server] #{message}" -end - -good_server = WEBrick::HTTPServer.new( - :BindAddress => '0.0.0.0', - :Port => 9443, - :Logger => WEBrick::Log::new(nil, WEBrick::Log::ERROR), - :SSLEnable => true, - :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE, - :SSLCertificate => cert, - :SSLPrivateKey => pkey, - :SSLExtraChainCert => [root_cert] -) -good_server.mount_proc '/' do |req, res| - res.body = '{ "status": "ok", "server": "good" }' - res.content_type = 'application/json' -end - -evil_private_key_file = "#{__dir__}/evil_site_key.pem" -evil_cert_file = "#{__dir__}/evil_site_cert.pem" -evil_root_cert_file = "#{__dir__}/evil_root_cert.pem" - -pkey = OpenSSL::PKey::RSA.new(File.read(evil_private_key_file)) -cert = OpenSSL::X509::Certificate.new(File.read(evil_cert_file)) -root_cert = OpenSSL::X509::Certificate.new(File.read(evil_root_cert_file)) - -evil_server = WEBrick::HTTPServer.new( - :BindAddress => '0.0.0.0', - :Port => 9444, - :Logger => WEBrick::Log::new(nil, WEBrick::Log::ERROR), - :SSLEnable => true, - :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE, - :SSLCertificate => cert, - :SSLPrivateKey => pkey, - :SSLExtraChainCert => [root_cert] -) -evil_server.mount_proc '/' do |req, res| - res.body = '{ "status": "ok", "server": "evil" }' - res.content_type = 'application/json' -end - -http_server = WEBrick::HTTPServer.new( - :BindAddress => '0.0.0.0', - :Port => 9445, - :Logger => WEBrick::Log::new(nil, WEBrick::Log::ERROR), - :SSLEnable => false, -) -http_server.mount_proc '/' do |req, res| - res.body = '{ "status": "ok", "server": "non-ssl" }' - res.content_type = 'application/json' -end - -t1 = Thread.new do - log 'Starting good server on :9443' - $stdout.flush - good_server.start -end - -t2 = Thread.new do - log 'Starting evil server on :9444' - $stdout.flush - evil_server.start -end - -t3 = Thread.new do - log 'Starting http server on :9445' - $stdout.flush - http_server.start -end - -trap("INT") do - log 'Shutting down...' - t1.kill; - t2.kill; - t3.kill -end - -t1.join -t2.join -t3.join diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/make_certs.sh b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/make_certs.sh deleted file mode 100755 index e793d70b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/SSL/make_certs.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env zsh - -set -ve - -# Make Good Root CA with new key -openssl req -new -newkey rsa:1024 -keyout good_root_key.pem -nodes -x509 -days 36500 -out good_root_cert.pem -subj "/C=CA/ST=California/O=All That is Good/OU=All That is Good Root CA" -text - -# Make Good Site Req with new key -openssl req -new -newkey rsa:1024 -keyout good_site_key.pem -nodes -days 36500 -out good_site_request.pem -subj "/C=CA/ST=California/O=All That is Good/OU=All That is Good Site/CN=localhost" -text - -# Sign Good Site Req with new key -openssl x509 -in good_site_request.pem -req -CA good_root_cert.pem -CAkey good_root_key.pem -days 36500 -set_serial 1 -out good_site_cert.pem -text - -# Make Evil Root CA with new key -openssl req -new -newkey rsa:1024 -keyout evil_root_key.pem -nodes -x509 -days 36500 -out evil_root_cert.pem -subj "/C=CA/ST=California/O=All That is Evil/OU=All That is Evil Root CA" -text - -# Make Evil Site Req with new key -openssl req -new -newkey rsa:1024 -keyout evil_site_key.pem -nodes -days 36500 -out evil_site_request.pem -subj "/C=CA/ST=California/O=All That is Evil/OU=All That is Evil Site/CN=*" -text - -# Sign Evil Site Req with new key -openssl x509 -in evil_site_request.pem -req -CA evil_root_cert.pem -CAkey evil_root_key.pem -days 36500 -set_serial 1 -out evil_site_cert.pem -text - -# Encode certificates for iOS Specs -openssl x509 -in good_root_cert.pem -inform pem -out good_root_cert.der -outform der - -set +v -echo '=============================' -echo Verifying newly created certs -echo '=============================' - -# Verify -openssl verify -verbose -purpose sslclient -CAfile good_root_cert.pem good_site_cert.pem -openssl verify -verbose -purpose sslclient -CAfile evil_root_cert.pem good_site_cert.pem - -openssl verify -verbose -purpose sslclient -CAfile good_root_cert.pem evil_site_cert.pem -openssl verify -verbose -purpose sslclient -CAfile evil_root_cert.pem evil_site_cert.pem diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/good_root_cert.der b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/good_root_cert.der deleted file mode 100755 index 64417424..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Braintree-API-Integration-Specs/good_root_cert.der and /dev/null differ diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeApplePay_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeApplePay_IntegrationTests.m deleted file mode 100755 index 685e4849..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeApplePay_IntegrationTests.m +++ /dev/null @@ -1,43 +0,0 @@ -#import -#import "BTIntegrationTestsHelper.h" -#import -#import - -@interface BraintreeApplePay_IntegrationTests : XCTestCase - -@end - -@implementation BraintreeApplePay_IntegrationTests - -- (void)testTokenizeApplePayPayment_whenApplePayEnabledInControlPanel_returnsANonce { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTApplePayClient *client = [[BTApplePayClient alloc] initWithAPIClient:apiClient]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize Apple Pay payment"]; - [client tokenizeApplePayPayment:[[PKPayment alloc] init] - completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - XCTAssertTrue(tokenizedApplePayPayment.nonce.isANonce); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testTokenizeApplePayPayment_whenApplePayDisabledInControlPanel_returnsError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY_APPLE_PAY_DISABLED]; - BTApplePayClient *client = [[BTApplePayClient alloc] initWithAPIClient:apiClient]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize Apple Pay payment"]; - [client tokenizeApplePayPayment:[[PKPayment alloc] init] - completion:^(BTApplePayCardNonce * _Nullable tokenizedApplePayPayment, NSError * _Nullable error) { - XCTAssertEqualObjects(error.domain, BTApplePayErrorDomain); - XCTAssertEqual(error.code, BTApplePayErrorTypeUnsupported); - XCTAssertNil(tokenizedApplePayPayment); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeCard_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeCard_IntegrationTests.m deleted file mode 100755 index b82598bf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeCard_IntegrationTests.m +++ /dev/null @@ -1,131 +0,0 @@ -#import "BTIntegrationTestsHelper.h" -#import -#import -#import -#import - -@interface BTCardClient_IntegrationTests : XCTestCase -@end - -@implementation BTCardClient_IntegrationTests - -- (void)testTokenizeCard_whenCardHasValidationDisabledAndCardIsInvalid_tokenizesSuccessfully { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [self invalidCard]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - expect(tokenizedCard.nonce.isANonce).to.beTruthy(); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testTokenizeCard_whenCardIsInvalidAndValidationIsEnabled_failsWithExpectedValidationError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [[BTCard alloc] initWithNumber:@"123" expirationMonth:@"12" expirationYear:@"2020" cvv:nil]; - card.shouldValidate = YES; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - XCTAssertNil(tokenizedCard); - XCTAssertEqualObjects(error.domain, BTCardClientErrorDomain); - XCTAssertEqual(error.code, BTCardClientErrorTypeCustomerInputInvalid); - XCTAssertEqualObjects(error.localizedDescription, @"Credit card is invalid"); - XCTAssertEqualObjects(error.localizedFailureReason, @"Credit card number must be 12-19 digits"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testTokenizeCard_whenCardHasValidationDisabledAndCardIsValid_tokenizesSuccessfully { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [self validCard]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - expect(tokenizedCard.nonce.isANonce).to.beTruthy(); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - - -- (void)testTokenizeCard_whenUsingTokenizationKeyAndCardHasValidationEnabled_failsWithAuthorizationError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [self invalidCard]; - card.shouldValidate = YES; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - XCTAssertNil(tokenizedCard); - expect(error.domain).to.equal(BTHTTPErrorDomain); - expect(error.code).to.equal(BTHTTPErrorCodeClientError); - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)error.userInfo[BTHTTPURLResponseKey]; - expect(httpResponse.statusCode).to.equal(403); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testTokenizeCard_whenUsingClientTokenAndCardHasValidationEnabledAndCardIsValid_tokenizesSuccessfully { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [self validCard]; - card.shouldValidate = YES; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - expect(tokenizedCard.nonce.isANonce).to.beTruthy(); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testTokenizeCard_whenUsingVersionThreeClientTokenAndCardHasValidationEnabledAndCardIsValid_tokenizesSuccessfully { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN_VERSION_3]; - BTCardClient *client = [[BTCardClient alloc] initWithAPIClient:apiClient]; - BTCard *card = [self validCard]; - card.shouldValidate = YES; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenize card"]; - [client tokenizeCard:card completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - expect(tokenizedCard.nonce.isANonce).to.beTruthy(); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Helpers - -- (BTCard *)invalidCard { - BTCard *card = [[BTCard alloc] init]; - card.number = @"INVALID_CARD"; - card.expirationMonth = @"XX"; - card.expirationYear = @"YYYY"; - return card; -} - -- (BTCard *)validCard { - BTCard *card = [[BTCard alloc] init]; - card.number = @"4111111111111111"; - card.expirationMonth = @"12"; - card.expirationYear = @"2018"; - return card; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeDataCollector_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeDataCollector_IntegrationTests.m deleted file mode 100755 index 0ca1ac63..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeDataCollector_IntegrationTests.m +++ /dev/null @@ -1,114 +0,0 @@ -#import "BraintreeDataCollector.h" -#import "KDataCollector.h" -#import -#import - -@interface BraintreeDataCollector_IntegrationTests : XCTestCase -@property (nonatomic, strong) BTDataCollector *dataCollector; -@end - -@implementation BraintreeDataCollector_IntegrationTests - -- (void)setUp { - [super setUp]; - BTAPIClient *client = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - self.dataCollector = [[BTDataCollector alloc] initWithAPIClient:client]; -} - -- (void)tearDown { - [super tearDown]; - self.dataCollector = nil; -} - -#pragma mark - collectFraudData: - -- (void)testCollectFraudData_returnsFraudData { - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - - [self.dataCollector collectFraudData:^(NSString * _Nonnull deviceData) { - XCTAssertTrue([deviceData containsString:@"correlation_id"]); - XCTAssertTrue([deviceData containsString:@"device_session_id"]); - XCTAssertTrue([deviceData containsString:@"fraud_merchant_id"]); - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -// Test is failing because sandbox test merchant is configured with a Kount merchant ID that causes Kount to error. -- (void)pendCollectFraudDataWithCallback_returnsFraudData { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - self.dataCollector = [[BTDataCollector alloc] initWithAPIClient:apiClient]; - id delegate = OCMProtocolMock(@protocol(BTDataCollectorDelegate)); - self.dataCollector.delegate = delegate; - XCTestExpectation *expectation = [self expectationWithDescription:@"Delegate received completion callback"]; - OCMStub([delegate dataCollectorDidComplete:self.dataCollector]).andDo(^(__unused NSInvocation *invocation) { - [expectation fulfill]; - }); - - XCTestExpectation *callbackExpectation = [self expectationWithDescription:@"Callback invoked"]; - [self.dataCollector collectFraudData:^(NSString * _Nonnull deviceData) { - XCTAssertTrue([deviceData containsString:@"correlation_id"]); - [callbackExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -// Test is failing because sandbox test merchant is configured with a Kount merchant ID that causes Kount to error. -- (void)pendCollectCardFraudDataWithCallback_returnsFraudDataWithNoPayPalFraudData { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - self.dataCollector = [[BTDataCollector alloc] initWithAPIClient:apiClient]; - - id delegate = OCMProtocolMock(@protocol(BTDataCollectorDelegate)); - self.dataCollector.delegate = delegate; - XCTestExpectation *expectation = [self expectationWithDescription:@"Delegate received completion callback"]; - OCMStub([delegate dataCollectorDidComplete:self.dataCollector]).andDo(^(__unused NSInvocation *invocation) { - [expectation fulfill]; - }); - - XCTestExpectation *callbackExpectation = [self expectationWithDescription:@"Callback invoked"]; - [self.dataCollector collectCardFraudData:^(NSString * _Nonnull deviceData) { - XCTAssertNotNil(deviceData); - XCTAssertFalse([deviceData containsString:@"correlation_id"]); - [callbackExpectation fulfill]; - }]; - - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testCollectCardFraudData_returnsFraudDataWithNoPayPalFraudData { - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.dataCollector collectCardFraudData:^(NSString * _Nonnull deviceData) { - XCTAssertNotNil(deviceData); - XCTAssertFalse([deviceData containsString:@"correlation_id"]); - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -// Test is failing because Kount is no longer async and doesn't return errors -- (void)pendCollectCardFraudData_whenMerchantIDIsInvalid_invokesErrorCallback { - [self.dataCollector setFraudMerchantId:@"-1"]; - XCTestExpectation *expectation = [self expectationWithDescription:@"Error callback invoked"]; - - [self.dataCollector collectCardFraudData:^(NSString * _Nonnull deviceData) { - NSLog(@"%@", deviceData); - //XCTAssertEqualObjects(error.localizedDescription, @"Merchant ID formatted incorrectly."); - //XCTAssertEqual(error.code, (NSInteger)KDataCollectorErrorCodeBadParameter); - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testCollectPayPalClientMetadataId_returnsClientMetadataId { - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.dataCollector collectFraudData:^(NSString * _Nonnull deviceData) { - XCTAssertTrue([deviceData containsString:@"correlation_id"]); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreePayPal_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreePayPal_IntegrationTests.m deleted file mode 100755 index 678f80d9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreePayPal_IntegrationTests.m +++ /dev/null @@ -1,649 +0,0 @@ -#import -#import -#import -#import "BTIntegrationTestsHelper.h" -#import -#import - -@interface BTAppSwitchTestDelegate : NSObject -@property (nonatomic, strong) XCTestExpectation *willPerform; -@property (nonatomic, strong) XCTestExpectation *didPerform; -@property (nonatomic, strong) XCTestExpectation *willProcess; -@property (nonatomic, strong) id lastAppSwitcher; -@property (nonatomic, assign) BTAppSwitchTarget lastTarget; -@end - -@implementation BTAppSwitchTestDelegate - -- (void)appSwitcherWillPerformAppSwitch:(id)appSwitcher { - self.lastAppSwitcher = appSwitcher; - [self.willPerform fulfill]; -} - -- (void)appSwitcher:(id)appSwitcher didPerformSwitchToTarget:(BTAppSwitchTarget)target { - self.lastTarget = target; - self.lastAppSwitcher = appSwitcher; - [self.didPerform fulfill]; -} - -- (void)appSwitcherWillProcessPaymentInfo:(id)appSwitcher { - self.lastAppSwitcher = appSwitcher; - [self.willProcess fulfill]; -} - -@end - -@interface BTViewControllerPresentingTestDelegate : NSObject -@property (nonatomic, strong) XCTestExpectation *requestsPresentationExpectation; -@property (nonatomic, strong) XCTestExpectation *requestsDismissalExpectation; -@property (nonatomic, strong) id lastDriver; -@property (nonatomic, strong) id lastViewController; -@end - -@implementation BTViewControllerPresentingTestDelegate - -- (void)paymentDriver:(id)driver requestsDismissalOfViewController:(UIViewController *)viewController { - self.lastDriver = driver; - self.lastViewController = viewController; - [self.requestsDismissalExpectation fulfill]; -} - -- (void)paymentDriver:(id)driver requestsPresentationOfViewController:(UIViewController *)viewController { - self.lastDriver = driver; - self.lastViewController = viewController; - [self.requestsPresentationExpectation fulfill]; -} - -@end - -@interface BTPayPalApprovalHandlerTestDelegate : NSObject -@property (nonatomic, strong) XCTestExpectation *handleApprovalExpectation; -@property (nonatomic, strong) NSURL *url; -@property (nonatomic, assign) BOOL cancel; -@end - -@implementation BTPayPalApprovalHandlerTestDelegate - -- (void)handleApproval:(__unused PPOTRequest *)request paypalApprovalDelegate:(id)delegate { - if (self.cancel) { - [delegate onApprovalCancel]; - } else { - [delegate onApprovalComplete:self.url]; - } - [self.handleApprovalExpectation fulfill]; -} - -@end - - -@interface BraintreePayPal_IntegrationTests : XCTestCase -@property (nonatomic, strong) NSNumber *didReceiveCompletionCallback; -// We keep a reference to these stub delegates so they don't get released! -@property (nonatomic, strong) BTViewControllerPresentingTestDelegate *viewControllerPresentingDelegate; -@property (nonatomic, strong) BTAppSwitchTestDelegate *appSwitchDelegate; - -@end - - -@implementation BraintreePayPal_IntegrationTests - -NSString * const OneTouchCoreAppSwitchSuccessURLFixture = @"com.braintreepayments.Demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"; - -#pragma mark - Authorization (Future Payments) - -- (void)testFuturePayments_withTokenizationKey_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - payPalDriver.clientMetadataId = @"fake-client-metadata-id"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenized PayPal Account"]; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFuturePayments_withClientToken_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - id stubDelegate = [[BTViewControllerPresentingTestDelegate alloc] init]; - payPalDriver.viewControllerPresentingDelegate = stubDelegate; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Tokenized PayPal Account"]; - [payPalDriver authorizeAccountWithAdditionalScopes:[NSSet set] forceFuturePaymentFlow:YES completion:^(BTPayPalAccountNonce * _Nonnull tokenizedPayPalAccount, NSError * _Nonnull error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFuturePayments_whenReturnURLSchemeIsMissing_returnsError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - id stubDelegate = [[BTViewControllerPresentingTestDelegate alloc] init]; - payPalDriver.viewControllerPresentingDelegate = stubDelegate; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [payPalDriver authorizeAccountWithAdditionalScopes:[NSSet set] forceFuturePaymentFlow:YES completion:^(BTPayPalAccountNonce * _Nonnull tokenizedPayPalAccount, NSError * _Nonnull error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertEqualObjects(error.domain, BTPayPalDriverErrorDomain); - XCTAssertEqual(error.code, BTPayPalDriverErrorTypeIntegrationReturnURLScheme); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFuturePayments_whenReturnURLSchemeIsInvalid_returnsError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - id stubDelegate = [[BTViewControllerPresentingTestDelegate alloc] init]; - payPalDriver.viewControllerPresentingDelegate = stubDelegate; - [BTAppSwitch sharedInstance].returnURLScheme = @"not-my-app-bundle-id"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [payPalDriver authorizeAccountWithAdditionalScopes:[NSSet set] forceFuturePaymentFlow:YES completion:^(BTPayPalAccountNonce * _Nonnull tokenizedPayPalAccount, NSError * _Nonnull error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertEqualObjects(error.domain, BTPayPalDriverErrorDomain); - XCTAssertEqual(error.code, BTPayPalDriverErrorTypeIntegrationReturnURLScheme); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testFuturePayments_onCancelledAppSwitchAuthorization_callsBackWithNoTokenizedAccountOrError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - id stubDelegate = [[BTViewControllerPresentingTestDelegate alloc] init]; - payPalDriver.viewControllerPresentingDelegate = stubDelegate; - - self.didReceiveCompletionCallback = nil; - [payPalDriver authorizeAccountWithAdditionalScopes:[NSSet set] forceFuturePaymentFlow:YES completion:^(BTPayPalAccountNonce * _Nonnull tokenizedPayPalAccount, NSError * _Nonnull error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNil(error); - self.didReceiveCompletionCallback = @(YES); - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:@"com.braintreepayments.Demo.payments://onetouch/v1/cancel?payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IjQ1QUZEQkE3LUJEQTYtNDNEMi04MUY2LUY4REM1QjZEOTkzQSIsImVudmlyb25tZW50IjoibW9jayJ9&x-source=com.paypal.ppclient.touch.v2"]]; - - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"didReceiveCompletionCallback != nil"]; - [self expectationForPredicate:predicate evaluatedWithObject:self handler:nil]; - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - One-time (Checkout) payments - -- (void)testOneTimePayment_withTokenizationKey_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [self stubDelegatesForPayPalDriver:payPalDriver]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; - [payPalDriver requestOneTimePayment:request completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize one-time payment"]; - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testOneTimePayment_withClientToken_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [self stubDelegatesForPayPalDriver:payPalDriver]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; - [payPalDriver requestOneTimePayment:request completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize one-time payment"]; - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testOneTimePayment_withClientToken_tokenizesPayPalAccount_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.url = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; - [payPalDriver requestOneTimePayment:request handler:testApproval completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize one-time payment"]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testOneTimePayment_withClientToken_returnsErrorWithMalformedURL_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.url = [NSURL URLWithString:@"bad://url"]; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; - [payPalDriver requestOneTimePayment:request handler:testApproval completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNotNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testOneTimePayment_withClientToken_cancels_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.cancel = YES; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] initWithAmount:@"1.00"]; - [payPalDriver requestOneTimePayment:request handler:testApproval completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Billing Agreement - -- (void)testBillingAgreement_withTokenizationKey_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [self stubDelegatesForPayPalDriver:payPalDriver]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] init]; - [payPalDriver requestBillingAgreement:request completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize billing agreement payment"]; - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBillingAgreement_withClientToken_tokenizesPayPalAccount { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [self stubDelegatesForPayPalDriver:payPalDriver]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] init]; - [payPalDriver requestBillingAgreement:request completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize billing agreement payment"]; - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBillingAgreement_withClientToken_tokenizesPayPalAccount_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.url = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - - __block XCTestExpectation *tokenizationExpectation; - BTPayPalRequest *request = [[BTPayPalRequest alloc] init]; - [payPalDriver requestBillingAgreement:request handler:testApproval completion:^(BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount, NSError * _Nullable error) { - XCTAssertTrue(tokenizedPayPalAccount.nonce.isANonce); - XCTAssertNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - tokenizationExpectation = [self expectationWithDescription:@"Tokenize billing agreement payment"]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBillingAgreement_withClientToken_returnsErrorWithMalformedURL_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.url = [NSURL URLWithString:@"bad://url"]; - - __block XCTestExpectation *tokenizationExpectation = [self expectationWithDescription:@"Tokenize billing agreement payment"]; - BTPayPalRequest *request = [[BTPayPalRequest alloc] init]; - [payPalDriver requestBillingAgreement:request handler:testApproval completion:^(__unused BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount,__unused NSError * _Nullable error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNotNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testBillingAgreement_withClientToken_cancels_withCustomHandler { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_CLIENT_TOKEN]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - - __block BTPayPalApprovalHandlerTestDelegate *testApproval = [BTPayPalApprovalHandlerTestDelegate new]; - testApproval.handleApprovalExpectation = [self expectationWithDescription:@"Delegate received handleApproval:paypalApprovalDelegate:"]; - testApproval.cancel = YES; - - __block XCTestExpectation *tokenizationExpectation = [self expectationWithDescription:@"Tokenize billing agreement payment"]; - BTPayPalRequest *request = [[BTPayPalRequest alloc] init]; - [payPalDriver requestBillingAgreement:request handler:testApproval completion:^(__unused BTPayPalAccountNonce * _Nullable tokenizedPayPalAccount,__unused NSError * _Nullable error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNil(error); - XCTAssertNotNil(testApproval); - [tokenizationExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Return URL handling - -- (void)testCanHandleAppSwitchReturnURL_forURLsFromBrowserSwitch_returnsYES { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Demo.payments://onetouch/v1/success?payloadEnc=e0yvzQHOOoXyoLjKZvHBI0Rbyad6usxhOz22CjG3V1lOsguMRsuQpEqPxlIlK86VPmTuagb1jJcnDUK9QsWJE8ffe4i9Ms4ggd6r5EoymVM%2BAYgjyjaYtPPOxIgMepNGnvnYt9EKJs2Bd0wbZj0ekxSA6BzRZDPEpZ%2FjhssxJVscjbPvOwCoTnjEhuNxiOamAGSRd6fo7ln%2BishDwRCLz81qlV8cgfXNzlHrRw1P7CbTQ8XhNGn35CHD64ysuHAW97ZjAzPCRdikWbgiw2S%2BDvSePhRRnTR10e2NPDYBeVzGQFzvf6WRklrqcLeFwRcAqoa0ZneOPgMbk5nvylGY716caCCPtJKnoJAflZZK6%2F7iXcA%2F3p9qrQIrszmthu%2FbnA%2FP7dZsWRarUiT%2FZhZg32MsmV3B3fPjQOMbhB7dRv5uomhCjhNhPzXH7nFA54mKOlvAdTm1QOk5P%2Fh3AaHz0qwIKgXAhxIfwxqHgIYxtba53sdwa7OXfx14FRlcfPngrR02IAHeaulkH6vJ24ZAsoUUdNkvRfDmM1O2%2B4424%2FMINTUJJsR0%2FwrYrwzp0gC6fKoAzT%2FgFhL6QVLoUss%3D&payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IkMwQTkwODQ1LTJBRUQtNEZCRC04NzIwLTQzNUU2MkRGNjhFNCIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJsaXZlIiwiZXJyb3IiOm51bGx9&x-source=com.braintree.browserswitch"]; - NSString *source = @"com.apple.mobilesafari"; - - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - - XCTAssertTrue(canHandleAppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_forURLsFromWebSwitch_returnsYES { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - NSURL *returnURL = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - BOOL canHandleV1AppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.apple.mobilesafari"]; - BOOL canHandleV2AppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.apple.safariviewservice"]; - - XCTAssertTrue(canHandleV1AppSwitch); - XCTAssertTrue(canHandleV2AppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_forMalformedURLs_returnsNO { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - // This malformed returnURL is just missing payload - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Demo.payments://onetouch/v1/success?x-source=com.paypal.ppclient.touch.v1-or-v2"]; - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.paypal.ppclient.touch.v1"]; - - XCTAssertFalse(canHandleAppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_forUnsupportedSourceApplication_returnsNO { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - // This malformed returnURL is just missing payload - NSURL *returnURL = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.example.application"]; - - XCTAssertFalse(canHandleAppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_whenNoAppSwitchIsInProgress_returnsNO { - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - NSURL *returnURL = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.malicious.app"]; - - XCTAssertFalse(canHandleAppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_afterHandlingAnAppSwitchAndBeforeInitiatingAnotherAppSwitch_returnsNO { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - self.didReceiveCompletionCallback = nil; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - self.didReceiveCompletionCallback = @(YES); - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - NSURL *returnURL = [NSURL URLWithString:OneTouchCoreAppSwitchSuccessURLFixture]; - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.apple.mobilesafari"]; - XCTAssertTrue(canHandleAppSwitch); - [BTPayPalDriver handleAppSwitchReturnURL:returnURL]; - - // Pause until handleAppSwitchReturnURL has finished - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"didReceiveCompletionCallback != nil"]; - [self expectationForPredicate:predicate evaluatedWithObject:self handler:nil]; - [self waitForExpectationsWithTimeout:5 handler:nil]; - - canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:@"com.apple.mobilesafari"]; - XCTAssertFalse(canHandleAppSwitch); -} - -- (void)testCanHandleAppSwitchReturnURL_whenAppSwitchReturnURLHasMismatchedCase_returnsYES { - // Motivation for this test is because of Safari's habit of downcasing URL schemes - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNotNil(tokenizedPayPalAccount); - if (error) { - XCTFail(@"%@", error); - } - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Demo.payments://onetouch/v1/success?payloadEnc=e0yvzQHOOoXyoLjKZvHBI0Rbyad6usxhOz22CjG3V1lOsguMRsuQpEqPxlIlK86VPmTuagb1jJcnDUK9QsWJE8ffe4i9Ms4ggd6r5EoymVM%2BAYgjyjaYtPPOxIgMepNGnvnYt9EKJs2Bd0wbZj0ekxSA6BzRZDPEpZ%2FjhssxJVscjbPvOwCoTnjEhuNxiOamAGSRd6fo7ln%2BishDwRCLz81qlV8cgfXNzlHrRw1P7CbTQ8XhNGn35CHD64ysuHAW97ZjAzPCRdikWbgiw2S%2BDvSePhRRnTR10e2NPDYBeVzGQFzvf6WRklrqcLeFwRcAqoa0ZneOPgMbk5nvylGY716caCCPtJKnoJAflZZK6%2F7iXcA%2F3p9qrQIrszmthu%2FbnA%2FP7dZsWRarUiT%2FZhZg32MsmV3B3fPjQOMbhB7dRv5uomhCjhNhPzXH7nFA54mKOlvAdTm1QOk5P%2Fh3AaHz0qwIKgXAhxIfwxqHgIYxtba53sdwa7OXfx14FRlcfPngrR02IAHeaulkH6vJ24ZAsoUUdNkvRfDmM1O2%2B4424%2FMINTUJJsR0%2FwrYrwzp0gC6fKoAzT%2FgFhL6QVLoUss%3D&payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IkMwQTkwODQ1LTJBRUQtNEZCRC04NzIwLTQzNUU2MkRGNjhFNCIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJsaXZlIiwiZXJyb3IiOm51bGx9&x-source=com.braintree.browserswitch"]; - NSString *source = @"com.apple.mobilesafari"; - BOOL canHandleAppSwitch = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - - XCTAssertTrue(canHandleAppSwitch); -} - -#pragma mark handleURL - -- (void)testHandleURL_whenURLIsConsideredInvalidByPayPalOTC_returnsError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - self.didReceiveCompletionCallback = nil; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNotNil(error); - self.didReceiveCompletionCallback = @(YES); - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:@"com.braintreepayments.Demo.payments://----invalid----"]]; - - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"didReceiveCompletionCallback != nil"]; - [self expectationForPredicate:predicate evaluatedWithObject:self handler:nil]; - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testHandleURL_whenURLIsMissingHostAndPath_returnsError { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:SANDBOX_TOKENIZATION_KEY]; - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithAPIClient:apiClient]; - [BTAppSwitch sharedInstance].returnURLScheme = @"com.braintreepayments.Demo.payments"; - [self stubDelegatesForPayPalDriver:payPalDriver]; - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); - - self.didReceiveCompletionCallback = nil; - [payPalDriver authorizeAccountWithCompletion:^(BTPayPalAccountNonce *tokenizedPayPalAccount, NSError *error) { - XCTAssertNil(tokenizedPayPalAccount); - XCTAssertNotNil(error); - self.didReceiveCompletionCallback = @(YES); - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:@"com.braintreepayments.Demo.payments://"]]; - - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"didReceiveCompletionCallback != nil"]; - [self expectationForPredicate:predicate evaluatedWithObject:self handler:nil]; - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Helper - -// Stubs the app switch or view controller presenting delegate, depending on which one will be used. -// The main purpose is to wait for delegate callbacks to occur in the app switch lifecycle to ensure -// that the PayPal driver's app switch return block is set and its behavior is ready to be tested. -- (void)stubDelegatesForPayPalDriver:(BTPayPalDriver *)payPalDriver { - if (!self.viewControllerPresentingDelegate) { - self.viewControllerPresentingDelegate = [[BTViewControllerPresentingTestDelegate alloc] init]; - } - if (!self.appSwitchDelegate) { - self.appSwitchDelegate = [[BTAppSwitchTestDelegate alloc] init]; - } - - if (NSClassFromString(@"SFSafariViewController")) { - self.viewControllerPresentingDelegate.requestsPresentationExpectation = [self expectationWithDescription:@"Delegate received requestsPresentation"]; - payPalDriver.viewControllerPresentingDelegate = self.viewControllerPresentingDelegate; - } else { - self.appSwitchDelegate.willPerform = [self expectationWithDescription:@"Delegate received willPerformAppSwitch"]; - self.appSwitchDelegate.didPerform = [self expectationWithDescription:@"Delegate received didPerformAppSwitch"]; - payPalDriver.appSwitchDelegate = self.appSwitchDelegate; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeUnionPay_IntegrationTests.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeUnionPay_IntegrationTests.m deleted file mode 100755 index d92fa1f2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/BraintreeUnionPay_IntegrationTests.m +++ /dev/null @@ -1,107 +0,0 @@ -#import -#import "BTIntegrationTestsHelper.h" -#import - -@interface BraintreeUnionPay_IntegrationTests : XCTestCase -@property (nonatomic, strong) BTCardClient *cardClient; -@end - -@implementation BraintreeUnionPay_IntegrationTests - -- (void)setUp { - [super setUp]; - - static NSString *clientToken; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - clientToken = [self fetchClientToken]; - }); - - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:clientToken]; - self.cardClient = [[BTCardClient alloc] initWithAPIClient:apiClient]; -} - -- (void)pendFetchCapabilities_returnsCardCapabilities { - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.cardClient fetchCapabilities:@"6212345678901232" completion:^(BTCardCapabilities * _Nullable cardCapabilities, NSError * _Nullable error) { - XCTAssertNil(error); - XCTAssertFalse(cardCapabilities.isDebit); - XCTAssertTrue(cardCapabilities.isUnionPay); - XCTAssertTrue(cardCapabilities.isSupported); - XCTAssertTrue(cardCapabilities.supportsTwoStepAuthAndCapture); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)pendEnrollCard_whenSuccessful_returnsEnrollmentID { - BTCardRequest *request = [[BTCardRequest alloc] init]; - request.card = [[BTCard alloc] initWithNumber:@"6222821234560017" expirationMonth:@"12" expirationYear:@"2019" cvv:@"123"]; - request.mobileCountryCode = @"62"; - request.mobilePhoneNumber = @"12345678901"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.cardClient enrollCard:request completion:^(NSString * _Nullable enrollmentID, __unused BOOL smsCodeRequired, NSError * _Nullable error) { - XCTAssertNil(error); - XCTAssertTrue([enrollmentID isKindOfClass:[NSString class]]); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)pendEnrollCard_whenCardDoesNotRequireEnrollment_returnsError { - BTCardRequest *request = [[BTCardRequest alloc] init]; - request.card = [[BTCard alloc] initWithNumber:@"6212345678900085" expirationMonth:@"12" expirationYear:@"2019" cvv:@"123"]; - request.mobileCountryCode = @"62"; - request.mobilePhoneNumber = @"12345678901"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.cardClient enrollCard:request completion:^(NSString * _Nullable enrollmentID, __unused BOOL smsCodeRequired, NSError * _Nullable error) { - XCTAssertNil(enrollmentID); - XCTAssertEqualObjects(error.domain, BTCardClientErrorDomain); - XCTAssertEqual(error.code, BTCardClientErrorTypeCustomerInputInvalid); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)pendTokenizeCard_withEnrolledUnionPayCard_isSuccessful { - BTCardRequest *request = [[BTCardRequest alloc] init]; - request.card = [[BTCard alloc] initWithNumber:@"6212345678901232" expirationMonth:@"12" expirationYear:@"2019" cvv:@"123"]; - request.mobileCountryCode = @"62"; - request.mobilePhoneNumber = @"12345678901"; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.cardClient enrollCard:request completion:^(NSString * _Nullable enrollmentID, __unused BOOL smsCodeRequired, NSError * _Nullable error) { - XCTAssertNil(error); - request.enrollmentID = enrollmentID; - request.smsCode = @"11111"; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - expectation = [self expectationWithDescription:@"Callback invoked"]; - [self.cardClient tokenizeCard:request options:nil completion:^(BTCardNonce * _Nullable tokenizedCard, NSError * _Nullable error) { - XCTAssertNil(error); - XCTAssertTrue([tokenizedCard.nonce isANonce]); - XCTAssertEqual(tokenizedCard.cardNetwork, BTCardNetworkUnionPay); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Helpers - -- (NSString *)fetchClientToken { - NSURL *url = [NSURL URLWithString:@"http://braintree-sample-merchant.herokuapp.com/client_token?merchant_account_id=fake_switch_usd"]; - NSData *data = [NSData dataWithContentsOfURL:url]; - NSDictionary *jsonResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; - return jsonResponse[@"client_token"]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsConstants.h b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsConstants.h deleted file mode 100755 index ba072330..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsConstants.h +++ /dev/null @@ -1,4 +0,0 @@ -#define SANDBOX_TOKENIZATION_KEY @"sandbox_9dbg82cq_dcpspy2brwdjr3qn" -#define SANDBOX_TOKENIZATION_KEY_APPLE_PAY_DISABLED @"sandbox_g42y39zw_348pk9cgf3bgyw2b" -#define SANDBOX_CLIENT_TOKEN @"eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI4MTUzNjg2M2ViY2Q2MWUyZTVkYjE1NjJiMGI5ZjkxNzM3YTQ2YjE1OWNmNTdjZTU2ZmVlZmE1OGNhOWEyZGEwfGNyZWF0ZWRfYXQ9MjAxNS0xMi0xNFQxODozMzowOS4wNzAyODE0NDQrMDAwMFx1MDAyNm1lcmNoYW50X2lkPTM0OHBrOWNnZjNiZ3l3MmJcdTAwMjZwdWJsaWNfa2V5PTJuMjQ3ZHY4OWJxOXZtcHIiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvMzQ4cGs5Y2dmM2JneXcyYi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzLzM0OHBrOWNnZjNiZ3l3MmIvY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIn0sInRocmVlRFNlY3VyZUVuYWJsZWQiOnRydWUsInRocmVlRFNlY3VyZSI6eyJsb29rdXBVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvMzQ4cGs5Y2dmM2JneXcyYi90aHJlZV9kX3NlY3VyZS9sb29rdXAifSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJtZXJjaGFudEFjY291bnRJZCI6ImFjbWV3aWRnZXRzbHRkc2FuZGJveCIsImN1cnJlbmN5SXNvQ29kZSI6IlVTRCJ9LCJjb2luYmFzZUVuYWJsZWQiOmZhbHNlLCJtZXJjaGFudElkIjoiMzQ4cGs5Y2dmM2JneXcyYiIsInZlbm1vIjoib2ZmIn0=" -#define SANDBOX_CLIENT_TOKEN_VERSION_3 @"eyJ2ZXJzaW9uIjozLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiIxYzM5N2E5OGZmZGRkNDQwM2VjNzEzYWRjZTI3NTNiMzJlODc2MzBiY2YyN2M3NmM2OWVmZjlkMTE5MjljOTVkfGNyZWF0ZWRfYXQ9MjAxNy0wNC0wNVQwNjowNzowOC44MTUwOTkzMjUrMDAwMFx1MDAyNm1lcmNoYW50X2lkPWRjcHNweTJicndkanIzcW5cdTAwMjZwdWJsaWNfa2V5PTl3d3J6cWszdnIzdDRuYzgiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24ifQ==" diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.h b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.h deleted file mode 100755 index 842509b6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface NSString (Nonce) -- (BOOL)isANonce; -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.m b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.m deleted file mode 100755 index 34232887..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Helpers/BTIntegrationTestsHelper.m +++ /dev/null @@ -1,20 +0,0 @@ -#import "BTSpecHelper.h" - -@implementation NSString (Nonce) - -- (BOOL)isANonce { - NSString *nonceRegularExpressionString = @"\\A[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\Z"; - - NSError *error; - NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:nonceRegularExpressionString - options:0 - error:&error]; - if (error) { - NSLog(@"Error parsing regex: %@", error); - return NO; - } - - return [regex numberOfMatchesInString:self options:0 range:NSMakeRange(0, [self length])] > 0; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/IntegrationTests.pch b/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/IntegrationTests.pch deleted file mode 100755 index 633b5b5c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/IntegrationTests.pch +++ /dev/null @@ -1 +0,0 @@ -#import "BTIntegrationTestsConstants.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/LICENSE b/examples/braintree/ios/Frameworks/Braintree/LICENSE deleted file mode 100755 index b50ce6f4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2016 Braintree, a division of PayPal, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/examples/braintree/ios/Frameworks/Braintree/Podfile b/examples/braintree/ios/Frameworks/Braintree/Podfile deleted file mode 100755 index 7fa7b5ae..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Podfile +++ /dev/null @@ -1,37 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' - -platform :ios, '9.0' -workspace 'Braintree.xcworkspace' - -target 'Demo' do - platform :ios, '9.0' - - pod 'AFNetworking', '~> 2.6.0' - pod 'CardIO' - pod 'NSURL+QueryDictionary', '~> 1.0' - pod 'PureLayout' - pod 'FLEX' - pod 'InAppSettingsKit' - pod 'iOS-Slide-Menu' - pod 'BraintreeDropIn', :podspec => 'BraintreeDropIn.podspec' -end - -abstract_target 'Tests' do - pod 'Specta' - pod 'Expecta' - pod 'OCMock' - pod 'OHHTTPStubs' - - target 'UnitTests' - target 'IntegrationTests' -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - if target.name == "BraintreeDropIn" - target.build_configurations.each do |config| - config.build_settings['HEADER_SEARCH_PATHS'] = '${PODS_ROOT}/../BraintreeCore/Public ${PODS_ROOT}/../BraintreeCard/Public ${PODS_ROOT}/../BraintreeUnionPay/Public ${PODS_ROOT}/Headers/Private ${PODS_ROOT}/Headers/Private/BraintreeDropIn ${PODS_ROOT}/Headers/Public' - end - end - end -end diff --git a/examples/braintree/ios/Frameworks/Braintree/Podfile.lock b/examples/braintree/ios/Frameworks/Braintree/Podfile.lock deleted file mode 100755 index a2f8f8ac..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Podfile.lock +++ /dev/null @@ -1,91 +0,0 @@ -PODS: - - AFNetworking (2.6.3): - - AFNetworking/NSURLConnection (= 2.6.3) - - AFNetworking/NSURLSession (= 2.6.3) - - AFNetworking/Reachability (= 2.6.3) - - AFNetworking/Security (= 2.6.3) - - AFNetworking/Serialization (= 2.6.3) - - AFNetworking/UIKit (= 2.6.3) - - AFNetworking/NSURLConnection (2.6.3): - - AFNetworking/Reachability - - AFNetworking/Security - - AFNetworking/Serialization - - AFNetworking/NSURLSession (2.6.3): - - AFNetworking/Reachability - - AFNetworking/Security - - AFNetworking/Serialization - - AFNetworking/Reachability (2.6.3) - - AFNetworking/Security (2.6.3) - - AFNetworking/Serialization (2.6.3) - - AFNetworking/UIKit (2.6.3): - - AFNetworking/NSURLConnection - - AFNetworking/NSURLSession - - BraintreeDropIn (99.99.99-github-master): - - BraintreeDropIn/DropIn (= 99.99.99-github-master) - - BraintreeDropIn/UIKit (= 99.99.99-github-master) - - BraintreeDropIn/DropIn (99.99.99-github-master): - - BraintreeDropIn/UIKit - - BraintreeDropIn/UIKit (99.99.99-github-master) - - CardIO (5.4.1) - - Expecta (1.0.5) - - FLEX (2.4.0) - - InAppSettingsKit (2.8.1) - - iOS-Slide-Menu (1.5) - - NSURL+QueryDictionary (1.2.0) - - OCMock (3.4) - - OHHTTPStubs (6.0.0): - - OHHTTPStubs/Default (= 6.0.0) - - OHHTTPStubs/Core (6.0.0) - - OHHTTPStubs/Default (6.0.0): - - OHHTTPStubs/Core - - OHHTTPStubs/JSON - - OHHTTPStubs/NSURLSession - - OHHTTPStubs/OHPathHelpers - - OHHTTPStubs/JSON (6.0.0): - - OHHTTPStubs/Core - - OHHTTPStubs/NSURLSession (6.0.0): - - OHHTTPStubs/Core - - OHHTTPStubs/OHPathHelpers (6.0.0) - - PureLayout (3.0.2) - - Specta (1.0.6) - -DEPENDENCIES: - - AFNetworking (~> 2.6.0) - - BraintreeDropIn (from `BraintreeDropIn.podspec`) - - CardIO - - Expecta - - FLEX - - InAppSettingsKit - - iOS-Slide-Menu - - NSURL+QueryDictionary (~> 1.0) - - OCMock - - OHHTTPStubs - - PureLayout - - Specta - -EXTERNAL SOURCES: - BraintreeDropIn: - :podspec: BraintreeDropIn.podspec - -CHECKOUT OPTIONS: - BraintreeDropIn: - :commit: ca87c76f9ce266e93ce3c05ffca36499c17320df - :git: https://github.com/braintree/braintree-ios-drop-in.git - -SPEC CHECKSUMS: - AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60 - BraintreeDropIn: 3dd4539753a417a8325f580730d39848b758e505 - CardIO: 56983b39b62f495fc6dae9ad7cf875143df06443 - Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe - FLEX: bd1a39e55b56bb413b6f1b34b3c10a0dc44ef079 - InAppSettingsKit: 94d2fba3ccd700fc4e32c6d09fabcc0af2426744 - iOS-Slide-Menu: 40b0cbd8916c42afc755f0869793cd09e7a32102 - NSURL+QueryDictionary: bae616404e2adf6409d3d5c02a093cbf44c8a236 - OCMock: 35ae71d6a8fcc1b59434d561d1520b9dd4f15765 - OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb - PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd - Specta: f506f3a8361de16bc0dcf3b17b75e269072ba465 - -PODFILE CHECKSUM: 5c0f6d7472cce11fd35b3c4a01b851c0799076c5 - -COCOAPODS: 1.2.0 diff --git a/examples/braintree/ios/Frameworks/Braintree/README.md b/examples/braintree/ios/Frameworks/Braintree/README.md deleted file mode 100755 index f3296747..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Braintree iOS SDK - -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Travis CI build status](https://travis-ci.org/braintree/braintree_ios.svg?branch=master)](https://travis-ci.org/braintree/braintree_ios) - -Welcome to Braintree's iOS SDK. This library will help you accept card and alternative payments in your iOS app. - -**The Braintree iOS SDK requires Xcode 8+ and a Base SDK of iOS 9+**. It permits a Deployment Target of iOS 7.0 or higher. - -## Supported Payment Methods - -- [Credit Cards](https://developers.braintreepayments.com/guides/credit-cards/overview) -- [PayPal](https://developers.braintreepayments.com/guides/paypal/overview) -- [Pay with Venmo](https://developers.braintreepayments.com/guides/venmo/overview) -- [Apple Pay](https://developers.braintreepayments.com/guides/apple-pay/overview) -- [ThreeDSecure](https://developers.braintreepayments.com/guides/3d-secure/overview) -- [Visa Checkout](https://developers.braintreepayments.com/guides/visa-checkout/overview) - -## Installation - -We recommend using either [CocoaPods](https://github.com/CocoaPods/CocoaPods) or [Carthage](https://github.com/Carthage/Carthage) to integrate the Braintree SDK with your project. - -#### CocoaPods -``` -# Includes Cards and PayPal -pod 'Braintree' - -# Optionally include additional Pods -pod 'Braintree/DataCollector' -pod 'Braintree/Venmo' -``` - -#### Carthage -Add `github "braintree/braintree_ios"` to your `Cartfile`, and [add the frameworks to your project](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). - -## Documentation - -Start with [**'Hello, Client!'**](https://developers.braintreepayments.com/ios/start/hello-client) for instructions on basic setup and usage. - -Next, read the [**full documentation**](https://developers.braintreepayments.com/ios/sdk/client) for information about integration options, such as Drop-In UI, PayPal, and credit card tokenization. - -## Demo - -A demo app is included in the project. To run it, run `pod install` and then open `Braintree.xcworkspace` in Xcode. - -## Feedback - -The Braintree iOS SDK is in active development, we welcome your feedback! - -Here are a few ways to get in touch: - -* [GitHub Issues](https://github.com/braintree/braintree_ios/issues) - For generally applicable issues and feedback -* [Braintree Support](https://articles.braintreepayments.com/) / support@braintreepayments.com - for personal support at any phase of integration - -## Help - -* Read the headers -* [Read the docs](https://developers.braintreepayments.com/ios/sdk/client) -* Find a bug? [Open an issue](https://github.com/braintree/braintree_ios/issues) -* Want to contribute? [Check out contributing guidelines](CONTRIBUTING.md) and [submit a pull request](https://help.github.com/articles/creating-a-pull-request). - -## Releases - -Subscribe to our [Google Group](https://groups.google.com/forum/#!forum/braintree-sdk-announce) to -be notified when SDK releases go out. - -### License - -The Braintree iOS SDK is open source and available under the MIT license. See the [LICENSE](LICENSE) file for more info. \ No newline at end of file diff --git a/examples/braintree/ios/Frameworks/Braintree/Rakefile b/examples/braintree/ios/Frameworks/Braintree/Rakefile deleted file mode 100755 index c4f5f3ef..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Rakefile +++ /dev/null @@ -1,354 +0,0 @@ -require 'tempfile' -require 'fileutils' -require 'shellwords' -require 'bundler' -Bundler.require -HighLine.color_scheme = HighLine::SampleColorScheme.new - -task :default => %w[sanity_checks spec] - -desc "Run default set of tasks" -task :spec => %w[spec:all] - -desc "Run internal release process, pushing to internal GitHub Enterprise only" -task :release => %w[release:assumptions sanity_checks release:check_working_directory release:bump_version release:test release:lint_podspec release:tag release:push_private] - -desc "Publish code and pod to public github.com" -task :publish => %w[publish:push publish:push_pod publish:cocoadocs] - -desc "Distribute app, in its current state, to HockeyApp" -task :distribute => %w[distribute:build distribute:hockeyapp] - -SEMVER = /\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?/ -PODSPEC = "Braintree.podspec" -BRAINTREE_VERSION_FILE = "BraintreeCore/Braintree-Version.h" -PAYPAL_ONE_TOUCH_VERSION_FILE = "BraintreePayPal/PayPalUtils/Public/PPOTVersion.h" -DEMO_PLIST = "Demo/Supporting Files/Braintree-Demo-Info.plist" -FRAMEWORKS_PLIST = "BraintreeCore/Info.plist" -PUBLIC_REMOTE_NAME = "public" - -class << self - def run cmd - say(HighLine.color("$ #{cmd}", :debug)) - File.popen(cmd) { |file| - if block_given? - result = '' - result << file.gets until file.eof? - yield result - else - puts file.gets until file.eof? - end - } - $? == 0 - end - - def run! cmd - run(cmd) or fail("Command failed with non-zero exit status #{$?}:\n$ #{cmd}") - end - - def current_version - File.read(PODSPEC)[SEMVER] - end - - def current_version_with_sha - %x{git describe}.strip - end - - def current_branch - %x{git rev-parse --abbrev-ref HEAD}.strip - end - - def xcodebuild(scheme, command, configuration, ios_version, options={}) - default_options = { - :build_settings => {} - } - ios_version_specifier = ",OS=#{ios_version}" if !ios_version.nil? - options = default_options.merge(options) - build_settings = options[:build_settings].map{|k,v| "#{k}='#{v}'"}.join(" ") - return "set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration '#{configuration}' -scheme '#{scheme}' -destination 'name=iPhone 6,platform=iOS Simulator#{ios_version_specifier}' #{build_settings} #{command} | xcpretty -c -r junit" - end - -end - -namespace :spec do - def run_test_scheme! scheme, ios_version = nil - run! xcodebuild(scheme, 'test', 'Release', ios_version) - end - - desc 'Run unit tests' - task :unit, [:ios_version] do |t, args| - if args[:ios_version] - run_test_scheme! 'UnitTests', args[:ios_version] - else - run_test_scheme! 'UnitTests' - end - end - - desc 'Run UI tests' - task :ui do - run_test_scheme! 'UITests' - end - - namespace :api do - def with_https_server &block - begin - pid = Process.spawn('ruby ./IntegrationTests/Braintree-API-Integration-Specs/SSL/https_server.rb') - puts "Started server (#{pid})" - yield - puts "Killing server (#{pid})" - ensure - Process.kill("INT", pid) - end - end - - desc 'Run integration tests' - task :integration do - with_https_server do - run! xcodebuild('IntegrationTests', 'test', 'Release', nil, :build_settings => {'GCC_PREPROCESSOR_DEFINITIONS' => '$GCC_PREPROCESSOR_DEFINITIONS RUN_SSL_PINNING_SPECS=1'}) - end - end - end - - desc 'Run all spec schemes' - task :all => %w[spec:unit spec:api:integration spec:ui] -end - -namespace :demo do - desc 'Verify that the demo app builds successfully' - task :build do - run! xcodebuild('Demo', 'build', 'Release', nil) - end -end - -desc 'Run Carthage update' -namespace :carthage do - def generate_cartfile - File.write("./Cartfile", "git \"file://#{Dir.pwd}\" \"#{current_branch}\"") - end - - task :generate do - generate_cartfile - end - - task :clean do - run! 'rm -rf Carthage && rm Cartfile && rm Cartfile.resolved && rm -rf ~/Library/Developers/Xcode/DerivedData' - end - - task :test do - generate_cartfile - run! "carthage update" - run! "xcodebuild -project 'Demo/CarthageTest/CarthageTest.xcodeproj' -scheme 'CarthageTest' clean build" - end -end - -desc 'Run all sanity checks' -task :sanity_checks => %w[sanity_checks:pending_specs sanity_checks:build_demo sanity_checks:carthage_test] - -namespace :sanity_checks do - desc 'Check for pending tests' - task :pending_specs do - # ack returns 1 if no match is found, which is our success case - run! "which -s ack && ! ack 'fit\\(|fdescribe\\(' Specs" or fail "Please do not commit pending specs." - end - - desc 'Verify that all demo apps Build successfully' - task :build_demo => 'demo:build' - - desc 'Verify that Carthage builds successfully' - task :carthage_test => %w[carthage:test carthage:clean] -end - - - -def apple_doc_command - %W[/usr/local/bin/appledoc - -o appledocs - --project-name Braintree - --project-version '#{current_version_with_sha}' - --project-company Braintree - --docset-bundle-id '%COMPANYID' - --docset-bundle-name Braintree - --docset-desc 'Braintree iOS SDK (%VERSION)' - --index-desc README.md - --include LICENSE - --include CHANGELOG.md - --print-information-block-titles - --company-id com.braintreepayments - --prefix-merged-sections - --no-merge-categories - --warn-missing-company-id - --warn-undocumented-object - --warn-undocumented-member - --warn-empty-description - --warn-unknown-directive - --warn-invalid-crossref - --warn-missing-arg - --no-repeat-first-par - ].join(' ') -end - -def apple_doc_files - %x{find Braintree -name "*.h"}.split("\n").reject { |name| name =~ /mSDK/}.map { |name| name.gsub(' ', '\\ ')}.join(' ') -end - -desc "Generate documentation via appledoc" -task :docs => 'docs:generate' - -namespace :appledoc do - task :check do - unless File.exists?('/usr/local/bin/appledoc') - puts "appledoc not found at /usr/local/bin/appledoc: Install via homebrew and try again: `brew install --HEAD appledoc`" - exit 1 - end - end -end - -namespace :docs do - desc "Generate apple docs as html" - task :generate => 'appledoc:check' do - command = apple_doc_command << " --no-create-docset --keep-intermediate-files --create-html #{apple_doc_files}" - run(command) - puts "Generated HTML documentationa at appledocs/html" - end - - desc "Check that documentation can be built from the source code via appledoc successfully." - task :check => 'appledoc:check' do - command = apple_doc_command << " --no-create-html --verbose 5 #{apple_doc_files}" - exitstatus = run(command) - if exitstatus == 0 - puts "appledoc generation completed successfully!" - elsif exitstatus == 1 - puts "appledoc generation produced warnings" - elsif exitstatus == 2 - puts "! appledoc generation encountered an error" - exit(exitstatus) - else - puts "!! appledoc generation failed with a fatal error" - end - exit(exitstatus) - end - - desc "Generate & install a docset into Xcode from the current sources" - task :install => 'appledoc:check' do - command = apple_doc_command << " --install-docset #{apple_doc_files}" - run(command) - end -end - - -namespace :release do - desc "Print out pre-release checklist" - task :assumptions do - say "Release Assumptions" - say "* [ ] You have pulled and reconciled origin (internal GitHub Enterprise) vs public (github.com)." - say "* [ ] You are on the branch and commit you want to release." - say "* [ ] You have already merged hotfixes and pulled changes." - say "* [ ] You have already reviewed the diff between the current release and the last tag, noting breaking changes in the semver and CHANGELOG." - say "* [ ] Tests are passing, manual verifications complete." - say "* [ ] iOS Simulator has hardware keyboard disabled" - say "* [ ] Email is composed and ready to send to braintree-sdk-announce@googlegroups.com" - - abort(1) unless ask "Ready to release? " - end - - desc "Check that working directory is clean" - task :check_working_directory do - run! "echo 'Checking for uncommitted changes' && git diff --exit-code" - end - - desc "Bump version in Podspec" - task :bump_version do - say "Current version in Podspec: #{current_version}" - n = 10 - say "Previous #{n} versions in Git:" - run "git tag -l | tail -n #{n}" - version = ask("What version are you releasing?") { |q| q.validate = /\A#{SEMVER}\Z/ } - - podspec = File.read(PODSPEC) - podspec.gsub!(/(s\.version\s*=\s*)"#{SEMVER}"/, "\\1\"#{version}\"") - File.open(PODSPEC, "w") { |f| f.puts podspec } - - version_header = File.read(BRAINTREE_VERSION_FILE) - version_header.gsub!(SEMVER, version) - File.open(BRAINTREE_VERSION_FILE, "w") { |f| f.puts version_header } - - version_header = File.read(PAYPAL_ONE_TOUCH_VERSION_FILE) - version_header.gsub!(SEMVER, version) - File.open(PAYPAL_ONE_TOUCH_VERSION_FILE, "w") { |f| f.puts version_header } - - [DEMO_PLIST, FRAMEWORKS_PLIST].each do |plist| - run! "plutil -replace CFBundleVersion -string #{current_version} -- '#{plist}'" - run! "plutil -replace CFBundleShortVersionString -string #{current_version} -- '#{plist}'" - end - run "git commit -m 'Bump pod version to #{version}' -- #{PODSPEC} Podfile.lock '#{DEMO_PLIST}' '#{FRAMEWORKS_PLIST}' #{BRAINTREE_VERSION_FILE} #{PAYPAL_ONE_TOUCH_VERSION_FILE}" - end - - desc "Test." - task :test => 'spec:all' - - desc "Lint podspec." - task :lint_podspec do - run! "pod lib lint Braintree.podspec --allow-warnings" - end - - desc "Tag." - task :tag do - run! "git tag #{current_version} -a -m 'Release #{current_version}'" - end - - desc "Push tag to ghe." - task :push_private do - run! "git push origin HEAD #{current_version}" - end - -end - -namespace :publish do - - desc "Push code and tag to github.com" - task :push do - run! "git push #{PUBLIC_REMOTE_NAME} HEAD #{current_version}" - end - - desc "Pod push." - task :push_pod do - run! "pod trunk push --allow-warnings Braintree.podspec" - end - - desc "Force CocoaDocs reparse" - task :cocoadocs do - run! "curl --silent --show-error http://api.cocoadocs.org:4567/redeploy/Braintree/latest" - end - -end - -namespace :distribute do - task :build do - destination = File.expand_path("~/Desktop/Braintree-Demo-#{current_version_with_sha}") - run! "ipa build --scheme Demo --destination '#{destination}' --embed EverybodyVenmo.mobileprovision --identity 'iPhone Distribution: Venmo Inc.'" - say "Archived Demo (#{current_version}) to: #{destination}" - end - - task :hockeyapp do - destination = File.expand_path("~/Desktop/Braintree-Demo-#{current_version_with_sha}") - changes = File.read("CHANGELOG.md")[/(## #{current_version}.*?)^## /m, 1].strip - run! "ipa distribute:hockeyapp --token '#{File.read(".hockeyapp").strip}' --identifier '7134982f3df6419a0eb52b16e7d6d175' --file '#{destination}/Braintree-Demo.ipa' --dsym '#{destination}/Braintree-Demo.app.dSYM.zip' --markdown --notes #{Shellwords.shellescape("#{changes}\n\n#{current_version_with_sha}")}" - say "Uploaded Demo (#{current_version_with_sha}) to HockeyApp!" - end -end - -desc "Generate code for pinned certificates. (Copies *.crt -> BTAPIPinnedCertificates.{h,m})" -task :generate_pinned_certificates_code do - run! "cd #{File.join(File.dirname(__FILE__), "Braintree/API/Networking/Certificates")} && ./codify_certificates.sh" -end - -namespace :gen do - task :strings do - ["Drop-In", "UI"].each do |subspec| - run! "genstrings -o Braintree/#{subspec}/Localization/en.lproj Braintree/#{subspec}/**/*.m && " + - "iconv -f utf-16 -t utf-8 Braintree/#{subspec}/Localization/en.lproj/Localizable.strings > Braintree/#{subspec}/Localization/en.lproj/#{subspec}.strings && " + - "rm -f Braintree/#{subspec}/Localization/en.lproj/Localizable.strings" - end - end -end - diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTLoggerSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTLoggerSpec.m deleted file mode 100755 index 1059fec6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTLoggerSpec.m +++ /dev/null @@ -1,78 +0,0 @@ -#import "BTLogger_Internal.h" - -SpecBegin(BTLogger) - -describe(@"sharedLogger", ^{ - it(@"returns the singleton logger", ^{ - BTLogger *logger1 = [BTLogger sharedLogger]; - BTLogger *logger2 = [BTLogger sharedLogger]; - expect(logger1).to.beKindOf([BTLogger class]); - expect(logger1).to.equal(logger2); - }); -}); - -SpecEnd - -SpecBegin(BTLogger_Internal) - -describe(@"logger", ^{ - - __block BTLogger *logger; - - beforeEach(^{ - logger = [[BTLogger alloc] init]; - }); - - describe(@"log", ^{ - it(@"sends log message to NSLog", ^{ - [logger log:@"BTLogger probably works!"]; - // Can't mock NSLog - }); - - it(@"sends log message to logBlock if defined", ^{ - waitUntil(^(DoneCallback done) { - NSString *messageLogged = @"BTLogger logBlock works!"; - logger.logBlock = ^(BTLogLevel level, NSString *messageReceived) { - expect(level).to.equal(BTLogLevelInfo); - expect(messageReceived).to.equal(messageLogged); - done(); - }; - [logger log:messageLogged]; - }); - }); - }); - - describe(@"level", ^{ - it(@"defaults to 'info'", ^{ - expect(logger.level).to.equal(BTLogLevelInfo); - }); - - it(@"allows logging if logged at or below level", ^{ - - for (int level = BTLogLevelNone; level <= BTLogLevelDebug; level++) { - NSString *message = [NSString stringWithFormat:@"test %d", level]; - NSMutableArray *messagesLogged = [NSMutableArray array]; - __block BTLogLevel maxLevel = level; - waitUntil(^(DoneCallback done) { - logger.logBlock = ^(BTLogLevel actualLevel, NSString *messageReceived) { - expect(actualLevel).to.beLessThanOrEqualTo(maxLevel); - [messagesLogged addObject:messageReceived]; - }; - - logger.level = level; - [logger critical:message]; - [logger error:message]; - [logger warning:message]; - [logger info:message]; - [logger debug:message]; - done(); - }); - expect(messagesLogged.count).to.equal(level); - } - }); - - }); - -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTThreeDSecureLookupSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTThreeDSecureLookupSpec.m deleted file mode 100755 index 2df5811a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTThreeDSecureLookupSpec.m +++ /dev/null @@ -1,28 +0,0 @@ -#import "BTThreeDSecureLookupResult.h" - -// TODO: Reenable this spec when 3D Secure stuff is added back into the new BTThreeDSecureDriver - -SpecBegin(BTThreeDSecureLookupResult) - -describe(@"requiresUserAuthentication", ^{ - it(@"returns YES when the acs url is present", ^{ - BTThreeDSecureLookupResult *lookup = [[BTThreeDSecureLookupResult alloc] init]; - lookup.acsURL = [NSURL URLWithString:@"http://example.com"]; - lookup.termURL = [NSURL URLWithString:@"http://example.com"]; - lookup.MD = @"an-md"; - lookup.PAReq = @"a-PAReq"; - - expect(lookup.requiresUserAuthentication).to.beTruthy(); - }); - it(@"returns NO when the acs url is not present", ^{ - BTThreeDSecureLookupResult *lookup = [[BTThreeDSecureLookupResult alloc] init]; - lookup.acsURL = nil; - lookup.termURL = [NSURL URLWithString:@"http://example.com"]; - lookup.MD = @"an-md"; - lookup.PAReq = @"a-PAReq"; - - expect(lookup.requiresUserAuthentication).to.beFalsy(); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTURLUtilsSpecs.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTURLUtilsSpecs.m deleted file mode 100755 index 31186ef7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTURLUtilsSpecs.m +++ /dev/null @@ -1,65 +0,0 @@ -#import "BTURLUtils.h" - -SpecBegin(BTURLUtils) - -describe(@"URLfromURL:withAppendedQueryDictionary:", ^{ - it(@"appends a dictionary to a url as a query string", ^{ - expect([BTURLUtils URLfromURL:[NSURL URLWithString:@"http://example.com:80/path/to/file"] withAppendedQueryDictionary:@{ @"key": @"value" }]).to.equal([NSURL URLWithString:@"http://example.com:80/path/to/file?key=value"]); - }); - - it(@"accepts a nil dictionary", ^{ - expect([BTURLUtils URLfromURL:[NSURL URLWithString:@"http://example.com"] withAppendedQueryDictionary:nil]).to.equal([NSURL URLWithString:@"http://example.com?"]); - }); - - it(@"precent escapes the query parameters", ^{ - expect([BTURLUtils URLfromURL:[NSURL URLWithString:@"http://example.com"] withAppendedQueryDictionary:@{ @"space ": @"sym&bol=" }]).to.equal([NSURL URLWithString:@"http://example.com?space%20=sym%26bol%3D"]); - }); - - it(@"passes a nil URL", ^{ - expect([BTURLUtils URLfromURL:nil withAppendedQueryDictionary:@{ @"space ": @"sym&bol=" }]).to.beNil(); - }); - - it(@"accepts relative URLs", ^{ - expect([BTURLUtils URLfromURL:[NSURL URLWithString:@"/relative/path"] withAppendedQueryDictionary:@{ @"key": @"value" }]).to.equal([NSURL URLWithString:@"/relative/path?key=value"]); - }); -}); - -describe(@"dictionaryForQueryString:", ^{ - it(@"returns an empty dictionary for a nil query string", ^{ - expect([BTURLUtils dictionaryForQueryString:nil]).to.equal(@{}); - }); - - it(@"returns an empty dictionary for an empty query string", ^{ - expect([BTURLUtils dictionaryForQueryString:@""]).to.equal(@{}); - }); - - it(@"returns a dictionary containing items from the query string", ^{ - expect([BTURLUtils dictionaryForQueryString:@"foo=bar&baz=quux"]).to.equal(@{ @"foo": @"bar", @"baz": @"quux" }); - }); - - it(@"URL decodes entities from query string keys and values", ^{ - expect([BTURLUtils dictionaryForQueryString:@"IHaveEquals%3D=IHaveComma%2C"]).to.equal(@{ @"IHaveEquals=": @"IHaveComma," }); - }); - - it(@"URL decodes entities from query string keys and values", ^{ - expect([BTURLUtils dictionaryForQueryString:@"key+with%20spaces=value"]).to.equal(@{ @"key with spaces": @"value" }); - }); - - it(@"returns a dictionary with [NSNull null] values for keys that don't have values", ^{ - expect([BTURLUtils dictionaryForQueryString:@"key"]).to.equal(@{ @"key": [NSNull null] }); - }); - - it(@"returns a dictionary with empty string values for key=", ^{ - expect([BTURLUtils dictionaryForQueryString:@"key="]).to.equal(@{ @"key": @"" }); - }); - - it(@"represents empty keys with the empty string", ^{ - expect([BTURLUtils dictionaryForQueryString:@"&=asdf&"]).to.equal(@{ @"": @"asdf" }); - }); - - it(@"keeps the right-most value for duplicate keys", ^{ - expect([BTURLUtils dictionaryForQueryString:@"key=value1&key=value2"]).to.equal(@{ @"key": @"value2" }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTVersionSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTVersionSpec.m deleted file mode 100755 index 20700a86..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-API-Specs/BTVersionSpec.m +++ /dev/null @@ -1,9 +0,0 @@ -#import "Braintree-Version.h" - -SpecBegin(BTVersion) - -it(@"returns the current version", ^{ - expect(BRAINTREE_VERSION).to.match(@"\\d+\\.\\d+\\.\\d+"); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAcceptanceSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAcceptanceSpec.m deleted file mode 100755 index 770b1394..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAcceptanceSpec.m +++ /dev/null @@ -1,199 +0,0 @@ -#import "BTThreeDSecureDriver.h" -#import "BTClient+Testing.h" - -SpecBegin(BTThreeDSecure) - -describe(@"verifyCardWithNonce:amount:", ^{ - __block BTClient *client; - __block id delegate; - __block NSString *nonce; - - beforeEach(^{ - waitUntil(^(DoneCallback done) { - [BTClient testClientWithConfiguration:@{ BTClientTestConfigurationKeyMerchantIdentifier:@"integration_merchant_id", - BTClientTestConfigurationKeyPublicKey:@"integration_public_key", - BTClientTestConfigurationKeyCustomer:@YES, - BTClientTestConfigurationKeyClientTokenVersion: @2, - BTClientTestConfigurationKeyMerchantAccountIdentifier: @"three_d_secure_merchant_account", } - async:YES - completion:^(BTClient *aClient) { - client = aClient; - BTClientCardRequest *r = [[BTClientCardRequest alloc] init]; - r.number = @"4000000000000002"; - r.expirationMonth = @"12"; - r.expirationYear = @"2020"; - r.shouldValidate = NO; - [client saveCardWithRequest:r - success:^(BTCardPaymentMethod *card) { - nonce = card.nonce; - done(); - } failure:nil]; - }]; - }); - - delegate = [OCMockObject mockForProtocol:@protocol(BTPaymentMethodCreationDelegate)]; - }); - - describe(@"for a card that requires authentication", ^{ - it(@"returns the nonce on authentication completion", ^{ - BTThreeDSecureDriver *threeDSecure = [[BTThreeDSecureDriver alloc] initWithClient:client delegate:delegate]; - - id delegateRequestPresentationExpectation = [(OCMockObject *)delegate expect]; - __block UIViewController *threeDSecureViewController; - [delegateRequestPresentationExpectation andDo:^(NSInvocation *invocation) { - [invocation retainArguments]; - [invocation getArgument:&threeDSecureViewController atIndex:3]; - [system presentViewController:threeDSecureViewController -withinNavigationControllerWithNavigationBarClass:nil - toolbarClass:nil - configurationBlock:nil]; - }]; - [delegateRequestPresentationExpectation paymentMethodCreator:threeDSecure requestsPresentationOfViewController:[OCMArg isNotNil]]; - - [threeDSecure verifyCardWithNonce:nonce amount:[NSDecimalNumber decimalNumberWithString:@"1"]]; - - [(OCMockObject *)delegate verifyWithDelay:30]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(threeDSecureViewController != nil, error, @"Did not present 3D Secure authentication flow"); - return KIFTestStepResultSuccess; - }]; - - [[(OCMockObject *)delegate expect] paymentMethodCreator:threeDSecure didCreatePaymentMethod:[OCMArg checkWithBlock:^BOOL(id obj) { - waitUntil(^(DoneCallback done) { - BTPaymentMethod *paymentMethod = obj; - [client fetchNonceThreeDSecureVerificationInfo:paymentMethod.nonce - success:^(NSDictionary *nonceInfo) { - expect(nonceInfo[@"reportStatus"]).to.equal(@"authenticate_successful"); - done(); - } failure:nil]; - }); - return YES; - }]]; - - [[(OCMockObject *)delegate expect] paymentMethodCreator:threeDSecure requestsDismissalOfViewController:[OCMArg isNotNil]]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:1.5]; - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - - [(OCMockObject *)delegate verifyWithDelay:30]; - }); - }); - - describe(@"for a issuer that is not enrolled", ^{ - __block NSString *unenrolledNonce; - - beforeEach(^{ - waitUntil(^(DoneCallback done) { - BTClientCardRequest *r = [[BTClientCardRequest alloc] init]; - r.number = @"4000000000000051"; - r.expirationMonth = @"12"; - r.expirationYear = @"2020"; - r.shouldValidate = NO; - [client saveCardWithRequest:r - success:^(BTCardPaymentMethod *card) { - unenrolledNonce = card.nonce; - done(); - } failure:nil]; - }); - }); - - it(@"returns a nonce without user authentication", ^{ - BTThreeDSecureDriver *threeDSecure = [[BTThreeDSecureDriver alloc] initWithClient:client delegate:delegate]; - - [[(OCMockObject *)delegate expect] paymentMethodCreator:threeDSecure didCreatePaymentMethod:[OCMArg checkWithBlock:^BOOL(id obj) { - return [obj isKindOfClass:[BTCardPaymentMethod class]]; - }]]; - - [threeDSecure verifyCardWithNonce:unenrolledNonce - amount:[NSDecimalNumber decimalNumberWithString:@"1"]]; - - [(OCMockObject *)delegate verifyWithDelay:30]; - }); - }); - - describe(@"for an unsupported card type", ^{ - __block NSString *unsupportedNonce; - - beforeEach(^{ - - waitUntil(^(DoneCallback done) { - BTClientCardRequest *r = [[BTClientCardRequest alloc] init]; - r.number = @"6011111111111117"; - r.expirationMonth = @"12"; - r.expirationYear = @"2020"; - r.shouldValidate = NO; - [client saveCardWithRequest:r - success:^(BTCardPaymentMethod *card) { - unsupportedNonce = card.nonce; - done(); - } failure:nil]; - - }); - }); - - it(@"returns a card with a new nonce and appropriate threeDSecureInfo", ^{ - BTThreeDSecureDriver *threeDSecure = [[BTThreeDSecureDriver alloc] initWithClient:client delegate:delegate]; - - [[(OCMockObject *)delegate expect] paymentMethodCreator:threeDSecure - didCreatePaymentMethod:[OCMArg checkWithBlock:^BOOL(id obj) { - if (![obj isKindOfClass:[BTCardPaymentMethod class]]) { - return NO; - } - BTCardPaymentMethod *card = (BTCardPaymentMethod *)obj; - if ([card.nonce isEqualToString:unsupportedNonce] || !card.nonce || [card.nonce isEqualToString:@""]) { - return NO; - } - if (card.threeDSecureInfo.liabilityShiftPossible || card.threeDSecureInfo.liabilityShifted) { - return NO; - } - return YES; - }]]; - - [threeDSecure verifyCardWithNonce:unsupportedNonce - amount:[NSDecimalNumber decimalNumberWithString:@"1"]]; - - [(OCMockObject *)delegate verifyWithDelay:30]; - }); - }); - - describe(@"when the user taps cancel", ^{ - it(@"requests dismissal and notifies the delegate of cancelation", ^{ - BTThreeDSecureDriver *threeDSecure = [[BTThreeDSecureDriver alloc] initWithClient:client delegate:delegate]; - - id delegateRequestPresentationExpectation = [(OCMockObject *)delegate expect]; - __block UIViewController *threeDSecureViewController; - [delegateRequestPresentationExpectation andDo:^(NSInvocation *invocation) { - [invocation retainArguments]; - [invocation getArgument:&threeDSecureViewController atIndex:3]; - [system presentViewController:threeDSecureViewController - withinNavigationControllerWithNavigationBarClass:nil - toolbarClass:nil - configurationBlock:nil]; - }]; - - [delegateRequestPresentationExpectation paymentMethodCreator:threeDSecure requestsPresentationOfViewController:[OCMArg isNotNil]]; - - [threeDSecure verifyCardWithNonce:nonce amount:[NSDecimalNumber decimalNumberWithString:@"1"]]; - - [(OCMockObject *)delegate verifyWithDelay:10]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(threeDSecureViewController != nil, error, @"Did not present 3D Secure authentication flow"); - return KIFTestStepResultSuccess; - }]; - - [[(OCMockObject *)delegate expect] paymentMethodCreator:threeDSecure requestsDismissalOfViewController:[OCMArg isNotNil]]; - [[(OCMockObject *)delegate expect] paymentMethodCreatorDidCancel:threeDSecure]; - - [tester tapViewWithAccessibilityLabel:@"Cancel"]; - - [(OCMockObject *)delegate verifyWithDelay:30]; - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAuthenticationViewControllerAcceptanceSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAuthenticationViewControllerAcceptanceSpec.m deleted file mode 100755 index 8348907d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/BTThreeDSecureAuthenticationViewControllerAcceptanceSpec.m +++ /dev/null @@ -1,543 +0,0 @@ -#import "BTThreeDSecureAuthenticationViewController.h" -#import "BTClient+Testing.h" -#import "BTClient_Internal.h" - -#import "KIFUITestActor+BTWebView.h" -#import "EXPMatchers+BTBeANonce.h" - -#define TIME_TO_WAIT_FOR_KEYBOARD 1.5 - -@interface BTThreeDSecureAuthenticationViewController_AcceptanceSpecHelper : NSObject - -@property (nonatomic, strong) BTClient *client; -@property (nonatomic, strong) BTThreeDSecureAuthenticationViewController *threeDSecureViewController; -@property (nonatomic, strong) BTThreeDSecureLookupResult *lookupResult; -@property (nonatomic, copy) NSString *originalNonce; - -@property (nonatomic, copy) void (^authenticateBlock)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus)); -@property (nonatomic, copy) void (^finishBlock)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController); -@property (nonatomic, copy) void (^failureBlock)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error); -@end - -@implementation BTThreeDSecureAuthenticationViewController_AcceptanceSpecHelper - -+ (instancetype)helper { - BTThreeDSecureAuthenticationViewController_AcceptanceSpecHelper *helper = [[self alloc] init]; - waitUntil(^(DoneCallback done) { - [BTClient testClientWithConfiguration:@{ BTClientTestConfigurationKeyMerchantIdentifier:@"integration_merchant_id", - BTClientTestConfigurationKeyPublicKey:@"integration_public_key", - BTClientTestConfigurationKeyCustomer:@YES, - BTClientTestConfigurationKeyClientTokenVersion: @2, - BTClientTestConfigurationKeyMerchantAccountIdentifier: @"three_d_secure_merchant_account", } - async:YES - completion:^(BTClient *client) { - helper.client = client; - done(); - }]; - }); - - return helper; -} - -- (void)lookupCard:(NSString *)number completion:(void (^)(BTThreeDSecureLookupResult *))completion { - BTClientCardRequest *request = [[BTClientCardRequest alloc] init]; - request.number = number; - request.expirationMonth = @"12"; - request.expirationYear = @"2020"; - request.shouldValidate = YES; - - [self.client saveCardWithRequest:request - success:^(BTPaymentMethod *card) { - NSString *originalNonce = card.nonce; - self.originalNonce = originalNonce; - [self.client lookupNonceForThreeDSecure:originalNonce - transactionAmount:[NSDecimalNumber decimalNumberWithString:@"1"] - success:^(BTThreeDSecureLookupResult *threeDSecureLookup) { - completion(threeDSecureLookup); - } failure:^(NSError *error) { - completion(nil); - }]; - } failure:^(__unused NSError *error) { - completion(nil); - }]; -} - -- (void)fetchThreeDSecureVerificationInfo:(NSString *)nonce completion:(void (^)(NSDictionary *response))completion { - [self.client fetchNonceThreeDSecureVerificationInfo:nonce - success:^(NSDictionary *threeDSecureVerificationInfo){ - completion(threeDSecureVerificationInfo); - } failure:^(__unused NSError *error){ - completion(nil); - }]; -} - -- (void)lookupNumber:(NSString *)number - andDo:(void (^)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController))testBlock - didAuthenticate:(void (^)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus)))authenticateBlock - didFail:(void (^)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error))failureBlock - didFinish:(void (^)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController))finishBlock { - - waitUntil(^(DoneCallback done) { - [self lookupCard:number - completion:^(BTThreeDSecureLookupResult *threeDSecureLookup){ - self.lookupResult = threeDSecureLookup; - done(); - }]; - }); - - self.threeDSecureViewController = [[BTThreeDSecureAuthenticationViewController alloc] initWithLookupResult:self.lookupResult]; - - self.authenticateBlock = authenticateBlock; - self.finishBlock = finishBlock; - self.failureBlock = failureBlock; - - self.threeDSecureViewController.delegate = self; - - if (testBlock) { - testBlock(self.threeDSecureViewController); - } -} - -#pragma mark ThreeDSecureViewControllerDelegate - -- (void)threeDSecureViewController:(BTThreeDSecureAuthenticationViewController *)viewController - didAuthenticateCard:(BTCardPaymentMethod *)card - completion:(void (^)(BTThreeDSecureViewControllerCompletionStatus))completionBlock { - if (self.authenticateBlock) { - self.authenticateBlock(viewController, card, completionBlock); - } else { - [[NSException exceptionWithName:NSInternalInconsistencyException - reason:@"BTThreeDSecureViewController_AcceptanceSpecHelper received an unexpected call to threeDSecureViewController:didAuthenticateNonce:completion:" - userInfo:nil] raise]; - } -} - -- (void)threeDSecureViewController:(BTThreeDSecureAuthenticationViewController *)viewController didFailWithError:(NSError *)error { - if (self.failureBlock) { - self.failureBlock(viewController, error); - } else { - [[NSException exceptionWithName:NSInternalInconsistencyException - reason:@"BTThreeDSecureViewController_AcceptanceSpecHelper received an unexpected call to threeDSecureViewController:didFailWithError:" - userInfo:nil] raise]; - } -} - -- (void)threeDSecureViewControllerDidFinish:(BTThreeDSecureAuthenticationViewController *)viewController { - if (self.finishBlock) { - self.finishBlock(viewController); - } else { - [[NSException exceptionWithName:NSInternalInconsistencyException - reason:@"BTThreeDSecureViewController_AcceptanceSpecHelper received an unexpected call to threeDSecureViewControllerDidFinish:" - userInfo:nil] raise]; - } -} - -- (void)lookupHappyPathAndDo:(void (^)(BTThreeDSecureAuthenticationViewController *threeDSecureViewController))completion { - [self lookupNumber:@"4000000000000002" andDo:completion didAuthenticate:nil didFail:nil didFinish:nil]; -} - -@end - -SpecBegin(BTThreeDSecureAuthenticationViewController_Acceptance) - -describe(@"3D Secure View Controller", ^{ - __block BTThreeDSecureAuthenticationViewController_AcceptanceSpecHelper *helper; - beforeEach(^{ - helper = [BTThreeDSecureAuthenticationViewController_AcceptanceSpecHelper helper]; - }); - - describe(@"developer perspective - delegate messages", ^{ - it(@"fails to load a view controller when lookup fails", ^{ - BTThreeDSecureLookupResult *lookupResult = nil; - BTThreeDSecureAuthenticationViewController *threeDSecureViewController = [[BTThreeDSecureAuthenticationViewController alloc] initWithLookupResult:lookupResult]; - - expect(threeDSecureViewController).to.beNil(); - }); - - it(@"fails to load a view controller when lookup does not require a user flow", ^{ - BTThreeDSecureLookupResult *lookupResult = [[BTThreeDSecureLookupResult alloc] init]; - BTThreeDSecureAuthenticationViewController *threeDSecureViewController = [[BTThreeDSecureAuthenticationViewController alloc] initWithLookupResult:lookupResult]; - - expect(lookupResult.requiresUserAuthentication).to.beFalsy(); - expect(threeDSecureViewController).to.beNil(); - }); - - it(@"calls didAuthenticate with the upgraded nonce (consuming the original nonce)", ^{ - __block BOOL calledDidAuthenticate = NO; - [helper lookupNumber:@"4000000000000002" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus)) { - calledDidAuthenticate = YES; - expect(card.nonce).to.beANonce(); - } didFail:nil - didFinish:nil]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidAuthenticate, error, @"Did not call didAuthenticate"); - return KIFTestStepResultSuccess; - }]; - }); - - it(@"calls didFinish after didAuthenticate calls its completion with success", ^{ - __block BOOL calledDidAuthenticate = NO; - __block BOOL calledDidFinish = NO; - [helper lookupNumber:@"4000000000000002" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus)) { - calledDidAuthenticate = YES; - expect(calledDidFinish).to.beFalsy(); - completion(BTThreeDSecureViewControllerCompletionStatusSuccess); - } didFail:nil - didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - calledDidFinish = YES; - expect(calledDidAuthenticate).to.beTruthy(); - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidAuthenticate, error, @"Did not call didAuthenticate"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - - it(@"calls didFail when authentication fails (leaving the original nonce transactable)", ^{ - __block BOOL calledDidFail = NO; - __block BOOL calledDidFinish = NO; - - [helper lookupNumber:@"4000000000000010" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:nil - didFail:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error) { - expect(error.domain).to.equal(BTThreeDSecureErrorDomain); - expect(error.code).to.equal(BTThreeDSecureFailedAuthenticationErrorCode); - expect(error.localizedDescription).to.equal(@"Failed to authenticate, please try a different form of payment"); - expect(error.userInfo[BTThreeDSecureInfoKey]).to.equal(@{ @"liabilityShifted": @NO, @"liabilityShiftPossible": @YES, }); - calledDidFail = YES; - } - didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - expect(calledDidFail).to.beTruthy(); - calledDidFinish = YES; - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidFail, error, @"Did not call didFail"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - describe(@"user flows - 3DS Statuses (enrolled, authenticated, signature verified)", ^{ - context(@"cardholder enrolled, successful authentication, successful signature verification - Y,Y,Y", ^{ - it(@"successfully authenticates a user when they enter their password", ^{ - __block BOOL checkedNonce = NO; - [helper lookupNumber:@"4000000000000002" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus)) { - [helper fetchThreeDSecureVerificationInfo:card.nonce - completion:^(NSDictionary *response) { - expect(response[@"reportStatus"]).to.equal(@"authenticate_successful"); - checkedNonce = YES; - }]; - } didFail:nil - didFinish:nil]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(checkedNonce, error, @"Did not check nonce"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"issuer not enrolled - N", ^{ - it(@"bypasses the entire authentication experience", ^{ - [helper lookupNumber:@"4000000000000051" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - expect(threeDSecureViewController).to.beNil(); - } didAuthenticate:nil didFail:nil didFinish:nil]; - }); - }); - - context(@"simulated cardinal error on lookup - error", ^{ - it(@"bypasses the entire authentication experience", ^{ - [helper lookupNumber:@"4000000000000077" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - expect(threeDSecureViewController).to.beNil(); - } didAuthenticate:nil - didFail:nil - didFinish:nil]; - }); - }); - - context(@"User enters incorrect password - Y,N,Y", ^{ - it(@"it presents the failure to the user and fails to authenticate the nonce", ^{ - __block BOOL calledDidFail; - __block BOOL calledDidFinish; - - [helper lookupNumber:@"4000000000000028" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester enterTextIntoCurrentFirstResponder:@"bad"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - [tester waitForViewWithAccessibilityLabel:@"Account Authentication Blocked"]; - [tester tapViewWithAccessibilityLabel:@"Continue"]; - } didAuthenticate:nil - didFail:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error) { - expect(error.domain).to.equal(BTThreeDSecureErrorDomain); - expect(error.code).to.equal(BTThreeDSecureFailedAuthenticationErrorCode); - expect(error.localizedDescription).to.equal(@"Failed to authenticate, please try a different form of payment"); - expect(error.userInfo[BTThreeDSecureInfoKey]).to.equal(@{ @"liabilityShifted": @NO, @"liabilityShiftPossible": @YES}); - calledDidFail = YES; - } didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - calledDidFinish = YES; - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidFail, error, @"Did not call didFail"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"User attempted to enter a password - Y,A,Y", ^{ - it(@"displays a loading indication to the user and successfully authenticates the nonce", ^{ - __block BOOL checkedNonce; - - [helper lookupNumber:@"4000000000000101" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - } didAuthenticate:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, BTCardPaymentMethod *card, void (^completion)(BTThreeDSecureViewControllerCompletionStatus status)) { - [helper fetchThreeDSecureVerificationInfo:card.nonce - completion:^(NSDictionary *response) { - expect(response[@"reportStatus"]).to.equal(@"authenticate_attempt_successful"); - checkedNonce = YES; - }]; - } didFail:nil - didFinish:nil]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(checkedNonce, error, @"Did not check nonce"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"Signature verification fails - Y,Y,N", ^{ - it(@"accepts a password but resuts in an failed verification", ^{ - __block BOOL calledDidFail = NO; - __block BOOL calledDidFinish = NO; - - [helper lookupNumber:@"4000000000000010" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:nil - didFail:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error) { - expect(error.domain).to.equal(BTThreeDSecureErrorDomain); - expect(error.code).to.equal(BTThreeDSecureFailedAuthenticationErrorCode); - expect(error.localizedDescription).to.equal(@"Failed to authenticate, please try a different form of payment"); - expect(error.userInfo[BTThreeDSecureInfoKey]).to.equal(@{ @"liabilityShifted": @NO, @"liabilityShiftPossible": @YES, }); - calledDidFail = YES; - } - didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - calledDidFinish = YES; - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidFail, error, @"Did not call didFail"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"issuer is down - Y,U", ^{ - it(@"returns a nonce without asking user for authentication", ^{ - __block BOOL calledDidFail = NO; - __block BOOL calledDidFinish = NO; - - [helper lookupNumber:@"4000000000000036" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"System Error" traits:UIAccessibilityTraitStaticText]; - [tester tapViewWithAccessibilityLabel:@"Continue"]; - } didAuthenticate:nil - didFail:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error) { - calledDidFail = YES; - - expect(error.domain).to.equal(BTThreeDSecureErrorDomain); - expect(error.code).to.equal(BTThreeDSecureFailedAuthenticationErrorCode); - expect(error.userInfo[BTThreeDSecureInfoKey]).to.equal(@{ @"liabilityShifted": @NO, @"liabilityShiftPossible": @YES, }); - } didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - expect(calledDidFail).to.beTruthy(); - calledDidFinish = YES; - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidFail, error, @"Did not call didFail"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"Early termination due to cardinal error - Y, Error", ^{ - it(@"accepts a password but fails to authenticate the nonce", ^{ - __block BOOL calledDidFail = NO; - __block BOOL calledDidFinish = NO; - - [helper lookupNumber:@"4000000000000093" - andDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - [tester tapUIWebviewXPathElement:@"//input[@name=\"external.field.password\"]"]; - [tester waitForTimeInterval:TIME_TO_WAIT_FOR_KEYBOARD]; - - [tester enterTextIntoCurrentFirstResponder:@"1234"]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - } didAuthenticate:nil - didFail:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController, NSError *error) { - calledDidFail = YES; - expect(error.domain).to.equal(BTThreeDSecureErrorDomain); - expect(error.code).to.equal(BTThreeDSecureFailedAuthenticationErrorCode); - expect(error.userInfo[BTThreeDSecureInfoKey]).to.equal(@{ @"liabilityShiftPossible": @YES, @"liabilityShifted": @NO, }); - } didFinish:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - calledDidFinish = YES; - expect(calledDidFail).to.beTruthy(); - }]; - - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition(calledDidFail, error, @"Did not call didFail"); - KIFTestWaitCondition(calledDidFinish, error, @"Did not call didFinish"); - return KIFTestStepResultSuccess; - }]; - }); - }); - - context(@"The ACS Frame fails to load", ^{ - it(@"accepts a password but fails to authenticate the nonce", ^{ - id stub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { - return [request.URL.host isEqualToString:@"acs.example.com"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithError:[NSError errorWithDomain:NSURLErrorDomain code:123 userInfo:@{ NSLocalizedDescriptionKey: @"Something bad happened" }]]; - }]; - - BTThreeDSecureLookupResult *lookupResult = [[BTThreeDSecureLookupResult alloc] init]; - lookupResult.acsURL = [NSURL URLWithString:@"https://acs.example.com/"]; - lookupResult.PAReq = @"pareq"; - lookupResult.termURL = [NSURL URLWithString:@"https://example.com/term"]; - lookupResult.MD = @"md"; - - BTThreeDSecureAuthenticationViewController *threeDSecureViewController = [[BTThreeDSecureAuthenticationViewController alloc] initWithLookupResult:lookupResult]; - - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Something bad happened"]; - [tester tapViewWithAccessibilityLabel:@"OK"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Something bad happened"]; - - [OHHTTPStubs removeStub:stub]; - }); - }); - }); - - describe(@"web view interaction details", ^{ - xit(@"displays a loading indicator during page loads", ^{ - [helper lookupHappyPathAndDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [system waitForApplicationToSetNetworkActivityIndicatorVisible:YES]; - [system waitForApplicationToSetNetworkActivityIndicatorVisible:NO]; - [system waitForTimeInterval:1]; - [tester tapViewWithAccessibilityLabel:@"Submit"]; - [system waitForApplicationToSetNetworkActivityIndicatorVisible:YES]; - [system waitForTimeInterval:1]; - [tester waitForViewWithAccessibilityLabel:@"Incorrect, Please try again"]; - [system waitForApplicationToSetNetworkActivityIndicatorVisible:NO]; - }]; - }); - - it(@"closes the popup when the user taps Cancel in the nav bar", ^{ - [helper lookupHappyPathAndDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester tapViewWithAccessibilityLabel:@"Help"]; - [tester waitForViewWithAccessibilityLabel:@"Social Security Number"]; - [tester tapViewWithAccessibilityLabel:@"Cancel"]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - }]; - }); - - it(@"closes the popup when the user taps a close link", ^{ - [helper lookupHappyPathAndDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester tapViewWithAccessibilityLabel:@"Help"]; - [tester waitForViewWithAccessibilityLabel:@"Social Security Number"]; - [tester tapUIWebviewXPathElement:@"//a[text()=\"Social Security Number\"]"]; - [tester tapUIWebviewXPathElement:@"(//a[contains(text(), \"Return\")])[last()]"]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - }]; - }); - - it(@"uses the html title tag for the view controllers title", ^{ - [helper lookupHappyPathAndDo:^(BTThreeDSecureAuthenticationViewController *threeDSecureViewController) { - [system presentViewController:threeDSecureViewController withinNavigationControllerWithNavigationBarClass:nil toolbarClass:nil configurationBlock:nil]; - - [tester waitForViewWithAccessibilityLabel:@"Please submit your Verified by Visa password." traits:UIAccessibilityTraitStaticText]; - - expect(threeDSecureViewController.title).to.equal(@"Authentication"); - }]; - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.h b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.h deleted file mode 100755 index 5fa7d22e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "KIFSystemTestActor.h" - -@interface KIFSystemTestActor (BTNetworkActivity) - -- (void)waitForApplicationToSetNetworkActivityIndicatorVisible:(BOOL)visible; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.m deleted file mode 100755 index 7eab576c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFSystemTestActor+BTNetworkActivity.m +++ /dev/null @@ -1,12 +0,0 @@ -#import "KIFSystemTestActor+BTNetworkActivity.h" - -@implementation KIFSystemTestActor (BTNetworkActivity) - -- (void)waitForApplicationToSetNetworkActivityIndicatorVisible:(BOOL)visible { - [system runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestWaitCondition([[UIApplication sharedApplication] isNetworkActivityIndicatorVisible] == visible, error, @"Network activity indicator visiblity was not %@", (visible ? @"YES" : @"NO")); - return KIFTestStepResultSuccess; - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.h b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.h deleted file mode 100755 index 08bd3d60..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "KIFUITestActor.h" - -@interface KIFUITestActor (BTWebView) - -- (void) waitForUIWebviewXPathElement:(NSString*)xpath; -- (void) tapUIWebviewXPathElement:(NSString*)xpath; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.m deleted file mode 100755 index c278394d..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Acceptance-Specs/KIFUITestActor+BTWebView.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "KIFUITestActor+BTWebView.h" - -@implementation KIFUITestActor (BTWebView) - -- (UIWebView *)_getWebViewOnCurrentScreen:(NSArray *)views -{ - for (UIView *view in views) { - if ([NSStringFromClass([view class]) isEqual:@"UIWebView"]) { - return (UIWebView*) view; - } - UIWebView* found = [self _getWebViewOnCurrentScreen:view.subviews]; - if (found != nil) - return found; - } - return nil; -} - -- (UIWebView *)getWebViewOnCurrentScreen { - return [self _getWebViewOnCurrentScreen:[[UIApplication sharedApplication] windows]]; -} - - -// If the send in xpath doesn't find any element the return CGPoint will be -1,-1 -- (CGPoint)webViewElementCoordinates:(NSString *)xpath { - UIWebView *currentWebView = [self getWebViewOnCurrentScreen]; - if (currentWebView) { - [currentWebView stringByEvaluatingJavaScriptFromString:@"var script = document.createElement('script');" - "script.type = 'text/javascript';" - "script.text = \"function findPos(obj) {var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop]; }}; function getElementsByXPath(xpath, contextNode) { try { if(contextNode === undefined) { var xpathResult = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null); } else { var xpathResult = contextNode.evaluate(xpath, contextNode, null, XPathResult.ANY_TYPE, null); } var array = []; var element; element = xpathResult.iterateNext(); while(element) { array[array.length] = element; element = xpathResult.iterateNext(); } if (array.length >= 0) { var element = array[0]; window.scroll(0,findPos(element)); var rect = element.getBoundingClientRect(); var elementLeft,elementTop; var scrollTop = document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop; var scrollLeft = document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft; elementTop = rect.top+scrollTop; elementLeft = rect.left+scrollLeft; return elementLeft + ',' + elementTop + ',' + document.documentElement.scrollTop + ',' + document.body.scrollTop; } else { return ''; } } catch(err) { return 'xpath not found';} };\";" - "document.getElementsByTagName('head')[0].appendChild(script);"]; - NSString *message = [currentWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"%@%@%@", @"getElementsByXPath('", xpath, @"');"]]; - // This sleep is to allow scrolling to the element happening - [self waitForTimeInterval:0.1]; - if (![message isEqualToString:@""] && ![message isEqualToString:@"xpath not found"]) { - NSArray *list = [message componentsSeparatedByString:@","]; - CGPoint domCoordinates = CGPointMake([list[0] floatValue], [list[1] floatValue]); - CGPoint windowCoordinates = [currentWebView.scrollView convertPoint:domCoordinates - toView:[[UIApplication sharedApplication] keyWindow]]; - - return windowCoordinates; - } - } - return CGPointMake(-1, -1); -} - -- (void)waitForUIWebviewXPathElement:(NSString *)xpath { - - [self runBlock:^KIFTestStepResult(NSError **error) { - CGPoint point = [self webViewElementCoordinates:xpath]; - KIFTestWaitCondition(point.x != -1 && point.y != -1, error, @"Cannot find element with xpath \"%@\"", xpath); - return KIFTestStepResultSuccess; - } timeout:10.0]; - -} - -- (void)tapUIWebviewXPathElement:(NSString *)xpath { - [self runBlock:^KIFTestStepResult(NSError **error) { - CGPoint point = [self webViewElementCoordinates:xpath]; - KIFTestWaitCondition(point.x != -1 && point.y != -1, error, @"Cannot find element with xpath \"%@\"", xpath); - [self tapScreenAtPoint:point]; - return KIFTestStepResultSuccess; - } timeout:10.0]; - -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Integration-Specs/BTPayPalDriverSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Integration-Specs/BTPayPalDriverSpec.m deleted file mode 100755 index a7035b2f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Integration-Specs/BTPayPalDriverSpec.m +++ /dev/null @@ -1,917 +0,0 @@ -#import "BTPayPalDriver.h" - -#import "Braintree.h" -#import "BTClient_Internal.h" -#import "PayPalOneTouchCore.h" -#import "PayPalOneTouchRequest.h" -#import "BTAppSwitchErrors.h" -#import "BTPayPalDriver_Compatibility.h" - -@interface BTPayPalDriverSpecHelper : NSObject -@end - -@implementation BTPayPalDriverSpecHelper - -+ (void)setupSpec:(void (^)(NSString *returnURLScheme, id mockClient, id mockApplication))setupBlock { - id configuration = [OCMockObject mockForClass:[BTConfiguration class]]; - [[[configuration stub] andReturnValue:@YES] payPalEnabled]; - [[[configuration stub] andReturn:[NSURL URLWithString:@"https://example.com/privacy"]] payPalPrivacyPolicyURL]; - [[[configuration stub] andReturn:[NSURL URLWithString:@"https://example.com/tos"]] payPalMerchantUserAgreementURL]; - [[[configuration stub] andReturn:@"offline"] payPalEnvironment]; - [[[configuration stub] andReturn:@"client-id"] payPalClientId]; - [[[configuration stub] andReturnValue:@NO] payPalUseBillingAgreement]; - - id clientToken = [OCMockObject mockForClass:[BTClientToken class]]; - [[[clientToken stub] andReturn:@"client-token"] originalValue]; - - id client = [OCMockObject mockForClass:[BTClient class]]; - [[[client stub] andReturn:client] copyWithMetadata:OCMOCK_ANY]; - [[[client stub] andReturn:clientToken] clientToken]; - [[[client stub] andReturn:configuration] configuration]; - - NSString *returnURLScheme = @"com.braintreepayments.Braintree-Demo.payments"; - - id bundle = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[bundle stub] andReturn:@[@{ @"CFBundleURLSchemes": @[returnURLScheme] }]] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - - id application = [OCMockObject partialMockForObject:[UIApplication sharedApplication]]; - [[[application stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", returnURLScheme)]; - - setupBlock(returnURLScheme, client, application); -} - -@end - -SpecBegin(BTPayPalDriver) - -describe(@"PayPal One Touch Core", ^{ - describe(@"future payments", ^{ - describe(@"performing app switches", ^{ - it(@"performs an app switch to PayPal when the PayPal app is installed", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"Perform App Switch"]; - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(__unused NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockApplication verify]; - }]; - }); - - it(@"performs an app switch to Safari when the PayPal app is not installed", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"Perform App Switch"]; - - [[[mockApplication stub] andReturnValue:@NO] canOpenURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"https")]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", @"https")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockApplication verify]; - }]; - }); - - it(@"fails to initialize if the returnURLScheme is not valid", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:@"invalid-return-url-scheme"]; - - expect(payPalDriver).to.beNil(); - }]; - }); - }); - - describe(@"handling app switch returns", ^{ - it(@"receives a payment method on app switch return success", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - BTPaymentMethod *fakePaymentMethod = [OCMockObject mockForClass:[BTPaymentMethod class]]; - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockClient expect] andDo:^(NSInvocation *invocation) { - void (^successBlock)(BTPaymentMethod *paymentMethod); - [invocation getArgument:&successBlock atIndex:4]; - successBlock(fakePaymentMethod); - }] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC expect] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeSuccess)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[result stub] response]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - expect(paymentMethod).to.equal(fakePaymentMethod); - expect(error).to.beNil(); - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - [mockOTC verify]; - }]; - }); - - it(@"receives the error passed through directly on failure", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - NSError *fakeError = [OCMockObject mockForClass:[NSError class]]; - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC expect] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeError)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturn:fakeError] error]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - expect(paymentMethod).to.beNil(); - expect(error).to.equal(fakeError); - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - [mockOTC verify]; - }]; - }); - - it(@"receives neither a payment method nor an error on cancelation", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC expect] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeCancel)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[result stub] error]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - expect(paymentMethod).to.beNil(); - expect(error).to.beNil(); - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - [mockOTC verify]; - }]; - }); - }); - - describe(@"scopes", ^{ - it(@"includes email and future payments", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"opened URL"]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", @"https")]; - - id otcStub = [OCMockObject mockForClass:[PayPalOneTouchAuthorizationRequest class]]; - [[[[otcStub expect] classMethod] andForwardToRealObject] requestWithScopeValues:HC_containsInAnyOrder(@"email", @"https://uri.paypal.com/services/payments/futurepayments", nil) - privacyURL:OCMOCK_ANY - agreementURL:OCMOCK_ANY - clientID:OCMOCK_ANY - environment:OCMOCK_ANY - callbackURLScheme:OCMOCK_ANY]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - [payPalDriver startAuthorizationWithCompletion:nil]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [otcStub verify]; - }]; - }); - }); - - describe(@"analytics", ^{ - it(@"posts an analytics event for a successful app switch to the PayPal app", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"Perform App Switch"]; - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(__unused NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.appswitch.initiate.started"]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"posts an analytics event for a successful app switch to the Browser", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"Perform App Switch"]; - [[[mockApplication stub] andReturnValue:@NO] canOpenURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"https")]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(__unused NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", @"https")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.webswitch.initiate.started"]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"posts an analytics event for a failed app switch", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - XCTestExpectation *appSwitchExpectation = [self expectationWithDescription:@"Perform App Switch"]; - [[[mockApplication stub] andReturnValue:@NO] canOpenURL:HC_hasProperty(@"scheme", HC_startsWith(@"com.paypal"))]; - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"https")]; - [[[[mockApplication expect] andReturnValue:@YES] andDo:^(__unused NSInvocation *invocation) { - [appSwitchExpectation fulfill]; - }] openURL:HC_hasProperty(@"scheme", @"https")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.webswitch.initiate.started"]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"posts analytics events when preflight checks fail", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-otc.preflight.invalid-return-url-scheme"]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:@"invalid-return-url-scheme"]; - expect(payPalDriver).to.beNil(); - - [mockClient verify]; - }]; - }); - - it(@"post an analytics event to indicate handling the one touch core response ", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC stub] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeCancel)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[result stub] error]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.unknown.canceled"]; - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"posts an anlaytics event to indicate tokenization success", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockClient stub] andDo:^(NSInvocation *invocation) { - void (^successBlock)(BTPaymentMethod *paymentMethod); - [invocation getArgument:&successBlock atIndex:4]; - successBlock(nil); - }] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC stub] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeSuccess)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[result stub] response]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.tokenize.succeeded"]; - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"posts an anlaytics event to indicate tokenization failure", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - NSURL *fakeReturnURL = [OCMockObject mockForClass:[NSURL class]]; - - [[[mockClient stub] andDo:^(NSInvocation *invocation) { - void (^failureBlock)(BTPaymentMethod *paymentMethod); - [invocation getArgument:&failureBlock atIndex:5]; - failureBlock(nil); - }] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:OCMOCK_ANY]; - [[[mockApplication stub] andReturnValue:@YES] openURL:OCMOCK_ANY]; - - id mockOTC = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[[mockOTC stub] classMethod] andDo:^(NSInvocation *invocation) { - void (^stubOTCCompletionBlock)(PayPalOneTouchCoreResult *result); - [invocation getArgument:&stubOTCCompletionBlock atIndex:3]; - id result = [OCMockObject mockForClass:[PayPalOneTouchCoreResult class]]; - [(PayPalOneTouchCoreResult *)[[result stub] andReturnValue:OCMOCK_VALUE(PayPalOneTouchResultTypeSuccess)] type]; - [(PayPalOneTouchCoreResult *)[result stub] target]; - [(PayPalOneTouchCoreResult *)[result stub] response]; - stubOTCCompletionBlock(result); - }] parseResponseURL:fakeReturnURL completionBlock:[OCMArg isNotNil]]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [[mockClient expect] postAnalyticsEvent:@"ios.paypal-future-payments.tokenize.failed"]; - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Received call to completion block"]; - [payPalDriver startAuthorizationWithCompletion:^void(BTPayPalPaymentMethod *paymentMethod, NSError *error) { - [completionExpectation fulfill]; - }]; - - [BTPayPalDriver handleAppSwitchReturnURL:fakeReturnURL]; - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - }); - - describe(@"delegate notifications", ^{ - }); - - describe(@"isAvailable", ^{ - - - it(@"returns YES when PayPal is enabled in configuration and One Touch Core is ready", ^{ - - id configuration = [OCMockObject mockForClass:[BTConfiguration class]]; - [[[configuration stub] andReturnValue:@YES] payPalEnabled]; - [[[configuration stub] andReturn:[NSURL URLWithString:@"https://example.com/privacy"]] payPalPrivacyPolicyURL]; - [[[configuration stub] andReturn:[NSURL URLWithString:@"https://example.com/tos"]] payPalMerchantUserAgreementURL]; - [[[configuration stub] andReturn:@"offline"] payPalEnvironment]; - [[[configuration stub] andReturn:@"client-id"] payPalClientId]; - - id clientToken = [OCMockObject mockForClass:[BTClientToken class]]; - [[[clientToken stub] andReturn:@"client-token"] originalValue]; - - id client = [OCMockObject mockForClass:[BTClient class]]; - [[[client stub] andReturn:client] copyWithMetadata:OCMOCK_ANY]; - [[[client stub] andReturn:clientToken] clientToken]; - [[[client stub] andReturn:configuration] configuration]; - - NSString *returnURLScheme = @"com.braintreepayments.Braintree-Demo.bt-payments"; - - id bundle = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[bundle stub] andReturn:@[@{ @"CFBundleURLSchemes": @[returnURLScheme] }]] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - - id application = [OCMockObject partialMockForObject:[UIApplication sharedApplication]]; - [[[application stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", returnURLScheme)]; - - NSError *error; - BOOL isAvailable = [BTPayPalDriver verifyAppSwitchConfigurationForClient:client returnURLScheme:returnURLScheme error:&error]; - expect(isAvailable).to.beTruthy(); - expect(error).to.beNil(); - - - }); - - it(@"returns NO when PayPal is not enabled in configuration", ^{ - - id configuration = [OCMockObject mockForClass:[BTConfiguration class]]; - [[[configuration stub] andReturnValue:@NO] payPalEnabled]; - - [[[configuration stub] andReturn:@"offline"] payPalEnvironment]; - [[[configuration stub] andReturn:@"client-id"] payPalClientId]; - - id clientToken = [OCMockObject mockForClass:[BTClientToken class]]; - [[[clientToken stub] andReturn:@"client-token"] originalValue]; - - id client = [OCMockObject mockForClass:[BTClient class]]; - [[[client stub] andReturn:client] copyWithMetadata:OCMOCK_ANY]; - [[[client stub] andReturn:clientToken] clientToken]; - [[[client stub] andReturn:configuration] configuration]; - - NSString *returnURLScheme = @"com.braintreepayments.Braintree-Demo.bt-payments"; - - id bundle = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[bundle stub] andReturn:@[@{ @"CFBundleURLSchemes": @[returnURLScheme] }]] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - - id application = [OCMockObject partialMockForObject:[UIApplication sharedApplication]]; - [[[application stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", returnURLScheme)]; - - [[client expect] postAnalyticsEvent:@"ios.paypal-otc.preflight.disabled"]; - - NSError *error; - BOOL isAvailable = [BTPayPalDriver verifyAppSwitchConfigurationForClient:client returnURLScheme:returnURLScheme error:&error]; - expect(isAvailable).to.beFalsy(); - expect(error).notTo.beNil(); - - }); - - it(@"returns NO when the URL scheme has not been setup", ^{ - - id configuration = [OCMockObject mockForClass:[BTConfiguration class]]; - [[[configuration stub] andReturnValue:@YES] payPalEnabled]; - - [[[configuration stub] andReturn:@"offline"] payPalEnvironment]; - [[[configuration stub] andReturn:@"client-id"] payPalClientId]; - - id clientToken = [OCMockObject mockForClass:[BTClientToken class]]; - [[[clientToken stub] andReturn:@"client-token"] originalValue]; - - id client = [OCMockObject mockForClass:[BTClient class]]; - [[[client stub] andReturn:client] copyWithMetadata:OCMOCK_ANY]; - [[[client stub] andReturn:clientToken] clientToken]; - [[[client stub] andReturn:configuration] configuration]; - - NSString *returnURLScheme = @"com.braintreepayments.Braintree-Demo.bt-payments"; - - id application = [OCMockObject partialMockForObject:[UIApplication sharedApplication]]; - [[[application stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", returnURLScheme)]; - - [[client expect] postAnalyticsEvent:@"ios.paypal-otc.preflight.invalid-return-url-scheme"]; - - NSError *error; - BOOL isAvailable = [BTPayPalDriver verifyAppSwitchConfigurationForClient:client returnURLScheme:returnURLScheme error:&error]; - expect(isAvailable).to.beFalsy(); - expect(error).notTo.beNil(); - - }); - - it(@"returns NO when the return URL scheme has not been registered with UIApplication", ^{ - - id configuration = [OCMockObject mockForClass:[BTConfiguration class]]; - [[[configuration stub] andReturnValue:@YES] payPalEnabled]; - - [[[configuration stub] andReturn:@"offline"] payPalEnvironment]; - [[[configuration stub] andReturn:@"client-id"] payPalClientId]; - - id clientToken = [OCMockObject mockForClass:[BTClientToken class]]; - [[[clientToken stub] andReturn:@"client-token"] originalValue]; - - id client = [OCMockObject mockForClass:[BTClient class]]; - [[[client stub] andReturn:client] copyWithMetadata:OCMOCK_ANY]; - [[[client stub] andReturn:clientToken] clientToken]; - [[[client stub] andReturn:configuration] configuration]; - - NSString *returnURLScheme = @"com.braintreepayments.Braintree-Demo.bt-payments"; - - id bundle = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[bundle stub] andReturn:@[@{ @"CFBundleURLSchemes": @[returnURLScheme] }]] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - - [[client expect] postAnalyticsEvent:@"ios.paypal-otc.preflight.invalid-return-url-scheme"]; - - NSError *error; - BOOL isAvailable = [BTPayPalDriver verifyAppSwitchConfigurationForClient:client returnURLScheme:returnURLScheme error:&error]; - expect(isAvailable).to.beFalsy(); - expect(error).notTo.beNil(); - - }); - }); - - }); - - describe(@"classifying app switch returns", ^{ - - afterEach(^{ - // Reset state of BTPayPalDriver after each test (execute BTPayPalHandleURLContinuation if set) - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:@""]]; - }); - - it(@"accepts return URLs from the browser", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC. - // Pretend that no wallet is installed. - [[[mockApplication stub] andReturnValue:@NO] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v1")]; - [[[mockApplication stub] andReturnValue:@NO] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v1")]; - [[[mockApplication stub] andReturnValue:@NO] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@NO] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.payments://onetouch/v1/success?payloadEnc=e0yvzQHOOoXyoLjKZvHBI0Rbyad6usxhOz22CjG3V1lOsguMRsuQpEqPxlIlK86VPmTuagb1jJcnDUK9QsWJE8ffe4i9Ms4ggd6r5EoymVM%2BAYgjyjaYtPPOxIgMepNGnvnYt9EKJs2Bd0wbZj0ekxSA6BzRZDPEpZ%2FjhssxJVscjbPvOwCoTnjEhuNxiOamAGSRd6fo7ln%2BishDwRCLz81qlV8cgfXNzlHrRw1P7CbTQ8XhNGn35CHD64ysuHAW97ZjAzPCRdikWbgiw2S%2BDvSePhRRnTR10e2NPDYBeVzGQFzvf6WRklrqcLeFwRcAqoa0ZneOPgMbk5nvylGY716caCCPtJKnoJAflZZK6%2F7iXcA%2F3p9qrQIrszmthu%2FbnA%2FP7dZsWRarUiT%2FZhZg32MsmV3B3fPjQOMbhB7dRv5uomhCjhNhPzXH7nFA54mKOlvAdTm1QOk5P%2Fh3AaHz0qwIKgXAhxIfwxqHgIYxtba53sdwa7OXfx14FRlcfPngrR02IAHeaulkH6vJ24ZAsoUUdNkvRfDmM1O2%2B4424%2FMINTUJJsR0%2FwrYrwzp0gC6fKoAzT%2FgFhL6QVLoUss%3D&payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IkMwQTkwODQ1LTJBRUQtNEZCRC04NzIwLTQzNUU2MkRGNjhFNCIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJsaXZlIiwiZXJyb3IiOm51bGx9&x-source=com.braintree.browserswitch"]; - NSString *source = @"com.apple.mobilesafari"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beTruthy(); - - [mockApplication verify]; - }]; - - }); - - it(@"accepts return URLs from the app", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Braintree-Demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - NSString *source = @"com.paypal.ppclient.touch.v1"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beTruthy(); - - source = @"com.paypal.ppclient.touch.v2"; - - canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beTruthy(); - - [mockApplication verify]; - }]; - - }); - - it(@"rejects return URLs that did not come from browser or app", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Braintree-Demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - NSString *source = @"com.something.else"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beFalsy(); - - [mockApplication verify]; - }]; - - }); - - it(@"rejects other malformed URLs", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - // This malformed returnURL is just missing payload - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Braintree-Demo.payments://onetouch/v1/success?x-source=com.paypal.ppclient.touch.v1-or-v2"]; - - NSString *source = @"com.paypal.ppclient.touch.v2"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beFalsy(); - - - [mockApplication verify]; - }]; - - }); - - it(@"rejects returns when there is no app switch in progress", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.Braintree-Demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - - NSString *source = @"com.paypal.ppclient.touch.v2"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beFalsy(); - - - [mockApplication verify]; - }]; - - }); - - it(@"ignores the case of the URL Scheme to account for Safari's habit of downcasing URL schemes", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.PaYmEnTs://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - NSString *source = @"com.paypal.ppclient.touch.v2"; - - BOOL canHandle = [BTPayPalDriver canHandleAppSwitchReturnURL:returnURL sourceApplication:source]; - expect(canHandle).to.beTruthy(); - - [mockApplication verify]; - }]; - }); - }); - - describe(@"handling app switch returns", ^{ - - afterEach(^{ - // Reset state of BTPayPalDriver after each test (execute BTPayPalHandleURLContinuation if set) - [BTPayPalDriver handleAppSwitchReturnURL:[NSURL URLWithString:@""]]; - }); - - it(@"ignores an irrelevant or malformed URL", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.PaYmEnTs://----malformed----"]; - - [[mockClient reject] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [BTPayPalDriver handleAppSwitchReturnURL:returnURL]; - - [mockClient verify]; - }]; - - }); - - it(@"accepts a success app switch return", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - - [[mockClient expect] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [BTPayPalDriver handleAppSwitchReturnURL:returnURL]; - - [mockClient verify]; - }]; - }); - - it(@"accepts a failure app switch return", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.PaYmEnTs://onetouch/v1/failure?error=some+message"]; - - XCTestExpectation *parseOtcExpectation = [self expectationWithDescription:@"Parse otc response"]; - - [PayPalOneTouchCore parseResponseURL:returnURL - completionBlock:^(PayPalOneTouchCoreResult *result) { - expect(result.type).to.equal(PayPalOneTouchResultTypeError); - [parseOtcExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - - - - }); - - it(@"accepts a cancelation app switch return", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - [payPalDriver startAuthorizationWithCompletion:nil]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.payments://onetouch/v1/cancel?payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IjQ1QUZEQkE3LUJEQTYtNDNEMi04MUY2LUY4REM1QjZEOTkzQSIsImVudmlyb25tZW50IjoibW9jayJ9&x-source=com.paypal.ppclient.touch.v2"]; - - XCTestExpectation *parseOtcExpectation = [self expectationWithDescription:@"Parse otc response"]; - - [PayPalOneTouchCore parseResponseURL:returnURL - completionBlock:^(PayPalOneTouchCoreResult *result) { - expect(result.type).to.equal(PayPalOneTouchResultTypeCancel); - [parseOtcExpectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - [mockClient verify]; - }]; - }); - - it(@"tokenizes a success response, returning the payment method nonce to the developer", ^{ - - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication) { - - id ppOtcMock = [OCMockObject mockForClass:[PayPalOneTouchCore class]]; - [[[ppOtcMock stub] andReturnValue:@YES] canParseURL:OCMOCK_ANY sourceApplication:OCMOCK_ANY]; - - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - XCTestExpectation *completionExpectation = [self expectationWithDescription:@"authorization completion callback"]; - [payPalDriver startAuthorizationWithCompletion:^(BTPayPalPaymentMethod *payPalPaymentMethod, NSError *error) { - NSLog(@"startAuthorizationWithCompletion %@ %@", payPalPaymentMethod, error); - [completionExpectation fulfill]; - }]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.payments://onetouch/v1/success?payloadEnc=IiRZ%2FKEnD6RQ8UeUmOFO8Ofh1RqQcWFycpO6pB9Yzl7fLb5szdaHanap7gwpmKsq4MJ2KGRJ0MzZBPvmoL%2BxkSH7%2FC%2F4WqeeVeGYvCpAvsPpkg%2BY8PID54FqVDpP1EXKS3Vx%2F6XmqbDplNLUUNzXZ4P%2FNcaXiEZXoHv6odjm7rxP3Ric%2Fsal9oiCDGDeFOAwTkiklA%2BA5nsASGopzrMHeIVBtcA01yae%2BDrgwPhHWNy6hffL2yVPVREtpVRBLrXK0jzn9IGUKMbBSMg%2F8BZ14ijhU%2F4cFlqi51NARQEFXMJcSba%2FscQTV1%2Fzj7D6B9W4pUYk9WY7eygmwMs%2BTYkTYnKRJjHTPWzMScdesYjj161c6DdWBFFtCVcanwvdk5rp1YCaElOmYV5WZSGKkSORCNMNKVKe8AkXMVO%2BPc41&payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6IkNCNkY1Q0IwLUY4NEYtNEZEMC1BNzQ1LTdCMDE0MDQ0OUQyRSIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXJyb3IiOm51bGx9&x-source=com.braintree.browserswitch"]; - - // We must call +[Braintree handleOpenURL:sourceApplication:] (not [BTPayPalDriver handleAppSwitchReturnURL:returnURL]) - // in order to test that the returnURL is passed through to BTPayPalDriver. - // This was a real bug that shipped in 4.0.0-pre2 and was fixed in 625ae947ee92561934dfb1a3a2bf387d8890b91f. - // Also, sourceApplication is verified by OTC. - [Braintree handleOpenURL:returnURL sourceApplication:@"com.apple.mobilesafari"]; - - // Note: -savePaypalAccount:clientMetadataID:success:failure: isn't actually called here. - - [self waitForExpectationsWithTimeout:5 handler:nil]; - - [mockClient verify]; - - [ppOtcMock stopMocking]; - }]; - }); - - it(@"returns tokenization failures to the developer", ^{ //Todo - }); - - it(@"returns a failure to the developer", ^{ //Todo - }); - - it(@"returns a cancelation to the developer", ^{ //Todo - }); - - it(@"rejects returns when there is no app switch in progress", ^{ - [BTPayPalDriverSpecHelper setupSpec:^(NSString *returnURLScheme, id mockClient, id mockApplication){ - [[mockClient stub] postAnalyticsEvent:OCMOCK_ANY]; - - // Both -canOpenURL: and -openURL: are checked by OTC - [[[mockApplication stub] andReturnValue:@YES] canOpenURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - [[[mockApplication stub] andReturnValue:@YES] openURL:HC_hasProperty(@"scheme", @"com.paypal.ppclient.touch.v2")]; - - __unused BTPayPalDriver *payPalDriver = [[BTPayPalDriver alloc] initWithClient:mockClient returnURLScheme:returnURLScheme]; - - NSURL *returnURL = [NSURL URLWithString:@"com.braintreepayments.braintree-demo.payments://onetouch/v1/success?payload=eyJ2ZXJzaW9uIjoyLCJhY2NvdW50X2NvdW50cnkiOiJVUyIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXhwaXJlc19pbiI6LTEsImRpc3BsYXlfbmFtZSI6Im1vY2tEaXNwbGF5TmFtZSIsInNjb3BlIjoiaHR0cHM6XC9cL3VyaS5wYXlwYWwuY29tXC9zZXJ2aWNlc1wvcGF5bWVudHNcL2Z1dHVyZXBheW1lbnRzIiwiZW1haWwiOiJtb2NrZW1haWxhZGRyZXNzQG1vY2suY29tIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoibW9ja1RoaXJkUGFydHlBdXRob3JpemF0aW9uQ29kZSJ9&x-source=com.paypal.ppclient.touch.v1-or-v2"]; - - [[mockClient reject] savePaypalAccount:OCMOCK_ANY clientMetadataID:OCMOCK_ANY success:OCMOCK_ANY failure:OCMOCK_ANY]; - - [BTPayPalDriver handleAppSwitchReturnURL:returnURL]; - - [mockClient verify]; - }]; - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Specs/BTClient+BTPayPalSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Specs/BTClient+BTPayPalSpec.m deleted file mode 100755 index ada230c6..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-PayPal-Specs/BTClient+BTPayPalSpec.m +++ /dev/null @@ -1,155 +0,0 @@ -#import "BTClientToken.h" -#import "BTClient+BTPayPal.h" -#import "PayPalMobile.h" -#import "BTErrors+BTPayPal.h" -#import "BTTestClientTokenFactory.h" -#import "BTConfiguration.h" -#import "BTClient+Offline.h" - -#import "BTClient_Internal.h" -#import "BTClientSpecHelper.h" - -SharedExamplesBegin(BTClient_BTPayPalSpec) - -sharedExamplesFor(@"a BTClient", ^(NSDictionary *data) { - - __block BOOL asyncClient = [data[@"asyncClient"] boolValue]; - __block NSMutableDictionary *mutableClaims; - - beforeEach(^{ - - NSDictionary *paypalClaims = @{ - BTConfigurationKeyPayPalMerchantName: @"PayPal Merchant", - BTConfigurationKeyPayPalMerchantPrivacyPolicyUrl: @"http://merchant.example.com/privacy", - BTConfigurationKeyPayPalMerchantUserAgreementUrl: @"http://merchant.example.com/tos", - BTConfigurationKeyPayPalClientId: @"PayPal-Test-Merchant-ClientId", - BTConfigurationKeyPayPalDirectBaseUrl: @"http://api.paypal.example.com" - }; - - NSDictionary *baseClaims = @{ - BTConfigurationKeyClientApiURL: @"http://gateway.example.com/client_api", - BTConfigurationKeyPayPalEnabled: @YES, - BTConfigurationKeyPayPal: [paypalClaims mutableCopy] }; - - - mutableClaims = [baseClaims mutableCopy]; - }); - - describe(@"btPayPal_preparePayPalMobileWithError", ^{ - - describe(@"in Live PayPal environment", ^{ - describe(@"btPayPal_payPalEnvironment", ^{ - it(@"returns PayPal mSDK notion of Live", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentLive; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - expect([client btPayPal_environment]).to.equal(PayPalEnvironmentProduction); - }); - }); - }); - - describe(@"with custom PayPal environment", ^{ - it(@"does not return an error with the valid set of claims", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentCustom; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSError *error; - BOOL success = [client btPayPal_preparePayPalMobileWithError:&error]; - expect(error).to.beNil(); - expect(success).to.beTruthy(); - }); - - it(@"returns an error if the client ID is present but the Base URL is missing", ^{ - mutableClaims[@"paypal"][@"directBaseUrl"] = [NSNull null]; - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentCustom; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSError *error; - BOOL success = [client btPayPal_preparePayPalMobileWithError:&error]; - expect(error.code).to.equal(BTMerchantIntegrationErrorPayPalConfiguration); - expect(error.userInfo).notTo.beNil(); - expect(success).to.beFalsy(); - }); - - it(@"returns an error if the PayPal Base URL is present but the client ID is missing", ^{ - mutableClaims[@"paypal"][@"clientId"] = [NSNull null]; - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentCustom; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSError *error; - [client btPayPal_preparePayPalMobileWithError:&error]; - expect(error.code).to.equal(BTMerchantIntegrationErrorPayPalConfiguration); - expect(error.userInfo).notTo.beNil(); - }); - - describe(@"btPayPal_payPalEnvironment", ^{ - it(@"returns a pretty custom environment name", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentCustom; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - expect([client btPayPal_environment]).to.equal(BTClientPayPalMobileEnvironmentName); - }); - }); - }); - - describe(@"when the environment is not production", ^{ - describe(@"if the merchant privacy policy URL, merchant agreement URL, merchant name, and client ID are missing", ^{ - it(@"does not return an error", ^{ - mutableClaims[@"paypal"][BTConfigurationKeyPayPalMerchantPrivacyPolicyUrl] = [NSNull null]; - mutableClaims[@"paypal"][BTConfigurationKeyPayPalMerchantUserAgreementUrl] = [NSNull null]; - mutableClaims[@"paypal"][BTConfigurationKeyPayPalMerchantName] = [NSNull null]; - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentCustom; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSError *error; - [client btPayPal_preparePayPalMobileWithError:&error]; - expect(error).to.beNil(); - }); - }); - - }); - }); - - describe(@"scopes", ^{ - it(@"includes email and future payments", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentLive; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSSet *scopes = [client btPayPal_scopes]; - expect(scopes).to.contain(@"email"); - expect(scopes).to.contain(@"https://uri.paypal.com/services/payments/futurepayments"); - }); - - it(@"does not contain address scope by default", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentLive; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - NSSet *scopes = [client btPayPal_scopes]; - expect(scopes).toNot.contain(@"address"); - }); - - it(@"includes additional scopes and default scopes (email and future payments)", ^{ - mutableClaims[@"paypal"][@"environment"] = BTConfigurationPayPalEnvironmentLive; - BTClient * client = [BTClientSpecHelper clientForTestCase:self withOverrides:mutableClaims async:asyncClient]; - client.additionalPayPalScopes = [NSSet setWithObjects:@"address", nil]; - NSSet *scopes = [client btPayPal_scopes]; - expect(scopes).to.contain(@"address"); - expect(scopes).to.contain(@"email"); - expect(scopes).to.contain(@"https://uri.paypal.com/services/payments/futurepayments"); - }); - - }); - -}); - -SharedExamplesEnd - -SpecBegin(DeprecatedBTClient) - -describe(@"shared initialization behavior", ^{ - NSDictionary* data = @{@"asyncClient": @NO}; - itShouldBehaveLike(@"a BTClient", data); -}); - -SpecEnd - -SpecBegin(AsyncBTClient) - -describe(@"shared initialization behavior", ^{ - NSDictionary* data = @{@"asyncClient": @YES}; - itShouldBehaveLike(@"a BTClient", data); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Specs/BTDropInErrorStateSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Specs/BTDropInErrorStateSpec.m deleted file mode 100755 index ada25e44..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-Specs/BTDropInErrorStateSpec.m +++ /dev/null @@ -1,109 +0,0 @@ -#import "BTDropInErrorState.h" -#import "BTErrors.h" -#import "BTUICardFormView.h" - -SpecBegin(BTDropInErrorState) - -describe(@"errorTitle", ^{ - it(@"returns an error title based on the NSError's top level error message", ^{ - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ - @"field": @"cvv", - @"message": @"CVV is required" } - ] - }]}; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTBraintreeAPIErrorDomain - code:BTCustomerInputErrorInvalid - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - expect(state.errorTitle).to.equal(@"Credit Card is Invalid"); - }); - - it(@"returns an error title based on the NSError's top level error message, even when there are no field errors associated", ^{ - NSDictionary *validationErrors = @{ @"error": @{ @"message": @"Everything is Invalid" } }; - - - - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTBraintreeAPIErrorDomain - code:BTCustomerInputErrorInvalid - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - expect(state.errorTitle).to.equal(@"Everything is Invalid"); - }); -}); - -describe(@"highlighted fields", ^{ - it(@"returns a set of fields with validation errors associated", ^{ - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ @"field": @"cvv", - @"message": @"CVV is required" }, - @{ @"field": @"billingAddress", - @"fieldErrors": @[@{ @"field": @"postalCode", - @"message": @"Postal Code is required" }], - }, - @{ @"field": @"number", - @"message": @"Number is required" }, - @{ @"field": @"expirationDate", - @"message": @"Expiration date is required" }, - ] - }]}; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTBraintreeAPIErrorDomain - code:BTCustomerInputErrorInvalid - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - expect(state.highlightedFields).to.haveCountOf(4); - expect(state.highlightedFields).to.contain(BTUICardFormFieldNumber);\ - expect(state.highlightedFields).to.contain(BTUICardFormFieldExpiration); - expect(state.highlightedFields).to.contain(BTUICardFormFieldCvv); - expect(state.highlightedFields).to.contain(BTUICardFormFieldPostalCode); - }); - - it(@"returns the empty set when no fields needs to be highlighted", ^{ - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ @"field": @"paymentMethodNonce", - @"message": @"Payment method nonces cannot be used to update an existing card." }, - ] - }]}; - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTBraintreeAPIErrorDomain - code:BTCustomerInputErrorInvalid - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - expect(state.highlightedFields).to.haveCountOf(0); - }); - - it(@"ignores unknown fields", ^{ - NSDictionary *validationErrors = @{@"error": @{ @"message": @"Everything is invalid" } }; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTBraintreeAPIErrorDomain - code:BTCustomerInputErrorInvalid - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - expect(state.highlightedFields).to.haveCountOf(0); - }); - -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUICardFormViewSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUICardFormViewSpec.m deleted file mode 100755 index 7c3d44e4..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUICardFormViewSpec.m +++ /dev/null @@ -1,208 +0,0 @@ -#import -#import "BTUICardType.h" -#import "BTUIFormField.h" -#import -#import -#import - -@interface BTUICardFormViewSpecCardEntryViewController : UIViewController -@property (nonatomic, strong) BTUICardFormView *cardFormView; -@end - -@implementation BTUICardFormViewSpecCardEntryViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.cardFormView = [[BTUICardFormView alloc] initWithFrame:self.view.frame]; - - [self.view addSubview:self.cardFormView]; - - [self.cardFormView autoPinEdgeToSuperviewMargin:ALEdgeLeading]; - [self.cardFormView autoPinEdgeToSuperviewMargin:ALEdgeTrailing]; - [self.cardFormView autoPinToTopLayoutGuideOfViewController:self withInset:10]; -} - -@end - -SpecBegin(BTUICardFormView) - -describe(@"Card Form", ^{ - describe(@"accepting and validating credit card details", ^{ - it(@"accepts a number, an expiry, a cvv and a postal code", ^{ - BTUICardFormViewSpecCardEntryViewController *viewController = [[BTUICardFormViewSpecCardEntryViewController alloc] init]; - - [system presentViewController:viewController]; - - [[tester usingTimeout:1] enterText:@"4111111111111111" intoViewWithAccessibilityLabel:@"Card Number"]; - [[tester usingTimeout:1] tapViewWithAccessibilityLabel:@"MM/YY"]; - [[tester usingTimeout:1] enterTextIntoCurrentFirstResponder:@"122018"]; - [[tester usingTimeout:1] enterText:@"100" intoViewWithAccessibilityLabel:@"CVV"]; - [[tester usingTimeout:1] enterText:@"60606" intoViewWithAccessibilityLabel:@"Postal Code"]; - - expect(viewController.cardFormView.valid).to.beTruthy(); - }); - }); - - describe(@"auto advancing", ^{ - it(@"auto advances from field to field", ^{ - [system presentViewController:[[BTUICardFormViewSpecCardEntryViewController alloc] init]]; - [[tester usingTimeout:1] tapViewWithAccessibilityLabel:@"Card Number"]; - [[tester usingTimeout:1] enterTextIntoCurrentFirstResponder:@"4111111111111111"]; - [[tester usingTimeout:1] waitForFirstResponderWithAccessibilityLabel:@"MM/YY"]; - }); - }); - - describe(@"retreat on backspace", ^{ - it(@"retreats on backspace and deletes one digit", ^{ - [system presentViewController:[[BTUICardFormViewSpecCardEntryViewController alloc] init]]; - [[tester usingTimeout:1] tapViewWithAccessibilityLabel:@"Card Number"]; - [[tester usingTimeout:1] enterTextIntoCurrentFirstResponder:@"4111111111111111"]; - [[tester usingTimeout:1] enterTextIntoCurrentFirstResponder:@"\b"]; - [[tester usingTimeout:1] waitForFirstResponderWithAccessibilityLabel:@"Card Number"]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"411111111111111" traits:0]; - }); - }); - - describe(@"setting the form programmatically", ^{ - __block BTUICardFormView *cardFormView; - - beforeEach(^{ - cardFormView = [[BTUICardFormView alloc] init]; - }); - - describe(@"card number field", ^{ - it(@"sets the field text", ^{ - cardFormView.number = @"411111"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"411111" traits:0]; - }); - - describe(@"number of digits", ^{ - context(@"unknown card type", ^{ - it(@"allows max digits", ^{ - NSString *cardNumber = [@"" stringByPaddingToLength:[BTUICardType maxNumberLength] withString:@"0" startingAtIndex:0]; - cardFormView.number = cardNumber; - [system presentView:cardFormView]; - [[[tester usingTimeout:1] usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:cardNumber traits:0]; - }); - - it(@"doesn't set field if max digits exceeded", ^{ - cardFormView.number = @"1234"; - cardFormView.number = [@"" stringByPaddingToLength:[BTUICardType maxNumberLength]+1 withString:@"0" startingAtIndex:0];; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"1234" traits:0]; - }); - }); - - context(@"known card type", ^{ - it(@"allows max digits", ^{ - cardFormView.number = @"4111111111111111"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"4111111111111111" traits:0]; - }); - - it(@"doesn't set field if max digits exceeded", ^{ - cardFormView.number = @"41111111111111111"; - cardFormView.number = @"1234"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"1234" traits:0]; - }); - }); - }); - - it(@"doesn't allow invalid characters", ^{ - cardFormView.number = @"1234"; - cardFormView.number = @"4111 1111-1111"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"Card Number" value:@"411111111111" traits:0]; - }); - }); - - describe(@"expiry field", ^{ - it(@"accepts a date and displays as valid", ^{ - NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; - dateComponents.month = 1; - dateComponents.year = 2016; - dateComponents.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - - NSDate *date = [dateComponents date]; - [cardFormView setExpirationDate:date]; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"01/2016"]; - - UIAccessibilityElement *element = [[[UIApplication sharedApplication] keyWindow] accessibilityElementWithLabel:@"01/2016"]; - BTUIFormField *expiryField = (BTUIFormField *)([UIAccessibilityElement viewContainingAccessibilityElement:element].superview.superview); - expect(expiryField.displayAsValid).to.beTruthy(); - }); - - it(@"accepts a well-formed invalid date and displays as invalid", ^{ - NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; - dateComponents.month = 2; - dateComponents.year = 2000; - dateComponents.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - - NSDate *date = [dateComponents date]; - [cardFormView setExpirationDate:date]; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"02/2000"]; - - UIAccessibilityElement *element = [[[UIApplication sharedApplication] keyWindow] accessibilityElementWithLabel:@"02/2000"]; - BTUIFormField *expiryField = (BTUIFormField *)([UIAccessibilityElement viewContainingAccessibilityElement:element].superview.superview); - expect(expiryField.displayAsValid).to.beFalsy(); - }); - - it(@"can be set when visible", ^{ - NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; - dateComponents.month = 1; - dateComponents.year = 2016; - dateComponents.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - NSDate *date = [dateComponents date]; - - [system presentView:cardFormView]; - [cardFormView setExpirationDate:date]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"01/2016"]; - }); - }); - - describe(@"CVV field", ^{ - it(@"accepts a CVV number", ^{ - cardFormView.cvv = @"123"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"123"]; - }); - - it(@"doesn't set field if max digits exceeded", ^{ - cardFormView.cvv = @"543"; - cardFormView.cvv = @"12345"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"543"]; - }); - }); - - describe(@"Postal code field", ^{ - it(@"accepts a zipcode number", ^{ - cardFormView.postalCode = @"12345"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"12345"]; - }); - - it(@"accepts a postal code string", ^{ - cardFormView.postalCode = @"WC2E 9RZ"; - [system presentView:cardFormView]; - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"WC2E 9RZ"]; - }); - - it(@"won't accept an alphanumeric string if alphanumericPostalCode is NO", ^{ - cardFormView.postalCode = @"123"; - cardFormView.alphaNumericPostalCode = NO; - cardFormView.postalCode = @"WC2E 9RZ"; - - [system presentView:cardFormView]; - - [[tester usingTimeout:1] waitForViewWithAccessibilityLabel:@"123"]; - }); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUITextFieldSpec.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUITextFieldSpec.m deleted file mode 100755 index dde57569..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Braintree-UI-Specs/BTUITextFieldSpec.m +++ /dev/null @@ -1,131 +0,0 @@ -#import "BTUITextField.h" -#import - -/// A custom mock outside of OCMock for spying on the BTUITextField text value at various -/// points in the editDelegate lifecycle -@interface BTUITextFieldSpecMockEditDelegate : NSObject -@property (copy, nonatomic) NSString *textAtTimeOfWillInsertText; -@property (copy, nonatomic) NSString *textAtTimeOfDidInsertText; -@property (copy, nonatomic) NSString *textAtTimeOfWillDeleteBackward; -@property (copy, nonatomic) NSString *textAtTimeOfDidDeleteBackward; -@end - -@implementation BTUITextFieldSpecMockEditDelegate - -- (void)textField:(BTUITextField *)textField willInsertText:(NSString *)text { - self.textAtTimeOfWillInsertText = textField.text; -} -- (void)textField:(BTUITextField *)textField didInsertText:(NSString *)text { - self.textAtTimeOfDidInsertText = textField.text; -} -- (void)textFieldWillDeleteBackward:(BTUITextField *)textField { - self.textAtTimeOfWillDeleteBackward = textField.text; -} -- (void)textFieldDidDeleteBackward:(BTUITextField *)textField originalText:(NSString *)originalText { - self.textAtTimeOfDidDeleteBackward = textField.text; -} - -@end - -SpecBegin(BTUITextField) - -describe(@"text field behavior", ^{ - it(@"can accept user input", ^{ - BTUITextField *textField = [[BTUITextField alloc] init]; - textField.backgroundColor = [UIColor whiteColor]; - textField.accessibilityLabel = @"Some Field"; - [system presentView:textField]; - // The text field's initial frame is based on the intrinsic size. We want the view to be - // big enough to see. - [textField autoSetDimension:ALDimensionWidth toSize:300]; - [textField autoSetDimension:ALDimensionHeight toSize:44]; - [tester tapViewWithAccessibilityLabel:@"Some Field"]; - [tester enterTextIntoCurrentFirstResponder:@"Hello, World!"]; - - expect(textField.text).to.equal(@"Hello, World!"); - }); -}); - -describe(@"editDelegate", ^{ - __block BTUITextField *textField; - __block BTUITextFieldSpecMockEditDelegate *editDelegate; - - beforeEach(^{ - editDelegate = OCMPartialMock([[BTUITextFieldSpecMockEditDelegate alloc] init]); - textField = [[BTUITextField alloc] init]; - textField.editDelegate = editDelegate; - textField.backgroundColor = [UIColor whiteColor]; - textField.text = @"Some text"; - textField.accessibilityLabel = @"Some Field"; - [system presentView:textField]; - [tester tapViewWithAccessibilityLabel:@"Some Field"]; - [tester waitForTimeInterval:2]; - }); - - describe(@"delegate method protocol", ^{ - it(@"textField:willInsertText: and textField:didInsertText: are called when user enters text", ^{ - [(OCMockObject *)editDelegate setExpectationOrderMatters:YES]; - OCMExpect([editDelegate textField:textField willInsertText:@"a"]).andForwardToRealObject(); - OCMExpect([editDelegate textField:textField didInsertText:@"a"]).andForwardToRealObject(); - - [tester enterTextIntoCurrentFirstResponder:@"a"]; - - OCMVerify(editDelegate); - // Note: the behavior of `insertText:` in iOS 9 is buggy. We have implemented - // a workaround that makes the card expiry field functional, but the workaround - // causes willInsertText to be called *after* the text has already been inserted. - if ([UIDevice currentDevice].systemVersion.intValue < 9) { - expect(editDelegate.textAtTimeOfWillInsertText).to.equal(@"Some text"); - } else { - expect(editDelegate.textAtTimeOfWillInsertText).to.equal(@"Some texta"); - } - expect(editDelegate.textAtTimeOfDidInsertText).to.equal(@"Some texta"); - }); - - it(@"textField:willDeleteBackward: and textField:didDeleteBackward:originalText: are called when user backspaces", ^{ - [(OCMockObject *)editDelegate setExpectationOrderMatters:YES]; - OCMExpect([editDelegate textFieldWillDeleteBackward:textField]).andForwardToRealObject(); - OCMExpect([editDelegate textFieldDidDeleteBackward:textField originalText:@"Some text"]).andForwardToRealObject(); - - [tester enterTextIntoCurrentFirstResponder:@"\b"]; - - OCMVerify(editDelegate); - expect(editDelegate.textAtTimeOfWillDeleteBackward).to.equal(@"Some text"); - expect(editDelegate.textAtTimeOfDidDeleteBackward).to.equal(@"Some tex"); - }); - - it(@"textField:willDeleteBackward: and textField:didDeleteBackward:originalText: are called when user backspaces beyond the first character", ^{ - textField.text = @"AB"; - - [(OCMockObject *)editDelegate setExpectationOrderMatters:YES]; - OCMExpect([editDelegate textFieldWillDeleteBackward:textField]).andForwardToRealObject(); - OCMExpect([editDelegate textFieldDidDeleteBackward:textField originalText:@"AB"]).andForwardToRealObject(); - - // Delete "B" - [tester enterTextIntoCurrentFirstResponder:@"\b"]; - - OCMVerify(editDelegate); - expect(editDelegate.textAtTimeOfWillDeleteBackward).to.equal(@"AB"); - - // Reduce likelihood of failure: expected: A, got: nil/null - [tester waitForTimeInterval:0.1]; - - expect(editDelegate.textAtTimeOfDidDeleteBackward).to.equal(@"A"); - - // Delete "A" - [tester enterTextIntoCurrentFirstResponder:@"\b"]; - - OCMExpect([editDelegate textFieldWillDeleteBackward:textField]).andForwardToRealObject(); - OCMExpect([editDelegate textFieldDidDeleteBackward:textField originalText:@""]).andForwardToRealObject(); - - // Backspace, nothing to delete - [tester enterTextIntoCurrentFirstResponder:@"\b"]; - - OCMVerify(editDelegate); - expect(editDelegate.textAtTimeOfWillDeleteBackward).to.equal(@""); - expect(editDelegate.textAtTimeOfDidDeleteBackward).to.equal(@""); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.h b/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.h deleted file mode 100755 index 817a8a49..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "KIFSystemTestActor.h" - -/// Provides convenience methods for presenting view controllers and views for KIF tests -@interface KIFSystemTestActor (BTViewPresentation) - -/// Present a view controller in the app -/// -/// @param viewController The view controller to show. Cannot be `nil`. -- (void)presentViewController:(UIViewController *)viewController; - -/// Present a view by adding it as a subview of a new view controller, then presenting the view controller -/// in the app. -/// -/// @param view The view to display. -- (void)presentView:(UIView *)view; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.m b/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.m deleted file mode 100755 index 7c6869c1..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/Specs/Shared Spec Utilities/KIFSystemTestActor+BTViewPresentation.m +++ /dev/null @@ -1,38 +0,0 @@ -#import "KIFSystemTestActor+BTViewPresentation.h" -#import - -@implementation KIFSystemTestActor (BTViewPresentation) - -- (void)presentViewController:(UIViewController *)viewController { - [self runBlock:^KIFTestStepResult(NSError **error) { - UIViewController *viewControllerToPresent = viewController; - KIFTestCondition(viewControllerToPresent != nil, error, @"Expected a view controller, but got nil"); - - UINavigationController *navigationController; - if ([viewControllerToPresent isKindOfClass:[UINavigationController class]]) { - navigationController = (UINavigationController *)viewControllerToPresent; - } else { - navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; - } - [UIApplication sharedApplication].keyWindow.rootViewController = navigationController; - - return KIFTestStepResultSuccess; - }]; -} - -- (void)presentView:(UIView *)view { - [self runBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - KIFTestCondition(view != nil, error, @"Expected a view, but got nil"); - - UIViewController *viewController = [[UIViewController alloc] init]; - [viewController.view addSubview:view]; - [view autoCenterInSuperview]; - [view autoMatchDimension:ALDimensionHeight toDimension:ALDimensionHeight ofView:viewController.view withOffset:0 relation:NSLayoutRelationLessThanOrEqual]; - [view autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:viewController.view withOffset:0 relation:NSLayoutRelationLessThanOrEqual]; - [self presentViewController:viewController]; - - return KIFTestStepResultSuccess; - }]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeDropInLegacy_UITests.swift b/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeDropInLegacy_UITests.swift deleted file mode 100755 index c6af02cd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeDropInLegacy_UITests.swift +++ /dev/null @@ -1,186 +0,0 @@ -/* - IMPORTANT - Hardware keyboard should be disabled on simulator for tests to run reliably. - */ - -import XCTest - -class BraintreeDropInLegacy_TokenizationKey_CardForm_UITests: XCTestCase { - - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-TokenizationKey") - app.launchArguments.append("-Integration:BraintreeDemoDropInLegacyViewController") - app.launch() - sleep(1) - self.waitForElementToBeHittable(app.buttons["Buy Now"]) - app.buttons["Buy Now"].tap() - - } - - func testDropInLegacy_cardInput_receivesNonce() { - - let elementsQuery = app.scrollViews.otherElements - let cardNumberTextField = elementsQuery.textFields["Card Number"] - let expiryTextField = elementsQuery.textFields["MM/YY"] - let postalCodeTextField = elementsQuery.textFields["Postal Code"] - let cvvTextField = elementsQuery.textFields["CVV"] - - self.waitForElementToBeHittable(cardNumberTextField) - - cardNumberTextField.forceTapElement() - cardNumberTextField.typeText("4111111111111111") - expiryTextField.typeText("1119") - - let postalCodeField = elementsQuery.textFields["Postal Code"] - self.waitForElementToBeHittable(postalCodeField) - postalCodeField.forceTapElement() - postalCodeField.typeText("12345") - - let securityCodeField = elementsQuery.textFields["CVV"] - self.waitForElementToBeHittable(securityCodeField) - securityCodeField.forceTapElement() - securityCodeField.typeText("123") - - elementsQuery.buttons["$19 - Subscribe Now"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Got a nonce. Tap to make a transaction."]) - - XCTAssertTrue(app.buttons["Got a nonce. Tap to make a transaction."].exists); - } - - func testDropInLegacy_cardInput_showsInvalidState_withInvalidCardNumber() { - - let elementsQuery = app.scrollViews.otherElements - let cardNumberTextField = elementsQuery.textFields["Card Number"] - - self.waitForElementToBeHittable(cardNumberTextField) - - cardNumberTextField.forceTapElement() - cardNumberTextField.typeText("4141414141414141") - - self.waitForElementToAppear(elementsQuery.textFields["Invalid: Card Number"]) - } - - func testDropInLegacy_cardInput_showsInvalidState_withInvalidExpirationDate() { - - let elementsQuery = app.scrollViews.otherElements - let expiryTextField = elementsQuery.textFields["MM/YY"] - self.waitForElementToBeHittable(expiryTextField) - - expiryTextField.forceTapElement() - expiryTextField.typeText("1111") - - self.waitForElementToAppear(elementsQuery.textFields["Invalid: MM/YY"]) - } - - func testDropInLegacy_cardInput_hidesInvalidCardNumberState_withDeletion() { - - let elementsQuery = app.scrollViews.otherElements - let cardNumberTextField = elementsQuery.textFields["Card Number"] - self.waitForElementToBeHittable(cardNumberTextField) - - cardNumberTextField.forceTapElement() - cardNumberTextField.typeText("4141414141414141") - - self.waitForElementToAppear(elementsQuery.textFields["Invalid: Card Number"]) - - cardNumberTextField.typeText("\u{8}") - - XCTAssertFalse(elementsQuery.textFields["Invalid: Card Number"].exists); - } - - func testDropInLegacy_cardInput_hidesInvalidExpirationState_withDeletion() { - - let elementsQuery = app.scrollViews.otherElements - let expirationField = elementsQuery.textFields["MM/YY"] - self.waitForElementToBeHittable(expirationField) - - expirationField.forceTapElement() - expirationField.typeText("1111") - - self.waitForElementToAppear(elementsQuery.textFields["Invalid: MM/YY"]) - - expirationField.typeText("\u{8}") - - XCTAssertFalse(elementsQuery.textFields["Invalid: MM/YY"].exists); - } -} - -class BraintreeDropInLegacy_ClientToken_CardForm_UITests: XCTestCase { - - // var app: XCUIApplication! - // - // override func setUp() { - // super.setUp() - // continueAfterFailure = false - // app = XCUIApplication() - // app.launchArguments.append("-EnvironmentSandbox") - // app.launchArguments.append("-ClientToken") - // app.launchArguments.append("-Integration:BraintreeDemoDropInLegacyViewController") - // app.launch() - // self.waitForElementToAppear(app.buttons["Buy Now"]) - // app.buttons["Buy Now"].forceTapElement() - // } - // - // // This test card number is now valid - // // Is this related to Union Pay? - // func pendDropInLegacy_cardInput_displaysErrorForFailedValidation() { - // - // let elementsQuery = app.scrollViews.otherElements - // let cardNumberTextField = elementsQuery.textFields["Card Number"] - // let expirationField = elementsQuery.textFields["MM/YY"] - // - // cardNumberTextField.forceTapElement() - // cardNumberTextField.typeText("5105105105105100") - // expirationField.typeText("1119") - // - // elementsQuery.buttons["$19 - Subscribe Now"].forceTapElement() - // - // self.waitForElementToAppear(app.alerts.staticTexts["Credit card verification failed"]) - // - // XCTAssertTrue(app.alerts.staticTexts["Credit card verification failed"].exists); - // } -} - - -class BraintreeDropInLegacy_PayPal_UITests: XCTestCase { - - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-TokenizationKey") - app.launchArguments.append("-Integration:BraintreeDemoDropInLegacyViewController") - app.launch() - sleep(1) - self.waitForElementToBeHittable(app.buttons["Buy Now"]) - app.buttons["Buy Now"].forceTapElement() - } - - func testDropInLegacy_paypal_receivesNonce() { - - let elementsQuery = app.collectionViews["Payment Options"].cells - let paypalButton = elementsQuery.element(boundBy: 0) - paypalButton.forceTapElement() - sleep(3) - - let webviewElementsQuery = app.webViews.element.otherElements - - self.waitForElementToBeHittable(webviewElementsQuery.links["Proceed with Sandbox Purchase"]) - - webviewElementsQuery.links["Proceed with Sandbox Purchase"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Got a nonce. Tap to make a transaction."]) - - XCTAssertTrue(app.buttons["Got a nonce. Tap to make a transaction."].exists); - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreePayPal_UITests.swift b/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreePayPal_UITests.swift deleted file mode 100755 index ff4f8575..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreePayPal_UITests.swift +++ /dev/null @@ -1,160 +0,0 @@ -/* - IMPORTRANT - Hardware keyboard should be disabled on simulator for tests to run reliably. - */ - -import XCTest - -class BraintreePayPal_FuturePayment_UITests: XCTestCase { - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-TokenizationKey") - app.launchArguments.append("-Integration:BraintreeDemoPayPalForceFuturePaymentViewController") - app.launch() - sleep(1) - self.waitForElementToBeHittable(app.buttons["PayPal (future payment button)"]) - app.buttons["PayPal (future payment button)"].tap() - sleep(2) - } - - func testPayPal_futurePayment_receivesNonce() { - let webviewElementsQuery = app.webViews.element.otherElements - let emailTextField = webviewElementsQuery.textFields["Email"] - - self.waitForElementToAppear(emailTextField) - emailTextField.forceTapElement() - emailTextField.typeText("test@paypal.com") - - let passwordTextField = webviewElementsQuery.secureTextFields["Password"] - passwordTextField.forceTapElement() - passwordTextField.typeText("1234") - - webviewElementsQuery.buttons["Log In"].forceTapElement() - - self.waitForElementToAppear(webviewElementsQuery.buttons["Agree"]) - - webviewElementsQuery.buttons["Agree"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Got a nonce. Tap to make a transaction."]) - - XCTAssertTrue(app.buttons["Got a nonce. Tap to make a transaction."].exists); - } - - func testPayPal_futurePayment_cancelsSuccessfully() { - let webviewElementsQuery = app.webViews.element.otherElements - let emailTextField = webviewElementsQuery.textFields["Email"] - - self.waitForElementToAppear(emailTextField) - - // Close button has no accessibility helper - // Purposely don't use the webviewElementsQuery variable - // Reevaluate the elements query after the page load to get the close button - app.webViews.buttons.element(boundBy: 0).forceTapElement() - - self.waitForElementToAppear(app.buttons["PayPal (future payment button)"]) - - XCTAssertTrue(app.buttons["Canceled 🔰"].exists); - } -} - -class BraintreePayPal_SinglePayment_UITests: XCTestCase { - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-TokenizationKey") - app.launchArguments.append("-Integration:BraintreeDemoPayPalOneTimePaymentViewController") - app.launch() - sleep(1) - self.waitForElementToBeHittable(app.buttons["PayPal one-time payment"]) - app.buttons["PayPal one-time payment"].tap() - sleep(2) - } - - func testPayPal_singlePayment_receivesNonce() { - let webviewElementsQuery = app.webViews.element.otherElements - - self.waitForElementToAppear(webviewElementsQuery.links["Proceed with Sandbox Purchase"]) - - webviewElementsQuery.links["Proceed with Sandbox Purchase"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Got a nonce. Tap to make a transaction."]) - - XCTAssertTrue(app.buttons["Got a nonce. Tap to make a transaction."].exists); - } - - func testPayPal_singlePayment_cancelsSuccessfully() { - let webviewElementsQuery = app.webViews.element.otherElements - - self.waitForElementToAppear(webviewElementsQuery.links["Cancel Sandbox Purchase"]) - - webviewElementsQuery.links["Cancel Sandbox Purchase"].forceTapElement() - - self.waitForElementToAppear(app.buttons["PayPal one-time payment"]) - - XCTAssertTrue(app.buttons["Cancelled"].exists); - } -} - -class BraintreePayPal_BillingAgreement_UITests: XCTestCase { - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-TokenizationKey") - app.launchArguments.append("-Integration:BraintreeDemoPayPalBillingAgreementViewController") - app.launch() - sleep(1) - self.waitForElementToBeHittable(app.buttons["Billing Agreement with PayPal"]) - app.buttons["Billing Agreement with PayPal"].tap() - sleep(2) - } - - func testPayPal_billingAgreement_receivesNonce() { - let webviewElementsQuery = app.webViews.element.otherElements - - self.waitForElementToAppear(webviewElementsQuery.links["Proceed with Sandbox Purchase"]) - - webviewElementsQuery.links["Proceed with Sandbox Purchase"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Got a nonce. Tap to make a transaction."]) - - XCTAssertTrue(app.textViews["DismissalOfViewController Called"].exists); - XCTAssertTrue(app.buttons["Got a nonce. Tap to make a transaction."].exists); - } - - func testPayPal_billingAgreement_cancelsSuccessfully() { - let webviewElementsQuery = app.webViews.element.otherElements - - self.waitForElementToAppear(webviewElementsQuery.links["Cancel Sandbox Purchase"]) - - webviewElementsQuery.links["Cancel Sandbox Purchase"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Billing Agreement with PayPal"]) - - XCTAssertTrue(app.textViews["DismissalOfViewController Called"].exists); - XCTAssertTrue(app.buttons["Cancelled"].exists); - } - - func testPayPal_billingAgreement_cancelsSuccessfully_whenTappingSFSafariViewControllerDoneButton() { - self.waitForElementToAppear(app.buttons["Done"]) - - app.buttons["Done"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Billing Agreement with PayPal"]) - - XCTAssertTrue(app.textViews["DismissalOfViewController Called"].exists); - XCTAssertTrue(app.buttons["Cancelled"].exists); - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeThreeDSecure_UITests.swift b/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeThreeDSecure_UITests.swift deleted file mode 100755 index 4de73a20..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UITests/BraintreeThreeDSecure_UITests.swift +++ /dev/null @@ -1,265 +0,0 @@ -/* - IMPORTRANT - Hardware keyboard should be disabled on simulator for tests to run reliably. - */ - -import XCTest - -class BraintreeThreeDSecure_UITests: XCTestCase { - var app: XCUIApplication! - - override func setUp() { - super.setUp() - continueAfterFailure = false - app = XCUIApplication() - app.launchArguments.append("-EnvironmentSandbox") - app.launchArguments.append("-ClientToken") - app.launchArguments.append("-Integration:BraintreeDemoThreeDSecureViewController") - self.app.launch() - sleep(1) - self.waitForElementToBeHittable(app.textFields["Card Number"]) - sleep(2) - } - - func testThreeDSecure_completesAuthentication_receivesNonce() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000002") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - let elementsQuery = app.otherElements["Authentication"] - let passwordTextField = elementsQuery.children(matching: .other).children(matching: .secureTextField).element - - passwordTextField.tap() - sleep(1) - passwordTextField.typeText("1234") - - elementsQuery.buttons["Submit"].tap() - - self.waitForElementToAppear(app.buttons["Liability shift possible and liability shifted"]) - - XCTAssertTrue(app.buttons["Liability shift possible and liability shifted"].exists); - } - - func testThreeDSecure_failsAuthentication() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000010") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - let elementsQuery = app.otherElements["Authentication"] - let passwordTextField = elementsQuery.children(matching: .other).children(matching: .secureTextField).element - - passwordTextField.tap() - sleep(1) - passwordTextField.typeText("1234") - - elementsQuery.buttons["Submit"].tap() - - self.waitForElementToAppear(app.buttons["Failed to authenticate, please try a different form of payment."]) - - XCTAssertTrue(app.buttons["Failed to authenticate, please try a different form of payment."].exists); - } - - func testThreeDSecure_bypassesAuthentication_notEnrolled() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000051") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - - func testThreeDSecure_bypassesAuthentication_lookupFailed() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000077") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - - func testThreeDSecure_incorrectPassword_callsBackWithError_exactlyOnce() { - let app = XCUIApplication() - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000028") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - let elementsQuery = app.otherElements["Authentication"] - let passwordTextField = elementsQuery.children(matching: .other).children(matching: .secureTextField).element - - passwordTextField.tap() - sleep(1) - passwordTextField.typeText("1234") - - elementsQuery.buttons["Submit"].tap() - - self.waitForElementToAppear(app.buttons["Failed to authenticate, please try a different form of payment."]) - - XCTAssertTrue(app.buttons["Failed to authenticate, please try a different form of payment."].exists); - - sleep(2) - - self.waitForElementToAppear(app.staticTexts["Callback Count: 1"]) - - XCTAssertTrue(app.staticTexts["Callback Count: 1"].exists); - } - - func testThreeDSecure_passiveAuthentication_notPromptedForAuthentication() { - let app = XCUIApplication() - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000101") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["Liability shift possible and liability shifted"]) - - XCTAssertTrue(app.buttons["Liability shift possible and liability shifted"].exists); - } - - func testThreeDSecure_returnsNonce_whenIssuerDown() { - let app = XCUIApplication() - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000036") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - let elementsQuery = app.otherElements["Authentication"] - let passwordTextField = elementsQuery.children(matching: .other).children(matching: .secureTextField).element - - passwordTextField.tap() - sleep(1) - passwordTextField.typeText("1234") - - elementsQuery.buttons["Submit"].tap() - - - self.waitForElementToAppear(app.buttons["An unexpected error occurred"]) - - XCTAssertTrue(app.buttons["An unexpected error occurred"].exists); - } - - func testThreeDSecure_acceptsPassword_failsToAuthenticateNonce_dueToCardinalError() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000093") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - let elementsQuery = app.otherElements["Authentication"] - let passwordTextField = elementsQuery.children(matching: .other).children(matching: .secureTextField).element - - passwordTextField.tap() - sleep(1) - passwordTextField.typeText("1234") - - elementsQuery.buttons["Submit"].tap() - - self.waitForElementToAppear(app.buttons["An unexpected error occurred"]) - - XCTAssertTrue(app.buttons["An unexpected error occurred"].exists); - } - - func testThreeDSecure_returnsToApp_whenCancelTapped() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000002") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.navigationBars["Authentication"]) - - app.navigationBars["Authentication"].buttons["Cancel"].forceTapElement() - - self.waitForElementToAppear(app.buttons["Cancelled🎲"]) - - XCTAssertTrue(app.buttons["Cancelled🎲"].exists); - } - - func testThreeDSecure_bypassedAuthentication() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000990000000004") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - - func testThreeDSecure_lookupError() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000085") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - - func testThreeDSecure_unavailable() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000069") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(2) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - - func testThreeDSecure_timeout() { - self.waitForElementToAppear(app.textFields["Card Number"]) - let cardNumberTextField = app.textFields["Card Number"] - cardNumberTextField.tap() - cardNumberTextField.typeText("4000000000000044") - app.textFields["MM/YY"].typeText("012020") - app.buttons["Tokenize and Verify New Card"].tap() - sleep(5) - - self.waitForElementToAppear(app.buttons["3D Secure authentication was attempted but liability shift is not possible"]) - - XCTAssertTrue(app.buttons["3D Secure authentication was attempted but liability shift is not possible"].exists); - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UITests/Helpers/BTUITest.swift b/examples/braintree/ios/Frameworks/Braintree/UITests/Helpers/BTUITest.swift deleted file mode 100755 index fb1e8088..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UITests/Helpers/BTUITest.swift +++ /dev/null @@ -1,42 +0,0 @@ -import XCTest - -extension XCTestCase { - func waitForElementToAppear(_ element: XCUIElement, timeout: TimeInterval = 10, file: String = #file, line: UInt = #line) { - let existsPredicate = NSPredicate(format: "exists == true") - - expectation(for: existsPredicate, - evaluatedWith: element, handler: nil) - - waitForExpectations(timeout: timeout) { (error) -> Void in - if (error != nil) { - let message = "Failed to find \(element) after \(timeout) seconds." - self.recordFailure(withDescription: message, inFile: file, atLine: line, expected: true) - } - } - } - - func waitForElementToBeHittable(_ element: XCUIElement, timeout: TimeInterval = 10, file: String = #file, line: UInt = #line) { - let existsPredicate = NSPredicate(format: "exists == true && hittable == true") - - expectation(for: existsPredicate, - evaluatedWith: element, handler: nil) - - waitForExpectations(timeout: timeout) { (error) -> Void in - if (error != nil) { - let message = "Failed to find \(element) after \(timeout) seconds." - self.recordFailure(withDescription: message, inFile: file, atLine: line, expected: true) - } - } - } -} - -extension XCUIElement { - func forceTapElement() { - if self.isHittable { - self.tap() - } else { - let coordinate: XCUICoordinate = self.coordinate(withNormalizedOffset: CGVector(dx: 0.0, dy: 0.0)) - coordinate.tap() - } - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UITests/Info.plist b/examples/braintree/ios/Frameworks/Braintree/UITests/Info.plist deleted file mode 100755 index ba72822e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UITests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_SwiftTests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_SwiftTests.swift deleted file mode 100755 index 56c6af13..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_SwiftTests.swift +++ /dev/null @@ -1,248 +0,0 @@ -import XCTest - -class BTAPIClient_SwiftTests: XCTestCase { - - // MARK: - Initialization - - func testAPIClientInitialization_withValidTokenizationKey_returnsClientWithTokenizationKey() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - XCTAssertEqual(apiClient.tokenizationKey, "development_testing_integration_merchant_id") - } - - func testAPIClientInitialization_withInvalidTokenizationKey_returnsNil() { - XCTAssertNil(BTAPIClient(authorization: "invalid")) - } - - func testAPIClientInitialization_withEmptyTokenizationKey_returnsNil() { - XCTAssertNil(BTAPIClient(authorization: "")) - } - - func testAPIClientInitialization_withValidClientToken_returnsClientWithClientToken() { - let clientToken = BTTestClientTokenFactory.token(withVersion: 2) - let apiClient = BTAPIClient(authorization: clientToken!) - XCTAssertEqual(apiClient?.clientToken?.originalValue, clientToken) - } - - func testAPIClientInitialization_withVersionThreeClientToken_returnsClientWithClientToken() { - let clientToken = BTTestClientTokenFactory.token(withVersion: 3) - let apiClient = BTAPIClient(authorization: clientToken!) - XCTAssertEqual(apiClient?.clientToken?.originalValue, clientToken) - } - - func testAPIClientInitialization_withValidClientToken_performanceMeetsExpectations() { - let clientToken = BTTestClientTokenFactory.token(withVersion: 2) - self.measure() { - _ = BTAPIClient(authorization: clientToken!) - } - } - - // MARK: - Copy - - func testCopyWithSource_whenUsingClientToken_usesSameClientToken() { - let clientToken = BTTestClientTokenFactory.token(withVersion: 2) - let apiClient = BTAPIClient(authorization: clientToken!) - - let copiedApiClient = apiClient?.copy(with: .unknown, integration: .unknown) - - XCTAssertEqual(copiedApiClient?.clientToken?.originalValue, clientToken) - } - - func testCopyWithSource_whenUsingTokenizationKey_usesSameTokenizationKey() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id") - let copiedApiClient = apiClient?.copy(with: .unknown, integration: .unknown) - XCTAssertEqual(copiedApiClient?.tokenizationKey, "development_testing_integration_merchant_id") - } - - func testCopyWithSource_setsMetadataSourceAndIntegration() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id") - let copiedApiClient = apiClient?.copy(with: .payPalBrowser, integration: .dropIn) - XCTAssertEqual(copiedApiClient?.metadata.source, .payPalBrowser) - XCTAssertEqual(copiedApiClient?.metadata.integration, .dropIn) - } - - func testCopyWithSource_copiesHTTP() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id") - let copiedApiClient = apiClient?.copy(with: .payPalBrowser, integration: .dropIn) - XCTAssertTrue(copiedApiClient !== apiClient) - } - - // MARK: - fetchOrReturnRemoteConfiguration - - func testFetchOrReturnRemoteConfiguration_performsGETWithCorrectPayload() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id", sendAnalyticsEvent: false)! - let mockHTTP = BTFakeHTTP()! - mockHTTP.stubRequest("GET", toEndpoint: "/v1/configuration", respondWith: [], statusCode: 200) - apiClient.configurationHTTP = mockHTTP - - let expectation = self.expectation(description: "Callback invoked") - apiClient.fetchOrReturnRemoteConfiguration() { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/configuration") - XCTAssertEqual(mockHTTP.lastRequestParameters?["configVersion"] as? String, "3") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - // MARK: - fetchPaymentMethods - - func testFetchPaymentMethods_performsGETWithCorrectParameter() { - let apiClient = BTAPIClient(authorization: BTValidTestClientToken, sendAnalyticsEvent: false)! - let mockHTTP = BTFakeHTTP()! - mockHTTP.stubRequest("GET", toEndpoint: "/client_api/v1/payment_methods", respondWith: [], statusCode: 200) - apiClient.http = mockHTTP - - var expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces() { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertFalse(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - XCTAssertEqual(mockHTTP.lastRequestParameters!["session_id"] as? String, apiClient.metadata.sessionId) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - - expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces(true) { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertTrue(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - - expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces(false) { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertFalse(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchPaymentMethods_returnsPaymentMethodNonces() { - let apiClient = BTAPIClient(authorization: BTValidTestClientToken, sendAnalyticsEvent: false)! - let stubHTTP = BTFakeHTTP()! - let stubbedResponse = [ - "paymentMethods": [ - [ - "default" : true, - "description": "ending in 05", - "details": [ - "cardType": "American Express", - "lastTwo": "05" - ], - "nonce": "fake-nonce", - "type": "CreditCard" - ], - [ - "default" : false, - "description": "jane.doe@example.com", - "details": [], - "nonce": "fake-nonce", - "type": "PayPalAccount" - ] - ] ] - stubHTTP.stubRequest("GET", toEndpoint: "/client_api/v1/payment_methods", respondWith: stubbedResponse, statusCode: 200) - apiClient.http = stubHTTP - - let expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces() { (paymentMethodNonces, error) in - guard let paymentMethodNonces = paymentMethodNonces else { - XCTFail() - return - } - - XCTAssertNil(error) - XCTAssertEqual(paymentMethodNonces.count, 2) - - guard let cardNonce = paymentMethodNonces[0] as? BTCardNonce else { - XCTFail() - return - } - guard let paypalNonce = paymentMethodNonces[1] as? BTPayPalAccountNonce else { - XCTFail() - return - } - - XCTAssertEqual(cardNonce.nonce, "fake-nonce") - XCTAssertEqual(cardNonce.localizedDescription, "ending in 05") - XCTAssertEqual(cardNonce.lastTwo, "05") - XCTAssertTrue(cardNonce.cardNetwork == BTCardNetwork.AMEX) - XCTAssertTrue(cardNonce.isDefault) - - XCTAssertEqual(paypalNonce.nonce, "fake-nonce") - XCTAssertEqual(paypalNonce.localizedDescription, "jane.doe@example.com") - XCTAssertFalse(paypalNonce.isDefault) - - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchPaymentMethods_withTokenizationKey_returnsError() { - let apiClient = BTAPIClient(authorization: "development_tokenization_key", sendAnalyticsEvent: false)! - - let expectation = self.expectation(description: "Error returned") - apiClient.fetchPaymentMethodNonces() { (paymentMethodNonces, error) -> Void in - XCTAssertNil(paymentMethodNonces); - guard let error = error as? NSError else {return} - XCTAssertEqual(error._domain, BTAPIClientErrorDomain); - XCTAssertEqual(error._code, BTAPIClientErrorType.notAuthorized.rawValue); - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - // MARK: - V3 Client Token - - func testFetchPaymentMethods_performsGETWithCorrectParameter_withVersionThreeClientToken() { - let clientToken = BTTestClientTokenFactory.token(withVersion: 3) - let apiClient = BTAPIClient(authorization: clientToken!, sendAnalyticsEvent: false)! - let mockHTTP = BTFakeHTTP()! - mockHTTP.stubRequest("GET", toEndpoint: "/client_api/v1/payment_methods", respondWith: [], statusCode: 200) - apiClient.http = mockHTTP - - XCTAssertEqual((apiClient.clientToken!.json["version"] as! BTJSON).asIntegerOrZero(), 3) - - var expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces() { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertFalse(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - XCTAssertEqual(mockHTTP.lastRequestParameters!["session_id"] as? String, apiClient.metadata.sessionId) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - - expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces(true) { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertTrue(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - - expectation = self.expectation(description: "Callback invoked") - apiClient.fetchPaymentMethodNonces(false) { _ in - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods") - XCTAssertFalse(mockHTTP.lastRequestParameters!["default_first"] as! Bool) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - // MARK: - Analytics - - func testAnalyticsService_byDefault_isASingleton() { - let firstAPIClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let secondAPIClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - XCTAssertTrue(firstAPIClient.analyticsService === secondAPIClient.analyticsService) - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_Tests.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_Tests.m deleted file mode 100755 index 1d770fd7..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAPIClient_Tests.m +++ /dev/null @@ -1,362 +0,0 @@ -#import -#import -#import -#import -#import -#import "BTAnalyticsService.h" -#import "BTAPIClient_Internal.h" -#import "BTFakeHTTP.h" -#import "BTHTTP.h" -#import "BTHTTPTestProtocol.h" -#import "BTSpecHelper.h" - -@interface StubBTClientMetadata : BTClientMetadata -@property (nonatomic, assign) BTClientMetadataIntegrationType integration; -@property (nonatomic, assign) BTClientMetadataSourceType source; -@property (nonatomic, copy) NSString *sessionId; -@end - -@implementation StubBTClientMetadata -@synthesize integration = _integration; -@synthesize source = _source; -@synthesize sessionId = _sessionId; -@end - -@interface BTFakeAnalyticsService : BTAnalyticsService -@property (nonatomic, copy) NSString *lastEvent; -@end - -@implementation BTFakeAnalyticsService - -- (void)sendAnalyticsEvent:(NSString *)eventKind { - self.lastEvent = eventKind; -} - -- (void)sendAnalyticsEvent:(NSString *)eventKind completion:(__unused void (^)(NSError *))completionBlock { - self.lastEvent = eventKind; -} - -@end - -@interface BTAPIClient_Tests : XCTestCase -@end - -@implementation BTAPIClient_Tests - -#pragma mark - Initialization - -- (void)testInitialization_withValidTokenizationKey_setsTokenizationKey { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - XCTAssertEqualObjects(apiClient.tokenizationKey, @"development_tokenization_key"); -} - -- (void)testInitialization_withInvalidTokenizationKey_returnsNil { - XCTAssertNil([[BTAPIClient alloc] initWithAuthorization:@"not_a_valid_tokenization_key" sendAnalyticsEvent:NO]); -} - -- (void)testInitialization_withValidClientToken_setsClientToken { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:BTValidTestClientToken sendAnalyticsEvent:NO]; - XCTAssertEqualObjects(apiClient.clientToken.originalValue, BTValidTestClientToken); -} - -- (void)testInitialization_withInvalidClientToken_returnsNil { - XCTAssertNil([[BTAPIClient alloc] initWithAuthorization:@"invalidclienttoken" sendAnalyticsEvent:NO]); -} - -#pragma mark - Environment Base URL - -- (void)testBaseURL_isDeterminedByTokenizationKey { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - XCTAssertEqualObjects(apiClient.configurationHTTP.baseURL.absoluteString, @"http://localhost:3000/merchants/key/client_api"); - - apiClient = [[BTAPIClient alloc] initWithAuthorization:@"sandbox_tokenization_key" sendAnalyticsEvent:NO]; - XCTAssertEqualObjects(apiClient.configurationHTTP.baseURL.absoluteString, @"https://sandbox.braintreegateway.com/merchants/key/client_api"); - - apiClient = [[BTAPIClient alloc] initWithAuthorization:@"production_tokenization_key" sendAnalyticsEvent:NO]; - XCTAssertEqualObjects(apiClient.configurationHTTP.baseURL.absoluteString, @"https://api.braintreegateway.com:443/merchants/key/client_api"); -} - -#pragma mark - Configuration - -- (void)testAPIClient_canGetRemoteConfiguration { - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"test": @YES }]; - BTFakeHTTP *mockConfigurationHTTP = (BTFakeHTTP *)apiClient.configurationHTTP; - - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNotNil(configuration); - XCTAssertNil(error); - - XCTAssertEqual(mockConfigurationHTTP.GETRequestCount, (NSUInteger)1); - XCTAssertTrue([configuration.json[@"test"] isTrue]); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testConfiguration_whenServerRespondsWithNon200StatusCode_returnsAPIClientError { - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - - BTFakeHTTP *fake = [BTFakeHTTP fakeHTTP]; - [fake stubRequest:@"GET" toEndpoint:@"/client_api/v1/configuration" respondWith:@{ @"error_message": @"Something bad happened" } statusCode:503]; - apiClient.configurationHTTP = fake; - - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - // Note: GETRequestCount will be 1 or 2 depending on whether the analytics event for the API client initialization - // has failed yet - XCTAssertNil(configuration); - XCTAssertEqualObjects(error.domain, BTAPIClientErrorDomain); - XCTAssertEqual(error.code, BTAPIClientErrorTypeConfigurationUnavailable); - XCTAssertEqualObjects(error.localizedFailureReason, @"Unable to fetch remote configuration from Braintree API at this time."); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testConfiguration_whenNetworkHasError_returnsNetworkErrorInCallback { - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - - BTFakeHTTP *fake = [BTFakeHTTP fakeHTTP]; - NSError *anError = [NSError errorWithDomain:NSURLErrorDomain - code:NSURLErrorCannotConnectToHost - userInfo:nil]; - [fake stubRequest:@"GET" toEndpoint:@"/client_api/v1/configuration" respondWithError:anError]; - apiClient.configurationHTTP = fake; - - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - // BTAPIClient fetches the config when initialized so there can potentially be 2 requests here - XCTAssertLessThanOrEqual(fake.GETRequestCount, (NSUInteger)2); - XCTAssertNil(configuration); - XCTAssertEqual(error, anError); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testConfigurationHTTP_byDefault_usesAnInMemoryCache { - // We don't want configuration to cache configuration responses past the lifetime of the app - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - NSURLCache *cache = apiClient.configurationHTTP.session.configuration.URLCache; - - XCTAssertTrue(cache.diskCapacity == 0); - XCTAssertTrue(cache.memoryCapacity > 0); -} - -#pragma mark - Dispatch Queue - -- (void)testCallbacks_useMainDispatchQueue { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - BTFakeHTTP *fake = [[BTFakeHTTP alloc] initWithBaseURL:apiClient.http.baseURL authorizationFingerprint:@""]; - // Override apiClient.http so that requests don't fail - apiClient.configurationHTTP = fake; - apiClient.http = fake; - - XCTestExpectation *expectation1 = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(__unused BTConfiguration *configuration, __unused NSError *error) { - XCTAssert([NSThread isMainThread]); - [expectation1 fulfill]; - }]; - XCTestExpectation *expectation2 = [self expectationWithDescription:@"GET request"]; - [apiClient GET:@"" parameters:@{} completion:^(__unused BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(response); - XCTAssertNil(error); - - XCTAssert([NSThread isMainThread]); - [expectation2 fulfill]; - }]; - XCTestExpectation *expectation3 = [self expectationWithDescription:@"POST request"]; - [apiClient POST:@"" parameters:@{} completion:^(__unused BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(response); - XCTAssertNil(error); - - XCTAssert([NSThread isMainThread]); - [expectation3 fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark - Payment option categories - -- (void)testIsVenmoEnabledIsFalse_withoutAccessToken { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"payWithVenmo": @{}}]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertFalse(configuration.isVenmoEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsVenmoEnabledIsTrue_withoutAccessToken { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"payWithVenmo": @{}}]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertFalse(configuration.isVenmoEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsPayPalEnabled_whenEnabled_returnsTrue { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"paypalEnabled": @(YES) }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertTrue(configuration.isPayPalEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsPayPalEnabled_whenDisabled_returnsFalse { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"paypalEnabled": @(NO) }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertFalse(configuration.isPayPalEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsApplePayEnabled_whenEnabled_returnsTrue { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"applePay": @{ @"status": @"production" } }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertTrue(configuration.isApplePayEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsApplePayEnabled_whenDisabled_returnsFalse { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"applePay": @{ @"status": @"off" } }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertFalse(configuration.isApplePayEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testIsUnionPayEnabled_whenGatewayReturnsFalse_isFalse { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"unionPayEnabled": @(NO) }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertFalse(configuration.isUnionPayEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testIsUnionPayEnabled_whenGatewayReturnsTrue_isTrue { - BTAPIClient *apiClient = [self clientThatReturnsConfiguration:@{ @"unionPay": @{@"enabled": @(YES) } }]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Fetch configuration"]; - [apiClient fetchOrReturnRemoteConfiguration:^(BTConfiguration *configuration, NSError *error) { - XCTAssertNil(error); - - XCTAssertTrue(configuration.isUnionPayEnabled); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -//#pragma mark - Analytics tests - -- (void)testAnalyticsService_isCreatedDuringInitialization { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - XCTAssertTrue([apiClient.analyticsService isKindOfClass:[BTAnalyticsService class]]); -} - -- (void)testSendAnalyticsEvent_whenCalled_callsAnalyticsService { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - BTFakeAnalyticsService *mockAnalyticsService = [[BTFakeAnalyticsService alloc] init]; - apiClient.analyticsService = mockAnalyticsService; - - [apiClient sendAnalyticsEvent:@"blahblah"]; - - XCTAssertEqualObjects(mockAnalyticsService.lastEvent, @"blahblah"); -} - -- (void)testPOST_usesMetadataSourceAndIntegration { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - apiClient = [apiClient copyWithSource:BTClientMetadataSourcePayPalApp integration:BTClientMetadataIntegrationDropIn]; - BTFakeHTTP *mockHTTP = [BTFakeHTTP fakeHTTP]; - apiClient.http = mockHTTP; - [mockHTTP stubRequest:@"GET" - toEndpoint:@"/client_api/v1/configuration" - respondWith:@{ - @"analytics" : @{ - @"url" : @"test://do-not-send.url" - } } - statusCode:200]; - BTClientMetadata *metadata = apiClient.metadata; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends analytics event"]; - [apiClient POST:@"/" parameters:@{} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - XCTAssertEqualObjects(mockHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqual(apiClient.metadata.source, BTClientMetadataSourcePayPalApp); - XCTAssertEqual(apiClient.metadata.integration, BTClientMetadataIntegrationDropIn); - XCTAssertEqualObjects(mockHTTP.lastRequestParameters[@"_meta"][@"integration"], metadata.integrationString); - XCTAssertEqualObjects(mockHTTP.lastRequestParameters[@"_meta"][@"source"], metadata.sourceString); - XCTAssertEqualObjects(mockHTTP.lastRequestParameters[@"_meta"][@"sessionId"], metadata.sessionId); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -#pragma mark - Helpers - -- (BTAPIClient *)clientThatReturnsConfiguration:(NSDictionary *)configurationDictionary { - BTAPIClient *apiClient = [[BTAPIClient alloc] initWithAuthorization:@"development_tokenization_key" sendAnalyticsEvent:NO]; - BTFakeHTTP *fake = [BTFakeHTTP fakeHTTP]; - fake.cannedConfiguration = [[BTJSON alloc] initWithValue:configurationDictionary]; - fake.cannedStatusCode = 200; - apiClient.configurationHTTP = fake; - - return apiClient; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsMetadataSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsMetadataSpec.m deleted file mode 100755 index 5f81cdb5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsMetadataSpec.m +++ /dev/null @@ -1,152 +0,0 @@ -#import "BTAnalyticsMetadata.h" - -#import -#import "BTSpecDependencies.h" - -SpecBegin(BTAnalyticsMetadata) - -describe(@"metadata", ^{ - it(@"returns a dictionary of analytics metadata", ^{ - expect([BTAnalyticsMetadata metadata]).to.beKindOf([NSDictionary class]); - expect([[BTAnalyticsMetadata metadata] allKeys]).to.contain(@"platform"); - }); - - describe(@"platform", ^{ - it(@"returns \"iOS\"", ^{ - expect([BTAnalyticsMetadata metadata][@"platform"]).to.equal(@"iOS"); - }); - }); - - describe(@"platformVersion", ^{ - it(@"returns the iOS version, e.g. 7.0", ^{ - expect([BTAnalyticsMetadata metadata][@"platformVersion"]).to.match(@"^\\d+\\.\\d+(\\.\\d+)?$"); - }); - }); - - describe(@"sdkVersion", ^{ - it(@"returns Braintree sdk version", ^{ - expect([BTAnalyticsMetadata metadata][@"sdkVersion"]).to.match(@"^\\d+\\.\\d+\\.\\d+(-[0-9a-zA-Z-]+)?$"); - }); - }); - describe(@"merchantAppId", ^{ - it(@"returns app bundle identifier", ^{ - OCMockObject *mock = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[mock stub] andReturn:@{ (__bridge NSString *)kCFBundleIdentifierKey: @"com.braintree.Braintree-Demo" }] infoDictionary]; - - expect([BTAnalyticsMetadata metadata][@"merchantAppId"]).to.equal(@"com.braintree.Braintree-Demo"); - - [mock stopMocking]; - }); - }); - describe(@"merchantAppName", ^{ - it(@"returns the merchant's app version", ^{ - OCMockObject *mock = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[mock stub] andReturn:@{ (__bridge NSString *)kCFBundleNameKey:@"Braintree Demo" }] infoDictionary]; - - expect([BTAnalyticsMetadata metadata][@"merchantAppName"]).to.equal(@"Braintree Demo"); - - [mock stopMocking]; - }); - }); - describe(@"merchantAppVersion", ^{ - it(@"returns the merchant's app version", ^{ - OCMockObject *mock = [OCMockObject partialMockForObject:[NSBundle mainBundle]]; - [[[mock stub] andReturn:@{ (__bridge NSString *)kCFBundleVersionKey:@"2.3.4" }] infoDictionary]; - - expect([BTAnalyticsMetadata metadata][@"merchantAppVersion"]).to.match(@"2.3.4"); - - [mock stopMocking]; - }); - }); - describe(@"deviceRooted", ^{ - it(@"returns true iff the device has been jailbroken", ^{ - expect([[BTAnalyticsMetadata metadata][@"deviceRooted"] boolValue]).to.beFalsy(); - }); - }); - describe(@"deviceManufacturer", ^{ - it(@"returns \"Apple\"", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceManufacturer"]).to.equal(@"Apple"); - }); - }); - describe(@"deviceModel", ^{ - it(@"returns the device model", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceModel"]).to.match(@"iPhone\\d,\\d|i386|x86_64"); - }); - }); - - describe(@"deviceAppGeneratedPersistentUuid", ^{ - it(@"returns a UUID", ^{ - NSString *deviceAppGeneratedPersistentUuid = [BTAnalyticsMetadata metadata][@"deviceAppGeneratedPersistentUuid"]; - if (deviceAppGeneratedPersistentUuid) { - expect(deviceAppGeneratedPersistentUuid).to.match(@"^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"); - } - }); - - it(@"returns a consistent value", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceAppGeneratedPersistentUuid"]).to.equal([BTAnalyticsMetadata metadata][@"deviceAppGeneratedPersistentUuid"]); - }); - }); - - it(@"deviceNetworkType", ^{ - it(@"returns whether we're on cellular or wifi", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceNetworkType"]).to.equal(@"wifi"); - }); - }); - describe(@"deviceLocationLatitude", ^{ - it(@"returns the devices location if already available", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceLocationLatitude"]).to.beNil(); - }); - }); - describe(@"deviceLocationLongitude", ^{ - it(@"returns the device location if already available", ^{ - expect([BTAnalyticsMetadata metadata][@"deviceLocationLongitude"]).to.beNil(); - }); - }); - describe(@"iosIdentifierForVendor", ^{ - it(@"returns the identifierForVendor", ^{ - NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"00000000-0000-0000-0000-000000000000"]; - OCMockObject *mock = [OCMockObject partialMockForObject:[UIDevice currentDevice]]; - [[[mock stub] andReturn:uuid] identifierForVendor]; - - expect([BTAnalyticsMetadata metadata][@"iosIdentifierForVendor"]).to.equal(uuid.UUIDString); - - [mock stopMocking]; - }); - }); - describe(@"iosIsCocoaPods", ^{ - it(@"is present", ^{ - expect([BTAnalyticsMetadata metadata][@"iosIsCocoapods"]).to.beKindOf([NSNumber class]); - }); - }); - describe(@"isSimulator", ^{ - it(@"returns true for ios simulators", ^{ - expect([BTAnalyticsMetadata metadata][@"isSimulator"]).to.beTruthy(); - }); - }); - describe(@"deviceScreenOrientation", ^{ - it(@"returns the screen orientation, e.g. Portrait or FaceUp", ^{ - id mockDevice = OCMPartialMock([UIDevice currentDevice]); - OCMStub([mockDevice orientation]).andReturn(UIDeviceOrientationFaceUp); - expect([BTAnalyticsMetadata metadata][@"deviceScreenOrientation"]).to.equal(@"FaceUp"); - [mockDevice stopMocking]; - }); - it(@"returns AppExtension when running in an App Extension", ^{ - id stubMainBundle = OCMPartialMock([NSBundle mainBundle]); - OCMStub([stubMainBundle infoDictionary]).andReturn(@{@"NSExtension": @{}}); - expect([BTAnalyticsMetadata metadata][@"deviceScreenOrientation"]).to.equal(@"AppExtension"); - [stubMainBundle stopMocking]; - }); - }); - describe(@"userInterfaceOrientation", ^{ - it(@"returns the user interface orientation, e.g. Portrait or Landscape", ^{ -#ifdef __IPHONE_8_0 - expect([BTAnalyticsMetadata metadata][@"userInterfaceOrientation"]).to.beNil(); -#else - expect([BTAnalyticsMetadata metadata][@"userInterfaceOrientation"]).to.equal(@"Unknown"); -#endif - - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsService_Tests.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsService_Tests.m deleted file mode 100755 index 630de020..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAnalyticsService_Tests.m +++ /dev/null @@ -1,278 +0,0 @@ -#import "UnitTests-Swift.h" -#import "BTAnalyticsService.h" -#import "BTKeychain.h" -#import "Braintree-Version.h" -#import "BTFakeHTTP.h" -#import -#import -#import - -@interface BTAnalyticsService_Tests : XCTestCase - -@end - -@implementation BTAnalyticsService_Tests - -#pragma mark - Analytics tests - -- (void)testSendAnalyticsEvent_whenRemoteConfigurationHasNoAnalyticsURL_returnsError { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:nil]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends analytics event"]; - [analyticsService sendAnalyticsEvent:@"any.analytics.event" completion:^(NSError *error) { - XCTAssertEqual(error.domain, BTAnalyticsServiceErrorDomain); - XCTAssertEqual(error.code, (NSInteger)BTAnalyticsServiceErrorTypeMissingAnalyticsURL); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testSendAnalyticsEvent_whenRemoteConfigurationHasAnalyticsURL_setsUpAnalyticsHTTPToUseBaseURL { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends analytics event"]; - [analyticsService sendAnalyticsEvent:@"any.analytics.event" completion:^(NSError *error) { - XCTAssertEqualObjects(analyticsService.http.baseURL.absoluteString, @"test://do-not-send.url"); - XCTAssertNil(error); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testSendAnalyticsEvent_whenNumberOfQueuedEventsMeetsThreshold_sendsAnalyticsEvent { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 1; - analyticsService.http = mockAnalyticsHTTP; - - [analyticsService sendAnalyticsEvent:@"an.analytics.event"]; - // Pause briefly to allow analytics service to dispatch async blocks - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][0][@"kind"], @"an.analytics.event"); - [self validateMetaParameters:mockAnalyticsHTTP.lastRequestParameters[@"_meta"]]; -} - -- (void)testSendAnalyticsEvent_whenFlushThresholdIsGreaterThanNumberOfBatchedEvents_doesNotSendAnalyticsEvent { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 2; - analyticsService.http = mockAnalyticsHTTP; - - [analyticsService sendAnalyticsEvent:@"an.analytics.event"]; - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 0); -} - -- (void)testSendAnalyticsEventCompletion_whenCalled_sendsAllEvents { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 5; - analyticsService.http = mockAnalyticsHTTP; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends batched request"]; - [analyticsService sendAnalyticsEvent:@"an.analytics.event"]; - [analyticsService sendAnalyticsEvent:@"another.analytics.event" completion:^(NSError *error) { - XCTAssertNil(error); - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 1); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][0][@"kind"], @"an.analytics.event"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][1][@"kind"], @"another.analytics.event"); - [self validateMetaParameters:mockAnalyticsHTTP.lastRequestParameters[@"_meta"]]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testFlush_whenCalled_sendsAllQueuedEvents { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 5; - analyticsService.http = mockAnalyticsHTTP; - - [analyticsService sendAnalyticsEvent:@"an.analytics.event"]; - [analyticsService sendAnalyticsEvent:@"another.analytics.event"]; - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends batched request"]; - [analyticsService flush:^(NSError *error) { - XCTAssertNil(error); - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 1); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][0][@"kind"], @"an.analytics.event"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][1][@"kind"], @"another.analytics.event"); - [self validateMetaParameters:mockAnalyticsHTTP.lastRequestParameters[@"_meta"]]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testFlush_whenThereAreNoQueuedEvents_doesNotPOST { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 5; - analyticsService.http = mockAnalyticsHTTP; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Sends batched request"]; - [analyticsService flush:^(NSError *error) { - XCTAssertNil(error); - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testAnalyticsService_whenAPIClientConfigurationFails_returnsError { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - NSError *stubbedError = [NSError errorWithDomain:@"SomeError" code:1 userInfo:nil]; - stubAPIClient.cannedConfigurationResponseError = stubbedError; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.http = mockAnalyticsHTTP; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked with error"]; - [analyticsService sendAnalyticsEvent:@"an.analytics.event" completion:^(NSError *error) { - XCTAssertEqualObjects(error, stubbedError); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; - - expectation = [self expectationWithDescription:@"Callback invoked with error"]; - [analyticsService flush:^(NSError *error) { - XCTAssertEqualObjects(error, stubbedError); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testAnalyticsService_afterConfigurationError_maintainsQueuedEventsUntilConfigurationIsSuccessful { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - NSError *stubbedError = [NSError errorWithDomain:@"SomeError" code:1 userInfo:nil]; - stubAPIClient.cannedConfigurationResponseError = stubbedError; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.http = mockAnalyticsHTTP; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback invoked with error"]; - [analyticsService sendAnalyticsEvent:@"an.analytics.event" completion:^(NSError *error) { - XCTAssertEqualObjects(error, stubbedError); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; - - stubAPIClient.cannedConfigurationResponseError = nil; - - expectation = [self expectationWithDescription:@"Callback invoked with error"]; - [analyticsService sendAnalyticsEvent:@"an.analytics.event" completion:^(NSError *error) { - XCTAssertNil(error); - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 1); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][0][@"kind"], @"an.analytics.event"); - [self validateMetaParameters:mockAnalyticsHTTP.lastRequestParameters[@"_meta"]]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testAnalyticsService_whenAppIsBackgrounded_sendsQueuedAnalyticsEvents { - MockAPIClient *stubAPIClient = [self stubbedAPIClientWithAnalyticsURL:@"test://do-not-send.url"]; - BTFakeHTTP *mockAnalyticsHTTP = [BTFakeHTTP fakeHTTP]; - BTAnalyticsService *analyticsService = [[BTAnalyticsService alloc] initWithAPIClient:stubAPIClient]; - analyticsService.flushThreshold = 5; - analyticsService.http = mockAnalyticsHTTP; - - [analyticsService sendAnalyticsEvent:@"an.analytics.event"]; - [analyticsService sendAnalyticsEvent:@"another.analytics.event"]; - [[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationWillResignActiveNotification object:nil]; - - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - XCTAssertTrue(mockAnalyticsHTTP.POSTRequestCount == 1); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestEndpoint, @"/"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][0][@"kind"], @"an.analytics.event"); - XCTAssertEqualObjects(mockAnalyticsHTTP.lastRequestParameters[@"analytics"][1][@"kind"], @"another.analytics.event"); - [self validateMetaParameters:mockAnalyticsHTTP.lastRequestParameters[@"_meta"]]; -} - -#pragma mark - Helpers - -- (MockAPIClient *)stubbedAPIClientWithAnalyticsURL:(NSString *)analyticsURL { - MockAPIClient *stubAPIClient = [[MockAPIClient alloc] initWithAuthorization:@"development_tokenization_key"]; - if (analyticsURL) { - stubAPIClient.cannedConfigurationResponseBody = [[BTJSON alloc] initWithValue:@{ @"analytics" : @{ @"url" : analyticsURL } }]; - } else { - stubAPIClient.cannedConfigurationResponseBody = [[BTJSON alloc] initWithValue:@{}]; - } - return stubAPIClient; -} - -- (void)validateMetaParameters:(NSDictionary *)metaParameters { - NSString *unitTestDeploymentTargetVersion = [@(__IPHONE_OS_VERSION_MIN_REQUIRED) stringValue]; - NSString *unitTestBaseSDKVersion = [@(__IPHONE_OS_VERSION_MAX_ALLOWED) stringValue]; - - XCTAssertEqualObjects(metaParameters[@"deviceManufacturer"], @"Apple"); - XCTAssertEqualObjects(metaParameters[@"deviceModel"], [self deviceModel]); - XCTAssertEqualObjects(metaParameters[@"deviceAppGeneratedPersistentUuid"], [self deviceAppGeneratedPersistentUuid]); - XCTAssertEqualObjects(metaParameters[@"deviceScreenOrientation"], @"Portrait"); - XCTAssertEqualObjects(metaParameters[@"integration"], @"custom"); - XCTAssertEqualObjects(metaParameters[@"iosBaseSDK"], unitTestBaseSDKVersion); - XCTAssertEqualObjects(metaParameters[@"iosDeploymentTarget"], unitTestDeploymentTargetVersion); - XCTAssertEqualObjects(metaParameters[@"iosDeviceName"], [[UIDevice currentDevice] name]); - XCTAssertTrue((BOOL)metaParameters[@"isSimulator"] == TARGET_IPHONE_SIMULATOR); - XCTAssertEqualObjects(metaParameters[@"merchantAppId"], @"com.braintreepayments.Demo"); - XCTAssertEqualObjects(metaParameters[@"merchantAppName"], @"Braintree iOS SDK Demo"); - XCTAssertEqualObjects(metaParameters[@"sdkVersion"], BRAINTREE_VERSION); - XCTAssertEqualObjects(metaParameters[@"platform"], @"iOS"); - XCTAssertEqualObjects(metaParameters[@"platformVersion"], [[UIDevice currentDevice] systemVersion]); - XCTAssertNotNil(metaParameters[@"sessionId"]); - XCTAssertEqualObjects(metaParameters[@"source"], @"unknown"); - XCTAssertTrue([metaParameters[@"venmoInstalled"] isKindOfClass:[NSNumber class]]); -} - -// Ripped from BTAnalyticsMetadata -- (NSString *)deviceModel { - struct utsname systemInfo; - - uname(&systemInfo); - - NSString* code = [NSString stringWithCString:systemInfo.machine - encoding:NSUTF8StringEncoding]; - return code; -} - -// Ripped from BTAnalyticsMetadata -- (NSString *)deviceAppGeneratedPersistentUuid { - @try { - static NSString *deviceAppGeneratedPersistentUuidKeychainKey = @"deviceAppGeneratedPersistentUuid"; - NSString *savedIdentifier = [BTKeychain stringForKey:deviceAppGeneratedPersistentUuidKeychainKey]; - if (savedIdentifier.length == 0) { - savedIdentifier = [[NSUUID UUID] UUIDString]; - BOOL setDidSucceed = [BTKeychain setString:savedIdentifier - forKey:deviceAppGeneratedPersistentUuidKeychainKey]; - if (!setDidSucceed) { - return nil; - } - } - return savedIdentifier; - } @catch (NSException *exception) { - return nil; - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAppSwitch_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAppSwitch_Tests.swift deleted file mode 100755 index 15d0e54a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTAppSwitch_Tests.swift +++ /dev/null @@ -1,86 +0,0 @@ -import XCTest - -class BTAppSwitch_Tests: XCTestCase { - - var appSwitch = BTAppSwitch.sharedInstance() - - override func setUp() { - super.setUp() - appSwitch = BTAppSwitch.sharedInstance() - } - - override func tearDown() { - MockAppSwitchHandler.cannedCanHandle = false - MockAppSwitchHandler.lastCanHandleURL = nil - MockAppSwitchHandler.lastCanHandleSourceApplication = nil - MockAppSwitchHandler.lastHandleAppSwitchReturnURL = nil - super.tearDown() - } - - func testHandleOpenURL_whenHandlerIsRegistered_invokesCanHandleAppSwitchReturnURL() { - appSwitch.register(MockAppSwitchHandler.self) - let expectedURL = URL(string: "fake://url")! - let expectedSourceApplication = "fakeSourceApplication" - - BTAppSwitch.handleOpen(expectedURL, sourceApplication: expectedSourceApplication) - - XCTAssertEqual(MockAppSwitchHandler.lastCanHandleURL!, expectedURL) - XCTAssertEqual(MockAppSwitchHandler.lastCanHandleSourceApplication!, expectedSourceApplication) - } - - func testHandleOpenURL_whenHandlerCanHandleOpenURL_invokesHandleAppSwitchReturnURL() { - appSwitch.register(MockAppSwitchHandler.self) - MockAppSwitchHandler.cannedCanHandle = true - let expectedURL = URL(string: "fake://url")! - - let handled = BTAppSwitch.handleOpen(expectedURL, sourceApplication: "not important") - - XCTAssert(handled) - XCTAssertEqual(MockAppSwitchHandler.lastHandleAppSwitchReturnURL!, expectedURL) - } - - func testHandleOpenURL_whenHandlerCantHandleOpenURL_doesNotInvokeHandleAppSwitchReturnURL() { - appSwitch.register(MockAppSwitchHandler.self) - MockAppSwitchHandler.cannedCanHandle = false - - BTAppSwitch.handleOpen(URL(string: "fake://url")!, sourceApplication: "not important") - - XCTAssertNil(MockAppSwitchHandler.lastHandleAppSwitchReturnURL) - } - - func testHandleOpenURL_whenHandlerCantHandleOpenURL_returnsFalse() { - appSwitch.register(MockAppSwitchHandler.self) - MockAppSwitchHandler.cannedCanHandle = false - - XCTAssertFalse(BTAppSwitch.handleOpen(URL(string: "fake://url")!, sourceApplication: "not important")) - } - - func testHandleOpenURL_acceptsOptionalSourceApplication() { - // This doesn't assert any behavior about nil source application. It only checks that the code will compile! - let sourceApplication : String? = nil - BTAppSwitch.handleOpen(URL(string: "fake://url")!, sourceApplication: sourceApplication) - } - - func testHandleOpenURL_withNoAppSwitching() { - let handled = BTAppSwitch.handleOpen(URL(string: "scheme://")!, sourceApplication: "com.yourcompany.hi") - XCTAssertFalse(handled) - } - -} - -class MockAppSwitchHandler: BTAppSwitchHandler { - static var cannedCanHandle = false - static var lastCanHandleURL : URL? = nil - static var lastCanHandleSourceApplication : String? = nil - static var lastHandleAppSwitchReturnURL : URL? = nil - - @objc static func canHandleAppSwitchReturn(_ url: URL, sourceApplication: String) -> Bool { - lastCanHandleURL = url - lastCanHandleSourceApplication = sourceApplication - return cannedCanHandle - } - - @objc static func handleAppSwitchReturn(_ url: URL) { - lastHandleAppSwitchReturnURL = url - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTApplePay_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTApplePay_Tests.swift deleted file mode 100755 index 79f70f66..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTApplePay_Tests.swift +++ /dev/null @@ -1,329 +0,0 @@ -import PassKit -import XCTest - -@available(iOS 8.0, *) - -class BTApplePay_Tests: XCTestCase { - - var mockClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - - override func setUp() { - super.setUp() - mockClient = MockAPIClient(authorization: "development_tokenization_key")! - } - - // MARK: - Payment Request - - func testPaymentRequest_whenConfiguredOff_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "off" - ] - ]) - let applePayClient = BTApplePayClient(apiClient: mockClient) - - let expectation = self.expectation(description: "Callback invoked") - applePayClient.paymentRequest { (paymentRequest, error) in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.unsupported.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testPaymentRequest_whenConfigurationIsMissingApplePayStatus_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [:]) - let applePayClient = BTApplePayClient(apiClient: mockClient) - - let expectation = self.expectation(description: "Callback invoked") - applePayClient.paymentRequest { (paymentRequest, error) in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.unsupported.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testPaymentRequest_whenAPIClientIsNil_callsBackWithError() { - let applePayClient = BTApplePayClient(apiClient: mockClient) - applePayClient.apiClient = nil - - let expectation = self.expectation(description: "Callback invoked") - applePayClient.paymentRequest { (paymentRequest, error) in - XCTAssertNil(paymentRequest) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.integration.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testPaymentRequest_returnsPaymentRequestUsingConfiguration() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production", - "countryCode": "BT", - "currencyCode": "BTB", - "merchantIdentifier": "merchant.com.braintree-unit-tests", - "supportedNetworks": ["visa", "mastercard", "amex"] - ] ]) - let applePayClient = BTApplePayClient(apiClient: mockClient) - - let expectation = self.expectation(description: "Callback invoked") - applePayClient.paymentRequest { (paymentRequest, error) in - guard let paymentRequest = paymentRequest else { - XCTFail() - return - } - - XCTAssertNil(error) - XCTAssertEqual(paymentRequest.countryCode, "BT") - XCTAssertEqual(paymentRequest.currencyCode, "BTB") - XCTAssertEqual(paymentRequest.merchantIdentifier, "merchant.com.braintree-unit-tests") - XCTAssertEqual(paymentRequest.supportedNetworks, [PKPaymentNetwork.visa, PKPaymentNetwork.masterCard, PKPaymentNetwork.amex]) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testPaymentRequest_whenConfigurationIsMissingValues_returnsPaymentRequestWithValuesUndefined() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production" - ] ]) - let applePayClient = BTApplePayClient(apiClient: mockClient) - - let expectation = self.expectation(description: "Callback invoked") - applePayClient.paymentRequest { (paymentRequest, error) in - guard let paymentRequest = paymentRequest else { - XCTFail() - return - } - - XCTAssertNil(error) - XCTAssertEqual(paymentRequest.countryCode, "") - XCTAssertEqual(paymentRequest.currencyCode, "") - XCTAssertEqual(paymentRequest.merchantIdentifier, "") - XCTAssertEqual(paymentRequest.supportedNetworks, []) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - - // MARK: - Tokenization - - func testTokenization_whenConfiguredOff_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "off" - ] - ]) - let expectation = self.expectation(description: "Unsuccessful tokenization") - - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.unsupported.rawValue) - expectation.fulfill() - } - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenConfigurationIsMissingApplePayStatus_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [:]) - let expectation = self.expectation(description: "Unsuccessful tokenization") - - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.unsupported.rawValue) - expectation.fulfill() - } - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenAPIClientIsNil_callsBackWithError() { - let client = BTApplePayClient(apiClient: mockClient) - client.apiClient = nil - - let expectation = self.expectation(description: "Callback invoked") - client.tokenizeApplePay(MockPKPayment()) { (tokenizedPayment, error) -> Void in - XCTAssertNil(tokenizedPayment) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTApplePayErrorDomain) - XCTAssertEqual(error.code, BTApplePayErrorType.integration.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenConfigurationFetchErrorOccurs_callsBackWithError() { - mockClient.cannedConfigurationResponseError = NSError(domain: "MyError", code: 1, userInfo: nil) - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - let expectation = self.expectation(description: "tokenization error") - - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, "MyError") - XCTAssertEqual(error.code, 1) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenTokenizationErrorOccurs_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production" - ] - ]) - mockClient.cannedHTTPURLResponse = HTTPURLResponse(url: URL(string: "any")!, statusCode: 503, httpVersion: nil, headerFields: nil) - mockClient.cannedResponseError = NSError(domain: "foo", code: 100, userInfo: nil) - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - let expectation = self.expectation(description: "tokenization failure") - - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockClient.cannedResponseError!) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenTokenizationFailureOccurs_callsBackWithError() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production" - ] - ]) - mockClient.cannedResponseError = NSError(domain: "MyError", code: 1, userInfo: nil) - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - let expectation = self.expectation(description: "tokenization failure") - - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, "MyError") - XCTAssertEqual(error.code, 1) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenSuccessfulTokenizationInProduction_callsBackWithTokenizedPayment() { - mockClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production" - ] - ]) - mockClient.cannedResponseBody = BTJSON(value: [ - "applePayCards": [ - [ - "nonce" : "an-apple-pay-nonce", - "description": "a description", - ] - ] - ]) - let expectation = self.expectation(description: "successful tokenization") - - let client = BTApplePayClient(apiClient: mockClient) - let payment = MockPKPayment() - client.tokenizeApplePay(payment) { (tokenizedPayment, error) -> Void in - XCTAssertNil(error) - XCTAssertEqual(tokenizedPayment!.localizedDescription, "a description") - XCTAssertEqual(tokenizedPayment!.nonce, "an-apple-pay-nonce") - expectation.fulfill() - } - - XCTAssertEqual(mockClient.lastPOSTPath, "v1/payment_methods/apple_payment_tokens") - - waitForExpectations(timeout: 2, handler: nil) - } - - // MARK: - Metadata - - func testMetaParameter_whenTokenizationIsSuccessful_isPOSTedToServer() { - let mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "applePay" : [ - "status" : "production" - ] - ]) - let applePayClient = BTApplePayClient(apiClient: mockAPIClient) - let payment = MockPKPayment() - - let expectation = self.expectation(description: "Tokenized card") - applePayClient.tokenizeApplePay(payment) { _ -> Void in - expectation.fulfill() - } - - waitForExpectations(timeout: 5, handler: nil) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "v1/payment_methods/apple_payment_tokens") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "unknown") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } - - class MockPKPaymentToken : PKPaymentToken { - override var paymentData : Data { - get { - return Data() - } - } - override var transactionIdentifier : String { - get { - return "transaction-id" - } - } - override var paymentInstrumentName : String { - get { - return "payment-instrument-name" - } - } - override var paymentNetwork : String { - get { - return "payment-network" - } - } - } - - class MockPKPayment : PKPayment { - var overrideToken = MockPKPaymentToken() - override var token : PKPaymentToken { - get { - return overrideToken - } - } - } - -} - - - - - - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_Tests.swift deleted file mode 100755 index 38720a30..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_Tests.swift +++ /dev/null @@ -1,226 +0,0 @@ -import XCTest - -class BTCardClient_Tests: XCTestCase { - - func testTokenization_postsCardDataToClientAPI() { - let expectation = self.expectation(description: "Tokenize Card") - let fakeHTTP = FakeHTTP.fakeHTTP() - let apiClient = BTAPIClient(authorization: "development_tokenization_key")! - apiClient.http = fakeHTTP - let cardClient = BTCardClient(apiClient: apiClient) - - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "1234") - card.cardholderName = "Brian Tree" - - cardClient.tokenizeCard(card) { (tokenizedCard, error) -> Void in - XCTAssertEqual(fakeHTTP.lastRequest!.endpoint, "v1/payment_methods/credit_cards") - XCTAssertEqual(fakeHTTP.lastRequest!.method, "POST") - - if let cardParameters = fakeHTTP.lastRequest!.parameters["credit_card"] as? [String:AnyObject] { - XCTAssertEqual(cardParameters["number"] as? String, "4111111111111111") - XCTAssertEqual(cardParameters["expiration_date"] as? String, "12/2038") - XCTAssertEqual(cardParameters["cvv"] as? String, "1234") - XCTAssertEqual(cardParameters["cardholder_name"] as? String, "Brian Tree") - } else { - XCTFail() - } - expectation.fulfill() - } - - self.waitForExpectations(timeout: 10, handler: nil) - } - - func testTokenization_whenAPIClientSucceeds_returnsTokenizedCard() { - let expectation = self.expectation(description: "Tokenize Card") - let apiClient = BTAPIClient(authorization: "development_tokenization_key")! - apiClient.http = FakeHTTP.fakeHTTP() - let cardClient = BTCardClient(apiClient: apiClient) - - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - - cardClient.tokenizeCard(card) { (tokenizedCard, error) -> Void in - guard let tokenizedCard = tokenizedCard else { - XCTFail("Received an error: \(error)") - return - } - - XCTAssertEqual(tokenizedCard.nonce, FakeHTTP.fakeNonce) - XCTAssertEqual(tokenizedCard.localizedDescription, "Visa ending in 11") - XCTAssertEqual(tokenizedCard.lastTwo!, "11") - XCTAssertEqual(tokenizedCard.cardNetwork, BTCardNetwork.visa) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 10, handler: nil) - } - - func testTokenization_whenAPIClientFails_returnsError() { - let expectation = self.expectation(description: "Tokenize Card") - let apiClient = BTAPIClient(authorization: "development_tokenization_key")! - apiClient.http = ErrorHTTP.fakeHTTP() - let cardClient = BTCardClient(apiClient: apiClient) - - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - - cardClient.tokenizeCard(card) { (tokenizedCard, error) -> Void in - XCTAssertNil(tokenizedCard) - XCTAssertEqual(error! as NSError, ErrorHTTP.error) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 10, handler: nil) - } - - func testTokenization_whenTokenizationEndpointReturns422_callCompletionWithValidationError() { - let stubAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - let stubJSONResponse = BTJSON(value: [ - "error" : [ - "message" : "Credit card is invalid" - ], - "fieldErrors" : [ - [ - "field" : "creditCard", - "fieldErrors" : [ - [ - "field" : "number", - "message" : "Credit card number must be 12-19 digits", - "code" : "81716" - ] - ] - ] - ] - ]) - let stubError = NSError(domain: BTHTTPErrorDomain, code: BTHTTPErrorCode.clientError.rawValue, userInfo: [ - BTHTTPURLResponseKey: HTTPURLResponse(url: URL(string: "http://fake")!, statusCode: 422, httpVersion: nil, headerFields: nil)!, - BTHTTPJSONResponseBodyKey: stubJSONResponse - ]) - stubAPIClient.cannedResponseError = stubError - let cardClient = BTCardClient(apiClient: stubAPIClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - - let expectation = self.expectation(description: "Callback invoked with error") - cardClient.tokenizeCard(request, options: nil) { (cardNonce, error) -> Void in - XCTAssertNil(cardNonce) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTCardClientErrorDomain) - XCTAssertEqual(error.code, BTCardClientErrorType.customerInputInvalid.rawValue) - if let json = (error.userInfo as NSDictionary)[BTCustomerInputBraintreeValidationErrorsKey] as? NSDictionary { - XCTAssertEqual(json, (stubJSONResponse as BTJSON).asDictionary()! as NSDictionary) - } else { - XCTFail("Expected JSON response in userInfo[BTCustomInputBraintreeValidationErrorsKey]") - } - XCTAssertEqual(error.localizedDescription, "Credit card is invalid") - XCTAssertEqual((error as NSError).localizedFailureReason, "Credit card number must be 12-19 digits") - - - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenization_whenTokenizationEndpointReturnsAnyNon422Error_callCompletionWithError() { - let stubAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - stubAPIClient.cannedResponseError = NSError(domain: BTHTTPErrorDomain, code: BTHTTPErrorCode.clientError.rawValue, userInfo: nil) - let cardClient = BTCardClient(apiClient: stubAPIClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - request.smsCode = "12345" - request.enrollmentID = "fake-enrollment-id" - - let expectation = self.expectation(description: "Callback invoked with error") - cardClient.tokenizeCard(request, options: nil) { (cardNonce, error) -> Void in - XCTAssertNil(cardNonce) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTHTTPErrorDomain) - XCTAssertEqual(error.code, BTHTTPErrorCode.clientError.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - // MARK: - _meta parameter - - func testMetaParameter_whenTokenizationIsSuccessful_isPOSTedToServer() { - let mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - let cardClient = BTCardClient(apiClient: mockAPIClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - - let expectation = self.expectation(description: "Tokenized card") - cardClient.tokenizeCard(card) { _ -> Void in - expectation.fulfill() - } - - waitForExpectations(timeout: 5, handler: nil) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "v1/payment_methods/credit_cards") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "unknown") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } -} - -// MARK: - Helpers - -class FakeHTTP : BTHTTP { - struct Request { - let endpoint : String - let method : String - let parameters : [AnyHashable: Any] - } - - static let fakeNonce = "fake-nonce" - var lastRequest : Request? - - class func fakeHTTP() -> FakeHTTP { - return FakeHTTP(baseURL: URL(string: "fake://fake")!, authorizationFingerprint: "") - } - - override func post(_ path: String, parameters: [AnyHashable : Any]?, completion completionBlock: ((BTJSON?, HTTPURLResponse?, Error?) -> Void)? = nil) { - self.lastRequest = Request(endpoint: path, method: "POST", parameters: parameters!) - - let response = HTTPURLResponse(url: URL(string: path)!, statusCode: 202, httpVersion: nil, headerFields: nil)! - - guard let completionBlock = completionBlock else { - return - } - completionBlock(BTJSON(value: [ - "creditCards": [ - [ - "nonce": FakeHTTP.fakeNonce, - "description": "Visa ending in 11", - "details": [ - "lastTwo" : "11", - "cardType": "visa"] ] ] ]), response, nil) - } -} - -class ErrorHTTP : BTHTTP { - static let error = NSError(domain: "TestErrorDomain", code: 1, userInfo: nil) - - class func fakeHTTP() -> ErrorHTTP { - let fakeURL = URL(string: "fake://fake") - return ErrorHTTP(baseURL: fakeURL!, authorizationFingerprint: "") - } - - override func get(_ path: String, parameters: [String : String]?, completion completionBlock: ((BTJSON?, HTTPURLResponse?, Error?) -> Void)? = nil) { - guard let completionBlock = completionBlock else { - return - } - completionBlock(nil, nil, ErrorHTTP.error) - } - - override func post(_ path: String, parameters: [AnyHashable : Any]?, completion completionBlock: ((BTJSON?, HTTPURLResponse?, Error?) -> Void)? = nil) { - guard let completionBlock = completionBlock else { - return - } - completionBlock(nil, nil, ErrorHTTP.error) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_UnionPayTests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_UnionPayTests.swift deleted file mode 100755 index bf9a61aa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardClient_UnionPayTests.swift +++ /dev/null @@ -1,578 +0,0 @@ -import XCTest -import BraintreeUnionPay - -class BTCardClient_UnionPayTests: XCTestCase { - - var apiClient: BTAPIClient! - - override func setUp() { - super.setUp() - apiClient = clientWithUnionPayEnabled(true) - } - - // MARK: - Fetch capabilities - - func testFetchCapabilities_whenConfigurationFetchFails_returnsError() { - let stubConfigurationHTTP = BTFakeHTTP()! - stubConfigurationHTTP.cannedError = NSError(domain: "FakeDomain", code: 2, userInfo: nil) - apiClient.configurationHTTP = stubConfigurationHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (cardNonce, error) -> Void in - guard let error = error else { - XCTFail() - return - } - - XCTAssertNil(cardNonce) - XCTAssertEqual(error as NSError, stubConfigurationHTTP.cannedError as! NSError) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchCapabilities_whenCallToCapabilitiesEndpointReturnsError_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: ["unionPay": ["enabled": true]]) - mockAPIClient.cannedResponseError = NSError(domain: "FakeError", code: 0, userInfo: nil) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (_, _) -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.capabilities-failed") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchCapabilities_whenUnionPayIsNotEnabledForMerchant_returnsError() { - apiClient = clientWithUnionPayEnabled(false) - let cardClient = BTCardClient(apiClient: apiClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (cardNonce, error) -> Void in - XCTAssertNil(cardNonce) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTCardClientErrorDomain) - XCTAssertEqual(error.code, BTCardClientErrorType.paymentOptionNotEnabled.rawValue) - XCTAssertEqual(error.localizedDescription, "UnionPay is not enabled for this merchant") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchCapabilities_whenUnionPayIsEnabledForMerchant_sendsGETRequestToCapabilitiesEndpointWithExpectedPayload() { - let mockHTTP = BTFakeHTTP()! - apiClient.http = mockHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (_, _) -> Void in - expectation.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - - XCTAssertEqual(mockHTTP.lastRequestMethod, "GET") - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods/credit_cards/capabilities") - guard let lastRequestParameters = mockHTTP.lastRequestParameters else { - XCTFail() - return - } - guard let cardNumberInPayload = lastRequestParameters["credit_card[number]"] as? String else { - XCTFail() - return - } - XCTAssertEqual(cardNumberInPayload, cardNumber) - } - - func testFetchCapabilities_whenSuccessful_parsesCardCapabilitiesFromJSONResponse() { - let stubHTTP = BTFakeHTTP()! - stubHTTP.stubRequest("GET", toEndpoint: "v1/payment_methods/credit_cards/capabilities", respondWith: [ - "isUnionPay": true, - "isDebit": false, - "unionPay": [ - "supportsTwoStepAuthAndCapture": true, - "isSupported": true - ] - ], statusCode: 201) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (cardCapabilities, error) -> Void in - guard let cardCapabilities = cardCapabilities else { - XCTFail("Expected union pay capabilities") - return - } - - XCTAssertNil(error) - XCTAssertEqual(true, cardCapabilities.isUnionPay) - XCTAssertEqual(false, cardCapabilities.isDebit) - XCTAssertEqual(true, cardCapabilities.supportsTwoStepAuthAndCapture) - XCTAssertEqual(true, cardCapabilities.isSupported) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testFetchCapabilities_whenSuccessful_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: ["unionPay": ["enabled": true]]) - mockAPIClient.cannedResponseBody = BTJSON(value:[ - "isUnionPay": true, - "isDebit": false, - "unionPay": [ - "supportsTwoStepAuthAndCapture": true, - "isSupported": true - ] - ]) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (cardCapabilities, error) -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.capabilities-received") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testFetchCapabilities_whenFailure_returnsError() { - let stubHTTP = BTFakeHTTP()! - let stubbedError = NSError(domain: "FakeError", code: 1, userInfo: nil) - stubHTTP.stubRequest("GET", toEndpoint: "v1/credit_cards/capabilities", respondWithError: stubbedError) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let cardNumber = "411111111111111" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.fetchCapabilities(cardNumber) { (cardCapabilities, error) -> Void in - XCTAssertNil(cardCapabilities) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, stubbedError.domain) - XCTAssertEqual(error.code, stubbedError.code) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - // MARK: - Enrollment - - func testEnroll_whenConfigurationFetchFails_returnsError() { - let stubConfigurationHTTP = BTFakeHTTP()! - stubConfigurationHTTP.cannedError = NSError(domain: "FakeDomain", code: 2, userInfo: nil) - apiClient.configurationHTTP = stubConfigurationHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - let request = BTCardRequest(card: card) - request.mobileCountryCode = "123" - request.mobilePhoneNumber = "321" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { (enrollmentID, smsCodeRequired, error) -> Void in - guard let error = error else { - XCTFail() - return - } - - XCTAssertNil(enrollmentID) - XCTAssertEqual(error as NSError, stubConfigurationHTTP.cannedError! as NSError) - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testEnrollment_whenUnionPayIsNotEnabledForMerchant_returnsError() { - apiClient = clientWithUnionPayEnabled(false) - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - let request = BTCardRequest(card: card) - request.mobileCountryCode = "123" - request.mobilePhoneNumber = "321" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { (enrollmentID, smsCodeRequired, error) -> Void in - XCTAssertNil(enrollmentID) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTCardClientErrorDomain) - XCTAssertEqual(error.code, BTCardClientErrorType.paymentOptionNotEnabled.rawValue) - XCTAssertEqual(error.localizedDescription, "UnionPay is not enabled for this merchant") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testEnrollment_whenUnionPayIsEnabledForMerchant_sendsPOSTRequestToEnrollmentEndpointWithExpectedPayload() { - let mockHTTP = BTFakeHTTP()! - apiClient.http = mockHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - let request = BTCardRequest(card: card) - request.mobileCountryCode = "123" - request.mobilePhoneNumber = "321" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - expectation.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - - XCTAssertEqual(mockHTTP.lastRequestMethod, "POST") - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/union_pay_enrollments") - guard let parameters = mockHTTP.lastRequestParameters as? [String:AnyObject] else { - XCTFail() - return - } - guard let enrollment = parameters["union_pay_enrollment"] as? [String:AnyObject] else { - XCTFail() - return - } - - XCTAssertEqual(enrollment["number"] as? String, card.number!) - XCTAssertEqual(enrollment["expiration_month"] as? String, card.expirationMonth!) - XCTAssertEqual(enrollment["expiration_year"] as? String, card.expirationYear!) - XCTAssertEqual(enrollment["mobile_country_code"] as? String, request.mobileCountryCode!) - XCTAssertEqual(enrollment["mobile_number"] as? String, request.mobilePhoneNumber!) - } - - func testEnrollmentPayload_doesNotContainCVV() { - let mockHTTP = BTFakeHTTP()! - apiClient.http = mockHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - let request = BTCardRequest(card: card) - request.mobileCountryCode = "123" - request.mobilePhoneNumber = "321" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - expectation.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - - guard let parameters = mockHTTP.lastRequestParameters as? [String:AnyObject] else { - XCTFail() - return - } - guard let enrollment = parameters["union_pay_enrollment"] as? [String:AnyObject] else { - XCTFail() - return - } - - XCTAssertNil(enrollment["cvv"] as? String) - } - - func testEnrollCard_whenSuccessful_returnsEnrollmentIDAndSmsCodeRequiredFromJSONResponse() { - let stubHTTP = BTFakeHTTP()! - stubHTTP.stubRequest("POST", toEndpoint: "v1/union_pay_enrollments", respondWith: [ - "unionPayEnrollmentId": "fake-enrollment-id", - "smsCodeRequired": true - ], statusCode: 201) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { (enrollmentID, smsCodeRequired, error) -> Void in - guard let enrollmentID = enrollmentID else { - XCTFail("Expected UnionPay enrollment") - return - } - XCTAssertNil(error) - XCTAssertEqual(enrollmentID, "fake-enrollment-id") - XCTAssertTrue(smsCodeRequired) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testEnrollCard_when422Failure_returnsValidationError() { - let stubHTTP = BTFakeHTTP()! - let stubbed422HTTPResponse = HTTPURLResponse(url: URL(string: "someendpoint")!, statusCode: 422, httpVersion: nil, headerFields: nil)! - let stubbed422ResponseBody = BTJSON(value: ["some": "thing"]) - let stubbedError = NSError(domain: BTHTTPErrorDomain, code: BTHTTPErrorCode.clientError.rawValue, userInfo: [ - BTHTTPURLResponseKey: stubbed422HTTPResponse, - BTHTTPJSONResponseBodyKey: stubbed422ResponseBody]) - stubHTTP.stubRequest("POST", toEndpoint: "v1/union_pay_enrollments", respondWithError:stubbedError) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { (enrollmentID, smsCodeRequired, error) -> Void in - XCTAssertNil(enrollmentID) - XCTAssertFalse(smsCodeRequired) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTCardClientErrorDomain) - XCTAssertEqual(error.code, BTCardClientErrorType.customerInputInvalid.rawValue) - - guard let inputErrors = (error._userInfo as! NSDictionary)[BTCustomerInputBraintreeValidationErrorsKey] as? NSDictionary else { - XCTFail("Expected error userInfo to contain validation errors") - return - } - XCTAssertEqual(inputErrors["some"] as! String, "thing") - - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testEnrollCard_onError_invokesCallbackOnMainThread() { - let stubHTTP = BTFakeHTTP()! - stubHTTP.stubRequest("POST", toEndpoint: "v1/union_pay_enrollments", respondWithError: NSError(domain: "CannedError", code: 0, userInfo: nil)) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - XCTAssertTrue(Thread.isMainThread) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testEnrollCard_whenEnrollmentEndpointReturnsError_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: ["unionPay": ["enabled": true]]) - mockAPIClient.cannedResponseError = NSError(domain: "FakeError", code: 0, userInfo: nil) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.enrollment-failed") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testEnrollCard_onSuccess_invokesCallbackOnMainThread() { - let stubHTTP = BTFakeHTTP()! - stubHTTP.stubRequest("POST", toEndpoint: "v1/union_pay_enrollments", respondWith: [ - "unionPayEnrollmentId": "fake-enrollment-id" - ], statusCode: 201) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - XCTAssertTrue(Thread.isMainThread) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testEnrollCard_onSuccess_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: ["unionPay": ["enabled": true]]) - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "unionPayEnrollmentId": "fake-enrollment-id", - "smsCodeRequired": true - ]) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { _ -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.enrollment-succeeded") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testEnrollCard_whenOtherFailure_returnsError() { - let stubHTTP = BTFakeHTTP()! - let stubbedError = NSError(domain: "FakeError", code: 1, userInfo: nil) - stubHTTP.stubRequest("POST", toEndpoint: "v1/union_pay_enrollments", respondWithError:stubbedError) - apiClient.http = stubHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - let request = BTCardRequest(card: card) - - let expectation = self.expectation(description: "Callback invoked") - cardClient.enrollCard(request) { (enrollmentID, smsCodeRequired, error) -> Void in - XCTAssertNil(enrollmentID) - XCTAssertFalse(smsCodeRequired) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, "FakeError") - XCTAssertEqual(error.code, 1) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - // MARK: - Tokenization - - func testTokenization_POSTsToTokenizationEndpoint() { - let mockHTTP = BTFakeHTTP()! - apiClient.http = mockHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - request.smsCode = "12345" - // This is an internal-only property, but we want to verify that it gets sent when hitting the tokenization endpoint - request.enrollmentID = "enrollment-id" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.tokenizeCard(request, options: nil) { (_, _) -> Void in - expectation.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - - XCTAssertEqual(mockHTTP.lastRequestMethod, "POST") - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods/credit_cards") - if let parameters = mockHTTP.lastRequestParameters as? [String: AnyObject] { - guard let cardParameters = parameters["credit_card"] as? [String: AnyObject] else { - XCTFail("Card should be in parameters") - return - } - XCTAssertEqual(cardParameters["number"] as? String, "4111111111111111") - XCTAssertEqual(cardParameters["expiration_date"] as? String, "12/2038") - XCTAssertEqual(cardParameters["cvv"] as? String, "123") - - guard let tokenizationOptionsParameters = cardParameters["options"] as? [String: AnyObject] else { - XCTFail("Tokenization options should be present") - return - } - - guard let unionPayEnrollmentParameters = tokenizationOptionsParameters["union_pay_enrollment"] as? [String: AnyObject] else { - XCTFail("UnionPay enrollment should be present") - return - } - - XCTAssertEqual(unionPayEnrollmentParameters["sms_code"] as? String, "12345") - XCTAssertEqual(unionPayEnrollmentParameters["id"] as? String, "enrollment-id") - } else { - XCTFail() - } - } - - func testTokenization_withEnrollmentIDAndNoSMSCode_sendsUnionPayEnrollment() { - let mockHTTP = BTFakeHTTP()! - apiClient.http = mockHTTP - let cardClient = BTCardClient(apiClient: apiClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - // This is an internal-only property, but we want to verify that it gets sent when hitting the tokenization endpoint - request.enrollmentID = "enrollment-id" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.tokenizeCard(request, options: nil) { (_, _) -> Void in - expectation.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - - XCTAssertEqual(mockHTTP.lastRequestMethod, "POST") - XCTAssertEqual(mockHTTP.lastRequestEndpoint, "v1/payment_methods/credit_cards") - if let parameters = mockHTTP.lastRequestParameters as? [String: AnyObject] { - guard let cardParameters = parameters["credit_card"] as? [String: AnyObject] else { - XCTFail("Card should be in parameters") - return - } - XCTAssertEqual(cardParameters["number"] as? String, "4111111111111111") - XCTAssertEqual(cardParameters["expiration_date"] as? String, "12/2038") - XCTAssertEqual(cardParameters["cvv"] as? String, "123") - - guard let tokenizationOptionsParameters = cardParameters["options"] as? [String: AnyObject] else { - XCTFail("Tokenization options should be present") - return - } - - guard let unionPayEnrollmentParameters = tokenizationOptionsParameters["union_pay_enrollment"] as? [String: AnyObject] else { - XCTFail("UnionPay enrollment should be present") - return - } - - XCTAssertNil(unionPayEnrollmentParameters["sms_code"]) - XCTAssertEqual(unionPayEnrollmentParameters["id"] as? String, "enrollment-id") - } else { - XCTFail() - } - } - - func testTokenization_whenTokenizingUnionPayEnrolledCardSucceeds_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "creditCards": [ - [ - "nonce": "fake-nonce", - "description": "UnionPay ending in 11", - "details": [ - "lastTwo" : "11", - "cardType": "unionpay"] ] ] ] ) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - request.smsCode = "12345" - request.enrollmentID = "enrollment-id" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.tokenizeCard(request, options: nil) { (_, _) -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.nonce-received") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testTokenization_whenTokenizingUnionPayEnrolledCardFails_sendsAnalyticsEvent() { - let mockAPIClient = MockAPIClient(authorization: BTValidTestClientToken)! - mockAPIClient.cannedResponseError = NSError(domain: "FakeError", code: 0, userInfo: nil) - let cardClient = BTCardClient(apiClient: mockAPIClient) - let request = BTCardRequest() - request.card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: "123") - request.smsCode = "12345" - request.enrollmentID = "enrollment-id" - - let expectation = self.expectation(description: "Callback invoked") - cardClient.tokenizeCard(request, options: nil) { (_, _) -> Void in - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.custom.unionpay.nonce-failed") - expectation.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - // MARK: - Helpers - - func clientWithUnionPayEnabled(_ unionPayEnabled: Bool) -> BTAPIClient { - let apiClient = BTAPIClient(authorization: BTValidTestClientToken, sendAnalyticsEvent: false)! - let stubbedConfigurationHTTP = BTFakeHTTP()! - stubbedConfigurationHTTP.cannedConfiguration = BTJSON(value: ["unionPay": [ - "enabled": unionPayEnabled - ] ]) - stubbedConfigurationHTTP.cannedStatusCode = 200 - apiClient.configurationHTTP = stubbedConfigurationHTTP - return apiClient - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardNonce_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardNonce_Tests.swift deleted file mode 100755 index ecd31941..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCardNonce_Tests.swift +++ /dev/null @@ -1,104 +0,0 @@ -import XCTest - -class BTCardNonce_Tests: XCTestCase { - - override func setUp() { - super.setUp() - } - - func testCardWithJSON_createsCardWithExpectedValues() { - let cardNonce = BTCardNonce(json: BTJSON(value: [ - "description": "Visa ending in 11", - "details": [ - "cardType": "Visa", - "lastTwo": "11", - ], - "nonce": "fake-nonce", - ])) - - XCTAssertEqual(cardNonce.localizedDescription, "Visa ending in 11") - XCTAssertEqual(cardNonce.cardNetwork, BTCardNetwork.visa) - XCTAssertEqual(cardNonce.lastTwo, "11") - XCTAssertEqual(cardNonce.nonce, "fake-nonce") - XCTAssertEqual(cardNonce.type, "Visa") - } - - func testCardWithJSON_ignoresCaseWhenParsingCardType() { - let cardNonce = BTCardNonce(json: BTJSON(value: [ - "description": "Visa ending in 11", - "details": [ - "cardType": "vIsA", - "lastTwo": "11", - ], - "nonce": "fake-nonce", - ])) - - XCTAssertEqual(cardNonce.localizedDescription, "Visa ending in 11") - XCTAssertEqual(cardNonce.cardNetwork, BTCardNetwork.visa) - XCTAssertEqual(cardNonce.lastTwo, "11") - XCTAssertEqual(cardNonce.nonce, "fake-nonce") - XCTAssertEqual(cardNonce.type, "Visa") - } - - func testCardWithJSON_parsesAllCardTypesCorrectly() { - let cardNetworks = [ - BTCardNetwork.unknown, - BTCardNetwork.AMEX, - BTCardNetwork.dinersClub, - BTCardNetwork.discover, - BTCardNetwork.maestro, - BTCardNetwork.masterCard, - BTCardNetwork.JCB, - BTCardNetwork.laser, - BTCardNetwork.solo, - BTCardNetwork.switch, - BTCardNetwork.unionPay, - BTCardNetwork.ukMaestro, - BTCardNetwork.visa, - ] - let cardTypeJSONValues = [ - "some unrecognized type", - "american express", - "diners club", - "discover", - "maestro", - "mastercard", - "jcb", - "laser", - "solo", - "switch", - "unionpay", - "uk maestro", - "visa", - ] - let cardTypes = [ - "Unknown", - "AMEX", - "DinersClub", - "Discover", - "Maestro", - "MasterCard", - "JCB", - "Laser", - "Solo", - "Switch", - "UnionPay", - "UKMaestro", - "Visa", - ] - for i in 0.. -#import "BTCard_Internal.h" - -// See also BTCard_Tests -@interface BTCard_Internal_Tests : XCTestCase - -@end - -@implementation BTCard_Internal_Tests - -- (void)testParameters_standardProperties { - BTCard *card = [[BTCard alloc] initWithNumber:@"4111111111111111" - expirationMonth:@"12" - expirationYear:@"2038" - cvv:@"123"]; - BTJSON *parameters = [[BTJSON alloc] initWithValue:card.parameters]; - XCTAssertEqualObjects([parameters[@"number"] asString], @"4111111111111111"); - XCTAssertEqualObjects([parameters[@"expiration_date"] asString], @"12/2038"); - XCTAssertEqualObjects([parameters[@"cvv"] asString], @"123"); - XCTAssertTrue([parameters[@"options"][@"validate"] isFalse]); -} - -- (void)testParameters_whenShouldValidateIsTrue_encodesParametersCorrectly { - BTCard *card = [[BTCard alloc] init]; - card.shouldValidate = YES; - BTJSON *parameters = [[BTJSON alloc] initWithValue:card.parameters]; - XCTAssertTrue([parameters[@"options"][@"validate"] isTrue]); -} - -- (void)testParameters_whenShouldValidateIsTrueInParameters_encodesParametersCorrectly { - BTCard *card = [[BTCard alloc] initWithParameters:@{@"options": @{@"validate": @YES}}]; - BTJSON *parameters = [[BTJSON alloc] initWithValue:card.parameters]; - XCTAssertTrue([parameters[@"options"][@"validate"] isTrue]); -} - -- (void)testParameters_encodesAllParametersIncludingAdditionalParameters { - BTCard *card = - [[BTCard alloc] initWithParameters:@{}]; - - card.number = @"4111111111111111"; - card.expirationMonth = @"12"; - card.expirationYear = @"2038"; - card.postalCode = @"40404"; - card.streetAddress = @"724 Evergreen Terrace"; - card.locality = @"some locality"; - card.region = @"some region"; - card.countryName = @"some country name"; - card.countryCodeAlpha2 = @"US"; - - BTJSON *parameters = [[BTJSON alloc] initWithValue:card.parameters]; - XCTAssertEqualObjects([parameters[@"number"] asString], @"4111111111111111"); - XCTAssertEqualObjects([parameters[@"expiration_date"] asString], @"12/2038"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"postal_code"] asString], @"40404"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"street_address"] asString], @"724 Evergreen Terrace"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"locality"] asString], @"some locality"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"region"] asString], @"some region"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"country_name"] asString], @"some country name"); - XCTAssertEqualObjects([parameters[@"billing_address"][@"country_code_alpha2"] asString], @"US"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCard_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCard_Tests.swift deleted file mode 100755 index 61bc4454..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCard_Tests.swift +++ /dev/null @@ -1,156 +0,0 @@ -import XCTest - -// See also BTCard_Internal_Tests -class BTCard_Tests: XCTestCase { - func testInitialization_savesStandardProperties() { - let card = BTCard(number: "4111111111111111", expirationMonth:"12", expirationYear:"2038", cvv: "123") - - XCTAssertEqual(card.number!, "4111111111111111") - XCTAssertEqual(card.expirationMonth!, "12") - XCTAssertEqual(card.expirationYear!, "2038") - XCTAssertNil(card.postalCode) - XCTAssertEqual(card.cvv!, "123") - } - - func testInitialization_acceptsNilCvv() { - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2038", cvv: nil) - XCTAssertNil(card.cvv) - } - - func testInitialization_withoutParameters() { - let card = BTCard() - - card.number = "4111111111111111" - card.expirationMonth = "12" - card.expirationYear = "2038" - card.cvv = "123" - - XCTAssertEqual(card.number!, "4111111111111111") - XCTAssertEqual(card.expirationMonth!, "12") - XCTAssertEqual(card.expirationYear!, "2038") - XCTAssertNil(card.postalCode) - XCTAssertEqual(card.cvv!, "123") - } - - func testInitWithParameters_withAllValuesPresent_setsAllProperties() { - let card = BTCard(parameters: [ - "number": "4111111111111111", - "expiration_date": "12/20", - "cvv": "123", - "billing_address": [ - "street_address": "123 Townsend St", - "locality": "San Francisco", - "region": "CA", - "country_name": "United States of America", - "country_code_alpha2": "US", - "postal_code": "94107" - ], - "options": ["validate": true], - "cardholder_name": "Brian Tree" - ]) - - XCTAssertEqual(card.number, "4111111111111111") - XCTAssertEqual(card.expirationMonth, "12") - XCTAssertEqual(card.expirationYear, "20") - XCTAssertEqual(card.postalCode, "94107") - XCTAssertEqual(card.cvv, "123") - XCTAssertTrue(card.shouldValidate) - XCTAssertEqual(card.cardholderName, "Brian Tree") - XCTAssertEqual(card.streetAddress, "123 Townsend St") - XCTAssertEqual(card.locality, "San Francisco") - XCTAssertEqual(card.region, "CA") - XCTAssertEqual(card.countryName, "United States of America") - XCTAssertEqual(card.countryCodeAlpha2, "US") - XCTAssertEqual(card.postalCode, "94107") - } - - func testInitWithParameters_withEmptyParameters_setsPropertiesToExpectedValues() { - let card = BTCard(parameters: [:]) - - XCTAssertNil(card.number) - XCTAssertNil(card.expirationMonth) - XCTAssertNil(card.expirationYear) - XCTAssertNil(card.postalCode) - XCTAssertNil(card.cvv) - XCTAssertNil(card.cardholderName) - XCTAssertFalse(card.shouldValidate) - XCTAssertNil(card.streetAddress) - XCTAssertNil(card.locality) - XCTAssertNil(card.region) - XCTAssertNil(card.countryName) - XCTAssertNil(card.countryCodeAlpha2) - } - - func testInitWithParameters_withCVVAndPostalCode_setsPropertiesToExpectedValues() { - let card = BTCard(parameters: [ - "cvv": "123", - "billing_address": ["postal_code": "94949"], - ]) - - XCTAssertNil(card.number) - XCTAssertNil(card.expirationMonth) - XCTAssertNil(card.expirationYear) - XCTAssertEqual(card.postalCode, "94949") - XCTAssertEqual(card.cvv, "123") - XCTAssertFalse(card.shouldValidate) - } - - func testParameters_whenInitializedWithInitWithParameters_returnsExpectedValues() { - let card = BTCard(parameters: [ - "number": "4111111111111111", - "expiration_date": "12/20", - "cvv": "123", - "billing_address": [ - "street_address": "123 Townsend St", - "locality": "San Francisco", - "region": "CA", - "country_name": "United States of America", - "country_code_alpha2": "US", - "postal_code": "94107" - ], - "options": ["validate": false], - "cardholder_name": "Brian Tree" - ]) - - XCTAssertEqual(card.parameters() as NSObject, [ - "number": "4111111111111111", - "expiration_date": "12/20", - "cvv": "123", - "billing_address": [ - "street_address": "123 Townsend St", - "locality": "San Francisco", - "region": "CA", - "country_name": "United States of America", - "country_code_alpha2": "US", - "postal_code": "94107" - ], - "options": ["validate": false], - "cardholder_name": "Brian Tree" - ] as NSObject) - } - - func testParameters_whenInitializedWithCustomParameters_returnsExpectedValues() { - let card = BTCard(parameters: [ - "cvv": "123", - "billing_address": ["postal_code": "94949"], - "options": ["foo": "bar"], - ]) - - XCTAssertEqual(card.parameters() as NSObject, [ - "cvv": "123", - "billing_address": ["postal_code": "94949"], - "options": [ - "foo": "bar", - "validate": false, - ], - ] as NSObject) - } - - func testParameters_whenShouldValidateIsSetToNewValue_returnsExpectedValues() { - let card = BTCard(parameters: ["options": ["validate": false]]) - card.shouldValidate = true - XCTAssertEqual(card.parameters() as NSObject, [ - "options": [ "validate": true ], - ] as NSObject) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCheckoutRequest_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCheckoutRequest_Tests.swift deleted file mode 100755 index fa951e6c..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTCheckoutRequest_Tests.swift +++ /dev/null @@ -1,70 +0,0 @@ -import XCTest - -class BTPaymentRequest_Tests: XCTestCase { - - func testPaymentRequest_initializesAndCopiesCorrectly() { - let paymentRequest = BTPaymentRequest() - XCTAssertNil(paymentRequest.summaryTitle) - XCTAssertNil(paymentRequest.summaryDescription) - XCTAssertEqual("", paymentRequest.displayAmount) - XCTAssertEqual("Pay", paymentRequest.callToActionText) - XCTAssertFalse(paymentRequest.shouldHideCallToAction) - XCTAssertNil(paymentRequest.amount) - XCTAssertNil(paymentRequest.currencyCode) - XCTAssertFalse(paymentRequest.noShipping) - XCTAssertFalse(paymentRequest.presentViewControllersFromTop) - XCTAssertNil(paymentRequest.shippingAddress) - XCTAssertFalse(paymentRequest.showDefaultPaymentMethodNonceFirst) - - let paymentRequestCopy = paymentRequest.copy() as! BTPaymentRequest - XCTAssertNil(paymentRequestCopy.summaryTitle) - XCTAssertNil(paymentRequestCopy.summaryDescription) - XCTAssertEqual("", paymentRequestCopy.displayAmount) - XCTAssertEqual("Pay", paymentRequestCopy.callToActionText) - XCTAssertFalse(paymentRequestCopy.shouldHideCallToAction) - XCTAssertNil(paymentRequestCopy.amount) - XCTAssertNil(paymentRequestCopy.currencyCode) - XCTAssertFalse(paymentRequestCopy.noShipping) - XCTAssertFalse(paymentRequestCopy.presentViewControllersFromTop) - XCTAssertNil(paymentRequestCopy.shippingAddress) - XCTAssertFalse(paymentRequest.showDefaultPaymentMethodNonceFirst) - } - - func testPaymentRequest_valuesAreSetAndCopiedCorrectly() { - let paymentRequest = BTPaymentRequest() - paymentRequest.summaryTitle = "My Summary Title" - paymentRequest.summaryDescription = "My Summary Description" - paymentRequest.displayAmount = "$123.45" - paymentRequest.callToActionText = "My Call To Action" - paymentRequest.shouldHideCallToAction = true - paymentRequest.amount = "123.45" - paymentRequest.currencyCode = "USD" - paymentRequest.noShipping = true - paymentRequest.presentViewControllersFromTop = true - let shippingAddress = BTPostalAddress() - paymentRequest.shippingAddress = shippingAddress - - XCTAssertEqual("My Summary Title", paymentRequest.summaryTitle) - XCTAssertEqual("My Summary Description", paymentRequest.summaryDescription) - XCTAssertEqual("$123.45", paymentRequest.displayAmount) - XCTAssertEqual("My Call To Action", paymentRequest.callToActionText) - XCTAssertTrue(paymentRequest.shouldHideCallToAction) - XCTAssertEqual("123.45", paymentRequest.amount) - XCTAssertEqual("USD", paymentRequest.currencyCode) - XCTAssertTrue(paymentRequest.noShipping) - XCTAssertTrue(paymentRequest.presentViewControllersFromTop) - XCTAssertEqual(shippingAddress, paymentRequest.shippingAddress) - - let paymentRequestCopy = paymentRequest.copy() as! BTPaymentRequest - XCTAssertEqual("My Summary Title", paymentRequestCopy.summaryTitle) - XCTAssertEqual("My Summary Description", paymentRequestCopy.summaryDescription) - XCTAssertEqual("$123.45", paymentRequestCopy.displayAmount) - XCTAssertEqual("My Call To Action", paymentRequestCopy.callToActionText) - XCTAssertTrue(paymentRequestCopy.shouldHideCallToAction) - XCTAssertEqual("123.45", paymentRequestCopy.amount) - XCTAssertEqual("USD", paymentRequestCopy.currencyCode) - XCTAssertTrue(paymentRequestCopy.noShipping) - XCTAssertTrue(paymentRequestCopy.presentViewControllersFromTop) - XCTAssertEqual(shippingAddress, paymentRequestCopy.shippingAddress) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientMetadataSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientMetadataSpec.m deleted file mode 100755 index ddaacd57..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientMetadataSpec.m +++ /dev/null @@ -1,205 +0,0 @@ -#import "BTClientMetadata.h" -#import "BTSpecDependencies.h" - -SpecBegin(BTClientMetadata) - -describe(@"string values", ^{ - - BTMutableClientMetadata *m = [[BTMutableClientMetadata alloc] init]; - - it(@"source returns expected strings", ^{ - NSDictionary *sources = @{ - @(BTClientMetadataSourceUnknown) : @"unknown", - @(BTClientMetadataSourceForm) : @"form", - @(BTClientMetadataSourcePayPalApp) : @"paypal-app", - @(BTClientMetadataSourcePayPalBrowser) : @"paypal-browser", - @(BTClientMetadataSourceVenmoApp) : @"venmo-app", - }; - - for (NSNumber *sourceNumber in sources) { - m.source = (BTClientMetadataSourceType)sourceNumber.integerValue; - XCTAssertEqualObjects(m.sourceString, sources[sourceNumber]); - } - }); - - it(@"integration returns expected strings", ^{ - m.integration = BTClientMetadataIntegrationDropIn; - expect(m.integrationString).to.equal(@"dropin"); - - m.integration = BTClientMetadataIntegrationDropIn2; - expect(m.integrationString).to.equal(@"dropin2"); - - m.integration = BTClientMetadataIntegrationCustom; - expect(m.integrationString).to.equal(@"custom"); - - m.integration = BTClientMetadataIntegrationUnknown; - expect(m.integrationString).to.equal(@"unknown"); - }); - - it(@"sessionId returns a 32 character UUID string", ^{ - expect(m.sessionId.length).to.equal(32); - }); - - it(@"sessionId should be different than a different instance's sessionId", ^{ - BTMutableClientMetadata *m2 = [BTMutableClientMetadata new]; - expect(m.sessionId).notTo.equal(m2.sessionId); - }); - -}); - -sharedExamplesFor(@"a copied metadata instance", ^(NSDictionary *data) { - __block BTClientMetadata *original, *copied; - - beforeEach(^{ - original = data[@"original"]; - copied = data[@"copy"]; - }); - - it(@"has the same values", ^{ - expect(copied.integration).to.equal(original.integration); - expect(copied.source).to.equal(original.source); - expect(copied.sessionId).to.equal(original.sessionId); - }); -}); - - -describe(@"mutableMetadata", ^{ - - __block BTMutableClientMetadata *mutableMetadata; - - beforeEach(^{ - mutableMetadata = [[BTMutableClientMetadata alloc] init]; - }); - - describe(@"init", ^{ - it(@"has expected default values", ^{ - expect(mutableMetadata.integration).to.equal(BTClientMetadataIntegrationCustom); - expect(mutableMetadata.source).to.equal(BTClientMetadataSourceUnknown); - }); - }); - - context(@"with non-default values", ^{ - beforeEach(^{ - mutableMetadata.integration = BTClientMetadataIntegrationDropIn; - mutableMetadata.source = BTClientMetadataSourcePayPalApp; - }); - - describe(@"copy", ^{ - __block BTClientMetadata *copied; - beforeEach(^{ - copied = [mutableMetadata copy]; - }); - - itBehavesLike(@"a copied metadata instance", ^{ - return @{@"original" : mutableMetadata, - @"copy" : copied}; - }); - - it(@"returns a different, immutable instance", ^{ - expect(mutableMetadata).toNot.beIdenticalTo(copied); - expect([copied isKindOfClass:[BTClientMetadata class]]).to.beTruthy(); - expect([copied isKindOfClass:[BTMutableClientMetadata class]]).to.beFalsy(); - }); - }); - - describe(@"mutableCopy", ^{ - __block BTMutableClientMetadata *copied; - beforeEach(^{ - copied = [mutableMetadata mutableCopy]; - }); - - itBehavesLike(@"a copied metadata instance", ^{ - return @{@"original" : mutableMetadata, - @"copy" : copied}; - }); - - it(@"returns a different, immutable instance", ^{ - expect(mutableMetadata).toNot.beIdenticalTo(copied); - expect([copied isKindOfClass:[BTClientMetadata class]]).to.beTruthy(); - expect([copied isKindOfClass:[BTMutableClientMetadata class]]).to.beTruthy(); - }); - }); - }); -}); - -describe(@"metadata", ^{ - - __block BTClientMetadata *metadata; - - beforeEach(^{ - metadata = [[BTClientMetadata alloc] init]; - }); - - describe(@"init", ^{ - it(@"has expected default values", ^{ - expect(metadata.integration).to.equal(BTClientMetadataIntegrationCustom); - expect(metadata.source).to.equal(BTClientMetadataSourceUnknown); - }); - }); - - context(@"with non-default values", ^{ - beforeEach(^{ - metadata = ({ - BTMutableClientMetadata *mutableMetadata = [[BTMutableClientMetadata alloc] init]; - mutableMetadata.integration = BTClientMetadataIntegrationDropIn; - mutableMetadata.source = BTClientMetadataSourcePayPalApp; - [mutableMetadata copy]; - }); - }); - - describe(@"copy", ^{ - __block BTClientMetadata *copied; - beforeEach(^{ - copied = [metadata copy]; - }); - - itBehavesLike(@"a copied metadata instance", ^{ - return @{@"original" : metadata, - @"copy" : copied}; - }); - - it(@"returns a different, immutable instance", ^{ - expect(metadata).toNot.beIdenticalTo(copied); - expect([copied isKindOfClass:[BTClientMetadata class]]).to.beTruthy(); - expect([copied isKindOfClass:[BTMutableClientMetadata class]]).to.beFalsy(); - }); - }); - - describe(@"mutableCopy", ^{ - __block BTMutableClientMetadata *copied; - beforeEach(^{ - copied = [metadata mutableCopy]; - }); - - itBehavesLike(@"a copied metadata instance", ^{ - return @{@"original" : metadata, - @"copy" : copied}; - }); - - it(@"returns a different, immutable instance", ^{ - expect(copied).toNot.beIdenticalTo(metadata); - expect([copied isKindOfClass:[BTClientMetadata class]]).to.beTruthy(); - expect([copied isKindOfClass:[BTMutableClientMetadata class]]).to.beTruthy(); - }); - }); - }); -}); - -SpecEnd - -@interface BTClientMetadata_Tests : XCTestCase -@end - -@implementation BTClientMetadata_Tests - -- (void)testParameters_ReturnsTheMetadataMetaParametersForPosting { - BTClientMetadata *metadata = [[BTClientMetadata alloc] init]; - NSDictionary *parameters = metadata.parameters; - expect(parameters).to.equal( - @{@"integration": metadata.integrationString, - @"source": metadata.sourceString, - @"sessionId": metadata.sessionId, - }); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientTokenSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientTokenSpec.m deleted file mode 100755 index 428b298e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTClientTokenSpec.m +++ /dev/null @@ -1,149 +0,0 @@ -#import "BTClientToken.h" -#import "BTTestClientTokenFactory.h" -#import -#import - -@interface BTClientToken_Tests : XCTestCase -@end - -@implementation BTClientToken_Tests - -- (void)testInitialization_whenVersionIsUnsupported_returnsError { - NSError *error; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:[BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ @"version": @0 }] error:&error]; - XCTAssertNil(clientToken); - XCTAssertEqualObjects(error.domain, BTClientTokenErrorDomain); - XCTAssertEqual(error.code, BTClientTokenErrorUnsupportedVersion); -} - -- (void)testInitialization_withV1RawJSONClientTokens_isSuccessful { - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:[BTTestClientTokenFactory tokenWithVersion:1 overrides:@{ BTClientTokenKeyConfigURL: @"https://api.example.com:443/merchants/a_merchant_id/client_api/v1/configuration"}] error:NULL]; - XCTAssertEqualObjects(clientToken.authorizationFingerprint, @"an_authorization_fingerprint"); - XCTAssertEqualObjects(clientToken.configURL, [NSURL URLWithString:@"https://api.example.com:443/merchants/a_merchant_id/client_api/v1/configuration"]); -} - -- (void)testInitialization_withV2Base64EncodedClientTokens_isSuccessful { - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:[BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyConfigURL: @"https://api.example.com:443/merchants/a_merchant_id/client_api/v1/configuration" }] error:NULL]; - XCTAssertEqualObjects(clientToken.authorizationFingerprint, @"an_authorization_fingerprint"); - XCTAssertEqualObjects(clientToken.configURL, [NSURL URLWithString:@"https://api.example.com:443/merchants/a_merchant_id/client_api/v1/configuration"]); -} - -- (void)testInitialization_withInvalidJSON_returnsError { - NSError *error; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:@"definitely_not_a_client_token" error:&error]; - - XCTAssertNil(clientToken); - XCTAssertEqualObjects(error.domain, BTClientTokenErrorDomain); - XCTAssertEqual(error.code, BTClientTokenErrorInvalid); - XCTAssertEqualObjects([error.userInfo[NSUnderlyingErrorKey] domain], NSCocoaErrorDomain); -} - -#pragma mark - Edge cases - -- (void)testInitialization_whenConfigURLIsBlank_returnsError { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyConfigURL: @"" }]; - NSError *error; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:&error]; - - XCTAssertNil(clientToken); - XCTAssertEqualObjects(error.domain, BTClientTokenErrorDomain); - XCTAssertEqual(error.code, BTClientTokenErrorInvalid); - expect([error localizedDescription]).to.contain(@"config url"); -} - -- (void)testInitialization_whenAuthorizationFingerprintIsOmitted_returnsError { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyAuthorizationFingerprint: NSNull.null }]; - NSError *error; - - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:&error]; - - XCTAssertNil(clientToken); - XCTAssertEqualObjects(error.domain, BTClientTokenErrorDomain); - XCTAssertEqual(error.code, BTClientTokenErrorInvalid); - expect([error localizedDescription]).to.contain(@"Invalid client token."); - expect([error localizedFailureReason]).to.contain(@"Authorization fingerprint"); -} - -- (void)testInitialization_whenAuthorizationFingerprintIsBlank_returnsError { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyAuthorizationFingerprint: @"" }]; - NSError *error; - - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:&error]; - - XCTAssertNil(clientToken); - XCTAssertEqualObjects(error.domain, BTClientTokenErrorDomain); - XCTAssertEqual(error.code, BTClientTokenErrorInvalid); - expect([error localizedDescription]).to.contain(@"Invalid client token."); - expect([error localizedFailureReason]).to.contain(@"Authorization fingerprint"); -} - -#pragma mark - NSCoding - -- (void)testNSCoding_afterEncodingAndDecodingClientToken_preservesClientTokenDataIntegrity { - NSString *clientTokenEncodedJSON = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ - BTClientTokenKeyConfigURL: @"https://api.example.com/client_api/v1/configuration", - BTClientTokenKeyAuthorizationFingerprint: @"an_authorization_fingerprint|created_at=2014-02-12T18:02:30+0000&customer_id=1234567&public_key=integration_public_key" }]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenEncodedJSON error:NULL]; - - NSMutableData *data = [NSMutableData data]; - NSKeyedArchiver *coder = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; - [clientToken encodeWithCoder:coder]; - [coder finishEncoding]; - - NSKeyedUnarchiver *decoder = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; - BTClientToken *returnedClientToken = [[BTClientToken alloc] initWithCoder:decoder]; - [decoder finishDecoding]; - - expect(returnedClientToken.configURL).to.equal([NSURL URLWithString:@"https://api.example.com/client_api/v1/configuration"]); - expect(returnedClientToken.authorizationFingerprint).to.equal(@"an_authorization_fingerprint|created_at=2014-02-12T18:02:30+0000&customer_id=1234567&public_key=integration_public_key"); -} - -#pragma mark - isEqual - -- (void)testIsEqual_whenTokensContainTheSameValues_returnsTrue { - NSString *clientTokenEncodedJSON = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyAuthorizationFingerprint: @"abcd" }]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenEncodedJSON error:NULL]; - BTClientToken *clientToken2 = [[BTClientToken alloc] initWithClientToken:clientTokenEncodedJSON error:NULL]; - - XCTAssertNotNil(clientToken); - XCTAssertTrue([clientToken isEqual:clientToken2]); -} - -- (void)testIsEqual_whenTokensDoNotContainTheSameValues_returnsFalse { - NSString *clientTokenString1 = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyAuthorizationFingerprint: @"one_auth_fingerprint" }]; - NSString *clientTokenString2 = [BTTestClientTokenFactory tokenWithVersion:2 overrides:@{ BTClientTokenKeyAuthorizationFingerprint: @"different_auth_fingerprint" }]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenString1 error:nil]; - BTClientToken *clientToken2 = [[BTClientToken alloc] initWithClientToken:clientTokenString2 error:nil]; - - XCTAssertNotNil(clientToken); - XCTAssertFalse([clientToken isEqual:clientToken2]); -} - -#pragma mark - NSCopying - -- (void)testCopy_returnsADifferentInstance { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:NULL]; - - XCTAssertTrue([clientToken copy] != clientToken); -} - -- (void)testCopy_returnsAnEquivalentInstance { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:NULL]; - - XCTAssertEqualObjects([clientToken copy], clientToken); -} - -- (void)testCopy_returnsAnInstanceWithEqualValues { - NSString *clientTokenRawJSON = [BTTestClientTokenFactory tokenWithVersion:2]; - BTClientToken *clientToken = [[BTClientToken alloc] initWithClientToken:clientTokenRawJSON error:NULL]; - BTClientToken *copiedClientToken = [clientToken copy]; - - XCTAssertEqualObjects(copiedClientToken.configURL, clientToken.configURL); - XCTAssertEqualObjects(copiedClientToken.json.asDictionary, clientToken.json.asDictionary); - XCTAssertEqualObjects(copiedClientToken.authorizationFingerprint, clientToken.authorizationFingerprint); - XCTAssertEqualObjects(copiedClientToken.originalValue, clientToken.originalValue); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTConfiguration_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTConfiguration_Tests.swift deleted file mode 100755 index 8ec8c8ae..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTConfiguration_Tests.swift +++ /dev/null @@ -1,213 +0,0 @@ -import XCTest -import PassKit - -class BTConfiguration_Tests: XCTestCase { - - override func tearDown() { - BTConfiguration.setBetaPaymentOption("venmo", isEnabled: false) - } - - func testInitWithJSON_setsJSON() { - let json = BTJSON(value: [ - "some": "things", - "number": 1, - "array": [1, 2, 3]]) - let configuration = BTConfiguration(json: json) - - XCTAssertEqual(configuration.json, json) - } - - // MARK: - Beta enabled payment option - - func testIsBetaEnabledPaymentOption_returnsFalse() { - XCTAssertFalse(BTConfiguration.isBetaEnabledPaymentOption("venmo")) - } - - // MARK: - Venmo category methods - - func testIsVenmoEnabled_whenBetaVenmoIsEnabledAndAccessTokenIsPresent_returnsTrue() { - let configurationJSON = BTJSON(value: [ - "payWithVenmo": [ "accessToken": "some access token" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertTrue(configuration.isVenmoEnabled) - } - - func testIsVenmoEnabled_whenBetaVenmoIsEnabledAndAccessTokenNotPresent_returnsFalse() { - let configurationJSON = BTJSON(value: [ - "payWithVenmo": [] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertFalse(configuration.isVenmoEnabled) - } - - func testVenmoAccessToken_returnsVenmoAccessToken() { - let configurationJSON = BTJSON(value: [ - "payWithVenmo": [ "accessToken": "some access token" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.venmoAccessToken, "some access token") - } - - func testEnableVenmo_whenDisabled_setsVenmoBetaPaymentOptionToFalse() { - BTConfiguration.enableVenmo(false) - XCTAssertFalse(BTConfiguration.isBetaEnabledPaymentOption("venmo")) - } - - // MARK: - PayPal category methods - - func testIsPayPalEnabled_returnsPayPalEnabledStatusFromConfigurationJSON() { - for isPayPalEnabled in [true, false] { - let configurationJSON = BTJSON(value: [ "paypalEnabled": isPayPalEnabled ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertTrue(configuration.isPayPalEnabled == isPayPalEnabled) - } - } - - func testIsPayPalEnabled_whenPayPalEnabledStatusNotPresentInConfigurationJSON_returnsFalse() { - let configuration = BTConfiguration(json: BTJSON(value: [])) - XCTAssertFalse(configuration.isPayPalEnabled) - } - - func testIsBillingAgreementsEnabled_returnsBillingAgreementsStatusFromConfigurationJSON() { - for isBillingAgreementsEnabled in [true, false] { - let configurationJSON = BTJSON(value: [ - "paypal": [ "billingAgreementsEnabled": isBillingAgreementsEnabled] - ]) - let configuration = BTConfiguration(json: configurationJSON) - XCTAssertTrue(configuration.isBillingAgreementsEnabled == isBillingAgreementsEnabled) - } - } - - // MARK: - Apple Pay category methods - - func testIsApplePayEnabled_whenApplePayStatusFromConfigurationJSONIsAString_returnsTrue() { - for applePayStatus in ["mock", "production", "asdfasdf"] { - let configurationJSON = BTJSON(value: [ - "applePay": [ "status": applePayStatus ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertTrue(configuration.isApplePayEnabled) - } - } - - func testIsApplePayEnabled_whenApplePayStatusFromConfigurationJSONIsGarbage_returnsFalse() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "status": 3.14 ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertFalse(configuration.isApplePayEnabled) - } - - func testIsApplePayEnabled_whenApplePayStatusFromConfigurationJSONIsOff_returnsFalse() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "status": "off" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertFalse(configuration.isApplePayEnabled) - } - - func testApplePayCountryCode_returnsCountryCode() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "countryCode": "US" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePayCountryCode!, "US") - } - - func testApplePayCurrencyCode_returnsCurrencyCode() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "currencyCode": "USD" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePayCurrencyCode!, "USD") - } - - func testApplePayMerchantIdentifier_returnsMerchantIdentifier() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "merchantIdentifier": "com.merchant.braintree-unit-tests" ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePayMerchantIdentifier!, "com.merchant.braintree-unit-tests") - } - - func testApplePaySupportedNetworks_returnsSupportedNetworks() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "supportedNetworks": ["visa", "mastercard", "amex"] ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePaySupportedNetworks!, [PKPaymentNetwork.visa, PKPaymentNetwork.masterCard, PKPaymentNetwork.amex]) - } - - func testApplePaySupportedNetworks_whenRunningBelowiOS9_doesNotReturnDiscover() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "supportedNetworks": ["discover"] ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - guard #available(iOS 9, *) else { - XCTAssertEqual(configuration.applePaySupportedNetworks!, []) - return - } - } - - @available(iOS 9.0, *) - func testApplePaySupportedNetworks_whenSupportedNetworksIncludesDiscover_returnsSupportedNetworks() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "supportedNetworks": ["discover"] ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePaySupportedNetworks!, [PKPaymentNetwork.discover]) - } - - func testApplePaySupportedNetworks_doesNotPassesThroughUnknownValuesFromConfiguration() { - let configurationJSON = BTJSON(value: [ - "applePay": [ "supportedNetworks": ["ChinaUnionPay", "Interac", "PrivateLabel"] ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertEqual(configuration.applePaySupportedNetworks!, []) - - } - - // MARK: - UnionPay category methods - - func testIsUnionPayEnabled_whenUnionPayEnabledFromConfigurationJSONIsTrue_returnsTrue() { - let configurationJSON = BTJSON(value: [ - "unionPay": [ "enabled": true ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertTrue(configuration.isUnionPayEnabled) - } - - func testIsUnionPayEnabled_whenUnionPayEnabledFromConfigurationJSONIsFalse_returnsFalse() { - let configurationJSON = BTJSON(value: [ - "unionPay": [ "enabled": false ] - ]) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertFalse(configuration.isUnionPayEnabled) - - } - - func testIsUnionPayEnabled_whenUnionPayEnabledFromConfigurationJSONIsMissing_returnsFalse() { - let configurationJSON = BTJSON(value: []) - let configuration = BTConfiguration(json: configurationJSON) - - XCTAssertFalse(configuration.isUnionPayEnabled) - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDataCollector_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDataCollector_Tests.swift deleted file mode 100755 index 3a7b0d58..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDataCollector_Tests.swift +++ /dev/null @@ -1,272 +0,0 @@ -import XCTest -import PayPalDataCollector -// FIXME: comparison operators with optionals were removed from the Swift Standard Libary. -// Consider refactoring the code to use the non-optional operators. -fileprivate func < (lhs: T?, rhs: T?) -> Bool { - switch (lhs, rhs) { - case let (l?, r?): - return l < r - case (nil, _?): - return true - default: - return false - } -} - -// FIXME: comparison operators with optionals were removed from the Swift Standard Libary. -// Consider refactoring the code to use the non-optional operators. -fileprivate func >= (lhs: T?, rhs: T?) -> Bool { - switch (lhs, rhs) { - case let (l?, r?): - return l >= r - default: - return !(lhs < rhs) - } -} - -// FIXME: comparison operators with optionals were removed from the Swift Standard Libary. -// Consider refactoring the code to use the non-optional operators. -fileprivate func > (lhs: T?, rhs: T?) -> Bool { - switch (lhs, rhs) { - case let (l?, r?): - return l > r - default: - return rhs < lhs - } -} - - -class BTDataCollector_Tests: XCTestCase { - - var testDelegate: TestDelegateForBTDataCollector? - - /// We check the delegate because it's the only exposed property of the dataCollector - func testInitsWithNilDelegate() { - let dataCollector = BTDataCollector(environment: BTDataCollectorEnvironment.sandbox) - XCTAssertNil(dataCollector.delegate) - } - - func testSuccessfullyCollectsCardDataAndCallsDelegateMethods() { - let dataCollector = BTDataCollector(environment: .sandbox) - testDelegate = TestDelegateForBTDataCollector(didStartExpectation: expectation(description: "didStart"), didCompleteExpectation: expectation(description: "didComplete")) - dataCollector.delegate = testDelegate - let stubKount = FakeDeviceCollectorSDK() - dataCollector.kount = stubKount - - let jsonString = dataCollector.collectCardFraudData() - - let data = jsonString.data(using: String.Encoding.utf8) - let dictionary = try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers) as! Dictionary - XCTAssert((dictionary["device_session_id"] as! String).characters.count >= 32) - XCTAssertEqual(dictionary["fraud_merchant_id"] as? String, "600000") // BTDataCollectorSharedMerchantId - waitForExpectations(timeout: 10, handler: nil) - } - - /// Ensure that both Kount and PayPal data can be collected together - func testCollectFraudData() { - let dataCollector = BTDataCollector(environment: .sandbox) - testDelegate = TestDelegateForBTDataCollector(didStartExpectation: expectation(description: "didStart"), didCompleteExpectation: expectation(description: "didComplete")) - dataCollector.delegate = testDelegate - let stubKount = FakeDeviceCollectorSDK() - dataCollector.kount = stubKount - BTDataCollector.setPayPalDataCollectorClass(FakePPDataCollector.self) - - let jsonString = dataCollector.collectFraudData() - - let data = jsonString.data(using: String.Encoding.utf8) - let dictionary = try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers) as! Dictionary - XCTAssert((dictionary["device_session_id"] as! String).characters.count >= 32) - XCTAssertEqual(dictionary["fraud_merchant_id"] as? String, "600000") // BTDataCollectorSharedMerchantId - - // Ensure correlation_id (clientMetadataId) is not nil and has a length of at least 12. - // This is just a guess of a reasonable id length. In practice, the id - // typically has a length of 32. - XCTAssertEqual(dictionary["correlation_id"] as? String, "fakeclientmetadataid") - - waitForExpectations(timeout: 2, handler: nil) - } - - func testCollectCardFraudData_doesNotReturnCorrelationId() { - let config = [ - "environment":"development" as AnyObject, - "kount": [ - "enabled": true, - "kountMerchantId": "500000" - ] - ] as [String : Any] - let apiClient = clientThatReturnsConfiguration(config as [String : AnyObject]) - - let dataCollector = BTDataCollector(apiClient: apiClient) - let expectation = self.expectation(description: "Returns fraud data") - - dataCollector.collectCardFraudData { (fraudData: String) in - let json = BTJSON(data: fraudData.data(using: String.Encoding.utf8)!) - XCTAssertNil(json["correlation_id"] as? String) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testOverrideMerchantId_usesMerchantProvidedId() { - let config = [ - "environment":"development", - "kount": [ - "enabled": true, - "kountMerchantId": "500000" - ] - ] as [String : Any] - - let apiClient = clientThatReturnsConfiguration(config as [String : AnyObject]) - - let dataCollector = BTDataCollector(apiClient: apiClient) - dataCollector.setFraudMerchantId("500001") - let expectation = self.expectation(description: "Returns fraud data") - - dataCollector.collectFraudData { (fraudData: String) in - let json = BTJSON(data: fraudData.data(using: String.Encoding.utf8)!) - XCTAssertEqual((json["fraud_merchant_id"] as AnyObject).asString(), "500001") - XCTAssert((json["device_session_id"] as AnyObject).asString()?.characters.count >= 32) - XCTAssert((json["correlation_id"] as AnyObject).asString()?.characters.count > 0) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testCollectFraudDataWithCompletionBlock_whenMerchantHasKountConfiguration_usesConfiguration() { - let config = [ - "environment": "development" as AnyObject, - "kount": [ - "enabled": true, - "kountMerchantId": "500000" - ] - ] as [String : Any] - let apiClient = clientThatReturnsConfiguration(config as [String : AnyObject]) - let dataCollector = BTDataCollector(apiClient: apiClient) - - let expectation = self.expectation(description: "Returns fraud data") - dataCollector.collectFraudData { fraudData in - let json = BTJSON(data: fraudData.data(using: String.Encoding.utf8)!) - XCTAssertEqual((json["fraud_merchant_id"] as AnyObject).asString(), "500000") - XCTAssert((json["device_session_id"] as AnyObject).asString()!.characters.count >= 32) - XCTAssert((json["correlation_id"] as AnyObject).asString()!.characters.count > 0) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testCollectFraudDataWithCompletionBlock_whenMerchantHasKountConfiguration_setsMerchantIDOnKount() { - let config = [ - "environment": "sandbox", - "kount": [ - "enabled": true, - "kountMerchantId": "500000" - ] - ] as [String : Any] - let apiClient = clientThatReturnsConfiguration(config as [String : AnyObject]) - let dataCollector = BTDataCollector(apiClient: apiClient) - let stubKount = FakeDeviceCollectorSDK() - dataCollector.kount = stubKount - - let expectation = self.expectation(description: "Returns fraud data") - dataCollector.collectFraudData { fraudData in - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertEqual(500000, stubKount.merchantID) - XCTAssertEqual(KEnvironment.test, stubKount.environment) - } - - func testCollectFraudData_doesNotCollectKountDataIfDisabledInConfiguration() { - let apiClient = clientThatReturnsConfiguration([ - "environment":"development" as AnyObject - ]) - - let dataCollector = BTDataCollector(apiClient: apiClient) - let expectation = self.expectation(description: "Returns fraud data") - dataCollector.collectFraudData { fraudData in - let json = BTJSON(data: fraudData.data(using: String.Encoding.utf8)!) - XCTAssertNil(json["fraud_merchant_id"] as? String) - XCTAssertNil(json["device_session_id"] as? String) - XCTAssert((json["correlation_id"] as AnyObject).asString()?.characters.count > 0) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } -} - -func clientThatReturnsConfiguration(_ configuration: [String:AnyObject]) -> BTAPIClient { - let apiClient = BTAPIClient(authorization: "development_tokenization_key", sendAnalyticsEvent: false)! - let fakeHttp = BTFakeHTTP()! - let cannedConfig = BTJSON(value: configuration) - fakeHttp.cannedConfiguration = cannedConfig - fakeHttp.cannedStatusCode = 200 - apiClient.configurationHTTP = fakeHttp - - return apiClient -} - -class TestDelegateForBTDataCollector: NSObject, BTDataCollectorDelegate { - - var didStartExpectation: XCTestExpectation? - var didCompleteExpectation: XCTestExpectation? - - var didFailExpectation: XCTestExpectation? - var error: NSError? - - init(didStartExpectation: XCTestExpectation, didCompleteExpectation: XCTestExpectation) { - self.didStartExpectation = didStartExpectation - self.didCompleteExpectation = didCompleteExpectation - } - - init(didFailExpectation: XCTestExpectation) { - self.didFailExpectation = didFailExpectation - } - - func dataCollectorDidStart(_ dataCollector: BTDataCollector) { - didStartExpectation?.fulfill() - } - - func dataCollectorDidComplete(_ dataCollector: BTDataCollector) { - didCompleteExpectation?.fulfill() - } - - func dataCollector(_ dataCollector: BTDataCollector, didFailWithError error: Error) { - self.error = error as NSError - self.didFailExpectation?.fulfill() - } -} - -class FakeDeviceCollectorSDK: KDataCollector { - - var lastCollectSessionID: String? - var forceError = false - - override func collect(forSession sessionID: String, completion completionBlock: ((String, Bool, Error?) -> Void)? = nil) { - lastCollectSessionID = sessionID - if forceError { - completionBlock?("1981", false, NSError(domain: "Fake", code: 1981, userInfo: nil)) - } else { - completionBlock?(sessionID, true, nil) - } - } -} - -class FakePPDataCollector: PPDataCollector { - - static var didGetClientMetadataID = false - - override class func generateClientMetadataID() -> String { - return generateClientMetadataID(nil) - } - - override class func generateClientMetadataID(_ pairingID: String?) -> String { - didGetClientMetadataID = true - return "fakeclientmetadataid" - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInErrorState_Tests.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInErrorState_Tests.m deleted file mode 100755 index 4bca235a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInErrorState_Tests.m +++ /dev/null @@ -1,122 +0,0 @@ -#import -#import "BTHTTP.h" -#import "BTDropInErrorState.h" -#import "BTErrors.h" -#import "BTUICardFormView.h" - -@interface BTDropInErrorState_Tests : XCTestCase - -@end - -@implementation BTDropInErrorState_Tests - -- (void)testErrorTitle_returnsErrorTitleBasedOnNSErrorTopLevelErrorMessage { - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ - @"field": @"cvv", - @"message": @"CVV is required" } - ] - }]}; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeClientError - userInfo:userInfo]; - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - XCTAssertEqualObjects(state.errorTitle, @"Credit Card is Invalid"); -} - -- (void)testErrorTitle_whenThereAreNoFieldErrorsAssociated_returnsErrorTitleBasedOnNSErrorTopLevelErrorMessage { - NSDictionary *validationErrors = @{ @"error": @{ @"message": @"Everything is Invalid" } }; - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeClientError - userInfo:userInfo]; - - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - XCTAssertEqualObjects(state.errorTitle, @"Everything is Invalid"); -} - -- (void)testHighlightedFields_whenErrorUserInfoHasFieldErrors_returnsSetOfFieldsWithValidationErrorsAssociated { - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ @"field": @"cvv", - @"message": @"CVV is required" }, - @{ @"field": @"billingAddress", - @"fieldErrors": @[@{ @"field": @"postalCode", - @"message": @"Postal Code is required" }], - }, - @{ @"field": @"number", - @"message": @"Number is required" }, - @{ @"field": @"expirationDate", - @"message": @"Expiration date is required" }, - ] - }]}; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeClientError - userInfo:userInfo]; - - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - - XCTAssertTrue(state.highlightedFields.count == 4); - XCTAssertTrue([state.highlightedFields containsObject:@(BTUICardFormFieldNumber)]); - XCTAssertTrue([state.highlightedFields containsObject:@(BTUICardFormFieldExpiration)]); - XCTAssertTrue([state.highlightedFields containsObject:@(BTUICardFormFieldCvv)]); - XCTAssertTrue([state.highlightedFields containsObject:@(BTUICardFormFieldPostalCode)]); -} - -- (void)testHighlightedFields_whenErrorUserInfoHasNoFieldErrors_returnsEmptySet { - NSDictionary *validationErrors = @{@"error": @{ - @"message": @"Credit Card is Invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ @"field": @"paymentMethodNonce", - @"message": @"Payment method nonces cannot be used to update an existing card." }, - ] - }]}; - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeClientError - userInfo:userInfo]; - - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - - XCTAssertTrue(state.highlightedFields.count == 0); -} - -- (void)testHighlightedFields_whenErrorContainsUnknownFields_ignoresThem { - NSDictionary *validationErrors = @{@"error": @{ @"message": @"Everything is invalid" }, - @"fieldErrors": @[ - @{ - @"field": @"creditCard", - @"fieldErrors": @[ - @{ @"field": @"unknownField", - @"message": @"You can't highlight what you can't understand!" }, - ] - }] - }; - - NSDictionary *userInfo = @{BTCustomerInputBraintreeValidationErrorsKey: validationErrors}; - NSError *error = [[NSError alloc] initWithDomain:BTHTTPErrorDomain - code:BTHTTPErrorCodeClientError - userInfo:userInfo]; - - BTDropInErrorState *state = [[BTDropInErrorState alloc] initWithError:error]; - - XCTAssertTrue(state.highlightedFields.count == 0); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInUtil_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInUtil_Tests.swift deleted file mode 100755 index ccaced2a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInUtil_Tests.swift +++ /dev/null @@ -1,17 +0,0 @@ -import XCTest - -class BTDropInUtil_Tests: XCTestCase { - func testBTDropInUtil_topViewControllerReturnsViewController() { - let topInitialTopController = BTDropInUtil.topViewController() - XCTAssertNotNil(topInitialTopController, "Top UIViewController should not be nil") - - let windowRootController = UIViewController() - let secondWindow = UIWindow(frame: UIScreen.main.bounds) - secondWindow.rootViewController = windowRootController - secondWindow.makeKeyAndVisible() - secondWindow.windowLevel = 100 - let topSecondTopController = BTDropInUtil.topViewController() - XCTAssertNotEqual(topInitialTopController, topSecondTopController) - XCTAssertEqual(windowRootController, topSecondTopController) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInViewController_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInViewController_Tests.swift deleted file mode 100755 index 81f4b4e5..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTDropInViewController_Tests.swift +++ /dev/null @@ -1,215 +0,0 @@ -import XCTest - -class BTDropInViewController_Tests: XCTestCase { - - class BTDropInViewControllerTestDelegate : NSObject, BTDropInViewControllerDelegate { - var didLoadExpectation: XCTestExpectation - - init(didLoadExpectation: XCTestExpectation) { - self.didLoadExpectation = didLoadExpectation - } - - @objc func drop(_ viewController: BTDropInViewController, didSucceedWithTokenization paymentMethodNonce: BTPaymentMethodNonce) {} - - @objc func drop(inViewControllerDidCancel viewController: BTDropInViewController) {} - - @objc func drop(inViewControllerDidLoad viewController: BTDropInViewController) { - didLoadExpectation.fulfill() - } - } - - var window : UIWindow! - var viewController : UIViewController! - let ValidClientToken = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI3ODJhZmFlNDJlZTNiNTA4NWUxNmMzYjhkZTY3OGQxNTJhODFlYzk5MTBmZDNhY2YyYWU4MzA2OGI4NzE4YWZhfGNyZWF0ZWRfYXQ9MjAxNS0wOC0yMFQwMjoxMTo1Ni4yMTY1NDEwNjErMDAwMFx1MDAyNmN1c3RvbWVyX2lkPTM3OTU5QTE5LThCMjktNDVBNC1CNTA3LTRFQUNBM0VBOEM4Nlx1MDAyNm1lcmNoYW50X2lkPWRjcHNweTJicndkanIzcW5cdTAwMjZwdWJsaWNfa2V5PTl3d3J6cWszdnIzdDRuYzgiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzL2RjcHNweTJicndkanIzcW4vY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIn0sInRocmVlRFNlY3VyZUVuYWJsZWQiOnRydWUsInRocmVlRFNlY3VyZSI6eyJsb29rdXBVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi90aHJlZV9kX3NlY3VyZS9sb29rdXAifSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjpmYWxzZSwibWVyY2hhbnRBY2NvdW50SWQiOiJzdGNoMm5mZGZ3c3p5dHc1IiwiY3VycmVuY3lJc29Db2RlIjoiVVNEIn0sImNvaW5iYXNlRW5hYmxlZCI6dHJ1ZSwiY29pbmJhc2UiOnsiY2xpZW50SWQiOiIxMWQyNzIyOWJhNThiNTZkN2UzYzAxYTA1MjdmNGQ1YjQ0NmQ0ZjY4NDgxN2NiNjIzZDI1NWI1NzNhZGRjNTliIiwibWVyY2hhbnRBY2NvdW50IjoiY29pbmJhc2UtZGV2ZWxvcG1lbnQtbWVyY2hhbnRAZ2V0YnJhaW50cmVlLmNvbSIsInNjb3BlcyI6ImF1dGhvcml6YXRpb25zOmJyYWludHJlZSB1c2VyIiwicmVkaXJlY3RVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbS9jb2luYmFzZS9vYXV0aC9yZWRpcmVjdC1sYW5kaW5nLmh0bWwiLCJlbnZpcm9ubWVudCI6Im1vY2sifSwibWVyY2hhbnRJZCI6ImRjcHNweTJicndkanIzcW4iLCJ2ZW5tbyI6Im9mZmxpbmUiLCJhcHBsZVBheSI6eyJzdGF0dXMiOiJtb2NrIiwiY291bnRyeUNvZGUiOiJVUyIsImN1cnJlbmN5Q29kZSI6IlVTRCIsIm1lcmNoYW50SWRlbnRpZmllciI6Im1lcmNoYW50LmNvbS5icmFpbnRyZWVwYXltZW50cy5zYW5kYm94LkJyYWludHJlZS1EZW1vIiwic3VwcG9ydGVkTmV0d29ya3MiOlsidmlzYSIsIm1hc3RlcmNhcmQiLCJhbWV4Il19fQ==" - - override func setUp() { - super.setUp() - - viewController = UIApplication.shared.windows[0].rootViewController - } - - override func tearDown() { - if viewController.presentedViewController != nil { - viewController.dismiss(animated: false, completion: nil) - } - - super.tearDown() - } - - func testInitializesWithCheckoutRequestCorrectly() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let request = BTPaymentRequest() - let dropInViewController = BTDropInViewController(apiClient: apiClient) - dropInViewController.paymentRequest = request - XCTAssertEqual(request, dropInViewController.paymentRequest) - XCTAssertEqual(apiClient.tokenizationKey, dropInViewController.apiClient.tokenizationKey) - - // By default, Drop-in does not set any bar button items. The developer should embed Drop-in in a navigation controller - // as seen in BraintreeDemoDropInViewController, or provide some other way to dismiss Drop-in. - XCTAssertNil(dropInViewController.navigationItem.leftBarButtonItem) - XCTAssertNil(dropInViewController.navigationItem.rightBarButtonItem) - - let didLoadExpectation = self.expectation(description: "Drop-in did finish loading") - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) // for strong reference - dropInViewController.delegate = testDelegate - - DispatchQueue.main.async { () -> Void in - self.viewController.present(dropInViewController, animated: false, completion: nil) - } - - self.waitForExpectations(timeout: 5, handler: nil) - } - - func testInitializesWithoutCheckoutRequestCorrectly() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let request = BTPaymentRequest() - - // When this is true, the call to action control will be hidden from Drop-in's content view. Instead, a submit button will be - // added as a navigation bar button item. The default value is false. - request.shouldHideCallToAction = true - - let dropInViewController = BTDropInViewController(apiClient: apiClient) - dropInViewController.paymentRequest = request - - XCTAssertEqual(request, dropInViewController.paymentRequest) - XCTAssertEqual(apiClient.tokenizationKey, dropInViewController.apiClient.tokenizationKey) - XCTAssertNil(dropInViewController.navigationItem.leftBarButtonItem) - - // There will be a rightBarButtonItem instead of a call to action control because it has been set to hide. - XCTAssertNotNil(dropInViewController.navigationItem.rightBarButtonItem) - - let didLoadExpectation = self.expectation(description: "Drop-in did finish loading") - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) // for strong reference - dropInViewController.delegate = testDelegate - - DispatchQueue.main.async { () -> Void in - self.viewController.present(dropInViewController, animated: false, completion: nil) - } - self.waitForExpectations(timeout: 5, handler: nil) - } - - func testDropIn_canSetNewCheckoutRequestAfterPresentation() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let request = BTPaymentRequest() - let dropInViewController = BTDropInViewController(apiClient: apiClient) - dropInViewController.paymentRequest = request - XCTAssertEqual(request, dropInViewController.paymentRequest) - XCTAssertEqual(apiClient.tokenizationKey, dropInViewController.apiClient.tokenizationKey) - - // By default, Drop-in does not set any bar button items. The developer should embed Drop-in in a navigation controller - // as seen in BraintreeDemoDropInViewController, or provide some other way to dismiss Drop-in. - XCTAssertNil(dropInViewController.navigationItem.leftBarButtonItem) - XCTAssertNil(dropInViewController.navigationItem.rightBarButtonItem) - - let didLoadExpectation = self.expectation(description: "Drop-in did finish loading") - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) // for strong reference - dropInViewController.delegate = testDelegate - - DispatchQueue.main.async { () -> Void in - self.viewController.present(dropInViewController, animated: false, completion: nil) - } - self.waitForExpectations(timeout: 5, handler: nil) - - let newRequest = BTPaymentRequest() - newRequest.shouldHideCallToAction = true - dropInViewController.paymentRequest = newRequest - XCTAssertNil(dropInViewController.navigationItem.leftBarButtonItem) - - // There will now be a rightBarButtonItem because shouldHideCallToAction = true; this button is the replacement - // of the call to action control. - XCTAssertNotNil(dropInViewController.navigationItem.rightBarButtonItem) - } - - func testDropIn_addPaymentMethodViewController_hidesCTA() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let dropInViewController = BTDropInViewController(apiClient: apiClient) - let addPaymentMethodDropInViewController = dropInViewController.addPaymentMethod() - XCTAssertTrue((addPaymentMethodDropInViewController?.paymentRequest!.shouldHideCallToAction)!) - XCTAssertNotNil(addPaymentMethodDropInViewController?.navigationItem.rightBarButtonItem) - - let didLoadExpectation = self.expectation(description: "Add payment method view controller did finish loading") - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) // for strong reference - addPaymentMethodDropInViewController?.delegate = testDelegate - - DispatchQueue.main.async { () -> Void in - self.viewController.present(addPaymentMethodDropInViewController!, animated: false, completion: nil) - } - - self.waitForExpectations(timeout: 5, handler: nil) - } - - func testDropIn_whenPresentViewControllersFromTopIsTrue_presentsViewControllersFromTopViewController() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let dropInViewController = BTDropInViewController(apiClient: apiClient) - let paymentRequest = BTPaymentRequest() - paymentRequest.presentViewControllersFromTop = true - dropInViewController.paymentRequest = paymentRequest - let mockViewController = UIViewController() - let windowRootController = UIViewController() - let secondWindow = UIWindow(frame: UIScreen.main.bounds) - secondWindow.rootViewController = windowRootController - secondWindow.makeKeyAndVisible() - secondWindow.windowLevel = 100 - let topSecondTopController = BTDropInUtil.topViewController() - - dropInViewController.paymentDriver(nil, requestsPresentationOf: mockViewController) - - let expectation = self.expectation(description: "Sleeping for presentation") - DispatchQueue.global(qos: .background).async { - sleep(1) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertEqual(mockViewController.presentingViewController, topSecondTopController) - } - - // MARK: - Metadata - - func testAPIClientMetadata_afterInstantiation_hasIntegrationSetToDropIn() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let dropIn = BTDropInViewController(apiClient: apiClient) - - XCTAssertEqual(dropIn.apiClient.metadata.integration, BTClientMetadataIntegrationType.dropIn) - } - - func testAPIClientMetadata_afterInstantiation_hasSourceSetToOriginalAPIClientMetadataSource() { - var apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - apiClient = apiClient.copy(with: BTClientMetadataSourceType.unknown, integration: BTClientMetadataIntegrationType.custom) - let dropIn = BTDropInViewController(apiClient: apiClient) - - XCTAssertEqual(dropIn.apiClient.metadata.source, BTClientMetadataSourceType.unknown) - } - - // MARK: - Payment method fetching - - func testFetchPaymentMethods_byDefault_doesNotCallAPIClientWithDefaultSortedFirst() { - let mockAPIClient = MockAPIClient(authorization: ValidClientToken)! - let dropIn = BTDropInViewController(apiClient: mockAPIClient) - - let expectation = self.expectation(description: "Callback invoked") - dropIn.fetchPaymentMethods { () -> Void in - XCTAssertTrue(mockAPIClient.didFetchPaymentMethods(sorted: false)) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testFetchPaymentMethods_sortDefaultFirstOverriden_callsAPIClientWithDefaultSortedFirst() { - let mockAPIClient = MockAPIClient(authorization: ValidClientToken)! - let paymentRequest = BTPaymentRequest() - paymentRequest.showDefaultPaymentMethodNonceFirst = false - let dropIn = BTDropInViewController(apiClient: mockAPIClient) - dropIn.paymentRequest = paymentRequest - - let expectation = self.expectation(description: "Callback invoked") - dropIn.fetchPaymentMethods { () -> Void in - XCTAssertTrue(mockAPIClient.didFetchPaymentMethods(sorted: false)) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTHTTPSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTHTTPSpec.m deleted file mode 100755 index 0997e915..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTHTTPSpec.m +++ /dev/null @@ -1,1011 +0,0 @@ -#import "BTHTTP.h" -#import "BTHTTPTestProtocol.h" -#import "BTSpecHelper.h" -#import -#import - -NSURL *validDataURL() { - NSDictionary *validObject = @{@"clientId":@"a-client-id", @"nest": @{@"nested":@"nested-value"}}; - NSError *jsonSerializationError; - NSData *configurationData = [NSJSONSerialization dataWithJSONObject:validObject - options:0 - error:&jsonSerializationError]; - NSString *base64EncodedConfigurationData = [configurationData base64EncodedStringWithOptions:0]; - NSString *dataURLString = [NSString stringWithFormat:@"data:application/json;base64,%@", base64EncodedConfigurationData]; - return [NSURL URLWithString:dataURLString]; -} - -NSDictionary *parameterDictionary() { - return @{@"stringParameter": @"value", - @"crazyStringParameter[]": @"crazy%20and&value", - @"numericParameter": @42, - @"trueBooleanParameter": @YES, - @"falseBooleanParameter": @NO, - @"dictionaryParameter": @{ @"dictionaryKey": @"dictionaryValue" }, - @"arrayParameter": @[@"arrayItem1", @"arrayItem2"] - }; -} - -void withStub(void (^block)(void (^removeStub)(void))) { - id stub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - NSData *jsonResponse = [NSJSONSerialization dataWithJSONObject:@{@"requestHeaders": [request allHTTPHeaderFields]} options:NSJSONWritingPrettyPrinted error:nil]; - return [OHHTTPStubsResponse responseWithData:jsonResponse statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - block(^{ - [OHHTTPStubs removeStub:stub]; - }); -} - -NSURLSession *testURLSession() { - NSURLSessionConfiguration *testConfiguration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - [testConfiguration setProtocolClasses:@[[BTHTTPTestProtocol class]]]; - return [NSURLSession sessionWithConfiguration:testConfiguration]; -} - -@interface BTHTTPSpec : XCTestCase -@end - -@implementation BTHTTPSpec { - BTHTTP *http; - id stubDescriptor; -} - -#pragma mark - performing a request - -- (void)setUp { - [super setUp]; - - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] authorizationFingerprint:@"test-authorization-fingerprint"]; - http.session = testURLSession(); -} - -- (void)tearDown { - [OHHTTPStubs removeAllStubs]; - - [super tearDown]; -} - -#pragma mark - base URL - -- (void)testRequests_useTheSpecifiedURLScheme { - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - - [http GET:@"200.json" completion:^(BTJSON *body, __unused NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - XCTAssertEqualObjects(httpRequest.URL.scheme, @"bt-http-test"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testRequests_useTheHostAtTheBaseURL { - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - expect(httpRequest.URL.absoluteString).to.startWith(@"bt-http-test://base.example.com:1234/base/path/200.json"); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testItAppendsThePathToTheBaseURL { - waitUntil(^(DoneCallback done){ - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - expect(httpRequest.URL.path).to.equal(@"/base/path/200.json"); - done(); - }]; - }); -} - -- (void)test_whenThePathIsNil_itHitsTheBaseURL { - waitUntil(^(DoneCallback done){ - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - expect(httpRequest.URL.path).to.equal(@"/base/path"); - done(); - }]; - }); - - pending(@"returns a json serialization error if the parameters cannot be serialized"); - pending(@"appends the authorization fingerprint to all requests"); -} - -#pragma mark - data base URLs - -- (void)testReturnsTheData { - waitUntil(^(DoneCallback done) { - http = [[BTHTTP alloc] initWithBaseURL:validDataURL() authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - expect([body[@"clientId"] asString]).to.equal(@"a-client-id"); - expect([body[@"nest"][@"nested"] asString]).to.equal(@"nested-value"); - done(); - }]; - }); -} - -- (void)testIgnoresPOSTData { - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - http = [[BTHTTP alloc] initWithBaseURL:validDataURL() authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http POST:@"/" parameters:@{@"a-post-param":@"POST"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - expect(response.statusCode).to.equal(200); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testIgnoresGETParameters { - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - http = [[BTHTTP alloc] initWithBaseURL:validDataURL() authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http GET:@"/" parameters:@{@"a-get-param": @"GET"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - - expect(response.statusCode).to.equal(200); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} -- (void)testIgnoresTheSpecifiedPath { - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - http = [[BTHTTP alloc] initWithBaseURL:validDataURL() authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http GET:@"/resource" completion:^(__unused BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - - expect(response.statusCode).to.equal(200); - expect(error).to.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testSetsTheContentTypeHeader { - NSURL *dataURL = [NSURL URLWithString:@"data:text/plain;base64,SGVsbG8sIFdvcmxkIQo="]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - http = [[BTHTTP alloc] initWithBaseURL:dataURL authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(body); - XCTAssertNil(response); - expect(error.domain).to.equal(BTHTTPErrorDomain); - expect(error.code).to.equal(BTHTTPErrorCodeResponseContentTypeNotAcceptable); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testSetsTheResponseStatusCode { - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - http = [[BTHTTP alloc] initWithBaseURL:validDataURL() authorizationFingerprint:@"test-authorization-fingerprint"]; - - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - expect(response.statusCode).notTo.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testFailsLikeAnHTTP500WhenTheBase64EncodedDataIsInvalid { - XCTestExpectation *expectation = [self expectationWithDescription:@"Perform request"]; - - NSString *dataURLString = [NSString stringWithFormat:@"data:application/json;base64,%@", @"BAD-BASE-64-STRING"]; - - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:dataURLString] authorizationFingerprint:@"test-authorization-fingerprint"]; - [http GET:@"/" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(body); - XCTAssertNil(response); - XCTAssertNotNil(error); - - expect(response).to.beNil(); - expect(error).notTo.beNil(); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -#pragma mark - HTTP methods - -- (void)testSendsGETRequest { - waitUntil(^(DoneCallback done){ - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"/200.json$"); - expect(httpRequest.HTTPMethod).to.equal(@"GET"); - expect(httpRequest.HTTPBody).to.beNil(); - done(); - }]; - }); -} - -- (void)testSendsGETRequestWithParameters { - waitUntil(^(DoneCallback done){ - [http GET:@"200.json" parameters:@{@"param": @"value"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"/200.json$"); - expect(httpRequest.URL.query).to.contain(@"param=value"); - expect(httpRequest.HTTPMethod).to.equal(@"GET"); - expect(httpRequest.HTTPBody).to.beNil(); - done(); - }]; - }); -} - -- (void)testSendsPOSTRequest { - waitUntil(^(DoneCallback done) { - [http POST:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"/200.json$"); - expect(httpRequest.HTTPBody).to.beNil(); - expect(httpRequest.HTTPMethod).to.equal(@"POST"); - expect(httpRequest.URL.query).to.beNil(); - done(); - }]; - }); -} - -- (void)testSendsPOSTRequestWithParameters { - waitUntil(^(DoneCallback done) { - [http POST:@"200.json" parameters:@{@"param": @"value"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSString *httpRequestBody = [BTHTTPTestProtocol parseRequestBodyFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"/200.json$"); - BTJSON *json = [[BTJSON alloc] initWithData:[httpRequestBody dataUsingEncoding:NSUTF8StringEncoding]]; - expect([json[@"param"] asString]).to.equal(@"value"); - expect(httpRequest.HTTPMethod).to.equal(@"POST"); - expect(httpRequest.URL.query).to.beNil(); - done(); - }]; - }); -} - -- (void)testSendsPUTRequest { - waitUntil(^(DoneCallback done) { - [http PUT:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"200.json$"); - expect(httpRequest.HTTPBody).to.beNil(); - expect(httpRequest.HTTPMethod).to.equal(@"PUT"); - expect(httpRequest.URL.query).to.beNil(); - done(); - }]; - }); -} - -- (void)testSendsPUTRequestWithParameters { - waitUntil(^(DoneCallback done) { - [http PUT:@"200.json" parameters:@{@"param": @"value"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSString *httpRequestBody = [BTHTTPTestProtocol parseRequestBodyFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"200.json$"); - BTJSON *json = [[BTJSON alloc] initWithData:[httpRequestBody dataUsingEncoding:NSUTF8StringEncoding]]; - expect([json[@"param"] asString]).to.equal(@"value"); - expect(httpRequest.HTTPMethod).to.equal(@"PUT"); - expect(httpRequest.URL.query).to.beNil(); - done(); - }]; - }); -} - - -- (void)testSendsADELETERequest { - waitUntil(^(DoneCallback done){ - [http DELETE:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.path).to.match(@"200.json$"); - expect(httpRequest.HTTPBody).to.beNil(); - expect(httpRequest.HTTPMethod).to.equal(@"DELETE"); - done(); - }]; - }); -} - -- (void)testSendsDELETERequestWithParameters { - waitUntil(^(DoneCallback done) { - [http DELETE:@"200.json" parameters:@{@"param": @"value"} completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - expect(httpRequest.URL.path).to.match(@"/200.json$"); - expect(httpRequest.URL.query).to.contain(@"param=value"); - expect(httpRequest.HTTPMethod).to.equal(@"DELETE"); - expect(httpRequest.HTTPBody).to.beNil(); - done(); - }]; - }); -} - -#pragma mark Authentication - -- (void)testGETRequests_whenBTHTTPInitializedWithAuthorizationFingerprint_sendAuthorizationInQueryParams { - waitUntil(^(DoneCallback done){ - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.query).to.equal(@"authorization_fingerprint=test-authorization-fingerprint"); - - done(); - }]; - }); -} - -- (void)testGETRequests_whenBTHTTPInitializedWithTokenizationKey_sendTokenizationKeyInHeader { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] tokenizationKey:@"development_tokenization_key"]; - http.session = testURLSession(); - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - - XCTAssertEqualObjects(httpRequest.allHTTPHeaderFields[@"Client-Key"], @"development_tokenization_key"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testPOSTRequests_whenBTHTTPInitializedWithAuthorizationFingerprint_sendAuthorizationInBody { - waitUntil(^(DoneCallback done){ - [http POST:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSString *httpRequestBody = [BTHTTPTestProtocol parseRequestBodyFromTestResponseBody:body]; - expect(httpRequestBody).to.equal(@"{\"authorization_fingerprint\":\"test-authorization-fingerprint\"}"); - - done(); - }]; - }); -} - -- (void)testPOSTRequests_whenBTHTTPInitializedWithTokenizationKey_sendAuthorization { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] tokenizationKey:@"development_tokenization_key"]; - http.session = testURLSession(); - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - [http POST:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - XCTAssertEqualObjects(httpRequest.allHTTPHeaderFields[@"Client-Key"], @"development_tokenization_key"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testPUTRequests_whenBTHTTPInitializedWithAuthorizationFingerprint_sendAuthorizationInBody { - waitUntil(^(DoneCallback done){ - [http PUT:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSString *httpRequestBody = [BTHTTPTestProtocol parseRequestBodyFromTestResponseBody:body]; - expect(httpRequestBody).to.equal(@"{\"authorization_fingerprint\":\"test-authorization-fingerprint\"}"); - - done(); - }]; - }); -} - -- (void)testPUTRequests_whenBTHTTPInitializedWithTokenizationKey_sendAuthorization { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] tokenizationKey:@"development_tokenization_key"]; - http.session = testURLSession(); - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - [http PUT:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - XCTAssertEqualObjects(httpRequest.allHTTPHeaderFields[@"Client-Key"], @"development_tokenization_key"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testDELETERequests_whenBTHTTPInitializedWithAuthorizationFingerprint_sendAuthorizationInQueryParams { - waitUntil(^(DoneCallback done) { - [http DELETE:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - expect(httpRequest.URL.query).to.equal(@"authorization_fingerprint=test-authorization-fingerprint"); - - done(); - }]; - }); -} - -- (void)testDELETERequests_whenBTHTTPInitializedWithTokenizationKey_sendAuthorization { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] tokenizationKey:@"development_tokenization_key"]; - http.session = testURLSession(); - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - [http DELETE:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - XCTAssertEqualObjects(httpRequest.allHTTPHeaderFields[@"Client-Key"], @"development_tokenization_key"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -#pragma mark - default headers - -- (void)testIncludeAccept { - waitUntil(^(DoneCallback done){ - withStub(^(void (^removeStub)(void)){ - [http GET:@"stub://200/resource" parameters:nil completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSDictionary *requestHeaders = httpRequest.allHTTPHeaderFields; - expect(requestHeaders[@"Accept"]).to.equal(@"application/json"); - removeStub(); - done(); - }]; - }); - }); -} - -- (void)testIncludeUserAgent { - waitUntil(^(DoneCallback done){ - withStub(^(void (^removeStub)(void)){ - [http GET:@"stub://200/resource" parameters:nil completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSDictionary *requestHeaders = httpRequest.allHTTPHeaderFields; - expect(requestHeaders[@"User-Agent"]).to.match(@"^Braintree/iOS/\\d+\\.\\d+\\.\\d+(-[0-9a-zA-Z-]+)?$"); - removeStub(); - done(); - }]; - }); - }); -} - -- (void)testIncludeAcceptLanguage { - waitUntil(^(DoneCallback done) { - withStub(^(void (^removeStub)(void)) { - [http GET:@"stub://200/resource" parameters:nil completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSDictionary *requestHeaders = httpRequest.allHTTPHeaderFields; - NSLocale *locale = [NSLocale currentLocale]; - NSString *expectedLanguageString = [NSString stringWithFormat:@"%@-%@", [locale objectForKey:NSLocaleLanguageCode], [locale objectForKey:NSLocaleCountryCode]]; - expect(requestHeaders[@"Accept-Language"]).to.equal(expectedLanguageString); - removeStub(); - done(); - }]; - }); - }); -} - - -#pragma mark parameters - -#pragma mark in GET requests -- (void)testTransmitsTheParametersAsURLEncodedQueryParameters { - waitUntil(^(DoneCallback done){ - NSArray *expectedQueryParameters = @[ @"numericParameter=42", - @"falseBooleanParameter=0", - @"dictionaryParameter%5BdictionaryKey%5D=dictionaryValue", - @"trueBooleanParameter=1", - @"stringParameter=value", - @"crazyStringParameter%5B%5D=crazy%2520and%26value", - @"arrayParameter%5B%5D=arrayItem1", - @"arrayParameter%5B%5D=arrayItem2" ]; - - [http GET:@"200.json" parameters:parameterDictionary() completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSArray *actualQueryComponents = [httpRequest.URL.query componentsSeparatedByString:@"&"]; - - for(NSString *expectedComponent in expectedQueryParameters){ - expect(actualQueryComponents).to.contain(expectedComponent); - } - - done(); - }]; - }); -} - -#pragma mark in non-GET requests - -- (void)testTransmitsTheParametersAsJSON { - waitUntil(^(DoneCallback done){ - NSDictionary *expectedParameters = @{ @"numericParameter": @42, - @"falseBooleanParameter": @NO, - @"dictionaryParameter": @{ - @"dictionaryKey": @"dictionaryValue" - }, - @"trueBooleanParameter": @YES, - @"stringParameter": @"value", - @"crazyStringParameter[]": @"crazy%20and&value", - @"arrayParameter": @[ @"arrayItem1", @"arrayItem2" ], - @"authorization_fingerprint": @"test-authorization-fingerprint" }; - - [http POST:@"200.json" parameters:parameterDictionary() completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - NSURLRequest *httpRequest = [BTHTTPTestProtocol parseRequestFromTestResponseBody:body]; - NSString *httpRequestBody = [BTHTTPTestProtocol parseRequestBodyFromTestResponseBody:body]; - - expect([httpRequest valueForHTTPHeaderField:@"Content-type"]).to.equal(@"application/json; charset=utf-8"); - NSDictionary *actualParameters = [NSJSONSerialization JSONObjectWithData:[httpRequestBody dataUsingEncoding:NSUTF8StringEncoding] - options:0 - error:NULL]; - expect(actualParameters).to.equal(expectedParameters); - done(); - }]; - }); -} - -#pragma mark interpreting responses - -- (void)testCallsBackOnMainQueue { - XCTestExpectation *expectation = [self expectationWithDescription:@"receive callback"]; - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - expect(dispatch_get_current_queue()).to.equal(dispatch_get_main_queue()); -#pragma clang diagnostic pop - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testCallsBackOnSpecifiedQueue { - XCTestExpectation *expectation = [self expectationWithDescription:@"receive callback"]; - http.dispatchQueue = dispatch_queue_create("com.braintreepayments.BTHTTPSpec.callbackQueueTest", DISPATCH_QUEUE_SERIAL); - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - expect(dispatch_get_current_queue()).to.equal(http.dispatchQueue); -#pragma clang diagnostic pop - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -#pragma mark response code parser - -- (void)testInterprets2xxAsACompletionWithSuccess { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[NSJSONSerialization dataWithJSONObject:@{} options:NSJSONWritingPrettyPrinted error:NULL] statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - expect(response.statusCode).to.equal(200); - - expect(error).to.beNil(); - - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testResponseCodeParsing_whenStatusCodeIs4xx_returnsError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - NSDictionary *errorBody = @{ - @"error": @{ - @"message": @"This is an error message from the gateway" - } - }; - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[NSJSONSerialization dataWithJSONObject:errorBody options:NSJSONWritingPrettyPrinted error:NULL] statusCode:403 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"403.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertEqualObjects(body.asDictionary, errorBody); - XCTAssertNotNil(response); - XCTAssertEqualObjects(error.domain, BTHTTPErrorDomain); - XCTAssertEqual(error.code, BTHTTPErrorCodeClientError); - XCTAssertEqualObjects(((BTJSON *)error.userInfo[BTHTTPJSONResponseBodyKey]).asDictionary, errorBody); - XCTAssertTrue([error.userInfo[BTHTTPURLResponseKey] isKindOfClass:[NSHTTPURLResponse class]]); - XCTAssertEqualObjects(error.localizedDescription, @"This is an error message from the gateway"); - XCTAssertNotNil(error.userInfo[NSLocalizedFailureReasonErrorKey]); - - [OHHTTPStubs removeStub:stub]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testResponseCodeParsing_whenStatusCodeIs429_returnsRateLimitError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[NSJSONSerialization dataWithJSONObject:@{} options:NSJSONWritingPrettyPrinted error:NULL] statusCode:429 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"429.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertEqualObjects(body.asDictionary, @{}); - XCTAssertNotNil(response); - XCTAssertEqualObjects(error.domain, BTHTTPErrorDomain); - XCTAssertEqual(error.code, BTHTTPErrorCodeRateLimitError); - XCTAssertEqualObjects(((BTJSON *)error.userInfo[BTHTTPJSONResponseBodyKey]).asDictionary, @{}); - XCTAssertTrue([error.userInfo[BTHTTPURLResponseKey] isKindOfClass:[NSHTTPURLResponse class]]); - XCTAssertNotNil(error.userInfo[NSLocalizedFailureReasonErrorKey]); - XCTAssertEqualObjects(error.userInfo[NSLocalizedDescriptionKey], @"You are being rate-limited."); - XCTAssertEqualObjects(error.userInfo[NSLocalizedRecoverySuggestionErrorKey], @"Please try again in a few minutes."); - - [OHHTTPStubs removeStub:stub]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testResponseCodeParsing_whenStatusCodeIs5xx_returnsError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - NSDictionary *errorBody = @{ - @"error": @{ - @"message": @"This is an error message from the gateway" - } - }; - - XCTestExpectation *expectation = [self expectationWithDescription:@"GET callback"]; - - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[NSJSONSerialization dataWithJSONObject:errorBody options:NSJSONWritingPrettyPrinted error:NULL] statusCode:503 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"403.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertEqualObjects(body.asDictionary, errorBody); - XCTAssertNotNil(response); - XCTAssertEqualObjects(error.domain, BTHTTPErrorDomain); - XCTAssertEqual(error.code, BTHTTPErrorCodeServerError); - XCTAssertEqualObjects(((BTJSON *)error.userInfo[BTHTTPJSONResponseBodyKey]).asDictionary, errorBody); - XCTAssertTrue([error.userInfo[BTHTTPURLResponseKey] isKindOfClass:[NSHTTPURLResponse class]]); - XCTAssertEqualObjects(error.localizedDescription, @"This is an error message from the gateway"); - XCTAssertEqualObjects(error.localizedRecoverySuggestion, @"Please try again later."); - XCTAssertNotNil(error.userInfo[NSLocalizedFailureReasonErrorKey]); - - [OHHTTPStubs removeStub:stub]; - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - - -- (void)testInterpretsTheNetworkBeingDownAsAnError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorNotConnectedToInternet userInfo:nil]]; - }]; - - [http GET:@"network-down" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - expect(body).to.beNil(); - expect(response).to.beNil(); - expect(error.domain).to.equal(NSURLErrorDomain); - expect(error.code).to.equal(NSURLErrorNotConnectedToInternet); - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testInterpretsTheServerBeingUnavailableAsAnError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotConnectToHost userInfo:nil]]; - }]; - - - [http GET:@"gateway-down" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - expect(body).to.beNil(); - expect(response).to.beNil(); - expect(error.domain).to.equal(NSURLErrorDomain); - expect(error.code).to.equal(NSURLErrorCannotConnectToHost); - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -#pragma mark response body parser - -- (void)testParsesAJSONResponseBody { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[@"{\"status\": \"OK\"}" dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"200.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error){ - XCTAssertNotNil(body); - XCTAssertNotNil(response); - XCTAssertNil(error); - - expect([body[@"status"] asString]).to.equal(@"OK"); - - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testAcceptsEmptyResponses { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[[NSData alloc] init] statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"empty.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error){ - expect(response.statusCode).to.equal(200); - expect(body).to.beKindOf([BTJSON class]); - expect(body.isObject).to.beTruthy(); - expect(body.asDictionary.count).to.equal(0); - expect(error).to.beNil(); - - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testInterpretsInvalidJSONResponsesAsAJSONError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[@"{ really invalid json ]" dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - [http GET:@"invalid.json" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - expect(response).to.beNil(); - expect(body).to.beNil(); - expect(error.domain).to.equal(NSCocoaErrorDomain); - - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testInterpretsNonJSONResponsesAsAContentTypeNotAcceptableError { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - idstub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(__unused NSURLRequest *request) { - return YES; - } withStubResponse:^OHHTTPStubsResponse *(__unused NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:[@"response" dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 headers:@{@"Content-Type": @"text/html"}]; - }]; - - [http GET:@"200.html" completion:^(BTJSON *body, NSHTTPURLResponse *response, NSError *error) { - XCTAssertNil(body); - XCTAssertNil(response); - XCTAssertNotNil(error); - - expect(response).to.beNil(); - - expect(error.domain).to.equal(BTHTTPErrorDomain); - expect(error.code).to.equal(BTHTTPErrorCodeResponseContentTypeNotAcceptable); - - [OHHTTPStubs removeStub:stub]; - done(); - }]; - }); -} - -- (void)testNoopsForANilCompletionBlock { - http = [[BTHTTP alloc] initWithBaseURL:[NSURL URLWithString:@"stub://stub"] authorizationFingerprint:@"test-authorization-fingerprint"]; - - waitUntil(^(DoneCallback done){ - setAsyncSpecTimeout(2); - - [http GET:@"200.json" parameters:nil completion:nil]; - - wait_for_potential_async_exceptions(done); - }); -} - -#pragma mark isEqual: - -- (void)testReturnsYESIfBTHTTPsHaveTheSameBaseURLAndAuthorizationFingerprint { - NSURL *baseURL = [NSURL URLWithString:@"an-url://hi"]; - BTHTTP *http1 = [[BTHTTP alloc] initWithBaseURL:baseURL authorizationFingerprint:@"test-authorization-fingerprint"]; - BTHTTP *http2 = [[BTHTTP alloc] initWithBaseURL:baseURL authorizationFingerprint:@"test-authorization-fingerprint"]; - - expect(http1).to.equal(http2); -} - -- (void)testReturnsNOIfBTHTTPsDoNotHaveTheSameBaseURL { - NSURL *baseURL1 = [NSURL URLWithString:@"an-url://hi"]; - NSURL *baseURL2 = [NSURL URLWithString:@"an-url://hi-again"]; - BTHTTP *http1 = [[BTHTTP alloc] initWithBaseURL:baseURL1 authorizationFingerprint:@"test-authorization-fingerprint"]; - BTHTTP *http2 = [[BTHTTP alloc] initWithBaseURL:baseURL2 authorizationFingerprint:@"test-authorization-fingerprint"]; - - expect(http1).notTo.equal(http2); -} - -- (void)testReturnsNOIfBTHTTPsDoNotHaveTheSameAuthorizationFingerprint { - NSURL *baseURL1 = [NSURL URLWithString:@"an-url://hi"]; - BTHTTP *http1 = [[BTHTTP alloc] initWithBaseURL:baseURL1 authorizationFingerprint:@"test-authorization-fingerprint"]; - BTHTTP *http2 = [[BTHTTP alloc] initWithBaseURL:baseURL1 authorizationFingerprint:@"OTHER"]; - - expect(http1).notTo.equal(http2); -} - -#pragma mark copy - -- (void)testReturnsADifferentInstance { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] authorizationFingerprint:@"test-authorization-fingerprint"]; - - expect(http).toNot.beIdenticalTo([http copy]); -} - -- (void)testReturnsAnEqualInstance { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] authorizationFingerprint:@"test-authorization-fingerprint"]; - - expect([http copy]).to.equal(http); -} - -- (void)testReturnedInstanceHasTheSameCertificates { - http = [[BTHTTP alloc] initWithBaseURL:[BTHTTPTestProtocol testBaseURL] authorizationFingerprint:@"test-authorization-fingerprint"]; - - BTHTTP *copiedHTTP = [http copy]; - expect(copiedHTTP.pinnedCertificates).to.equal(http.pinnedCertificates); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTJSON_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTJSON_Tests.swift deleted file mode 100755 index c16d74c8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTJSON_Tests.swift +++ /dev/null @@ -1,295 +0,0 @@ -import XCTest - -class BTJSON_Tests: XCTestCase { - func testEmptyJSON() { - let empty = BTJSON() - - XCTAssertNotNil(empty) - - XCTAssertTrue(empty.isObject) - - XCTAssertNil(empty.asString()) - XCTAssertNil(empty.asArray()) - XCTAssertNil(empty.asNumber()) - XCTAssertNil(empty.asURL()) - XCTAssertNil(empty.asStringArray()) - XCTAssertNil(empty.asError()) - - XCTAssertFalse(empty.isString) - XCTAssertFalse(empty.isNumber) - XCTAssertFalse(empty.isArray) - XCTAssertFalse(empty.isTrue) - XCTAssertFalse(empty.isFalse) - XCTAssertFalse(empty.isNull) - } - - func testInitializationFromValue() { - let string = BTJSON(value: "") - XCTAssertTrue(string.isString) - - let truth = BTJSON(value: true) - XCTAssertTrue(truth.isTrue) - - let falsehood = BTJSON(value: false) - XCTAssertTrue(falsehood.isFalse) - - let number = BTJSON(value: 42) - XCTAssertTrue(number.isNumber) - - let ary = BTJSON(value: [1,2,3]) - XCTAssertTrue(ary.isArray) - - let obj = BTJSON(value: ["one": 1, "two": 2]) - XCTAssertTrue(obj.isObject) - - let null = BTJSON(value: NSNull()) - XCTAssertTrue(null.isNull) - } - - func testInitializationFromEmptyData() { - let emptyDataJSON = BTJSON(data: Data()) - XCTAssertTrue(emptyDataJSON.isError) - } - - func testStringJSON() { - let JSON = "\"Hello, JSON!\"".data(using: String.Encoding.utf8)! - let string = BTJSON(data: JSON) - - XCTAssertTrue(string.isString) - XCTAssertEqual(string.asString()!, "Hello, JSON!") - } - - func testArrayJSON() { - let JSON = "[\"One\", \"Two\", \"Three\"]".data(using: String.Encoding.utf8)! - let array = BTJSON(data: JSON) - - XCTAssertTrue(array.isArray) - XCTAssertEqual((array as BTJSON).asArray()! as NSArray, ["One", "Two", "Three"]) - } - - func testArrayAccess() { - let JSON = "[\"One\", \"Two\", \"Three\"]".data(using: String.Encoding.utf8)! - let array = BTJSON(data: JSON) - - XCTAssertTrue(array[0].isString) - XCTAssertEqual(array[0].asString()!, "One") - XCTAssertEqual(array[1].asString()!, "Two") - XCTAssertEqual(array[2].asString()!, "Three") - - XCTAssertNil(array[3].asString()) - XCTAssertFalse(array[3].isString) - - XCTAssertNil((array["hello"] as AnyObject).asString()) - } - - func testObjectAccess() { - let JSON = "{ \"key\": \"value\" }".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertEqual((obj["key"] as AnyObject).asString()!, "value") - - XCTAssertNil((obj["not present"] as AnyObject).asString()) - XCTAssertNil(obj[0].asString()) - - XCTAssertFalse((obj["not present"] as AnyObject).isError as Bool) - - XCTAssertTrue(obj[0].isError) - } - - func testParsingError() { - let JSON = "INVALID JSON".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertTrue(obj.isError) - guard let error = obj as? NSError else {return} - XCTAssertEqual(error.domain, NSCocoaErrorDomain) - } - - func testMultipleErrorsTakesFirst() { - let JSON = "INVALID JSON".data(using: String.Encoding.utf8)! - let string = BTJSON(data: JSON) - - let error = (((string[0])["key"] as! BTJSON)[0]) - - XCTAssertTrue(error.isError as Bool) - guard let err = error as? NSError else {return} - XCTAssertEqual(err.domain, NSCocoaErrorDomain) - } - - func testNestedObjects() { - let JSON = "{ \"numbers\": [\"one\", \"two\", { \"tens\": 0, \"ones\": 1 } ], \"truthy\": true }".data(using: String.Encoding.utf8)! - let nested = BTJSON(data: JSON) - - XCTAssertEqual((nested["numbers"] as! BTJSON)[0].asString()!, "one") - XCTAssertEqual((nested["numbers"] as! BTJSON)[1].asString()!, "two") - XCTAssertEqual(((nested["numbers"] as! BTJSON)[2]["tens"] as! BTJSON).asNumber()!, NSDecimalNumber.zero) - XCTAssertEqual(((nested["numbers"] as! BTJSON)[2]["ones"] as! BTJSON).asNumber()!, NSDecimalNumber.one) - XCTAssertTrue((nested["truthy"] as! BTJSON).isTrue as Bool) - } - - func testTrueBoolInterpretation() { - let JSON = "true".data(using: String.Encoding.utf8)! - let truthy = BTJSON(data: JSON) - XCTAssertTrue(truthy.isTrue) - XCTAssertFalse(truthy.isFalse) - } - - func testFalseBoolInterpretation() { - let JSON = "false".data(using: String.Encoding.utf8)! - let truthy = BTJSON(data: JSON) - XCTAssertFalse(truthy.isTrue) - XCTAssertTrue(truthy.isFalse) - } - - func testAsURL() { - let JSON = "{ \"url\": \"http://example.com\" }".data(using: String.Encoding.utf8)! - let url = BTJSON(data: JSON) - XCTAssertEqual((url["url"] as AnyObject).asURL()!, URL(string: "http://example.com")!) - } - - func testAsURLForInvalidValue() { - let JSON = "{ \"url\": 42 }".data(using: String.Encoding.utf8)! - let url = BTJSON(data: JSON) - XCTAssertNil((url["url"] as AnyObject).asURL()) - } - - func testAsStringArray() { - let JSON = "[\"one\", \"two\", \"three\"]".data(using: String.Encoding.utf8)! - let stringArray = BTJSON(data: JSON) - XCTAssertEqual(stringArray.asStringArray()!, ["one", "two", "three"]) - } - - func testAsStringArrayForInvalidValue() { - let JSON = "[1, 2, false]".data(using: String.Encoding.utf8)! - let stringArray = BTJSON(data: JSON) - XCTAssertNil(stringArray.asStringArray()) - } - - func testAsStringArrayForHeterogeneousValue() { - let JSON = "[\"string\", false]".data(using: String.Encoding.utf8)! - let stringArray = BTJSON(data: JSON) - XCTAssertNil(stringArray.asStringArray()) - } - - func testAsStringArrayForEmptyArray() { - let JSON = "[]".data(using: String.Encoding.utf8)! - let stringArray = BTJSON(data: JSON) - XCTAssertEqual(stringArray.asStringArray()!, []) - } - - func testAsDictionary() { - let JSON = "{ \"key\": \"value\" }".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertEqual((obj.asDictionary()! as AnyObject) as! NSDictionary, ["key":"value"] as NSDictionary) - } - - func testAsDictionaryInvalidValue() { - let JSON = "[]".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertNil(obj.asDictionary()) - } - - func testAsIntegerOrZero() { - let cases = [ - "1": 1, - "1.2": 1, - "1.5": 1, - "1.9": 1, - "-4": -4, - "0": 0, - "\"Hello\"": 0, - ] - for (k,v) in cases { - let JSON = BTJSON(data: k.data(using: String.Encoding.utf8)!) - XCTAssertEqual(JSON.asIntegerOrZero(), v) - } - } - - func testAsEnumOrDefault() { - let JSON = "\"enum one\"".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertEqual(obj.asEnum(["enum one" : 1], orDefault: 0), 1) - } - - func testAsEnumOrDefaultWhenMappingNotPresentReturnsDefault() { - let JSON = "\"enum one\"".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertEqual(obj.asEnum(["enum two" : 2], orDefault: 1000), 1000) - } - - func testAsEnumOrDefaultWhenMapValueIsNotNumberReturnsDefault() { - let JSON = "\"enum one\"".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertEqual(obj.asEnum(["enum one" : "one"], orDefault: 1000), 1000) - } - - func testIsNull() { - let JSON = "null".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertTrue(obj.isNull); - } - - func testIsObject() { - let JSON = "{}".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertTrue(obj.isObject); - } - - func testIsObjectForNonObject() { - let JSON = "[]".data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - - XCTAssertFalse(obj.isObject); - } - - func testLargerMixedJSONWithEmoji() { - let JSON = ("{" + - "\"aString\": \"Hello, JSON 😍!\"," + - "\"anArray\": [1, 2, 3 ]," + - "\"aSetOfValues\": [\"a\", \"b\", \"c\"]," + - "\"aSetWithDuplicates\": [\"a\", \"a\", \"b\", \"b\" ]," + - "\"aLookupDictionary\": {" + - "\"foo\": { \"definition\": \"A meaningless word\"," + - "\"letterCount\": 3," + - "\"meaningful\": false }" + - "}," + - "\"aURL\": \"https://test.example.com:1234/path\"," + - "\"anInvalidURL\": \":™£¢://://://???!!!\"," + - "\"aTrue\": true," + - "\"aFalse\": false" + - "}").data(using: String.Encoding.utf8)! - let obj = BTJSON(data: JSON) - XCTAssertEqual((obj["aString"] as! BTJSON).asString(), "Hello, JSON 😍!") - XCTAssertNil((obj["notAString"] as! BTJSON).asString()) // nil for absent keys - XCTAssertNil((obj["anArray"] as! BTJSON).asString()) // nil for invalid values - XCTAssertEqual((obj["anArray"] as! BTJSON).asArray()! as NSArray, [1, 2, 3]) - XCTAssertNil((obj["notAnArray"] as! BTJSON).asArray()) // nil for absent keys - XCTAssertNil((obj["aString"] as! BTJSON).asArray()) // nil for invalid values - // sets can be parsed as arrays: - XCTAssertEqual((obj["aSetOfValues"] as! BTJSON).asArray()! as NSArray, ["a", "b", "c"]) - XCTAssertEqual((obj["aSetWithDuplicates"] as! BTJSON).asArray()! as NSArray, ["a", "a", "b", "b"]) - let dictionary = (obj["aLookupDictionary"] as! BTJSON).asDictionary()! - let foo = dictionary["foo"]! as! Dictionary - XCTAssertEqual((foo["definition"] as! String), "A meaningless word") - let letterCount = foo["letterCount"] as! NSNumber - XCTAssertEqual(letterCount, 3) - XCTAssertFalse(foo["meaningful"] as! Bool) - XCTAssertNil((obj["notADictionary"] as AnyObject).asDictionary()) - XCTAssertNil((obj["aString"] as AnyObject).asDictionary()) - XCTAssertEqual((obj["aURL"] as AnyObject).asURL(), URL(string: "https://test.example.com:1234/path")) - XCTAssertNil((obj["notAURL"] as AnyObject).asURL()) - XCTAssertNil((obj["aString"] as AnyObject).asURL()) - XCTAssertNil((obj["anInvalidURL"] as AnyObject).asURL()) // nil for invalid URLs - // nested resources: - let btJson = (obj["aLookupDictionary"] as! BTJSON).asDictionary() as! [String: AnyObject] - XCTAssertEqual((btJson["foo"] as! NSDictionary)["definition"] as! String, "A meaningless word") - XCTAssert((((obj["aLookupDictionary"] as! BTJSON)["aString"] as! BTJSON)["anyting"] as! BTJSON).isError as Bool) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTLogger_Internal_Tests.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTLogger_Internal_Tests.m deleted file mode 100755 index 9ac2a8ae..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTLogger_Internal_Tests.m +++ /dev/null @@ -1,57 +0,0 @@ -#import -#import "BTLogger_Internal.h" - -@interface BTLogger_Internal_Tests : XCTestCase -@end - -@implementation BTLogger_Internal_Tests - -- (void)testSharedLogger_returnsSingletonLogger { - BTLogger *logger1 = [BTLogger sharedLogger]; - BTLogger *logger2 = [BTLogger sharedLogger]; - XCTAssertTrue(logger1 == logger2); - XCTAssertTrue([logger1 isKindOfClass:[BTLogger class]]); -} - -- (void)testLevel_byDefault_isInfo { - XCTAssertEqual([[BTLogger alloc] init].level, BTLogLevelInfo); -} - -- (void)testLog_whenLogBlockIsDefined_invokesBlockWithLogMessageAndLogLevel { - BTLogger *logger = [[BTLogger alloc] init]; - NSString *messageLogged = @"BTLogger logBlock works!"; - XCTestExpectation *expectation = [self expectationWithDescription:@"logBlock invoked"]; - logger.logBlock = ^(BTLogLevel level, NSString *messageReceived) { - XCTAssertEqualObjects(messageReceived, messageLogged); - XCTAssertEqual(level, BTLogLevelInfo); - [expectation fulfill]; - }; - - [logger log:messageLogged]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -- (void)testLog_whenLoggingAtOrBelowLevel_logsMessage { - BTLogger *logger = [[BTLogger alloc] init]; - for (BTLogLevel level = BTLogLevelNone; level <= BTLogLevelDebug; level++) { - NSString *message = [NSString stringWithFormat:@"test %lu", (unsigned long)level]; - NSMutableArray *messagesLogged = [NSMutableArray array]; - __block BTLogLevel maxLevel = level; - logger.logBlock = ^(BTLogLevel actualLevel, NSString *messageReceived) { - XCTAssertTrue(actualLevel <= maxLevel); - [messagesLogged addObject:messageReceived]; - }; - - logger.level = level; - [logger critical:message]; - [logger error:message]; - [logger warning:message]; - [logger info:message]; - [logger debug:message]; - - XCTAssertEqual(messagesLogged.count, level); - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTMacroTests.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTMacroTests.m deleted file mode 100755 index ccb067a8..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTMacroTests.m +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import "BraintreeCore.h" - -@interface BTMacroTests : XCTestCase - -@end - -@implementation BTMacroTests - -- (void)test__BT_AVAILABLE_returnsTrueForAvailableClass { - XCTAssertTrue(__BT_AVAILABLE(@"BTAPIClient")); -} - -- (void)test__BT_AVAILABLE_returnsFalseForUnavailableClass { - XCTAssertFalse(__BT_AVAILABLE(@"BTNotARealClass")); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPayPalDriver_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPayPalDriver_Tests.swift deleted file mode 100755 index daa16e69..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPayPalDriver_Tests.swift +++ /dev/null @@ -1,2088 +0,0 @@ -import XCTest - -// MARK: Authorization - -class BTPayPalDriver_Authorization_Tests: XCTestCase { - - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - var observers : [NSObjectProtocol] = [] - let ValidClientToken = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI3ODJhZmFlNDJlZTNiNTA4NWUxNmMzYjhkZTY3OGQxNTJhODFlYzk5MTBmZDNhY2YyYWU4MzA2OGI4NzE4YWZhfGNyZWF0ZWRfYXQ9MjAxNS0wOC0yMFQwMjoxMTo1Ni4yMTY1NDEwNjErMDAwMFx1MDAyNmN1c3RvbWVyX2lkPTM3OTU5QTE5LThCMjktNDVBNC1CNTA3LTRFQUNBM0VBOEM4Nlx1MDAyNm1lcmNoYW50X2lkPWRjcHNweTJicndkanIzcW5cdTAwMjZwdWJsaWNfa2V5PTl3d3J6cWszdnIzdDRuYzgiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzL2RjcHNweTJicndkanIzcW4vY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIn0sInRocmVlRFNlY3VyZUVuYWJsZWQiOnRydWUsInRocmVlRFNlY3VyZSI6eyJsb29rdXBVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi90aHJlZV9kX3NlY3VyZS9sb29rdXAifSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjpmYWxzZSwibWVyY2hhbnRBY2NvdW50SWQiOiJzdGNoMm5mZGZ3c3p5dHc1IiwiY3VycmVuY3lJc29Db2RlIjoiVVNEIn0sImNvaW5iYXNlRW5hYmxlZCI6dHJ1ZSwiY29pbmJhc2UiOnsiY2xpZW50SWQiOiIxMWQyNzIyOWJhNThiNTZkN2UzYzAxYTA1MjdmNGQ1YjQ0NmQ0ZjY4NDgxN2NiNjIzZDI1NWI1NzNhZGRjNTliIiwibWVyY2hhbnRBY2NvdW50IjoiY29pbmJhc2UtZGV2ZWxvcG1lbnQtbWVyY2hhbnRAZ2V0YnJhaW50cmVlLmNvbSIsInNjb3BlcyI6ImF1dGhvcml6YXRpb25zOmJyYWludHJlZSB1c2VyIiwicmVkaXJlY3RVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbS9jb2luYmFzZS9vYXV0aC9yZWRpcmVjdC1sYW5kaW5nLmh0bWwiLCJlbnZpcm9ubWVudCI6Im1vY2sifSwibWVyY2hhbnRJZCI6ImRjcHNweTJicndkanIzcW4iLCJ2ZW5tbyI6Im9mZmxpbmUiLCJhcHBsZVBheSI6eyJzdGF0dXMiOiJtb2NrIiwiY291bnRyeUNvZGUiOiJVUyIsImN1cnJlbmN5Q29kZSI6IlVTRCIsIm1lcmNoYW50SWRlbnRpZmllciI6Im1lcmNoYW50LmNvbS5icmFpbnRyZWVwYXltZW50cy5zYW5kYm94LkJyYWludHJlZS1EZW1vIiwic3VwcG9ydGVkTmV0d29ya3MiOlsidmlzYSIsIm1hc3RlcmNhcmQiLCJhbWV4Il19fQ==" - - - override func setUp() { - super.setUp() - - mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - FakePayPalOneTouchCore.setCannedIsWalletAppAvailable(true) - } - - override func tearDown() { - for observer in observers { NotificationCenter.default.removeObserver(observer) } - super.tearDown() - } - - func testAuthorization_whenAPIClientIsNil_callsBackWithError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.apiClient = nil - - let expectation = self.expectation(description: "Authorization fails with error") - payPalDriver.authorizeAccount { (tokenizedPayPalAccount, error) -> Void in - XCTAssertNil(tokenizedPayPalAccount) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - XCTAssertEqual(error.code, BTPayPalDriverErrorType.integration.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenRemoteConfigurationFetchFails_callsBackWithConfigurationError() { - mockAPIClient.cannedConfigurationResponseError = NSError(domain: "", code: 0, userInfo: nil) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - - let expectation = self.expectation(description: "Authorization fails with error") - payPalDriver.authorizeAccount { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedConfigurationResponseError!) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenPayPalConfigurationDisabled_callsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ "paypalEnabled": false ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - - let expectation = self.expectation(description: "authorization callback") - payPalDriver.authorizeAccount { (tokenizedPayPalAccount, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - XCTAssertEqual(error.code, BTPayPalDriverErrorType.disabled.rawValue) - expectation.fulfill() - } - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenReturnURLSchemeIsNil_logsCriticalMessageAndCallsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ "paypalEnabled": true ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTAppSwitch.setReturnURLScheme("") - payPalDriver.returnURLScheme = "" - - var criticalMessageLogged = false - BTLogger.shared().logBlock = { - (level: BTLogLevel, message: String?) in - if (level == BTLogLevel.critical && message == "PayPal requires a return URL scheme to be configured via [BTAppSwitch setReturnURLScheme:]. This custom URL scheme must also be registered with your app.") { - criticalMessageLogged = true - } - BTLogger.shared().logBlock = nil - return - } - - let expectation = self.expectation(description: "authorization callback") - payPalDriver.authorizeAccount { (tokenizedPayPalAccount, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - XCTAssertEqual(error.code, BTPayPalDriverErrorType.integrationReturnURLScheme.rawValue) - expectation.fulfill() - } - - XCTAssertTrue(criticalMessageLogged) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenRemoteConfigurationIsAvailable_performsPayPalRequestAppSwitch() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.authorizeAccount { _ -> Void in } - - waitForExpectations(timeout: 2, handler: nil) - XCTAssertTrue(mockRequestFactory.authorizationRequest.appSwitchPerformed) - } - - func testAuthorization_whenBillingAgreementsEnabledInConfiguration_performsBillingAgreements() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline", - "billingAgreementsEnabled": true, - "currencyIsoCode": "GBP", - ] ]) - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.authorizeAccount { _ -> Void in - } - - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - // We want to make sure that currency is not used for Billing Agreements - XCTAssertTrue(lastPostParameters["currency_iso_code"] == nil) - // We want to make sure that intent is not used for Billing Agreements - XCTAssertTrue(lastPostParameters["intent"] == nil) - XCTAssertEqual(lastPostParameters["return_url"] as? String, "scheme://return") - XCTAssertEqual(lastPostParameters["cancel_url"] as? String, "scheme://cancel") - } - - func testAuthorizationRequest_byDefault_containsEmailAndFuturePaymentsScopes() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.authorizeAccount { _ -> Void in } - - waitForExpectations(timeout: 5, handler: nil) - for expectedScope in ["email", "https://uri.paypal.com/services/payments/futurepayments"] { - XCTAssertTrue(mockRequestFactory.lastScopeValues!.contains(expectedScope as NSObject)) - } - } - - func testAuthorizationRequest_whenAdditionalScopesAreSpecified_includesThoseAdditionalScopes() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.authorizeAccount(withAdditionalScopes: Set(["foo", "bar"])) { _ -> Void in } - - waitForExpectations(timeout: 5, handler: nil) - for expectedScope in ["email", "https://uri.paypal.com/services/payments/futurepayments", "foo", "bar"] { - XCTAssertTrue(mockRequestFactory.lastScopeValues!.contains(expectedScope as NSObject)) - } - } - - func testAuthorizationRequest_whenUsingTokenizationKey_includesTokenizationKeyInAdditionalPayloadAttributes() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - let mockRequest = mockRequestFactory.authorizationRequest - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.authorizeAccount { _ -> Void in } - - waitForExpectations(timeout: 5, handler: nil) - XCTAssertEqual(mockRequest.additionalPayloadAttributes["client_key"] as? String, "development_tokenization_key") - } - - func testAuthorizationRequest_whenUsingClientToken_includesClientTokenInAdditionalPayloadAttributes() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - mockAPIClient.tokenizationKey = nil - mockAPIClient.clientToken = try! BTClientToken(clientToken: ValidClientToken) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - let mockRequest = mockRequestFactory.authorizationRequest - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.authorizeAccount { _ -> Void in } - - waitForExpectations(timeout: 5, handler: nil) - XCTAssertEqual(mockRequest.additionalPayloadAttributes["client_token"] as? String, ValidClientToken) - } - - - func testAuthorization_whenAppSwitchCancels_callsBackWithNoResultOrError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.cancel - - let expectation = self.expectation(description: "App switch return block invoked") - payPalDriver.setAuthorizationAppSwitchReturn { (tokenizedAccount, error) -> Void in - XCTAssertNil(tokenizedAccount) - XCTAssertNil(error) - expectation.fulfill() - } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenAppSwitchSucceeds_tokenizesPayPalAccount() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.clientMetadataId = "a-correlation-id" - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - payPalDriver.payPalRequest = BTPayPalRequest(); - mockAPIClient.cannedResponseBody = BTJSON(value: ["paypalAccounts": [ - ["nonce": "fake-nonce"] - ] ] ) - - payPalDriver.setAuthorizationAppSwitchReturn { _ -> Void in } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail("Expected POST to contain parameters") - return - } - - let paypalAccount = lastPostParameters["paypal_account"] as! NSDictionary - XCTAssertEqual(paypalAccount["correlation_id"] as? String, "a-correlation-id") - XCTAssertTrue(paypalAccount["intent"] == nil) - XCTAssertEqual(paypalAccount, FakePayPalOneTouchCoreResult().response as AnyObject as! NSDictionary) - } - - func testAuthorization_whenAppSwitchingToApp_makesAppSwitchDelegateCallbacks() { - if #available(iOS 9.0, *) { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - let delegate = MockAppSwitchDelegate(willPerform: expectation(description: "willPerformAppSwitch called"), didPerform: expectation(description: "didPerformAppSwitch called")) - delegate.willProcessAppSwitchExpectation = expectation(description: "willProcessPaymentInfo called") - payPalDriver.appSwitchDelegate = delegate - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - - payPalDriver.authorizeAccount { _ -> Void in } - payPalDriver.setAuthorizationAppSwitchReturn { _ -> Void in } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenAppSwitchingToApp_postsNotifications() { - if #available(iOS 9.0, *) { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - let delegate = MockAppSwitchDelegate() - delegate.willPerformAppSwitchExpectation = expectation(description: "willPerformAppSwitch called") - payPalDriver.appSwitchDelegate = delegate - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - - let willAppSwitchNotificationExpectation = expectation(description: "willAppSwitch notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchWillSwitch, object: nil, queue: nil) { (notification) -> Void in - willAppSwitchNotificationExpectation.fulfill() - }) - - let didAppSwitchNotificationExpectation = expectation(description: "didAppSwitch notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchDidSwitch, object: nil, queue: nil) { (notification) -> Void in - didAppSwitchNotificationExpectation.fulfill() - }) - - payPalDriver.authorizeAccount { _ -> Void in } - - let willProcessNotificationExpectation = expectation(description: "willProcess notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchWillProcessPaymentInfo, object: nil, queue: nil) { (notification) -> Void in - willProcessNotificationExpectation.fulfill() - }) - - payPalDriver.setAuthorizationAppSwitchReturn { _ -> Void in } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenSwitchingToSFSafariViewController_makesViewControllerPresentingDelegateCallbacks() { - guard #available(iOS 9.0, *) else { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - payPalDriver.requestFactory = FakePayPalRequestFactory() - let mockViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - mockViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = mockViewControllerPresentingDelegate - - payPalDriver.authorizeAccount { _ -> Void in } - waitForExpectations(timeout: 2, handler: nil) - - // Test dismissal of view controller - XCTAssertTrue(mockViewControllerPresentingDelegate.lastViewController is SFSafariViewController) - - let safariViewController = mockViewControllerPresentingDelegate.lastViewController - mockViewControllerPresentingDelegate.lastViewController = nil - mockViewControllerPresentingDelegate.lastPaymentDriver = nil - mockViewControllerPresentingDelegate.requestsDismissalOfViewControllerExpectation = expectation(description: "Delegate received requestsDismissalOfViewController") - - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertEqual(mockViewControllerPresentingDelegate.lastViewController, safariViewController) - XCTAssertEqual(mockViewControllerPresentingDelegate.lastPaymentDriver as? BTPayPalDriver, payPalDriver) - } - - func testAuthorization_whenSwitchingToSFSafariViewController_doesNotMakeAppSwitchDelegateCallbacks() { - guard #available(iOS 9.0, *) else { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - payPalDriver.requestFactory = FakePayPalRequestFactory() - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - let mockAppSwitchDelegate = MockAppSwitchDelegate() - payPalDriver.appSwitchDelegate = mockAppSwitchDelegate - - payPalDriver.authorizeAccount { _ -> Void in } - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertFalse(mockAppSwitchDelegate.willPerformAppSwitchCalled) - XCTAssertFalse(mockAppSwitchDelegate.didPerformAppSwitchCalled) - - stubViewControllerPresentingDelegate.requestsDismissalOfViewControllerExpectation = expectation(description: "Delegate received requestsDismissalOfViewController") - - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertFalse(mockAppSwitchDelegate.willProcessAppSwitchCalled) - } - - func testAuthorization_whenSwitchingToSFSafariViewControllerAndURLIsNotHTTP_callsBackWithError() { - guard #available(iOS 9.0, *) else { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - let stubPayPalRequestFactory = FakePayPalRequestFactory() - stubPayPalRequestFactory.authorizationRequest.cannedURL = URL(string: "garbage://garbage") - payPalDriver.requestFactory = stubPayPalRequestFactory - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - let mockAppSwitchDelegate = MockAppSwitchDelegate() - payPalDriver.appSwitchDelegate = mockAppSwitchDelegate - - let expectation = self.expectation(description: "Callback invoked") - payPalDriver.authorizeAccount { (tokenizedPayPalAccount, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenAppSwitchResultIsError_returnsUnderlyingError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.error - let fakeError = NSError(domain: "FakeError", code: 1, userInfo: nil) - BTPayPalDriver.payPalClass().cannedResult()?.cannedError = fakeError - - let expectation = self.expectation(description: "App switch completion callback") - payPalDriver.setAuthorizationAppSwitchReturn { (tokenizedAccount, error) -> Void in - guard let error = error else { - XCTFail() - return - } - XCTAssertEqual(error as NSError, fakeError) - expectation.fulfill() - } - - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - waitForExpectations(timeout: 5, handler: nil) - } - - func testTokenizedPayPalAccount_containsPayerInfo() { - let authResponse = [ - "paypalAccounts": [ - [ - "nonce": "a-nonce", - "description": "A description", - "details": [ - "email": "hello@world.com", - "payerInfo": [ - "accountAddress": [ - "recipientName": "Foo Bar", - "street1": "1 Foo Ct", - "street2": "Apt Bar", - "city": "Fubar", - "state": "FU", - "postalCode": "42", - "country": "USA" - ] - ] - ] - ] ] ] - assertSuccessfulAuthorizationResponse(authResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.nonce, "a-nonce") - XCTAssertEqual(tokenizedPayPalAccount!.localizedDescription, "A description") - XCTAssertEqual(tokenizedPayPalAccount!.email, "hello@world.com") - let shippingAddress = tokenizedPayPalAccount!.shippingAddress! - XCTAssertEqual(shippingAddress.recipientName, "Foo Bar") - XCTAssertEqual(shippingAddress.streetAddress, "1 Foo Ct") - XCTAssertEqual(shippingAddress.extendedAddress, "Apt Bar") - XCTAssertEqual(shippingAddress.locality, "Fubar") - XCTAssertEqual(shippingAddress.region, "FU") - XCTAssertEqual(shippingAddress.postalCode, "42") - XCTAssertEqual(shippingAddress.countryCodeAlpha2, "USA") - }) - } - - func testTokenizedPayPalAccount_whenEmailAddressIsNestedInsidePayerInfoJSON_usesNestedEmailAddress() { - let authResponse = [ - "paypalAccounts": [ - [ - "nonce": "fake-nonce", - "details": [ - "email": "not-hello@world.com", - "payerInfo": [ - "email": "hello@world.com", - ] - ], - ] - ] ] - assertSuccessfulAuthorizationResponse(authResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.email, "hello@world.com") - }) - } - - func testTokenizedPayPalAccount_whenDescriptionJSONIsPayPal_usesEmailAsLocalizedDescription() { - let authResponse = [ - "paypalAccounts": [ - [ - "nonce": "fake-nonce", - "description": "PayPal", - "details": [ - "email": "hello@world.com", - ], - ] - ] ] - assertSuccessfulAuthorizationResponse(authResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.localizedDescription, "hello@world.com") - }) - } - - // MARK: _meta parameter - - func testMetaParameter_whenAuthorizationAppSwitchIsSuccessful_isPOSTedToServer() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.cannedResult()?.cannedType = .success - stubPayPalClass.setCannedIsWalletAppAvailable(true) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - payPalDriver.setAuthorizationAppSwitchReturn { _ -> Void in } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "paypal-app") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } - - func testMetaParameter_whenAuthorizationBrowserSwitchIsSuccessful_isPOSTedToServer() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.cannedResult()?.cannedType = .success - stubPayPalClass.setCannedIsWalletAppAvailable(false) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - payPalDriver.setAuthorizationAppSwitchReturn { _ -> Void in } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "paypal-browser") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } - - // MARK: Helpers - - func assertSuccessfulAuthorizationResponse(_ response: [String:AnyObject], assertionBlock: @escaping (BTPayPalAccountNonce?, NSError?) -> Void) { - mockAPIClient.cannedResponseBody = BTJSON(value: response) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - - payPalDriver.setAuthorizationAppSwitchReturn { (tokenizedPayPalAccount, error) -> Void in - assertionBlock(tokenizedPayPalAccount, error as NSError?) - } - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - } -} - -// MARK: - Checkout - -class BTPayPalDriver_Checkout_Tests: XCTestCase { - - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - - override func setUp() { - super.setUp() - - mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "fakeURL://" - ] ]) - - } - - func testCheckout_whenAPIClientIsNil_callsBackWithError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.apiClient = nil - - let request = BTPayPalRequest(amount: "1") - let expectation = self.expectation(description: "Checkout fails with error") - - payPalDriver.requestOneTimePayment(request) { (tokenizedPayPalAccount, error) -> Void in - XCTAssertNil(tokenizedPayPalAccount) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - XCTAssertEqual(error.code, BTPayPalDriverErrorType.integration.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenRemoteConfigurationFetchFails_callsBackWithConfigurationError() { - mockAPIClient.cannedConfigurationResponseBody = nil - mockAPIClient.cannedConfigurationResponseError = NSError(domain: "", code: 0, userInfo: nil) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let request = BTPayPalRequest(amount: "1") - let expectation = self.expectation(description: "Checkout fails with error") - payPalDriver.requestOneTimePayment(request) { (_, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedConfigurationResponseError!) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenRemoteConfigurationFetchSucceeds_postsPaymentResource() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["amount"] as? String, "1") - XCTAssertEqual(lastPostParameters["currency_iso_code"] as? String, "GBP") - XCTAssertEqual(lastPostParameters["return_url"] as? String, "scheme://return") - XCTAssertEqual(lastPostParameters["cancel_url"] as? String, "scheme://cancel") - } - - func testCheckout_byDefault_postsPaymentResourceWithNoShipping() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - // no_shipping = true should be the default. - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["no_shipping"] as? Bool, true) - } - - func testCheckout_whenShippingAddressIsRequired_postsPaymentResourceWithNoShippingAsFalse() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.isShippingAddressRequired = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["no_shipping"] as? Bool, false) - } - - func testCheckout_whenIntentIsNotSpecified_postsPaymentResourceWithAuthorizeIntent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.isShippingAddressRequired = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["intent"] as? String, "authorize") - XCTAssertEqual(request.intent, BTPayPalRequestIntent.authorize) - } - - func testCheckout_whenIntentIsSetToAuthorize_postsPaymentResourceWithIntent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.intent = .authorize; - request.isShippingAddressRequired = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["intent"] as? String, "authorize") - } - - func testCheckout_whenIntentIsSetToSale_postsPaymentResourceWithIntent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.intent = .sale; - request.isShippingAddressRequired = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["intent"] as? String, "sale") - } - - func testCheckout_whenIntentIsSetToOrder_postsPaymentResourceWithIntent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.intent = .order; - request.isShippingAddressRequired = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["intent"] as? String, "order") - } - - func testCheckout_whenLandingPageTypeIsNotSpecified_doesNotPostPaymentResourceWithLandingPageType() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - XCTAssertEqual(BTPayPalRequestLandingPageType.default, request.landingPageType) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertNil(experienceProfile["landing_page_type"]) - } - - func testCheckout_whenLandingPageTypeIsBilling_postsPaymentResourceWithBillingLandingPageType() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.landingPageType = .billing - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["landing_page_type"] as? String, "billing") - } - - func testCheckout_whenLandingPageTypeIsLogin_postsPaymentResourceWithLoginLandingPageType() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.landingPageType = .login - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["landing_page_type"] as? String, "login") - } - - func testCheckout_whenUserActionIsNotSet_approvalUrlIsNotModified() { - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "https://www.paypal.com/checkout/?EC-Token=EC-Random-Value" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - guard let lastApprovalURL = mockRequestFactory.lastApprovalURL, - let approvalURLComponents = URLComponents(url: lastApprovalURL, resolvingAgainstBaseURL: false) else { - XCTFail("Did not find the last approval URL") - return - } - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "EC-Token" && $0.value == "EC-Random-Value" }).count, 1, - "Did not find existing query parameter") - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "useraction" }).count, 0, - "Found useraction query item when not expected") - } - - func testCheckout_whenUserActionIsSetToDefault_approvalUrlIsNotModified() { - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "https://www.paypal.com/checkout/?EC-Token=EC-Random-Value" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.userAction = BTPayPalRequestUserAction.default - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - guard let lastApprovalURL = mockRequestFactory.lastApprovalURL, - let approvalURLComponents = URLComponents(url: lastApprovalURL, resolvingAgainstBaseURL: false) else { - XCTFail("Did not find the last approval URL") - return - } - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "EC-Token" && $0.value == "EC-Random-Value" }).count, 1, - "Did not find existing query parameter") - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "useraction" }).count, 0, - "Found useraction query item when not expected") - } - - func testCheckout_whenUserActionIsSetToCommit_approvalUrlIsModified() { - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "https://www.paypal.com/checkout/?EC-Token=EC-Random-Value" - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.userAction = BTPayPalRequestUserAction.commit - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - guard let lastApprovalURL = mockRequestFactory.lastApprovalURL, - let approvalURLComponents = URLComponents(url: lastApprovalURL, resolvingAgainstBaseURL: false) else { - XCTFail("Did not find the last approval URL") - return - } - - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "EC-Token" && $0.value == "EC-Random-Value" }).count, 1, - "Did not find existing query parameter") - XCTAssertEqual(approvalURLComponents.queryItems?.filter({ $0.name == "useraction" && $0.value == "commit" }).count, 1, - "Did not find useraction query item") - } - - func testCheckout_whenDisplayNameIsNotSet_doesNotPostPaymentResourceWithBrandName() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - XCTAssertNil(request.displayName) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertFalse(experienceProfile.keys.contains("brand_name")) - } - - func testCheckout_whenDisplayNameIsSet_postsPaymentResourceWithDisplayName() { - let merchantName = "My Random Merchant Name" - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.displayName = merchantName - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["brand_name"] as? String, merchantName) - } - - func testCheckout_whenDisplayNameIsSetInConfiguration_postsPaymentResourceWithConfigurationBrandName() { - let merchantName = "My Random Merchant Name" - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "displayName": merchantName - ] - ]) - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.displayName = merchantName - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(experienceProfile["brand_name"] as? String, merchantName) - } - - func testCheckout_whenRemoteConfigurationFetchSucceeds_postsPaymentResourceWithShippingAddress() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - let address : BTPostalAddress = BTPostalAddress() - address.streetAddress = "1234 Fake St." - address.extendedAddress = "Apt. 0" - address.region = "CA" - address.locality = "Oakland" - address.countryCodeAlpha2 = "US" - address.postalCode = "12345" - request.shippingAddressOverride = address - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - guard let experienceProfile = lastPostParameters["experience_profile"] as? Dictionary else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["offer_paypal_credit"] as? Bool, false) - XCTAssertEqual(experienceProfile["address_override"] as? Bool, true) - XCTAssertEqual(lastPostParameters["line1"] as? String, "1234 Fake St.") - XCTAssertEqual(lastPostParameters["line2"] as? String, "Apt. 0") - XCTAssertEqual(lastPostParameters["city"] as? String, "Oakland") - XCTAssertEqual(lastPostParameters["state"] as? String, "CA") - XCTAssertEqual(lastPostParameters["postal_code"] as? String, "12345") - XCTAssertEqual(lastPostParameters["country_code"] as? String, "US") - } - - func testCheckout_whenPayPalCreditOffered_performsSwitchCorrectly() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest(amount: "1") - request.currencyCode = "GBP" - request.offerCredit = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.requestOneTimePayment(request) { _ in } - - self.waitForExpectations(timeout: 2, handler: nil) - XCTAssertTrue(mockRequestFactory.checkoutRequest.appSwitchPerformed) - - // Ensure the payment resource had the correct parameters - XCTAssertEqual("v1/paypal_hermes/create_payment_resource", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["offer_paypal_credit"] as? Bool, true) - - // Make sure analytics event was sent when switch occurred - let postedAnalyticsEvents = mockAPIClient.postedAnalyticsEvents - - if #available(iOS 9.0, *) { - XCTAssertTrue(postedAnalyticsEvents.contains("ios.paypal-single-payment.webswitch.credit.offered.started")) - } else { - XCTAssertTrue(postedAnalyticsEvents.contains("ios.paypal-single-payment.appswitch.credit.offered.started")) - } - } - - func testCheckout_whenPayPalPaymentCreationSuccessful_performsAppSwitch() { - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - let request = BTPayPalRequest(amount: "1") - payPalDriver.requestOneTimePayment(request) { _ -> Void in } - - self.waitForExpectations(timeout: 2, handler: nil) - XCTAssertTrue(mockRequestFactory.checkoutRequest.appSwitchPerformed) - XCTAssertEqual(payPalDriver.clientMetadataId, "fake-canned-metadata-id") - } - - func testCheckout_whenPaymentResourceCreationFails_callsBackWithError() { - mockAPIClient.cannedResponseError = NSError(domain: "", code: 0, userInfo: nil) - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let dummyRequest = BTPayPalRequest(amount: "1") - let expectation = self.expectation(description: "Checkout fails with error") - payPalDriver.requestOneTimePayment(dummyRequest) { (_, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedResponseError!) - expectation.fulfill() - } - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenAppSwitchCancels_callsBackWithNoResultOrError() { - let payPalDriver = BTPayPalDriver(apiClient:mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let returnURL = URL(string: "bar://hello/world")! - - let continuationExpectation = self.expectation(description: "Continuation called") - - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .cancel - payPalDriver.setOneTimePaymentAppSwitchReturn ({ (tokenizedCheckout, error) -> Void in - XCTAssertNil(tokenizedCheckout) - XCTAssertNil(error) - continuationExpectation.fulfill() - }) - - BTPayPalDriver.handleAppSwitchReturn(returnURL) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenAppSwitchErrors_callsBackWithError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let returnURL = URL(string: "bar://hello/world")! - - let continuationExpectation = self.expectation(description: "Continuation called") - - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .error - BTPayPalDriver.payPalClass().cannedResult()?.cannedError = NSError(domain: "", code: 0, userInfo: nil) - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ (tokenizedCheckout, error) -> Void in - XCTAssertNil(tokenizedCheckout) - XCTAssertEqual(error! as NSError, BTPayPalDriver.payPalClass().cannedResult()?.error! as! NSError) - continuationExpectation.fulfill() - }) - - BTPayPalDriver.handleAppSwitchReturn(returnURL) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenAppSwitchSucceeds_tokenizesPayPalCheckout() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let paypalAccount = lastPostParameters["paypal_account"] as! NSDictionary - let options = paypalAccount["options"] as! NSDictionary - let validate = (options["validate"] as! NSNumber).boolValue - XCTAssertFalse(validate) - } - - func testCheckout_whenAppSwitchSucceeds_intentShouldExistAsPayPalAccountParameter() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - payPalDriver.payPalRequest = BTPayPalRequest(amount: "1.34") - payPalDriver.payPalRequest.intent = .sale - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let paypalAccount = lastPostParameters["paypal_account"] as! NSDictionary - XCTAssertEqual(paypalAccount["intent"] as? String, "sale") - let options = paypalAccount["options"] as! NSDictionary - let validate = (options["validate"] as! NSNumber).boolValue - XCTAssertFalse(validate) - } - - func testCheckout_whenCreditFinancingNotReturned_shouldNotSendCreditAcceptedAnalyticsEvent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ "paypalAccounts": - [ - [ - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - ], - "nonce": "a-nonce", - "type": "PayPalAccount", - ] - ] - ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - payPalDriver.payPalRequest = BTPayPalRequest(amount: "1.34") - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertFalse(mockAPIClient.postedAnalyticsEvents.contains("ios.paypal-single-payment.credit.accepted")) - } - - func testCheckout_whenCreditFinancingReturned_shouldSendCreditAcceptedAnalyticsEvent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ "paypalAccounts": - [ - [ - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - "creditFinancingOffered": [ - "cardAmountImmutable": true, - "monthlyPayment": [ - "currency": "USD", - "value": "13.88", - ], - "payerAcceptance": true, - "term": 18, - "totalCost": [ - "currency": "USD", - "value": "250.00", - ], - "totalInterest": [ - "currency": "USD", - "value": "0.00", - ], - ], - ], - "nonce": "a-nonce", - "type": "PayPalAccount", - ] - ] - ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - payPalDriver.payPalRequest = BTPayPalRequest(amount: "1.34") - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertTrue(mockAPIClient.postedAnalyticsEvents.contains("ios.paypal-single-payment.credit.accepted")) - } - - func testCheckout_whenAppSwitchSucceeds_makesDelegateCallback() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - let delegate = MockAppSwitchDelegate() - delegate.willProcessAppSwitchExpectation = expectation(description: "willProcessPaymentInfo called") - payPalDriver.appSwitchDelegate = delegate - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testCheckout_whenAppSwitchResultIsError_returnsUnderlyingError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .error - let fakeError = NSError(domain: "FakeError", code: 1, userInfo: nil) - BTPayPalDriver.payPalClass().cannedResult()?.cannedError = fakeError - - let expectation = self.expectation(description: "App switch completion callback") - payPalDriver.setOneTimePaymentAppSwitchReturn ({ (tokenizedCheckout, error) -> Void in - guard let error = error else { - XCTFail() - return - } - XCTAssertEqual(error as NSError, fakeError) - expectation.fulfill() - }) - - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - self.waitForExpectations(timeout: 5, handler: nil) - } - - func testCheckout_whenUsingCustomHandler_callsHandleApprovalDelegateMethod() { - guard #available(iOS 9.0, *) else { - return - } - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let handler = MockPayPalApprovalHandlerDelegate() - handler.url = NSURL(string: "some://url") - - handler.handleApprovalExpectation = self.expectation(description: "Delegate received handleApproval") - let blockExpectation = self.expectation(description: "Completion block reached") - payPalDriver.requestOneTimePayment(BTPayPalRequest(amount: "1"), handler: handler) { (_, _) in - XCTAssertNotNil(handler); - blockExpectation.fulfill() - } - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testtokenizedPayPalAccount_containsPayerInfo() { - let checkoutResponse = [ - "paypalAccounts": [ - [ - "nonce": "a-nonce", - "description": "A description", - "details": [ - "email": "hello@world.com", - "payerInfo": [ - "firstName": "Some", - "lastName": "Dude", - "phone": "867-5309", - "payerId": "FAKE-PAYER-ID", - "accountAddress": [ - "street1": "1 Foo Ct", - "street2": "Apt Bar", - "city": "Fubar", - "state": "FU", - "postalCode": "42", - "country": "USA" - ], - "billingAddress": [ - "recipientName": "Bar Foo", - "line1": "2 Foo Ct", - "line2": "Apt Foo", - "city": "Barfoo", - "state": "BF", - "postalCode": "24", - "countryCode": "ASU" - ], - "shippingAddress": [ - "recipientName": "Some Dude", - "line1": "3 Foo Ct", - "line2": "Apt 5", - "city": "Dudeville", - "state": "CA", - "postalCode": "24", - "countryCode": "US" - ] - ] - ] - ] ] ] - assertSuccessfulCheckoutResponse(checkoutResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.nonce, "a-nonce") - XCTAssertEqual(tokenizedPayPalAccount!.localizedDescription, "A description") - XCTAssertEqual(tokenizedPayPalAccount!.firstName, "Some") - XCTAssertEqual(tokenizedPayPalAccount!.lastName, "Dude") - XCTAssertEqual(tokenizedPayPalAccount!.phone, "867-5309") - XCTAssertEqual(tokenizedPayPalAccount!.email, "hello@world.com") - XCTAssertEqual(tokenizedPayPalAccount!.payerId, "FAKE-PAYER-ID") - let billingAddress = tokenizedPayPalAccount!.billingAddress! - let shippingAddress = tokenizedPayPalAccount!.shippingAddress! - XCTAssertEqual(billingAddress.recipientName, "Bar Foo") - XCTAssertEqual(billingAddress.streetAddress, "2 Foo Ct") - XCTAssertEqual(billingAddress.extendedAddress, "Apt Foo") - XCTAssertEqual(billingAddress.locality, "Barfoo") - XCTAssertEqual(billingAddress.region, "BF") - XCTAssertEqual(billingAddress.postalCode, "24") - XCTAssertEqual(billingAddress.countryCodeAlpha2, "ASU") - XCTAssertEqual(shippingAddress.recipientName, "Some Dude") - XCTAssertEqual(shippingAddress.streetAddress, "3 Foo Ct") - XCTAssertEqual(shippingAddress.extendedAddress, "Apt 5") - XCTAssertEqual(shippingAddress.locality, "Dudeville") - XCTAssertEqual(shippingAddress.region, "CA") - XCTAssertEqual(shippingAddress.postalCode, "24") - XCTAssertEqual(shippingAddress.countryCodeAlpha2, "US") - }) - } - - func testtokenizedPayPalAccount_whenEmailAddressIsNestedInsidePayerInfoJSON_usesNestedEmailAddress() { - let checkoutResponse = [ - "paypalAccounts": [ - [ - "nonce": "fake-nonce", - "details": [ - "email": "not-hello@world.com", - "payerInfo": [ - "email": "hello@world.com", - ] - ], - ] - ] ] - assertSuccessfulCheckoutResponse(checkoutResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.email, "hello@world.com") - }) - } - - func testtokenizedPayPalAccount_whenDescriptionJSONIsPayPal_usesEmailAsLocalizedDescription() { - let checkoutResponse = [ - "paypalAccounts": [ - [ - "nonce": "fake-nonce", - "description": "PayPal", - "details": [ - "email": "hello@world.com", - ], - ] - ] ] - assertSuccessfulCheckoutResponse(checkoutResponse as [String : AnyObject], - assertionBlock: { (tokenizedPayPalAccount, error) -> Void in - XCTAssertEqual(tokenizedPayPalAccount!.localizedDescription, "hello@world.com") - }) - } - - // MARK: _meta parameter - - func testMetadata_whenCheckoutAppSwitchIsSuccessful_isPOSTedToServer() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.cannedResult()?.cannedType = .success - stubPayPalClass.setCannedIsWalletAppAvailable(true) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "paypal-app") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } - - func testMetadata_whenCheckoutBrowserSwitchIsSuccessful_isPOSTedToServer() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.cannedResult()?.cannedType = .success - stubPayPalClass.setCannedIsWalletAppAvailable(false) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - payPalDriver.setOneTimePaymentAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let metaParameters = lastPostParameters["_meta"] as! NSDictionary - XCTAssertEqual(metaParameters["source"] as? String, "paypal-browser") - XCTAssertEqual(metaParameters["integration"] as? String, "custom") - XCTAssertEqual(metaParameters["sessionId"] as? String, mockAPIClient.metadata.sessionId) - } - - // MARK: Helpers - - func assertSuccessfulCheckoutResponse(_ response: [String:AnyObject], assertionBlock: @escaping (BTPayPalAccountNonce?, NSError?) -> Void) { - mockAPIClient.cannedResponseBody = BTJSON(value: response) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - - payPalDriver.setOneTimePaymentAppSwitchReturn ({ (tokenizedPayPalAccount, error) -> Void in - assertionBlock(tokenizedPayPalAccount, error as NSError?) - }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - } - - // MARK: - Analytics - - func testAPIClientMetadata_whenWalletAppIsInstalled_hasSourceSetToPayPalApp() { - // API client by default uses source = .Unknown and integration = .Custom - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - // It is critical to stub PayPalClass before instantiating the driver, since that is when source is set - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.setCannedIsWalletAppAvailable(true) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - let payPalDriver = BTPayPalDriver(apiClient: apiClient) - - XCTAssertEqual(payPalDriver.apiClient?.metadata.integration, BTClientMetadataIntegrationType.custom) - XCTAssertEqual(payPalDriver.apiClient?.metadata.source, BTClientMetadataSourceType.payPalApp) - } - - func testAPIClientMetadata_whenWalletAppIsNotAvailable_hasSourceSetToPayPalBrowser() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let stubPayPalClass = FakePayPalOneTouchCore.self - stubPayPalClass.setCannedIsWalletAppAvailable(false) - BTPayPalDriver.setPayPalClass(stubPayPalClass) - let payPalDriver = BTPayPalDriver(apiClient: apiClient) - - XCTAssertEqual(payPalDriver.apiClient?.metadata.integration, BTClientMetadataIntegrationType.custom) - XCTAssertEqual(payPalDriver.apiClient?.metadata.source, BTClientMetadataSourceType.payPalBrowser) - } -} - -// MARK: - Billing Agreements - -class BTPayPalDriver_BillingAgreements_Tests: XCTestCase { - - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - - override func setUp() { - super.setUp() - - mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "fakeURL://" - ] ]) - - } - - func testBillingAgreement_whenAPIClientIsNil_callsBackWithError() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.apiClient = nil - - let request = BTPayPalRequest(amount: "1") - let expectation = self.expectation(description: "Billing Agreement fails with error") - payPalDriver.requestBillingAgreement(request) { (tokenizedPayPalAccount, error) -> Void in - XCTAssertNil(tokenizedPayPalAccount) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTPayPalDriverErrorDomain) - XCTAssertEqual(error.code, BTPayPalDriverErrorType.integration.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testBillingAgreement_whenRemoteConfigurationFetchFails_callsBackWithConfigurationError() { - mockAPIClient.cannedConfigurationResponseBody = nil - mockAPIClient.cannedConfigurationResponseError = NSError(domain: "", code: 0, userInfo: nil) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let request = BTPayPalRequest() - let expectation = self.expectation(description: "Checkout fails with error") - payPalDriver.requestBillingAgreement(request) { (_, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedConfigurationResponseError!) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testBillingAgreement_whenRemoteConfigurationFetchSucceeds_postsSetupBillingAgreement() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestBillingAgreement(BTPayPalRequest()) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["return_url"] as? String, "scheme://return") - XCTAssertEqual(lastPostParameters["cancel_url"] as? String, "scheme://cancel") - XCTAssertEqual(lastPostParameters["offer_paypal_credit"] as? Bool, false) - } - - func testBillingAgreement_whenPayPalCreditOffered_performsSwitchCorrectly() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let request = BTPayPalRequest() - request.offerCredit = true - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - payPalDriver.requestBillingAgreement(request) { _ in } - - self.waitForExpectations(timeout: 2, handler: nil) - XCTAssertTrue(mockRequestFactory.billingAgreementRequest.appSwitchPerformed) - - // Ensure the payment resource had the correct parameters - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["offer_paypal_credit"] as? Bool, true) - - // Make sure analytics event was sent when switch occurred - let postedAnalyticsEvents = mockAPIClient.postedAnalyticsEvents - - if #available(iOS 9.0, *) { - XCTAssertTrue(postedAnalyticsEvents.contains("ios.paypal-ba.webswitch.credit.offered.started")) - } else { - XCTAssertTrue(postedAnalyticsEvents.contains("ios.paypal-ba.appswitch.credit.offered.started")) - } - } - - func testBillingAgreement_whenAppSwitchSucceeds_tokenizesPayPalAccount() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - - payPalDriver.setBillingAgreementAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertEqual(mockAPIClient.lastPOSTPath, "/v1/payment_methods/paypal_accounts") - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - let paypalAccount = lastPostParameters["paypal_account"] as! NSDictionary - XCTAssertEqual(paypalAccount, FakePayPalOneTouchCoreResult().response as AnyObject as! NSDictionary) - } - - func testBillingAgreement_whenConfigurationHasCurrency_doesNotSendCurrencyOrIntentViaPOSTParameters() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline", - "currencyIsoCode": "GBP", - ] ]) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - payPalDriver.requestBillingAgreement(BTPayPalRequest()) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertTrue(lastPostParameters["currency_iso_code"] == nil) - XCTAssertTrue(lastPostParameters["intent"] == nil) - } - - func testBillingAgreement_whenCheckoutRequestHasCurrency_doesNotSendCurrencyViaPOSTParameters() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let request = BTPayPalRequest() - request.currencyCode = "GBP" - - payPalDriver.requestBillingAgreement(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertTrue(lastPostParameters["currency_iso_code"] == nil) - } - - func testBillingAgreement_whenRequestHasBillingAgreementDescription_sendsDescriptionInParameters() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let request = BTPayPalRequest() - request.billingAgreementDescription = "My Billing Agreement description" - - payPalDriver.requestBillingAgreement(request) { _ -> Void in } - - XCTAssertEqual("v1/paypal_hermes/setup_billing_agreement", mockAPIClient.lastPOSTPath) - guard let lastPostParameters = mockAPIClient.lastPOSTParameters else { - XCTFail() - return - } - XCTAssertEqual(lastPostParameters["description"] as? String, "My Billing Agreement description") - } - - func testBillingAgreement_whenSetupBillingAgreementCreationSuccessful_performsPayPalRequestAppSwitch() { - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - let mockRequestFactory = FakePayPalRequestFactory() - payPalDriver.requestFactory = mockRequestFactory - // Depending on whether it's iOS 9 or not, we use different stub delegates to wait for the app switch to occur - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - let stubAppSwitchDelegate = MockAppSwitchDelegate() - if #available(iOS 9.0, *) { - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - } else { - stubAppSwitchDelegate.willPerformAppSwitchExpectation = expectation(description: "Delegate received willPerformAppSwitch") - stubAppSwitchDelegate.didPerformAppSwitchExpectation = expectation(description: "Delegate received didPerformAppSwitch") - payPalDriver.appSwitchDelegate = stubAppSwitchDelegate - } - - let request = BTPayPalRequest() - payPalDriver.requestBillingAgreement(request) { _ -> Void in } - - self.waitForExpectations(timeout: 2, handler: nil) - XCTAssertTrue(mockRequestFactory.billingAgreementRequest.appSwitchPerformed) - } - - func testBillingAgreement_whenSetupBillingAgreementCreationFails_callsBackWithError() { - mockAPIClient.cannedResponseError = NSError(domain: "", code: 0, userInfo: nil) - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - let dummyRequest = BTPayPalRequest() - let expectation = self.expectation(description: "Checkout fails with error") - payPalDriver.requestBillingAgreement(dummyRequest) { (_, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedResponseError!) - expectation.fulfill() - } - self.waitForExpectations(timeout: 2, handler: nil) - } - - - func testBillingAgreement_whenSFSafariViewControllerIsAvailable_callsViewControllerPresentationDelegateMethods() { - guard #available(iOS 9.0, *) else { - return - } - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - let viewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - - // Setup for requestsPersentationOfViewController - viewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = self.expectation(description: "Delegate received requestsPresentationOfViewController") - - payPalDriver.viewControllerPresentingDelegate = viewControllerPresentingDelegate - payPalDriver.informDelegatePresentingViewControllerRequestPresent(URL(string: "http://example.com")!) - - self.waitForExpectations(timeout: 2, handler: nil) - - XCTAssertTrue(viewControllerPresentingDelegate.lastViewController is SFSafariViewController) - XCTAssertEqual(viewControllerPresentingDelegate.lastViewController, payPalDriver.safariViewController) - let payPalDriverViewControllerPresented = payPalDriver.safariViewController - XCTAssertEqual(viewControllerPresentingDelegate.lastPaymentDriver as? BTPayPalDriver, payPalDriver) - - viewControllerPresentingDelegate.lastViewController = nil - viewControllerPresentingDelegate.lastPaymentDriver = nil - - // Setup for requestsDismissalOfViewController - viewControllerPresentingDelegate.requestsDismissalOfViewControllerExpectation = self.expectation(description: "Delegate received requestsDismissalOfViewController") - payPalDriver.informDelegatePresentingViewControllerNeedsDismissal() - - self.waitForExpectations(timeout: 2, handler: nil) - - XCTAssertTrue(viewControllerPresentingDelegate.lastViewController is SFSafariViewController) - XCTAssertEqual(viewControllerPresentingDelegate.lastViewController as? SFSafariViewController, payPalDriverViewControllerPresented) - XCTAssertNil(payPalDriver.safariViewController) - - XCTAssertEqual(viewControllerPresentingDelegate.lastPaymentDriver as? BTPayPalDriver, payPalDriver) - } - - func testBillingAgreement_whenSFSafariViewControllerIsAvailableButNoViewControllerPresentingDelegateSet_logsError() { - guard #available(iOS 9.0, *) else { - return - } - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - - var criticalMessageLogged = false - BTLogger.shared().logBlock = { - (level: BTLogLevel, message: String?) in - if (level == BTLogLevel.critical && message == "Unable to display View Controller to continue PayPal flow. BTPayPalDriver needs a viewControllerPresentingDelegate to be set.") { - criticalMessageLogged = true - } - return - } - - payPalDriver.informDelegatePresentingViewControllerRequestPresent(URL(string: "http://example.com")!) - XCTAssertTrue(criticalMessageLogged) - } - - func testBillingAgreement_whenSFSafariViewControllerIsAvailable_doesNotCallAppSwitchDelegateMethods() { - guard #available(iOS 9.0, *) else { - return - } - - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = PPOTResultType.success - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - payPalDriver.returnURLScheme = "foo://" - payPalDriver.requestFactory = FakePayPalRequestFactory() - let stubViewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - stubViewControllerPresentingDelegate.requestsPresentationOfViewControllerExpectation = expectation(description: "Delegate received requestsPresentationOfViewController") - payPalDriver.viewControllerPresentingDelegate = stubViewControllerPresentingDelegate - let mockAppSwitchDelegate = MockAppSwitchDelegate() - payPalDriver.appSwitchDelegate = mockAppSwitchDelegate - - payPalDriver.requestBillingAgreement(BTPayPalRequest(amount: "1")) { _ -> Void in } - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertFalse(mockAppSwitchDelegate.willPerformAppSwitchCalled) - XCTAssertFalse(mockAppSwitchDelegate.didPerformAppSwitchCalled) - - stubViewControllerPresentingDelegate.requestsDismissalOfViewControllerExpectation = expectation(description: "Delegate received requestsDismissalOfViewController") - - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - waitForExpectations(timeout: 2, handler: nil) - - XCTAssertFalse(mockAppSwitchDelegate.willProcessAppSwitchCalled) - } - - func testBillingAgreement_whenUsingCustomHandler_callsHandleApprovalDelegateMethod() { - guard #available(iOS 9.0, *) else { - return - } - - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - payPalDriver.returnURLScheme = "foo://" - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - - let handler = MockPayPalApprovalHandlerDelegate() - handler.url = NSURL(string: "some://url") - - handler.handleApprovalExpectation = self.expectation(description: "Delegate received handleApproval") - let blockExpectation = self.expectation(description: "Completion block reached") - payPalDriver.requestBillingAgreement(BTPayPalRequest(), handler: handler) { (_, _) in - XCTAssertNotNil(handler); - blockExpectation.fulfill() - } - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testBillingAgreement_whenCreditFinancingNotReturned_shouldNotSendCreditAcceptedAnalyticsEvent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ "paypalAccounts": - [ - [ - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - ], - "nonce": "a-nonce", - "type": "PayPalAccount", - ] - ] - ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - payPalDriver.payPalRequest = BTPayPalRequest() - - payPalDriver.setBillingAgreementAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertFalse(mockAPIClient.postedAnalyticsEvents.contains("ios.paypal-ba.credit.accepted")) - } - - func testBillingAgreement_whenCreditFinancingReturned_shouldSendCreditAcceptedAnalyticsEvent() { - let payPalDriver = BTPayPalDriver(apiClient: mockAPIClient) - mockAPIClient = payPalDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ "paypalAccounts": - [ - [ - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - "creditFinancingOffered": [ - "cardAmountImmutable": true, - "monthlyPayment": [ - "currency": "USD", - "value": "13.88", - ], - "payerAcceptance": true, - "term": 18, - "totalCost": [ - "currency": "USD", - "value": "250.00", - ], - "totalInterest": [ - "currency": "USD", - "value": "0.00", - ], - ], - ], - "nonce": "a-nonce", - "type": "PayPalAccount", - ] - ] - ]) - BTPayPalDriver.setPayPalClass(FakePayPalOneTouchCore.self) - BTPayPalDriver.payPalClass().cannedResult()?.cannedType = .success - payPalDriver.payPalRequest = BTPayPalRequest() - - payPalDriver.setBillingAgreementAppSwitchReturn ({ _ -> Void in }) - BTPayPalDriver.handleAppSwitchReturn(URL(string: "bar://hello/world")!) - - XCTAssertTrue(mockAPIClient.postedAnalyticsEvents.contains("ios.paypal-ba.credit.accepted")) - } -} - -class BTPayPalDriver_DropIn_Tests: XCTestCase { - - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - - override func setUp() { - super.setUp() - - mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] ]) - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "redirectUrl": "fakeURL://" - ] ]) - } - - func testDropInViewDelegateSet() { - let dropInViewController = BTDropInViewController(apiClient: mockAPIClient) - - var paymentButton : BTPaymentButton? = nil - for subView in dropInViewController.view.subviews.first!.subviews.first!.subviews { - if let view = subView as? BTPaymentButton { - paymentButton = view - } - } - - XCTAssertNotNil(paymentButton) - XCTAssertNotNil(paymentButton?.viewControllerPresentingDelegate) - XCTAssertEqual(paymentButton?.viewControllerPresentingDelegate as? BTDropInViewController, dropInViewController) - } - -} - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentButton_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentButton_Tests.swift deleted file mode 100755 index d1df1f93..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentButton_Tests.swift +++ /dev/null @@ -1,70 +0,0 @@ -import XCTest - -class BTPaymentButton_Tests: XCTestCase { - - var window : UIWindow! - var viewController : UIViewController! - - override func setUp() { - super.setUp() - - viewController = UIApplication.shared.windows[0].rootViewController - } - - override func tearDown() { - if viewController.presentedViewController != nil { - viewController.dismiss(animated: false, completion: nil) - } - - super.tearDown() - } - - func testPaymentButton_whenUsingTokenizationKey_doesNotCrash() { - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let paymentButton = BTPaymentButton(apiClient: apiClient) { _ in } - let paymentButtonViewController = UIViewController() - paymentButtonViewController.view.addSubview(paymentButton) - - viewController.present(paymentButtonViewController, animated: true, completion: nil) - } - - func testPaymentButton_byDefault_hasAllPaymentOptions() { - let stubAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - let paymentButton = BTPaymentButton(apiClient: stubAPIClient) { _ in } - - XCTAssertEqual(paymentButton.enabledPaymentOptions, NSOrderedSet(array: ["PayPal", "Venmo"])) - } - - func testPaymentButton_whenPayPalIsEnabledInConfiguration_checksConfigurationForPaymentOptionAvailability() { - let stubAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - let paymentButton = BTPaymentButton(apiClient: stubAPIClient) { _ in } - paymentButton.configuration = BTConfiguration(json: BTJSON(value: [ "paypalEnabled": true ])) - - XCTAssertEqual(paymentButton.enabledPaymentOptions, NSOrderedSet(array: ["PayPal"])) - } - - func testPaymentButton_whenVenmoIsEnabledInConfiguration_checksConfigurationForPaymentOptionAvailability() { - let stubAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - let paymentButton = BTPaymentButton(apiClient: stubAPIClient) { _ in } - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = true - paymentButton.application = fakeApplication - paymentButton.configuration = BTConfiguration(json: BTJSON(value: [ "payWithVenmo": ["accessToken": "ACCESS_TOKEN"] ])) - BTConfiguration.setBetaPaymentOption("venmo", isEnabled: true) - - XCTAssertEqual(paymentButton.enabledPaymentOptions, NSOrderedSet(array: ["Venmo"])) - } - - func testPaymentButton_whenEnabledPaymentOptionsIsSetManually_skipsConfigurationValidation() { - let stubAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - let paymentButton = BTPaymentButton(apiClient: stubAPIClient) { _ in } - paymentButton.configuration = BTConfiguration(json: BTJSON(value: [ "paypalEnabled": false ])) - - paymentButton.enabledPaymentOptions = NSOrderedSet(array: ["PayPal"]) - XCTAssertEqual(paymentButton.enabledPaymentOptions, NSOrderedSet(array: ["PayPal"])) - - paymentButton.enabledPaymentOptions = NSOrderedSet(array: ["Venmo"]) - XCTAssertEqual(paymentButton.enabledPaymentOptions, NSOrderedSet(array: ["Venmo"])) - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentMethodNonceParser_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentMethodNonceParser_Tests.swift deleted file mode 100755 index c8809709..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTPaymentMethodNonceParser_Tests.swift +++ /dev/null @@ -1,302 +0,0 @@ -import XCTest - -class BTPaymentMethodNonceParser_Tests: XCTestCase { - - var parser : BTPaymentMethodNonceParser = BTPaymentMethodNonceParser() - - func testRegisterType_addsTypeToTypes() { - parser.registerType("MyType") { _ -> BTPaymentMethodNonce? in return nil} - - XCTAssertTrue(parser.allTypes.contains("MyType")) - } - - func testAllTypes_whenTypeIsNotRegistered_doesntContainType() { - XCTAssertEqual(parser.allTypes.count, 0) - } - - func testIsTypeAvailable_whenTypeIsRegistered_isTrue() { - parser.registerType("MyType") { _ -> BTPaymentMethodNonce? in return nil} - XCTAssertTrue(parser.isTypeAvailable("MyType")) - } - - func testIsTypeAvailable_whenTypeIsNotRegistered_isFalse() { - XCTAssertFalse(parser.isTypeAvailable("MyType")) - } - - func testParseJSON_whenTypeIsRegistered_callsParsingBlock() { - let expectation = self.expectation(description: "Parsing block called") - parser.registerType("MyType") { _ -> BTPaymentMethodNonce? in - expectation.fulfill() - return nil - } - parser.parseJSON(BTJSON(), withParsingBlockForType: "MyType") - - waitForExpectations(timeout: 3, handler: nil) - } - - func testParseJSON_whenTypeIsNotRegisteredAndJSONContainsNonce_returnsBasicTokenizationObject() { - let json = BTJSON(value: ["nonce": "valid-nonce", - "description": "My Description"]) - - let paymentMethodNonce = parser.parseJSON(json, withParsingBlockForType: "MyType") - - XCTAssertEqual(paymentMethodNonce?.nonce, "valid-nonce") - XCTAssertEqual(paymentMethodNonce?.localizedDescription, "My Description") - } - - func testParseJSON_whenTypeIsNotRegisteredAndJSONDoesNotContainNonce_returnsNil() { - let paymentMethodNonce = parser.parseJSON(BTJSON(value: ["description": "blah"]), withParsingBlockForType: "MyType") - - XCTAssertNil(paymentMethodNonce) - } - - // MARK: - Payment-specific tests - - func testSharedParser_whenTypeIsCreditCard_returnsCorrectCardNonce() { - let sharedParser = BTPaymentMethodNonceParser.shared() - - let creditCardJSON = BTJSON(value: [ - "consumed": false, - "description": "ending in 31", - "details": [ - "cardType": "American Express", - "lastTwo": "31", - ], - "isLocked": false, - "nonce": "0099b1d0-7a1c-44c3-b1e4-297082290bb9", - "securityQuestions": ["cvv"], - "threeDSecureInfo": NSNull(), - "type": "CreditCard", - "default": true - ]) - - let cardNonce = sharedParser.parseJSON(creditCardJSON, withParsingBlockForType:"CreditCard")! - - XCTAssertEqual(cardNonce.nonce, "0099b1d0-7a1c-44c3-b1e4-297082290bb9") - XCTAssertEqual(cardNonce.type, "AMEX") - XCTAssertTrue(cardNonce.isDefault) - } - - func testSharedParser_whenTypeIsPayPal_returnsPayPalAccountNonce() { - let sharedParser = BTPaymentMethodNonceParser.shared() - let payPalAccountJSON = BTJSON(value: [ - "consumed": false, - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - ], - "isLocked": false, - "nonce": "a-nonce", - "securityQuestions": [], - "type": "PayPalAccount", - "default": true - ]) - - let payPalAccountNonce = sharedParser.parseJSON(payPalAccountJSON, withParsingBlockForType: "PayPalAccount") as! BTPayPalAccountNonce - - XCTAssertEqual(payPalAccountNonce.nonce, "a-nonce") - XCTAssertEqual(payPalAccountNonce.type, "PayPal") - XCTAssertEqual(payPalAccountNonce.email, "jane.doe@example.com") - XCTAssertTrue(payPalAccountNonce.isDefault) - XCTAssertNil(payPalAccountNonce.creditFinancing) - } - - func testParsePayPalCreditFinancingAmount() { - let payPalCreditFinancingAmount = BTJSON(value: [ - "currency": "USD", - "value": "123.45", - ]) - - guard let amount = BTPayPalDriver.creditFinancingAmount(from: payPalCreditFinancingAmount) else { - XCTFail("Expected amount") - return - } - XCTAssertEqual(amount.currency, "USD") - XCTAssertEqual(amount.value, "123.45") - } - - func testParsePayPalCreditFinancing() { - let payPalCreditFinancing = BTJSON(value: [ - "cardAmountImmutable": false, - "monthlyPayment": [ - "currency": "USD", - "value": "123.45", - ], - "payerAcceptance": false, - "term": 3, - "totalCost": [ - "currency": "ABC", - "value": "789.01", - ], - "totalInterest": [ - "currency": "XYZ", - "value": "456.78", - ], - ]) - - guard let creditFinancing = BTPayPalDriver.creditFinancing(from: payPalCreditFinancing) else { - XCTFail("Expected credit financing") - return - } - - XCTAssertFalse(creditFinancing.cardAmountImmutable) - guard let monthlyPayment = creditFinancing.monthlyPayment else { - XCTFail("Expected monthly payment details") - return - } - XCTAssertEqual(monthlyPayment.currency, "USD") - XCTAssertEqual(monthlyPayment.value, "123.45") - - XCTAssertFalse(creditFinancing.payerAcceptance) - XCTAssertEqual(creditFinancing.term, 3) - - XCTAssertNotNil(creditFinancing.totalCost) - - guard let totalCost = creditFinancing.totalCost else { - XCTFail("Expected total cost details") - return - } - XCTAssertEqual(totalCost.currency, "ABC") - XCTAssertEqual(totalCost.value, "789.01") - - guard let totalInterest = creditFinancing.totalInterest else { - XCTFail("Expected total interest details") - return - } - XCTAssertEqual(totalInterest.currency, "XYZ") - XCTAssertEqual(totalInterest.value, "456.78") - } - - func testSharedParser_whenTypeIsPayPal_returnsPayPalAccountNonceWithCreditFinancingOffered() { - let sharedParser = BTPaymentMethodNonceParser.shared() - let payPalAccountJSON = BTJSON(value: [ - "consumed": false, - "description": "jane.doe@example.com", - "details": [ - "email": "jane.doe@example.com", - "creditFinancingOffered": [ - "cardAmountImmutable": true, - "monthlyPayment": [ - "currency": "USD", - "value": "13.88", - ], - "payerAcceptance": true, - "term": 18, - "totalCost": [ - "currency": "USD", - "value": "250.00", - ], - "totalInterest": [ - "currency": "USD", - "value": "0.00", - ], - ], - ], - "isLocked": false, - "nonce": "a-nonce", - "securityQuestions": [], - "type": "PayPalAccount", - "default": true, - ]) - - let payPalAccountNonce = sharedParser.parseJSON(payPalAccountJSON, withParsingBlockForType: "PayPalAccount") as! BTPayPalAccountNonce - - XCTAssertEqual(payPalAccountNonce.nonce, "a-nonce") - XCTAssertEqual(payPalAccountNonce.type, "PayPal") - XCTAssertEqual(payPalAccountNonce.email, "jane.doe@example.com") - XCTAssertTrue(payPalAccountNonce.isDefault) - - guard let creditFinancing = payPalAccountNonce.creditFinancing else { - XCTFail("Expected credit financing terms") - return - } - - XCTAssertTrue(creditFinancing.cardAmountImmutable) - guard let monthlyPayment = creditFinancing.monthlyPayment else { - XCTFail("Expected monthly payment details") - return - } - XCTAssertEqual(monthlyPayment.currency, "USD") - XCTAssertEqual(monthlyPayment.value, "13.88") - - XCTAssertTrue(creditFinancing.payerAcceptance) - XCTAssertEqual(creditFinancing.term, 18) - - XCTAssertNotNil(creditFinancing.totalCost) - - guard let totalCost = creditFinancing.totalCost else { - XCTFail("Expected total cost details") - return - } - XCTAssertEqual(totalCost.currency, "USD") - XCTAssertEqual(totalCost.value, "250.00") - - guard let totalInterest = creditFinancing.totalInterest else { - XCTFail("Expected total interest details") - return - } - XCTAssertEqual(totalInterest.currency, "USD") - XCTAssertEqual(totalInterest.value, "0.00") - } - - func testSharedParser_whenTypeIsVenmo_returnsVenmoAccountNonce() { - let sharedParser = BTPaymentMethodNonceParser.shared() - let venmoAccountJSON = BTJSON(value: [ - "consumed": false, - "description": "VenmoAccount", - "details": ["username": "jane.doe.username@example.com", "cardType": "Discover"], - "isLocked": false, - "nonce": "a-nonce", - "securityQuestions": [], - "type": "VenmoAccount", - "default": true - ]) - - let venmoAccountNonce = sharedParser.parseJSON(venmoAccountJSON, withParsingBlockForType: "VenmoAccount") as! BTVenmoAccountNonce - - XCTAssertEqual(venmoAccountNonce.nonce, "a-nonce") - XCTAssertEqual(venmoAccountNonce.type, "Venmo") - XCTAssertEqual(venmoAccountNonce.username, "jane.doe.username@example.com") - XCTAssertTrue(venmoAccountNonce.isDefault) - } - - func testSharedParser_whenTypeIsApplePayCard_returnsApplePayCardNonce() { - let sharedParser = BTPaymentMethodNonceParser.shared() - let applePayCard = BTJSON(value: [ - "consumed": false, - "description": "Apple Pay Card ending in 11", - "details": [ - "cardType": "American Express" - ], - "isLocked": false, - "nonce": "a-nonce", - "securityQuestions": [], - "type": "ApplePayCard", - ]) - - let applePayCardNonce = sharedParser.parseJSON(applePayCard, withParsingBlockForType: "ApplePayCard") as? BTApplePayCardNonce - - XCTAssertEqual(applePayCardNonce?.nonce, "a-nonce") - XCTAssertEqual(applePayCardNonce?.type, "American Express") - XCTAssertEqual(applePayCardNonce?.localizedDescription, "Apple Pay Card ending in 11") - } - - func testSharedParser_whenTypeIsUnknown_returnsBasePaymentMethodNonce() { - let sharedParser = BTPaymentMethodNonceParser.shared() - let JSON = BTJSON(value: [ - "consumed": false, - "description": "Some thing", - "details": [], - "isLocked": false, - "nonce": "a-nonce", - "type": "asdfasdfasdf", - "default": true - ]) - - let unknownNonce = sharedParser.parseJSON(JSON, withParsingBlockForType: "asdfasdfasdf")! - - XCTAssertEqual(unknownNonce.nonce, "a-nonce") - XCTAssertEqual(unknownNonce.type, "Unknown") - XCTAssertTrue(unknownNonce.isDefault) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureDriver_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureDriver_Tests.swift deleted file mode 100755 index 811fc745..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureDriver_Tests.swift +++ /dev/null @@ -1,236 +0,0 @@ -import XCTest - -class BTThreeDSecureDriver_Tests: XCTestCase { - - let originalNonce_lookupEnrolledAuthenticationNotRequired = "some-credit-card-nonce-where-3ds-succeeds-without-user-authentication" - let originalNonce_lookupEnrolledAuthenticationRequired = "some-credit-card-nonce-where-3ds-succeeds-after-user-authentication" - let originalNonce_lookupCardNotEnrolled = "some-credit-card-nonce-where-card-is-not-enrolled-for-3ds" - let viewControllerPresentingDelegate = MockViewControllerPresentationDelegate() - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_client_key")! - var observers : [NSObjectProtocol] = [] - - override func setUp() { - super.setUp() - - mockAPIClient = MockAPIClient(authorization: "development_client_key")! - } - - override func tearDown() { - for observer in observers { NotificationCenter.default.removeObserver(observer) } - super.tearDown() - } - - func testInitialization_initializesWithClientAndDelegate() { - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate ) - XCTAssertNotNil(threeDSecureDriver) - } - - func testVerification_whenAPIClientIsNil_callsBackWithError() { - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate ) - threeDSecureDriver.apiClient = nil - - let expectation = self.expectation(description: "verification fails with errors") - - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupEnrolledAuthenticationNotRequired, amount: NSDecimalNumber.one, completion: { (tokenizedCard, error) -> Void in - XCTAssertNil(tokenizedCard) - XCTAssertNotNil(error) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTThreeDSecureErrorDomain) - XCTAssertEqual(error.code, BTThreeDSecureErrorType.integration.rawValue) - expectation.fulfill() - }) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testVerification_whenRemoteConfigurationFetchFails_callsBackWithConfigurationError() { - mockAPIClient.cannedConfigurationResponseError = NSError(domain: "", code: 0, userInfo: nil) - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate ) - mockAPIClient = threeDSecureDriver.apiClient as! MockAPIClient - - let expectation = self.expectation(description: "verification fails with errors") - - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupEnrolledAuthenticationNotRequired, amount: NSDecimalNumber.one, completion: { (tokenizedCard, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedConfigurationResponseError!) - expectation.fulfill() - }) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testVerification_withCardThatDoesntRequireAuthentication_callsCompletionWithACard() { - let responseBody = [ - "paymentMethod": [ - "consumed": false, - "description": "ending in 02", - "details": [ - "cardType": "Visa", - "lastTwo": "02", - ], - "nonce": "f689056d-aee1-421e-9d10-f2c9b34d4d6f", - "threeDSecureInfo": [ - "enrolled": "Y", - "liabilityShiftPossible": true, - "liabilityShifted": true, - "status": "authenticate_successful", - ], - "type": "CreditCard", - ], - "success": true, - "threeDSecureInfo": [ - "liabilityShiftPossible": true, - "liabilityShifted": true, - ] - ] as [String : Any] - mockAPIClient.cannedResponseBody = BTJSON(value: responseBody) - - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate ) - - let expectation = self.expectation(description: "willCallCompletion") - - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupEnrolledAuthenticationNotRequired, amount: NSDecimalNumber.one, completion: { (tokenizedCard, error) -> Void in - XCTAssert(isANonce(tokenizedCard!.nonce)) - XCTAssertNil(error) - XCTAssert(tokenizedCard!.liabilityShifted) - XCTAssert(tokenizedCard!.liabilityShiftPossible) - expectation.fulfill() - }) - - waitForExpectations(timeout: 3, handler: nil) - } - - func testVerification_withCardThatRequiresAuthentication_requestsPresentationOfViewController() { - let responseBody = [ - "paymentMethod": [ - "consumed": false, - "description": "ending in 02", - "details": [ - "cardType": "Visa", - "lastTwo": "02", - ], - "nonce": "f689056d-aee1-421e-9d10-f2c9b34d4d6f", - "threeDSecureInfo": [ - "enrolled": "Y", - "liabilityShiftPossible": true, - "liabilityShifted": true, - "status": "authenticate_successful", - ], - "type": "CreditCard", - ], - "success": true, - "threeDSecureInfo": [ - "liabilityShiftPossible": true, - "liabilityShifted": true, - ], - "lookup": [ - "acsUrl": "http://example.com", - "pareq": "", - "md": "", - "termUrl": "http://example.com" - ] - ] as [String : Any] - mockAPIClient.cannedResponseBody = BTJSON(value: responseBody) - - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate ) - let mockDelegate = MockViewControllerPresentationDelegate() - threeDSecureDriver.delegate = mockDelegate - - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupEnrolledAuthenticationRequired, amount: NSDecimalNumber.one) { (tokenizedCard, error) -> Void in } - - XCTAssertNotNil(mockDelegate.lastViewController) - } - - func testVerification_whenCardIsNotEnrolled_returnsCardWithNewNonceAndCorrectLiabilityShiftInformation() { - let responseBody = [ - "paymentMethod": [ - "consumed": false, - "description": "ending in 02", - "details": [ - "cardType": "Visa", - "lastTwo": "02", - ], - "nonce": "f689056d-aee1-421e-9d10-f2c9b34d4d6f", - "threeDSecureInfo": [ - "enrolled": "N", - "liabilityShiftPossible": false, - "liabilityShifted": false, - "status": "authenticate_successful_issuer_not_participating", - ], - "type": "CreditCard", - ], - "success": true, - "threeDSecureInfo": [ - "liabilityShiftPossible": false, - "liabilityShifted": false, - ] - ] as [String : Any] - mockAPIClient.cannedResponseBody = BTJSON(value: responseBody) - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate) - - let expectation = self.expectation(description: "Card is tokenized") - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupCardNotEnrolled, amount: NSDecimalNumber.one) { (tokenizedCard, error) -> Void in - guard let tokenizedCard = tokenizedCard else { - XCTFail() - return - } - XCTAssertTrue(isANonce(tokenizedCard.nonce)) - XCTAssertNotEqual(tokenizedCard.nonce, self.originalNonce_lookupCardNotEnrolled); - XCTAssertNil(error) - XCTAssertFalse(tokenizedCard.liabilityShifted) - XCTAssertFalse(tokenizedCard.liabilityShiftPossible) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testError_whenFinishIsCalledMoreThanOnce_sendsErrorAnalyticsEvent() { - let responseBody = [ - "paymentMethod": [ - "consumed": false, - "description": "ending in 02", - "details": [ - "cardType": "Visa", - "lastTwo": "02", - ], - "nonce": "f689056d-aee1-421e-9d10-f2c9b34d4d6f", - "threeDSecureInfo": [ - "enrolled": "N", - "liabilityShiftPossible": false, - "liabilityShifted": false, - "status": "authenticate_successful_issuer_not_participating", - ], - "type": "CreditCard", - ], - "success": true, - "threeDSecureInfo": [ - "liabilityShiftPossible": false, - "liabilityShifted": false, - ] - ] as [String : Any] - mockAPIClient.cannedResponseBody = BTJSON(value: responseBody) - let threeDSecureDriver = BTThreeDSecureDriver.init(apiClient: mockAPIClient, delegate:viewControllerPresentingDelegate) - - let expectation = self.expectation(description: "Card is tokenized") - threeDSecureDriver.verifyCard(withNonce: originalNonce_lookupCardNotEnrolled, amount: NSDecimalNumber.one) { (tokenizedCard, error) -> Void in - guard let tokenizedCard = tokenizedCard else { - XCTFail() - return - } - XCTAssertTrue(isANonce(tokenizedCard.nonce)) - XCTAssertNotEqual(tokenizedCard.nonce, self.originalNonce_lookupCardNotEnrolled); - XCTAssertNil(error) - XCTAssertFalse(tokenizedCard.liabilityShifted) - XCTAssertFalse(tokenizedCard.liabilityShiftPossible) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - - let threeDSecureAuthenticationViewController = BTThreeDSecureAuthenticationViewController.init(lookupResult: BTThreeDSecureLookupResult.init()) - threeDSecureDriver.perform(#selector(threeDSecureDriver.threeDSecureViewControllerDidFinish(_:)), with: threeDSecureAuthenticationViewController) - - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.threedsecure.error.finished-without-handler") - } -} - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureLookupResult_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureLookupResult_Tests.swift deleted file mode 100755 index 9b306676..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTThreeDSecureLookupResult_Tests.swift +++ /dev/null @@ -1,24 +0,0 @@ -import XCTest - -class BTThreeDSecureLookupResult_Tests: XCTestCase { - - func testRequiresUserAuthentication_whenAcsUrlIsPresent_returnsTrue() { - let lookup = BTThreeDSecureLookupResult() - lookup.acsURL = URL(string: "http://example.com") - lookup.termURL = URL(string: "http://example.com") - lookup.md = "an-md" - lookup.paReq = "a-PAReq" - - XCTAssertTrue(lookup.requiresUserAuthentication()) - } - - func testRequiresUserAuthentication_whenAcsUrlIsNotPresent_returnsFalse() { - let lookup = BTThreeDSecureLookupResult() - lookup.acsURL = nil - lookup.termURL = URL(string: "http://example.com") - lookup.md = "an-md" - lookup.paReq = "a-PAReq" - - XCTAssertFalse(lookup.requiresUserAuthentication()) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTTokenizationService_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTTokenizationService_Tests.swift deleted file mode 100755 index 2e2f5240..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTTokenizationService_Tests.swift +++ /dev/null @@ -1,146 +0,0 @@ -import XCTest - -class BTTokenizationService_Tests: XCTestCase { - - var tokenizationService : BTTokenizationService! - - override func setUp() { - super.setUp() - tokenizationService = BTTokenizationService() - } - - override func tearDown() { - super.tearDown() - } - - func testRegisterType_addsTypeToTypes() { - tokenizationService.registerType("MyType") { _ -> Void in } - XCTAssertTrue(tokenizationService.allTypes.contains("MyType")) - } - - func testAllTypes_whenTypeIsNotRegistered_doesntContainType() { - XCTAssertFalse(tokenizationService.allTypes.contains("MyType")) - } - - func testIsTypeAvailable_whenTypeIsRegistered_isTrue() { - tokenizationService.registerType("MyType") { _ -> Void in } - XCTAssertTrue(tokenizationService.isTypeAvailable("MyType")) - } - - func testIsTypeAvailable_whenTypeIsNotRegistered_returnsFalse() { - XCTAssertFalse(tokenizationService.isTypeAvailable("MyType")) - } - - func testTokenizeType_whenTypeIsRegistered_callsTokenizationBlock() { - let expectation = self.expectation(description: "tokenization block called") - tokenizationService.registerType("MyType") { _ -> Void in - expectation.fulfill() - } - - tokenizationService.tokenizeType("MyType", options: nil, with: BTAPIClient(authorization: "development_testing_integration_merchant_id")!) { _ -> Void in - //nada - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenizeType_whenCalledWithOptions_callsTokenizationBlockAndPassesInOptions() { - let expectation = self.expectation(description: "tokenization block called") - let expectedOptions = ["Some Custom Option Key": "The Option Value"] - tokenizationService.registerType("MyType") { (_, options, _) -> Void in - XCTAssertEqual(options as! [String : String], expectedOptions) - expectation.fulfill() - } - - tokenizationService.tokenizeType("MyType", options: expectedOptions, with:BTAPIClient(authorization: "development_testing_integration_merchant_id")!) { _ -> Void in } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testTokenizeType_whenTypeIsNotRegistered_returnsError() { - let expectation = self.expectation(description: "Callback invoked") - tokenizationService.tokenizeType("UnknownType", options: nil, with:BTAPIClient(authorization: "development_testing_integration_merchant_id")!) { nonce, error -> Void in - XCTAssertNil(nonce) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTTokenizationServiceErrorDomain) - XCTAssertEqual(error.code, BTTokenizationServiceError.typeNotRegistered.rawValue) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler:nil) - } - - // MARK: - Payment-specific tests - - func testSingleton_hasExpectedTypesAvailable() { - let sharedService = BTTokenizationService.shared() - - XCTAssertTrue(sharedService.isTypeAvailable("PayPal")) - XCTAssertTrue(sharedService.isTypeAvailable("Venmo")) - XCTAssertTrue(sharedService.isTypeAvailable("Card")) - } - - func testSingleton_canTokenizeCards() { - let sharedService = BTTokenizationService.shared() - let card = BTCard(number: "4111111111111111", expirationMonth: "12", expirationYear: "2020", cvv: "123") - let stubAPIClient = MockAPIClient(authorization: "development_fake_key")! - stubAPIClient.cannedResponseBody = BTJSON(value: [ - "creditCards": [ - [ - "nonce": "a-nonce", - "description": "A card" - ] - ] - ]) - - let expectation = self.expectation(description: "Card is tokenized") - sharedService.tokenizeType("Card", options: card.parameters() as? [String : AnyObject], with: stubAPIClient) { (cardNonce, error) -> Void in - XCTAssertEqual(cardNonce?.nonce, "a-nonce") - XCTAssertNil(error) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - // This test only verifies that SFSafariViewController is presented - func testSingleton_canAuthorizePayPalThroughSFSafariViewController() { - if #available(iOS 9.0, *) { - let sharedService = BTTokenizationService.shared() - let stubAPIClient = MockAPIClient(authorization: "development_fake_key")! - stubAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline", - "privacyUrl": "", - "userAgreementUrl": "", - ] ]) - let mockDelegate = MockViewControllerPresentationDelegate() - BTAppSwitch.setReturnURLScheme("com.braintreepayments.Demo.payments") - - sharedService.tokenizeType("PayPal", options: [BTTokenizationServiceViewPresentingDelegateOption: mockDelegate], with: stubAPIClient) { _ -> Void in } - - XCTAssertTrue(mockDelegate.lastViewController is SFSafariViewController) - } - } - - func testSingleton_canAuthorizeVenmo() { - let sharedService = BTTokenizationService.shared() - BTConfiguration.setBetaPaymentOption("venmo", isEnabled: true) - BTOCMockHelper().stubApplicationCanOpenURL() - BTAppSwitch.setReturnURLScheme("com.braintreepayments.Demo.payments") - let stubAPIClient = MockAPIClient(authorization: "development_fake_key")! - stubAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo": [ - "accessToken": "fake-access-token", - "environment": "sandbox", - "merchantId": "stubmerchantid", - ], - ]) - let mockDelegate = MockAppSwitchDelegate(willPerform: expectation(description: "Will authorize Venmo Account"), didPerform: nil) - - sharedService.tokenizeType("Venmo", options: [BTTokenizationServiceAppSwitchDelegateOption: mockDelegate], with: stubAPIClient) { _ -> Void in } - - waitForExpectations(timeout: 2, handler: nil) - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTURLUtils_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTURLUtils_Tests.swift deleted file mode 100755 index de2db491..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTURLUtils_Tests.swift +++ /dev/null @@ -1,93 +0,0 @@ -import XCTest - -class BTURLUtils_Tests: XCTestCase { - - // MARK: - dictionaryForQueryString: - - func testDictionaryForQueryString_whenQueryStringIsNil_returnsEmptyDictionary() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: nil) as NSDictionary, [:]) - } - - func testDictionaryForQueryString_whenQueryStringIsEmpty_returnsEmptyDictionary() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "") as NSDictionary, [:]) - } - - func testDictionaryForQueryString_whenQueryStringIsHasItems_returnsDictionaryContainingItems() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "foo=bar&baz=quux") as NSDictionary, [ - "foo": "bar", - "baz": "quux"]) - } - - func testDictionaryForQueryString_hasNSNullValueWhenKeyOnly() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "foo") as NSDictionary, [ - "foo": NSNull(), - ]) - } - - func testDictionaryForQueryString_whenKeyIsEmpty_hasEmptyStringForKey() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "&=asdf&") as NSDictionary, [ - "": "asdf" - ]) - } - - func testDictionaryForQueryString_withDuplicateKeys_usesRightMostValue() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "key=value1&key=value2") as NSDictionary, [ - "key": "value2" - ]) - } - - func testDictionaryForQueryString_replacesPlusWithSpace() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "foo+bar=baz+yaz") as NSDictionary, [ - "foo bar": "baz yaz" - ]) - } - - func testDictionaryForQueryString_decodesPercentEncodedCharacters() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "%20%2C=%26") as NSDictionary, [ - " ,": "&" - ]) - } - - func testDictionaryForQueryString_skipsKeysWithUndecodableCharacters() { - XCTAssertEqual(BTURLUtils.dictionary(forQueryString: "%84") as NSDictionary, [:]) - } - - // MARK: - URLfromURL:withAppendedQueryDictionary: - - func testURLWithAppendedQueryDictionary_appendsDictionaryAsQueryStringToURL() { - let url = URL(string: "http://example.com:80/path/to/file")! - - let appendedURL = BTURLUtils.urLfromURL(url, withAppendedQueryDictionary: ["key": "value"]) - - XCTAssertEqual(appendedURL, URL(string: "http://example.com:80/path/to/file?key=value")) - } - - func testURLWithAppendedQueryDictionary_acceptsNilDictionaries() { - let url = URL(string: "http://example.com")! - - let appendedURL = BTURLUtils.urLfromURL(url, withAppendedQueryDictionary: nil) - - XCTAssertEqual(appendedURL, URL(string: "http://example.com?")) - } - - func testURLWithAppendedQueryDictionary_whenDictionaryHasKeyValuePairsWithSpecialCharacters_percentEscapesThem() { - let url = URL(string: "http://example.com")! - - let appendedURL = BTURLUtils.urLfromURL(url, withAppendedQueryDictionary: ["space ": "sym&bol="]) - - XCTAssertEqual(appendedURL, URL(string: "http://example.com?space%20=sym%26bol%3D")) - } - - func testURLWithAppendedQueryDictionary_whenURLIsNil_returnsNil() { - XCTAssertNil(BTURLUtils.urLfromURL(nil, withAppendedQueryDictionary: [:])) - } - - func testURLWithAppendedQueryDictionary_whenURLIsRelative_returnsExpectedURL() { - let url = URL(string: "/relative/path")! - - let appendedURL = BTURLUtils.urLfromURL(url, withAppendedQueryDictionary: ["key": "value"]) - - XCTAssertEqual(appendedURL, URL(string: "/relative/path?key=value")) - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchReturnURLSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchReturnURLSpec.m deleted file mode 100755 index cbc29340..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchReturnURLSpec.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "BTVenmoAppSwitchReturnURL.h" -#import "BTSpecHelper.h" -#import -#import -#import - -SpecBegin(BTVenmoAppSwitchReturnURL) - -describe(@"URL parsing", ^{ - describe(@"valid success return URL", ^{ - it(@"creates the payment method", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=a-nonce"]]; - expect(returnURL.nonce).to.equal(@"a-nonce"); - expect(returnURL.error).to.beNil(); - }); - - it(@"sets the state to succeeded", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=a-nonce"]]; - expect(returnURL.state).to.equal(BTVenmoAppSwitchReturnURLStateSucceeded); - }); - - }); - - describe(@"valid cancel return URL", ^{ - it(@"sets the state canceled", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/cancel"]]; - - expect(returnURL.state).to.equal(BTVenmoAppSwitchReturnURLStateCanceled); - }); - - it(@"does not parse an error or payment method", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/cancel"]]; - - expect(returnURL.error).to.beNil(); - expect(returnURL.nonce).to.beNil(); - }); - }); - - describe(@"valid error return URL", ^{ - it(@"sets the state to failed", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/error?errorMessage=Venmo%20Fail&errorCode=-7"]]; - expect(returnURL.state).to.equal(BTVenmoAppSwitchReturnURLStateFailed); - }); - - it(@"parses the error message and code from a failed Venmo App Switch return", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/error?errorMessage=Venmo%20Fail&errorCode=-7"]]; - - expect(returnURL.nonce).to.beNil(); - expect(returnURL.error).to.equal([NSError errorWithDomain:BTVenmoAppSwitchReturnURLErrorDomain - code:-7 - userInfo:@{ - NSLocalizedDescriptionKey: @"Venmo Fail" - }]); - }); - }); - - describe(@"invalid return URL", ^{ - it(@"sets the state to unknown", ^{ - BTVenmoAppSwitchReturnURL *returnURL = [[BTVenmoAppSwitchReturnURL alloc] initWithURL:[NSURL URLWithString:@"com.example.app://x-callback-url/vzero/auth/venmo/something"]]; - expect(returnURL.state).to.equal(BTVenmoAppSwitchReturnURLStateUnknown); - }); - }); -}); - -describe(@"isValidURL:sourceApplication:", ^{ - NSURL *url = [NSURL URLWithString:@"scheme://x-callback-url/vzero/auth/venmo/foo"]; - - it(@"accepts app switches received from Venmo", ^{ - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"net.kortina.labs.Venmo"]).to.beTruthy(); - }); - - it(@"accepts app switches received from other Venmo builds", ^{ - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"net.kortina.labs.Venmo.debug"]).to.beTruthy(); - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"net.kortina.labs.Venmo.internal"]).to.beTruthy(); - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"net.kortina.labs.Venmo.some-new-feature"]).to.beTruthy(); - }); - - it(@"accepts app switches received from PayPal Debug (for developer-facing test wallet)", ^{ - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"com.paypal.PPClient.Debug"]).to.beTruthy(); - }); - - it(@"rejects app switches received from all others", ^{ - expect([BTVenmoAppSwitchReturnURL isValidURL:url sourceApplication:@"com.YourCompany.Some-App"]).to.beFalsy(); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchURLSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchURLSpec.m deleted file mode 100755 index e0f1a843..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoAppSwitchURLSpec.m +++ /dev/null @@ -1,69 +0,0 @@ -#import -#import -#import -#import - -#import "BTVenmoAppSwitchRequestURL.h" -#import "BTVenmoDriver.h" -#import "Braintree-Version.h" -#import "BTSpecHelper.h" - -SpecBegin(BTVenmoAppSwitchRequestURL) - -describe(@"appSwitchURLForMerchantID:accessToken:sdkVersion:returnURLScheme:bundleDisplayName:environment:", ^{ - context(@"with valid params", ^{ - it(@"returns a URL containing params in query string", ^{ - - BTMutableClientMetadata *meta = [BTMutableClientMetadata new]; - [meta setSessionId:@"session-id"]; - [meta setIntegration:BTClientMetadataIntegrationCustom]; - - NSURL *url = [BTVenmoAppSwitchRequestURL appSwitchURLForMerchantID:@"merchant-id" - accessToken:@"access-token" - returnURLScheme:@"a.scheme" - bundleDisplayName:@"An App" - environment:@"sandbox" - metadata:meta]; - - NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO]; - for (NSURLQueryItem *queryItem in urlComponents.queryItems) { - if ([queryItem.name isEqualToString:@"braintree_environment"]) { - expect(queryItem.value).to.equal(@"sandbox"); - }else if ([queryItem.name isEqualToString:@"braintree_access_token"]) { - expect(queryItem.value).to.equal(@"access-token"); - }else if ([queryItem.name isEqualToString:@"braintree_merchant_id"]) { - expect(queryItem.value).to.equal(@"merchant-id"); - }else if ([queryItem.name isEqualToString:@"x-source"]) { - expect(queryItem.value).to.equal(@"An App"); - }else if ([queryItem.name isEqualToString:@"braintree_auth_fingerprint"]) { - expect(queryItem.value).to.equal(@"a.fingerprint"); - }else if ([queryItem.name isEqualToString:@"braintree_validate"]) { - expect(queryItem.value).to.beTruthy(); - }else if ([queryItem.name isEqualToString:@"braintree_sdk_data"]) { - expect(queryItem.value).toNot.beNil(); - - NSData *data = [[NSData alloc] initWithBase64EncodedString:queryItem.value options:0]; - BTJSON *json = [[BTJSON alloc] initWithData:data]; - - BTJSON *meta = json[@"_meta"]; - expect([meta[@"sessionId"] asString]).to.equal(@"session-id"); - expect([meta[@"platform"] asString]).to.equal(@"ios"); - expect([meta[@"integration"] asString]).to.equal(@"custom"); - expect([meta[@"version"] asString]).to.equal(BRAINTREE_VERSION); - } - } - }); - }); - -}); - -describe(@"baseAppSwitchURL", ^{ - it(@"returns expected base URL for Pay with Venmo", ^{ - expect([BTVenmoAppSwitchRequestURL baseAppSwitchURL].scheme).to.equal(@"com.venmo.touch.v2"); - expect([BTVenmoAppSwitchRequestURL baseAppSwitchURL].host).to.equal(@"x-callback-url"); - expect([BTVenmoAppSwitchRequestURL baseAppSwitchURL].path).to.equal(@"/vzero/auth"); - expect([BTVenmoAppSwitchRequestURL baseAppSwitchURL].query).to.beNil(); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoDriver_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoDriver_Tests.swift deleted file mode 100755 index f7367bfa..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVenmoDriver_Tests.swift +++ /dev/null @@ -1,743 +0,0 @@ -import UIKit -import XCTest - -class FakeApplication { - var lastOpenURL : URL? = nil - var openURLWasCalled : Bool = false - var cannedOpenURLSuccess : Bool = true - var cannedCanOpenURL : Bool = true - var canOpenURLWhitelist : [URL] = [] - - @objc func openURL(_ url: URL) -> Bool { - lastOpenURL = url - openURLWasCalled = true - return cannedOpenURLSuccess - } - - @objc func canOpenURL(_ url: URL) -> Bool { - for whitelistURL in canOpenURLWhitelist { - if whitelistURL.scheme == url.scheme { - return true - } - } - return cannedCanOpenURL - } -} - -class FakeBundle : Bundle { - override func object(forInfoDictionaryKey key: String) -> Any? { - return "An App"; - } -} - -class FakeDevice : UIDevice { - var fakeSystemVersion:String = "8.9" - override var systemVersion: String { - get { - return fakeSystemVersion - } - set(newSystemVersion) { - fakeSystemVersion = newSystemVersion - } - } -} - -class BTVenmoDriver_Tests: XCTestCase { - var mockAPIClient : MockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - var observers : [NSObjectProtocol] = [] - var viewController : UIViewController! - - override func setUp() { - super.setUp() - viewController = UIApplication.shared.windows[0].rootViewController - mockAPIClient = MockAPIClient(authorization: "development_tokenization_key")! - } - - override func tearDown() { - if viewController.presentedViewController != nil { - viewController.dismiss(animated: false, completion: nil) - } - - for observer in observers { NotificationCenter.default.removeObserver(observer) } - super.tearDown() - } - - func testAuthorizeAccount_whenAPIClientIsNil_callsBackWithError() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - venmoDriver.apiClient = nil - - let expectation = self.expectation(description: "Callback invoked with error") - venmoDriver.authorizeAccountAndVault(false) { (tokenizedCard, error) -> Void in - XCTAssertNil(tokenizedCard) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTVenmoDriverErrorDomain) - XCTAssertEqual(error.code, BTVenmoDriverErrorType.integration.rawValue) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 10, handler: nil) - } - - func testAuthorizeAccount_whenRemoteConfigurationFetchFails_callsBackWithConfigurationError() { - mockAPIClient.cannedConfigurationResponseError = NSError(domain: "", code: 0, userInfo: nil) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - - let expectation = self.expectation(description: "Tokenize fails with error") - venmoDriver.authorizeAccountAndVault(false) { (tokenizedCard, error) -> Void in - XCTAssertEqual(error! as NSError, self.mockAPIClient.cannedConfigurationResponseError!) - expectation.fulfill() - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenVenmoConfigurationDisabled_callsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ "venmo": "off" ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - - let expectation = self.expectation(description: "tokenization callback") - venmoDriver.authorizeAccountAndVault(false) { (tokenizedCard, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTVenmoDriverErrorDomain) - XCTAssertEqual(error.code, BTVenmoDriverErrorType.disabled.rawValue) - expectation.fulfill() - } - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenVenmoConfigurationMissing_callsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [:]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - - let expectation = self.expectation(description: "tokenization callback") - venmoDriver.authorizeAccountAndVault(false) { (tokenizedCard, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTVenmoDriverErrorDomain) - XCTAssertEqual(error.code, BTVenmoDriverErrorType.disabled.rawValue) - expectation.fulfill() - } - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenReturnURLSchemeIsNil_logsCriticalMessageAndCallsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - BTConfiguration.enableVenmo(true); - - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "" - - - var criticalMessageLogged = false - BTLogger.shared().logBlock = { - (level: BTLogLevel, message: String?) in - if (level == BTLogLevel.critical && message == "Venmo requires a return URL scheme to be configured via [BTAppSwitch setReturnURLScheme:]") { - criticalMessageLogged = true - } - BTLogger.shared().logBlock = nil - return - } - - let expectation = self.expectation(description: "authorization callback") - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, BTVenmoDriverErrorDomain) - XCTAssertEqual(error.code, BTVenmoDriverErrorType.appNotAvailable.rawValue) - expectation.fulfill() - } - - XCTAssertTrue(criticalMessageLogged) - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorization_whenVenmoIsEnabledInControlPanelAndConfiguredCorrectly_opensVenmoURL() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "environment": "rockbox", - "merchantId": "top_level_merchant_id", - "payWithVenmo" : [ - "environment":"venmobox", - "accessToken": "access-token", - "merchantId": "venmo_merchant_id" ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - venmoDriver.application = fakeApplication - venmoDriver.bundle = FakeBundle() - - venmoDriver.authorizeAccountAndVault(false) { _ -> Void in } - - XCTAssertTrue(fakeApplication.openURLWasCalled) - XCTAssertEqual(fakeApplication.lastOpenURL!.scheme, "com.venmo.touch.v2") - XCTAssertNotNil(fakeApplication.lastOpenURL!.absoluteString.range(of: "venmo_merchant_id")); - XCTAssertNotNil(fakeApplication.lastOpenURL!.absoluteString.range(of: "venmobox")); - XCTAssertNotNil(fakeApplication.lastOpenURL!.absoluteString.range(of: "access-token")); - } - - func testAuthorizeAccount_beforeAppSwitch_informsDelegate() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - let delegate = MockAppSwitchDelegate(willPerform: expectation(description: "willPerform called"), didPerform: expectation(description: "didPerform called")) - venmoDriver.appSwitchDelegate = delegate - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - venmoDriver.application = fakeApplication - venmoDriver.bundle = FakeBundle() - - venmoDriver.authorizeAccountAndVault(false) { _ -> Void in - XCTAssertEqual(delegate.lastAppSwitcher as? BTVenmoDriver, venmoDriver) - } - - waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenUsingTokenizationKeyAndAppSwitchSucceeds_tokenizesVenmoAccount() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback") - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - guard let venmoAccount = venmoAccount else { - XCTFail("Received an error: \(error)") - return - } - - XCTAssertNil(error) - XCTAssertEqual(venmoAccount.nonce, "fake-nonce") - XCTAssertEqual(venmoAccount.localizedDescription, "fake-username") - XCTAssertEqual(venmoAccount.username, "fake-username") - expectation.fulfill() - } - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenUsingClientTokenAndAppSwitchSucceeds_tokenizesVenmoAccount() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - // Test setup sets up mockAPIClient with a tokenization key, we want a client token - mockAPIClient.tokenizationKey = nil - mockAPIClient.clientToken = try! BTClientToken(clientToken: BTTestClientTokenFactory.token(withVersion: 2)) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback") - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - guard let venmoAccount = venmoAccount else { - XCTFail("Received an error: \(error)") - return - } - - XCTAssertNil(error) - XCTAssertEqual(venmoAccount.nonce, "fake-nonce") - XCTAssertEqual(venmoAccount.localizedDescription, "fake-username") - XCTAssertEqual(venmoAccount.username, "fake-username") - expectation.fulfill() - } - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenAppSwitchSucceeds_makesDelegateCallbacks() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - let delegate = MockAppSwitchDelegate(willPerform: self.expectation(description: "willPerform called"), didPerform: self.expectation(description: "didPerform called")) - venmoDriver.appSwitchDelegate = delegate - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback") - venmoDriver.authorizeAccountAndVault(false) { _ -> Void in - XCTAssertEqual(delegate.lastAppSwitcher as? BTVenmoDriver, venmoDriver) - expectation.fulfill() - } - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenAppSwitchSucceeds_postsNotifications() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - let delegate = MockAppSwitchDelegate(willPerform: expectation(description: "willPerform called"), didPerform: expectation(description: "didPerform called")) - venmoDriver.appSwitchDelegate = delegate - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let willAppSwitchNotificationExpectation = expectation(description: "willAppSwitch notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchWillSwitch, object: nil, queue: nil) { (notification) -> Void in - willAppSwitchNotificationExpectation.fulfill() - }) - - let didAppSwitchNotificationExpectation = expectation(description: "didAppSwitch notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchDidSwitch, object: nil, queue: nil) { (notification) -> Void in - didAppSwitchNotificationExpectation.fulfill() - }) - - venmoDriver.authorizeAccountAndVault(false) { _ -> Void in } - - let willProcessNotificationExpectation = expectation(description: "willProcess notification received") - observers.append(NotificationCenter.default.addObserver(forName: NSNotification.Name.BTAppSwitchWillProcessPaymentInfo, object: nil, queue: nil) { (notification) -> Void in - willProcessNotificationExpectation.fulfill() - }) - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_whenAppSwitchFails_callsBackWithError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - XCTAssertNil(venmoAccount) - guard let error = error as? NSError else {return} - XCTAssertEqual(error.domain, "com.braintreepayments.BTVenmoAppSwitchReturnURLErrorDomain") - expectation.fulfill() - } - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/error")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_vaultTrue_setsShouldVaultProperty() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - - venmoDriver.authorizeAccountAndVault(true) { (venmoAccount, error) -> Void in - XCTAssertTrue(venmoDriver.shouldVault) - expectation.fulfill() - } - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_vaultFalse_setsVaultToFalse() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - XCTAssertFalse(venmoDriver.shouldVault) - expectation.fulfill() - } - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_vaultTrue_callsBackWithNonce() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "venmoAccounts": [[ - "type": "VenmoAccount", - "nonce": "abcd-venmo-nonce", - "description": "VenmoAccount", - "consumed": false, - "default": true, - "details": [ - "cardType": "Discover", - "username": "venmojoe" - ]] - ] - ]) - - - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - - venmoDriver.authorizeAccountAndVault(true) { (venmoAccount, error) -> Void in - XCTAssertNil(error) - - XCTAssertEqual(venmoAccount?.username, "venmojoe") - XCTAssertEqual(venmoAccount?.nonce, "abcd-venmo-nonce") - XCTAssertTrue(venmoAccount!.isDefault) - - expectation.fulfill() - } - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - self.waitForExpectations(timeout: 2, handler: nil) - } - - func testAuthorizeAccount_vaultTrue_sendsSucessAnalyticsEvent() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseBody = BTJSON(value: [ - "venmoAccounts": [[ - "type": "VenmoAccount", - "nonce": "abcd-venmo-nonce", - "description": "VenmoAccount", - "consumed": false, - "default": true, - "details": [ - "cardType": "Discover", - "username": "venmojoe" - ] - ]] - ]) - - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - - venmoDriver.authorizeAccountAndVault(true) { (venmoAccount, error) -> Void in - XCTAssertNil(error) - - XCTAssertEqual(venmoAccount?.username, "venmojoe") - XCTAssertEqual(venmoAccount?.nonce, "abcd-venmo-nonce") - XCTAssertTrue(venmoAccount!.isDefault) - - expectation.fulfill() - } - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - self.waitForExpectations(timeout: 2, handler: nil) - - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.pay-with-venmo.vault.success") - } - - func testAuthorizeAccount_vaultTrue_sendsFailureAnalyticsEvent() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" - ] - ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - mockAPIClient.cannedResponseError = NSError(domain: "Fake Error", code: 400, userInfo: nil) - - - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - - venmoDriver.authorizeAccountAndVault(true) { (venmoAccount, error) -> Void in - XCTAssertNotNil(error) - expectation.fulfill() - } - - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/success?paymentMethodNonce=fake-nonce&username=fake-username")!) - self.waitForExpectations(timeout: 2, handler: nil) - - XCTAssertEqual(mockAPIClient.postedAnalyticsEvents.last!, "ios.pay-with-venmo.vault.failure") - } - - func testAuthorizeAccount_whenAppSwitchCancelled_callsBackWithNoError() { - mockAPIClient.cannedConfigurationResponseBody = BTJSON(value: [ - "payWithVenmo" : [ - "environment":"sandbox", - "accessToken": "access-token", - "merchantId": "merchant_id" ] ]) - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - venmoDriver.application = FakeApplication() - venmoDriver.bundle = FakeBundle() - - let expectation = self.expectation(description: "Callback invoked") - venmoDriver.authorizeAccountAndVault(false) { (venmoAccount, error) -> Void in - XCTAssertNil(venmoAccount) - XCTAssertNil(error) - expectation.fulfill() - } - BTVenmoDriver.handleAppSwitchReturn(URL(string: "scheme://x-callback-url/vzero/auth/venmo/cancel")!) - - self.waitForExpectations(timeout: 2, handler: nil) - } - - // MARK: - Analytics - - func testAPIClientMetadata_hasSourceSetToVenmoApp() { - // API client by default uses source = .Unknown and integration = .Custom - let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")! - let venmoDriver = BTVenmoDriver(apiClient: apiClient) - - XCTAssertEqual(venmoDriver.apiClient.metadata.integration, BTClientMetadataIntegrationType.custom) - XCTAssertEqual(venmoDriver.apiClient.metadata.source, BTClientMetadataSourceType.venmoApp) - } - - // MARK: - BTAppSwitchHandler - - func testIsiOSAppSwitchAvailable_whenApplicationCanOpenVenmoURL_returnsTrue() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = false - fakeApplication.canOpenURLWhitelist.append(URL(string: "com.venmo.touch.v2://x-callback-url/path")!) - venmoDriver.application = fakeApplication - - XCTAssertTrue(venmoDriver.isiOSAppAvailableForAppSwitch()) - } - - func testIsiOSAppSwitchAvailable_whenApplicationCantOpenVenmoURL_returnsFalse() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = false - venmoDriver.application = fakeApplication - - XCTAssertFalse(venmoDriver.isiOSAppAvailableForAppSwitch()) - } - - func testIsiOSAppSwitchAvailable_whenApplicationCanOpenVenmoURL_andIosLessThan9_returnsFalse() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = false - fakeApplication.canOpenURLWhitelist.append(URL(string: "com.venmo.touch.v2://x-callback-url/path")!) - venmoDriver.application = fakeApplication - let fakeDevice = FakeDevice() - venmoDriver.device = fakeDevice - - XCTAssertFalse(venmoDriver.isiOSAppAvailableForAppSwitch()) - } - - func testIsiOSAppSwitchAvailable_whenApplicationCantOpenVenmoURL_andIosEqualTo9_3_returnsFalse() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = false - venmoDriver.application = fakeApplication - let fakeDevice = FakeDevice() - fakeDevice.systemVersion = "9.3" - venmoDriver.device = fakeDevice - - XCTAssertFalse(venmoDriver.isiOSAppAvailableForAppSwitch()) - } - - func testIsiOSAppSwitchAvailable_whenApplicationCanOpenVenmoURL_andIosEqualTo11_1_returnsTrue() { - let venmoDriver = BTVenmoDriver(apiClient: mockAPIClient) - mockAPIClient = venmoDriver.apiClient as! MockAPIClient - BTAppSwitch.sharedInstance().returnURLScheme = "scheme" - let fakeApplication = FakeApplication() - fakeApplication.cannedCanOpenURL = false - fakeApplication.canOpenURLWhitelist.append(URL(string: "com.venmo.touch.v2://x-callback-url/path")!) - venmoDriver.application = fakeApplication - let fakeDevice = FakeDevice() - fakeDevice.systemVersion = "11.1" - venmoDriver.device = fakeDevice - - XCTAssertTrue(venmoDriver.isiOSAppAvailableForAppSwitch()) - } - - let venmoProductionSourceApplication = "net.kortina.labs.Venmo" - let venmoDebugSourceApplication = "net.kortina.labs.Venmo.debug" - let fakeWalletSourceApplication = "com.paypal.PPClient.Debug" - - func testCanHandleAppSwitchReturnURL_whenSourceApplicationIsVenmoDebugApp_returnsTrue() { - XCTAssertTrue(BTVenmoDriver.canHandleAppSwitchReturn(URL(string: "fake://fake")!, sourceApplication: venmoProductionSourceApplication)) - } - - func testCanHandleAppSwitchReturnURL_whenSourceApplicationIsVenmoProductionApp_returnsTrue() { - XCTAssertTrue(BTVenmoDriver.canHandleAppSwitchReturn(URL(string: "fake://fake")!, sourceApplication: venmoDebugSourceApplication)) - } - - func testCanHandleAppSwitchReturnURL_whenSourceApplicationIsFakeWalletAppAndURLIsValid_returnsTrue() { - XCTAssertTrue(BTVenmoDriver.canHandleAppSwitchReturn(URL(string: "doesntmatter://x-callback-url/vzero/auth/venmo/stuffffff")!, sourceApplication: fakeWalletSourceApplication)) - } - - func testCanHandleAppSwitchReturnURL_whenSourceApplicationIsNotVenmo_returnsFalse() { - XCTAssertFalse(BTVenmoDriver.canHandleAppSwitchReturn(URL(string: "fake://fake")!, sourceApplication: "invalid.source.application")) - } - - // Note: testing of handleAppSwitchReturnURL is done implicitly while testing authorizeAccountWithCompletion - - // MARK: - Drop-in - - /// Helper - func client(_ configurationDictionary: Dictionary) -> BTAPIClient { - let apiClient = BTAPIClient(authorization: "development_tokenization_key")! - let fakeHttp = BTFakeHTTP()! - fakeHttp.cannedResponse = BTJSON(value: configurationDictionary) - fakeHttp.cannedStatusCode = 200 - apiClient.configurationHTTP = fakeHttp - return apiClient - } - - func clientWithJson(_ configurationJson: BTJSON) -> BTAPIClient { - let apiClient = BTAPIClient(authorization: "development_tokenization_key")! - let fakeHttp = BTFakeHTTP()! - fakeHttp.cannedResponse = configurationJson - fakeHttp.cannedStatusCode = 200 - apiClient.configurationHTTP = fakeHttp - return apiClient - } - - class BTDropInViewControllerTestDelegate : NSObject, BTDropInViewControllerDelegate { - var didLoadExpectation: XCTestExpectation - - init(didLoadExpectation: XCTestExpectation) { - self.didLoadExpectation = didLoadExpectation - } - - @objc func drop(_ viewController: BTDropInViewController, didSucceedWithTokenization paymentMethodNonce: BTPaymentMethodNonce) {} - - @objc func drop(inViewControllerDidCancel viewController: BTDropInViewController) {} - - @objc func drop(inViewControllerDidLoad viewController: BTDropInViewController) { - didLoadExpectation.fulfill() - } - } - - func testFetchConfiguration_whenVenmoIsOff_isVenmoEnabledIsFalse() { - let apiClient = self.client(["venmo": "off"]) - - let expectation = self.expectation(description: "Fetch configuration") - apiClient.fetchOrReturnRemoteConfiguration { (configuration, error) -> Void in - XCTAssertNotNil(configuration) - XCTAssertNil(error) - XCTAssertFalse(configuration!.isVenmoEnabled) - expectation.fulfill() - } - self.waitForExpectations(timeout: 5, handler: nil) - } - - // Flaky - func pendDropIn_whenVenmoIsNotEnabled_doesNotDisplayVenmoButton() { - let apiClient = self.client(["venmo": "off"]) - - let dropInViewController = BTDropInViewController(apiClient: apiClient) - let didLoadExpectation = self.expectation(description: "Drop-in did finish loading") - - // Must be assigned here for a strong reference. The delegate property of the BTDropInViewController is a weak reference. - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) - dropInViewController.delegate = testDelegate - - viewController.present(dropInViewController, animated: false, completion: nil) - - self.waitForExpectations(timeout: 5, handler: nil) - - let enabledPaymentOptions = dropInViewController.dropInContentView.paymentButton.enabledPaymentOptions - XCTAssertFalse(enabledPaymentOptions.contains("Venmo")) - } - - // Flaky - func pendDropIn_whenVenmoIsEnabled_displaysVenmoButton() { - let json = BTJSON(value: [ - "payWithVenmo" : ["accessToken" : "access-token"], - "merchantId": "merchant_id" ]) - let apiClient = self.clientWithJson(json) - BTConfiguration.enableVenmo(true) - - let dropInViewController = BTDropInViewController(apiClient: apiClient) - let didLoadExpectation = self.expectation(description: "Drop-in did finish loading") - - // Must be assigned here for a strong reference. The delegate property of the BTDropInViewController is a weak reference. - let testDelegate = BTDropInViewControllerTestDelegate(didLoadExpectation: didLoadExpectation) - - dropInViewController.delegate = testDelegate - - dropInViewController.dropInContentView.paymentButton.application = FakeApplication() - - viewController.present(dropInViewController, animated: false, completion: nil) - - self.waitForExpectations(timeout: 5, handler: nil) - - let enabledPaymentOptions = dropInViewController.dropInContentView.paymentButton.enabledPaymentOptions - XCTAssertTrue(enabledPaymentOptions.contains("Venmo")) - } -} - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVersion_Tests.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVersion_Tests.swift deleted file mode 100755 index fd5e17db..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/BTVersion_Tests.swift +++ /dev/null @@ -1,11 +0,0 @@ -import XCTest - -class BTVersion_Tests: XCTestCase { - - func testVersion_returnsAVersion() { - let regex = try! NSRegularExpression(pattern: "\\d+\\.\\d+\\.\\d+", options: []) - let matches = regex.matches(in: BRAINTREE_VERSION, options: [], range: NSMakeRange(0, BRAINTREE_VERSION.characters.count)) - XCTAssertTrue(matches.count == 1) - } - -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpirationValidatorSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpirationValidatorSpec.m deleted file mode 100755 index 67bb6b2b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpirationValidatorSpec.m +++ /dev/null @@ -1,112 +0,0 @@ -#import -#import "BTSpecDependencies.h" -#import "BTUICardExpirationValidator.h" - -SpecBegin(BTUICardExpirationValidator) - -describe(@"month:year:validForDate:", ^{ - context(@"validating month and year relative to given validation date", ^{ - __block NSDate *today; - - beforeEach(^{ - NSDateComponents *components = [[NSDateComponents alloc] init]; - components.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - components.day = 2; - components.month = 5; - components.year = 2014; - today = components.date; - }); - - it(@"returns false when the month year are before the provided date ", ^{ - BOOL monthYearBeforeTodayValid = [BTUICardExpirationValidator month:4 year:14 validForDate:today]; - expect(monthYearBeforeTodayValid).to.beFalsy(); - }); - - it(@"returns true when the month year are the same as the provided date ", ^{ - BOOL monthYearSameAsTodayValid = [BTUICardExpirationValidator month:5 year:14 validForDate:today]; - expect(monthYearSameAsTodayValid).to.beTruthy(); - }); - - it(@"returns true when the month year are after the provided date ", ^{ - BOOL monthYearAfterTodayValid = [BTUICardExpirationValidator month:8 year:14 validForDate:today]; - expect(monthYearAfterTodayValid).to.beTruthy(); - }); - - describe(@"Year in YYYY", ^{ - it(@"returns true when the month year are after the provided date", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:8 year:2014 validForDate:today]; - expect(monthYearValid).to.beTruthy(); - }); - - it(@"returns false when the month year are before the provided date", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:4 year:2014 validForDate:today]; - expect(monthYearValid).to.beFalsy(); - }); - }); - }); - - context(@"validating dates at the end of the year", ^{ - __block NSDate *endOfYearToday; - beforeEach(^{ - NSDateComponents *components = [[NSDateComponents alloc] init]; - components.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - components.day = 1; - components.month = 12; - components.year = 2014; - endOfYearToday = components.date; - }); - - it(@"returns true when the month/year are the same as the provided date", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:12 year:2014 validForDate:endOfYearToday]; - expect(monthYearValid).to.beTruthy(); - }); - }); - - context(@"validating dates far in the future", ^{ - __block NSDate *today; - - beforeEach(^{ - NSDateComponents *components = [[NSDateComponents alloc] init]; - components.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - components.day = 2; - components.month = 5; - components.year = 2014; - today = components.date; - }); - - it(@"returns true when the month year are before but near the far future date", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:4 year:14 + kBTUICardExpirationValidatorFarFutureYears validForDate:today]; - expect(monthYearValid).to.beTruthy(); - }); - - it(@"returns false when the month year are not before the far future date", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:5 year:14 + kBTUICardExpirationValidatorFarFutureYears validForDate:today]; - expect(monthYearValid).to.beFalsy(); - }); - }); - - context(@"month and year formats", ^{ - __block NSDate *today; - - beforeEach(^{ - NSDateComponents *components = [[NSDateComponents alloc] init]; - components.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - components.day = 2; - components.month = 2; - components.year = 2014; - today = components.date; - }); - - it(@"accepts 2 digit years", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:4 year:14 validForDate:today]; - expect(monthYearValid).to.beTruthy(); - }); - - it(@"accepts 4 digit years", ^{ - BOOL monthYearValid = [BTUICardExpirationValidator month:4 year:2014 validForDate:today]; - expect(monthYearValid).to.beTruthy(); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpiryFormatterSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpiryFormatterSpec.m deleted file mode 100755 index f3e31e3a..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardExpiryFormatterSpec.m +++ /dev/null @@ -1,133 +0,0 @@ -#import -#import "BTSpecDependencies.h" -#import "BTUICardExpiryFormat.h" - -SpecBegin(BTUICardExpiryFormatter) - -describe(@"formattedValue", ^{ - - __block BTUICardExpiryFormat *format; - beforeEach(^{ - format = [[BTUICardExpiryFormat alloc] init]; - }); - - describe(@"backspace", ^{ - beforeEach(^{ - format.backspace = YES; - }); - - it(@"is a no-op when the value is empty", ^{ - format.value = @""; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@""); - expect(formattedCursorLocation).to.equal(0); - }); - - it(@"maintains the slash when deleting the first year digit", ^{ - format.value = @"12/"; - format.cursorLocation = 3; - format.backspace = YES; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"12/"); - expect(formattedCursorLocation).to.equal(3); - }); - - it(@"deletes the second month digit when backspacing the slash", ^{ - format.value = @"12"; - format.cursorLocation = 2; - format.backspace = YES; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"1"); - expect(formattedCursorLocation).to.equal(1); - }); - }); - - describe(@"insertion", ^{ - it(@"is a no-op when the value is empty", ^{ - format.value = @""; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@""); - expect(formattedCursorLocation).to.equal(0); - }); - - it(@"prepends 0 and appends / if one digit >1 is entered", ^{ - format.value = @"2"; - format.cursorLocation = 1; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"02/"); - expect(formattedCursorLocation).to.equal(3); - }); - - it(@"does not insert a slash when appending the first month digit", ^{ - format.value = @"1"; - format.cursorLocation = 1; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"1"); - expect(formattedCursorLocation).to.equal(1); - }); - - it(@"inserts a slash when appending the second digit of the month", ^{ - format.value = @"12"; - format.cursorLocation = 2; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"12/"); - expect(formattedCursorLocation).to.equal(3); - }); - - it(@"maintains the slash when inserting a digit before", ^{ - format.value = @"012/"; - format.cursorLocation = 3; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"01/2"); - expect(formattedCursorLocation).to.equal(4); - }); - - it(@"maintains the slash when inserting two digits before", ^{ - format.value = @"0123/"; - format.cursorLocation = 4; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"01/23"); - expect(formattedCursorLocation).to.equal(5); - }); - - it(@"inserts the slash when pasting in a non-slash date", ^{ - format.value = @"0123"; - format.cursorLocation = 4; - NSString *formattedValue; - NSUInteger formattedCursorLocation; - [format formattedValue:&formattedValue cursorLocation:&formattedCursorLocation]; - - expect(formattedValue).to.equal(@"01/23"); - expect(formattedCursorLocation).to.equal(5); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardTypeSpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardTypeSpec.m deleted file mode 100755 index 60a9d7ad..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUICardTypeSpec.m +++ /dev/null @@ -1,253 +0,0 @@ -#import -#import "BTSpecDependencies.h" -#import "BTUICardType.h" -#import "EXPMatchers+haveKerning.h" -#import "BTUIViewUtil.h" - -SpecBegin(BTUICardType) - -describe(@"BTUICardType", ^{ - - it(@"should only have one instance of each brand", ^{ - BTUICardType *t1 = [BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)]; - BTUICardType *t2 = [BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)]; - expect(t1).to.beIdenticalTo(t2); - }); - - describe(@"possible card types for number", ^{ - - it(@"should recognize all cards with empty string", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@""]; - expect(possibleCardTypes.count).to.equal(9); - }); - - it(@"should recognize no cards starting with 1", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"1"]; - expect(possibleCardTypes.count).to.equal(0); - }); - - it(@"should recognize AmEx and Diners Club and JCB cards with 3", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"3"]; - expect(possibleCardTypes.count).to.equal(3); - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_DINERS_CLUB)]); - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)]); - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_JCB)]); - }); - - it(@"should recognize MasterCard and Maestro with a 5", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"5"]; - expect(possibleCardTypes.count).to.equal(2); - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MASTER_CARD)]); - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MAESTRO)]); - }); - - it(@"should recognize Maestro cards starting with 63", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"63"]; - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MAESTRO)]); - }); - - it(@"should recognize Maestro cards starting with 67", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"67"]; - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MAESTRO)]); - }); - - it(@"should recognize the start of a Visa", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"4"]; - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - expect(possibleCardTypes.count).to.equal(1); - }); - - it(@"should recognize a whole Visa", ^{ - NSArray *possibleCardTypes = [BTUICardType possibleCardTypesForNumber:@"4111111111111111"]; - expect(possibleCardTypes).to.contain([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - expect(possibleCardTypes.count).to.equal(1); - }); - }); - - describe(@"payment method type for card type", ^{ - it(@"recognizes Visa", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"Visa"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeVisa); - }); - - it(@"recognizes MasterCard", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"MasterCard"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeMasterCard); - }); - - it(@"recognizes Amex", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"American Express"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeAMEX); - }); - - it(@"recognizes Discover", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"Discover"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeDiscover); - }); - - it(@"recognizes JCB", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"JCB"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeJCB); - }); - - it(@"recognizes Maestro", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"Maestro"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeMaestro); - }); - - it(@"recognizes Diners Club", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"Diners Club"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeDinersClub); - }); - - it(@"ignores unknown card brands", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:@"Unknown Card Brand"]; - expect([BTUIViewUtil paymentMethodTypeForCardType:cardType]).to.equal(BTUIPaymentOptionTypeUnknown); - }); - }); - - describe(@"card number recognition", ^{ - - it(@"should recognize a valid, formatted Visa", ^{ - expect([BTUICardType cardTypeForNumber:@"4111 1111 1111 1111"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - }); - - it(@"should recognize an invalid Visa", ^{ - expect([BTUICardType cardTypeForNumber:@"4111 1111 1111 1112"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - }); - - it(@"should recognize a non-formatted Visa", ^{ - expect([BTUICardType cardTypeForNumber:@"4111111111111111"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - }); - - it(@"should recognize an incomplete Visa", ^{ - expect([BTUICardType cardTypeForNumber:@"4"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)]); - }); - - it(@"should recognize a valid MasterCard", ^{ - expect([BTUICardType cardTypeForNumber:@"5555555555554444"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MASTER_CARD)]); - }); - - it(@"should recognize a valid American Express", ^{ - expect([BTUICardType cardTypeForNumber:@"378282246310005"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)]); - }); - - it(@"should recognize a valid Discover", ^{ - expect([BTUICardType cardTypeForNumber:@"6011 1111 1111 1117"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_DISCOVER)]); - }); - - it(@"should recognize a valid JCB", ^{ - expect([BTUICardType cardTypeForNumber:@"3530 1113 3330 0000"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_JCB)]); - }); - - it(@"should recognize a valid Union Pay", ^{ - expect([BTUICardType cardTypeForNumber:@"6221 2345 6789 0123 450"]).to.equal([BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_UNION_PAY)]); - }); - - it(@"should not recognize a non-number", ^{ - expect([BTUICardType cardTypeForNumber:@"notanumber"]).to.beNil(); - }); - - it(@"should not recognize an unrecognizable number", ^{ - expect([BTUICardType cardTypeForNumber:@"notanumber"]).to.beNil(); - }); - - }); - - describe(@"validNumber", ^{ - NSArray *braintreeTestCardNumbers = - @[ - @[@"378282246310005", BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)], - @[@"371449635398431", BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)], - @[@"6011111111111117", BTUILocalizedString(CARD_TYPE_DISCOVER)], - @[@"3530111333300000", BTUILocalizedString(CARD_TYPE_JCB)], - @[@"6304000000000000", BTUILocalizedString(CARD_TYPE_MAESTRO)], - @[@"5555555555554444", BTUILocalizedString(CARD_TYPE_MASTER_CARD)], - @[@"4111111111111111", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4005519200000004", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4009348888881881", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4012000033330026", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4012000077777777", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4012888888881881", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4217651111111119", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"4500600000000061", BTUILocalizedString(CARD_TYPE_VISA)], - @[@"6221234567890123450", BTUILocalizedString(CARD_TYPE_UNION_PAY)], - ]; - - for (NSArray *testCase in braintreeTestCardNumbers) { - NSString *testNumber = testCase[0]; - NSString *cardBrand = testCase[1]; - BTUICardType *cardType = [BTUICardType cardTypeForBrand:cardBrand]; - it([NSString stringWithFormat:@"should recognize %@ as a valid %@", testNumber, cardBrand], ^{ - expect([cardType validNumber:testNumber]).to.beTruthy(); - }); - } - - context(@"when card type is Union Pay", ^{ - it(@"returns true when number is not Luhn valid", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_UNION_PAY)]; - expect([cardType validNumber:@"6221234567890123451"]).to.beTruthy(); - }); - }); - }); - - describe(@"validAndNecessarilyCompleteNumber", ^{ - - it(@"should return NO for short Maestro", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MAESTRO)]; - expect([cardType validAndNecessarilyCompleteNumber:@"630400000000"]).to.beFalsy(); - expect([cardType validAndNecessarilyCompleteNumber:@"6304000000000000"]).to.beFalsy(); - }); - - it(@"should return YES for full-length Maestro", ^{ - BTUICardType *cardType = [BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MAESTRO)]; - expect([cardType validAndNecessarilyCompleteNumber:@"6304000000000000000"]).to.beTruthy(); - }); - - }); - - describe(@"card number formatting", ^{ - - it(@"should format a non-number as an empty string", ^{ - expect([[[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)] formatNumber:@"notanumber"] string]).to.equal(@""); - }); - - it(@"should return a too-long number without formatting", ^{ - expect([[[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)] formatNumber:@"00000000000000000"] string]).to.equal(@"00000000000000000"); - }); - - it(@"should format a valid, formatted number as a Visa", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)] formatNumber:@"0000 0000 0000 0000"]).to.haveKerning(@[@3, @7, @11]); - }); - - it(@"should format a non-formatted number as a Visa", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)] formatNumber:@"0000000000000000"]).to.haveKerning(@[@3, @7, @11]); - }); - - it(@"should format an incomplete number as a Visa", ^{ - expect([[[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_VISA)] formatNumber:@"0"] string]).to.equal(@"0"); - }); - - it(@"should format as a MasterCard", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_MASTER_CARD)] formatNumber:@"0000000000000000"]).to.haveKerning(@[@3, @7, @11]); - }); - - it(@"should format as an American Express", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)] formatNumber:@"000000000000000"]).to.haveKerning(@[@3, @9]); - }); - - it(@"should format as an incomplete American Express", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_AMERICAN_EXPRESS)] formatNumber:@"00000"]).to.haveKerning(@[@3]); - }); - - it(@"should format as a Discover", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_DISCOVER)] formatNumber:@"1234123412341234"]).to.haveKerning(@[@3, @7, @11]); - }); - - it(@"should format as a JCB", ^{ - expect([[BTUICardType cardTypeForBrand:BTUILocalizedString(CARD_TYPE_JCB)] formatNumber:@"1234123412341234"]).to.haveKerning(@[@3, @7, @11]); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUISpec.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUISpec.m deleted file mode 100755 index fbed8921..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUISpec.m +++ /dev/null @@ -1,24 +0,0 @@ -#import -#import "BTSpecDependencies.h" -#import "BTUI.h" - -SpecBegin(BTUI) - -describe(@"BTUI", ^{ - it(@"has a braintree theme", ^{ - BTUI *theme = [BTUI braintreeTheme]; - expect(theme.callToActionColor).notTo.beNil(); - }); -}); - -describe(@"activity indicator style", ^{ - it(@"returns white for a dark background", ^{ - expect([BTUI activityIndicatorViewStyleForBarTintColor:[UIColor blackColor]]).to.equal(UIActivityIndicatorViewStyleWhite); - }); - - it(@"returns gray for a light background", ^{ - expect([BTUI activityIndicatorViewStyleForBarTintColor:[UIColor whiteColor]]).to.equal(UIActivityIndicatorViewStyleGray); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUI_UIColor.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUI_UIColor.m deleted file mode 100755 index 25c777f3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/BTUI_UIColor.m +++ /dev/null @@ -1,53 +0,0 @@ -#import -#import "BTSpecDependencies.h" -#import "UIColor+BTUI.h" - -SpecBegin(BTUI_UIColor) - -describe(@"UIColor+BTUI", ^{ - describe(@"bt_colorFromHex", ^{ - it(@"converts simple valid strings", ^{ - UIColor *red = [UIColor bt_colorFromHex:@"#ff0000" alpha:1.0f]; - expect(red).to.equal([UIColor redColor]); - UIColor *green = [UIColor bt_colorFromHex:@"#00ff00" alpha:1.0f]; - expect(green).to.equal([UIColor greenColor]); - UIColor *blue = [UIColor bt_colorFromHex:@"#0000ff" alpha:1.0f]; - expect(blue).to.equal([UIColor blueColor]); - }); - - it(@"converts mixed color strings", ^{ - UIColor *c = [UIColor bt_colorFromHex:@"#ffffff" alpha:1.0f]; - expect(CGColorGetNumberOfComponents(c.CGColor)).to.equal(4); - CGFloat r, g, b, a; - [c getRed:&r green:&g blue:&b alpha:&a]; - expect(r).to.equal(1.0f); - expect(g).to.equal(1.0f); - expect(b).to.equal(1.0f); - expect(a).to.equal(1.0f); - - }); - - it(@"can take an alpha value", ^{ - UIColor *blueClear = [UIColor bt_colorFromHex:@"#0000ff" alpha:0.0f]; - expect(blueClear).notTo.equal([UIColor blueColor]); - expect(CGColorGetNumberOfComponents(blueClear.CGColor)).to.equal(4); - CGFloat r, g, b, a; - [blueClear getRed:&r green:&g blue:&b alpha:&a]; - expect(r).to.equal(0.0f); - expect(g).to.equal(0.0f); - expect(b).to.equal(1.0f); - expect(a).to.equal(0.0f); - }); - - it(@"doesn't choke on invalid strings", ^{ - UIColor *c; - c = [UIColor bt_colorFromHex:@"#nnn" alpha:1.0f]; - expect(c).to.equal([UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:1.0f]); - - c = [UIColor bt_colorFromHex:@"#im un ur hex and i am not real" alpha:1.0f]; - expect(c).to.equal([UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:1.0f]); - }); - }); -}); - -SpecEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.h deleted file mode 100755 index 9ebb2ac3..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "Expecta.h" - -EXPMatcherInterface(haveKerning, (NSArray *expectedIndices)); - -#define haveKerning haveKerning diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.m deleted file mode 100755 index b1d1ffba..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Braintree-UI-Specs/EXPMatchers+haveKerning.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "EXPMatchers+haveKerning.h" -#import - -EXPMatcherImplementationBegin(haveKerning, (NSArray *expectedIndices)) { - BOOL actualIsNil = (actual == nil); - BOOL expectedIsNil = (expectedIndices == nil); - - prerequisite(^BOOL { - return !(actualIsNil || expectedIsNil); - // Return `NO` if matcher should fail whether or not the result is inverted - // using `.Not`. - }); - - match(^BOOL { - for (NSNumber *n in expectedIndices) { - NSUInteger i = [n unsignedIntegerValue]; - NSDictionary *attributes = [actual attributesAtIndex:i effectiveRange:nil]; - NSNumber *v = [attributes objectForKey:NSKernAttributeName]; - if ([v floatValue] <= 0) { - return NO; - } - } - return YES; - }); - - failureMessageForTo(^NSString * { - if (actualIsNil) - return @"the actual value is nil/null"; - if (expectedIsNil) - return @"the expected value is nil/null"; - return [NSString - stringWithFormat:@"expected: %@" - "got: an instance of %@ with non-matching kerning", - expectedIndices, [actual class]]; - // Return the message to be displayed when the match function returns `YES`. - }); - - failureMessageForNotTo(^NSString * { - return @"fail"; -// if (actualIsNil) -// return @"the actual value is nil/null"; -// if (expectedIsNil) -// return @"the expected value is nil/null"; -// return [NSString -// stringWithFormat:@"expected: not a kind of %@, " -// "got: an instance of %@, which is a kind of %@", -// [expected class], [actual class], [expected class]]; -// // Return the message to be displayed when the match function returns `NO`. - }); -} -EXPMatcherImplementationEnd diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.h deleted file mode 100755 index e8c1c107..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.h +++ /dev/null @@ -1,26 +0,0 @@ -#import -#import "BTHTTP.h" - -@interface BTFakeHTTP : BTHTTP - -@property (nonatomic, assign) NSUInteger GETRequestCount; -@property (nonatomic, assign) NSUInteger POSTRequestCount; -@property (nonatomic, copy, nullable) NSString *lastRequestEndpoint; -@property (nonatomic, copy, nullable) NSString *lastRequestMethod; -@property (nonatomic, strong, nullable) NSDictionary *lastRequestParameters; -@property (nonatomic, copy, nullable) NSString *stubMethod; -@property (nonatomic, copy, nullable) NSString *stubEndpoint; -@property (nonatomic, strong, nullable) BTJSON *cannedResponse; -@property (nonatomic, strong, nullable) BTJSON *cannedConfiguration; -@property (nonatomic, assign) NSUInteger cannedStatusCode; -@property (nonatomic, strong, nullable) NSError *cannedError; - -- (nullable instancetype)init; - -+ (nullable instancetype)fakeHTTP; - -- (void)stubRequest:(nonnull NSString *)httpMethod toEndpoint:(nonnull NSString *)endpoint respondWith:(nonnull id)value statusCode:(NSUInteger)statusCode; - -- (void)stubRequest:(nonnull NSString *)httpMethod toEndpoint:(nonnull NSString *)endpoint respondWithError:(nonnull NSError *)error; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.m deleted file mode 100755 index 4f5d9091..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTFakeHTTP.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "BTFakeHTTP.h" - -@implementation BTFakeHTTP - -- (nullable instancetype)init { - return [self initWithBaseURL:[[NSURL alloc] init] authorizationFingerprint:@""]; -} - -+ (instancetype)fakeHTTP { - return [[BTFakeHTTP alloc] initWithBaseURL:[[NSURL alloc] init] authorizationFingerprint:@""]; -} - -- (id)copyWithZone:(NSZone *)zone { - BTFakeHTTP *copiedHTTP = [super copyWithZone:zone]; - - copiedHTTP.GETRequestCount = self.GETRequestCount; - copiedHTTP.POSTRequestCount = self.POSTRequestCount; - copiedHTTP.lastRequestEndpoint = self.lastRequestEndpoint; - copiedHTTP.lastRequestParameters = [self.lastRequestParameters copy]; - copiedHTTP.stubMethod = self.stubMethod; - copiedHTTP.stubEndpoint = self.stubEndpoint; - copiedHTTP.cannedResponse = self.cannedResponse; - copiedHTTP.cannedStatusCode = self.cannedStatusCode; - copiedHTTP.cannedError = self.cannedError; - - return copiedHTTP; -} - -- (void)stubRequest:(NSString *)httpMethod toEndpoint:(NSString *)endpoint respondWith:(id)value statusCode:(NSUInteger)statusCode { - self.stubMethod = httpMethod; - self.stubEndpoint = endpoint; - self.cannedResponse = [[BTJSON alloc] initWithValue:value]; - self.cannedStatusCode = statusCode; -} - -- (void)stubRequest:(NSString *)httpMethod toEndpoint:(NSString *)endpoint respondWithError:(NSError *)error { - self.stubMethod = httpMethod; - self.stubEndpoint = endpoint; - self.cannedError = error; -} - -- (void)GET:(NSString *)endpoint parameters:(NSDictionary *)parameters completion:(void(^)(BTJSON *, NSHTTPURLResponse *, NSError *))completionBlock { - self.GETRequestCount++; - self.lastRequestEndpoint = endpoint; - self.lastRequestParameters = parameters; - self.lastRequestMethod = @"GET"; - - if (self.cannedError) { - [self dispatchBlock:^{ - completionBlock(nil, nil, self.cannedError); - }]; - } else { - NSHTTPURLResponse *httpResponse = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:endpoint] - statusCode:self.cannedStatusCode - HTTPVersion:nil - headerFields:nil]; - [self dispatchBlock:^{ - BTJSON *jsonResponse = [endpoint rangeOfString:@"v1/configuration"].location != NSNotFound ? self.cannedConfiguration : self.cannedResponse; - completionBlock(jsonResponse, httpResponse, nil); - }]; - } -} - -- (void)POST:(NSString *)endpoint parameters:(NSDictionary *)parameters completion:(void (^)(BTJSON *, NSHTTPURLResponse *, NSError *))completionBlock { - self.POSTRequestCount++; - self.lastRequestEndpoint = endpoint; - self.lastRequestParameters = parameters; - self.lastRequestMethod = @"POST"; - - if (self.cannedError) { - [self dispatchBlock:^{ - completionBlock(nil, nil, self.cannedError); - }]; - } else { - NSHTTPURLResponse *httpResponse = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:endpoint] - statusCode:self.cannedStatusCode - HTTPVersion:nil - headerFields:nil]; - [self dispatchBlock:^{ - completionBlock(self.cannedResponse, httpResponse, nil); - }]; - } -} - -/// Helper method to dispatch callbacks to dispatchQueue -- (void)dispatchBlock:(void(^)())block { - if (self.dispatchQueue) { - dispatch_async(self.dispatchQueue, ^{ - block(); - }); - } else { - block(); - } -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.h deleted file mode 100755 index 81603edf..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.h +++ /dev/null @@ -1,15 +0,0 @@ -#import -@class BTJSON; - -#define kBTHTTPTestProtocolScheme @"bt-http-test" -#define kBTHTTPTestProtocolHost @"base.example.com" -#define kBTHTTPTestProtocolBasePath @"/base/path" -#define kBTHTTPTestProtocolPort @1234 - -@interface BTHTTPTestProtocol : NSURLProtocol - -+ (NSURLRequest *)parseRequestFromTestResponseBody:(BTJSON *)responseBody; -+ (NSString *)parseRequestBodyFromTestResponseBody:(BTJSON *)responseBody; -+ (NSURL *)testBaseURL; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.m deleted file mode 100755 index f1431418..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTHTTPTestProtocol.m +++ /dev/null @@ -1,73 +0,0 @@ -#import "BTHTTPTestProtocol.h" -#import "BTHTTP.h" - -@implementation BTHTTPTestProtocol - -+ (BOOL)canInitWithRequest:(__unused NSURLRequest *)request { - return YES; -} - -+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { - return request; -} - -- (void)startLoading { - id client = self.client; - - NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.request.URL - statusCode:200 - HTTPVersion:@"HTTP/1.1" - headerFields:@{@"Content-Type": @"application/json"}]; - - NSData *archivedRequest = [NSKeyedArchiver archivedDataWithRootObject:self.request]; - NSString *base64ArchivedRequest = [archivedRequest base64EncodedStringWithOptions:0]; - - NSData *requestBodyData; - if (self.request.HTTPBodyStream) { - NSInputStream *inputStream = self.request.HTTPBodyStream; - [inputStream open]; - NSMutableData *mutableBodyData = [NSMutableData data]; - - while ([inputStream hasBytesAvailable]) { - uint8_t buffer[128]; - NSUInteger bytesRead = [inputStream read:buffer maxLength:128]; - [mutableBodyData appendBytes:buffer length:bytesRead]; - } - [inputStream close]; - requestBodyData = [mutableBodyData copy]; - } else { - requestBodyData = self.request.HTTPBody; - } - - NSDictionary *responseBody = @{ @"request": base64ArchivedRequest, - @"requestBody": [[NSString alloc] initWithData:requestBodyData encoding:NSUTF8StringEncoding] }; - - [client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - - [client URLProtocol:self didLoadData:[NSJSONSerialization dataWithJSONObject:responseBody options:NSJSONWritingPrettyPrinted error:NULL]]; - - [client URLProtocolDidFinishLoading:self]; -} - -- (void)stopLoading { -} - -+ (NSURL *)testBaseURL { - NSURLComponents *components = [[NSURLComponents alloc] init]; - components.scheme = kBTHTTPTestProtocolScheme; - components.host = kBTHTTPTestProtocolHost; - components.path = kBTHTTPTestProtocolBasePath; - components.port = kBTHTTPTestProtocolPort; - return components.URL; -} - -+ (NSURLRequest *)parseRequestFromTestResponseBody:(BTJSON *)responseBody { - return [NSKeyedUnarchiver unarchiveObjectWithData:[[NSData alloc] initWithBase64EncodedString:[responseBody[@"request"] asString] options:0]]; -} - -+ (NSString *)parseRequestBodyFromTestResponseBody:(BTJSON *)responseBody { - return [responseBody[@"requestBody"] asString]; -} - -@end - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecDependencies.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecDependencies.h deleted file mode 100755 index 393bbc34..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecDependencies.h +++ /dev/null @@ -1,3 +0,0 @@ -#import -#import -#import diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.h deleted file mode 100755 index a7c06a94..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.h +++ /dev/null @@ -1,22 +0,0 @@ -#import -#import -#import - -typedef NS_ENUM(NSInteger, BTTestMode_t) { - BTTestModeDebug = 1, - BTTestModeRelease = 2 -}; - -extern BTTestMode_t BTTestMode; - -extern NSString * const BTValidTestClientToken; - -void wait_for_potential_async_exceptions(void (^done)(void)); - -BOOL isANonce(NSString *nonce); - -@interface BTOCMockHelper : NSObject - -- (void)stubApplicationCanOpenURL; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.m deleted file mode 100755 index 6b7f4353..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTSpecHelper.m +++ /dev/null @@ -1,40 +0,0 @@ -#import "BTSpecHelper.h" -#import - -#ifdef DEBUG -BTTestMode_t BTTestMode = BTTestModeDebug; -#else -BTTestMode_t BTTestMode = BTTestModeRelease; -#endif - -NSString * const BTValidTestClientToken = @"eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI3ODJhZmFlNDJlZTNiNTA4NWUxNmMzYjhkZTY3OGQxNTJhODFlYzk5MTBmZDNhY2YyYWU4MzA2OGI4NzE4YWZhfGNyZWF0ZWRfYXQ9MjAxNS0wOC0yMFQwMjoxMTo1Ni4yMTY1NDEwNjErMDAwMFx1MDAyNmN1c3RvbWVyX2lkPTM3OTU5QTE5LThCMjktNDVBNC1CNTA3LTRFQUNBM0VBOEM4Nlx1MDAyNm1lcmNoYW50X2lkPWRjcHNweTJicndkanIzcW5cdTAwMjZwdWJsaWNfa2V5PTl3d3J6cWszdnIzdDRuYzgiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzL2RjcHNweTJicndkanIzcW4vY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIn0sInRocmVlRFNlY3VyZUVuYWJsZWQiOnRydWUsInRocmVlRFNlY3VyZSI6eyJsb29rdXBVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvZGNwc3B5MmJyd2RqcjNxbi90aHJlZV9kX3NlY3VyZS9sb29rdXAifSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjpmYWxzZSwibWVyY2hhbnRBY2NvdW50SWQiOiJzdGNoMm5mZGZ3c3p5dHc1IiwiY3VycmVuY3lJc29Db2RlIjoiVVNEIn0sImNvaW5iYXNlRW5hYmxlZCI6dHJ1ZSwiY29pbmJhc2UiOnsiY2xpZW50SWQiOiIxMWQyNzIyOWJhNThiNTZkN2UzYzAxYTA1MjdmNGQ1YjQ0NmQ0ZjY4NDgxN2NiNjIzZDI1NWI1NzNhZGRjNTliIiwibWVyY2hhbnRBY2NvdW50IjoiY29pbmJhc2UtZGV2ZWxvcG1lbnQtbWVyY2hhbnRAZ2V0YnJhaW50cmVlLmNvbSIsInNjb3BlcyI6ImF1dGhvcml6YXRpb25zOmJyYWludHJlZSB1c2VyIiwicmVkaXJlY3RVcmwiOiJodHRwczovL2Fzc2V0cy5icmFpbnRyZWVnYXRld2F5LmNvbS9jb2luYmFzZS9vYXV0aC9yZWRpcmVjdC1sYW5kaW5nLmh0bWwiLCJlbnZpcm9ubWVudCI6Im1vY2sifSwibWVyY2hhbnRJZCI6ImRjcHNweTJicndkanIzcW4iLCJ2ZW5tbyI6Im9mZmxpbmUiLCJhcHBsZVBheSI6eyJzdGF0dXMiOiJtb2NrIiwiY291bnRyeUNvZGUiOiJVUyIsImN1cnJlbmN5Q29kZSI6IlVTRCIsIm1lcmNoYW50SWRlbnRpZmllciI6Im1lcmNoYW50LmNvbS5icmFpbnRyZWVwYXltZW50cy5zYW5kYm94LkJyYWludHJlZS1EZW1vIiwic3VwcG9ydGVkTmV0d29ya3MiOlsidmlzYSIsIm1hc3RlcmNhcmQiLCJhbWV4Il19fQ=="; - -void wait_for_potential_async_exceptions(void (^done)(void)) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{ - done(); - }); -} - -BOOL isANonce(NSString *nonce) { - NSString *nonceRegularExpressionString = @"\\A[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\Z"; - - NSError *error; - NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:nonceRegularExpressionString - options:0 - error:&error]; - if (error) { - NSLog(@"Error parsing regex: %@", error); - return NO; - } - - return [regex numberOfMatchesInString:nonce options:0 range:NSMakeRange(0, [nonce length])] > 0; -} - -@implementation BTOCMockHelper - -- (void)stubApplicationCanOpenURL { - id stubApplication = OCMPartialMock([UIApplication sharedApplication]); - OCMStub([stubApplication canOpenURL:[OCMArg any]]).andReturn(YES); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.h deleted file mode 100755 index 15b5e71e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface BTTestClientTokenFactory : NSObject - -+ (NSString *)tokenWithVersion:(NSInteger)version; -+ (NSString *)tokenWithVersion:(NSInteger)version - overrides:(NSDictionary *)dictionary; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.m deleted file mode 100755 index 06e23359..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/BTTestClientTokenFactory.m +++ /dev/null @@ -1,174 +0,0 @@ -#import "BTTestClientTokenFactory.h" - -@implementation BTTestClientTokenFactory - -+ (NSDictionary *)clientTokenWithVersion:(NSInteger)version configurationURL:(NSURL *)url { - if (version < 3) { - return @{ - @"version": @(version), - @"authorizationFingerprint": @"an_authorization_fingerprint", - @"configUrl": url.absoluteString, - @"challenges": @[ - @"cvv" - ], - @"clientApiUrl": @"https://api.example.com:443/merchants/a_merchant_id/client_api", - @"assetsUrl": @"https://assets.example.com", - @"authUrl": @"https://auth.venmo.example.com", - @"analytics": @{ - @"url": @"https://client-analytics.example.com" - }, - @"threeDSecureEnabled": @NO, - @"paypalEnabled": @YES, - @"paypal": @{ - @"displayName": @"Acme Widgets, Ltd. (Sandbox)", - @"clientId": @"a_paypal_client_id", - @"privacyUrl": @"http://example.com/pp", - @"userAgreementUrl": @"http://example.com/tos", - @"baseUrl": @"https://assets.example.com", - @"assetsUrl": @"https://checkout.paypal.example.com", - @"directBaseUrl": [NSNull null], - @"allowHttp": @YES, - @"environmentNoNetwork": @YES, - @"environment": @"offline", - @"merchantAccountId": @"a_merchant_account_id", - @"currencyIsoCode": @"USD" - }, - @"merchantId": @"a_merchant_id", - @"venmo": @"offline", - @"applePay": @{ - @"status": @"mock", - @"countryCode": @"US", - @"currencyCode": @"USD", - @"merchantIdentifier": @"apple-pay-merchant-id", - @"supportedNetworks": @[ @"visa", - @"mastercard", - @"amex" ] - }, - @"coinbaseEnabled": @YES, - @"coinbase": @{ - @"clientId": @"a_coinbase_client_id", - @"merchantAccount": @"coinbase-account@example.com", - @"scopes": @"authorizations:braintree user", - @"redirectUrl": @"https://assets.example.com/coinbase/oauth/redirect" - }, - @"merchantAccountId": @"some-merchant-account-id", - }; - } else { - return @{ - @"version": @(version), - @"authorizationFingerprint": @"an_authorization_fingerprint", - @"configUrl": url.absoluteString, - }; - } -} - -+ (NSDictionary *)configuration { - return @{ - @"challenges": @[ - @"cvv" - ], - @"clientApiUrl": @"https://api.example.com:443/merchants/a_merchant_id/client_api", - @"assetsUrl": @"https://assets.example.com", - @"authUrl": @"https://auth.venmo.example.com", - @"analytics": @{ - @"url": @"https://client-analytics.example.com" - }, - @"threeDSecureEnabled": @NO, - @"paypalEnabled": @YES, - @"paypal": @{ - @"displayName": @"Acme Widgets, Ltd. (Sandbox)", - @"clientId": @"a_paypal_client_id", - @"privacyUrl": @"http://example.com/pp", - @"userAgreementUrl": @"http://example.com/tos", - @"baseUrl": @"https://assets.example.com", - @"assetsUrl": @"https://checkout.paypal.example.com", - @"directBaseUrl": [NSNull null], - @"allowHttp": @YES, - @"environmentNoNetwork": @YES, - @"environment": @"offline", - @"merchantAccountId": @"a_merchant_account_id", - @"currencyIsoCode": @"USD" - }, - @"merchantId": @"a_merchant_id", - @"venmo": @"offline", - @"applePay": @{ - @"status": @"mock", - @"countryCode": @"US", - @"currencyCode": @"USD", - @"merchantIdentifier": @"apple-pay-merchant-id", - @"supportedNetworks": @[ @"visa", - @"mastercard", - @"amex" ] - - }, - @"coinbaseEnabled": @YES, - @"coinbase": @{ - @"clientId": @"a_coinbase_client_id", - @"merchantAccount": @"coinbase-account@example.com", - @"scopes": @"authorizations:braintree user", - @"redirectUrl": @"https://assets.example.com/coinbase/oauth/redirect" - }, - @"merchantAccountId": @"some-merchant-account-id", - }; -} - -+ (NSDictionary *)configurationWithOverrides:(NSDictionary *)overrides { - return [self extendDictionary:self.configuration withOverrides:overrides]; -} - -+ (NSString *)tokenWithVersion:(NSInteger)version { - return [self tokenWithVersion:version overrides:nil]; -} - -+ (NSString *)tokenWithVersion:(NSInteger)version - overrides:(NSDictionary *)overrides { - BOOL base64Encoded = version == 1 ? NO : YES; - - NSURL *configurationURL = [self dataURLWithJSONObject:[self configurationWithOverrides:overrides]]; - - NSDictionary *clientToken = [self extendDictionary:[self clientTokenWithVersion:version configurationURL:configurationURL] - withOverrides:overrides]; - - NSError *jsonSerializationError; - NSData *clientTokenData = [NSJSONSerialization dataWithJSONObject:clientToken - options:0 - error:&jsonSerializationError]; - NSAssert(jsonSerializationError == nil, @"Failed to generated test client token JSON: %@", jsonSerializationError); - - if (base64Encoded) { - return [clientTokenData base64EncodedStringWithOptions:0]; - } else { - return [[NSString alloc] initWithData:clientTokenData - encoding:NSUTF8StringEncoding]; - } -} - -+ (NSURL *)dataURLWithJSONObject:(id)object { - NSError *jsonSerializationError; - NSData *configurationData = [NSJSONSerialization dataWithJSONObject:object - options:0 - error:&jsonSerializationError]; - NSAssert(jsonSerializationError == nil, @"Failed to generated test client token JSON: %@", jsonSerializationError); - NSString *base64EncodedConfigurationData = [configurationData base64EncodedStringWithOptions:0]; - NSString *dataURLString = [NSString stringWithFormat:@"data:application/json;base64,%@", base64EncodedConfigurationData]; - return [NSURL URLWithString:dataURLString]; -} - -+ (NSDictionary *)extendDictionary:(NSDictionary *)dictionary withOverrides:(NSDictionary *)overrides { - NSMutableDictionary *extendedDictionary = [dictionary mutableCopy]; - - [overrides enumerateKeysAndObjectsUsingBlock:^(id key, id obj, __unused BOOL *stop){ - if ([obj isKindOfClass:[NSNull class]]) { - [extendedDictionary removeObjectForKey:key]; - } else if ([obj isKindOfClass:[NSDictionary class]] && [overrides[key] isKindOfClass:[NSDictionary class]]) { - // Overriding values nested inside a dictionary - extendedDictionary[key] = [self extendDictionary:obj withOverrides:overrides[key]]; - } else { - extendedDictionary[key] = obj; - } - }]; - - return extendedDictionary; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.h deleted file mode 100755 index 3e4a60a0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.h +++ /dev/null @@ -1,62 +0,0 @@ -#import "BTPayPalRequestFactory.h" -#import "PPOTCore.h" -#import "PPOTRequest.h" - -#pragma mark - FakePayPalOneTouchCoreResult - -@interface FakePayPalOneTouchCoreResult : PPOTResult -@property (nonatomic, strong, nullable) NSError *cannedError; -@property (nonatomic, assign) PPOTResultType cannedType; -@property (nonatomic, assign) PPOTRequestTarget cannedTarget; -@end - -#pragma mark - FakePayPalOneTouchCore - -@interface FakePayPalOneTouchCore : PPOTCore -+ (nullable FakePayPalOneTouchCoreResult *)cannedResult; -+ (void)setCannedResult:(nullable FakePayPalOneTouchCoreResult *)result; -+ (BOOL)cannedIsWalletAppAvailable; -+ (void)setCannedIsWalletAppAvailable:(BOOL)isWalletAppAvailable; -@end - -#pragma mark - FakePayPalCheckoutRequest - -@interface FakePayPalCheckoutRequest : PPOTCheckoutRequest -@property (nonatomic, strong, nullable) NSError *cannedError; -@property (nonatomic, assign) BOOL cannedSuccess; -@property (nonatomic, assign) PPOTRequestTarget cannedTarget; -@property (nonatomic, strong, nullable) NSString *cannedMetadataId; -@property (nonatomic, assign) BOOL appSwitchPerformed; -@end - -#pragma mark - FakePayPalAuthorizationRequest - -@interface FakePayPalAuthorizationRequest : PPOTAuthorizationRequest -@property (nonatomic, strong, nullable) NSError *cannedError; -@property (nonatomic, assign) BOOL cannedSuccess; -@property (nonatomic, assign) PPOTRequestTarget cannedTarget; -@property (nonatomic, strong, nullable) NSString *cannedMetadataId; -@property (nonatomic, assign) BOOL appSwitchPerformed; -@property (nonatomic, strong, nullable) NSURL *cannedURL; -@end - -#pragma mark - FakePayPalBillingAgreementRequest - -@interface FakePayPalBillingAgreementRequest : PPOTBillingAgreementRequest -@property (nonatomic, strong, nullable) NSError *cannedError; -@property (nonatomic, assign) BOOL cannedSuccess; -@property (nonatomic, assign) PPOTRequestTarget cannedTarget; -@property (nonatomic, strong, nullable) NSString *cannedMetadataId; -@property (nonatomic, assign) BOOL appSwitchPerformed; -@end - -#pragma mark - FakePayPalRequestFactory - -@interface FakePayPalRequestFactory : BTPayPalRequestFactory -@property (nonatomic, strong, nonnull) FakePayPalCheckoutRequest *checkoutRequest; -@property (nonatomic, strong, nonnull) FakePayPalAuthorizationRequest *authorizationRequest; -@property (nonatomic, strong, nonnull) FakePayPalBillingAgreementRequest *billingAgreementRequest; -@property (nonatomic, strong, nullable) NSSet *lastScopeValues; -@property (nonatomic, strong, nullable) NSURL *lastApprovalURL; - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.m deleted file mode 100755 index 351690a0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/FakePayPalClasses.m +++ /dev/null @@ -1,193 +0,0 @@ -#import "FakePayPalClasses.h" - -#pragma mark - FakePayPalOneTouchCoreResult - -@implementation FakePayPalOneTouchCoreResult - -- (instancetype)init { - if (self = [super init]) { - _cannedType = PPOTResultTypeSuccess; - _cannedTarget = PPOTRequestTargetUnknown; - } - return self; -} - -- (NSError *)error { - return self.cannedError; -} - -- (PPOTResultType)type { - return self.cannedType; -} - -- (PPOTRequestTarget)target { - return self.cannedTarget; -} - -- (NSDictionary *)response { - return @{ @"foo" : @"bar", @"correlation_id" : @"a-correlation-id" }; -} - -@end - -#pragma mark - FakePayPalOneTouchCore - -@implementation FakePayPalOneTouchCore - -static FakePayPalOneTouchCoreResult *cannedResult; -static BOOL cannedIsWalletAppAvailable = YES; - -+ (void)initialize { - cannedResult = [[FakePayPalOneTouchCoreResult alloc] init]; -} - -+ (BOOL)cannedIsWalletAppAvailable { - return cannedIsWalletAppAvailable; -} - -+ (void)setCannedIsWalletAppAvailable:(BOOL)isWalletAppAvailable { - cannedIsWalletAppAvailable = isWalletAppAvailable; -} - -+ (FakePayPalOneTouchCoreResult *)cannedResult { - return cannedResult; -} - -+ (void)setCannedResult:(FakePayPalOneTouchCoreResult *)result { - cannedResult = result; -} - - -+ (void)parseResponseURL:(__unused NSURL *)url completionBlock:(PPOTCompletionBlock)completionBlock { - completionBlock([self cannedResult]); -} - -+ (void)redirectURLsForCallbackURLScheme:(__unused NSString *)callbackURLScheme - withReturnURL:(NSString *__autoreleasing *)returnURL - withCancelURL:(NSString *__autoreleasing *)cancelURL { - *cancelURL = @"scheme://cancel"; - *returnURL = @"scheme://return"; -} - -+ (NSString *)clientMetadataID { - return @"fake-client-metadata-id"; -} - -+ (BOOL)doesApplicationSupportOneTouchCallbackURLScheme:(__unused NSString *)callbackURLScheme { - return YES; -} - -+ (BOOL)isWalletAppInstalled { - return [self cannedIsWalletAppAvailable]; -} - -@end - -#pragma mark - FakePayPalCheckoutRequest - -@implementation FakePayPalCheckoutRequest - -- (instancetype)init { - if (self = [super init]) { - _cannedError = nil; - _cannedTarget = PPOTRequestTargetBrowser; - _cannedSuccess = YES; - _cannedMetadataId = @"fake-canned-metadata-id"; - } - return self; -} - -- (void)performWithAdapterBlock:(PPOTRequestAdapterBlock)adapterBlock { - self.appSwitchPerformed = YES; - adapterBlock(self.cannedSuccess, [NSURL URLWithString:@"http://example.com"], self.cannedTarget, self.cannedMetadataId, self.cannedError); -} - -@end - -#pragma mark - FakePayPalAuthorizationRequest - -@implementation FakePayPalAuthorizationRequest - -- (instancetype)init { - if (self = [super init]) { - _cannedError = nil; - _cannedTarget = PPOTRequestTargetBrowser; - _cannedSuccess = YES; - _cannedMetadataId = @"fake-canned-metadata-id"; - } - return self; -} - -- (void)performWithAdapterBlock:(PPOTRequestAdapterBlock)adapterBlock { - self.appSwitchPerformed = YES; - adapterBlock(self.cannedSuccess, self.cannedURL ? self.cannedURL : [NSURL URLWithString:@"http://example.com"], self.cannedTarget, self.cannedMetadataId, self.cannedError); -} - -@end - -#pragma mark - FakePayPalBillingAgreementRequest - -@implementation FakePayPalBillingAgreementRequest - -- (instancetype)init { - if (self = [super init]) { - _cannedError = nil; - _cannedTarget = PPOTRequestTargetBrowser; - _cannedSuccess = YES; - _cannedMetadataId = @"fake-canned-metadata-id"; - } - return self; -} - -- (void)performWithAdapterBlock:(PPOTRequestAdapterBlock)adapterBlock { - self.appSwitchPerformed = YES; - adapterBlock(self.cannedSuccess, [NSURL URLWithString:@"http://example.com"], self.cannedTarget, self.cannedMetadataId, self.cannedError); -} - -@end - -#pragma mark - FakePayPalRequestFactory - -@implementation FakePayPalRequestFactory - -- (instancetype)init { - if (self = [super init]) { - _authorizationRequest = [[FakePayPalAuthorizationRequest alloc] init]; - _checkoutRequest = [[FakePayPalCheckoutRequest alloc] init]; - _billingAgreementRequest = [[FakePayPalBillingAgreementRequest alloc] init]; - } - return self; -} - -- (PPOTCheckoutRequest *)checkoutRequestWithApprovalURL:(__unused NSURL *)approvalURL - clientID:(__unused NSString *)clientID - environment:(__unused NSString *)environment - callbackURLScheme:(__unused NSString *)callbackURLScheme -{ - self.lastApprovalURL = [approvalURL copy]; - return self.checkoutRequest; -} - -- (PPOTBillingAgreementRequest *)billingAgreementRequestWithApprovalURL:(__unused NSURL *)approvalURL - clientID:(__unused NSString *)clientID - environment:(__unused NSString *)environment - callbackURLScheme:(__unused NSString *)callbackURLScheme -{ - self.lastApprovalURL = [approvalURL copy]; - return self.billingAgreementRequest; -} - -- (PPOTAuthorizationRequest *)requestWithScopeValues:(NSSet *)scopeValues - privacyURL:(__unused NSURL *)privacyURL - agreementURL:(__unused NSURL *)agreementURL - clientID:(__unused NSString *)clientID - environment:(__unused NSString *)environment - callbackURLScheme:(__unused NSString *)callbackURLScheme -{ - self.lastScopeValues = scopeValues; - return self.authorizationRequest; -} - -@end - - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockAPIClient.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockAPIClient.swift deleted file mode 100755 index 4ac9e4b2..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockAPIClient.swift +++ /dev/null @@ -1,74 +0,0 @@ -import BraintreeCore - -class MockAPIClient : BTAPIClient { - var lastPOSTPath = "" - var lastPOSTParameters = [:] as [AnyHashable: Any]? - var lastGETPath = "" - var lastGETParameters = [:] as [String : String]? - var postedAnalyticsEvents : [String] = [] - - var cannedConfigurationResponseBody : BTJSON? = nil - var cannedConfigurationResponseError : NSError? = nil - - var cannedResponseError : NSError? = nil - var cannedHTTPURLResponse : HTTPURLResponse? = nil - var cannedResponseBody : BTJSON? = nil - - var fetchedPaymentMethods = false - var fetchPaymentMethodsSorting = false - - override func get(_ path: String, parameters: [String : String]?, completion completionBlock: ((BTJSON?, HTTPURLResponse?, Error?) -> Void)? = nil) { - lastGETPath = path - lastGETParameters = parameters - - guard let completionBlock = completionBlock else { - return - } - completionBlock(cannedResponseBody, cannedHTTPURLResponse, cannedResponseError) - } - - override func post(_ path: String, parameters: [AnyHashable : Any]?, completion completionBlock: ((BTJSON?, HTTPURLResponse?, Error?) -> Void)? = nil) { - lastPOSTPath = path - lastPOSTParameters = parameters - - guard let completionBlock = completionBlock else { - return - } - completionBlock(cannedResponseBody, cannedHTTPURLResponse, cannedResponseError) - } - - override func fetchOrReturnRemoteConfiguration(_ completionBlock: @escaping (BTConfiguration?, Error?) -> Void) { - guard let responseBody = cannedConfigurationResponseBody else { - completionBlock(nil, cannedConfigurationResponseError) - return - } - completionBlock(BTConfiguration(json: responseBody), cannedConfigurationResponseError) - } - - override func fetchPaymentMethodNonces(_ completion: @escaping ([BTPaymentMethodNonce]?, Error?) -> Void) { - fetchedPaymentMethods = true - fetchPaymentMethodsSorting = false - completion([], nil) - } - - override func fetchPaymentMethodNonces(_ defaultFirst: Bool, completion: @escaping ([BTPaymentMethodNonce]?, Error?) -> Void) { - fetchedPaymentMethods = true - fetchPaymentMethodsSorting = false - completion([], nil) - } - - /// BTAPIClient gets copied by other classes like BTPayPalDriver, BTVenmoDriver, etc. - /// This copy causes MockAPIClient to lose its stubbed data (canned responses), so the - /// workaround for tests is to stub copyWithSource:integration: to *not* copy itself - override func copy(with source: BTClientMetadataSourceType, integration: BTClientMetadataIntegrationType) -> Self { - return self - } - - override func sendAnalyticsEvent(_ name: String) { - postedAnalyticsEvents.append(name) - } - - func didFetchPaymentMethods(sorted: Bool) -> Bool { - return fetchedPaymentMethods && fetchPaymentMethodsSorting == sorted - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockDelegates.swift b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockDelegates.swift deleted file mode 100755 index f9937cbd..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Helpers/MockDelegates.swift +++ /dev/null @@ -1,71 +0,0 @@ -import XCTest - -@objc class MockAppSwitchDelegate : NSObject, BTAppSwitchDelegate { - var willPerformAppSwitchExpectation : XCTestExpectation? = nil - var didPerformAppSwitchExpectation : XCTestExpectation? = nil - var willProcessAppSwitchExpectation : XCTestExpectation? = nil - // XCTestExpectations verify that delegates callbacks are made; the below bools verify that they are NOT made - var willPerformAppSwitchCalled = false - var didPerformAppSwitchCalled = false - var willProcessAppSwitchCalled = false - var lastAppSwitcher : AnyObject? = nil - - override init() { } - - init(willPerform: XCTestExpectation?, didPerform: XCTestExpectation?) { - willPerformAppSwitchExpectation = willPerform - didPerformAppSwitchExpectation = didPerform - } - - @objc func appSwitcherWillPerformAppSwitch(_ appSwitcher: Any) { - lastAppSwitcher = appSwitcher as AnyObject? - willPerformAppSwitchExpectation?.fulfill() - willPerformAppSwitchCalled = true - } - - @objc func appSwitcher(_ appSwitcher: Any, didPerformSwitchTo target: BTAppSwitchTarget) { - lastAppSwitcher = appSwitcher as AnyObject? - didPerformAppSwitchExpectation?.fulfill() - didPerformAppSwitchCalled = true - } - - @objc func appSwitcherWillProcessPaymentInfo(_ appSwitcher: Any) { - lastAppSwitcher = appSwitcher as AnyObject? - willProcessAppSwitchExpectation?.fulfill() - willProcessAppSwitchCalled = true - } -} - -@objc class MockViewControllerPresentationDelegate : NSObject, BTViewControllerPresentingDelegate { - var requestsPresentationOfViewControllerExpectation : XCTestExpectation? = nil - var requestsDismissalOfViewControllerExpectation : XCTestExpectation? = nil - var lastViewController : UIViewController? = nil - var lastPaymentDriver : AnyObject? = nil - - func paymentDriver(_ driver: Any, requestsDismissalOf viewController: UIViewController) { - lastPaymentDriver = driver as AnyObject? - lastViewController = viewController - requestsDismissalOfViewControllerExpectation?.fulfill() - } - - func paymentDriver(_ driver: Any, requestsPresentationOf viewController: UIViewController) { - lastPaymentDriver = driver as AnyObject? - lastViewController = viewController - requestsPresentationOfViewControllerExpectation?.fulfill() - } -} - -@objc class MockPayPalApprovalHandlerDelegate : NSObject, BTPayPalApprovalHandler { - var handleApprovalExpectation : XCTestExpectation? = nil - var url : NSURL? = nil - var cancel : Bool = false - - func handleApproval(_ request: PPOTRequest, paypalApprovalDelegate delegate: BTPayPalApprovalDelegate) { - if (cancel) { - delegate.onApprovalCancel() - } else { - delegate.onApprovalComplete(url as! URL) - } - handleApprovalExpectation?.fulfill() - } -} diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Info.plist b/examples/braintree/ios/Frameworks/Braintree/UnitTests/Info.plist deleted file mode 100755 index ba72822e..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPDataCollectorTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPDataCollectorTest.m deleted file mode 100755 index fe515471..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPDataCollectorTest.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// PPDataCollectorTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPDataCollector_Internal.h" - -@interface PPDataCollectorTest : XCTestCase - -@end - -@implementation PPDataCollectorTest - -- (void)testDeviceData_containsCorrelationId { - // Collect client metadata ID with a canned pairing ID to guarantee that the pairing ID - // hasn't already been configured by another test. Also, we can then assert the value of - // the correlation_id in the JSON object because we know the client metadata ID will be - // equal to the pairing ID. - [PPDataCollector generateClientMetadataID:@"expected_correlation_id"]; - NSString *deviceData = [PPDataCollector collectPayPalDeviceData]; - NSData *data = [deviceData dataUsingEncoding:NSUTF8StringEncoding]; - NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:NULL]; - NSString *cmid = [dictionary objectForKey:@"correlation_id"]; - - XCTAssertEqualObjects(cmid, @"expected_correlation_id"); -} - -- (void)testClientMetadata_isNotJSON { - NSString *cmid = [PPDataCollector generateClientMetadataID]; - NSData *cmidJSONData = [cmid dataUsingEncoding:NSUTF8StringEncoding]; - NSError *error; - id json = [NSJSONSerialization JSONObjectWithData:cmidJSONData options:0 error:&error]; - - XCTAssertNil(json); - XCTAssertNotNil(error); -} - -- (void)testClientMetadata_isConsistentOnRepeatedTries { - NSString *cmid = [PPDataCollector generateClientMetadataID]; - XCTAssertEqualObjects(cmid, [PPDataCollector generateClientMetadataID]); -} - -- (void)testClientMetadataValue_whenUsingPairingID_isSameWhenSubsequentCallsDoNotSpecifyPairingID { - NSString *pairingID = @"random pairing id"; - XCTAssertEqualObjects(pairingID, [PPDataCollector generateClientMetadataID:pairingID]); - XCTAssertEqualObjects(pairingID, [PPDataCollector generateClientMetadataID]); - XCTAssertEqualObjects(pairingID, [PPDataCollector generateClientMetadataID:nil]); -} - -- (void)testClientMetadataValue_isRegeneratedOnNonNullPairingID { - NSString *cmid = [PPDataCollector generateClientMetadataID]; - NSString *cmid2 = [PPDataCollector generateClientMetadataID:@"some pairing id"]; - XCTAssertNotEqualObjects(cmid, cmid2); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTIDataTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTIDataTest.m deleted file mode 100755 index 4784fdab..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTIDataTest.m +++ /dev/null @@ -1,77 +0,0 @@ -// -// PPFPTIDataTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -#import "PPFPTIData.h" - -@interface PPFPTIDataTest : XCTestCase - -@property (nonatomic, copy, readwrite) NSString *deviceID; -@property (nonatomic, copy, readwrite) NSString *sessionID; -@property (nonatomic, copy, readwrite) NSDictionary *eventParams; -@property (nonatomic, copy, readwrite) NSString *userAgent; -@property (nonatomic, strong, readwrite) NSURL *trackerURL; - -@end - -@implementation PPFPTIDataTest - -- (void)setUp { - [super setUp]; - self.eventParams = @{ - @"abc" : @"xyz", - @"onetwothree": @"789" - }; - self.deviceID = @"myDeviceID"; - self.sessionID = @"mySessionID"; - self.userAgent = @"myUserAgent"; - self.trackerURL = [NSURL URLWithString:@"http://example.com/v1/analytics"]; -} - -- (void)testDataAsDictionary { - PPFPTIData *data = [[PPFPTIData alloc] initWithParams:self.eventParams - deviceID:self.deviceID - sessionID:self.sessionID - userAgent:self.userAgent - trackerURL:self.trackerURL]; - XCTAssertEqualObjects(data.userAgent, self.userAgent); - XCTAssertEqualObjects(data.trackerURL, self.trackerURL); - - NSDictionary *dataDictionary = [data dataAsDictionary]; - NSTimeInterval currentTime = [[NSDate date] timeIntervalSince1970]; - - NSDictionary *eventsDictionary = dataDictionary[@"events"]; - XCTAssertEqualObjects(eventsDictionary[@"actor"][@"tracking_visitor_id"], self.deviceID); - XCTAssertEqualObjects(eventsDictionary[@"actor"][@"tracking_visit_id"], self.sessionID); - XCTAssertEqualObjects(eventsDictionary[@"channel"], @"mobile"); - - NSString *trackingEventsString = eventsDictionary[@"tracking_event"]; - XCTAssertNotNil(trackingEventsString); - long long convertedTimeInterval = [trackingEventsString longLongValue]; - // Tests the generated interval is within 1 second of the expected value - XCTAssertEqualWithAccuracy(convertedTimeInterval, currentTime * 1000, 1000); - - NSDictionary *eventParamsDictionary = eventsDictionary[@"event_params"]; - XCTAssertEqualObjects(eventParamsDictionary[@"abc"], self.eventParams[@"abc"]); - XCTAssertEqualObjects(eventParamsDictionary[@"onetwothree"], self.eventParams[@"onetwothree"]); - - // These were other added values passed in the past - XCTAssertNotNil(eventParamsDictionary[@"g"]); - XCTAssertNotNil(eventParamsDictionary[@"t"]); - - long long gmtOffsetInMilliseconds = [eventParamsDictionary[@"g"] integerValue] * 60 * 1000; - XCTAssertEqualWithAccuracy( - convertedTimeInterval, - gmtOffsetInMilliseconds + [eventParamsDictionary[@"t"] longLongValue], - 1000 - ); - - XCTAssertEqualObjects(eventParamsDictionary[@"sv"], @"mobile"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTITrackerTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTITrackerTest.m deleted file mode 100755 index 2a4e5ee0..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPFPTITrackerTest.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// PPFPTITrackerTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import - -#import "PPFPTITracker.h" -#import "PPFPTIData.h" -#import "PPOTVersion.h" - -@interface PPFPTITrackerTest : XCTestCase - -@property (nonatomic, copy, readwrite) NSString *deviceID; -@property (nonatomic, copy, readwrite) NSString *sessionID; -@property (nonatomic, strong, readwrite) XCTestExpectation *expectation; - -@end - - -@implementation PPFPTITrackerTest - -- (void)setUp { - [super setUp]; - self.deviceID = @"myDeviceID"; - self.sessionID = @"mySessionID"; - self.expectation = nil; -} - -- (void)tearDown { - self.expectation = nil; - [super tearDown]; -} - -- (void)testDelegateNotSetDoesNotCrash { - PPFPTITracker *tracker = [[PPFPTITracker alloc] initWithDeviceUDID:self.deviceID - sessionID:self.sessionID - networkAdapterDelegate:nil]; - [tracker submitEventWithParams:[NSDictionary dictionary]]; -} - -- (void)testDelegatePassedInformation { - PPFPTITracker *tracker = [[PPFPTITracker alloc] initWithDeviceUDID:self.deviceID - sessionID:self.sessionID - networkAdapterDelegate:self]; - self.expectation = [self expectationWithDescription:@"Expect sendRequestWithData to be called"]; - - [tracker submitEventWithParams:[NSDictionary dictionary]]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -#pragma mark PPFPTINetworkAdapterDelegate methods - -- (void)sendRequestWithData:(nonnull PPFPTIData*)fptiData { - NSString *userAgentPrefix = [NSString stringWithFormat:@"PayPalSDK/OneTouchCore-iOS %@", PayPalOTVersion()]; - XCTAssertTrue([fptiData.userAgent hasPrefix:userAgentPrefix], @"Expect PayPal to be in the prefix to help FPTI"); - XCTAssertEqualObjects(fptiData.trackerURL, [NSURL URLWithString:@"https://api-m.paypal.com/v1/tracking/events"]); - - NSDictionary *dataDictionary = [fptiData dataAsDictionary]; - - NSDictionary *eventsDictionary = dataDictionary[@"events"]; - XCTAssertEqualObjects(eventsDictionary[@"actor"][@"tracking_visitor_id"], self.deviceID); - XCTAssertEqualObjects(eventsDictionary[@"actor"][@"tracking_visit_id"], self.sessionID); - - [self.expectation fulfill]; -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchResponseTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchResponseTest.m deleted file mode 100755 index 47492c8f..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchResponseTest.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// PPAppSwitchResponse.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import -#import "PPOTAppSwitchResponse.h" -#import "PPOTEncryptionHelper.h" -#import "PPOTString.h" - -@interface PPOTAppSwitchResponseTest : XCTestCase - -@end - -@implementation PPOTAppSwitchResponseTest - -- (void)test1InvalidHermesResponse { - PPOTAppSwitchResponse *response = [[PPOTAppSwitchResponse alloc] initWithHermesURL:nil environment:nil]; - XCTAssertNil(response); - - - response = [[PPOTAppSwitchResponse alloc] initWithHermesURL:[NSURL URLWithString:@"http"] environment:nil]; - XCTAssertFalse(response.validResponse); - - response = [[PPOTAppSwitchResponse alloc] initWithHermesURL:[NSURL URLWithString:@"http://success"] environment:nil]; - XCTAssertTrue(response.validResponse); - response = [[PPOTAppSwitchResponse alloc] initWithHermesURL:[NSURL URLWithString:@"http://cancel"] environment:nil]; - XCTAssertTrue(response.validResponse); -} - -- (void)testInvalidEncodedURLResponse { - PPOTAppSwitchResponse *response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:nil encryptionKey:nil]; - XCTAssertNil(response); - NSURL *encodedURL = [NSURL URLWithString:@""]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - XCTAssertFalse(response.validResponse); - encodedURL = [NSURL URLWithString:@"http://success"]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - XCTAssertFalse(response.validResponse); - encodedURL = [NSURL URLWithString:@"http://cancel"]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - // cancel is a cancel - XCTAssertTrue(response.validResponse && response.action == PPAppSwitchResponseActionCancel); - - encodedURL = [NSURL URLWithString:@"http://success?payload=84032840274927rowueoruwohrwlrhwourowr&payloadEnc=8043729742964uoeruwohrkwjr20r82048"]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - XCTAssertFalse(response.validResponse); - // any cancel we don't care about result - encodedURL = [NSURL URLWithString:@"http://cancel?payload=84032840274927rowueoruwohrwlrhwourowr&payloadEnc=8043729742964uoeruwohrkwjr20r82048"]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - XCTAssertTrue(response.validResponse); -} - -- (void)testInvalidEncryptedURLResponse { - NSURL *encodedURL = [NSURL URLWithString:@"http://success?payload=eyJ0ZXN0IjoidGVzdCJ9&payloadEnc=eyJ0ZXN0IjoidGVzdCJ9"]; - PPOTAppSwitchResponse *response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:@"test"]; - XCTAssertFalse(response.validResponse); - NSData *key = [PPOTEncryptionHelper generate256BitKey]; - NSString *hexKey = [PPOTString hexStringFromData:key]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:hexKey]; - XCTAssertFalse(response.validResponse); - - encodedURL = [NSURL URLWithString:@"http://success?payload=eyJ0ZXN0IjoidGVzdCJ9==&payloadEnc=eyJ0ZXN0IjoidGVzdCJ9+/80\n"]; - response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:hexKey]; - XCTAssertFalse(response.validResponse); -} - -- (void)testErrorWithDictionaryAlreadyInResponse { - NSURL *encodedURL = [NSURL URLWithString:@"http://shouldBeError?payload=eyJ2ZXJzaW9uIjozLCJtc2dfR1VJRCI6bnVsbCwicmVzcG9uc2VfdHlwZSI6bnVsbCwiZW52aXJvbm1lbnQiOiJtb2NrIiwiZXJyb3IiOnsiZGVidWdfaWQiOm51bGwsIm1lc3NhZ2UiOiJFbmNyeXB0ZWQgcGF5bG9hZCBoYXMgZXhwaXJlZCJ9LCJsYW5ndWFnZSI6bnVsbH0"]; - PPOTAppSwitchResponse *response = [[PPOTAppSwitchResponse alloc] initWithEncodedURL:encodedURL encryptionKey:nil]; - XCTAssertFalse(response.validResponse); - XCTAssertEqual(response.responseType, PPAppSwitchResponseActionUnknown); - XCTAssertEqual(response.version, 3); - XCTAssertEqual(response.action, PPAppSwitchResponseActionUnknown); - NSLog(@"%@", response.error); - NSDictionary* expectedError = @{ @"message": @"Encrypted payload has expired", @"debug_id": [NSNull null] }; - XCTAssertEqualObjects(response.error, expectedError); - XCTAssertNil(response.msgID); - XCTAssertEqualObjects(response.environment, @"mock"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchUtilTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchUtilTest.m deleted file mode 100755 index 33873b40..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTAppSwitchUtilTest.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// PayPalTouchCoreTests.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import -#import "PPOTAppSwitchUtil.h" -#import "PPOTJSONHelper.h" - -@interface PPOTAppSwitchUtilTest : XCTestCase - -@end - -@implementation PPOTAppSwitchUtilTest - -- (void)testAppSwitchNotPossible { - BOOL possible = [PPOTAppSwitchUtil isCallbackURLSchemeValid:@"com.scheme.bla"]; - XCTAssertFalse(possible, @"app switch should not be possible when unit tests running"); -} - -- (void)testParseQueryTest { - NSString *quearyToTest = nil; - NSDictionary *parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @""; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"&"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"?"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"hello&"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"hello&hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"&hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"&=hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertFalse(parseQueryStringDict.count, @"count should be 0"); - - quearyToTest = @"hello=hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertTrue(parseQueryStringDict.count == 1, @"count should be 0"); - - quearyToTest = @"&hello=hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertTrue(parseQueryStringDict.count == 1, @"count should be 0"); - - quearyToTest = @"&hello=hello"; - parseQueryStringDict = [PPOTAppSwitchUtil parseQueryString:quearyToTest]; - XCTAssertTrue(parseQueryStringDict.count == 1, @"count should be 0"); -} - -- (void)testJsonEncodingDecoding { - NSDictionary *dict1 = @{@"key1": @1, @"key2": @"some.strings", @"key2": @{@"dict1": @"value"}, @"key3": @[@"el1", @"el2"]}; - - NSString *encoded = [PPOTJSONHelper base64EncodedJSONStringWithDictionary:dict1]; - - NSDictionary *dict2 = [PPOTJSONHelper dictionaryWithBase64EncodedJSONString:encoded]; - - XCTAssertEqualObjects(dict1, dict2, @"dictionaries must be the same"); -} - -// TODO: Test fails with PayPal OneTouchCoreSDK: callback URL scheme must start with com.braintreepayments.demo -- (void)pendURLAction { - NSString *urlTest = @"com.test.mytest://test?payload=e30%3D&x-source=(null)&x-success=com.test.callback://success&x-cancel=com.test.callback://cancel"; - NSURL *urlAction = [PPOTAppSwitchUtil URLAction:@"test" targetAppURLScheme:@"com.test.mytest" callbackURLScheme:@"com.test.callback" payload:@{}]; - XCTAssertNotNil(urlAction, @"action should not be nil"); - XCTAssertEqualObjects([urlAction absoluteString], urlTest, @"links should be the same"); -} - -- (void)testInvalidURL { - XCTAssertFalse([PPOTAppSwitchUtil isValidURLAction:nil], @"should fail"); - - NSString *urlTest = @"com.test.mytest://test?payload=e30%3D&x-source=(null)&x-success=com.test.callback://success&x-cancel=com.test.callback://cancel"; - NSURL *url = [NSURL URLWithString:urlTest]; - XCTAssertFalse([PPOTAppSwitchUtil isValidURLAction:url], @"should fail"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTConfigurationTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTConfigurationTest.m deleted file mode 100755 index ef4c7840..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTConfigurationTest.m +++ /dev/null @@ -1,296 +0,0 @@ -// -// PPOTConfigurationTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import -#import "PPOTConfiguration.h" - -@interface PPOTConfigurationTest : XCTestCase - -@end - -@implementation PPOTConfigurationTest - -- (void)testPPOTConfiguration_whenBadOS_returnsNilConfig { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"Android", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - } - }]; - XCTAssertNil(configuration); -} - -- (void)testPPOTConfiguration_whenMissingExpectedVersion_returnsNilConfig { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"2.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - ], - } - }]; - XCTAssertNil(configuration); -} - -- (void)testPPOTConfiguration_whenMultipleVersions_processesExpectedVersionCorrectly { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - ], - }, - @"2.0": @{ - @"foo": @[ - ], - } - }]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)0); -} - - -- (void)testPPOTConfiguration_whenNoOAuthConfigRecipe_loadsConfigWithZeroRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - ], - } - }]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)0); -} - -- (void)testPPOTConfiguration_whenGoodOAuthConfigRecipes_loadsMultipleRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"protocol": @"2", - @"target": @"wallet", - @"scope": @[@"*"], - @"scheme": @"com.paypal.ppclient.touch.v2", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"protocol": @"0", - @"target": @"browser", - @"scope": @[@"*"], - }, - ], - } - }]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)2); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - XCTAssert([configuration.prioritizedOAuthRecipes[1] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); -} - -- (void)testPPOTConfiguration_whenConfigRecipeWithUnknownTargetInList_onlyLoadsRecognizedRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"target": @"UNKNOWN TARGET", - @"protocol": @"0", - @"scope": @[@"*"], - @"scheme": @"com.paypal.ppclient.touch.v2", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"protocol": @"0", - @"target": @"browser", - @"scope": @[@"*"], - }, - ], - } - }]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - - PPOTConfigurationOAuthRecipe *oauthRecipe = (PPOTConfigurationOAuthRecipe *)configuration.prioritizedOAuthRecipes[0]; - XCTAssertEqual(oauthRecipe.target, PPOTRequestTargetBrowser); - XCTAssertEqualObjects(oauthRecipe.scope, [NSSet setWithObject:@"*"]); - XCTAssertEqualObjects(oauthRecipe.protocolVersion, @0); -} - -- (void)testPPOTConfiguration_whenConfigRecipeWithUnknownProtocolInList_onlyLoadsRecognizedRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"target": @"UNKNOWN TARGET", - @"protocol": @"9999", - @"scope": @[@"*"], - @"scheme": @"com.paypal.ppclient.touch.v2", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"protocol": @"0", - @"target": @"browser", - @"scope": @[@"*"], - }, - ], - } - }]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - - PPOTConfigurationOAuthRecipe *oauthRecipe = (PPOTConfigurationOAuthRecipe *)configuration.prioritizedOAuthRecipes[0]; - XCTAssertEqual(oauthRecipe.target, PPOTRequestTargetBrowser); - XCTAssertEqualObjects(oauthRecipe.scope, [NSSet setWithObject:@"*"]); - XCTAssertEqualObjects(oauthRecipe.protocolVersion, @0); -} - -- (void)testPPOTConfiguration_whenOAuthConfigRecipeWithMissingScopeInList_onlyLoadsRecognizedRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"target": @"wallet", - @"scheme": @"com.paypal.ppclient.touch.v2", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"target": @"browser", - @"protocol": @"0", - @"scope": @[@"*"], - } - ], - } - }]; - - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - - PPOTConfigurationOAuthRecipe *oauthRecipe = (PPOTConfigurationOAuthRecipe *)configuration.prioritizedOAuthRecipes[0]; - XCTAssertEqual(oauthRecipe.target, PPOTRequestTargetBrowser); - XCTAssertEqualObjects(oauthRecipe.scope, [NSSet setWithObject:@"*"]); - XCTAssertEqualObjects(oauthRecipe.protocolVersion, @0); -} - -- (void)testPPOTConfiguration_whenBrowserRecipeWithMissingURLInProtocol3List_onlyLoadsRecognizedRecipes { - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"target": @"wallet", - @"scope": @[@"*"], - @"protocol": @"1", - @"scheme": @"com.paypal.ppclient.touch.v9999", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"target": @"browser", - @"protocol": @"3", - @"scope": @[@"*"], - }, - ], - } - }]; - - XCTAssertNotNil(configuration); - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - - PPOTConfigurationOAuthRecipe *oauthRecipe = (PPOTConfigurationOAuthRecipe *)configuration.prioritizedOAuthRecipes[0]; - XCTAssertEqual(oauthRecipe.target, PPOTRequestTargetOnDeviceApplication); - XCTAssertEqualObjects(oauthRecipe.scope, [NSSet setWithObject:@"*"]); - XCTAssertEqualObjects(oauthRecipe.protocolVersion, @1); - XCTAssertEqualObjects(oauthRecipe.targetAppURLScheme, @"com.paypal.ppclient.touch.v9999"); - NSArray *expectedTargetAppBundleIDs = @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"]; - XCTAssertEqualObjects(oauthRecipe.targetAppBundleIDs, expectedTargetAppBundleIDs); -} - -- (void)testPPOTConfiguration_whenDifferentBadConfigRecipes_stillLoadsAllGoodRecipes { - // Expected 1 OAuth, 1 Checkout Recipe - PPOTConfiguration *configuration = [PPOTConfiguration configurationWithDictionary: - @{@"os": @"iOS", - @"file_timestamp": @"2014-12-19T16:39:57-08:00", - @"1.0": @{ - @"checkout_recipes_in_decreasing_priority_order": @[ - @{ - @"target": @"browser", - @"protocol": @"9999", - // Unrecognized Protocol Version - }, - @{ - @"target": @"wallet", - @"protocol": @"3", - @"scheme": @"com.paypal.ppclient.touch.v3", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - ], - @"oauth2_recipes_in_decreasing_priority_order": @[ - @{ - @"protocol": @"1", - @"target": @"wallet", - @"scope": @[@"*"], - @"scheme": @"com.paypal.ppclient.touch.v2", - @"applications": @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"], - }, - @{ - @"protocol": @"3", - @"target": @"browser", - @"scope": @[@"*"], - // Missing URL in scope for protocol version 3 - }, - ], - }, - }]; - - XCTAssertNotNil(configuration); - - XCTAssertNotNil(configuration.prioritizedOAuthRecipes); - XCTAssertEqual([configuration.prioritizedOAuthRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedOAuthRecipes[0] isKindOfClass:[PPOTConfigurationOAuthRecipe class]]); - - PPOTConfigurationOAuthRecipe *oauthRecipe = (PPOTConfigurationOAuthRecipe *)configuration.prioritizedOAuthRecipes[0]; - XCTAssertEqual(oauthRecipe.target, PPOTRequestTargetOnDeviceApplication); - XCTAssertEqualObjects(oauthRecipe.scope, [NSSet setWithObject:@"*"]); - XCTAssertEqualObjects(oauthRecipe.protocolVersion, @1); - XCTAssertEqualObjects(oauthRecipe.targetAppURLScheme, @"com.paypal.ppclient.touch.v2"); - NSArray *expectedTargetAppBundleIDs = @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"]; - XCTAssertEqualObjects(oauthRecipe.targetAppBundleIDs, expectedTargetAppBundleIDs); - - XCTAssertNotNil(configuration.prioritizedCheckoutRecipes); - XCTAssertEqual([configuration.prioritizedCheckoutRecipes count], (NSUInteger)1); - XCTAssert([configuration.prioritizedCheckoutRecipes[0] isKindOfClass:[PPOTConfigurationCheckoutRecipe class]]); - - PPOTConfigurationCheckoutRecipe *checkoutRecipe = (PPOTConfigurationCheckoutRecipe *)configuration.prioritizedCheckoutRecipes[0]; - XCTAssertEqual(checkoutRecipe.target, PPOTRequestTargetOnDeviceApplication); - XCTAssertEqualObjects(checkoutRecipe.protocolVersion, @3); - XCTAssertEqualObjects(checkoutRecipe.targetAppURLScheme, @"com.paypal.ppclient.touch.v3"); - expectedTargetAppBundleIDs = @[@"com.paypal.ppclient", @"com.yourcompany.ppclient"]; - XCTAssertEqualObjects(checkoutRecipe.targetAppBundleIDs, expectedTargetAppBundleIDs); -} - - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTEncryptionTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTEncryptionTest.m deleted file mode 100755 index 3a390fa9..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTEncryptionTest.m +++ /dev/null @@ -1,149 +0,0 @@ -// -// PPOTEncryptionTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import -#import "PPOTEncryptionHelper.h" -#import "PPOTJSONHelper.h" -#import "PPOTString.h" - -@interface PPOTEncryptionTest : XCTestCase - -@end - -@implementation PPOTEncryptionTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -+ (NSData *)randomData:(NSUInteger)length { - NSMutableData *randomKey = [NSMutableData dataWithLength:length]; - int error = SecRandomCopyBytes(kSecRandomDefault, length, [randomKey mutableBytes]); - return (error == 0) ? randomKey : nil; -} - -- (void)testEncryptionMultiple { - for (uint i=1; i<8*1024; i++) { - NSData *plainData = [[self class] randomData:i]; - NSData *key = [PPOTEncryptionHelper generate256BitKey]; - NSData *cipherData = [PPOTEncryptionHelper encryptAESCTRData:plainData encryptionKey:key]; - XCTAssertNotEqualObjects(plainData, cipherData); - - NSData *outData = [PPOTEncryptionHelper decryptAESCTRData:cipherData encryptionKey:key]; - XCTAssertEqualObjects(outData, plainData); - } -} - -- (void)testRandomKeyGenerator { - NSInteger numberOfKeys = 10; - NSMutableArray *array = [NSMutableArray arrayWithCapacity:numberOfKeys]; - for (NSInteger i = 0; i < numberOfKeys; i++) { - NSData *key = [PPOTEncryptionHelper generate256BitKey]; - XCTAssertTrue(key.length == 32); - XCTAssertNotNil(key); - XCTAssertFalse([array containsObject:key]); - [array addObject:key]; - } -} - -- (void)testHexFunction { - NSString *hexStringExpected = @"68656C6C6F"; - NSString *string = @"hello"; - NSString *hexString = [PPOTString hexStringFromData:[string dataUsingEncoding:NSUTF8StringEncoding]]; - XCTAssertEqualObjects(hexString, [hexStringExpected uppercaseString]); - - NSData *data = [PPOTString dataWithHexString:hexString]; - XCTAssertEqualObjects(data, [string dataUsingEncoding:NSUTF8StringEncoding]); -} - -- (void)testEncryption { - NSString *plainData = @"Trust me i am an Engineer !"; - NSData *key = [PPOTEncryptionHelper generate256BitKey]; - NSData *cipherData = [PPOTEncryptionHelper encryptAESCTRData:[plainData dataUsingEncoding:NSUTF8StringEncoding] encryptionKey:key]; - XCTAssertNotEqualObjects([plainData dataUsingEncoding:NSUTF8StringEncoding], cipherData); - - NSData *outData = [PPOTEncryptionHelper decryptAESCTRData:cipherData encryptionKey:key]; - NSString *expectedData = [[NSString alloc] initWithData:outData encoding:NSUTF8StringEncoding]; - XCTAssertEqualObjects(expectedData, plainData); -} - -- (void)testRealPayloadDecryption { - NSString *cipherText = @"WTn6Ww9s7KCwu3QUPVe05stH01hy4easqZeR71E7tXKIuEOMWxuara26u3VHACpRGHHxO3SSn+1WbCLRCwI6UCxbUkYl5eWN1TVpQ7a4FvDDkbhH7fSZz/DjENLo9Ap5w/EQ2PyrQt00fkxjf2HW/W2r/SI3GRL/KKu7rCRIjcEgr3RAsqTrDILOhx2ASo99YCSpzETlILqOF7p4bDGzwy5L8AeQcSgDIFqtvhzL6gbud2A90KpRIb5b+ftbf+RCRkW1NSEC/Vb+0MHyFNGJCnSOgz9t3cn/kuF+uQgozsAkTE+PmFSrBvtPag5AKQAgM44E"; - NSData *key = [PPOTString dataWithHexString:@"9b30e222b129c989547f1a6ab6022e2bd191a0217f2efcbf891f3eb07990582c"]; - NSString *message = @"{\"payment_code_type\":\"authcode\",\"payment_code\":\"XXXXX\",\"timestamp\":\"2015-01-16T19:20:30.45+01:00\",\"expires_in\":900,\"scope\":\"\",\"display_name\":\"mockDisplayName\",\"email\":\"mockemailaddress@mock.com\"}"; - - NSData *cipherData = [[NSData alloc] initWithBase64EncodedString:cipherText options:NSDataBase64DecodingIgnoreUnknownCharacters]; - NSData *plainData = [PPOTEncryptionHelper decryptAESCTRData:cipherData encryptionKey:key]; - // decode base64 - NSString *plainString = [[NSString alloc] initWithData:plainData encoding:NSUTF8StringEncoding]; - XCTAssertTrue(plainString); - XCTAssertEqualObjects(plainData, [message dataUsingEncoding:NSUTF8StringEncoding]); -} - - -- (void)testPublicKeyImport { - - // openssl req -x509 -out public_key2.crt -outform DER -new -newkey rsa:2048 -keyout private_key2.pem -keyform DER - - NSString *cert = @"MIIDOzCCAiOgAwIBAgIJAMlvCS4UtR7PMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhJbGxpbm9pczESMBAGA1UECgwJQnJhaW50cmVlMB4XDTE1MDMyMDAxMTcyMVoXDTE2MDMxOTAxMTcyMVowNDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRIwEAYDVQQKDAlCcmFpbnRyZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDfCRhOGeMj4ci5Bbbs/x0G+PkbeL7iGEsX5UWQeA8oCWU8jpipFTC271Q0f5BQzXCN8L4LnwGvtm2cgAEivSBODo7XHsmxrFjKdQx1S7FIuFRKO18Uf8rIGmZHiJfhCbUEGilpwMt7hUMjjv2XDufPCMrJ8Yn2y/yDi5nhs7UsFhROm9oI2PyiJX01yR2ag8cPBb5Ahlwmj1yMWmSuHVnUN8T0rjIXyrBhxTAk3omQkQdHKj2w8afdrAcNUGi4yU/a5/pmb8tZpAa73OZVdOEQepJAAIRWXeS2BdKTkhfRJc7WEIlbi+9a2OdtM3OkIs+rZE7+WVT8XQoiLxpUd/wNAgMBAAGjUDBOMB0GA1UdDgQWBBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAfBgNVHSMEGDAWgBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQARg2wjhJanhKu1bw63+Xfj25OUa02jK+i4vhkWeuCGd5/kxA1dZMjBfSMxh484xBpaqRIOHvZmRpKcxCgci8xRbbJiaXrb1vIePTTi4lfU6cpfsnjMFCHDk8E/0AxIfOpQ0BSJY35WqB45xaIWBAY8lQ2pNfiPyK4kzajSOg+kbEKLmA0udYy8tsydt+88+R88rYKt4qDBo+Z5zgJ2fZvbAp99cBASHqMCoUoPb96YWEhaWhjArVGzgevpopKA9aOAFdndPKLbe6y29bbfLfQqat0B1fVmutCIHGIXtsPHQDe/cXJtoJk7HmD08++C9YvjxlSi8jxLb5nIA0QGI0yj"; - - NSData *certData = [[NSData alloc] initWithBase64EncodedString:cert options:NSDataBase64DecodingIgnoreUnknownCharacters]; - - NSString *plainText = @"hello"; - NSData *cipherText = [PPOTEncryptionHelper encryptRSAData:[plainText dataUsingEncoding:NSUTF8StringEncoding] certificate:certData]; - XCTAssertTrue(cipherText); - NSString *base64 = [cipherText base64EncodedStringWithOptions:0]; - XCTAssertTrue(base64); -} - - -- (void)testPublicKeyEncryption { - - // openssl req -x509 -out public_key2.crt -outform DER -new -newkey rsa:2048 -keyout private_key2.pem -keyform DER - - NSString *cert = @"MIIDOzCCAiOgAwIBAgIJAMlvCS4UtR7PMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhJbGxpbm9pczESMBAGA1UECgwJQnJhaW50cmVlMB4XDTE1MDMyMDAxMTcyMVoXDTE2MDMxOTAxMTcyMVowNDELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRIwEAYDVQQKDAlCcmFpbnRyZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDfCRhOGeMj4ci5Bbbs/x0G+PkbeL7iGEsX5UWQeA8oCWU8jpipFTC271Q0f5BQzXCN8L4LnwGvtm2cgAEivSBODo7XHsmxrFjKdQx1S7FIuFRKO18Uf8rIGmZHiJfhCbUEGilpwMt7hUMjjv2XDufPCMrJ8Yn2y/yDi5nhs7UsFhROm9oI2PyiJX01yR2ag8cPBb5Ahlwmj1yMWmSuHVnUN8T0rjIXyrBhxTAk3omQkQdHKj2w8afdrAcNUGi4yU/a5/pmb8tZpAa73OZVdOEQepJAAIRWXeS2BdKTkhfRJc7WEIlbi+9a2OdtM3OkIs+rZE7+WVT8XQoiLxpUd/wNAgMBAAGjUDBOMB0GA1UdDgQWBBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAfBgNVHSMEGDAWgBQhbJ8DtuKFhGTsrvZ41Vw5jYbmazAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQARg2wjhJanhKu1bw63+Xfj25OUa02jK+i4vhkWeuCGd5/kxA1dZMjBfSMxh484xBpaqRIOHvZmRpKcxCgci8xRbbJiaXrb1vIePTTi4lfU6cpfsnjMFCHDk8E/0AxIfOpQ0BSJY35WqB45xaIWBAY8lQ2pNfiPyK4kzajSOg+kbEKLmA0udYy8tsydt+88+R88rYKt4qDBo+Z5zgJ2fZvbAp99cBASHqMCoUoPb96YWEhaWhjArVGzgevpopKA9aOAFdndPKLbe6y29bbfLfQqat0B1fVmutCIHGIXtsPHQDe/cXJtoJk7HmD08++C9YvjxlSi8jxLb5nIA0QGI0yj"; - - NSData *certData = [[NSData alloc] initWithBase64EncodedString:cert options:NSDataBase64DecodingIgnoreUnknownCharacters]; - - NSString *expectedCipher = @"ZgzjmDx5iD6ogzpiIB9bl2C08pscYQ+8gV8VbRbo2kZiNYj4WBh4rmMWnsADVpXj1JS0xq9HmuQhomm5KUewfEZRTNdk09hI1hWtU+cPucd4gwI7mmqzNUFbfPSMPtWTB2yFSDIiJ1K7XN0C1d5NnfbsI0rxUSxCpgP7S+ckEaWH4uqzV9NFIsplmj+4yBQokngk7j5fn9QcsSylKCBq7rp3Z1Wg/qA5tVPj9osZYwr29kot6onDtajJkl/7ZYxuRrQkqXi5QY2CPvN8A8WpEaMwy0EwZUAB7RZjBAHlKxDZXNRjgfzT+vpnwF+gzebP+k4H44/1wGecSuGYrU+l9Q=="; - - NSString *plainText = @"{\"sym_key\": \"9a51aed0da8fb363933efc0f739df5dfbcba34b2e1ea8337f6d5dc1cbd61ced4\", \"some\": \"other_stuff\"}"; - NSData *cipherText = [PPOTEncryptionHelper encryptRSAData:[plainText dataUsingEncoding:NSUTF8StringEncoding] certificate:certData]; - XCTAssertTrue(cipherText); - NSString *base64 = [cipherText base64EncodedStringWithOptions:0]; - XCTAssertTrue(base64); - XCTAssertNotEqualObjects(base64, expectedCipher); -} - -- (void)testAESCTREncryptionDecryption { - NSString *plainData = @"Trust me i am an Engineer !"; - NSData *key = [[self class] randomData:32]; - NSData *cipherData = [PPOTEncryptionHelper encryptAESCTRData:[plainData dataUsingEncoding:NSUTF8StringEncoding] encryptionKey:key]; - XCTAssertNotEqualObjects([plainData dataUsingEncoding:NSUTF8StringEncoding], cipherData, @"data shouldn't match"); - - NSData *outData = [PPOTEncryptionHelper decryptAESCTRData:cipherData encryptionKey:key]; - NSString *expectedData = [[NSString alloc] initWithData:outData encoding:NSUTF8StringEncoding]; - XCTAssertEqualObjects(expectedData, plainData, @"data should match"); -} - - -- (void)testPythonCTRDecryption { - NSData *cipherText = [[NSData alloc] initWithBase64EncodedString:@"O4ibtOnGreHg1UGcJen7OFOlT/qdBo/3h8Gvc1Jibgj31UGbH+G3ottYCuwHeyJXYX5ubtr8O1SXAoy3X4IEq6o1oPFMJRP8/D5PI0qhexBTXsEEJvuRDlEV/Rcl" options:NSDataBase64DecodingIgnoreUnknownCharacters]; - NSData *key = [PPOTString dataWithHexString:@"dc6d0e61c0a3cd187dd0e41f455effdac77c23c95c2cfcb81993916ab19c0e09"]; - NSData *outData = [PPOTEncryptionHelper decryptAESCTRData:cipherText encryptionKey:key]; - NSString *message = @"A really secret message. Not for prying eyes."; - XCTAssertEqualObjects([message dataUsingEncoding:NSUTF8StringEncoding], outData, @"message should be the same"); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTErrorTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTErrorTest.m deleted file mode 100755 index 1fb7ec8b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTErrorTest.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// PPOTErrorTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTError.h" - -@interface PPOTErrorTest : XCTestCase - -@end - -@implementation PPOTErrorTest - -- (void)testPPErrorWithErrorCode { - NSError *error = [PPOTError errorWithErrorCode:PPOTErrorCodeNoTargetAppFound]; - XCTAssertEqualObjects(error.domain, kPayPalOneTouchErrorDomain); - XCTAssertEqual(error.code, PPOTErrorCodeNoTargetAppFound); - XCTAssertEqualObjects(error.userInfo, [NSDictionary dictionary]); - -} - -- (void)testPPErrorWithErrorCodeAndUserInfo { - NSDictionary *dict = @{ @"k" : @"v"}; - NSError *error = [PPOTError errorWithErrorCode:PPOTErrorCodeNoTargetAppFound - userInfo:dict]; - XCTAssertEqualObjects(error.domain, kPayPalOneTouchErrorDomain); - XCTAssertEqual(error.code, PPOTErrorCodeNoTargetAppFound); - XCTAssertEqualObjects(error.userInfo, dict); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTTimeTest.m b/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTTimeTest.m deleted file mode 100755 index 2dc5ff8b..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/PayPalOneTouch/PPOTTimeTest.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// PPOTTimeTest.m -// PayPalOneTouch -// -// Copyright © 2015 PayPal, Inc. All rights reserved. -// - -#import -#import "PPOTTime.h" - -@interface PPOTTimeTest : XCTestCase - -@end - -@implementation PPOTTimeTest - -- (void)testRFC3339DateConversion { - NSDate *date = [NSDate date]; - NSString *dateAsString = [[PPOTTime rfc3339DateFormatter] stringFromDate:date]; - NSDate *dateFromRFC3339String = [PPOTTime dateFromRFC3339LikeString:dateAsString]; - // Within 1 millisecond - XCTAssertEqualWithAccuracy([date timeIntervalSince1970], [dateFromRFC3339String timeIntervalSince1970], 1); -} - -- (void)testRFC3339DateWithMillisecondConversion { - NSDate *date = [NSDate date]; - NSString *dateAsString = [[PPOTTime rfc3339DateFormatter] stringFromDate:date]; - NSString *dateAsStringWithMilliseconds = [NSString stringWithFormat:@"%@.123Z", - [dateAsString substringWithRange:NSMakeRange(0, [dateAsString length] - 1)]]; - NSDate *dateFromRFC3339LikeString = [PPOTTime dateFromRFC3339LikeString:dateAsStringWithMilliseconds]; - // Within 1 millisecond - XCTAssertEqualWithAccuracy([date timeIntervalSince1970], [dateFromRFC3339LikeString timeIntervalSince1970], 1); -} - -- (void)testRFC3339DateNil { - XCTAssertNil([PPOTTime dateFromRFC3339LikeString:nil]); -} - -- (void)testRFC3339DateIllegalString { - XCTAssertNil([PPOTTime dateFromRFC3339LikeString:@"random string"]); -} - -@end diff --git a/examples/braintree/ios/Frameworks/Braintree/UnitTests/UnitTests-Bridging-Header.h b/examples/braintree/ios/Frameworks/Braintree/UnitTests/UnitTests-Bridging-Header.h deleted file mode 100755 index cf690919..00000000 --- a/examples/braintree/ios/Frameworks/Braintree/UnitTests/UnitTests-Bridging-Header.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// - -#import "BraintreeCore.h" -#import "BraintreeCard.h" -#import "BraintreeApplePay.h" -#import "BraintreePayPal.h" -#import "BraintreeVenmo.h" -#import "Braintree3DSecure.h" -#import "BraintreeDataCollector.h" -#import "BraintreeUI.h" -#import "PayPalOneTouch.h" - -// Internal headers for testing -#import "BTAPIClient_Internal.h" -#import "BTApplePayClient_Internal.h" -#import "BTCard_Internal.h" -#import "BTCardClient_Internal.h" -#import "BTCardClient+UnionPay.h" -#import "BTConfiguration.h" -#import "BTDataCollector_Internal.h" -#import "BTPayPalDriver_Internal.h" -#import "BTVenmoDriver_Internal.h" -#import "BTThreeDSecureDriver_Internal.h" -#import "BTThreeDSecureAuthenticationViewController.h" -#import "BTURLUtils.h" -#import "FakePayPalClasses.h" -#import "BTLogger_Internal.h" -#import "BTFakeHTTP.h" -#import "BTDropInViewController_Internal.h" -#import "BTPaymentButton_Internal.h" -#import "BTThreeDSecureLookupResult.h" -#import "Braintree-Version.h" -#import "PPDataCollector_Internal.h" -#import "BTDropInUtil.h" - -#import "BTSpecHelper.h" -#import -#import "BTTestClientTokenFactory.h" diff --git a/examples/braintree/ios/Frameworks/Braintree/screenshot.png b/examples/braintree/ios/Frameworks/Braintree/screenshot.png deleted file mode 100755 index 4b8c014c..00000000 Binary files a/examples/braintree/ios/Frameworks/Braintree/screenshot.png and /dev/null differ diff --git a/examples/native/ios/ReactNativePaymentsExampleTests/Info.plist b/examples/native/ios/ReactNativePaymentsExampleTests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/examples/native/ios/ReactNativePaymentsExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/examples/stripe/ios/StripeExample/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/stripe/ios/StripeExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7..00000000 --- a/examples/stripe/ios/StripeExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/lerna.json b/lerna.json new file mode 100644 index 00000000..5ca17bcb --- /dev/null +++ b/lerna.json @@ -0,0 +1,9 @@ +{ + "lerna": "2.0.0", + "packages": [ + "packages/*", + "packages/react-native-payments/examples/*" + ], + "version": "0.0.0", + "npmClient": "yarn" +} diff --git a/package.json b/package.json index 79626a43..1d4fd2cf 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,11 @@ { - "name": "react-native-payments", - "version": "0.1.2", "scripts": { - "precommit": "lint-staged", - "run:packager": "cd examples/native && yarn run:packager", - "run:ios": "cd examples/native && yarn run:ios", - "run:web": "cd examples/web && yarn run:web", - "run:demo": "cd examples/native && yarn run:demo", - "test": "jest" - }, - "dependencies": { - "es6-error": "^4.0.2", - "uuid": "^3.1.0", - "validator": "^7.0.0" + "precommit": "lint-staged" }, "devDependencies": { - "babel-jest": "20.0.3", - "babel-preset-react-native": "2.0.0", - "husky": "^0.14.1", - "jest": "20.0.4", + "lerna": "^2.0.0", "lint-staged": "^4.0.0", - "prettier": "^1.4.4", - "react-test-renderer": "16.0.0-alpha.12" - }, - "peerDependencies": { - "react": "~15.4.0-rc.4", - "react-native": "0.41.0" - }, - "jest": { - "testPathIgnorePatterns": [ - "/node_modules/", - "/examples/", - "lib/js/__tests__" - ] + "prettier": "^1.4.4" }, "lint-staged": { "*.js": [ diff --git a/packages/react-native-payments-addon-braintree/.gitignore b/packages/react-native-payments-addon-braintree/.gitignore new file mode 100644 index 00000000..6af85588 --- /dev/null +++ b/packages/react-native-payments-addon-braintree/.gitignore @@ -0,0 +1 @@ +/Carthage diff --git a/examples/common/config/index.js b/packages/react-native-payments-addon-braintree/.npmignore similarity index 100% rename from examples/common/config/index.js rename to packages/react-native-payments-addon-braintree/.npmignore diff --git a/packages/react-native-payments-addon-braintree/Cartfile b/packages/react-native-payments-addon-braintree/Cartfile new file mode 100644 index 00000000..4c31ff59 --- /dev/null +++ b/packages/react-native-payments-addon-braintree/Cartfile @@ -0,0 +1 @@ +github "braintree/braintree_ios" == 4.8.4 diff --git a/packages/react-native-payments-addon-braintree/Cartfile.resolved b/packages/react-native-payments-addon-braintree/Cartfile.resolved new file mode 100644 index 00000000..f40b2db0 --- /dev/null +++ b/packages/react-native-payments-addon-braintree/Cartfile.resolved @@ -0,0 +1 @@ +github "braintree/braintree_ios" "4.8.4" diff --git a/packages/react-native-payments-addon-braintree/README.md b/packages/react-native-payments-addon-braintree/README.md new file mode 100644 index 00000000..3d58d89e --- /dev/null +++ b/packages/react-native-payments-addon-braintree/README.md @@ -0,0 +1,48 @@ +# react-native-payments-addon-braintree +React Native Payments add-on for processing payments with Braintree. + +## Installation +First, download the package: + +```bash +$ yarn add react-native-payments-addon-braintree +``` + +Second, install the [React Native Payments CLI](https://www.npmjs.com/package/react-native-payments-cli): +```bash +$ yarn add react-native-payments-cli +``` + +Lastly, link the native dependencies with the React Native Payments CLI: +```bash +$ yarn react-native-payments-cli -- link braintree +``` + +_NOTE: `react-native-payments-cli` adds a Build Phase Script to your Xcode project that depends on Carthage._ + +## Usage +In order to receive chargeable Braintree tokens as part of your `PaymentResponse`, you'll need to add some Braintree specific parameters to your `PaymentMethodData`. + +Here's an example of a Braintree enabled Payment Method Data: + +```diff +const METHOD_DATA = [{ + supportedMethods: ['apple-pay'], + data: { + merchantIdentifier: 'merchant.com.your-app.namespace', + supportedNetworks: ['visa', 'mastercard', 'amex'], + countryCode: 'US', + currencyCode: 'USD', ++ paymentMethodTokenizationParameters: { ++ parameters: { ++ gateway: 'braintree', ++ 'braintree:tokenizationKey': 'your_tokenization_key' ++ } ++ } + } +}]; +``` + +## Resources +- [Creating an Apple Pay Certificate](https://developers.braintreepayments.com/guides/apple-pay/configuration/ios/v4#apple-pay-certificate-request-and-provisioning) +- [Obtaining a Tokentization Key](https://developers.braintreepayments.com/guides/authorization/tokenization-key/ios/v4#obtaining-a-tokenization-key) \ No newline at end of file diff --git a/packages/react-native-payments-addon-braintree/package.json b/packages/react-native-payments-addon-braintree/package.json new file mode 100644 index 00000000..945fd458 --- /dev/null +++ b/packages/react-native-payments-addon-braintree/package.json @@ -0,0 +1,23 @@ +{ + "name": "react-native-payments-addon-braintree", + "version": "4.8.4-1", + "description": "React Native Payments add-on for processing payments with Braintree.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "prepublish": "carthage update --platform ios" + }, + "repository": "https://github.com/naoufal/react-native-payments/tree/master/packages/react-native-payments-addon-braintree", + "keywords": [ + "react", + "react-native", + "react-native-payments", + "payments", + "braintree" + ], + "author": "Naoufal Kadhom", + "license": "MIT", + "reactNativePaymentsAddonConfig": { + "frameworks": ["BraintreeCore", "BraintreeApplePay"] + } +} diff --git a/packages/react-native-payments-addon-stripe/.gitignore b/packages/react-native-payments-addon-stripe/.gitignore new file mode 100644 index 00000000..6af85588 --- /dev/null +++ b/packages/react-native-payments-addon-stripe/.gitignore @@ -0,0 +1 @@ +/Carthage diff --git a/packages/react-native-payments-addon-stripe/Cartfile b/packages/react-native-payments-addon-stripe/Cartfile new file mode 100644 index 00000000..74ea5d67 --- /dev/null +++ b/packages/react-native-payments-addon-stripe/Cartfile @@ -0,0 +1 @@ +github "stripe/stripe-ios" == 11.1.0 diff --git a/packages/react-native-payments-addon-stripe/Cartfile.resolved b/packages/react-native-payments-addon-stripe/Cartfile.resolved new file mode 100644 index 00000000..50eb84fa --- /dev/null +++ b/packages/react-native-payments-addon-stripe/Cartfile.resolved @@ -0,0 +1 @@ +github "stripe/stripe-ios" "v11.1.0" diff --git a/packages/react-native-payments-addon-stripe/README.md b/packages/react-native-payments-addon-stripe/README.md new file mode 100644 index 00000000..bff61c63 --- /dev/null +++ b/packages/react-native-payments-addon-stripe/README.md @@ -0,0 +1,48 @@ +# react-native-payments-addon-stripe +React Native Payments add-on for processing payments with Stripe. + +## Installation +First, download the package: + +```bash +$ yarn add react-native-payments-addon-stripe +``` + +Second, install the [React Native Payments CLI](https://www.npmjs.com/package/react-native-payments-cli): +```bash +$ yarn add react-native-payments-cli +``` + +Lastly, link the native dependencies with the React Native Payments CLI: +```bash +$ yarn react-native-payments-cli -- link stripe +``` + +_NOTE: `react-native-payments-cli` adds a Build Phase Script to your Xcode project that depends on Carthage._ + +## Usage +In order to receive chargeable Stripe tokens as part of your `PaymentResponse`, you'll need to add some Stripe specific parameters to your `PaymentMethodData`. + +Here's an example of a Stripe enabled Payment Method Data: + +```diff +const METHOD_DATA = [{ + supportedMethods: ['apple-pay'], + data: { + merchantIdentifier: 'merchant.com.your-app.namespace', + supportedNetworks: ['visa', 'mastercard', 'amex'], + countryCode: 'US', + currencyCode: 'USD', ++ paymentMethodTokenizationParameters: { ++ parameters: { ++ gateway: 'stripe', ++ 'stripe:publishableKey': 'your_publishable_key' ++ } ++ } + } +}]; +``` + +## Resources +- [Creating an Apple Pay Certificate](https://stripe.com/docs/apple-pay/apps#csr) +- [About Publishable Keys](https://stripe.com/docs/dashboard#api-keys) \ No newline at end of file diff --git a/packages/react-native-payments-addon-stripe/package.json b/packages/react-native-payments-addon-stripe/package.json new file mode 100644 index 00000000..f1775d3d --- /dev/null +++ b/packages/react-native-payments-addon-stripe/package.json @@ -0,0 +1,23 @@ +{ + "name": "react-native-payments-addon-stripe", + "version": "11.1.0-1", + "description": "React Native Payments add-on for processing payments with Stripe.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "prepublish": "carthage update --platform ios" + }, + "repository": "https://github.com/naoufal/react-native-payments/tree/master/packages/react-native-payments-addon-stripe", + "keywords": [ + "react", + "react-native", + "react-native-payments", + "payments", + "stripe" + ], + "author": "Naoufal Kadhom", + "license": "MIT", + "reactNativePaymentsAddonConfig": { + "frameworks": ["Stripe"] + } +} diff --git a/packages/react-native-payments-cli/.npmignore b/packages/react-native-payments-cli/.npmignore new file mode 100644 index 00000000..b66d03a6 --- /dev/null +++ b/packages/react-native-payments-cli/.npmignore @@ -0,0 +1 @@ +ios/ diff --git a/packages/react-native-payments-cli/README.md b/packages/react-native-payments-cli/README.md new file mode 100644 index 00000000..33632d40 --- /dev/null +++ b/packages/react-native-payments-cli/README.md @@ -0,0 +1,32 @@ +# react-native-payments-cli + +## Installation +First, install [Carthage](https://github.com/Carthage/Carthage) (if you don't already have it installed): + +```bash +$ brew install carthage +``` + +Second, install the package: + +```bash +$ yarn add react-native-payments-cli +``` + +## Commands +### list +Outputs a list of installed add-ons that can be linked. + +#### Example +```bash +$ react-native-payments-cli list +``` +--- + +### link +Links an add-ons native dependencies to your project. + +#### Example +```bash +$ react-native-payments-cli link stripe +``` diff --git a/packages/react-native-payments-cli/index.js b/packages/react-native-payments-cli/index.js new file mode 100755 index 00000000..bab02c34 --- /dev/null +++ b/packages/react-native-payments-cli/index.js @@ -0,0 +1,225 @@ +#!/usr/bin/env node +'use strict'; + +const path = require('path'); +const fs = require('fs'); +const meow = require('meow'); +const chalk = require('chalk'); +const inquirer = require('inquirer'); +const Table = require('cli-table'); +const { log } = console; + +const { setupAddon } = require('./lib/commands'); + +const cli = meow(` + Usage: react-native-payments [command] + + Commands: + + link links an add-ons native dependencies to your project + list lists all available add-ons + \n +`); + +function convertAddOnToPackageName(addon = '') { + const RNP_ADDON_PREFIX = 'react-native-payments-addon'; + + return addon.startsWith(RNP_ADDON_PREFIX) + ? addon + : `${RNP_ADDON_PREFIX}-${addon}`; +} + +function getRNPProjectPath() { + return path.resolve(__dirname, '../react-native-payments/lib/ios/ReactNativePayments.xcodeproj/project.pbxproj'); +} + +function getUserProjectPath(relativeIOSPath) { + const iosPath = path.resolve(__dirname, `../../${relativeIOSPath}`) + let userProjectPath; + if (fs.existsSync(iosPath)) { + const projectFileName = fs.readdirSync(`${iosPath}`).find( + fileName => fileName.endsWith('.xcodeproj') + ); + + userProjectPath = `${iosPath}/${projectFileName}`; + } + + return userProjectPath; +} + +function removeLeadingSlash(input = '') { + return input.startsWith('/') + ? input.slice(1) + : input; +} + +function buildQuestions(maybeUserProject) { + let questions = [{ + name: 'userProjectPath', + type: 'input', + message: 'What is the relative path to your ios directory?', + when: ({ isUserPath }) => !isUserPath, + validate: (input) => { + return getUserProjectPath(removeLeadingSlash(input)) ? true : false; + } + }]; + + if (maybeUserProject) { + questions.unshift({ + name: 'isUserPath', + type: 'confirm', + message: `Is this the path to your Xcode project "${maybeUserProject}"?` + }); + } + + return questions; +} + +function interactiveGetUserProjectPath(maybeUserProject) { + // /project.pbxproj + return inquirer.prompt(buildQuestions(maybeUserProject)) + .then(({ isUserPath, userProjectPath }) => { + return isUserPath + ? `${maybeUserProject}/project.pbxproj` + : `${getUserProjectPath(removeLeadingSlash(userProjectPath))}/project.pbxproj`; + }) + .catch(e => { + console.log(e.stack); + }); +} + +function getPackagePath(packageName) { + return path.resolve(__dirname, `../${packageName}/package.json`); +} +function getPackageConfig(packageName) { + const config = require(getPackagePath(packageName)); + + return config; +} + +function isValidAddon(addon) { + if (!addon) { + log(chalk.yellow(` + You need to pass an option with this command. + + For example, "react-native-payments link stripe". + `)); + + return false; + } + + if (addon === true) { + log(chalk.yellow(` + You need to pass a valid option with this command. + + To see the full list of addons, go to https://goo.gl/ZC7jgf. + `)); + + return false; + } + + return true; +} + +function isPackageInstalled(packageName) { + const packageExists = fs.existsSync(getPackagePath(packageName)); + + if (!packageExists) { + log(chalk.yellow(` + "${packageName}" is not installed. Install it with "npm" or "yarn" and try again. + + To see the full list of addons, go to https://goo.gl/ZC7jgf. + `)); + + return false; + } + + return true; +} + +function link(addon) { + // Check if `addon` flag exists + if (!isValidAddon(addon)) { + return; + } + + // Check if `react-native-payments` is installed + if (!isPackageInstalled('react-native-payments')) { + return; + }; + + // Check if `addon` is installed + const packageName = convertAddOnToPackageName(addon); + if (!isPackageInstalled(packageName)) { + return; + } + + const packageConfig = getPackageConfig(packageName); + + const rnpProjectPath = getRNPProjectPath(); + return (interactiveGetUserProjectPath(getUserProjectPath('ios'))) + .then(userProjectPath => { + setupAddon( + userProjectPath, + rnpProjectPath, + packageConfig + ); + }) + .then(() => { + log(chalk.green(` + ✅ Successfully linked "${addon}". + `)); + }) + .catch(() => { + log(chalk.red(` + ⛔️ Something went wrong, could not link "${addon}". + `)); + }); +} + +function unlink(addon) { + if (!isValidAddon(addon)) { + return; + } +} + +function list() { + const availableAddons = fs.readdirSync(path.resolve(__dirname, '..')) + .filter(packageName => packageName.startsWith('react-native-payments-addon')); + + if (availableAddons.length === 0) { + log(chalk.yellow(` + No addons are available for linking. + + You can install addons with "npm" or "yarn". To see the full list of addons, go to https://goo.gl/ZC7jgf. + `)); + return; + } + + const addonsTable = new Table({ + head: ['name', 'package'], + style: { head: [] } + }); + + availableAddons.forEach(name => { + addonsTable.push([name.replace('react-native-payments-addon-', ''), name]); + }); + + log('\n' + addonsTable.toString()); + return; +} + +function main(input, addon){ + switch (input) { + case 'link': + return link(addon); + // case 'unlink': + // return unlink(addon); + case 'list': + return list(); + default: + return; + } +} + +main(cli.input[0], cli.input[1]); diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.pbxproj b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.pbxproj new file mode 100644 index 00000000..1eab52db --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.pbxproj @@ -0,0 +1,321 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + AD1980401F210B7E0070AFE8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AD19803F1F210B7E0070AFE8 /* main.m */; }; + AD1980431F210B7E0070AFE8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AD1980421F210B7E0070AFE8 /* AppDelegate.m */; }; + AD1980461F210B7E0070AFE8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD1980451F210B7E0070AFE8 /* ViewController.m */; }; + AD1980491F210B7E0070AFE8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD1980471F210B7E0070AFE8 /* Main.storyboard */; }; + AD19804B1F210B7E0070AFE8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD19804A1F210B7E0070AFE8 /* Assets.xcassets */; }; + AD19804E1F210B7E0070AFE8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD19804C1F210B7E0070AFE8 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AD19803B1F210B7E0070AFE8 /* RNPCLIProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNPCLIProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AD19803F1F210B7E0070AFE8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + AD1980411F210B7E0070AFE8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + AD1980421F210B7E0070AFE8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + AD1980441F210B7E0070AFE8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + AD1980451F210B7E0070AFE8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + AD1980481F210B7E0070AFE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AD19804A1F210B7E0070AFE8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AD19804D1F210B7E0070AFE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AD19804F1F210B7E0070AFE8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AD1980381F210B7E0070AFE8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AD1980321F210B7E0070AFE8 = { + isa = PBXGroup; + children = ( + AD19803D1F210B7E0070AFE8 /* RNPCLIProject */, + AD19803C1F210B7E0070AFE8 /* Products */, + ); + sourceTree = ""; + }; + AD19803C1F210B7E0070AFE8 /* Products */ = { + isa = PBXGroup; + children = ( + AD19803B1F210B7E0070AFE8 /* RNPCLIProject.app */, + ); + name = Products; + sourceTree = ""; + }; + AD19803D1F210B7E0070AFE8 /* RNPCLIProject */ = { + isa = PBXGroup; + children = ( + AD1980411F210B7E0070AFE8 /* AppDelegate.h */, + AD1980421F210B7E0070AFE8 /* AppDelegate.m */, + AD1980441F210B7E0070AFE8 /* ViewController.h */, + AD1980451F210B7E0070AFE8 /* ViewController.m */, + AD1980471F210B7E0070AFE8 /* Main.storyboard */, + AD19804A1F210B7E0070AFE8 /* Assets.xcassets */, + AD19804C1F210B7E0070AFE8 /* LaunchScreen.storyboard */, + AD19804F1F210B7E0070AFE8 /* Info.plist */, + AD19803E1F210B7E0070AFE8 /* Supporting Files */, + ); + path = RNPCLIProject; + sourceTree = ""; + }; + AD19803E1F210B7E0070AFE8 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + AD19803F1F210B7E0070AFE8 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AD19803A1F210B7E0070AFE8 /* RNPCLIProject */ = { + isa = PBXNativeTarget; + buildConfigurationList = AD1980521F210B7E0070AFE8 /* Build configuration list for PBXNativeTarget "RNPCLIProject" */; + buildPhases = ( + AD1980371F210B7E0070AFE8 /* Sources */, + AD1980381F210B7E0070AFE8 /* Frameworks */, + AD1980391F210B7E0070AFE8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RNPCLIProject; + productName = RNPCLIProject; + productReference = AD19803B1F210B7E0070AFE8 /* RNPCLIProject.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AD1980331F210B7E0070AFE8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Naoufal Kadhom"; + TargetAttributes = { + AD19803A1F210B7E0070AFE8 = { + CreatedOnToolsVersion = 8.3.3; + DevelopmentTeam = 9P2TV6375M; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = AD1980361F210B7E0070AFE8 /* Build configuration list for PBXProject "RNPCLIProject" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AD1980321F210B7E0070AFE8; + productRefGroup = AD19803C1F210B7E0070AFE8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AD19803A1F210B7E0070AFE8 /* RNPCLIProject */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AD1980391F210B7E0070AFE8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AD19804E1F210B7E0070AFE8 /* LaunchScreen.storyboard in Resources */, + AD19804B1F210B7E0070AFE8 /* Assets.xcassets in Resources */, + AD1980491F210B7E0070AFE8 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AD1980371F210B7E0070AFE8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AD1980461F210B7E0070AFE8 /* ViewController.m in Sources */, + AD1980431F210B7E0070AFE8 /* AppDelegate.m in Sources */, + AD1980401F210B7E0070AFE8 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AD1980471F210B7E0070AFE8 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AD1980481F210B7E0070AFE8 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AD19804C1F210B7E0070AFE8 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AD19804D1F210B7E0070AFE8 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AD1980501F210B7E0070AFE8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AD1980511F210B7E0070AFE8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AD1980531F210B7E0070AFE8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = 9P2TV6375M; + INFOPLIST_FILE = RNPCLIProject/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.naoufal.RNPCLIProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + AD1980541F210B7E0070AFE8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = 9P2TV6375M; + INFOPLIST_FILE = RNPCLIProject/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.naoufal.RNPCLIProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AD1980361F210B7E0070AFE8 /* Build configuration list for PBXProject "RNPCLIProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AD1980501F210B7E0070AFE8 /* Debug */, + AD1980511F210B7E0070AFE8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AD1980521F210B7E0070AFE8 /* Build configuration list for PBXNativeTarget "RNPCLIProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AD1980531F210B7E0070AFE8 /* Debug */, + AD1980541F210B7E0070AFE8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = AD1980331F210B7E0070AFE8 /* Project object */; +} diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..f0507831 --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/xcuserdata/naoufal.xcuserdatad/UserInterfaceState.xcuserstate b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/xcuserdata/naoufal.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..6ee9134a Binary files /dev/null and b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/project.xcworkspace/xcuserdata/naoufal.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/xcshareddata/xcschemes/CarthageTest.xcscheme b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/RNPCLIProject.xcscheme old mode 100755 new mode 100644 similarity index 73% rename from examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/xcshareddata/xcschemes/CarthageTest.xcscheme rename to packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/RNPCLIProject.xcscheme index fad657d1..1ffec594 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest.xcodeproj/xcshareddata/xcschemes/CarthageTest.xcscheme +++ b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/RNPCLIProject.xcscheme @@ -14,10 +14,10 @@ buildForAnalyzing = "YES"> + BlueprintIdentifier = "AD19803A1F210B7E0070AFE8" + BuildableName = "RNPCLIProject.app" + BlueprintName = "RNPCLIProject" + ReferencedContainer = "container:RNPCLIProject.xcodeproj"> @@ -32,10 +32,10 @@ + BlueprintIdentifier = "AD19803A1F210B7E0070AFE8" + BuildableName = "RNPCLIProject.app" + BlueprintName = "RNPCLIProject" + ReferencedContainer = "container:RNPCLIProject.xcodeproj"> @@ -55,10 +55,10 @@ runnableDebuggingMode = "0"> + BlueprintIdentifier = "AD19803A1F210B7E0070AFE8" + BuildableName = "RNPCLIProject.app" + BlueprintName = "RNPCLIProject" + ReferencedContainer = "container:RNPCLIProject.xcodeproj"> @@ -74,10 +74,10 @@ runnableDebuggingMode = "0"> + BlueprintIdentifier = "AD19803A1F210B7E0070AFE8" + BuildableName = "RNPCLIProject.app" + BlueprintName = "RNPCLIProject" + ReferencedContainer = "container:RNPCLIProject.xcodeproj"> diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/xcschememanagement.plist b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..9307c5a5 --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject.xcodeproj/xcuserdata/naoufal.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + RNPCLIProject.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + AD19803A1F210B7E0070AFE8 + + primary + + + + + diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.h b/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.h new file mode 100644 index 00000000..37ea4024 --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// RNPCLIProject +// +// Created by Naoufal Kadhom on 7/20/17. +// Copyright © 2017 Naoufal Kadhom. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.m b/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.m new file mode 100644 index 00000000..405a5aa0 --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// RNPCLIProject +// +// Created by Naoufal Kadhom on 7/20/17. +// Copyright © 2017 Naoufal Kadhom. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/react-native-payments-cli/ios/RNPCLIProject/Assets.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 similarity index 56% rename from examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/Contents.json rename to packages/react-native-payments-cli/ios/RNPCLIProject/Assets.xcassets/AppIcon.appiconset/Contents.json index bc226ef9..36d2c80d --- a/examples/braintree/ios/Frameworks/Braintree/Demo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,15 +1,5 @@ { "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, { "idiom" : "iphone", "size" : "29x29", @@ -21,9 +11,8 @@ "scale" : "3x" }, { - "size" : "40x40", "idiom" : "iphone", - "filename" : "120 - iPhone App Icon-spotlight.png", + "size" : "40x40", "scale" : "2x" }, { @@ -32,9 +21,8 @@ "scale" : "3x" }, { - "size" : "60x60", "idiom" : "iphone", - "filename" : "120 - iPhone App Icon@2x.png", + "size" : "60x60", "scale" : "2x" }, { @@ -42,16 +30,6 @@ "size" : "60x60", "scale" : "3x" }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, { "idiom" : "ipad", "size" : "29x29", @@ -63,33 +41,23 @@ "scale" : "2x" }, { - "size" : "40x40", "idiom" : "ipad", - "filename" : "120 - iPhone App Icon-ipad-spotlight@1x.png", + "size" : "40x40", "scale" : "1x" }, { - "size" : "40x40", "idiom" : "ipad", - "filename" : "120 - iPhone App Icon-ipad-spotlight@2x.png", + "size" : "40x40", "scale" : "2x" }, { - "size" : "76x76", "idiom" : "ipad", - "filename" : "120 - iPhone App Icon-ipad@1x.png", - "scale" : "1x" - }, - { "size" : "76x76", - "idiom" : "ipad", - "filename" : "120 - iPhone App Icon-ipad@2x.png", - "scale" : "2x" + "scale" : "1x" }, { - "size" : "83.5x83.5", "idiom" : "ipad", - "filename" : "120 - iPhone Pro App Icon-ipad@2x.png", + "size" : "76x76", "scale" : "2x" } ], diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/LaunchScreen.storyboard b/packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/LaunchScreen.storyboard old mode 100755 new mode 100644 similarity index 70% rename from examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/LaunchScreen.storyboard rename to packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/LaunchScreen.storyboard index 2e721e18..fdf3f97d --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/LaunchScreen.storyboard +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -13,10 +14,9 @@ - + - - + diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/Main.storyboard b/packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/Main.storyboard old mode 100755 new mode 100644 similarity index 66% rename from examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/Main.storyboard rename to packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/Main.storyboard index 3a2a49ba..4529698c --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Base.lproj/Main.storyboard +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/Base.lproj/Main.storyboard @@ -1,21 +1,22 @@ - + - + + - + - + - + diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Info.plist b/packages/react-native-payments-cli/ios/RNPCLIProject/Info.plist old mode 100755 new mode 100644 similarity index 79% rename from examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Info.plist rename to packages/react-native-payments-cli/ios/RNPCLIProject/Info.plist index 6905cc67..d0524738 --- a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Info.plist +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/Info.plist @@ -16,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS @@ -36,5 +34,12 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.h b/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.h new file mode 100644 index 00000000..3a435dee --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// RNPCLIProject +// +// Created by Naoufal Kadhom on 7/20/17. +// Copyright © 2017 Naoufal Kadhom. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.m b/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.m new file mode 100644 index 00000000..cac5b18e --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/ViewController.m @@ -0,0 +1,29 @@ +// +// ViewController.m +// RNPCLIProject +// +// Created by Naoufal Kadhom on 7/20/17. +// Copyright © 2017 Naoufal Kadhom. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/packages/react-native-payments-cli/ios/RNPCLIProject/main.m b/packages/react-native-payments-cli/ios/RNPCLIProject/main.m new file mode 100644 index 00000000..230a6887 --- /dev/null +++ b/packages/react-native-payments-cli/ios/RNPCLIProject/main.m @@ -0,0 +1,16 @@ +// +// main.m +// RNPCLIProject +// +// Created by Naoufal Kadhom on 7/20/17. +// Copyright © 2017 Naoufal Kadhom. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/packages/react-native-payments-cli/lib/commands.js b/packages/react-native-payments-cli/lib/commands.js new file mode 100644 index 00000000..ae679bd3 --- /dev/null +++ b/packages/react-native-payments-cli/lib/commands.js @@ -0,0 +1,79 @@ +const Promise = require('bluebird'); +const fs = require('fs'); +const path = require('path'); +const xcode = require('xcode'); +const pbxFile = require('xcode/lib/pbxFile'); + +const { addFrameworkSearchPaths, addFrameworks, addCarthageRunScriptPhase } = require('./helpers'); + +function setupAddon(projectPath, rnpPath, addOnConfig) { + const addOnName = addOnConfig.name; + const addOnFrameworks = addOnConfig.reactNativePaymentsAddonConfig.frameworks; + + Promise.all([ + addToProject(projectPath, addOnName, addOnFrameworks), + addToRNP(rnpPath, addOnName) + ]) + .catch(e => { + throw new Error('Error setting up Stripe', e); + }) +} + +function addToProject(projectPath, addOnName, addOnFrameworks) { + const project = xcode.project(projectPath); + project.parseAsync = Promise.promisify(project.parse); + + return project.parseAsync(() => { + // Add Framework Search Paths + addFrameworkSearchPaths( + project, + [`"$(SRCROOT)/../node_modules/${addOnName}/Carthage/Build/iOS/"`] + ); + + // Add and link Framework + const frameworksWithExtension = addOnFrameworks.map(name => `${name}.framework`); + addFrameworks( + project, + path.resolve(__dirname, `../../${addOnName}/Carthage/Build/iOS`), + frameworksWithExtension + ); + + // Add Run Script Phase + const inputPaths = frameworksWithExtension.map( + frameworkFile => `"$(SRCROOT)/../node_modules/${addOnName}/Carthage/Build/iOS/${frameworkFile}"` + ); + const outputPaths = frameworksWithExtension.map( + frameworkFile => `"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/${frameworkFile}"` + ); + addCarthageRunScriptPhase( + project, + inputPaths, + outputPaths + ); + + fs.writeFileSync( + projectPath, + project.writeSync() + ); + }); +} + +function addToRNP(projectPath, addOnName) { + const project = xcode.project(projectPath); + project.parseAsync = Promise.promisify(project.parse); + + return project.parseAsync(() => { + // Add Framework Search Paths + addFrameworkSearchPaths( + project, + [`"$(SRCROOT)/../../../${addOnName}/Carthage/Build/iOS/"`] + ); + + fs.writeFileSync( + projectPath, + project.writeSync() + ); + }); +} + +module.exports = { setupAddon }; diff --git a/packages/react-native-payments-cli/lib/helpers.js b/packages/react-native-payments-cli/lib/helpers.js new file mode 100644 index 00000000..7af4552a --- /dev/null +++ b/packages/react-native-payments-cli/lib/helpers.js @@ -0,0 +1,104 @@ +function filterOutCommentKeys(key) { + return !key.endsWith('_comment'); +} + +function addFrameworks(project, frameworkDirPath, frameworkFileNames = []) { + // Add frameworks pbx + project.addPbxGroup( + [], + 'Frameworks', + frameworkDirPath + ); + + + frameworkFileNames.forEach(frameworkFileName => { + project.addFramework(`${frameworkDirPath}/${frameworkFileName}`) + }); +} + +function addPathsToBuildScriptPhase(project, buildPhaseName, inputPaths, outputPaths) { + const buildScriptPhases = project.hash.project.objects['PBXShellScriptBuildPhase'] || {}; + + Object.keys(buildScriptPhases) + .forEach(buildPhaseKey => { + const buildScriptPhase = buildScriptPhases[buildPhaseKey]; + if (buildScriptPhase.name === `"${buildPhaseName}"`) { + const newInputPaths = inputPaths + .filter(inputPath => !buildScriptPhase.inputPaths.includes(inputPath)) + const newOutputPaths = outputPaths + .filter(outputPath => !buildScriptPhase.outputPaths.includes(outputPath)) + + buildScriptPhase.inputPaths = [...buildScriptPhase.inputPaths, ...newInputPaths]; + buildScriptPhase.outputPaths = [...buildScriptPhase.outputPaths, ...newOutputPaths]; + } + }); +} + +function buildScriptPhaseExists(project, name) { + const buildScriptPhases = project.hash.project.objects['PBXShellScriptBuildPhase'] || {}; + + return Object.keys(buildScriptPhases) + .reduce((acc, buildScriptPhaseKey) => { + if (!acc) { + return buildScriptPhases[buildScriptPhaseKey].name === `"${name}"` + } + + return acc; + }, false); +} + +function addCarthageRunScriptPhase(project, inputPaths, outputPaths) { + const buildPhaseName = 'Copy Carthage Frameworks (Generated by react-native-payments-cli)'; + const buildScriptPhases = project.hash.project.objects['PBXShellScriptBuildPhase'] || {}; + + if (buildScriptPhaseExists(project, buildPhaseName)) { + addPathsToBuildScriptPhase(project, buildPhaseName, inputPaths, outputPaths); + return; + } + + project.addBuildPhase( + [], + 'PBXShellScriptBuildPhase', + buildPhaseName, + undefined, + { + shellPath: '/bin/sh', + shellScript: '/usr/local/bin/carthage copy-frameworks', + inputPaths, + outputPaths + } + ); +} + +function addFrameworkSearchPaths(project, filePaths) { + const config = project.pbxXCBuildConfigurationSection(); + + Object.keys(config) + .filter(filterOutCommentKeys) + .forEach(key => { + const buildSettings = config[key].buildSettings; + const hasFrameworkSearchPaths = buildSettings.hasOwnProperty('FRAMEWORK_SEARCH_PATHS'); + + // If there's only one path, the frameworkSearchPaths is a string, so we + // normalize it here. + const frameworkSearchPaths = buildSettings.FRAMEWORK_SEARCH_PATHS || []; + const normalizedFrameworkSearchPaths = Array.isArray(frameworkSearchPaths) + ? frameworkSearchPaths + : [frameworkSearchPaths]; + + const pathsToAdd = filePaths + .filter(filePath => !normalizedFrameworkSearchPaths.includes(filePath)); + + const nextFrameworkSearchPaths = [...normalizedFrameworkSearchPaths, ...pathsToAdd]; + + buildSettings.FRAMEWORK_SEARCH_PATHS = nextFrameworkSearchPaths.length > 1 + ? nextFrameworkSearchPaths + : nextFrameworkSearchPaths.join(''); + }); +} + +module.exports = { + addFrameworks, + addFrameworkSearchPaths, + addCarthageRunScriptPhase +}; \ No newline at end of file diff --git a/packages/react-native-payments-cli/package.json b/packages/react-native-payments-cli/package.json new file mode 100644 index 00000000..073fbfc7 --- /dev/null +++ b/packages/react-native-payments-cli/package.json @@ -0,0 +1,29 @@ +{ + "name": "react-native-payments-cli", + "version": "0.2.0", + "bin": "index.js", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": "https://github.com/naoufal/react-native-payments/tree/master/packages/react-native-payments-cli", + "keywords": [ + "react-native-payments", + "cli" + ], + "author": "Naoufal Kadhom", + "license": "MIT", + "dependencies": { + "bluebird": "^3.5.0", + "chalk": "^2.0.1", + "cli-table": "^0.3.1", + "inquirer": "^3.2.0", + "meow": "^3.7.0", + "xcode": "^0.9.3" + }, + "devDependencies": { + "react-native-payments": "^0.1.2", + "react-native-payments-addon-braintree": "4.8.4", + "react-native-payments-addon-stripe": "11.1.0" + } +} diff --git a/packages/react-native-payments-cli/yarn.lock b/packages/react-native-payments-cli/yarn.lock new file mode 100644 index 00000000..d9e69b21 --- /dev/null +++ b/packages/react-native-payments-cli/yarn.lock @@ -0,0 +1,526 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" + dependencies: + color-convert "^1.0.0" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +base64-js@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.1.2.tgz#d6400cac1c4c660976d90d07a04351d89395f5e8" + +big-integer@^1.6.7: + version "1.6.23" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.23.tgz#e85d508220c74e3f43a4ce72eed51f3da4db94d1" + +bluebird@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +bplist-creator@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" + dependencies: + stream-buffers "~2.2.0" + +bplist-parser@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6" + dependencies: + big-integer "^1.6.7" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +chalk@^2.0.0, chalk@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-table@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + dependencies: + colors "1.0.3" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es6-error@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +iconv-lite@^0.4.17: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +inquirer@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.0.tgz#45b44c2160c729d7578c54060b3eed94487bb42b" + dependencies: + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +jschardet@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.0.tgz#a61f310306a5a71188e1b1acd08add3cfbb08b1e" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimist@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pegjs@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plist@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b" + dependencies: + base64-js "1.1.2" + xmlbuilder "8.2.2" + xmldom "0.1.x" + +react-native-payments-addon-braintree@4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/react-native-payments-addon-braintree/-/react-native-payments-addon-braintree-4.8.4.tgz#f6b1fac554ec05c75af4669b071735104f1b8559" + +react-native-payments-addon-stripe@11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/react-native-payments-addon-stripe/-/react-native-payments-addon-stripe-11.1.0.tgz#4aec32549fe745a77b8aaf8a5ac46201e427d12b" + +react-native-payments@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/react-native-payments/-/react-native-payments-0.1.2.tgz#442be4a927bc9790aa42da5c33560b14109ca832" + dependencies: + es6-error "^4.0.2" + uuid "^3.1.0" + validator "^7.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +"semver@2 || 3 || 4 || 5": + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +simple-plist@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723" + dependencies: + bplist-creator "0.0.7" + bplist-parser "0.1.1" + plist "2.0.1" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +stream-buffers@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" + +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +supports-color@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.0.tgz#ad986dc7eb2315d009b4d77c8169c2231a684037" + dependencies: + has-flag "^2.0.0" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +uuid@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +uuid@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +validator@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-7.2.0.tgz#a63dcbaba51d4350bf8df20988e0d5a54d711791" + +xcode@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/xcode/-/xcode-0.9.3.tgz#910a89c16aee6cc0b42ca805a6d0b4cf87211cf3" + dependencies: + pegjs "^0.10.0" + simple-plist "^0.2.1" + uuid "3.0.1" + +xmlbuilder@8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773" + +xmldom@0.1.x: + version "0.1.27" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" diff --git a/.babelrc b/packages/react-native-payments/.babelrc similarity index 100% rename from .babelrc rename to packages/react-native-payments/.babelrc diff --git a/.flowconfig b/packages/react-native-payments/.flowconfig similarity index 100% rename from .flowconfig rename to packages/react-native-payments/.flowconfig diff --git a/packages/react-native-payments/.gitignore b/packages/react-native-payments/.gitignore new file mode 100644 index 00000000..67847ad5 --- /dev/null +++ b/packages/react-native-payments/.gitignore @@ -0,0 +1,35 @@ +# System +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# npm +# +node_modules/ + +# editors +# +jsconfig.json +.vscode/* + +# project +# +coverage diff --git a/.npmignore b/packages/react-native-payments/.npmignore similarity index 100% rename from .npmignore rename to packages/react-native-payments/.npmignore diff --git a/packages/react-native-payments/bin.js b/packages/react-native-payments/bin.js new file mode 100644 index 00000000..18b6989a --- /dev/null +++ b/packages/react-native-payments/bin.js @@ -0,0 +1 @@ +require('react-native-payments-cli'); \ No newline at end of file diff --git a/docs/NativePayments.md b/packages/react-native-payments/docs/NativePayments.md similarity index 100% rename from docs/NativePayments.md rename to packages/react-native-payments/docs/NativePayments.md diff --git a/docs/PaymentRequest.md b/packages/react-native-payments/docs/PaymentRequest.md similarity index 100% rename from docs/PaymentRequest.md rename to packages/react-native-payments/docs/PaymentRequest.md diff --git a/docs/PaymentRequestUpdateEvent.md b/packages/react-native-payments/docs/PaymentRequestUpdateEvent.md similarity index 100% rename from docs/PaymentRequestUpdateEvent.md rename to packages/react-native-payments/docs/PaymentRequestUpdateEvent.md diff --git a/docs/PaymentResponse.md b/packages/react-native-payments/docs/PaymentResponse.md similarity index 100% rename from docs/PaymentResponse.md rename to packages/react-native-payments/docs/PaymentResponse.md diff --git a/examples/braintree/.babelrc b/packages/react-native-payments/examples/braintree/.babelrc similarity index 100% rename from examples/braintree/.babelrc rename to packages/react-native-payments/examples/braintree/.babelrc diff --git a/examples/braintree/.buckconfig b/packages/react-native-payments/examples/braintree/.buckconfig similarity index 100% rename from examples/braintree/.buckconfig rename to packages/react-native-payments/examples/braintree/.buckconfig diff --git a/examples/braintree/.flowconfig b/packages/react-native-payments/examples/braintree/.flowconfig similarity index 100% rename from examples/braintree/.flowconfig rename to packages/react-native-payments/examples/braintree/.flowconfig diff --git a/examples/braintree/.gitattributes b/packages/react-native-payments/examples/braintree/.gitattributes similarity index 100% rename from examples/braintree/.gitattributes rename to packages/react-native-payments/examples/braintree/.gitattributes diff --git a/examples/braintree/.gitignore b/packages/react-native-payments/examples/braintree/.gitignore similarity index 100% rename from examples/braintree/.gitignore rename to packages/react-native-payments/examples/braintree/.gitignore diff --git a/examples/braintree/.watchmanconfig b/packages/react-native-payments/examples/braintree/.watchmanconfig similarity index 100% rename from examples/braintree/.watchmanconfig rename to packages/react-native-payments/examples/braintree/.watchmanconfig diff --git a/examples/braintree/__tests__/index.android.js b/packages/react-native-payments/examples/braintree/__tests__/index.android.js similarity index 100% rename from examples/braintree/__tests__/index.android.js rename to packages/react-native-payments/examples/braintree/__tests__/index.android.js diff --git a/examples/braintree/__tests__/index.ios.js b/packages/react-native-payments/examples/braintree/__tests__/index.ios.js similarity index 100% rename from examples/braintree/__tests__/index.ios.js rename to packages/react-native-payments/examples/braintree/__tests__/index.ios.js diff --git a/examples/braintree/android/app/BUCK b/packages/react-native-payments/examples/braintree/android/app/BUCK similarity index 100% rename from examples/braintree/android/app/BUCK rename to packages/react-native-payments/examples/braintree/android/app/BUCK diff --git a/examples/braintree/android/app/build.gradle b/packages/react-native-payments/examples/braintree/android/app/build.gradle similarity index 100% rename from examples/braintree/android/app/build.gradle rename to packages/react-native-payments/examples/braintree/android/app/build.gradle diff --git a/examples/braintree/android/app/proguard-rules.pro b/packages/react-native-payments/examples/braintree/android/app/proguard-rules.pro similarity index 100% rename from examples/braintree/android/app/proguard-rules.pro rename to packages/react-native-payments/examples/braintree/android/app/proguard-rules.pro diff --git a/examples/braintree/android/app/src/main/AndroidManifest.xml b/packages/react-native-payments/examples/braintree/android/app/src/main/AndroidManifest.xml similarity index 100% rename from examples/braintree/android/app/src/main/AndroidManifest.xml rename to packages/react-native-payments/examples/braintree/android/app/src/main/AndroidManifest.xml diff --git a/examples/braintree/android/app/src/main/java/com/braintreeexample/MainActivity.java b/packages/react-native-payments/examples/braintree/android/app/src/main/java/com/braintreeexample/MainActivity.java similarity index 100% rename from examples/braintree/android/app/src/main/java/com/braintreeexample/MainActivity.java rename to packages/react-native-payments/examples/braintree/android/app/src/main/java/com/braintreeexample/MainActivity.java diff --git a/examples/braintree/android/app/src/main/java/com/braintreeexample/MainApplication.java b/packages/react-native-payments/examples/braintree/android/app/src/main/java/com/braintreeexample/MainApplication.java similarity index 100% rename from examples/braintree/android/app/src/main/java/com/braintreeexample/MainApplication.java rename to packages/react-native-payments/examples/braintree/android/app/src/main/java/com/braintreeexample/MainApplication.java diff --git a/examples/braintree/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/braintree/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/braintree/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/braintree/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/braintree/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/braintree/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/braintree/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/braintree/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/braintree/android/app/src/main/res/values/strings.xml b/packages/react-native-payments/examples/braintree/android/app/src/main/res/values/strings.xml similarity index 100% rename from examples/braintree/android/app/src/main/res/values/strings.xml rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/values/strings.xml diff --git a/examples/braintree/android/app/src/main/res/values/styles.xml b/packages/react-native-payments/examples/braintree/android/app/src/main/res/values/styles.xml similarity index 100% rename from examples/braintree/android/app/src/main/res/values/styles.xml rename to packages/react-native-payments/examples/braintree/android/app/src/main/res/values/styles.xml diff --git a/examples/braintree/android/build.gradle b/packages/react-native-payments/examples/braintree/android/build.gradle similarity index 100% rename from examples/braintree/android/build.gradle rename to packages/react-native-payments/examples/braintree/android/build.gradle diff --git a/examples/braintree/android/gradle.properties b/packages/react-native-payments/examples/braintree/android/gradle.properties similarity index 100% rename from examples/braintree/android/gradle.properties rename to packages/react-native-payments/examples/braintree/android/gradle.properties diff --git a/examples/braintree/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-payments/examples/braintree/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from examples/braintree/android/gradle/wrapper/gradle-wrapper.jar rename to packages/react-native-payments/examples/braintree/android/gradle/wrapper/gradle-wrapper.jar diff --git a/examples/braintree/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-payments/examples/braintree/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from examples/braintree/android/gradle/wrapper/gradle-wrapper.properties rename to packages/react-native-payments/examples/braintree/android/gradle/wrapper/gradle-wrapper.properties diff --git a/examples/braintree/android/gradlew b/packages/react-native-payments/examples/braintree/android/gradlew similarity index 100% rename from examples/braintree/android/gradlew rename to packages/react-native-payments/examples/braintree/android/gradlew diff --git a/examples/braintree/android/gradlew.bat b/packages/react-native-payments/examples/braintree/android/gradlew.bat similarity index 100% rename from examples/braintree/android/gradlew.bat rename to packages/react-native-payments/examples/braintree/android/gradlew.bat diff --git a/examples/braintree/android/keystores/BUCK b/packages/react-native-payments/examples/braintree/android/keystores/BUCK similarity index 100% rename from examples/braintree/android/keystores/BUCK rename to packages/react-native-payments/examples/braintree/android/keystores/BUCK diff --git a/examples/braintree/android/keystores/debug.keystore.properties b/packages/react-native-payments/examples/braintree/android/keystores/debug.keystore.properties similarity index 100% rename from examples/braintree/android/keystores/debug.keystore.properties rename to packages/react-native-payments/examples/braintree/android/keystores/debug.keystore.properties diff --git a/examples/braintree/android/settings.gradle b/packages/react-native-payments/examples/braintree/android/settings.gradle similarity index 100% rename from examples/braintree/android/settings.gradle rename to packages/react-native-payments/examples/braintree/android/settings.gradle diff --git a/examples/braintree/index.android.js b/packages/react-native-payments/examples/braintree/index.android.js similarity index 91% rename from examples/braintree/index.android.js rename to packages/react-native-payments/examples/braintree/index.android.js index fb7524af..a220f41b 100644 --- a/examples/braintree/index.android.js +++ b/packages/react-native-payments/examples/braintree/index.android.js @@ -11,9 +11,7 @@ export default class BraintreeExample extends Component { render() { return ( - - Welcome to React Native! - + Welcome to React Native! To get started, edit index.android.js diff --git a/examples/braintree/index.ios.js b/packages/react-native-payments/examples/braintree/index.ios.js similarity index 100% rename from examples/braintree/index.ios.js rename to packages/react-native-payments/examples/braintree/index.ios.js diff --git a/examples/braintree/ios/BraintreeExample-tvOS/Info.plist b/packages/react-native-payments/examples/braintree/ios/BraintreeExample-tvOS/Info.plist similarity index 100% rename from examples/braintree/ios/BraintreeExample-tvOS/Info.plist rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample-tvOS/Info.plist diff --git a/examples/braintree/ios/BraintreeExample-tvOSTests/Info.plist b/packages/react-native-payments/examples/braintree/ios/BraintreeExample-tvOSTests/Info.plist similarity index 100% rename from examples/braintree/ios/BraintreeExample-tvOSTests/Info.plist rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample-tvOSTests/Info.plist diff --git a/examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj b/packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj similarity index 81% rename from examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj index a9ff81f7..c44dcdd6 100644 --- a/examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj +++ b/packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/project.pbxproj @@ -36,7 +36,8 @@ 2DCD954D1E0B4F2C00145EB5 /* BraintreeExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BraintreeExampleTests.m */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - ADFB76C71F1D9B8E00E68D1B /* libBraintree.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADFB76A61F1D9B7000E68D1B /* libBraintree.a */; }; + AD197FD71F2078950070AFE8 /* BraintreeApplePay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD197FD61F2078950070AFE8 /* BraintreeApplePay.framework */; }; + AD197FE61F207A2B0070AFE8 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD197FE51F207A2B0070AFE8 /* BraintreeCore.framework */; }; B17C43BC1EA342D0AE353BB0 /* libReactNativePayments.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4A44D3A6FC743D7BF24B564 /* libReactNativePayments.a */; }; /* End PBXBuildFile section */ @@ -237,146 +238,6 @@ remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = ReactNativePayments; }; - ADFB769F1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A76B198B1B79707700452CFA; - remoteInfo = Demo; - }; - ADFB76A11F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7ABD6531B702FD800A1223C; - remoteInfo = IntegrationTests; - }; - ADFB76A31F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 16CD2E9C1B4077FB00E68495; - remoteInfo = UnitTests; - }; - ADFB76A51F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 417404491BB084D3008A5DEA; - remoteInfo = Braintree; - }; - ADFB76A71F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D941D881B5D9E8C0016EFB4; - remoteInfo = Braintree3DSecure; - }; - ADFB76A91F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7C889741B5EF5DE007A0E9C; - remoteInfo = BraintreeApplePay; - }; - ADFB76AB1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7C889901B5F043B007A0E9C; - remoteInfo = BraintreeCard; - }; - ADFB76AD1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2DE12F091B59BE0100EA1BCF; - remoteInfo = BraintreeCore; - }; - ADFB76AF1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A76D7C001BB1CAB00000FA6A; - remoteInfo = BraintreeDataCollector; - }; - ADFB76B11F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D941D381B59C76A0016EFB4; - remoteInfo = BraintreePayPal; - }; - ADFB76B31F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A77AA29C1B618C7700217B73; - remoteInfo = BraintreeVenmo; - }; - ADFB76B51F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A77344F71B7A93A10083EC8D; - remoteInfo = BraintreeUI; - }; - ADFB76B71F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 4164B9AC1C9B658E006AE861; - remoteInfo = BraintreeUnionPay; - }; - ADFB76B91F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A50C3B051C19F55C00612D90; - remoteInfo = "PayPalDataCollector-StaticLibrary"; - }; - ADFB76BB1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7B463051C3D9C2200048423; - remoteInfo = PayPalDataCollector; - }; - ADFB76BD1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A50C3AD51C19F00600612D90; - remoteInfo = "PayPalOneTouch-StaticLibrary"; - }; - ADFB76BF1F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A50C3B6F1C1A29C500612D90; - remoteInfo = PayPalOneTouch; - }; - ADFB76C11F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 7EDE47701CD2C3D00005E22B; - remoteInfo = PayPalUtils; - }; - ADFB76C31F1D9B7000E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 03F8B2661C23976000FD184B; - remoteInfo = UITests; - }; - ADFB76C51F1D9B8900E68D1B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 417404481BB084D3008A5DEA; - remoteInfo = Braintree; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -404,8 +265,9 @@ 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + AD197FD61F2078950070AFE8 /* BraintreeApplePay.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeApplePay.framework; path = "../../../../react-native-payments-addon-braintree/Carthage/Build/iOS/BraintreeApplePay.framework"; sourceTree = ""; }; + AD197FE51F207A2B0070AFE8 /* BraintreeCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BraintreeCore.framework; path = "../../../../react-native-payments-addon-braintree/Carthage/Build/iOS/BraintreeCore.framework"; sourceTree = ""; }; ADFB760A1F1D193E00E68D1B /* BraintreeExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = BraintreeExample.entitlements; path = BraintreeExample/BraintreeExample.entitlements; sourceTree = ""; }; - ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Braintree.xcodeproj; path = Frameworks/Braintree/Braintree.xcodeproj; sourceTree = ""; }; E4A44D3A6FC743D7BF24B564 /* libReactNativePayments.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libReactNativePayments.a; sourceTree = ""; }; F89F0F8CD375411DBBA3E1DC /* ReactNativePayments.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePayments.xcodeproj; path = "../node_modules/react-native-payments/lib/ios/ReactNativePayments.xcodeproj"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -423,7 +285,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ADFB76C71F1D9B8E00E68D1B /* libBraintree.a in Frameworks */, + AD197FE61F207A2B0070AFE8 /* BraintreeCore.framework in Frameworks */, + AD197FD71F2078950070AFE8 /* BraintreeApplePay.framework in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, @@ -592,7 +455,6 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( - ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */, 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, @@ -625,6 +487,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* BraintreeExampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, + AD197FBB1F2078950070AFE8 /* Frameworks */, ); indentWidth = 2; sourceTree = ""; @@ -641,36 +504,19 @@ name = Products; sourceTree = ""; }; - ADFB75EC1F1D182200E68D1B /* Products */ = { + AD197FBB1F2078950070AFE8 /* Frameworks */ = { isa = PBXGroup; children = ( - ADFB76091F1D182200E68D1B /* libReactNativePayments.a */, + AD197FE51F207A2B0070AFE8 /* BraintreeCore.framework */, + AD197FD61F2078950070AFE8 /* BraintreeApplePay.framework */, ); - name = Products; + name = Frameworks; sourceTree = ""; }; - ADFB768A1F1D9B6F00E68D1B /* Products */ = { + ADFB75EC1F1D182200E68D1B /* Products */ = { isa = PBXGroup; children = ( - ADFB76A01F1D9B7000E68D1B /* Demo.app */, - ADFB76A21F1D9B7000E68D1B /* IntegrationTests.xctest */, - ADFB76A41F1D9B7000E68D1B /* UnitTests.xctest */, - ADFB76A61F1D9B7000E68D1B /* libBraintree.a */, - ADFB76A81F1D9B7000E68D1B /* Braintree3DSecure.framework */, - ADFB76AA1F1D9B7000E68D1B /* BraintreeApplePay.framework */, - ADFB76AC1F1D9B7000E68D1B /* BraintreeCard.framework */, - ADFB76AE1F1D9B7000E68D1B /* BraintreeCore.framework */, - ADFB76B01F1D9B7000E68D1B /* BraintreeDataCollector.framework */, - ADFB76B21F1D9B7000E68D1B /* BraintreePayPal.framework */, - ADFB76B41F1D9B7000E68D1B /* BraintreeVenmo.framework */, - ADFB76B61F1D9B7000E68D1B /* BraintreeUI.framework */, - ADFB76B81F1D9B7000E68D1B /* BraintreeUnionPay.framework */, - ADFB76BA1F1D9B7000E68D1B /* libPayPalDataCollector-StaticLibrary.a */, - ADFB76BC1F1D9B7000E68D1B /* PayPalDataCollector.framework */, - ADFB76BE1F1D9B7000E68D1B /* libPayPalOneTouch-StaticLibrary.a */, - ADFB76C01F1D9B7000E68D1B /* PayPalOneTouch.framework */, - ADFB76C21F1D9B7000E68D1B /* PayPalUtils.framework */, - ADFB76C41F1D9B7000E68D1B /* UITests.xctest */, + ADFB76091F1D182200E68D1B /* libReactNativePayments.a */, ); name = Products; sourceTree = ""; @@ -700,6 +546,7 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BraintreeExample" */; buildPhases = ( + AD197FD81F20789F0070AFE8 /* Copy Carthage Frameworks */, AD0CE2C91E925489006FC317 /* Integrate Haul with React Native */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -709,7 +556,6 @@ buildRules = ( ); dependencies = ( - ADFB76C61F1D9B8900E68D1B /* PBXTargetDependency */, ); name = BraintreeExample; productName = "Hello World"; @@ -797,10 +643,6 @@ productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectReferences = ( - { - ProductGroup = ADFB768A1F1D9B6F00E68D1B /* Products */; - ProjectRef = ADFB76891F1D9B6F00E68D1B /* Braintree.xcodeproj */; - }, { ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; @@ -1043,139 +885,6 @@ remoteRef = ADFB76081F1D182200E68D1B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - ADFB76A01F1D9B7000E68D1B /* Demo.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = Demo.app; - remoteRef = ADFB769F1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76A21F1D9B7000E68D1B /* IntegrationTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = IntegrationTests.xctest; - remoteRef = ADFB76A11F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76A41F1D9B7000E68D1B /* UnitTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.xctest; - remoteRef = ADFB76A31F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76A61F1D9B7000E68D1B /* libBraintree.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libBraintree.a; - remoteRef = ADFB76A51F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76A81F1D9B7000E68D1B /* Braintree3DSecure.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = Braintree3DSecure.framework; - remoteRef = ADFB76A71F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76AA1F1D9B7000E68D1B /* BraintreeApplePay.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeApplePay.framework; - remoteRef = ADFB76A91F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76AC1F1D9B7000E68D1B /* BraintreeCard.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeCard.framework; - remoteRef = ADFB76AB1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76AE1F1D9B7000E68D1B /* BraintreeCore.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeCore.framework; - remoteRef = ADFB76AD1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76B01F1D9B7000E68D1B /* BraintreeDataCollector.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeDataCollector.framework; - remoteRef = ADFB76AF1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76B21F1D9B7000E68D1B /* BraintreePayPal.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreePayPal.framework; - remoteRef = ADFB76B11F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76B41F1D9B7000E68D1B /* BraintreeVenmo.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeVenmo.framework; - remoteRef = ADFB76B31F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76B61F1D9B7000E68D1B /* BraintreeUI.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeUI.framework; - remoteRef = ADFB76B51F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76B81F1D9B7000E68D1B /* BraintreeUnionPay.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = BraintreeUnionPay.framework; - remoteRef = ADFB76B71F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76BA1F1D9B7000E68D1B /* libPayPalDataCollector-StaticLibrary.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libPayPalDataCollector-StaticLibrary.a"; - remoteRef = ADFB76B91F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76BC1F1D9B7000E68D1B /* PayPalDataCollector.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = PayPalDataCollector.framework; - remoteRef = ADFB76BB1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76BE1F1D9B7000E68D1B /* libPayPalOneTouch-StaticLibrary.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libPayPalOneTouch-StaticLibrary.a"; - remoteRef = ADFB76BD1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76C01F1D9B7000E68D1B /* PayPalOneTouch.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = PayPalOneTouch.framework; - remoteRef = ADFB76BF1F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76C21F1D9B7000E68D1B /* PayPalUtils.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = PayPalUtils.framework; - remoteRef = ADFB76C11F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADFB76C41F1D9B7000E68D1B /* UITests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UITests.xctest; - remoteRef = ADFB76C31F1D9B7000E68D1B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -1255,6 +964,24 @@ shellPath = /bin/sh; shellScript = "bash ../node_modules/haul/src/utils/haul-integrate.sh"; }; + AD197FD81F20789F0070AFE8 /* Copy Carthage Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/../node_modules/react-native-payments-addon-braintree/Carthage/Build/iOS/BraintreeApplePay.framework", + "$(SRCROOT)/../node_modules/react-native-payments-addon-braintree/Carthage/Build/iOS/BraintreeCore.framework", + ); + name = "Copy Carthage Frameworks"; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/BraintreeApplePay.framework", + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/BraintreeCore.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/usr/local/bin/carthage copy-frameworks"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1305,11 +1032,6 @@ target = 2D02E47A1E0B4A5D006451C7 /* BraintreeExample-tvOS */; targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; }; - ADFB76C61F1D9B8900E68D1B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Braintree; - targetProxy = ADFB76C51F1D9B8900E68D1B /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1378,7 +1100,8 @@ CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = 9ZYB6NWYKQ; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Framworks/Braintree/**"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-payments-addon-braintree/Carthage/Build/iOS/"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = BraintreeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -1399,7 +1122,8 @@ CODE_SIGN_ENTITLEMENTS = BraintreeExample/BraintreeExample.entitlements; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 9ZYB6NWYKQ; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Framworks/Braintree/**"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-payments-addon-braintree/Carthage/Build/iOS/"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = BraintreeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( diff --git a/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample-tvOS.xcscheme b/packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample-tvOS.xcscheme similarity index 100% rename from examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample-tvOS.xcscheme rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample-tvOS.xcscheme diff --git a/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample.xcscheme b/packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample.xcscheme similarity index 100% rename from examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample.xcscheme rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample.xcodeproj/xcshareddata/xcschemes/BraintreeExample.xcscheme diff --git a/examples/braintree/ios/BraintreeExample/AppDelegate.h b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/AppDelegate.h similarity index 100% rename from examples/braintree/ios/BraintreeExample/AppDelegate.h rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/AppDelegate.h diff --git a/examples/braintree/ios/BraintreeExample/AppDelegate.m b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/AppDelegate.m similarity index 100% rename from examples/braintree/ios/BraintreeExample/AppDelegate.m rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/AppDelegate.m diff --git a/examples/braintree/ios/BraintreeExample/Base.lproj/LaunchScreen.xib b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/Base.lproj/LaunchScreen.xib similarity index 100% rename from examples/braintree/ios/BraintreeExample/Base.lproj/LaunchScreen.xib rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/Base.lproj/LaunchScreen.xib diff --git a/examples/braintree/ios/BraintreeExample/BraintreeExample.entitlements b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/BraintreeExample.entitlements similarity index 100% rename from examples/braintree/ios/BraintreeExample/BraintreeExample.entitlements rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/BraintreeExample.entitlements diff --git a/examples/braintree/ios/BraintreeExample/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/braintree/ios/BraintreeExample/Images.xcassets/AppIcon.appiconset/Contents.json rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/braintree/ios/BraintreeExample/Info.plist b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/Info.plist similarity index 100% rename from examples/braintree/ios/BraintreeExample/Info.plist rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/Info.plist diff --git a/examples/braintree/ios/BraintreeExample/main.m b/packages/react-native-payments/examples/braintree/ios/BraintreeExample/main.m similarity index 100% rename from examples/braintree/ios/BraintreeExample/main.m rename to packages/react-native-payments/examples/braintree/ios/BraintreeExample/main.m diff --git a/examples/braintree/ios/BraintreeExampleTests/BraintreeExampleTests.m b/packages/react-native-payments/examples/braintree/ios/BraintreeExampleTests/BraintreeExampleTests.m similarity index 100% rename from examples/braintree/ios/BraintreeExampleTests/BraintreeExampleTests.m rename to packages/react-native-payments/examples/braintree/ios/BraintreeExampleTests/BraintreeExampleTests.m diff --git a/examples/braintree/ios/BraintreeExampleTests/Info.plist b/packages/react-native-payments/examples/braintree/ios/BraintreeExampleTests/Info.plist similarity index 100% rename from examples/braintree/ios/BraintreeExampleTests/Info.plist rename to packages/react-native-payments/examples/braintree/ios/BraintreeExampleTests/Info.plist diff --git a/examples/braintree/package.json b/packages/react-native-payments/examples/braintree/package.json similarity index 86% rename from examples/braintree/package.json rename to packages/react-native-payments/examples/braintree/package.json index 8439ab31..f863c4c9 100644 --- a/examples/braintree/package.json +++ b/packages/react-native-payments/examples/braintree/package.json @@ -11,7 +11,8 @@ "dependencies": { "react": "~15.4.0-rc.4", "react-native": "0.41.0", - "react-native-payments": "file:../.." + "react-native-payments": "0.1.2", + "react-native-payments-addon-braintree": "4.8.4" }, "devDependencies": { "babel-jest": "20.0.3", @@ -23,4 +24,4 @@ "jest": { "preset": "react-native" } -} \ No newline at end of file +} diff --git a/examples/braintree/webpack.haul.js b/packages/react-native-payments/examples/braintree/webpack.haul.js similarity index 100% rename from examples/braintree/webpack.haul.js rename to packages/react-native-payments/examples/braintree/webpack.haul.js diff --git a/examples/braintree/yarn.lock b/packages/react-native-payments/examples/braintree/yarn.lock similarity index 100% rename from examples/braintree/yarn.lock rename to packages/react-native-payments/examples/braintree/yarn.lock diff --git a/examples/common/App.js b/packages/react-native-payments/examples/common/App.js similarity index 100% rename from examples/common/App.js rename to packages/react-native-payments/examples/common/App.js diff --git a/examples/common/components/Header.js b/packages/react-native-payments/examples/common/components/Header.js similarity index 100% rename from examples/common/components/Header.js rename to packages/react-native-payments/examples/common/components/Header.js diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeSignature b/packages/react-native-payments/examples/common/config/index.js similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeSignature rename to packages/react-native-payments/examples/common/config/index.js diff --git a/examples/common/handlers/index.js b/packages/react-native-payments/examples/common/handlers/index.js similarity index 100% rename from examples/common/handlers/index.js rename to packages/react-native-payments/examples/common/handlers/index.js diff --git a/examples/common/services/shipping.js b/packages/react-native-payments/examples/common/services/shipping.js similarity index 100% rename from examples/common/services/shipping.js rename to packages/react-native-payments/examples/common/services/shipping.js diff --git a/examples/common/styles/index.js b/packages/react-native-payments/examples/common/styles/index.js similarity index 100% rename from examples/common/styles/index.js rename to packages/react-native-payments/examples/common/styles/index.js diff --git a/examples/native/.babelrc b/packages/react-native-payments/examples/native/.babelrc similarity index 100% rename from examples/native/.babelrc rename to packages/react-native-payments/examples/native/.babelrc diff --git a/examples/native/.buckconfig b/packages/react-native-payments/examples/native/.buckconfig similarity index 100% rename from examples/native/.buckconfig rename to packages/react-native-payments/examples/native/.buckconfig diff --git a/examples/native/.flowconfig b/packages/react-native-payments/examples/native/.flowconfig similarity index 100% rename from examples/native/.flowconfig rename to packages/react-native-payments/examples/native/.flowconfig diff --git a/examples/native/.gitattributes b/packages/react-native-payments/examples/native/.gitattributes similarity index 100% rename from examples/native/.gitattributes rename to packages/react-native-payments/examples/native/.gitattributes diff --git a/examples/native/.gitignore b/packages/react-native-payments/examples/native/.gitignore similarity index 100% rename from examples/native/.gitignore rename to packages/react-native-payments/examples/native/.gitignore diff --git a/examples/native/.watchmanconfig b/packages/react-native-payments/examples/native/.watchmanconfig similarity index 100% rename from examples/native/.watchmanconfig rename to packages/react-native-payments/examples/native/.watchmanconfig diff --git a/examples/native/__tests__/index.android.js b/packages/react-native-payments/examples/native/__tests__/index.android.js similarity index 100% rename from examples/native/__tests__/index.android.js rename to packages/react-native-payments/examples/native/__tests__/index.android.js diff --git a/examples/native/__tests__/index.ios.js b/packages/react-native-payments/examples/native/__tests__/index.ios.js similarity index 100% rename from examples/native/__tests__/index.ios.js rename to packages/react-native-payments/examples/native/__tests__/index.ios.js diff --git a/examples/native/android/app/BUCK b/packages/react-native-payments/examples/native/android/app/BUCK similarity index 100% rename from examples/native/android/app/BUCK rename to packages/react-native-payments/examples/native/android/app/BUCK diff --git a/examples/native/android/app/build.gradle b/packages/react-native-payments/examples/native/android/app/build.gradle similarity index 100% rename from examples/native/android/app/build.gradle rename to packages/react-native-payments/examples/native/android/app/build.gradle diff --git a/examples/native/android/app/proguard-rules.pro b/packages/react-native-payments/examples/native/android/app/proguard-rules.pro similarity index 100% rename from examples/native/android/app/proguard-rules.pro rename to packages/react-native-payments/examples/native/android/app/proguard-rules.pro diff --git a/examples/native/android/app/src/main/AndroidManifest.xml b/packages/react-native-payments/examples/native/android/app/src/main/AndroidManifest.xml similarity index 100% rename from examples/native/android/app/src/main/AndroidManifest.xml rename to packages/react-native-payments/examples/native/android/app/src/main/AndroidManifest.xml diff --git a/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainActivity.java b/packages/react-native-payments/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainActivity.java similarity index 100% rename from examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainActivity.java rename to packages/react-native-payments/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainActivity.java diff --git a/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainApplication.java b/packages/react-native-payments/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainApplication.java similarity index 100% rename from examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainApplication.java rename to packages/react-native-payments/examples/native/android/app/src/main/java/com/reactnativepaymentsexample/MainApplication.java diff --git a/examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/react-native-payments/examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/native/android/app/src/main/res/values/strings.xml b/packages/react-native-payments/examples/native/android/app/src/main/res/values/strings.xml similarity index 100% rename from examples/native/android/app/src/main/res/values/strings.xml rename to packages/react-native-payments/examples/native/android/app/src/main/res/values/strings.xml diff --git a/examples/native/android/app/src/main/res/values/styles.xml b/packages/react-native-payments/examples/native/android/app/src/main/res/values/styles.xml similarity index 100% rename from examples/native/android/app/src/main/res/values/styles.xml rename to packages/react-native-payments/examples/native/android/app/src/main/res/values/styles.xml diff --git a/examples/native/android/build.gradle b/packages/react-native-payments/examples/native/android/build.gradle similarity index 100% rename from examples/native/android/build.gradle rename to packages/react-native-payments/examples/native/android/build.gradle diff --git a/examples/native/android/gradle.properties b/packages/react-native-payments/examples/native/android/gradle.properties similarity index 100% rename from examples/native/android/gradle.properties rename to packages/react-native-payments/examples/native/android/gradle.properties diff --git a/examples/native/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-payments/examples/native/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from examples/native/android/gradle/wrapper/gradle-wrapper.jar rename to packages/react-native-payments/examples/native/android/gradle/wrapper/gradle-wrapper.jar diff --git a/examples/native/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-payments/examples/native/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from examples/native/android/gradle/wrapper/gradle-wrapper.properties rename to packages/react-native-payments/examples/native/android/gradle/wrapper/gradle-wrapper.properties diff --git a/examples/native/android/gradlew b/packages/react-native-payments/examples/native/android/gradlew similarity index 100% rename from examples/native/android/gradlew rename to packages/react-native-payments/examples/native/android/gradlew diff --git a/examples/native/android/gradlew.bat b/packages/react-native-payments/examples/native/android/gradlew.bat similarity index 100% rename from examples/native/android/gradlew.bat rename to packages/react-native-payments/examples/native/android/gradlew.bat diff --git a/examples/native/android/keystores/BUCK b/packages/react-native-payments/examples/native/android/keystores/BUCK similarity index 100% rename from examples/native/android/keystores/BUCK rename to packages/react-native-payments/examples/native/android/keystores/BUCK diff --git a/examples/native/android/keystores/debug.keystore.properties b/packages/react-native-payments/examples/native/android/keystores/debug.keystore.properties similarity index 100% rename from examples/native/android/keystores/debug.keystore.properties rename to packages/react-native-payments/examples/native/android/keystores/debug.keystore.properties diff --git a/examples/native/android/settings.gradle b/packages/react-native-payments/examples/native/android/settings.gradle similarity index 100% rename from examples/native/android/settings.gradle rename to packages/react-native-payments/examples/native/android/settings.gradle diff --git a/examples/native/index.android.js b/packages/react-native-payments/examples/native/index.android.js similarity index 92% rename from examples/native/index.android.js rename to packages/react-native-payments/examples/native/index.android.js index 5cb80906..0797642c 100644 --- a/examples/native/index.android.js +++ b/packages/react-native-payments/examples/native/index.android.js @@ -11,9 +11,7 @@ export default class ReactNativePaymentsExample extends Component { render() { return ( - - Welcome to React Native! - + Welcome to React Native! To get started, edit index.android.js diff --git a/examples/native/index.ios.js b/packages/react-native-payments/examples/native/index.ios.js similarity index 100% rename from examples/native/index.ios.js rename to packages/react-native-payments/examples/native/index.ios.js diff --git a/examples/native/ios/ReactNativePaymentsExample-tvOS/Info.plist b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample-tvOS/Info.plist similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample-tvOS/Info.plist rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample-tvOS/Info.plist diff --git a/examples/native/ios/ReactNativePaymentsExample-tvOSTests/Info.plist b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample-tvOSTests/Info.plist similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample-tvOSTests/Info.plist rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample-tvOSTests/Info.plist diff --git a/examples/native/ios/ReactNativePaymentsExample.xcodeproj/project.pbxproj b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/project.pbxproj similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample.xcodeproj/project.pbxproj rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/project.pbxproj diff --git a/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample-tvOS.xcscheme b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample-tvOS.xcscheme similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample-tvOS.xcscheme rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample-tvOS.xcscheme diff --git a/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample.xcscheme b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample.xcscheme similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample.xcscheme rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePaymentsExample.xcscheme diff --git a/examples/native/ios/ReactNativePaymentsExample/AppDelegate.h b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/AppDelegate.h similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/AppDelegate.h rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/AppDelegate.h diff --git a/examples/native/ios/ReactNativePaymentsExample/AppDelegate.m b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/AppDelegate.m similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/AppDelegate.m rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/AppDelegate.m diff --git a/examples/native/ios/ReactNativePaymentsExample/Base.lproj/LaunchScreen.xib b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Base.lproj/LaunchScreen.xib similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/Base.lproj/LaunchScreen.xib rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Base.lproj/LaunchScreen.xib diff --git a/examples/native/ios/ReactNativePaymentsExample/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/Images.xcassets/AppIcon.appiconset/Contents.json rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/native/ios/ReactNativePaymentsExample/Info.plist b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Info.plist similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/Info.plist rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/Info.plist diff --git a/examples/native/ios/ReactNativePaymentsExample/ReactNativePaymentsExample.entitlements b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/ReactNativePaymentsExample.entitlements similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/ReactNativePaymentsExample.entitlements rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/ReactNativePaymentsExample.entitlements diff --git a/examples/native/ios/ReactNativePaymentsExample/main.m b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/main.m similarity index 100% rename from examples/native/ios/ReactNativePaymentsExample/main.m rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExample/main.m diff --git a/examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Info.plist b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExampleTests/Info.plist old mode 100755 new mode 100644 similarity index 100% rename from examples/braintree/ios/Frameworks/Braintree/IntegrationTests/Info.plist rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExampleTests/Info.plist diff --git a/examples/native/ios/ReactNativePaymentsExampleTests/ReactNativePaymentsExampleTests.m b/packages/react-native-payments/examples/native/ios/ReactNativePaymentsExampleTests/ReactNativePaymentsExampleTests.m similarity index 100% rename from examples/native/ios/ReactNativePaymentsExampleTests/ReactNativePaymentsExampleTests.m rename to packages/react-native-payments/examples/native/ios/ReactNativePaymentsExampleTests/ReactNativePaymentsExampleTests.m diff --git a/examples/native/ios/main.jsbundle b/packages/react-native-payments/examples/native/ios/main.jsbundle similarity index 100% rename from examples/native/ios/main.jsbundle rename to packages/react-native-payments/examples/native/ios/main.jsbundle diff --git a/examples/native/package.json b/packages/react-native-payments/examples/native/package.json similarity index 100% rename from examples/native/package.json rename to packages/react-native-payments/examples/native/package.json diff --git a/examples/native/webpack.haul.js b/packages/react-native-payments/examples/native/webpack.haul.js similarity index 100% rename from examples/native/webpack.haul.js rename to packages/react-native-payments/examples/native/webpack.haul.js diff --git a/examples/native/yarn.lock b/packages/react-native-payments/examples/native/yarn.lock similarity index 100% rename from examples/native/yarn.lock rename to packages/react-native-payments/examples/native/yarn.lock diff --git a/examples/stripe/.babelrc b/packages/react-native-payments/examples/stripe/.babelrc similarity index 100% rename from examples/stripe/.babelrc rename to packages/react-native-payments/examples/stripe/.babelrc diff --git a/examples/stripe/.buckconfig b/packages/react-native-payments/examples/stripe/.buckconfig similarity index 100% rename from examples/stripe/.buckconfig rename to packages/react-native-payments/examples/stripe/.buckconfig diff --git a/examples/stripe/.flowconfig b/packages/react-native-payments/examples/stripe/.flowconfig similarity index 100% rename from examples/stripe/.flowconfig rename to packages/react-native-payments/examples/stripe/.flowconfig diff --git a/examples/stripe/.gitattributes b/packages/react-native-payments/examples/stripe/.gitattributes similarity index 100% rename from examples/stripe/.gitattributes rename to packages/react-native-payments/examples/stripe/.gitattributes diff --git a/examples/stripe/.gitignore b/packages/react-native-payments/examples/stripe/.gitignore similarity index 100% rename from examples/stripe/.gitignore rename to packages/react-native-payments/examples/stripe/.gitignore diff --git a/examples/stripe/.watchmanconfig b/packages/react-native-payments/examples/stripe/.watchmanconfig similarity index 100% rename from examples/stripe/.watchmanconfig rename to packages/react-native-payments/examples/stripe/.watchmanconfig diff --git a/examples/stripe/__tests__/index.android.js b/packages/react-native-payments/examples/stripe/__tests__/index.android.js similarity index 100% rename from examples/stripe/__tests__/index.android.js rename to packages/react-native-payments/examples/stripe/__tests__/index.android.js diff --git a/examples/stripe/__tests__/index.ios.js b/packages/react-native-payments/examples/stripe/__tests__/index.ios.js similarity index 100% rename from examples/stripe/__tests__/index.ios.js rename to packages/react-native-payments/examples/stripe/__tests__/index.ios.js diff --git a/examples/stripe/android/app/BUCK b/packages/react-native-payments/examples/stripe/android/app/BUCK similarity index 100% rename from examples/stripe/android/app/BUCK rename to packages/react-native-payments/examples/stripe/android/app/BUCK diff --git a/examples/stripe/android/app/build.gradle b/packages/react-native-payments/examples/stripe/android/app/build.gradle similarity index 100% rename from examples/stripe/android/app/build.gradle rename to packages/react-native-payments/examples/stripe/android/app/build.gradle diff --git a/examples/stripe/android/app/proguard-rules.pro b/packages/react-native-payments/examples/stripe/android/app/proguard-rules.pro similarity index 100% rename from examples/stripe/android/app/proguard-rules.pro rename to packages/react-native-payments/examples/stripe/android/app/proguard-rules.pro diff --git a/examples/stripe/android/app/src/main/AndroidManifest.xml b/packages/react-native-payments/examples/stripe/android/app/src/main/AndroidManifest.xml similarity index 100% rename from examples/stripe/android/app/src/main/AndroidManifest.xml rename to packages/react-native-payments/examples/stripe/android/app/src/main/AndroidManifest.xml diff --git a/examples/stripe/android/app/src/main/java/com/stripeexample/MainActivity.java b/packages/react-native-payments/examples/stripe/android/app/src/main/java/com/stripeexample/MainActivity.java similarity index 100% rename from examples/stripe/android/app/src/main/java/com/stripeexample/MainActivity.java rename to packages/react-native-payments/examples/stripe/android/app/src/main/java/com/stripeexample/MainActivity.java diff --git a/examples/stripe/android/app/src/main/java/com/stripeexample/MainApplication.java b/packages/react-native-payments/examples/stripe/android/app/src/main/java/com/stripeexample/MainApplication.java similarity index 100% rename from examples/stripe/android/app/src/main/java/com/stripeexample/MainApplication.java rename to packages/react-native-payments/examples/stripe/android/app/src/main/java/com/stripeexample/MainApplication.java diff --git a/examples/stripe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/stripe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/stripe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/stripe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/stripe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/stripe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/stripe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/stripe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/stripe/android/app/src/main/res/values/strings.xml b/packages/react-native-payments/examples/stripe/android/app/src/main/res/values/strings.xml similarity index 100% rename from examples/stripe/android/app/src/main/res/values/strings.xml rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/values/strings.xml diff --git a/examples/stripe/android/app/src/main/res/values/styles.xml b/packages/react-native-payments/examples/stripe/android/app/src/main/res/values/styles.xml similarity index 100% rename from examples/stripe/android/app/src/main/res/values/styles.xml rename to packages/react-native-payments/examples/stripe/android/app/src/main/res/values/styles.xml diff --git a/examples/stripe/android/build.gradle b/packages/react-native-payments/examples/stripe/android/build.gradle similarity index 100% rename from examples/stripe/android/build.gradle rename to packages/react-native-payments/examples/stripe/android/build.gradle diff --git a/examples/stripe/android/gradle.properties b/packages/react-native-payments/examples/stripe/android/gradle.properties similarity index 100% rename from examples/stripe/android/gradle.properties rename to packages/react-native-payments/examples/stripe/android/gradle.properties diff --git a/examples/stripe/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-payments/examples/stripe/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from examples/stripe/android/gradle/wrapper/gradle-wrapper.jar rename to packages/react-native-payments/examples/stripe/android/gradle/wrapper/gradle-wrapper.jar diff --git a/examples/stripe/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-payments/examples/stripe/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from examples/stripe/android/gradle/wrapper/gradle-wrapper.properties rename to packages/react-native-payments/examples/stripe/android/gradle/wrapper/gradle-wrapper.properties diff --git a/examples/stripe/android/gradlew b/packages/react-native-payments/examples/stripe/android/gradlew similarity index 100% rename from examples/stripe/android/gradlew rename to packages/react-native-payments/examples/stripe/android/gradlew diff --git a/examples/stripe/android/gradlew.bat b/packages/react-native-payments/examples/stripe/android/gradlew.bat similarity index 100% rename from examples/stripe/android/gradlew.bat rename to packages/react-native-payments/examples/stripe/android/gradlew.bat diff --git a/examples/stripe/android/keystores/BUCK b/packages/react-native-payments/examples/stripe/android/keystores/BUCK similarity index 100% rename from examples/stripe/android/keystores/BUCK rename to packages/react-native-payments/examples/stripe/android/keystores/BUCK diff --git a/examples/stripe/android/keystores/debug.keystore.properties b/packages/react-native-payments/examples/stripe/android/keystores/debug.keystore.properties similarity index 100% rename from examples/stripe/android/keystores/debug.keystore.properties rename to packages/react-native-payments/examples/stripe/android/keystores/debug.keystore.properties diff --git a/examples/stripe/android/settings.gradle b/packages/react-native-payments/examples/stripe/android/settings.gradle similarity index 100% rename from examples/stripe/android/settings.gradle rename to packages/react-native-payments/examples/stripe/android/settings.gradle diff --git a/examples/stripe/icon.png b/packages/react-native-payments/examples/stripe/icon.png similarity index 100% rename from examples/stripe/icon.png rename to packages/react-native-payments/examples/stripe/icon.png diff --git a/examples/stripe/index.android.js b/packages/react-native-payments/examples/stripe/index.android.js similarity index 91% rename from examples/stripe/index.android.js rename to packages/react-native-payments/examples/stripe/index.android.js index b504a0b0..3b0541ba 100644 --- a/examples/stripe/index.android.js +++ b/packages/react-native-payments/examples/stripe/index.android.js @@ -11,9 +11,7 @@ export default class StripeExample extends Component { render() { return ( - - Welcome to React Native! - + Welcome to React Native! To get started, edit index.android.js diff --git a/examples/stripe/index.ios.js b/packages/react-native-payments/examples/stripe/index.ios.js similarity index 100% rename from examples/stripe/index.ios.js rename to packages/react-native-payments/examples/stripe/index.ios.js diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Headers b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Headers similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Headers rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Headers diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Info.plist b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Info.plist similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Info.plist rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Info.plist diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Modules b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Modules similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Modules rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Modules diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/Info.plist b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/Info.plist similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/Info.plist rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/Info.plist diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeDirectory b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeDirectory similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeDirectory rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeDirectory diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements-1 b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements-1 similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements-1 rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeRequirements-1 diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeResources b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeResources similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeResources rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeResources diff --git a/lib/js/utils.js b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeSignature similarity index 100% rename from lib/js/utils.js rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/_CodeSignature/CodeSignature diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/de.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/de.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/de.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/de.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/en.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/en.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/en.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/en.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/es.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/es.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/es.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/es.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/fr.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/fr.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/fr.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/fr.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/it.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/it.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/it.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/it.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/ja.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/ja.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/ja.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/ja.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/nl.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/nl.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/nl.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/nl.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_amex_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_applepay@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_cvc_amex@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_diners_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_discover_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_error_amex@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_back@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_form_front@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_jcb_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_mastercard_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_unknown@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_card_visa_template@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_add@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_checkmark@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_icon_chevron_left@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@2x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@2x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@2x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@2x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@3x.png b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@3x.png similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@3x.png rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/stp_shipping_form@3x.png diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/zh-Hans.lproj/Localizable.strings b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/zh-Hans.lproj/Localizable.strings similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/zh-Hans.lproj/Localizable.strings rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Stripe.bundle/zh-Hans.lproj/Localizable.strings diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient+ApplePay.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient+ApplePay.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient+ApplePay.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient+ApplePay.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIClient.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIResponseDecodable.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIResponseDecodable.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIResponseDecodable.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAPIResponseDecodable.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddCardViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddCardViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddCardViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddCardViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddress.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddress.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddress.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPAddress.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPApplePayPaymentMethod.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPApplePayPaymentMethod.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPApplePayPaymentMethod.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPApplePayPaymentMethod.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBackendAPIAdapter.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBackendAPIAdapter.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBackendAPIAdapter.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBackendAPIAdapter.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccount.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccount.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccount.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccount.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccountParams.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccountParams.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccountParams.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBankAccountParams.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBlocks.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBlocks.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBlocks.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPBlocks.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCard.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCard.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCard.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCard.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardBrand.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardBrand.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardBrand.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardBrand.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardParams.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardParams.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardParams.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardParams.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidationState.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidationState.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidationState.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidationState.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidator.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidator.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidator.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCardValidator.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreScrollViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreScrollViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreScrollViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreScrollViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreTableViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreTableViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreTableViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreTableViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCoreViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomer.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomer.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomer.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomer.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomerContext.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomerContext.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomerContext.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPCustomerContext.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPEphemeralKeyProvider.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPEphemeralKeyProvider.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPEphemeralKeyProvider.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPEphemeralKeyProvider.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFile.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFile.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFile.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFile.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFormEncodable.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFormEncodable.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFormEncodable.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPFormEncodable.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPImageLibrary.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPImageLibrary.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPImageLibrary.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPImageLibrary.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentActivityIndicatorView.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentActivityIndicatorView.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentActivityIndicatorView.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentActivityIndicatorView.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentCardTextField.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentCardTextField.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentCardTextField.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentCardTextField.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentConfiguration.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentConfiguration.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentConfiguration.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentConfiguration.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentContext.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentContext.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentContext.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentContext.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethod.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethod.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethod.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethod.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethodsViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethodsViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethodsViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentMethodsViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentResult.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentResult.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentResult.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPPaymentResult.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPRedirectContext.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPRedirectContext.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPRedirectContext.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPRedirectContext.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPShippingAddressViewController.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPShippingAddressViewController.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPShippingAddressViewController.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPShippingAddressViewController.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSource.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSource.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSource.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSource.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceCardDetails.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceCardDetails.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceCardDetails.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceCardDetails.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceOwner.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceOwner.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceOwner.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceOwner.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceParams.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceParams.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceParams.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceParams.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceProtocol.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceProtocol.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceProtocol.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceProtocol.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceReceiver.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceReceiver.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceReceiver.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceReceiver.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceRedirect.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceRedirect.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceRedirect.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceRedirect.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceSEPADebitDetails.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceSEPADebitDetails.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceSEPADebitDetails.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceSEPADebitDetails.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceVerification.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceVerification.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceVerification.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPSourceVerification.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPTheme.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPTheme.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPTheme.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPTheme.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPToken.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPToken.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPToken.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPToken.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPUserInformation.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPUserInformation.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPUserInformation.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/STPUserInformation.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/Stripe.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/Stripe.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/Stripe.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/Stripe.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/StripeError.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/StripeError.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/StripeError.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/StripeError.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/UINavigationBar+Stripe_Theme.h b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/UINavigationBar+Stripe_Theme.h similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/UINavigationBar+Stripe_Theme.h rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Headers/UINavigationBar+Stripe_Theme.h diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Modules/module.modulemap b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Modules/module.modulemap similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Modules/module.modulemap rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Modules/module.modulemap diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Stripe b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Stripe similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Stripe rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/A/Stripe diff --git a/examples/stripe/ios/Frameworks/Stripe.framework/Versions/Current b/packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/Current similarity index 100% rename from examples/stripe/ios/Frameworks/Stripe.framework/Versions/Current rename to packages/react-native-payments/examples/stripe/ios/Frameworks/Stripe.framework/Versions/Current diff --git a/examples/stripe/ios/StripeExample-tvOS/Info.plist b/packages/react-native-payments/examples/stripe/ios/StripeExample-tvOS/Info.plist similarity index 100% rename from examples/stripe/ios/StripeExample-tvOS/Info.plist rename to packages/react-native-payments/examples/stripe/ios/StripeExample-tvOS/Info.plist diff --git a/examples/stripe/ios/StripeExample-tvOSTests/Info.plist b/packages/react-native-payments/examples/stripe/ios/StripeExample-tvOSTests/Info.plist similarity index 100% rename from examples/stripe/ios/StripeExample-tvOSTests/Info.plist rename to packages/react-native-payments/examples/stripe/ios/StripeExample-tvOSTests/Info.plist diff --git a/examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj b/packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj similarity index 97% rename from examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj rename to packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj index 75152d2a..869b6743 100644 --- a/examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj +++ b/packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/project.pbxproj @@ -39,6 +39,7 @@ ADB95A811F187D0C007C2365 /* Stripe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB95A801F187D0C007C2365 /* Stripe.framework */; }; ADB95A851F187D1D007C2365 /* Stripe.bundle in Resources */ = {isa = PBXBuildFile; fileRef = ADB95A841F187D1D007C2365 /* Stripe.bundle */; }; ADB95A861F187D34007C2365 /* libReactNativePayments.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADB95A7A1F186005007C2365 /* libReactNativePayments.a */; }; + ADCE23DB1F20724200A26CB3 /* Stripe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADCE23D81F206F2500A26CB3 /* Stripe.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -267,8 +268,7 @@ 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 967FC8CB251746C3B8C1AE76 /* ReactNativePayments.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePayments.xcodeproj; path = "../node_modules/react-native-payments/lib/ios/ReactNativePayments.xcodeproj"; sourceTree = ""; }; ADB95A511F185EE7007C2365 /* StripeExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StripeExample.entitlements; path = StripeExample/StripeExample.entitlements; sourceTree = ""; }; - ADB95A801F187D0C007C2365 /* Stripe.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Stripe.framework; path = Frameworks/Stripe.framework; sourceTree = ""; }; - ADB95A841F187D1D007C2365 /* Stripe.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Stripe.bundle; path = Frameworks/Stripe.framework/Stripe.bundle; sourceTree = ""; }; + ADCE23D81F206F2500A26CB3 /* Stripe.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Stripe.framework; path = "../../../../react-native-payments-addon-stripe/Carthage/Build/iOS/Stripe.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -284,6 +284,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + ADCE23DB1F20724200A26CB3 /* Stripe.framework in Frameworks */, ADB95A861F187D34007C2365 /* libReactNativePayments.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, ADB95A811F187D0C007C2365 /* Stripe.framework in Frameworks */, @@ -486,6 +487,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* StripeExampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, + ADCE23BD1F206F2500A26CB3 /* Frameworks */, ); indentWidth = 2; sourceTree = ""; @@ -510,11 +512,10 @@ name = Products; sourceTree = ""; }; - ADB95A7F1F187CEC007C2365 /* Frameworks */ = { + ADCE23BD1F206F2500A26CB3 /* Frameworks */ = { isa = PBXGroup; children = ( - ADB95A841F187D1D007C2365 /* Stripe.bundle */, - ADB95A801F187D0C007C2365 /* Stripe.framework */, + ADCE23D81F206F2500A26CB3 /* Stripe.framework */, ); name = Frameworks; sourceTree = ""; @@ -544,6 +545,7 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StripeExample" */; buildPhases = ( + ADCE23DA1F2070AE00A26CB3 /* Copy Carthage Frameworks */, AD0CE2C91E925489006FC317 /* Integrate Haul with React Native */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -962,6 +964,22 @@ shellPath = /bin/sh; shellScript = "bash ../node_modules/haul/src/utils/haul-integrate.sh"; }; + ADCE23DA1F2070AE00A26CB3 /* Copy Carthage Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/../node_modules/react-native-payments-addon-stripe/Carthage/Build/iOS/Stripe.framework", + ); + name = "Copy Carthage Frameworks"; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Stripe.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/usr/local/bin/carthage copy-frameworks"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1082,8 +1100,9 @@ DEVELOPMENT_TEAM = 9ZYB6NWYKQ; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Frameworks", + "$(SRCROOT)/../node_modules/react-native-payments-addon-stripe/Carthage/Build/iOS/", ); + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = StripeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -1106,8 +1125,9 @@ DEVELOPMENT_TEAM = 9ZYB6NWYKQ; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Frameworks", + "$(SRCROOT)/../node_modules/react-native-payments-addon-stripe/Carthage/Build/iOS/", ); + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = StripeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( diff --git a/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample-tvOS.xcscheme b/packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample-tvOS.xcscheme similarity index 100% rename from examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample-tvOS.xcscheme rename to packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample-tvOS.xcscheme diff --git a/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample.xcscheme b/packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample.xcscheme similarity index 100% rename from examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample.xcscheme rename to packages/react-native-payments/examples/stripe/ios/StripeExample.xcodeproj/xcshareddata/xcschemes/StripeExample.xcscheme diff --git a/examples/stripe/ios/StripeExample/AppDelegate.h b/packages/react-native-payments/examples/stripe/ios/StripeExample/AppDelegate.h similarity index 100% rename from examples/stripe/ios/StripeExample/AppDelegate.h rename to packages/react-native-payments/examples/stripe/ios/StripeExample/AppDelegate.h diff --git a/examples/stripe/ios/StripeExample/AppDelegate.m b/packages/react-native-payments/examples/stripe/ios/StripeExample/AppDelegate.m similarity index 100% rename from examples/stripe/ios/StripeExample/AppDelegate.m rename to packages/react-native-payments/examples/stripe/ios/StripeExample/AppDelegate.m diff --git a/examples/stripe/ios/StripeExample/Base.lproj/LaunchScreen.xib b/packages/react-native-payments/examples/stripe/ios/StripeExample/Base.lproj/LaunchScreen.xib similarity index 100% rename from examples/stripe/ios/StripeExample/Base.lproj/LaunchScreen.xib rename to packages/react-native-payments/examples/stripe/ios/StripeExample/Base.lproj/LaunchScreen.xib diff --git a/examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/react-native-payments/examples/stripe/ios/StripeExample/Images.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 similarity index 100% rename from examples/braintree/ios/Frameworks/Braintree/Demo/CarthageTest/CarthageTest/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/react-native-payments/examples/stripe/ios/StripeExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/stripe/ios/StripeExample/Info.plist b/packages/react-native-payments/examples/stripe/ios/StripeExample/Info.plist similarity index 100% rename from examples/stripe/ios/StripeExample/Info.plist rename to packages/react-native-payments/examples/stripe/ios/StripeExample/Info.plist diff --git a/examples/stripe/ios/StripeExample/StripeExample.entitlements b/packages/react-native-payments/examples/stripe/ios/StripeExample/StripeExample.entitlements similarity index 100% rename from examples/stripe/ios/StripeExample/StripeExample.entitlements rename to packages/react-native-payments/examples/stripe/ios/StripeExample/StripeExample.entitlements diff --git a/examples/stripe/ios/StripeExample/main.m b/packages/react-native-payments/examples/stripe/ios/StripeExample/main.m similarity index 100% rename from examples/stripe/ios/StripeExample/main.m rename to packages/react-native-payments/examples/stripe/ios/StripeExample/main.m diff --git a/examples/stripe/ios/StripeExampleTests/Info.plist b/packages/react-native-payments/examples/stripe/ios/StripeExampleTests/Info.plist similarity index 100% rename from examples/stripe/ios/StripeExampleTests/Info.plist rename to packages/react-native-payments/examples/stripe/ios/StripeExampleTests/Info.plist diff --git a/examples/stripe/ios/StripeExampleTests/StripeExampleTests.m b/packages/react-native-payments/examples/stripe/ios/StripeExampleTests/StripeExampleTests.m similarity index 100% rename from examples/stripe/ios/StripeExampleTests/StripeExampleTests.m rename to packages/react-native-payments/examples/stripe/ios/StripeExampleTests/StripeExampleTests.m diff --git a/examples/stripe/package.json b/packages/react-native-payments/examples/stripe/package.json similarity index 86% rename from examples/stripe/package.json rename to packages/react-native-payments/examples/stripe/package.json index 80472579..de6e8632 100644 --- a/examples/stripe/package.json +++ b/packages/react-native-payments/examples/stripe/package.json @@ -11,7 +11,8 @@ "dependencies": { "react": "~15.4.0-rc.4", "react-native": "0.41.0", - "react-native-payments": "file:../.." + "react-native-payments": "0.1.2", + "react-native-payments-addon-stripe": "11.1.0" }, "devDependencies": { "babel-jest": "20.0.3", @@ -23,4 +24,4 @@ "jest": { "preset": "react-native" } -} \ No newline at end of file +} diff --git a/examples/stripe/webpack.haul.js b/packages/react-native-payments/examples/stripe/webpack.haul.js similarity index 100% rename from examples/stripe/webpack.haul.js rename to packages/react-native-payments/examples/stripe/webpack.haul.js diff --git a/examples/stripe/yarn.lock b/packages/react-native-payments/examples/stripe/yarn.lock similarity index 100% rename from examples/stripe/yarn.lock rename to packages/react-native-payments/examples/stripe/yarn.lock diff --git a/examples/web/.gitignore b/packages/react-native-payments/examples/web/.gitignore similarity index 100% rename from examples/web/.gitignore rename to packages/react-native-payments/examples/web/.gitignore diff --git a/examples/web/index.web.js b/packages/react-native-payments/examples/web/index.web.js similarity index 100% rename from examples/web/index.web.js rename to packages/react-native-payments/examples/web/index.web.js diff --git a/examples/web/package.json b/packages/react-native-payments/examples/web/package.json similarity index 100% rename from examples/web/package.json rename to packages/react-native-payments/examples/web/package.json diff --git a/examples/web/public/index.html b/packages/react-native-payments/examples/web/public/index.html similarity index 100% rename from examples/web/public/index.html rename to packages/react-native-payments/examples/web/public/index.html diff --git a/examples/web/webpack.base.config.js b/packages/react-native-payments/examples/web/webpack.base.config.js similarity index 100% rename from examples/web/webpack.base.config.js rename to packages/react-native-payments/examples/web/webpack.base.config.js diff --git a/examples/web/webpack.development.config.js b/packages/react-native-payments/examples/web/webpack.development.config.js similarity index 100% rename from examples/web/webpack.development.config.js rename to packages/react-native-payments/examples/web/webpack.development.config.js diff --git a/examples/web/webpack.production.config.js b/packages/react-native-payments/examples/web/webpack.production.config.js similarity index 100% rename from examples/web/webpack.production.config.js rename to packages/react-native-payments/examples/web/webpack.production.config.js diff --git a/examples/web/yarn.lock b/packages/react-native-payments/examples/web/yarn.lock similarity index 100% rename from examples/web/yarn.lock rename to packages/react-native-payments/examples/web/yarn.lock diff --git a/index.js b/packages/react-native-payments/index.js similarity index 100% rename from index.js rename to packages/react-native-payments/index.js diff --git a/lib/android/build.gradle b/packages/react-native-payments/lib/android/build.gradle similarity index 100% rename from lib/android/build.gradle rename to packages/react-native-payments/lib/android/build.gradle diff --git a/lib/android/src/main/AndroidManifest.xml b/packages/react-native-payments/lib/android/src/main/AndroidManifest.xml similarity index 100% rename from lib/android/src/main/AndroidManifest.xml rename to packages/react-native-payments/lib/android/src/main/AndroidManifest.xml diff --git a/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsModule.java b/packages/react-native-payments/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsModule.java similarity index 100% rename from lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsModule.java rename to packages/react-native-payments/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsModule.java diff --git a/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsPackage.java b/packages/react-native-payments/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsPackage.java similarity index 100% rename from lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsPackage.java rename to packages/react-native-payments/lib/android/src/main/java/com/reactlibrary/ReactNativePaymentsPackage.java diff --git a/lib/ios/GatewayManager.h b/packages/react-native-payments/lib/ios/GatewayManager.h similarity index 87% rename from lib/ios/GatewayManager.h rename to packages/react-native-payments/lib/ios/GatewayManager.h index 81fd2a65..9c94894f 100644 --- a/lib/ios/GatewayManager.h +++ b/packages/react-native-payments/lib/ios/GatewayManager.h @@ -2,12 +2,12 @@ #import -#if __has_include("BraintreeApplePay.h") -#import "BraintreeApplePay.h" +#if __has_include() +#import #endif @interface GatewayManager : NSObject -#if __has_include("BraintreeApplePay.h") +#if __has_include() @property (nonatomic, strong) BTAPIClient * _Nullable braintreeClient; #endif diff --git a/lib/ios/GatewayManager.m b/packages/react-native-payments/lib/ios/GatewayManager.m similarity index 88% rename from lib/ios/GatewayManager.m rename to packages/react-native-payments/lib/ios/GatewayManager.m index 511fcd37..d23c4aee 100644 --- a/lib/ios/GatewayManager.m +++ b/packages/react-native-payments/lib/ios/GatewayManager.m @@ -4,8 +4,8 @@ #import #endif -#if __has_include("BraintreeApplePay.h") -#import "BraintreeApplePay.h" +#if __has_include() +#import #endif @implementation GatewayManager @@ -18,7 +18,7 @@ + (NSArray *)getSupportedGateways [supportedGateways addObject:@"stripe"]; #endif -#if __has_include("BraintreeApplePay.h") +#if __has_include() [supportedGateways addObject:@"braintree"]; #endif @@ -34,7 +34,7 @@ - (void)configureGateway:(NSDictionary *_Nonnull)gatewayParameters } #endif -#if __has_include("BraintreeApplePay.h") +#if __has_include() if ([gatewayParameters[@"gateway"] isEqualToString:@"braintree"]) { [self configureBraintreeGateway:gatewayParameters]; } @@ -48,7 +48,7 @@ - (void)createTokenWithPayment:(PKPayment *_Nonnull)payment [self createStripeTokenWithPayment:payment completion:completion]; #endif -#if __has_include("BraintreeApplePay.h") +#if __has_include() [self createBraintreeTokenWithPayment:payment completion:completion]; #endif } @@ -81,7 +81,7 @@ - (void)createStripeTokenWithPayment:(PKPayment *)payment completion:(void (^)(N // Braintree - (void)configureBraintreeGateway:(NSDictionary *_Nonnull)gatewayParameters { -#if __has_include("BraintreeApplePay.h") +#if __has_include() NSString *braintreeTokenizationKey = gatewayParameters[@"braintree:tokenizationKey"]; self.braintreeClient = [[BTAPIClient alloc] initWithAuthorization:braintreeTokenizationKey]; #endif @@ -90,7 +90,7 @@ - (void)configureBraintreeGateway:(NSDictionary *_Nonnull)gatewayParameters - (void)createBraintreeTokenWithPayment:(PKPayment *_Nonnull)payment completion:(void (^_Nullable)(NSString * _Nullable token, NSError * _Nullable error))completion { -#if __has_include("BraintreeApplePay.h") +#if __has_include() BTApplePayClient *applePayClient = [[BTApplePayClient alloc] initWithAPIClient:self.braintreeClient]; diff --git a/lib/ios/ReactNativePayments.h b/packages/react-native-payments/lib/ios/ReactNativePayments.h similarity index 100% rename from lib/ios/ReactNativePayments.h rename to packages/react-native-payments/lib/ios/ReactNativePayments.h diff --git a/lib/ios/ReactNativePayments.m b/packages/react-native-payments/lib/ios/ReactNativePayments.m similarity index 100% rename from lib/ios/ReactNativePayments.m rename to packages/react-native-payments/lib/ios/ReactNativePayments.m diff --git a/lib/ios/ReactNativePayments.podspec b/packages/react-native-payments/lib/ios/ReactNativePayments.podspec similarity index 100% rename from lib/ios/ReactNativePayments.podspec rename to packages/react-native-payments/lib/ios/ReactNativePayments.podspec diff --git a/lib/ios/ReactNativePayments.xcodeproj/project.pbxproj b/packages/react-native-payments/lib/ios/ReactNativePayments.xcodeproj/project.pbxproj similarity index 100% rename from lib/ios/ReactNativePayments.xcodeproj/project.pbxproj rename to packages/react-native-payments/lib/ios/ReactNativePayments.xcodeproj/project.pbxproj diff --git a/lib/ios/ReactNativePayments.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/react-native-payments/lib/ios/ReactNativePayments.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from lib/ios/ReactNativePayments.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/react-native-payments/lib/ios/ReactNativePayments.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/lib/js/NativePayments.js b/packages/react-native-payments/lib/js/NativePayments.js similarity index 100% rename from lib/js/NativePayments.js rename to packages/react-native-payments/lib/js/NativePayments.js diff --git a/lib/js/PaymentRequest.js b/packages/react-native-payments/lib/js/PaymentRequest.js similarity index 99% rename from lib/js/PaymentRequest.js rename to packages/react-native-payments/lib/js/PaymentRequest.js index 9edcc10c..4195a01c 100644 --- a/lib/js/PaymentRequest.js +++ b/packages/react-native-payments/lib/js/PaymentRequest.js @@ -186,9 +186,8 @@ export default class PaymentRequest { // 19. Set the value of the shippingAddress attribute on request to null. this._shippingAddress = null; // 20. If options.requestShipping is set to true, then set the value of the shippingType attribute on request to options.shippingType. Otherwise, set it to null. - this._shippingType = options.requestShipping === true - ? options.shippingType - : null; + this._shippingType = + options.requestShipping === true ? options.shippingType : null; // React Native Payments specific 👇 // --------------------------------- diff --git a/lib/js/PaymentRequestUpdateEvent.js b/packages/react-native-payments/lib/js/PaymentRequestUpdateEvent.js similarity index 100% rename from lib/js/PaymentRequestUpdateEvent.js rename to packages/react-native-payments/lib/js/PaymentRequestUpdateEvent.js diff --git a/lib/js/PaymentResponse.js b/packages/react-native-payments/lib/js/PaymentResponse.js similarity index 100% rename from lib/js/PaymentResponse.js rename to packages/react-native-payments/lib/js/PaymentResponse.js diff --git a/lib/js/__mocks__/index.js b/packages/react-native-payments/lib/js/__mocks__/index.js similarity index 100% rename from lib/js/__mocks__/index.js rename to packages/react-native-payments/lib/js/__mocks__/index.js diff --git a/lib/js/__tests__/PaymentRequest-test.js b/packages/react-native-payments/lib/js/__tests__/PaymentRequest-test.js similarity index 100% rename from lib/js/__tests__/PaymentRequest-test.js rename to packages/react-native-payments/lib/js/__tests__/PaymentRequest-test.js diff --git a/lib/js/__tests__/PaymentRequestUpdateEvent-test.js b/packages/react-native-payments/lib/js/__tests__/PaymentRequestUpdateEvent-test.js similarity index 100% rename from lib/js/__tests__/PaymentRequestUpdateEvent-test.js rename to packages/react-native-payments/lib/js/__tests__/PaymentRequestUpdateEvent-test.js diff --git a/lib/js/__tests__/PaymentResponse-test.js b/packages/react-native-payments/lib/js/__tests__/PaymentResponse-test.js similarity index 100% rename from lib/js/__tests__/PaymentResponse-test.js rename to packages/react-native-payments/lib/js/__tests__/PaymentResponse-test.js diff --git a/lib/js/__tests__/constants-test.js b/packages/react-native-payments/lib/js/__tests__/constants-test.js similarity index 100% rename from lib/js/__tests__/constants-test.js rename to packages/react-native-payments/lib/js/__tests__/constants-test.js diff --git a/lib/js/constants.js b/packages/react-native-payments/lib/js/constants.js similarity index 87% rename from lib/js/constants.js rename to packages/react-native-payments/lib/js/constants.js index e02758e4..a5898e3a 100644 --- a/lib/js/constants.js +++ b/packages/react-native-payments/lib/js/constants.js @@ -8,6 +8,5 @@ export const INTERNAL_SHIPPING_OPTION_CHANGE_EVENT = `${MODULE_SCOPING}:on${SHIP export const USER_DISMISS_EVENT = `${MODULE_SCOPING}:onuserdismiss`; export const USER_ACCEPT_EVENT = `${MODULE_SCOPING}:onuseraccept`; export const GATEWAY_ERROR_EVENT = `${MODULE_SCOPING}:ongatewayerror`; -export const SUPPORTED_METHOD_NAME = Platform.OS === 'ios' - ? 'apple-pay' - : 'android-pay'; +export const SUPPORTED_METHOD_NAME = + Platform.OS === 'ios' ? 'apple-pay' : 'android-pay'; diff --git a/lib/js/errors/__tests__/index-test.js b/packages/react-native-payments/lib/js/errors/__tests__/index-test.js similarity index 100% rename from lib/js/errors/__tests__/index-test.js rename to packages/react-native-payments/lib/js/errors/__tests__/index-test.js diff --git a/lib/js/errors/index.js b/packages/react-native-payments/lib/js/errors/index.js similarity index 100% rename from lib/js/errors/index.js rename to packages/react-native-payments/lib/js/errors/index.js diff --git a/lib/js/helpers/__tests__/index-test.js b/packages/react-native-payments/lib/js/helpers/__tests__/index-test.js similarity index 100% rename from lib/js/helpers/__tests__/index-test.js rename to packages/react-native-payments/lib/js/helpers/__tests__/index-test.js diff --git a/lib/js/helpers/index.js b/packages/react-native-payments/lib/js/helpers/index.js similarity index 98% rename from lib/js/helpers/index.js rename to packages/react-native-payments/lib/js/helpers/index.js index 84e55378..2bde51be 100644 --- a/lib/js/helpers/index.js +++ b/packages/react-native-payments/lib/js/helpers/index.js @@ -94,9 +94,8 @@ export function getPlatformMethodData( methodData: Array, platformOS: 'ios' | 'android' ) { - const platformSupportedMethod = platformOS === 'ios' - ? 'apple-pay' - : 'android-pay'; + const platformSupportedMethod = + platformOS === 'ios' ? 'apple-pay' : 'android-pay'; const platformMethod = methodData.find(paymentMethodData => paymentMethodData.supportedMethods.includes(platformSupportedMethod) diff --git a/lib/js/index.js b/packages/react-native-payments/lib/js/index.js similarity index 100% rename from lib/js/index.js rename to packages/react-native-payments/lib/js/index.js diff --git a/lib/js/types.js b/packages/react-native-payments/lib/js/types.js similarity index 100% rename from lib/js/types.js rename to packages/react-native-payments/lib/js/types.js diff --git a/packages/react-native-payments/lib/js/utils.js b/packages/react-native-payments/lib/js/utils.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/react-native-payments/package.json b/packages/react-native-payments/package.json new file mode 100644 index 00000000..02fd9cba --- /dev/null +++ b/packages/react-native-payments/package.json @@ -0,0 +1,54 @@ +{ + "name": "react-native-payments", + "version": "0.2.0", + "scripts": { + "precommit": "lint-staged", + "run:packager": "cd examples/native && yarn run:packager", + "run:ios": "cd examples/native && yarn run:ios", + "run:web": "cd examples/web && yarn run:web", + "run:demo": "cd examples/native && yarn run:demo", + "test": "jest" + }, + "repository": "https://github.com/naoufal/react-native-payments", + "keywords": [ + "react", + "react-native", + "apple-pay", + "stripe", + "braintree", + "payments" + ], + "author": "Naoufal Kadhom", + "license": "MIT", + "dependencies": { + "es6-error": "^4.0.2", + "uuid": "^3.1.0", + "validator": "^7.0.0" + }, + "devDependencies": { + "babel-jest": "20.0.3", + "babel-preset-react-native": "2.0.0", + "husky": "^0.14.1", + "jest": "20.0.4", + "lint-staged": "^4.0.0", + "prettier": "^1.4.4", + "react-test-renderer": "16.0.0-alpha.12" + }, + "peerDependencies": { + "react": "~15.4.0-rc.4", + "react-native": "0.41.0" + }, + "jest": { + "testPathIgnorePatterns": [ + "/node_modules/", + "/examples/", + "lib/js/__tests__" + ] + }, + "lint-staged": { + "*.js": [ + "prettier --single-quote --write", + "git add" + ] + } +} diff --git a/packages/react-native-payments/yarn.lock b/packages/react-native-payments/yarn.lock new file mode 100644 index 00000000..326d5a2e --- /dev/null +++ b/packages/react-native-payments/yarn.lock @@ -0,0 +1,2728 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.0.0, ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0, ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" + dependencies: + color-convert "^1.0.0" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +app-root-path@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@^6.0.0, babel-core@^6.24.1: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.25.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.25.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-generator@^6.18.0, babel-generator@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.25.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + esutils "^2.0.0" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@20.0.3, babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" + +babel-plugin-react-transform@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109" + dependencies: + lodash "^4.6.1" + +babel-plugin-syntax-async-functions@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-class-properties@^6.5.0, babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.5.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-jsx@^6.5.0, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-class-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-arrow-functions@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-for-of@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-commonjs@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-parameters@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-template-literals@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-assign@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-display-name@^6.5.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" + dependencies: + babel-plugin-jest-hoist "^20.0.3" + +babel-preset-react-native@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-2.0.0.tgz#c26c7066c7399df30926fa03c012ef87f2cce5b7" + dependencies: + babel-plugin-check-es2015-constants "^6.5.0" + babel-plugin-react-transform "2.0.2" + babel-plugin-syntax-async-functions "^6.5.0" + babel-plugin-syntax-class-properties "^6.5.0" + babel-plugin-syntax-flow "^6.5.0" + babel-plugin-syntax-jsx "^6.5.0" + babel-plugin-syntax-trailing-function-commas "^6.5.0" + babel-plugin-transform-class-properties "^6.5.0" + babel-plugin-transform-es2015-arrow-functions "^6.5.0" + babel-plugin-transform-es2015-block-scoping "^6.5.0" + babel-plugin-transform-es2015-classes "^6.5.0" + babel-plugin-transform-es2015-computed-properties "^6.5.0" + babel-plugin-transform-es2015-destructuring "^6.5.0" + babel-plugin-transform-es2015-for-of "^6.5.0" + babel-plugin-transform-es2015-function-name "^6.5.0" + babel-plugin-transform-es2015-literals "^6.5.0" + babel-plugin-transform-es2015-modules-commonjs "^6.5.0" + babel-plugin-transform-es2015-parameters "^6.5.0" + babel-plugin-transform-es2015-shorthand-properties "^6.5.0" + babel-plugin-transform-es2015-spread "^6.5.0" + babel-plugin-transform-es2015-template-literals "^6.5.0" + babel-plugin-transform-flow-strip-types "^6.5.0" + babel-plugin-transform-object-assign "^6.5.0" + babel-plugin-transform-object-rest-spread "^6.5.0" + babel-plugin-transform-react-display-name "^6.5.0" + babel-plugin-transform-react-jsx "^6.5.0" + babel-plugin-transform-react-jsx-source "^6.5.0" + babel-plugin-transform-regenerator "^6.5.0" + react-transform-hmr "^1.0.4" + +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + dependencies: + babel-core "^6.24.1" + babel-runtime "^6.22.0" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" + lodash "^4.2.0" + +babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.25.0" + babylon "^6.17.2" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.13.0, babylon@^6.17.2: + version "6.17.4" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +cli-cursor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-spinners@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" + +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.10.0.tgz#e1f5d3245de246d1a5ca04702fa1ad1bd7e405fe" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.1.0, convert-source-map@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +cosmiconfig@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-1.1.0.tgz#0dea0f9804efdfb929fbb1b188e25553ea053d37" + dependencies: + graceful-fs "^4.1.2" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.0.1" + os-homedir "^1.0.1" + parse-json "^2.2.0" + pinkie-promise "^2.0.0" + require-from-string "^1.1.0" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-fns@^1.27.2: + version "1.28.5" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" + +debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +dom-walk@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +"errno@>=0.1.1 <0.2.0-0": + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es6-error@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +esutils@^2.0.0, esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +fbjs@^0.8.9: + version "0.8.12" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +figures@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + dependencies: + min-document "^2.19.0" + process "~0.5.1" + +globals@^9.0.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +husky@^0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.1.tgz#8edba33e728ceed75343e88bb8002e4cbd8d1b40" + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + +iconv-lite@0.4.13, iconv-lite@~0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indent-string@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.1.0.tgz#08ff4334603388399b329e6b9538dc7a3cf5de7d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +invariant@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.1: + version "1.1.9" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.9.tgz#2827920d380d4286d857d57a2968a841db8a7ec8" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.2" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#6014b03d3470fb77638d5802508c255c06312e56" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.13.0" + istanbul-lib-coverage "^1.1.1" + semver "^5.3.0" + +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" + dependencies: + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" + +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.4" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.4" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^7.0.2" + +jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" + dependencies: + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.4" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + dependencies: + chalk "^1.1.3" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" + +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" + +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + +jest-haste-map@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" + micromatch "^2.3.11" + sane "~1.6.0" + worker-farm "^1.3.1" + +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" + +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" + dependencies: + chalk "^1.1.3" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" + dependencies: + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" + +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" + dependencies: + jest-regex-util "^20.0.3" + +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" + dependencies: + browser-resolve "^1.11.2" + is-builtin-module "^1.0.0" + resolve "^1.3.2" + +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" + dependencies: + babel-core "^6.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^7.0.2" + +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" + dependencies: + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" + natural-compare "^1.4.0" + pretty-format "^20.0.3" + +jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" + mkdirp "^0.5.1" + +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +jest@20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" + dependencies: + jest-cli "^20.0.4" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +js-yaml@^3.4.3, js-yaml@^3.7.0: + version "3.8.4" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lint-staged@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.0.tgz#c15669f598614a6e68090303e175a799d48e0d85" + dependencies: + app-root-path "^2.0.0" + cosmiconfig "^1.1.0" + execa "^0.7.0" + listr "^0.12.0" + lodash.chunk "^4.2.0" + minimatch "^3.0.0" + npm-which "^3.0.1" + p-map "^1.1.1" + staged-git-files "0.0.4" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + +listr-update-renderer@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz#44dc01bb0c34a03c572154d4d08cde9b1dc5620f" + dependencies: + chalk "^1.1.3" + cli-cursor "^1.0.2" + date-fns "^1.27.2" + figures "^1.7.0" + +listr@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.2.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.0.0-beta.11" + stream-to-observable "^0.1.0" + strip-ansi "^3.0.1" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + +lodash@^4.14.0, lodash@^4.2.0, lodash@^4.6.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +log-update@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^1.0.2" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + dependencies: + dom-walk "^0.1.0" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.1, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-fetch@^1.0.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +normalize-package-data@^2.3.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-path@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" + dependencies: + which "^1.2.10" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npm-which@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + dependencies: + commander "^2.9.0" + npm-path "^2.0.2" + which "^1.2.10" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +ora@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" + dependencies: + chalk "^1.1.1" + cli-cursor "^1.0.2" + cli-spinners "^0.1.2" + object-assign "^4.0.1" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +prettier@^1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.4.4.tgz#a8d1447b14c9bf67e6d420dcadd10fb9a4fad65a" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" + dependencies: + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" + +private@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + +promise@^7.1.1: + version "7.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.0.tgz#e7feec5aa87a2cbb81acf47d9a3adbd9d4642d7b" + dependencies: + asap "~2.0.3" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +react-deep-force-update@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7" + +react-proxy@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" + dependencies: + lodash "^4.6.1" + react-deep-force-update "^1.0.0" + +react-test-renderer@16.0.0-alpha.12: + version "16.0.0-alpha.12" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.0.0-alpha.12.tgz#9e4cc5d8ce8bfca72778340de3e1454b9d6c0cc5" + dependencies: + fbjs "^0.8.9" + object-assign "^4.1.0" + +react-transform-hmr@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz#e1a40bd0aaefc72e8dfd7a7cda09af85066397bb" + dependencies: + global "^4.3.0" + react-proxy "^1.1.7" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +rxjs@^5.0.0-beta.11: + version "5.4.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626" + dependencies: + symbol-observable "^1.0.1" + +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-support@^0.4.2: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +staged-git-files@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" + +stream-to-observable@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +symbol-observable@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +ua-parser-js@^0.7.9: + version "0.7.12" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uuid@^3.0.0, uuid@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +validator@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-7.0.0.tgz#c74deb8063512fac35547938e6f0b1504a282fd2" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-fetch@>=0.10.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-1.1.1.tgz#ac3c9d39f320c6dce5339969d054ef43dd333319" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.2.10, which@^1.2.12, which@^1.2.9: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2, wordwrap@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + dependencies: + errno ">=0.1.1 <0.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +"xtend@>=4.0.0 <4.1.0-0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/yarn.lock b/yarn.lock index 326d5a2e..1b479f17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,26 +2,16 @@ # yarn lockfile v1 -abab@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" - -acorn-globals@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" +JSONStream@^1.0.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" dependencies: - acorn "^4.0.4" + jsonparse "^1.2.0" + through ">=2.2.7 <3" -acorn@^4.0.4: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -35,40 +25,46 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.0.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" -ansi-regex@^2.0.0, ansi-regex@^2.1.1: +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + +ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.0.0: +ansi-styles@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" dependencies: color-convert "^1.0.0" -anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" - dependencies: - arrify "^1.0.0" - micromatch "^2.1.5" - app-root-path@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" dependencies: - default-require-extensions "^1.0.0" + delegates "^1.0.0" + readable-stream "^2.0.6" argparse@^1.0.7: version "1.0.9" @@ -76,525 +72,32 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" -array-equal@^1.0.0: +array-ify@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asap@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" -async@^1.4.0: +async@^1.4.0, async@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.4: - version "2.4.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -babel-core@^6.0.0, babel-core@^6.24.1: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" - dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.25.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.25.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" - slash "^1.0.0" - source-map "^0.5.0" - -babel-generator@^6.18.0, babel-generator@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" - trim-right "^1.0.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - esutils "^2.0.0" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - lodash "^4.2.0" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@20.0.3, babel-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.0.0" - babel-preset-jest "^20.0.3" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.0.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.2" - test-exclude "^4.1.1" - -babel-plugin-jest-hoist@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" - -babel-plugin-react-transform@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109" - dependencies: - lodash "^4.6.1" - -babel-plugin-syntax-async-functions@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-class-properties@^6.5.0, babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.5.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-jsx@^6.5.0, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-class-properties@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-arrow-functions@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - lodash "^4.2.0" - -babel-plugin-transform-es2015-classes@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.5.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-for-of@^6.5.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-commonjs@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-parameters@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-template-literals@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-object-assign@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-object-rest-spread@^6.5.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-display-name@^6.5.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-source@^6.5.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" - dependencies: - regenerator-transform "0.9.11" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-preset-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" - dependencies: - babel-plugin-jest-hoist "^20.0.3" - -babel-preset-react-native@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-2.0.0.tgz#c26c7066c7399df30926fa03c012ef87f2cce5b7" - dependencies: - babel-plugin-check-es2015-constants "^6.5.0" - babel-plugin-react-transform "2.0.2" - babel-plugin-syntax-async-functions "^6.5.0" - babel-plugin-syntax-class-properties "^6.5.0" - babel-plugin-syntax-flow "^6.5.0" - babel-plugin-syntax-jsx "^6.5.0" - babel-plugin-syntax-trailing-function-commas "^6.5.0" - babel-plugin-transform-class-properties "^6.5.0" - babel-plugin-transform-es2015-arrow-functions "^6.5.0" - babel-plugin-transform-es2015-block-scoping "^6.5.0" - babel-plugin-transform-es2015-classes "^6.5.0" - babel-plugin-transform-es2015-computed-properties "^6.5.0" - babel-plugin-transform-es2015-destructuring "^6.5.0" - babel-plugin-transform-es2015-for-of "^6.5.0" - babel-plugin-transform-es2015-function-name "^6.5.0" - babel-plugin-transform-es2015-literals "^6.5.0" - babel-plugin-transform-es2015-modules-commonjs "^6.5.0" - babel-plugin-transform-es2015-parameters "^6.5.0" - babel-plugin-transform-es2015-shorthand-properties "^6.5.0" - babel-plugin-transform-es2015-spread "^6.5.0" - babel-plugin-transform-es2015-template-literals "^6.5.0" - babel-plugin-transform-flow-strip-types "^6.5.0" - babel-plugin-transform-object-assign "^6.5.0" - babel-plugin-transform-object-rest-spread "^6.5.0" - babel-plugin-transform-react-display-name "^6.5.0" - babel-plugin-transform-react-jsx "^6.5.0" - babel-plugin-transform-react-jsx-source "^6.5.0" - babel-plugin-transform-regenerator "^6.5.0" - react-transform-hmr "^1.0.4" - -babel-register@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" - dependencies: - babel-core "^6.24.1" - babel-runtime "^6.22.0" - core-js "^2.4.0" - home-or-tmp "^2.0.0" - lodash "^4.2.0" - mkdirp "^0.5.1" - source-map-support "^0.4.2" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - lodash "^4.2.0" - -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" - dependencies: - babel-code-frame "^6.22.0" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" - babylon "^6.17.2" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" - dependencies: - babel-runtime "^6.22.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babylon@^6.13.0, babylon@^6.17.2: - version "6.17.4" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" @@ -602,51 +105,32 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -bser@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" - dependencies: - node-int64 "^0.4.0" - -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - dependencies: - node-int64 "^0.4.0" - builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" center-align@^0.1.1: version "0.1.3" @@ -655,7 +139,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -665,6 +149,14 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" @@ -675,6 +167,12 @@ cli-cursor@^1.0.2: dependencies: restore-cursor "^1.0.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + cli-spinners@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" @@ -686,6 +184,10 @@ cli-truncate@^0.2.1: slice-ansi "0.0.4" string-width "^1.0.1" +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -702,9 +204,16 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cmd-shim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + dependencies: + graceful-fs "^4.1.2" + mkdirp "~0.5.0" code-point-at@^1.0.0: version "1.1.0" @@ -717,40 +226,209 @@ color-convert@^1.0.0: color-name "^1.1.1" color-name@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" +columnify@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" dependencies: - delayed-stream "~1.0.0" + strip-ansi "^3.0.0" + wcwidth "^1.0.0" + +command-join@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" commander@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.10.0.tgz#e1f5d3245de246d1a5ca04702fa1ad1bd7e405fe" + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +compare-func@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" dependencies: - graceful-readlink ">= 1.0.0" + array-ify "^1.0.0" + dot-prop "^3.0.0" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -content-type-parser@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" +concat-stream@^1.4.10: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" -convert-source-map@^1.1.0, convert-source-map@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +conventional-changelog-angular@^1.3.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.4.0.tgz#118b9f7d41a3d99500bfb6bea1f3525e055e8b9b" + dependencies: + compare-func "^1.3.1" + github-url-from-git "^1.4.0" + q "^1.4.1" + read-pkg-up "^2.0.0" + +conventional-changelog-atom@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" + dependencies: + q "^1.4.1" + +conventional-changelog-cli@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.2.tgz#33abf2b5720a9b094df38e81741ccb502e1a4125" + dependencies: + add-stream "^1.0.0" + conventional-changelog "^1.1.4" + lodash "^4.1.0" + meow "^3.7.0" + tempfile "^1.1.1" + +conventional-changelog-codemirror@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334" + dependencies: + q "^1.4.1" + +conventional-changelog-core@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" + dependencies: + conventional-changelog-writer "^1.1.0" + conventional-commits-parser "^1.0.0" + dateformat "^1.0.12" + get-pkg-repo "^1.0.0" + git-raw-commits "^1.2.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^1.2.0" + lodash "^4.0.0" + normalize-package-data "^2.3.5" + q "^1.4.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" +conventional-changelog-ember@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" + dependencies: + q "^1.4.1" -core-js@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +conventional-changelog-eslint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2" + dependencies: + q "^1.4.1" + +conventional-changelog-express@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce" + dependencies: + q "^1.4.1" + +conventional-changelog-jquery@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" + dependencies: + q "^1.4.1" + +conventional-changelog-jscs@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" + dependencies: + q "^1.4.1" + +conventional-changelog-jshint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-writer@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^1.0.0" + dateformat "^1.0.11" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.0.0" + meow "^3.3.0" + semver "^5.0.1" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" + dependencies: + conventional-changelog-angular "^1.3.4" + conventional-changelog-atom "^0.1.0" + conventional-changelog-codemirror "^0.1.0" + conventional-changelog-core "^1.9.0" + conventional-changelog-ember "^0.2.6" + conventional-changelog-eslint "^0.1.0" + conventional-changelog-express "^0.1.0" + conventional-changelog-jquery "^0.1.0" + conventional-changelog-jscs "^0.1.0" + conventional-changelog-jshint "^0.1.0" + +conventional-commits-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + +conventional-commits-parser@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-commits-parser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-recommended-bump@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c" + dependencies: + concat-stream "^1.4.10" + conventional-commits-filter "^1.0.0" + conventional-commits-parser "^2.0.0" + git-raw-commits "^1.2.0" + git-semver-tags "^1.2.1" + meow "^3.3.0" + object-assign "^4.0.1" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" cosmiconfig@^1.1.0: version "1.1.0" @@ -765,6 +443,13 @@ cosmiconfig@^1.1.0: pinkie-promise "^2.0.0" require-from-string "^1.1.0" +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -773,138 +458,102 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" - -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" dependencies: - cssom "0.3.x" + array-find-index "^1.0.1" -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" dependencies: - assert-plus "^1.0.0" + number-is-nan "^1.0.0" date-fns@^1.27.2: version "1.28.5" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" -debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" +dateformat@^1.0.11, dateformat@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" dependencies: - ms "2.0.0" + get-stdin "^4.0.1" + meow "^3.3.0" -decamelize@^1.0.0, decamelize@^1.1.1: +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" dependencies: - strip-bom "^2.0.0" + clone "^1.0.2" -delayed-stream@~1.0.0: +delegates@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -diff@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" +dot-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + dependencies: + is-obj "^1.0.0" -ecc-jsbn@~0.1.1: +duplexer@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - -"errno@>=0.1.1 <0.2.0-0": - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - error-ex@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" -es6-error@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98" - escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@^1.6.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -esutils@^2.0.0, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" +execa@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" + dependencies: + cross-spawn "^4.0.0" + get-stream "^2.2.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" -exec-sh@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" +execa@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" dependencies: - merge "^1.1.3" + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" execa@^0.7.0: version "0.7.0" @@ -922,59 +571,13 @@ exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - -fb-watchman@^1.8.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" - dependencies: - bser "1.0.2" - -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - dependencies: - bser "^2.0.0" - -fbjs@^0.8.9: - version "0.8.12" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.9" + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" figures@^1.7.0: version "1.7.0" @@ -983,26 +586,11 @@ figures@^1.7.0: escape-string-regexp "^1.0.5" object-assign "^4.1.0" -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" + escape-string-regexp "^1.0.5" find-up@^1.0.0: version "1.1.2" @@ -1011,66 +599,105 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: locate-path "^2.0.0" -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-port@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.1.0.tgz#ef01b18a84ca6486970ff99e54446141a73ffd3e" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" +git-raw-commits@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" dependencies: - assert-plus "^1.0.0" + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" + gitconfiglocal "^1.0.0" + pify "^2.3.0" -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" +git-semver-tags@^1.2.0, git-semver-tags@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" dependencies: - is-glob "^2.0.0" + meow "^3.3.0" + semver "^5.0.1" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + dependencies: + ini "^1.3.2" + +github-url-from-git@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: +glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1081,30 +708,21 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -global@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" dependencies: - min-document "^2.19.0" - process "~0.5.1" - -globals@^9.0.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - -handlebars@^4.0.3: +handlebars@^4.0.2: version "4.0.10" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" dependencies: @@ -1114,76 +732,31 @@ handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -home-or-tmp@^2.0.0: +has-flag@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.4.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" -html-encoding-sniffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" - dependencies: - whatwg-encoding "^1.0.1" +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" -husky@^0.14.1: - version "0.14.1" - resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.1.tgz#8edba33e728ceed75343e88bb8002e4cbd8d1b40" - dependencies: - is-ci "^1.0.10" - normalize-path "^1.0.0" - strip-indent "^2.0.0" +iconv-lite@^0.4.17: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" -iconv-lite@0.4.13, iconv-lite@~0.4.13: - version "0.4.13" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" indent-string@^2.1.0: version "2.1.0" @@ -1202,15 +775,32 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -invariant@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" +ini@^1.3.2: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^3.0.6: + version "3.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.0.tgz#45b44c2160c729d7578c54060b3eed94487bb42b" + dependencies: + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" invert-kv@^1.0.0: version "1.0.0" @@ -1236,24 +826,6 @@ is-ci@^1.0.10: dependencies: ci-info "^1.0.0" -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" @@ -1266,49 +838,41 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + +is-text-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + dependencies: + text-extensions "^1.0.0" is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0: +isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1316,370 +880,30 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul-api@^1.1.1: - version "1.1.9" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.9.tgz#2827920d380d4286d857d57a2968a841db8a7ec8" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-hook "^1.0.7" - istanbul-lib-instrument "^1.7.2" - istanbul-lib-report "^1.1.1" - istanbul-lib-source-maps "^1.2.1" - istanbul-reports "^1.1.1" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" - -istanbul-lib-hook@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#6014b03d3470fb77638d5802508c255c06312e56" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.13.0" - istanbul-lib-coverage "^1.1.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" - dependencies: - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" - dependencies: - debug "^2.6.3" - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" - dependencies: - handlebars "^4.0.3" - -jest-changed-files@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" - -jest-cli@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" - dependencies: - ansi-escapes "^1.4.0" - callsites "^2.0.0" - chalk "^1.1.3" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - istanbul-api "^1.1.1" - istanbul-lib-coverage "^1.0.1" - istanbul-lib-instrument "^1.4.2" - istanbul-lib-source-maps "^1.1.0" - jest-changed-files "^20.0.3" - jest-config "^20.0.4" - jest-docblock "^20.0.3" - jest-environment-jsdom "^20.0.3" - jest-haste-map "^20.0.4" - jest-jasmine2 "^20.0.4" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve-dependencies "^20.0.3" - jest-runtime "^20.0.4" - jest-snapshot "^20.0.3" - jest-util "^20.0.3" - micromatch "^2.3.11" - node-notifier "^5.0.2" - pify "^2.3.0" - slash "^1.0.0" - string-length "^1.0.1" - throat "^3.0.0" - which "^1.2.12" - worker-farm "^1.3.1" - yargs "^7.0.2" - -jest-config@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" - dependencies: - chalk "^1.1.3" - glob "^7.1.1" - jest-environment-jsdom "^20.0.3" - jest-environment-node "^20.0.3" - jest-jasmine2 "^20.0.4" - jest-matcher-utils "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-validate "^20.0.3" - pretty-format "^20.0.3" - -jest-diff@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" - dependencies: - chalk "^1.1.3" - diff "^3.2.0" - jest-matcher-utils "^20.0.3" - pretty-format "^20.0.3" - -jest-docblock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" - -jest-environment-jsdom@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" - dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" - jsdom "^9.12.0" - -jest-environment-node@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" - dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" - -jest-haste-map@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - jest-docblock "^20.0.3" - micromatch "^2.3.11" - sane "~1.6.0" - worker-farm "^1.3.1" - -jest-jasmine2@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" - dependencies: - chalk "^1.1.3" - graceful-fs "^4.1.11" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-matchers "^20.0.3" - jest-message-util "^20.0.3" - jest-snapshot "^20.0.3" - once "^1.4.0" - p-map "^1.1.1" - -jest-matcher-utils@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" - dependencies: - chalk "^1.1.3" - pretty-format "^20.0.3" - -jest-matchers@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" - dependencies: - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" - -jest-message-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" - dependencies: - chalk "^1.1.3" - micromatch "^2.3.11" - slash "^1.0.0" - -jest-mock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" - -jest-regex-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" - -jest-resolve-dependencies@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" - dependencies: - jest-regex-util "^20.0.3" - -jest-resolve@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" - dependencies: - browser-resolve "^1.11.2" - is-builtin-module "^1.0.0" - resolve "^1.3.2" - -jest-runtime@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" - dependencies: - babel-core "^6.0.0" - babel-jest "^20.0.3" - babel-plugin-istanbul "^4.0.0" - chalk "^1.1.3" - convert-source-map "^1.4.0" - graceful-fs "^4.1.11" - jest-config "^20.0.4" - jest-haste-map "^20.0.4" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-util "^20.0.3" - json-stable-stringify "^1.0.1" - micromatch "^2.3.11" - strip-bom "3.0.0" - yargs "^7.0.2" - -jest-snapshot@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" - dependencies: - chalk "^1.1.3" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-util "^20.0.3" - natural-compare "^1.4.0" - pretty-format "^20.0.3" - -jest-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" - dependencies: - chalk "^1.1.3" - graceful-fs "^4.1.11" - jest-message-util "^20.0.3" - jest-mock "^20.0.3" - jest-validate "^20.0.3" - leven "^2.1.0" - mkdirp "^0.5.1" - -jest-validate@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" - dependencies: - chalk "^1.1.3" - jest-matcher-utils "^20.0.3" - leven "^2.1.0" - pretty-format "^20.0.3" - -jest@20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" - dependencies: - jest-cli "^20.0.4" - -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" - -js-yaml@^3.4.3, js-yaml@^3.7.0: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" +js-yaml@^3.4.3: + version "3.9.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce" dependencies: argparse "^1.0.7" - esprima "^3.1.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jsdom@^9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" - dependencies: - abab "^1.0.3" - acorn "^4.0.4" - acorn-globals "^3.1.0" - array-equal "^1.0.0" - content-type-parser "^1.0.1" - cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" - escodegen "^1.6.1" - html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" - parse5 "^1.5.1" - request "^2.79.0" - sax "^1.2.1" - symbol-tree "^3.2.1" - tough-cookie "^2.3.2" - webidl-conversions "^4.0.0" - whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" - xml-name-validator "^2.0.1" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + esprima "^4.0.0" -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" +jschardet@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.0.tgz#a61f310306a5a71188e1b1acd08add3cfbb08b1e" -json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" -jsprim@^1.2.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" - dependencies: - assert-plus "1.0.0" - extsprintf "1.0.2" - json-schema "0.2.3" - verror "1.3.6" +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" kind-of@^3.0.2: version "3.2.2" @@ -1687,12 +911,6 @@ kind-of@^3.0.2: dependencies: is-buffer "^1.1.5" -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -1703,20 +921,49 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" +lerna@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea" dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" + async "^1.5.0" + chalk "^1.1.1" + cmd-shim "^2.0.2" + columnify "^1.5.4" + command-join "^2.0.0" + conventional-changelog-cli "^1.3.1" + conventional-recommended-bump "^1.0.0" + dedent "^0.7.0" + execa "^0.6.3" + find-up "^2.1.0" + fs-extra "^3.0.1" + get-port "^3.1.0" + glob "^7.1.2" + globby "^6.1.0" + graceful-fs "^4.1.11" + inquirer "^3.0.6" + is-ci "^1.0.10" + load-json-file "^2.0.0" + lodash "^4.17.4" + minimatch "^3.0.4" + npmlog "^4.1.0" + p-finally "^1.0.0" + path-exists "^3.0.0" + read-cmd-shim "^1.0.1" + read-pkg "^2.0.0" + rimraf "^2.6.1" + safe-buffer "^5.0.1" + semver "^5.1.0" + signal-exit "^3.0.2" + strong-log-transformer "^1.0.6" + temp-write "^3.3.0" + write-file-atomic "^2.1.0" + write-json-file "^2.1.0" + write-pkg "^3.0.1" + yargs "^8.0.1" lint-staged@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.0.tgz#c15669f598614a6e68090303e175a799d48e0d85" + version "4.0.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.2.tgz#8e83e11e9e1656c09b6117f6db0d55fd4960a1c0" dependencies: app-root-path "^2.0.0" cosmiconfig "^1.1.0" @@ -1785,6 +1032,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -1792,11 +1048,28 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + lodash.chunk@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" -lodash@^4.14.0, lodash@^4.2.0, lodash@^4.6.1: +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -1817,11 +1090,12 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" dependencies: - js-tokens "^3.0.0" + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" lru-cache@^4.0.1: version "4.1.1" @@ -1830,51 +1104,42 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" +make-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" dependencies: - tmpl "1.0.x" - -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" + pify "^2.3.0" -mime-db@~1.27.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.15" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" dependencies: - mime-db "~1.27.0" + mimic-fn "^1.0.0" -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" dependencies: - dom-walk "^0.1.0" + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.0, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -1884,63 +1149,41 @@ minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.1, minimist@^1.2.0: +minimist@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" + +minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@^0.5.1: +mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -node-fetch@^1.0.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" +modify-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" +moment@^2.6.0: + version "2.18.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" -node-notifier@^5.0.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" - dependencies: - growly "^1.3.0" - semver "^5.3.0" - shellwords "^0.1.0" - which "^1.2.12" +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -normalize-package-data@^2.3.2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" - -normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - npm-path@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" @@ -1961,30 +1204,24 @@ npm-which@^3.0.1: npm-path "^2.0.2" which "^1.2.10" +npmlog@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.9 < 2.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -once@^1.3.0, once@^1.4.0: +once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -1994,6 +1231,12 @@ onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -2001,17 +1244,6 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - ora@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" @@ -2021,17 +1253,19 @@ ora@^0.2.3: cli-spinners "^0.1.2" object-assign "^4.0.1" -os-homedir@^1.0.0, os-homedir@^1.0.1: +os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" +os-locale@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4" dependencies: + execa "^0.5.0" lcid "^1.0.0" + mem "^1.1.0" -os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -2053,14 +1287,9 @@ p-map@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" +parse-github-repo-url@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c" parse-json@^2.2.0: version "2.2.0" @@ -2068,10 +1297,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" - path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -2090,10 +1315,6 @@ path-key@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -2102,11 +1323,13 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" -pify@^2.0.0, pify@^2.3.0: +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -2120,86 +1343,27 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - prettier@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.4.4.tgz#a8d1447b14c9bf67e6d420dcadd10fb9a4fad65a" - -pretty-format@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" - dependencies: - ansi-regex "^2.1.1" - ansi-styles "^3.0.0" - -private@^0.1.6: - version "0.1.7" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + version "1.5.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.3.tgz#59dadc683345ec6b88f88b94ed4ae7e1da394bfe" -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - -promise@^7.1.1: - version "7.3.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.0.tgz#e7feec5aa87a2cbb81acf47d9a3adbd9d4642d7b" - dependencies: - asap "~2.0.3" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" +q@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -react-deep-force-update@^1.0.0: +read-cmd-shim@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7" - -react-proxy@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" - dependencies: - lodash "^4.6.1" - react-deep-force-update "^1.0.0" - -react-test-renderer@16.0.0-alpha.12: - version "16.0.0-alpha.12" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.0.0-alpha.12.tgz#9e4cc5d8ce8bfca72778340de3e1454b9d6c0cc5" - dependencies: - fbjs "^0.8.9" - object-assign "^4.1.0" - -react-transform-hmr@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz#e1a40bd0aaefc72e8dfd7a7cda09af85066397bb" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" dependencies: - global "^4.3.0" - react-proxy "^1.1.7" + graceful-fs "^4.1.2" read-pkg-up@^1.0.1: version "1.0.1" @@ -2208,7 +1372,14 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg@^1.0.0: +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0, read-pkg@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" dependencies: @@ -2216,32 +1387,32 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -regenerator-runtime@^0.10.0: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" +readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" -remove-trailing-separator@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" repeat-string@^1.5.2: version "1.6.1" @@ -2253,33 +1424,6 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.79.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -2292,16 +1436,6 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -resolve@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" - dependencies: - path-parse "^1.0.5" - restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -2309,6 +1443,13 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -2321,44 +1462,40 @@ rimraf@^2.6.1: dependencies: glob "^7.0.5" -rxjs@^5.0.0-beta.11: - version "5.4.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626" +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" dependencies: - symbol-observable "^1.0.1" + is-promise "^2.1.0" -safe-buffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" -sane@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +rxjs@^5.0.0-beta.11: + version "5.4.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.2.tgz#2a3236fcbf03df57bae06fd6972fd99e5c08fcf7" dependencies: - anymatch "^1.3.0" - exec-sh "^0.2.0" - fb-watchman "^1.8.0" - minimatch "^3.0.2" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.10.0" + symbol-observable "^1.0.1" -sax@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" +safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -"semver@2 || 3 || 4 || 5", semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -set-blocking@^2.0.0: +set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -2369,33 +1506,29 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" - -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" +slide@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + +sort-keys@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" dependencies: - hoek "2.x.x" + is-plain-obj "^1.0.0" -source-map-support@^0.4.2: - version "0.4.15" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" dependencies: - source-map "^0.5.6" + is-plain-obj "^1.0.0" source-map@^0.4.4: version "0.4.4" @@ -2403,16 +1536,10 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -2427,24 +1554,22 @@ spdx-license-ids@^1.0.2: version "1.2.2" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" +split2@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" + dependencies: + through2 "^2.0.2" + +split@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.0.tgz#c4395ce683abcd254bc28fe1dabb6e5c27dcffae" + dependencies: + through "2" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - staged-git-files@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" @@ -2453,12 +1578,6 @@ stream-to-observable@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" -string-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" - dependencies: - strip-ansi "^3.0.0" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -2467,9 +1586,18 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" +string-width@^2.0.0, string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" @@ -2477,9 +1605,11 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-bom@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" strip-bom@^2.0.0: version "2.0.0" @@ -2487,87 +1617,98 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strong-log-transformer@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3" + dependencies: + byline "^5.0.0" + duplexer "^0.1.1" + minimist "^0.1.0" + moment "^2.6.0" + through "^2.3.4" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" +supports-color@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.0.tgz#ad986dc7eb2315d009b4d77c8169c2231a684037" dependencies: - has-flag "^1.0.0" + has-flag "^2.0.0" symbol-observable@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" -symbol-tree@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" -test-exclude@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" +temp-write@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.3.0.tgz#c1a96de2b36061342eae81f44ff001aec8f615a9" dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -throat@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + graceful-fs "^4.1.2" + is-stream "^1.1.0" + make-dir "^1.0.0" + pify "^2.2.0" + temp-dir "^1.0.0" + uuid "^3.0.1" -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" +tempfile@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" -to-fast-properties@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +text-extensions@^1.0.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" -tough-cookie@^2.3.2, tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" +through2@^2.0.0, through2@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: - punycode "^1.4.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + readable-stream "^2.1.5" + xtend "~4.0.1" -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" dependencies: - safe-buffer "^5.0.1" + os-tmpdir "~1.0.1" -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" -ua-parser-js@^0.7.9: - version "0.7.12" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@^2.6: version "2.8.29" @@ -2582,7 +1723,19 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" -uuid@^3.0.0, uuid@^3.1.0: +universalify@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" @@ -2593,79 +1746,39 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -validator@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-7.0.0.tgz#c74deb8063512fac35547938e6f0b1504a282fd2" - -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" - dependencies: - extsprintf "1.0.2" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - dependencies: - makeerror "1.0.x" - -watch@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - -webidl-conversions@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" - -whatwg-encoding@^1.0.1: +wcwidth@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" - dependencies: - iconv-lite "0.4.13" - -whatwg-fetch@>=0.10.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-1.1.1.tgz#ac3c9d39f320c6dce5339969d054ef43dd333319" - -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" + defaults "^1.0.3" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.2.10, which@^1.2.12, which@^1.2.9: +which@^1.2.10, which@^1.2.9: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: isexe "^2.0.0" +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -wordwrap@0.0.2, wordwrap@~0.0.2: +wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -worker-farm@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" - dependencies: - errno ">=0.1.1 <0.2.0-0" - xtend ">=4.0.0 <4.1.0-0" +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" wrap-ansi@^2.0.0: version "2.1.0" @@ -2678,11 +1791,33 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -xml-name-validator@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" +write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.1.0.tgz#1769f4b551eedce419f0505deae2e26763542d37" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + slide "^1.1.5" + +write-json-file@^2.1.0, write-json-file@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876" + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^2.0.0" + sort-keys "^1.1.1" + write-file-atomic "^2.0.0" + +write-pkg@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" + dependencies: + sort-keys "^2.0.0" + write-json-file "^2.2.0" -"xtend@>=4.0.0 <4.1.0-0": +xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -2694,29 +1829,29 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" dependencies: - camelcase "^3.0.0" + camelcase "^4.1.0" -yargs@^7.0.2: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" +yargs@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: - camelcase "^3.0.0" + camelcase "^4.1.0" cliui "^3.2.0" decamelize "^1.1.1" get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" + string-width "^2.0.0" + which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^5.0.0" + yargs-parser "^7.0.0" yargs@~3.10.0: version "3.10.0"