GithubHelp home page GithubHelp logo

mehulparmar4ever / stripe-ios-example Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 4.0 755 KB

The Stripe iOS SDK makes it quick and easy to build an excellent payment experience in your iOS app.

License: MIT License

Swift 98.42% Ruby 1.58%
stripe stripe-api ios-swift ephemeral-keys customer-keys stripe-charge stripe-token stripe-customer stppaymentcardtextfield stpapiclient

stripe-ios-example's Introduction

Stripe iOS Example

Custom iOS Integration Guide

Accepting payments in your app involves 3 steps:

  • Collecting your user's payment details
  • Converting the credit card information to a Stripe single-use token
  • Sending this token to your server to create a charge

STPPaymentCardTextField

  • The STPPaymentCardTextField class is a single-line text field that can be used to collect a credit card number, expiration, CVC, and postal code. The field also performs on-the-fly validation and formatting so that it can provide the user instant feedback. In fact, the STPAddCardViewController class uses it under the hood.

STPAPIClient + STPCardParams

  • If you're collecting your users' card details by using the STPPaymentCardTextField class or building your own credit card form, you can use the STPAPIClient class to handle tokenizing those details. First, assemble an STPCardParams instance with the information you've collected. Then, use the STPAPIClient class to convert that into an STPToken instance which you can then pass to your server.

Please change below perameters as per your requirements in AppDelegate file

  1. publishableKey
  2. appleMerchantIdentifier (if Apple pay added)
  3. companyName

I have also added PHP backend code in project

  • You can check it in PHPCode.swift file (Tested and working perfect)

stripe-ios-example's People

Contributors

mehulparmar4ever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.