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.
implementation 'eu.livotov.labs.android:3DSView:x.y.z@aar'
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.
eu.livotov.labs.android.d3s.D3SView
to your layout file (or create and add it programmatically)Activity
or Fragment
, configure the instance of D3SView
by calling DS3View#setAuthorizationListener(D3SViewAuthorizationListener)
.
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.
For a quick sample see the checkout the 3DSViewSample sub project in this repo.
Any ideas/bugs/etc, as well as pull requests, are welcome in the issues section.
Alex Askerov (@askerov), Mia Alexiou (@subsymbolic), Luke Korth (@lkorth), Christophe Beyls (@cbeyls), Owen O Byrne (@owenobyrne)