Addons for programming languages
Kotlin
Kotlin Library for Chargily ePay Gateway
FYI, this module uses async/await
.
We will add this to MAVEN as soon as possible.
// Create a client instance
val chargilyClient: Chargily = Chargily("Put your API KEY HERE ")
// Create an invoice model
val invoice: InnoviceModel =
InnoviceModel(
"mohameed",
"mohamed.hacine00@gmail.com",
"3545644",
009999.4,
7.5,
"https://www.yourwebsite.com",
"https://www.yourwebsite.com/purshase",
PaymentMethod.EDAHABIA,
"Hola "
)
GlobalScope.launch {
val response = chargilyClient.createPayment(invoice)
val checkout = response.body()?.checkout_url.toString()
println(checkout)
}