Go to file
Brian Dorfman 0e38aae137 Adds support for Contacts framework
If you are on the appropriate ios version, does work using CNContact or PKContact in places instead of ABAddressRef
2017-04-20 15:49:27 -07:00
.github more github stuffs 2016-07-20 22:22:39 +01:00
Example xcode 8.3 updates 2017-04-03 16:25:16 -04:00
FauxPasConfig ignore border punctuation rule 2016-12-15 15:30:12 -05:00
Stripe Adds support for Contacts framework 2017-04-20 15:49:27 -07:00
Stripe.xcodeproj Adds support for Contacts framework 2017-04-20 15:49:27 -07:00
Stripe.xcworkspace remove osx example 2015-08-06 10:54:31 -04:00
StripeiOSResources remove CFBundleExecutable from resources bundle 2016-08-24 22:51:20 -04:00
Tests Adds support for Contacts framework 2017-04-20 15:49:27 -07:00
ci_scripts separate xcodebuild test and build 2017-04-17 15:00:57 -04:00
docs update documentation 2017-03-15 15:02:22 -04:00
.clang-format introduce style defaults with clang-format 2014-10-22 15:20:32 -04:00
.cocoapods.yml add Stripe iOS Example (Simple).xcworkspace 2016-04-27 16:32:45 -04:00
.gitignore update .gitignore 2016-07-12 15:02:01 -04:00
.jazzy.yaml update ci scripts 2016-06-27 19:19:46 +01:00
.phraseapp.yml Add phraseapp push/pull scripts 2016-08-25 16:51:06 -07:00
.travis.yml add travis_retry 2017-04-17 13:53:50 -04:00
CHANGELOG update CHANGELOG 2017-03-15 14:55:12 -04:00
Cartfile.private Move cartfile -> cartfile.private 2016-11-04 11:57:32 -07:00
Cartfile.resolved add OCMock 2017-03-28 15:17:42 -07:00
LICENSE
MIGRATING.md Add state machine logic to context 2017-03-27 18:32:13 -07:00
README.md update README.md 2017-03-07 12:43:38 -05:00
Stripe.podspec Adds support for Contacts framework 2017-04-20 15:49:27 -07:00
VERSION update version 2017-03-15 14:57:49 -04:00

README.md

Stripe iOS SDK

Travis CocoaPods Carthage compatible CocoaPods CocoaPods

The Stripe iOS SDK make it easy to collect your users' credit card details inside your iOS app. By creating tokens, Stripe handles the bulk of PCI compliance by preventing sensitive card data from hitting your server (for more, see our article about PCI compliance).

We also offer seamless integration with Apple Pay that will allow you to securely collect payments from your customers in a way that prevents them from having to re-enter their credit card information.

Requirements

Our SDK is compatible with iOS apps supporting iOS 8.0 and above. It requires Xcode 8.0+ to build the source.

If you need iOS 7 or Xcode 7 compatibility, the last supported SDK release is version 8.0.7.

Integration

We've written a guide that explains everything from installation, to creating payment tokens, to Apple Pay integration and more.

For more fine-grained information on all of the classes and methods in our SDK, consult our full SDK reference.

Example apps

There are 2 example apps included in the repository:

  • Stripe iOS Example (Simple) shows an integration using our prebuilt UI components [Swift]
  • Stripe iOS Example (Custom) shows how to use our low-level methods to accept payments using several different payment methods [Objective-C].

To build and run the example apps, open Stripe.xcworkspace and choose the appropriate scheme.

Getting started with the iOS example apps

Note: all the example apps require Xcode 8.0 to build and run.

Before you can run the apps, you need to provide them with your Stripe publishable key.

  1. If you haven't already, sign up for a Stripe account (it takes seconds). Then go to https://dashboard.stripe.com/account/apikeys.
  2. Replace the stripePublishableKey constant in CheckoutViewController.swift (for the Simple app) or Constants.m (for the Custom app) with your Test Publishable Key.
  3. Head to https://github.com/stripe/example-ios-backend and click "Deploy to Heroku" (you may have to sign up for a Heroku account as part of this process). Provide your Stripe test secret key for the STRIPE_TEST_SECRET_KEY field under 'Env'. Click "Deploy for Free".
  4. Replace the backendBaseURL variable in the example iOS app with the app URL Heroku provides you with (e.g. "https://my-example-app.herokuapp.com")

After this is done, you can make test payments through the app and see them in your Stripe dashboard. Head to https://stripe.com/docs/testing#cards for a list of test card numbers.

Running the tests

  1. Install Carthage (if you have homebrew installed, brew install carthage)
  2. From the root of the repo, install test dependencies by running carthage bootstrap --platform ios --configuration Release --no-use-binaries
  3. Open Stripe.xcworkspace
  4. Choose the "StripeiOS" scheme with the iPhone 6, iOS 10.1 simulator (required for snapshot tests to pass)
  5. Run Product -> Test

Migrating from older versions

See MIGRATING.md