Skip to content

Spring Boot Library for Chargily ePay Gateway

Notifications You must be signed in to change notification settings

errros/chargily-epay-springboot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chargily ePay Gateway Spring Boot

Chargily ePay Gateway

Integrate ePayment gateway with Chargily easily.

  • Currently support payment by CIB / EDAHABIA cards and soon by Visa / Mastercard
  • This is a Spring Boot jar, If you are using another programing language Browse here or look to API documentation

Requirements

  1. JDK 11 or later.
  2. Spring Boot Version 2.5 or later
  3. Get your API Key/Secret from ePay by Chargily dashboard for free

Installation

  1. Via Maven (Recomended)
    it will be published into mvn central soon.

  2. Manually
    downlaod the jar file and add it as a library into your project ePay by Chargily

Quick start

Create an Invoice Object

        Invoice invoice = new Invoice("client","client_email","invoice_number",
                500.0/*amount*/,25.0/*discount*/,"back_url","webhook_url", PaymentMode/*enum EDAHABIA,CIB*/,
                "comment");

Instantiate a ChargilyService via a constructor

ChargilyService chargilyService = new ChargilyService();

OR inject it into your class

public class example{

@Autowired
private ChargilyService chargilyService;

/*
  your code

*/
}

Start a payment

ResponseEntity<ChargilyResponse> response = chargilyService.createPayment(invoiceObj,"APIKEY");
response.getBody().getCheckout_url();

Validate a signature

if(chargilyService.isSignatureValid("signature","APISecretKey","ResponseData")){

    /*
    your coce 
    */
}

Contribution tips

  1. Make a fork of this repo.
  2. Take a tour to our API documentation here
  3. Get your API Key/Secret from ePay by Chargily dashboard for free.
  4. Start developing.
  5. Finished? Push and merge.

About

Spring Boot Library for Chargily ePay Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%