No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
VelocityCardSample
VelocityLibrary
.gitignore
README.md
license.md

README.md

Android-sdk

This is the velocity Android SDK implementation.
It has the implementation of all the transaction payment solution methods for a merchant application who wants to access the Velocity payment gateway.

At the center of this SDK, there is the class com.android.velocity.VelocityProcessor.
The signature of the constructor of this class is as below:
public VelocityProcessor(String sessionToken,String identityToken, String appProfileId, String merchantProfileId, String workFlowId, boolean isTestAccount)
@parameter sessionToken - initializes the value for session token.
@parameter identityToken - initializes the value for identity token.
@parameter appProfileId - initializes the value for application profile Id.
@parameter merchantProfileId - initializes the value for merchant profile Id.
@parameter workFlowId - initializes the value for workflow Id.
@parameter isTestAccount - works as a flag for the TestAccount.

1. VelocityProcessor


This class provides the implementation of the following methods:
1. createCardToken
2. authorize
3. authorizeAndCapture
4. capture
5. undo
6. adjust
7. returnById
8. returnUnLinked
9.queryTransactionDetails
10.captureAll

1.1 createCardToken(...)


The method is responsible for the invocation of verify operation on the Velocity REST server.

public VelocityResponse createCardToken(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the verify request VelocityPaymentTransaction
1.cardType - String
2.cardholderName - String
3.panNumber-String
4.expiryDate - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.cVData - String
12.amount - String
13.currencyCode - String
14.customerPresent - String
15.employeeId - String
16.entryMode - String
17.industryType - String
18.email - String
19.transactionDateTime - String
20.city -String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
       velocityPaymentTransaction.setCardType("Visa"); 
     velocityPaymentTransaction.setCardholderName("ashish"); 
     velocityPaymentTransaction.setPanNumber("4012888812348882"); 
	 velocityPaymentTransaction.setExpiryDate("0113"); 
	 velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setcVData("123"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided");
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 

@returnType VelocityResponse
Sample code
1.Request a createCardToken() method from API .
VelocityResponse velocityResponse=velocityProcessor.createCardToken(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
	    	//Here get the successful status then show the corresponding message.
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Created card Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }

CreateCardToken with swipe data:

public VelocityResponse createCardToken(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the verify request VelocityPaymentTransaction
1.cardType - String
2.track2Data -String
3.track1Data -String
4.city -String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.transactionDateTime - String
12.amount - String
13.currencyCode - String
14.customerPresent - String
15.employeeId - String
16.entryMode - String
17.industryType - String
18.email - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
       velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setTrack2Data("4012000033330026=09041011000012345678"); 
      velocityPaymentTransaction.setTrack1Data("%B4012000033330026^NAJEER/SHAIK ^0904101100001100000000123456780?"); 
	  velocityPaymentTransaction.setStreet("4 corporate sq"); 
	  velocityPaymentTransaction.setStateProvince("CO"); 
	  velocityPaymentTransaction.setPostalCode("80202"); 
	  velocityPaymentTransaction.setPhone("7849477899"); 
	  velocityPaymentTransaction.setCvDataProvided("Provided");
	  velocityPaymentTransaction.setAmount("12.34"); 
	  velocityPaymentTransaction.setCurrencyCode("USD"); 
	  velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	  velocityPaymentTransaction.setEmployeeId("11"); 
	  velocityPaymentTransaction.setEntryMode("TrackDataFromMSR"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 

@returnType VelocityResponse
Sample code
1.Request a createCardToken() method from API .
VelocityResponse velocityResponse=velocityProcessor.createCardToken(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
	    	//Here get the successful status then show the corresponding message.
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Created card Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }	   

1.2 authorize(...)


The method is responsible for the invocation of authorize operation on the Velocity REST server.
public VelocityResponse authorize(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.street - String
2.stateProvince - String
3.postalCode - String
4.phone - String
5.state - String
6.cvDataProvided - String
7.reportingDataReference String
8.transactionDataReference String
9.amount - String
10.currencyCode - String
11.customerPresent - String
12. partialShipment - boolean
13.signatureCaptured - boolean
14.quasiCash - boolean
15.email - String
16.transactionDateTime - String
17.city -String
18.partialApprovalCapable-String
19.country - String
20.tipAmount - String
21.employeeId - String
22.entryMode - String
23.industryType - String
24.countryCode - String
25.businnessName - String
26.comment - String
27.description - String
28.paymentAccountDataToken - String
29.cashBackAmount - String
30.goodsType - String
31.invoiceNumber - String
32.orderNumber - String
33.FeeAmount - String

How to set the Ui value on VelocityPaymentTransaction model


	VelocityPaymentTransaction  velocityPaymentTransaction=new VelocityPaymentTransaction();<br/>
	
     	 velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 
	velocityPaymentTransaction.setPaymentAccountDataToken("78af6524-3325-4a01-be0f-3eea3378d62421664463-8f5f-4c87-bba2-d572d6b70d55"); 

@returnType VelocityResponse

Sample code
1.Request a authorize() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorize(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }

Authorize with swipe data:

public VelocityResponse authorize(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the verify request VelocityPaymentTransaction
1.cardType - String
2.track2Data -String
3.track1Data -String
4.city -String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.transactionDateTime - String
12.amount - String
13.currencyCode - String
14.customerPresent - String
15.employeeId - String
16.entryMode - String
17.industryType - String
18.email - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
       velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setTrack2Data("4012000033330026=09041011000012345678"); 
      velocityPaymentTransaction.setTrack1Data("%B4012000033330026^NAJEER/SHAIK ^0904101100001100000000123456780?"); 
	  velocityPaymentTransaction.setStreet("4 corporate sq"); 
	  velocityPaymentTransaction.setStateProvince("CO"); 
	  velocityPaymentTransaction.setPostalCode("80202"); 
	  velocityPaymentTransaction.setPhone("7849477899"); 
	  velocityPaymentTransaction.setCvDataProvided("Provided");
	  velocityPaymentTransaction.setAmount("12.34"); 
	  velocityPaymentTransaction.setCurrencyCode("USD"); 
	  velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	  velocityPaymentTransaction.setEmployeeId("11"); 
	  velocityPaymentTransaction.setEntryMode("TrackDataFromMSR"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 

@returnType VelocityResponse
Sample code
1.Request a authorize() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorize(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
	    	//Here get the successful status then show the corresponding message.
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize : " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }	   	  

Authorize without Token Transaction:

public VelocityResponse authorize(VelocityPaymentTransaction velocityPaymentTransaction)
@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.cardType - String
2.cardholderName - String
3.panNumber-String
4.expiryDate - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.cVData - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String
35.goodsType - String
36.invoiceNumber - String
37.orderNumber - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
           velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setCardholderName("ashish"); 
      velocityPaymentTransaction.setPanNumber("4012888812348882"); 
      velocityPaymentTransaction.setExpiryDate("0113");  
	velocityPaymentTransaction.setcVData("123"); 
           velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16");
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 

@returnType VelocityResponse

Sample code
1.Request a authorize() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorize(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
		if(velocityResponse.getBankcardTransactionResponse() != null &&          velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " +   velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }

P2PE transaction for Authorize: :

public VelocityResponse authorize(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.securePaymentAccountData - String
2.encryptionKeyId - String
3.orderNumber - String
4.invoiceNumber - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.goodsType - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
        velocityPaymentTransaction.setSecurePaymentAccountData("2540E479632A5FBACD3BDB8A3798104BC5C06105421D5E6369C7F78CBEA 85647434D966CF8B4DAD1");
	 velocityPaymentTransaction.setEncryptionKeyId("9010010B257DC7000083");
         velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 

@returnType VelocityResponse

Sample code
1.Request a authorize() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorize(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
		 if(velocityResponse.getBankcardTransactionResponse() != null &&                   velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }	 

1.3 authorizeAndCapture(...)


The method is responsible for the invocation of authorizeAndCapture operation on the Velocity REST server.
public VelocityResponse authorizeAndCapture(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorizeAndCapture request VelocityPaymentTransaction
1.cashBackAmount - String
2.goodsType - String
3.invoiceNumber - String
4. orderNumber - String
5.street - String
6. stateProvince - String
7.postalCode - String
8. phone - String
9. reportingDataReference String
10. transactionDataReference String
11. state - String
12. cvDataProvided - String
13.FeeAmount - String
14. amount - String
15. currencyCode - String
16. customerPresent - String
17. employeeId - String
18. entryMode - String
19.industryType - String
20. email - String
21. transactionDateTime - String
22. city -String
23. partialShipment - boolean
24.country - String
25.signatureCaptured - boolean
26.tipAmount - String
27. quasiCash - boolean
28.partialApprovalCapable - String
29. countryCode - String
30. businnessName - String
31.comment - String
32.description - String
33.paymentAccountDataToken - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
	 velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202");
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided");
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05");
	velocityPaymentTransaction.setPaymentAccountDataToken("78af6524-3325-4a01-be0f-3eea3378d62421664463-8f5f-4c87                    -bba2-d572d6b70d55"); 

@returnType VelocityResponse

Sample code
1.Request a authorizeAndCapture() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorizeAndCapture(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message. <br/>
			 if(velocityResponse.getBankcardTransactionResponse() != null &&   velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "AuthAndCapture : " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }

AuthorizeAndCapture with swipe data:

public VelocityResponse authorizeAndCapture(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the verify request VelocityPaymentTransaction
1.cardType - String
2.track2Data -String
3.track1Data -String
4.city -String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.transactionDateTime - String
12.amount - String
13.currencyCode - String
14.customerPresent - String
15.employeeId - String
16.entryMode - String
17.industryType - String
18.email - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
       velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setTrack2Data("4012000033330026=09041011000012345678"); 
      velocityPaymentTransaction.setTrack1Data("%B4012000033330026^NAJEER/SHAIK ^0904101100001100000000123456780?"); 
	  velocityPaymentTransaction.setStreet("4 corporate sq"); 
	  velocityPaymentTransaction.setStateProvince("CO"); 
	  velocityPaymentTransaction.setPostalCode("80202"); 
	  velocityPaymentTransaction.setPhone("7849477899"); 
	  velocityPaymentTransaction.setCvDataProvided("Provided");
	  velocityPaymentTransaction.setAmount("12.34"); 
	  velocityPaymentTransaction.setCurrencyCode("USD"); 
	  velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	  velocityPaymentTransaction.setEmployeeId("11"); 
	  velocityPaymentTransaction.setEntryMode("TrackDataFromMSR"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 

@returnType VelocityResponse
Sample code
1.Request a authorizeAndCapture() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorizeAndCapture(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
	    	//Here get the successful status then show the corresponding message.
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "AuthorizeAndCapture : " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }	   	  

AuthorizeAndCapture without Token Transaction:

public VelocityResponse authorizeAndCapture(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.cardType - String
2.cardholderName - String
3.panNumber-String
4.expiryDate - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.cVData - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String
35.goodsType - String
36.invoiceNumber - String
37.orderNumber - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
           velocityPaymentTransaction.setCardType("Visa"); 
     velocityPaymentTransaction.setCardholderName("ashish");
     velocityPaymentTransaction.setPanNumber("4012888812348882"); 
	 velocityPaymentTransaction.setExpiryDate("0113"); 
	 velocityPaymentTransaction.setcVData("123"); 
          velocityPaymentTransaction.setStreet("4 corporate sq");
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce");
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber("");
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05");

@returnType VelocityResponse

Sample code
1.Request a authorizeAndCapture() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorizeAndCapture(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "AuthorizeAndCapture: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }

P2PE transaction for AuthorizeAndCapture: :

public VelocityResponse authorizeAndCapture(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.securePaymentAccountData - String
2.encryptionKeyId - String
3.orderNumber - String
4.invoiceNumber - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.goodsType - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
      velocityPaymentTransaction.setSecurePaymentAccountData("2540E479632A5FBACD3BDB8A3798104BC5C06105421D5E6369C7F78CBEA85647434D966CF8B4DAD1");
	 velocityPaymentTransaction.setEncryptionKeyId("9010010B257DC7000083");
     velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO"); 
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver");
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 

@returnType VelocityResponse

Sample code
1.Request a authorizeAndCapture() method from API .
VelocityResponse velocityResponse=velocityProcessor.authorizeAndCapture(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }	 

1.4 capture(...)


The method is responsible for the invocation of capture operation on the Velocity REST server.
public VelocityResponse capture(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the capture request VelocityPaymentTransaction.
1.transactionId - String
2.tipAmount - String
3. amount - String

How to set the Ui value on VelocityPaymentTransaction model


  VelocityPaymentTransaction  velocityPaymentTransaction=new VelocityPaymentTransaction();
  velocityPaymentTransaction.setTransactionId("AC564B5C021245D68014658C7DBE6A7B");
  velocityPaymentTransaction.setTipAmount("2.34");
 velocityPaymentTransaction.setAmount("12.34");

@returnType VelocityResponse

Sample code
1.Request a capture() method from API .
VelocityResponse velocityResponse=velocityProcessor.capture(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message. 
			 if(velocityResponse.getBankcardCaptureResponse()!=null && velocityResponse.getBankcardCaptureResponse().getStatus()!=null){  
			     Log.i("VelocityProcessor", "Capture: " + velocityResponse.getBankcardCaptureResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }

1.5 captureAll(...)


The method is responsible for capture the all transaction on the Velocity REST server.
public VelocityResponse captureAll()
@returnType VelocityResponse
Sample code
1.Request a captureAll() method from API .
VelocityResponse velocityResponse=velocityProcessor.captureAll();
2.Get the success or Error response from API.
      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message. 
			 if(velocityResponse.getArrayOfResponse()!=null && velocityResponse.getArrayOfResponse().getStatus()!=null){  
			     Log.i("VelocityProcessor", "CaptureAll: " + velocityResponse.getArrayOfResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }

1.6 undo(...)


The method is responsible for the invocation of undo operation on the Velocity REST server.
public VelocityResponse undo(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the undo request VelocityPaymentTransaction
1. transactionId - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();

velocityPaymentTransaction.setTransactionId("AC564B5C021245D68014658C7DBE6A7B");

@returnType VelocityResponse
Sample code
1.Request a undo() method from API .
VelocityResponse velocityResponse=velocityProcessor.undo(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){   
	    	//Here get the successful status then show the corresponding message. <br/>
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){   
			     Log.i("VelocityProcessor", "undo(Void): " + velocityResponse.getBankcardTransactionResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());   

			   // TODO your business logic to complete payment...
			}
   }

1.7 adjust(...)


The method is responsible for the invocation of adjust operation on the Velocity REST server.
public VelocityResponse adjust(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the adjust request VelocityPaymentTransaction
1.amountfordjust - String
2.transactionId - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
  velocityPaymentTransaction.setAmountfordjust("10.23");
 velocityPaymentTransaction.setTransactionId("AC564B5C021245D68014658C7DBE6A7B");

@returnType VelocityResponse
Sample code
1.Request a adjust() method from API .
VelocityResponse velocityResponse=velocityProcessor.adjust(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message.  
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){  
			     Log.i("VelocityProcessor", "Adjust: " + velocityResponse.getBankcardTransactionResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());  

			   // TODO your business logic to complete payment...
			}
   }

1.8 returnById(...)


The method is responsible for the invocation of returnById operation on the Velocity REST server.
public VelocityResponse returnById(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the returnById request VelocityPaymentTransaction
1. transactionId - String
2. amount - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
   velocityPaymentTransaction.setAmount("10.23");
   velocityPaymentTransaction.setTransactionId("AC564B5C021245D68014658C7DBE6A7B");

@returnType VelocityResponse

Sample code
1.Request a returnById() method from API .
VelocityResponse velocityResponse=velocityProcessor.returnById(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message.  <br/>
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){  
			     Log.i("VelocityProcessor", "ReturnById: " + velocityResponse.getBankcardTransactionResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());  

			   // TODO your business logic to complete payment...
			}
   }

1.9 returnUnLinked(...)


The method is responsible for the invocation of returnUnLinked operation on the Velocity REST server.
public VelocityResponse returnUnLinked(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the returnUnlinked request VelocityPaymentTransaction
1. partialApprovalCapable - String
2. tipAmount - String
3. FeeAmount - String
4. orderNumber - String

5. street - String
6. stateProvince - String
7. postalCode - String
8. phone - String
9. reportingDataReference String
10. transactionDataReference String
11. state - String
12. cvDataProvided - String
13. amount - String
14. currencyCode - String
15. customerPresent - String
16. employeeId - String
17. entryMode - String
18. industryType - String
19. email - String
20. transactionDateTime - String
21. city -String
22. quasiCash - boolean
23. country - String
24. transactionId- String
25. signatureCaptured - boolean
26. partialShipment - boolean
27. countryCode - String
28. businnessName - String
29. comment - String
30. description - String
31. paymentAccountDataToken - String
32. cashBackAmount - String
33. goodsType - String
34.invoiceNumber - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
	 velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO");
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
     velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com");
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001");
	velocityPaymentTransaction.setTransactionDataReference("xyt");
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05");
       velocityPaymentTransaction.setPaymentAccountDataToken("78af6524-3325-4a01-be0f-3eea3378d62421664463-8f5f-4c87               -bba2-d572d6b70d55"); 

@returnType VelocityResponse
Sample code
1.Request a returnUnLinked() method from API .
VelocityResponse velocityResponse=velocityProcessor.returnUnLinked(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){   
	    	//Here get the successful status then show the corresponding message.   <br/>
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){   
			     Log.i("VelocityProcessor", "returnUnLinked: " + velocityResponse.getBankcardTransactionResponse().getStatus());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){  
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }

ReturnUnlinked with swipe data:

public VelocityResponse returnUnlinked(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the verify request VelocityPaymentTransaction
1.cardType - String
2.track2Data -String
3.track1Data -String
4.city -String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.transactionDateTime - String
12.amount - String
13.currencyCode - String
14.customerPresent - String
15.employeeId - String
16.entryMode - String
17.industryType - String
18.email - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
       velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setTrack2Data("4012000033330026=09041011000012345678"); 
      velocityPaymentTransaction.setTrack1Data("%B4012000033330026^NAJEER/SHAIK ^0904101100001100000000123456780?"); 
	  velocityPaymentTransaction.setStreet("4 corporate sq"); 
	  velocityPaymentTransaction.setStateProvince("CO"); 
	  velocityPaymentTransaction.setPostalCode("80202"); 
	  velocityPaymentTransaction.setPhone("7849477899"); 
	  velocityPaymentTransaction.setCvDataProvided("Provided");
	  velocityPaymentTransaction.setAmount("12.34"); 
	  velocityPaymentTransaction.setCurrencyCode("USD"); 
	  velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	  velocityPaymentTransaction.setEmployeeId("11"); 
	  velocityPaymentTransaction.setEntryMode("TrackDataFromMSR"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 

@returnType VelocityResponse
Sample code
1.Request a returnUnlinked() method from API .
VelocityResponse velocityResponse=velocityProcessor.returnUnlinked(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
	    	//Here get the successful status then show the corresponding message.
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "RetrunUnlinked : " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId()); 

			   // TODO your business logic to complete payment...
			}
   }	   	  	   

ReturnUnlinked without Token Transaction:

public VelocityResponse returnUnlinked(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.cardType - String
2.cardholderName - String
3.panNumber-String
4.expiryDate - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.cVData - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String
35.goodsType - String
36.invoiceNumber - String
37.orderNumber - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
           velocityPaymentTransaction.setCardType("Visa"); 
      velocityPaymentTransaction.setCardholderName("ashish"); 
      velocityPaymentTransaction.setPanNumber("4012888812348882"); 
	 velocityPaymentTransaction.setExpiryDate("0113");
	 velocityPaymentTransaction.setcVData("123"); 
     velocityPaymentTransaction.setStreet("4 corporate sq"); 
	 velocityPaymentTransaction.setState("CO");
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001");
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber(""); 
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 

@returnType VelocityResponse

Sample code
1.Request a returnUnlinked() method from API .
VelocityResponse velocityResponse=velocityProcessor.returnUnlinked(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }

P2PE transaction for ReturnUnlinked:

public VelocityResponse returnUnlinked(VelocityPaymentTransaction velocityPaymentTransaction)

@parameter velocityPaymentTransaction - holds the values for the authorize request VelocityPaymentTransaction
1.securePaymentAccountData - String
2.encryptionKeyId - String
3.orderNumber - String
4.invoiceNumber - String
5.street - String
6.stateProvince - String
7.postalCode - String
8.phone - String
9.state - String
10.cvDataProvided - String
11.goodsType - String
12.reportingDataReference String
13.transactionDataReference String
14.amount - String
15.currencyCode - String
16.customerPresent - String
17. partialShipment - boolean
18.signatureCaptured - boolean
19.quasiCash - boolean
20.email - String
21.transactionDateTime - String
22.city -String
23.partialApprovalCapable-String
24.country - String
25.tipAmount - String
26.employeeId - String
27.entryMode - String
28.industryType - String
29.countryCode - String
30.businnessName - String
31.comment - String
32.description - String
33.FeeAmount - String
34.cashBackAmount - String

How to set the Ui value on VelocityPaymentTransaction model


VelocityPaymentTransaction velocityPaymentTransaction=new VelocityPaymentTransaction();
         velocityPaymentTransaction.setSecurePaymentAccountData("2540E479632A5FBACD3BDB8A3798104BC5C06105421D5E6369C7F78CBEA85647434D966CF8B4DAD1");
	 velocityPaymentTransaction.setEncryptionKeyId("9010010B257DC7000083");
     velocityPaymentTransaction.setStreet("4 corporate sq");
	 velocityPaymentTransaction.setState("CO");
	 velocityPaymentTransaction.setStateProvince("CO"); 
	 velocityPaymentTransaction.setPostalCode("80202"); 
	 velocityPaymentTransaction.setPhone("7849477899"); 
	 velocityPaymentTransaction.setCvDataProvided("Provided"); 
	 velocityPaymentTransaction.setAmount("12.34"); 
	 velocityPaymentTransaction.setCurrencyCode("USD"); 
	 velocityPaymentTransaction.setCustomerPresent("Ecommerce"); 
	 velocityPaymentTransaction.setEmployeeId("11"); 
	 velocityPaymentTransaction.setEntryMode("Keyed"); 
	 velocityPaymentTransaction.setIndustryType("Ecommerce"); 
	 velocityPaymentTransaction.setEmail("ashishg2@chetu.com"); 
	 velocityPaymentTransaction.setTransactionDateTime("2013-04-03T13:50:16"); 
	 velocityPaymentTransaction.setCity("Denver"); 
	 velocityPaymentTransaction.setReportingDataReference("001"); 
	velocityPaymentTransaction.setTransactionDataReference("xyt"); 
	velocityPaymentTransaction.setQuasiCash(false);
	velocityPaymentTransaction.setPartialShipment(false);
	velocityPaymentTransaction.setSignatureCaptured(false);
	velocityPaymentTransaction.setPartialApprovalCapable("NotSet");
	velocityPaymentTransaction.setCountryCode("USA");
	velocityPaymentTransaction.setTipAmount("2.34");
	velocityPaymentTransaction.setBusinnessName("MomCorp");
	velocityPaymentTransaction.setComment("a test comment");
	velocityPaymentTransaction.setDescription("a test description");
	velocityPaymentTransaction.setCashBackAmount("0.0");
	velocityPaymentTransaction.setGoodsType("NotSet");
	velocityPaymentTransaction.setInvoiceNumber("");
	velocityPaymentTransaction.setOrderNumber("629203"); 
	velocityPaymentTransaction.setFeeAmount("1000.05"); 

@returnType VelocityResponse

Sample code
1.Request a returnUnlinked() method from API .
VelocityResponse velocityResponse=velocityProcessor.returnUnlinked(velocityPaymentTransaction);
2.Get the success or Error response from API.

      if(velocityResponse!=null){ 
      
	    	//Here get the successful status then show the corresponding message.
	    	
			 if(velocityResponse.getBankcardTransactionResponse() != null && velocityResponse.getBankcardTransactionResponse().getStatus()!=null){ 
			     Log.i("VelocityProcessor", "Authorize Token: " + velocityResponse.getBankcardTransactionResponse().getStatus()); 

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getErrorResponse()!=null && velocityResponse.getErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "Error response: " +velocityResponse.getErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }	 

2.0 queryTransactionDetails(...)


The method is responsible for the invocation of returnById operation on the Velocity REST server.
public VelocityResponse queryTransactionDetails(QueryTransactionsDetail queryTransactionsDetail)

@parameter queryTransactionsDetail - holds the values for the queryTransactionDetails request QueryTransactionsDetail
1. transactionId - List
2. endDateTime-String
3. transactionDetailFormat-TransactionDetailFormat
4. page-PagingParameters
5.pageSize-PagingParameters
6.batchIds()-List
7.startDateTime-String

How to set the Ui value on QueryTransactionsDetail model


                    QueryTransactionsDetail queryTransactionsDetail=new QueryTransactionsDetail();
    	        queryTransactionsDetail.setTransactionDetailFormat(com.velocity.enums.TransactionDetailFormat.CWSTransaction);
		queryTransactionsDetail.getPagingParameters().setPage(0);
		queryTransactionsDetail.getPagingParameters().setPageSize(10);
		queryTransactionsDetail.setIncludeRelated(true);
		queryTransactionsDetail.getQueryTransactionsParameters().getTransactionDateRange().setStartDateTime("2015-03-13 02:03:40");
	    queryTransactionsDetail.getQueryTransactionsParameters().getTransactionDateRange().setEndDateTime("2015-03-14 02:03:40");
		queryTransactionsDetail.getQueryTransactionsParameters().getTransactionIds().add("D2449805BD0A437C8FFA6A61AA207589");

@returnType VelocityResponse

Sample code
1.Request a queryTransactionDetails() method from API .
VelocityResponse velocityResponse=velocityProcessor.queryTransactionDetails(queryTransactionsDetail );
2.Get the success or Error response from API.

      if(velocityResponse!=null){  
	    	//Here get the successful status then show the corresponding message.  <br/>
			 if(velocityResponse.velocityResponse.getTransactionDetailList() != null ){  
			 List<TransactionDetail> transactionDetailList =velocityResponse.getTransactionDetailList();
			for (TransactionDetail transactionDetail : transactionDetailList) {
			     Log.i("VelocityProcessor", "QueryTransactionDetails: " + transactionDetail.getTransactionInformation().getTransactionStatusCode());  

			   // TODO your business logic to complete payment...

			 } else if(velocityResponse.getJsonErrorResponse()!=null &&    velocityResponse.getJsonErrorResponse().getErrorId()!=null){ 
			 
			   Log.i("VelocityProcessor", "JsonErrorResponse: " +velocityResponse.getJsonErrorResponse().getErrorId());

			   // TODO your business logic to complete payment...
			}
   }

2. VelocityResponse


This class implements the responses coming from the Velocity server for a payment transaction request.
It has the following attributes with name and datatype.
1. statusCode - String
2. message - String
3. bankcardTransactionResponse - com.velocity.verify.response.BankcardTransactionResponsePro
4. bankcardCaptureResponse - com.velocity.verify.response.BankcardCaptureResponse
5. arrayOfResponse-com.velocity.model.captureAll.response.ArrayOfResponse
6. errorResponse - com.velocity.verify.response.ErrorResponse
7. transactionDetail-com.velocity.model.transactions.TransactionDetail

2.1 BankcardTransactionResponsePro


This class has the following main attributes with its name and data type.
1. status - String
2. statusCode - String
3. statusMessage - String
4. transactionId - String
5. originatorTransactionId - String
6. serviceTransactionId - String <br/ 7. addendum - Addendum
8. captureState - String
9. transactionState - String
10. acknowledged - boolean
11. prepaidCard - String
12. reference - String
13. amount - String
14. cardType - String
15. feeAmount - String
16. approvalCode - String
17. avsResult - AVSResult
18. batchId - String
19. cVResult - String
20. cardLevel - String
21. downgradeCode - String
22. maskedPAN - String
23. paymentAccountDataToken - String
24. retrievalReferenceNumber - String
25. resubmit - String
26. settlementDate - String
27. finalBalance - String
28. orderId - String
29. cashBackAmount - String
30. adviceResponse - String
31. date - String
32. time - String
33. time zone - String
34. commercialCardResponse - String
35. returnedACI - String

2.2 BankcardCaptureResponse


This class has the following main attributes with its name and datatype.

1. status - String
2. statusCode - String
3. statusMessage - String
4. transactionId - String
5. originatorTransactionId - String
6. serviceTransactionId - String
7. date - String
8. time - String
9. time zone - String
10. addendum - Addendum
11. captureState - String
12. transactionState - String
13. acknowledged - String
14. reference - String
15. batchId - String
16. industryType - String
17. transactionSummaryData - TransactionSummaryData
18. prepaidCard - String

2.3 ArrayOfResponse


1. status - String
2. statusCode - String
3. statusMessage - String
4. transactionId - String
5. originatorTransactionId - String
6. serviceTransactionId - String
8. captureState - String
9. transactionState - String
10. isAcknowledged - boolean
11. prepaidCard - String
12. reference - String
13. batchId - String
14. industryType - String
15. PrepaidCard - String
16. cashBackTotals - CashBackTotals
17. netTotals - NetTotals
18. pINDebitReturnTotals - PINDebitReturnTotals
19. pINDebitSaleTotals - PINDebitSaleTotals
20. returnTotals - ReturnTotals
21. saleTotals - SaleTotals
22. voidTotals - VoidTotals

2.4 TransactionDetail


1.transactionInformation-TransactionInformation
2.familyInformation-FamilyInformation
3.completeTransaction-CompleteTransaction

2.5 ErrorResponse


This class has the following main attributes with its name and data type.

  1. errorId - String
  2. helpUrl - String
  3. operation - String
  4. reason - String
  5. ruleMessage-String
  6. ruleKey-String
  7. ruleLocationKey- String
  8. transactionId - String

3.VelocityPaymentTransaction


This class is mainly used to store the user interface value .
This class has the following main attributes with its name and data-type.
1. transactionName - String
2. state - String
3. country - String
4. amountfordjust - String
5. cardType - String
6. cardholderName - String
7. panNumber-String
8. expiryDate - String
9. street - String
10. stateProvince - String
11. postalCode - String
12. phone - String
13. cvDataProvided - String
14. cVData - String
15. amount - String
16. currencyCode - String
17. customerPresent - String
18. employeeId - String
19. entryMode - String
20. industryType - String
21. email - String
22. countryCode - String
23. businnessName - String
24. comment - String
25. description - String
26. paymentAccountDataToken - String
27. transactionDateTime - String
28. cashBackAmount - String
29. goodsType - String
30. invoiceNumber - String
31. orderNumber - String
32. FeeAmount - String
33. tipAmount - String
34. accountType - String
35. partialApprovalCapable - String
36. quasiCash - boolean
37. signatureCaptured - boolean
38. partialShipment - boolean
39. transactionId - String
40. cashBackAmount - String
41. goodsType - String
42. reportingDataReference String
43. transactionDataReference String
44. customerId - String
45. city - String
46.securePaymentAccountData
47.encryptionKeyId

3.Velocity sample android Application


The velocity sample android Application is responsible for putting the Velocity Android-SDK for test purpose.
It intends to perform the testing of transaction methods available on the Velocity payment gateway for a merchant.

When a transaction method needs to invoke from Velocity server then it sends the transaction request data and receives the response depending on the type of transaction performed on the velocity server.
The request data is send through the User Interface form which includes the fields required for a transaction.

The Velocity sample android Application is able to test the following transaction methods through its user interface.

  1. Verify - The Verify operation is used to verify information about a payment account, such as address verification data (AVSData) on a credit card account, without reserving any funds.
  2. Authorize - The Authorize operation is used to authorize transactions by performing a check on card-holder's funds and reserves the authorization amount if sufficient funds are available.
  3. Authorize W/O token - This method proceeds with the card details when payment account data token is not available.
  4. AuthorizeAndCapture - The AuthorizeAndCapture operation is used to authorize transactions by performing a check on card-holder's funds and reserves the authorization amount if sufficient funds are available, and flags the transaction for capture (settlement) in a single invocation.
  5. AuthorizeAndCapture W/O token - This method proceeds with the card details and performs the capture operation in single invocation when the payment account data token is not available.
  6. Capture - The Capture operation is used to capture a single transaction for settlement after it has been successfully authorized by the Authorize operation.
  7. Void(Undo) - The Undo operation is used to release card-holder funds by performing a void (Credit Card) or reversal (PIN Debit) on a previously authorized transaction that has not been captured (flagged) for settlement.
  8. Adjust - The Adjust operation is used to make adjustments to a previously authorized amount (incremental or reversal) prior to capture and settlement.
  9. ReturnById - The ReturnById operation is used to perform a linked credit to a card-holder’s account from the merchant’s account based on a previously authorized and settled(Captured) transaction.
  10. ReturnUnlinked - The ReturnUnlinked operation is used to perform an "unlinked", or standalone, credit to a card-holder’s account from the merchant’s account.
  11. ReturnUnlinked W/O token - This method proceeds with the card details when payment account data token is not available.
  12. QueryTransactionDetails - This method proceeds with the transactionId,batchId and dateRange etc based on anyone finding the inforation.
  13. CaptureAll - This method mainly used to capture the transaction.
    Depending upon the type of transaction performed with request input data, response is generated from the velocity server which can be viewed on the Result page.

5.Download the Eclipse IDE


1. Reference-https://eclipse.org/downloads/

6. Deployment Instructions for Android-SDK and Velocity Sample Android Application


6.1 Android SDK
1.Two jar axis-1.4.jar and velocitylibrary.jar
6.2 How to use the jar file with Eclipse IDE

  1. To use a Android library (JAR file) inside your Android project
  2. you can simple copy the JAR file into the folder called libs in your application.
  3. Right click project then select build-path/configure-build-path.
  4. Add two velocitylibrary.jar and axis-1.4.jar.

6.3 Velocity Sample Android Application

  1. Find the sample Android application file VelocityCardSample.apk inside the folder velocityCardSample/bin/

  2. install VelocityCardSample.apk file on the device.

  3. click the install file.