Version: 2.1.3

Migrating from 1.x.x to 2.x.x

This migration is fairly simple. The changes for each SDK are highlighted.

Your Android App
public class PaymentActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// ...
bharatxPaymentOption.setOnClickListener(new View.OnClickListener() {
@Override
void onClick(View view) {
BharatXCommonUtilManager.confirmTransactionWithUser(
PaymentActivity.this,
amountInPaise,
phoneNumber,
new BharatXCommonUtilManager.TransactionConfirmationListener() {
@Override
public void onUserConfirmedTransaction() {
// user confirmed that they want to proceed with the transaction!
}
@Override
public void onUserAcceptedPrivacyPolicy() {
// user accepted privacy policy.
// register our Alternate Data manager.
AlternateDataManager.register(MainActivity.this);
}
@Override
public void onUserCancelledTransaction() {
// user cancelled transaction.
// allow user to choose other payment options.
}
// optional
@Override
public void onFailure(
@NotNull BharatXCommonUtilManager.TransactionFailureReason transactionFailureReason
) {
// could not get transaction confirmation
// from the user due to a failure
}
});
}
});
// ...
}
}