Get Checkout Url
You can get checkout url from PaymentType
object
BasicPayment paymentType = new BasicPayment(10f);
ChapaUtil.getCheckoutUrl(paymentType, new ChapaGetCheckOutUrlCallBack() {
/**
*
* @param checkoutUrl chapa checkoutUrl
*/
@Override
public void onSuccess(String checkoutUrl) {
// the checkout url is returned here
}
/**
* Called when error occurred in getting checkout url
*
* @param error [ChapaError]
*/
@Override
public void onFail(ChapaError error) {
// TODO your code here
}
});
val paymentType = BasicPayment(10)
ChapaUtil.getCheckoutUrl(paymentType,object : ChapaGetCheckOutUrlCallBack {
/**
*
* @param checkoutUrl chapa checkoutUrl
*/
override fun onSuccess(checkoutUrl: String?) {
// the checkout url is returned here
}
/**
* Called when error occurred in getting checkou url
*
* @param error [ChapaError]
*/
override fun onFail(error: ChapaError?) {
// TODO your code here
}
})