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
- JDK 11 or later.
- Spring Boot Version 2.5 or later
- Get your API Key/Secret from ePay by Chargily dashboard for free
-
Via Maven (Recomended)
it will be published into mvn central soon. -
Manually
downlaod the jar file and add it as a library into your project ePay by Chargily
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
*/
}
- Make a fork of this repo.
- Take a tour to our API documentation here
- Get your API Key/Secret from ePay by Chargily dashboard for free.
- Start developing.
- Finished? Push and merge.