Models - edfapay/edfa-pg-android-sdk GitHub Wiki
This page describes the EdfaPg Android SDK Models.
Response
1. EdfaPgCallback
Method |
Description |
onResult |
The custom success result callback. |
onError |
The custom error result callback. |
onFailure |
The unhandled exception callback. |
onResponse |
The custom success response callback: result or error. |
2. EdfaPgResponse
Type |
Description |
Result |
The result response model. |
Error |
The error response model. |
3. EdfaPgResult
Basically, it is a sealed class
with the different types of a result model inside.
4. EdfaPgError
The payment error data model. Read more about errors.
Request
1. EdfaPgCard
Field |
Description |
number |
The credit card number. |
expireMonth |
The month of expiry of the credit card. Month in form XX. |
expireYear |
The year of the expiry of the credit card. Year in the form XXXX. |
cvv |
The CVV/CVC2 credit card verification code. 3-4 symbols. |
Before the request, a card will be automatically validated and formatted.
To use the testing environment, please use test cards.
2. EdfaPgRecurringOptions
Field |
Description |
firstTransactionId |
Transaction ID of the primary transaction in the Payment Platform. UUID format value. |
token |
Value obtained during the primary transaction. UUID format value. |
3. EdfaPgSaleOptions
Field |
Description |
channelId |
Payment channel (Sub-account). String up to 16 characters. |
recurringInit |
Initialization of the transaction with possible following recurring. |
4. EdfaPgOrder
Field |
Description |
id |
Transaction ID in the Merchants system. String up to 255 characters. |
amount |
The amount of the transaction. Numbers in the form XXXX.XX (without leading zeros). |
description |
Description of the transaction (product name). String up to 1024 characters. |
currency |
The currency. 3-letter code. |
5. EdfaPgPayer
Field |
Description |
firstName |
Customer’s name. String up to 32 characters. |
lastName |
Customer’s surname. String up to 32 characters. |
address |
Customer’s address. String up to 255 characters. |
country |
Customer’s country. 2-letter code. |
city |
Customer’s city. String up to 32 characters. |
zip |
ZIP-code of the Customer. String up to 32 characters. |
email |
Customer’s email. String up to 256 characters. |
phone |
Customer’s phone. String up to 32 characters. |
ip |
IP-address of the Customer. XXX.XXX.XXX.XXX. |
options |
The optional EdfaPgPayerOptions . |
6. EdfaPgPayerOptions
Field |
Description |
middleName |
Customer’s middle name. String up to 32 characters. |
birthdate |
Customer’s birthday. Format: yyyy-MM-dd, e.g. 1970-02-17. |
address2 |
The adjoining road or locality of the сustomer’s address. String up to 255 characters. |
state |
Customer’s state. String up to 32 characters. |
7. Hash
Hash is signature rule used either to validate your requests to payment platform or to validate callback from payment platform to your system. It must be md5 encoded string calculated by rules below:
md5(strtoupper(strrev(email).CLIENT_PASS.strrev(substr(card_number,0,6).substr(card_number,-4))))
md5(strtoupper(strrev(email).CLIENT_PASS.trans_id.strrev(substr(card_number,0,6).substr(card_number,-4))))