public class ServiceFeeConnector extends ServiceConnector<IServiceFeeService>
ServiceConnector.Callback<T>, ServiceConnector.OnServiceConnectedListener, ServiceConnector.ServiceCallable<S,T>, ServiceConnector.ServiceRunnable<S>
mAccount, mClient, mConnected, mContext, mHandler, mService
Constructor and Description |
---|
ServiceFeeConnector(Context context,
Account account,
ServiceConnector.OnServiceConnectedListener client)
Constructs a ServiceFeeConnector.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getServiceIntentAction() |
protected String |
getServiceIntentPackage()
The package which hosts the service to connect to.
|
protected IServiceFeeService |
getServiceInterface(IBinder binder) |
PaymentResponse |
payServiceFee(ServiceFeeRequest request)
Calling this method will result in a payment being submitted on behalf of the associated MID that collects
the service fees for your merchant.
|
RefundResponse |
refundServiceFee(ServiceFeeRefundRequest request)
Calling this method will refund the service fee previously charged
|
connect, disconnect, execute, execute, execute, execute, getService, getServiceIntentVersion, getStartIntent, isConnected, isInstalled, notifyServiceConnected, notifyServiceDisconnected, onServiceConnected, onServiceDisconnected, postResults, throwOnFailure, waitForConnection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onBindingDied, onNullBinding
public ServiceFeeConnector(Context context, Account account, ServiceConnector.OnServiceConnectedListener client)
IServiceFeeService
context
- the Context object, required for establishing a connection to
the service.account
- the Account to use with the service.client
- an optional object implementing the OnServiceConnectedListenerprotected String getServiceIntentAction()
getServiceIntentAction
in class ServiceConnector<IServiceFeeService>
protected IServiceFeeService getServiceInterface(IBinder binder)
getServiceInterface
in class ServiceConnector<IServiceFeeService>
protected String getServiceIntentPackage()
ServiceConnector
getServiceIntentPackage
in class ServiceConnector<IServiceFeeService>
public PaymentResponse payServiceFee(ServiceFeeRequest request) throws RemoteException, ClientException, ServiceException, BindingException
request
- The request object must contain the amount, the source payment id (that
the service fee is related to), and the populated vaulted card object including the token
The orderId will be populated internal to the implementationRemoteException
ClientException
ServiceException
BindingException
public RefundResponse refundServiceFee(ServiceFeeRefundRequest request) throws RemoteException, ClientException, ServiceException, BindingException
request
- The ServiceFeeRefundRequest.refund object must be populated as below:
refund.amount : must match the amount of the original service charge
refund.payment : populated with the original paymentRemoteException
ClientException
ServiceException
BindingException