Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jhonnrodr/RisePay-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 

Repository files navigation

RisePay-Java -- Simple Risepay Payment API wrapper


You can request developer credentials from our Dev Portal.
If you would like to certify your application, then submit a Cert Lab request.

Table of Contents

Initialization

Sale Transaction

Auth Transaction

Void Transaction

Return Transaction

Capture Transaction

Initialization

To utilize this class, Risepay.java into your project, and require it. create a new instance of the class.

RisePay risepay = new RisePay("gatewayApiUser","userPassword");

Sale Transaction

To make a purchase using a credit card:

Functional API:

RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
      
Map<String, Object> resp = risepay.sale(data);
if((boolean)resp.get("Approved")){
  System.out.println("Approved. Transaction ID = " + resp.get("PNRef"));
  System.out.println("AuthCode = " + resp.get("AuthCode"));
}else{
  System.out.println("Declined: "+ resp.get("Message"));
      }

Object API:

RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
      
Map<String, Object> resp = risepay.sale(data);   
.......

Authorization Transaction

To make an authorization using a credit card:

Functional API:

RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
      
Map<String, Object> resp = risepay.auth(data);
if((boolean)resp.get("Approved")){
  System.out.println("Approved. Transaction ID = " + resp.get("PNRef"));
  System.out.println("AuthCode = " + resp.get("AuthCode"));
}else{
  System.out.println("Declined: "+ resp.get("Message"));
      }	

Void Transaction

To void a transaction:

Functional API:	
  
 RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
data.put("PNRef", 1106169);
      
Map<String, Object> resp = risepay.Void(data);
if((boolean)resp.get("Approved")){
  System.out.println("Approved. Transaction ID = " + resp.get("PNRef"));
  System.out.println("AuthCode = " + resp.get("AuthCode"));
}else{
  System.out.println("Declined: "+ resp.get("Message"));
      } 

Capture Transaction

To capture a previously Authorized transaction:

Functional API:	
 RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
data.put("PNRef", 1106169);
      
Map<String, Object> resp = risepay.capture(data);
if((boolean)resp.get("Approved")){
  System.out.println("Approved. Transaction ID = " + resp.get("PNRef"));
  System.out.println("AuthCode = " + resp.get("AuthCode"));
}else{
  System.out.println("Declined: "+ resp.get("Message"));
      }

Return Transaction

To return a payment for already batched transaction:

Functional API:

 RisePay risepay = new RisePay("demo","demo");
      
Map<String, Object> data = new HashMap<String, Object>();
      
data.put("NameOnCard", "Jhonn");
data.put("CardNum", "5149612222222229");
data.put("ExpDate", "1214");
data.put("Amount", 10);
data.put("CVNum", "678");
data.put("PNRef", 1106169);
      
Map<String, Object> resp = risepay.Return(data);
if((boolean)resp.get("Approved")){
  System.out.println("Approved. Transaction ID = " + resp.get("PNRef"));
  System.out.println("AuthCode = " + resp.get("AuthCode"));
}else{
  System.out.println("Declined: "+ resp.get("Message"));
      }

To see complete list of RisePay API variables, review our online documentation.
You can request developer credentials from our Dev Portal. If you would like to certify your application, then submit a Cert Lab request.

About

Simple Risepay Payment API wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages