Package com.meawallet.mtp
Class MeaRemotePaymentData
java.lang.Object
com.meawallet.mtp.MeaRemotePaymentData
- All Implemented Interfaces:
RemotePaymentData
Remote (DSRP) payment input data which should be passed to
MeaCard.processRemoteTransaction(MeaRemotePaymentData, MeaRemoteTransactionListener).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MeaRemotePaymentDataParseMeaRemotePaymentDataobject from JSON string.Retrieves the 3 digit numeric country code.Retrieves the cryptogram type.intRetrieves the 3 digit numeric currency code.intRetrieves the unpredictable number.longRetrieves the amount of the transaction.Retrieves the date of the transaction.byteRetrieves the type of the transaction.booleanisValid()Returns true if all remote payment data are valid for DSRP transaction.setCountryCode(Integer countryCode) Sets the 3 digit numeric country code.setCryptogramType(RemoteCryptogramType remoteCryptogramType) Sets the cryptogram type.setCurrencyCode(int currencyCode) Sets the 3 digit numeric currency code.setOptionalUnpredictableNumber(int optionalUnpredictableNumber) Sets the unpredictable number (optional field).setTransactionAmount(long transactionAmount) Sets the amount of transaction.setTransactionDay(int transactionDay) Sets the transaction day.setTransactionMonth(int transactionMonth) Sets the transaction month.setTransactionType(byte transactionType) Sets the type of the transaction.setTransactionYear(int transactionYear) Sets the transaction year.toString()
-
Constructor Details
-
MeaRemotePaymentData
public MeaRemotePaymentData()
-
-
Method Details
-
fromJson
ParseMeaRemotePaymentDataobject from JSON string.- Parameters:
remotePaymentDataJson- JSON string with remote payment data.- Returns:
MeaRemotePaymentDataobject, or null if JSON could not be parsed.
-
getTransactionAmount
public long getTransactionAmount()Description copied from interface:RemotePaymentDataRetrieves the amount of the transaction.- Specified by:
getTransactionAmountin interfaceRemotePaymentData- Returns:
- Transaction amount as long.
-
setTransactionAmount
Sets the amount of transaction.- Parameters:
transactionAmount- Transaction amount as long.- Returns:
MeaRemotePaymentDataobject.
-
getCurrencyCode
public int getCurrencyCode()Description copied from interface:RemotePaymentDataRetrieves the 3 digit numeric currency code.- Specified by:
getCurrencyCodein interfaceRemotePaymentData- Returns:
- Currency code.
-
setCurrencyCode
Sets the 3 digit numeric currency code.- Parameters:
currencyCode- Currency code as integer.- Returns:
MeaRemotePaymentDataobject.
-
getCountryCode
Description copied from interface:RemotePaymentDataRetrieves the 3 digit numeric country code.- Specified by:
getCountryCodein interfaceRemotePaymentData- Returns:
- Country code.
-
setCountryCode
Sets the 3 digit numeric country code.- Parameters:
countryCode- Country code as Integer.- Returns:
MeaRemotePaymentDataobject.
-
getTransactionType
public byte getTransactionType()Description copied from interface:RemotePaymentDataRetrieves the type of the transaction.- Specified by:
getTransactionTypein interfaceRemotePaymentData- Returns:
- Transaction type as byte.
-
setTransactionType
Sets the type of the transaction.- Parameters:
transactionType- Transaction type as byte.- Returns:
MeaRemotePaymentDataobject.
-
getCryptogramType
Description copied from interface:RemotePaymentDataRetrieves the cryptogram type.- Specified by:
getCryptogramTypein interfaceRemotePaymentData- Returns:
- Cryptogram type.
-
setCryptogramType
Sets the cryptogram type.- Parameters:
remoteCryptogramType- Cryptogram type.- Returns:
MeaRemotePaymentDataobject.
-
getOptionalUnpredictableNumber
public int getOptionalUnpredictableNumber()Description copied from interface:RemotePaymentDataRetrieves the unpredictable number.- Specified by:
getOptionalUnpredictableNumberin interfaceRemotePaymentData- Returns:
- Optional unpredictable number as integer.
-
setOptionalUnpredictableNumber
Sets the unpredictable number (optional field).- Parameters:
optionalUnpredictableNumber- Optional unpredictable number as integer.- Returns:
MeaRemotePaymentDataobject.
-
getTransactionDate
Description copied from interface:RemotePaymentDataRetrieves the date of the transaction.- Specified by:
getTransactionDatein interfaceRemotePaymentData- Returns:
- Transaction date.
-
setTransactionDay
Sets the transaction day.- Parameters:
transactionDay- Transaction day.- Returns:
MeaRemotePaymentDataobject.
-
setTransactionMonth
Sets the transaction month.- Parameters:
transactionMonth- Transaction month.- Returns:
MeaRemotePaymentDataobject.
-
setTransactionYear
Sets the transaction year.- Parameters:
transactionYear- Transaction year.- Returns:
MeaRemotePaymentDataobject.
-
isValid
public boolean isValid()Returns true if all remote payment data are valid for DSRP transaction.- Returns:
- Returns true/false if data is valid.
-
toString
-