DotPay Payment gateway integration in android with SDK

Updated 1 February 2021

Save

In this blog, we will learn about how to implement DotPay Payment gateway integration in android with SDK approach.

Before starting integration first, we need to know what a payment gateway is.

payment gateway is a merchant service provided by an e-commerce application service provider. Which authorizes card or direct payment processing.

DotPay payment gateway provides quick and secure online transactions with various payment options like Credit Card,  e-Wallets, and many others.

If you are planing on the integration of the DotPay payment gateway by using SDK then this blog will help you to do so.

Implementation

1. Initial setup

Adding SDK dependencies in your Application

2. Initialize payment

PaymentManager class of DotPay SDK is used to initialize payment. So you have to call the initialize() like:

Inside merchant Id field add valid key only because if you pass invalid key here payment UI will not initialize. And along with this also add the amount, description, and currency code also.

3. Handling payment callback:

It’s time to handle the payment callback. For this, implement the PaymentManagerCallback listener as :

For success and failure, we have to override onPaymentSuccess() and onPaymentFailure()  inside our activity. which will help you to handle the success and failure result.

We have done with the DotPay payment gateway integration. Add below lines in proguard-rules for final release:

Conclusion:

In this blog, you have learned about the implementation of the DotPay payment gateway integration by using SDK.

For more information regarding the DotPay payment gateway follow the link.

 

Thanks for reading this blog. You can also check other blogs from here.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home