wallee-payment / wallee-ios-sdk

iOS SDK for Wallee payment service

Home Page:https://wallee.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

iOS SDK for Wallee payment service

https://wallee.com

License:Apache License 2.0


Languages

Language:Objective-C 90.7%Language:Swift 7.0%Language:C 1.5%Language:Shell 0.6%Language:Ruby 0.3%