Latest 0.1.3
Homepage https://github.com/Adyen/adyen-dl-ios
License MIT
Platforms ios 8.0
Frameworks Foundation
Authors

AdyenDL for iOS

CI Status
Version
License
Platform

This repository contains Adyen’s Directory Lookup (DL) library for iOS. With DL you can dynamically list all relevant local payment methods for a specific transaction, so your shopper can always pay with the method of his choice. The methods are listed based on the shopper’s country, the transaction currency and amount. After the shopper selects a payment method, the SDK provides a redirect URL to the payment method of choice. The redirect URL is loaded in a SFSafariViewController after which the payment method’s app is opened if availabe (e.g. for iDEAL). If the method’s app is not available, the (mobile optimized) web flow of the method will be shown.

This library is suited for our 250+ local payment methods. For credit card payments, please make use of the Client Side Encryption library which enables you to capture credit card details fully in-app.

Requirements

The AdyenDL-iOS library is written in Swift and is compatible with apps supporting iOS 8.0 and up.

CocoaPods v1.x is the preferred way of installation. If not installed on your machine, you can install it via your terminal:

$ sudo gem install cocoapods.

Although most of the complexity of the integration is wrapped in this library, you also need to set up a merchant server to validate the integrity of each payment request/response. Please find an example of the API for the merchants server here.

Installation

For your convenience we’ve included an example app in this repository that can be used as a reference while integrating. To try an example run in the terminal:

pod try AdyenDL

To integrate in your existing Xcode project, add to your Podfile:

pod 'AdyenDL'

To complete the installation execute the following in your terminal:

pod install

Usage

Create environment configuration and setup payments processor.

let configuration = Configuration(
    environment: .live,
    paymentSignatureURL: NSURL(string: "ENTER_URL")!,
    paymentResultSignatureURL: NSURL(string: "ENTER_URL")!,
    paymentStatusURL: NSURL(string: "ENTER_URL")!
)

let paymentsProcessor = PaymentsProcessor(configuration: configuration)

Create payment object.

let payment = Payment(
    amount: 1,
    currency: "EUR",
    country: "NL"
)

Fetch list of available payment methods.

paymentsProcessor.fetchPaymentMethodsFor(payment) { (methods, error) in
  //  Present received list of methods on a screen.
  //  ...
}

Fetch Payment URL for desired payment method.

paymentsProcessor.fetchPayURLFor(payment, payingWith: methods[1].issuers![5], completion: { (url, error) in
  //  Open received Payment URL in a browser to continue payment flow.
  //  ...
}

Licence

This repository is open source and available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AdyenDL",
    "version": "0.1.3",
    "summary": "With AdyenDL you can dynamically list all relevant local payment methods for a specific transaction.",
    "description": "With AdyenDL you can dynamically list all relevant local payment methods for a specific transaction, so your shopper can always pay with the method of his choice. The methods are listed based on the shopper's country, the transaction currency and amount. After the shopper selects a payment method, the SDK provides a redirect URL to the payment method of choice.nnThis library is suited for our 250+ local payment methods.",
    "homepage": "https://github.com/Adyen/adyen-dl-ios",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adyen": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Adyen/adyen-dl-ios.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AdyenDL/Classes/**/*",
    "frameworks": "Foundation",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This