This package allows you to invoke the CinetPay payment gateway, make a payment and wait for the status of the initiated payment to the second after the payment is completed
The use of the package is the simplest possible, in its use, it is to invoke it with :
Start the installation by cloning CinetPay Android SDK on Github
com.cinetpay:androidsdk
to your build.gradle
dependencies
dependencies {
implementation 'com.cinetpay:androidsdk:1.0.0'
}
To function, the counter must receive data such as :
Mandatory
Obligatory
Mandatory
In order to make the payment, some data must be submitted to prepare the counter. Thus, we have :
(>= 100 XOF)
| Integer | Obligatory
Obligatory
Obligatory
.Obligatory
.ALL
- MOBILE_MONEY
- CREDIT_CARD
- WALLET
. Default: 'ALL'
Any combination is applicable to comma separated: 'MOBILE_MONEY, WALLET'
| Character string | Optional*
| Character string | Optional*
| String | Optional*
| String | Optional*
| String | Optional*
| Character string | Optional*
| String | Optional*
| Character string | Optional
Note :
*
Mandatory if using the banking universe (CREDIT_CARD)
To initiate a payment add your credentials in the: app/src/main/java/com/cinetpay/androidsdk/sample/activities/MainActivity.java
String api_key = ""; // TODO A remplacer par votre clé API
String site_id = ""; // TODO A remplacer par votre Site ID
The different answers of the requests (success or error) are registered in the log : app/src/main/java/com/cinetpay/androidsdk/sample/MyCinetPayWebAppInterface.java
@Override
@JavascriptInterface
public void onResponse(String response) {
Log.d("MyCinetPayWebApp", response);
}
@Override
@JavascriptInterface
public void onError(String response) {
Log.d("MyCinetPayWebApp", response);
}