3.6 Native Android SDK | Helper functions

Modified on Sun, Mar 31, 2024 at 5:22 PM

PayTabs SDK makes the integration with the PayTabs payment gateway very easy by providing a ready-made payment screen that handles the card entry and, billing & shipping information and completes the missing details.


This article is dedicated to walking you through how to use the helper functions:



Cancel current payment:


This method gives you the ability to cancel or close the payment screen. However, if the merchant has already pressed the PAY NOW button and started the payment process; this method will not cancel the transaction.

//not affect the ongoing transactions.

PaymentSdkActivity.cancelPayment()

The function returns a boolean, true if the payment screen is closed or false if the payment is ongoing and can't be closed.



Clear saved cards:


This method allows you to clear all saved cards which saved via the 3.2.2 Native Android SDK | Payment With SDK Saved Card method.

PaymentSdkActivity.clearSavedCards(this);

The function returns a boolean, true if the saved cards are cleared.







⌂ To get familiar with the whole process and the other steps, kindly navigate to our "The Native Android SDK Integration Manual" solution article. 

⇦ And to navigate to the previous step in the integration process "Step 2 - Configure the integration method" click here ⇦ And to get familiar with the rest of the steps regarding the current step "Step 3 - Initiating the payment" click here.

⇨ Or you can navigate to the next step in the integration process "Step 4 - Accepting the payment" kindly click here.
 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article