Foloosi
  • INTRODUCTION
  • FEATURES
  • Get Started
    • Create Api Credentials
    • Checkout Page Customization
  • Payment Methods
    • Popup Payment Method
    • Hosting Payment Method
    • Saved Card Payment Method
  • CLIENT SIDE INTEGRATIONS
    • Javascript Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample Integrations
    • PHP Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample integrations
    • React JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
    • Angular JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
  • ECOMMERCE INTEGRATIONS
    • WooCommerce
    • CS Cart
    • Ecwid
    • Opencart
    • Magento
    • Prestashop
  • MOBILE SDK INTEGRATIONS
    • Android SDK
      • Initiate Payment
      • Payment Response Handling
    • iOS SDK
      • Initiate Payment
      • Payment Response Handling
    • React Native SDK
      • Make Payment
    • Flutter SDK
      • Installation
      • Make Payment
      • Sample Dart Program
  • SUBSCRIPTIONS
    • Foloosi Subscription for WooCommerce
    • Api Subscription
      • Sample Integration
    • Subscription
  • WEBHOOKS
  • PARTNER PAYOUT
  • CARD DETAILS
    • Test Cards
Powered by GitBook
On this page
  • Implement Payment Listener
  • Foloosi Log
  • Support
  • Developed by
  • License

Was this helpful?

  1. MOBILE SDK INTEGRATIONS
  2. Android SDK

Payment Response Handling

Implement Payment Listener

Set and Implement our payment listener to receive payment results. Use the code below to obtain the payment result.

//Implementing
public class ActDemoPay extends AppCompatActivity implements FPayListener {

    @Override
    public void onTransactionSuccess(String transactionId, String responseCode) {
        // Success Callback
    }

    @Override
    public void onTransactionFailure(String error, String transactionId, String responseCode) {
        // Failure Callback.
    }

    @Override
    public void onTransactionCancelled(String responseCode) {
        // Transaction Cancelled by User
    }

}

Foloosi Log

You can enable / disable the SDK logs by using the line of code below. It will be disabled by default.

FoloosiLog.setLogVisible(true or false);

List of properties available,

​

Name
Type
Required
Description

merchantKey

string

true

your foloosi merchant key

secretKey

string

true

your foloosi secret key

referenceToken

string

true

the reference token - generates automatically if null

setOrderAmount

double

true

transaction amount

setCurrencyCode

string

true

transaction currency

setName

string

false

customer name - auto render in payment popup if passed

setEmail

string

false

customer email - auto render in payment popup if passed

setMobile

string

false

customer mobile - auto render in payment popup if passed

setCustomerUniqueReference

string

false

It must be unique for the customer,Like customer unique id or email id.,

Support

Developed by

Foloosi Technologies Pvt Ltd.

License

Copyrights (c) 2025 Foloosi

PreviousInitiate PaymentNextiOS SDK

Last updated 2 months ago

Was this helpful?

Visit for support requests or email to [email protected].

https://www.foloosi.com