Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.44 KB

File metadata and controls

18 lines (12 loc) · 1.44 KB

Custom Integration (ObjC)

This example app demonstrates how to to use STPAPIClient to accept various payment methods. This may be a useful reference if you're building your own payment UI and not using STPPaymentContext.

For a detailed guide, see https://stripe.com/docs/mobile/ios/custom

For more details on using Sources, see https://stripe.com/docs/mobile/ios/sources

  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. Execute ./setup.sh from the root of the repository to build the necessary dependencies
  3. Open ./Stripe.xcworkspace (not ./Stripe.xcodeproj) with Xcode
  4. Fill in the stripePublishableKey constant in ./Example/Custom Integration (ObjC)/Constants.m with your test "Publishable key" from Stripe. This key should start with pk_test.
  5. Head to example-ios-backend and click "Deploy to Heroku". Provide your Stripe test "Secret key" as the STRIPE_TEST_SECRET_KEY environment variable. This key should start with sk_test.
  6. Fill in the backendBaseURL constant in Constants.m with the app URL Heroku provides (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.