Class PaymentClient
- java.lang.Object
-
- aero.panasonic.inflight.services.paymentclient.v1.PaymentClient
-
public class PaymentClient extends java.lang.ObjectPackage 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelPayment(PaymentRequest paymentRequest, PaymentListener paymentListener)This api is used by app developers to cancel the payment process.static voidinitService(Context context, IInFlightCallback inFlightCallback, InFlight inFlight)This api is the starting point for PaymentClient.voidprocessPayment(PaymentRequest paymentRequest, PaymentListener paymentListener)This api is used by app developers to make a payment withPaymentRequest
-
-
-
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 viaIInFlightCallbackonce it has been initialized.- Parameters:
context- - ContextinFlightCallback-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); } }
-
processPayment
public void processPayment(PaymentRequest paymentRequest, PaymentListener paymentListener)
This api is used by app developers to make a payment withPaymentRequest- Parameters:
paymentListener- - ReturnsPaymentListener
-
cancelPayment
public void cancelPayment(PaymentRequest paymentRequest, PaymentListener paymentListener)
This api is used by app developers to cancel the payment process.- Parameters:
paymentListener- - ReturnsPaymentListener
-
-