Setup - edfapay/edfa-pg-android-sdk GitHub Wiki
This page describes the EdfaPg Android SDK Setup guide.
1. Info Setup
You should get the following information from the administrator to begin working with the Payment Platform.
Info | Description |
---|---|
CLIENT_KEY | Unique key to identifying the account in Payment Platform (used as request parameter) |
CLIENT_PASS | Password for Client authentication in Payment Platform (used for calculating hash parameter) |
PAYMENT_URL | URL to request the Payment Platform |
Where to get this information? Follow the introduction guide.
2. Android Setup
The EdfaPg Android SDK supports two initialization methods: explicit and implicit.
Implicit
- In
AndroidManifest.xml
provide themeta-data
with following credentials:
<meta-data
android:name="com.edfapaygw.sdk.CLIENT_KEY"
android:value="merchant-client-key" />
<meta-data
android:name="com.edfapaygw.sdk.CLIENT_PASS"
android:value="merchant-client-pass" />
<meta-data
android:name="com.edfapaygw.sdk.PAYMENT_URL"
android:value="merchant-payment-url" />
The EdfaPg Android SDK credentials are the mirror of the Payment Platform fields. See above.
- Call the SDK initialization in the
Application
:
override fun onCreate() {
super.onCreate()
EdfaPgSdk.init(this)
}
Explicit
- Call the SDK initialization in the
Application
:
override fun onCreate() {
super.onCreate()
EdfaPgSdk.init(
this,
"merchant-client-key",
"merchant-client-pass",
"merchant-payment-url",
)
}
One more thing
- EdfaPg Android SDK requires the Internet permission:
<uses-permission android:name="android.permission.INTERNET" />
-
In case the SDK is not initialized the
EdfaPgSdkIsNotInitializedException
will be thrown. -
To use the testing environment, please use test cards.