Git Product home page Git Product logo

wallee-ios-sdk's Introduction

wallee-ios-sdk

This project allows to integrate the wallee payment service into iOS apps.

Basic Usage

The simplest way to use the SDK is by instantiating a WALFlowConfigurationBuilder with a WALCredentialsFetcher. If you are interested in life cycle events of the payment flow you should adopt the WALPaymentFlowDelegate protocol and add yourself as the delegate to the WALFlowConfigurationBuilder.

With this a basic configuration is valid and can be used to create a WALFlowCoordinator.

Be sure to keep a strong reference to the WALFlowCoordinator because the whole payment process is not self contained and terminates once it is not referenced by anyone anymore.

Once you start the payment process by [WALFlowCoordinator start] the coordinator pulls all required data automatically via the credentialsFetcher. The payment process itself runs in a view container which the implementing app has to present. The simplest way to do this is by simply showing it as a modal ViewController.

Receive the view container via the coordinators properties: coordinator.paymentContainer.viewController.

The WALPaymentFlowDelegate has mandatory delegate methods which are indicating the payment process terminal state. As in either success or failure.

The WALCredentialsFetcher is responsible for fetching the access credentials to the web service API. The access user ID and the HMAC key of the user need to be stored securely on the merchant backend server. They cannot be stored within the application. The backend server can request for a particular transaction temporary credentials which grants temporary access to the transaction. Those credentials can be forwarded to the app. This way the merchant keeps control over what the user of the app is allowed to do.

The WALFlowCoordinator has generally the following flow:

  1. Allow the user to select a token from a list of tokens.
  2. When the user wants to use another payment method or if there are not tokens stored for the user a list of payment methods is presented.
  3. When the user selects a payment method the form for collecting the data (like credit card number) is loaded.
  4. The form is submitted and the transaction is processed.

This flow can be adapted see the advanced usage section for more information about this.

Sample App

To run the sample application the easiest way is to checkout the repository and to launch the WalleeSDKExample through XCode.

The sample app shows how to use the WALFlowCoordinator with a default configuration. This is the simplest way to use the SDK.

To see how to use the WALFlowCoordinator the best is to take a look at the sample app.

Documentation

For detailed information about wallee API please see wallee documentation.

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.