1. Documentation

Bohudur Integration Guide


This guide provides step-by-step instructions to integrate the Bohudur payment gateway into your Android application.

First add Bohudur library on your Android Studio project.

implementation 'com.github.BohudurOne:Android-Studio-Library:1.0'

Step 1: Initialize Bohudur

First, initialize the Bohudur object with your API key.

String API_KEY = "t6TLUpufBayirRAHwxhO";
Bohudur bohudur = new Bohudur(this, API_KEY);

Step 2: Create A Request

This code is enough for making a successful payment request.

bohudur.setFullName("Jane Doe");
bohudur.setEmail("[email protected]");
bohudur.setAmount(10);
bohudur.setReturnType(Bohudur.Type.GET());
bohudur.request(new PaymentResponse(){ @Override public void onPaymentSuccess(SuccessResponse response) { // handle success } @Override public void onPaymentCancelled(FailureResponse response) { // handle cancellation } });

Verify Payment

bohudur.verify("YOUR_PAYMENT_KEY", new VerifyResponse() {
  @Override
  public void onPaymentVerified(SuccessResponse arg0) {
        // handle verified payment
  }

  @Override
  public void onPaymentError(FailureResponse arg0) {
        // handle error
  }
});

Key Features:

If you need to use webhook or metadata you can use in this way.

bohudur.addMetadata("data1", "value1");
bohudur.addMetadata("data2", "value2");
bohudur.setWebhookCancelUrl("https://example.com/cancel.php");
bohudur.setWebhookSuccessUrl("https://example.com/success.php");