Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesHi fellow code warrior, we hope you enjoy our local payment api and to keep evolving we want to collect as much feedback as possible.
So if you have any remarks/improvements please share it with us here.
To get going with the SDK we would like to introduce our global flow which is maintained through the api:
The following steps will guide you through your journey as a ccv integrator:
In the onCreate method of your MainActivity you need to initialize the Android SDK like follows:
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { MAPI.initialize(this); }
This information is required to create the terminal request object which is used across the api.
We have 3 possible android pos integrations which will have their own tip & tricks:
The compatibility is for all possible solutions. As our api uses some Java 8 features that are not compatible with all Android API Levels. If your projects provides support for Android API Levels that don’t support Java 8 features you will need to add some this functionality to your app build.gradle file.
Here you can find more information about Java 8 support for Android.
android { defaultConfig { // Required when setting minSdkVersion to 20 or lower multiDexEnabled true } compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true // Sets Java compatibility to Java 8 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9' }
In order to switch from the local payment engine back to the integrator-app, you need to add an intent-filter to the activity in the AndroidManifest.xml file.
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity> <intent-filter> <action android:name="eu.ccv.service.ECR" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application>
To prevent that the integrator-app restarts the activity when switching back from the local payment engine, you need to add android:launchMode=“singleTask” to the activity in the AndroidManifest.xml file.
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="orientation" android:screenOrientation="portrait" android:theme="@style/AppTheme.NoActionBar" android:launchMode="singleTask"> ... </activity> </application>
This part is still under construction, if you require more information about this please contact us here