Package com.meawallet.mtp
Class MeaRemotePaymentData
- java.lang.Object
-
- com.meawallet.mtp.MeaRemotePaymentData
-
- All Implemented Interfaces:
RemotePaymentData
public class MeaRemotePaymentData extends java.lang.Object implements RemotePaymentData
Remote (DSRP) payment input data which should be passed toMeaCard.processRemoteTransaction(MeaRemotePaymentData, MeaRemoteTransactionListener)
.
-
-
Constructor Summary
Constructors Constructor Description MeaRemotePaymentData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeaRemotePaymentData
fromJson(java.lang.String remotePaymentDataJson)
ParseMeaRemotePaymentData
object from JSON string.java.lang.Integer
getCountryCode()
Retrieves the 3 digit numeric country code.RemoteCryptogramType
getCryptogramType()
Retrieves the cryptogram type.int
getCurrencyCode()
Retrieves the 3 digit numeric currency code.int
getOptionalUnpredictableNumber()
Retrieves the unpredictable number.long
getTransactionAmount()
Retrieves the amount of the transaction.java.util.Date
getTransactionDate()
Retrieves the date of the transaction.byte
getTransactionType()
Retrieves the type of the transaction.boolean
isValid()
Returns true if all remote payment data are valid for DSRP transaction.MeaRemotePaymentData
setCountryCode(java.lang.Integer countryCode)
Sets the 3 digit numeric country code.MeaRemotePaymentData
setCryptogramType(RemoteCryptogramType remoteCryptogramType)
Sets the cryptogram type.MeaRemotePaymentData
setCurrencyCode(int currencyCode)
Sets the 3 digit numeric currency code.MeaRemotePaymentData
setOptionalUnpredictableNumber(int optionalUnpredictableNumber)
Sets the unpredictable number (optional field).MeaRemotePaymentData
setTransactionAmount(long transactionAmount)
Sets the amount of transaction.MeaRemotePaymentData
setTransactionDay(int transactionDay)
Sets the transaction day.MeaRemotePaymentData
setTransactionMonth(int transactionMonth)
Sets the transaction month.MeaRemotePaymentData
setTransactionType(byte transactionType)
Sets the type of the transaction.MeaRemotePaymentData
setTransactionYear(int transactionYear)
Sets the transaction year.java.lang.String
toString()
-
-
-
Method Detail
-
fromJson
@Nullable public static MeaRemotePaymentData fromJson(java.lang.String remotePaymentDataJson)
ParseMeaRemotePaymentData
object from JSON string.- Parameters:
remotePaymentDataJson
- JSON string with remote payment data.- Returns:
MeaRemotePaymentData
object, or null if JSON could not be parsed.
-
getTransactionAmount
public long getTransactionAmount()
Description copied from interface:RemotePaymentData
Retrieves the amount of the transaction.- Specified by:
getTransactionAmount
in interfaceRemotePaymentData
- Returns:
- Transaction amount as long.
-
setTransactionAmount
public MeaRemotePaymentData setTransactionAmount(long transactionAmount)
Sets the amount of transaction.- Parameters:
transactionAmount
- Transaction amount as long.- Returns:
MeaRemotePaymentData
object.
-
getCurrencyCode
public int getCurrencyCode()
Description copied from interface:RemotePaymentData
Retrieves the 3 digit numeric currency code.- Specified by:
getCurrencyCode
in interfaceRemotePaymentData
- Returns:
- Currency code.
-
setCurrencyCode
public MeaRemotePaymentData setCurrencyCode(int currencyCode)
Sets the 3 digit numeric currency code.- Parameters:
currencyCode
- Currency code as integer.- Returns:
MeaRemotePaymentData
object.
-
getCountryCode
@Nullable public java.lang.Integer getCountryCode()
Description copied from interface:RemotePaymentData
Retrieves the 3 digit numeric country code.- Specified by:
getCountryCode
in interfaceRemotePaymentData
- Returns:
- Country code.
-
setCountryCode
public MeaRemotePaymentData setCountryCode(java.lang.Integer countryCode)
Sets the 3 digit numeric country code.- Parameters:
countryCode
- Country code as Integer.- Returns:
MeaRemotePaymentData
object.
-
getTransactionType
public byte getTransactionType()
Description copied from interface:RemotePaymentData
Retrieves the type of the transaction.- Specified by:
getTransactionType
in interfaceRemotePaymentData
- Returns:
- Transaction type as byte.
-
setTransactionType
public MeaRemotePaymentData setTransactionType(byte transactionType)
Sets the type of the transaction.- Parameters:
transactionType
- Transaction type as byte.- Returns:
MeaRemotePaymentData
object.
-
getCryptogramType
public RemoteCryptogramType getCryptogramType()
Description copied from interface:RemotePaymentData
Retrieves the cryptogram type.- Specified by:
getCryptogramType
in interfaceRemotePaymentData
- Returns:
- Cryptogram type.
-
setCryptogramType
public MeaRemotePaymentData setCryptogramType(RemoteCryptogramType remoteCryptogramType)
Sets the cryptogram type.- Parameters:
remoteCryptogramType
- Cryptogram type.- Returns:
MeaRemotePaymentData
object.
-
getOptionalUnpredictableNumber
public int getOptionalUnpredictableNumber()
Description copied from interface:RemotePaymentData
Retrieves the unpredictable number.- Specified by:
getOptionalUnpredictableNumber
in interfaceRemotePaymentData
- Returns:
- Optional unpredictable number as integer.
-
setOptionalUnpredictableNumber
public MeaRemotePaymentData setOptionalUnpredictableNumber(int optionalUnpredictableNumber)
Sets the unpredictable number (optional field).- Parameters:
optionalUnpredictableNumber
- Optional unpredictable number as integer.- Returns:
MeaRemotePaymentData
object.
-
getTransactionDate
public java.util.Date getTransactionDate()
Description copied from interface:RemotePaymentData
Retrieves the date of the transaction.- Specified by:
getTransactionDate
in interfaceRemotePaymentData
- Returns:
- Transaction date.
-
setTransactionDay
public MeaRemotePaymentData setTransactionDay(int transactionDay)
Sets the transaction day.- Parameters:
transactionDay
- Transaction day.- Returns:
MeaRemotePaymentData
object.
-
setTransactionMonth
public MeaRemotePaymentData setTransactionMonth(int transactionMonth)
Sets the transaction month.- Parameters:
transactionMonth
- Transaction month.- Returns:
MeaRemotePaymentData
object.
-
setTransactionYear
public MeaRemotePaymentData setTransactionYear(int transactionYear)
Sets the transaction year.- Parameters:
transactionYear
- Transaction year.- Returns:
MeaRemotePaymentData
object.
-
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-