Giter Site home page Giter Site logo

livotovlabs / 3dsview Goto Github PK

View Code? Open in Web Editor NEW
110.0 13.0 51.0 283 KB

Android UI component to process banking 3D Secure (MasterCard SecureCode / Verified By Visa) payment authorizations in Android apps.

License: Apache License 2.0

Java 100.00%
webview android android-apps visa payment-authorizations java

3dsview's Introduction

3DSView (D3SView :) , aka 3D Secure WebView

Self-contained UI component to process banking 3D Secure (MasterCard SecureCode / Verified By Visa) payment authorizations in Android apps.

Why exactly "D3S" ? Simply because Java does not allow to have number as a first character in a package and class names :)

Component have to be used instead of a WebView and handles the complete payment authorization process from redirecting user to an ACS banking server web UI and to grabbing authorization results and parameters, intercepting post events and parsing the code.

Simply add it to your layout just instead of a WebView, invoke only two methods and then you have 3DS auth implemented.

Component can be used in activity, fragment or in any other part of your layout, both declaratively (in xml files) or programmatically by creating an instance in the source code. Only make sure to give it sufficient space on the screen to display the banking ACS web page.

Status

  • Current stable version: Download
  • Current development version: n/a

Get It

  • Maven repository: jCenter
  • Group: eu.livotov.labs.android
  • Artifact ID: 3DSView
implementation 'eu.livotov.labs.android:3DSView:x.y.z@aar'

What's new (1.1.2.9)

  • Latest pull requests merged
  • Code reading

Installation

Release versions are available from jCenter repository, so just add the "implementation" statement to your project. For snapshots, please add our bintray snapshots repository url first: https://dl.bintray.com/livotovlabs/maven

dependencies {
    implementation 'eu.livotov.labs.android:3DSView:x.y.z@aar'
}

Alternatively you may download the source code and build it on your own.

Quick Usage

  1. Build your own or download precompiled 3dsview.jar from releases section and put it to the libs folder of your app project.
  2. Add eu.livotov.labs.android.d3s.D3SView to your layout file (or create and add it programmatically)
  3. In corresponding Activity or Fragment, configure the instance of D3SView by calling DS3View#setAuthorizationListener(D3SViewAuthorizationListener).
    • This adds a listener to receive authorization results and progress messages.
    • You will receive authorization MD and PaRes values there as well, when 3DSecure completes.
  4. Invoke the D3SView#authorize(String, String, String) method by passing MD, PaReq and ACS url values, you receive from your card payment gateway and listen for authorization completion event in your callback.
    • Specifying postback url is optional but recommended, the library will use a sensible default value if not set.
  5. Once user completes the authorization at the ACS server, your callback method will be automatically called with the 3DS response data, which you may then pass to your processing backend server for payment finalization.

For a quick sample see the checkout the 3DSViewSample sub project in this repo.

Bugs, Suggestions, Ideas

Any ideas/bugs/etc, as well as pull requests, are welcome in the issues section.

Credits

Alex Askerov (@askerov), Mia Alexiou (@subsymbolic), Luke Korth (@lkorth), Christophe Beyls (@cbeyls), Owen O Byrne (@owenobyrne)

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.