then to make a payment simply inject the ChargilyClient in your service
either by constructor or field injection like this (constructor injection is preferred, but I will use field injection
just for demo)
Copy
public class MyService{@Autowiredprivate ChargilyEpayClient client;public void makePayment(){ InvoiceModel invoice = new InvoiceModel( "someClient", "someEmail@mail.com", "1000", BigDecimal.valueOf(75.0), 55d, "https://backurl.com/", "https://webhookurl.com/", Mode.CIB, "a comment" ); //handle response after you get it as a call back client.makePayment(invoice, new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { //in case of failure } @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { //in case of success } }); }}