setCardno("4187427415564246")
set the card numbersetCvv("828")Set the CVVsetExpirymonth("09")set the expiry monthsetExpiryyear("19")set the expiry yearsetCurrency("NGN")Set the currency (defaults to NGN) (Optional)setCountry("NG")Set the country (defaults to Nigeria) (Optional)setPin("3310")Set The customers pinsetSuggested_auth("PIN")sets the suggested authsetAmount("1000")Set the amountsetEmail("flamekeed@gmail.com")Set the customers emailsetPhonenumber("08020000000")Set the customers phone numbersetFirstname("Oluwole")Set the customers first namesetLastname("Adebiyi")Set the customers last namesetIP("127.0.0.0")Set the IP addresssetTxRef("CA-GHHH-KLJH1234")Set the txrefsetRedirect_url("http://www.google.com")Set the redirect urlsetDevice_fingerprint("GFHGJGU$#%$RGUHU_<GGDGHFG")set the device finger print(Optional)setCharge_type("preauth")sets the charge typesetTransaction_reference("ACHG-1520028650995")This is the unique reference/ flwRef, unique to the particular transaction being carried out. It is generated for every transaction. This can be retrieved from the account charge responsesetOtp("12345")set the customers otp
-
chargeMasterAndVerveCard()
This charges the clients using mastercard and verve cards
returns
JSONObject -
chargeMasterAndVerveCard(boolean polling)
This charges the clients using mastercard and verve cards when there is timeout
returns
JSONObject -
chargeVisaAndIntl()
This charges the clients using local visa cards and intl cards
returns
JSONObject -
chargeVisaAndIntl(boolean polling)
This charges the clients using local visa cards and intl cards when there is timeout
returns
JSONObject -
validateCardChargeVB()
This validates card charge for visa cards and intl cards
returns `JSONObject`
-
validateCardCharge(boolean polling)
This validates card charge for mastercards and verve cards when there is timeout
returns
JSONObject -
validateCardCharge()
This validates card charge for mastercards and verve cards
returns
JSONObject
- To use this method you have to set the fields needed and the charge accordingly
RaveConstant.PUBLIC_KEY="FLWPUBK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-X";
RaveConstant.SECRET_KEY="FLWSECK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-X";
RaveConstant.ENVIRONMENT=Environment.STAGING; //or live
CardCharge payload=new CardCharge();
payload.setCardno("4187427415564246")
.setCvv("828")
.setCurrency("NGN")
.setCountry("NG")
.setAmount("9000")
.setExpiryyear("19")
.setExpirymonth("09")
.setEmail("sogunledolapo@gmail.com")
.setIP("103.238.105.185")
.setTxRef("MXX-ASC-4578")
.setDevice_fingerprint("69e6b7f0sb72037aa8428b70fbe03986c");
//for master card and verve
payload.setPin("3310")
.setSuggested_auth("PIN");
JSONObject charge= ch.chargeMasterAndVerveCard();
//if timeout
JSONObject poll=ch.chargeMasterAndVerveCard(true);
//for visa and intl cards
payload.setRedirect_url("http://www.google.com");
JSONObject chargevisa=payload.chargeVisaAndIntl();
//if timeout, poll
JSONObject pollvisa=payload.chargeVisaAndIntl(true);
//validate
payload.setOtp("12345")
.setTransaction_reference("FLW-MOCK-75dd012dc6c6b58807d69d0e89432e9f");
JSONObject validateCharge=payload.validateCardCharge();
//if timeout, poll
JSONObject validatepoll=payload.validateCardCharge(true);
payload.setAuthUrl("");
payload.validateCardChargeVB();