Latest 1.0.0
Homepage https://github.com/brightec/3DSecureView
License Apache License, Version 2.0
Platforms ios 9.0, requires ARC
Authors

ThreeDSecureView is primarily a WKWebView that handles the 3DSecure payment process by sending a POST request to the provided card issuer URL with the MD and PaReq parameters set. The WKWebView then intercepts the POST response from the card issuer, extracts the MD and PaRes values and passes them back to your app.

Requirements

  • iOS 9.0+
  • Swift 4.0

Installation

CocoaPods

pod 'ThreeDSecureView', '~> 1.0.0'

Usage

Easy

The easiest way to use ThreeDSecureView is to instantiate ThreeDSecureViewController and present it in a UINavigationController.

let config = ThreeDSecureConfig(md: "YOUR MD", paReq: "YOUR PAREQ", cardUrl: "YOUR CARD URL")
let viewController = ThreeDSecureViewController(config: config)
viewController.delegate = self // Implement ThreeDSecureViewDelegate

let navController = UINavigationController(rootViewController: viewController)
present(navController, animated: true, completion: nil)

Handle the callbacks:

extension YourViewController: ThreeDSecureViewDelegate {

    func threeDSecure(view: ThreeDSecureView, md: String, paRes: String) {
        // Handle success here
    }

    func threeDSecure(view: ThreeDSecureView, error: Error) {
        // Handle errors here
    }

}

Advanced

If you don’t want to use the provided UIViewController, you can just instantiate ThreeDSecureView directly, add it to your view hierarchy and call start3DSecure() yourself.

Latest podspec

{
    "name": "ThreeDSecureView",
    "version": "1.0.0",
    "summary": "ThreeDSecureView allows you to handle the 3DSecure payment process in your iOS app.",
    "description": "ThreeDSecureView is primarily a WKWebView that handles the 3DSecure payment process by sending a POST request to the providedncard issuer URL with the MD and PaReq parameters set. The WKWebView then intercepts the POST response from the card issuer,nextracts the MD and PaRes values and passes them back to your app.",
    "homepage": "https://github.com/brightec/3DSecureView",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Chris Leversuch": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/brightec/3DSecureView.git",
        "tag": "1.0.0"
    },
    "source_files": "Source",
    "requires_arc": true,
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This