##Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.wagaana:EasyPay-API:0.02'
}
new Request(MainActivity.this)
.setAmountToPay("500")
.setCurrency("UGX")
.setPaymentReason("some reason")
.setClientSecret("your secret")
.setClientID("your client id")
.initialize();
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == EP_REQUEST_CODE && resultCode == RESULT_OK) {
String stringResponse = data.getStringExtra("response");
Toast.makeText(this, stringResponse, Toast.LENGTH_SHORT).show();
}
}