-
public class PayuUtilsCreated by franklin on 6/18/15. Payu util class provides protected, public functions to sdk and App. Use the SBI_MAES_BIN set to find whether the number is state bank maestro number or not Use the validateCardNumber method to validate user card number, it includes length luhn validation. Use the luhn method to validate card number, use this function only if you validate length at your end. Use the getIssuer method to get the issuer, it will return the issuer from {VISA, AMEX, MAES, MAST, SMAE, LASER, DINR, JCB} use the validateCvv method to validate cvv, AMEX has 4 digit, SMAE has no cvv, other has 3 dight cvv. use the validateExpiry method to validate whether the card is expired or not!. use the concatParams method to concat both params1 and param2 using equal to (=) and add a ampersand at the end! adding default argumentsgetReturnDatagetReturnData use the getReturnData to send the data back to app as PostData use the trimAmpersand remove leading ampersand if any!.
-
-
Method Summary
Modifier and Type Method Description static StringvalueOf(Object o)StringconcatParams(String key, String value, boolean shouldEncode)just to make our life easier, lets define a functionconcat two strings with equal sign and add an ampersand at the end static StringappendKeyValueToStingBuilder(String key, Object value)static booleanvalidateCardEndDate(String date)static booleancompareDates(String startDate, String endDate)static BooleansupportedBankCodesForDCEmi(String bankCode)static intparseInt(String s)static BooleansupportedBankCodesForCardlessEmi(String bankCode)static StringgetProductDetailsJsonArray(PaymentParams mPaymentParams)function to getJsonArrayString for wealthTech tpv txn booleanisValidTxnId(String txnId)-
-
Method Detail
-
concatParams
String concatParams(String key, String value, boolean shouldEncode)
just to make our life easier, lets define a functionconcat two strings with equal sign and add an ampersand at the end
- Parameters:
key- example txnidvalue- example payu12345
-
appendKeyValueToStingBuilder
static String appendKeyValueToStingBuilder(String key, Object value)
-
validateCardEndDate
static boolean validateCardEndDate(String date)
-
compareDates
static boolean compareDates(String startDate, String endDate)
-
supportedBankCodesForDCEmi
static Boolean supportedBankCodesForDCEmi(String bankCode)
-
supportedBankCodesForCardlessEmi
static Boolean supportedBankCodesForCardlessEmi(String bankCode)
-
getProductDetailsJsonArray
static String getProductDetailsJsonArray(PaymentParams mPaymentParams)
function to getJsonArrayString for wealthTech tpv txn
-
isValidTxnId
boolean isValidTxnId(String txnId)
-
-
-
-