Class PaymentClient


  • public class PaymentClient
    extends java.lang.Object

    Package Starting Point - The PaymentClient service provides a payment form for collecting payment details, such as purchaser information, order details and payment method. PaymentClient does not process the payment itself, but supplies all the information required for the payment to be processed.
    The payment types include credit card, debit card, cash, voucher, frequent flyer number and complimentary items. The payment methods include swipe, tap, dip or manual entry.

    PaymentClient is an interface that allows the applications to access In-App Payment related APIs. Using PaymentClientV1 APIs, developers can trigger the payment flow and make a purchase for a set of purchasable items.

    • Method Detail

      • initService

        public static void initService​(Context context,
                                       IInFlightCallback inFlightCallback,
                                       InFlight inFlight)
        This api is the starting point for PaymentClient. The service object will be provided via IInFlightCallback once it has been initialized.
        Parameters:
        context - - Context
        inFlightCallback - IInFlightCallback - this callback will be invoked once service has been initialized.
        inFlight - - Reference of InFlight
        Example:
        PaymentClient.initService(context, inflightCallbackListener);

        public void onInitServiceComplete(Object serviceObj,String serviceName) { if(serviceName.equals(InFlightServices.PAYMENT_CLIENT_V1_SERVICE.getServiceName())) { mPaymentClientV1 = (PaymentClient) serviceObj; mPaymentClientV1.createOrder(paymentRequest, triggerOrderRequestListener); } }

      • cancelPayment

        public void cancelPayment​(PaymentRequest paymentRequest,
                                  PaymentListener paymentListener)
        This api is used by app developers to cancel the payment process.
        Parameters:
        paymentListener - - Returns PaymentListener