public interface IPoyntCustomTransactionService
extends android.os.IInterface
Sample Service
<!-- service that implements custom tender payment service. -->
<service
android:name=".CustomPaymentService"
android:enabled="true"
android:exported="true"
android:permission="co.poynt.capability.PAYMENT">
<!-- define the intent filter with an action as IPoyntCustomPaymentService interface -->
<intent-filter>
<action android:name="co.poynt.os.services.v1.IPoyntCustomPaymentService" />
</intent-filter>
<meta-data
android:name="co.poynt.os.service.capability"
android:resource="@xml/payment_gift_card_capabilities"/>
<!-- Optional: Provide a logo that will appear on screen -->
<meta-data
android:name="co.poynt.os.service.logo"
android:resource="@drawable/custom_tender" />
</service>
Sample Custom tender XML
<?xml version="1.0" encoding="utf-8"?><!-- This xml defines what capabilities are supported by the service that uses this xml.
Capabilities will be used by PoyntOS to produce custom UI on behalf of the service to
get inputs from merchant/customer. -->
<capability xmlns:android="http://schemas.android.com/apk/res/android">
<!-- REQUIRED: application id of this app
this appid is issued by poynt web portal
IMPORTANT: Replace this appid with your appid.-->
<!--<appid>urn:aid:0f39b7a3-b9db-41f1-9cdb-9f04a3620ade</appid>-->
<appid>urn:aid:d3462a56-737b-4419-b54c-39a59f4dc8d6</appid>
<!-- REQUIRED: type of capbility, should be one of
CUSTOM_TRANSACTION, DISCOUNT, LOYALTY,
please see CapabilityType defined in PoyntSDK for list of types supported.
-->
<type>CUSTOM_TRANSACTION</type>
<!-- descriptive name of this capability -->
<provider>Poynt Gift Card</provider>>
<!-- entry method could be one of the following
MANUAL -> will result in showing a icon to the merchant to manually launch the capability.
CARDREAD -> card data will be directly passed to this capability provider.
QRCODE -> qr code entry.
OTHER -> other entry methods.
each entry method can be additionally filtered with eval tag.
-->
<entry_method type="MANUAL"></entry_method>
<!-- value is a first6 digits of card number also refered to as binrange.
value >=601056 && value <= 601056 -->
<!-- for eval expression defination please refer to https://github.com/uklimaschewski/EvalEx -->
<entry_method type="CARDREAD" eval="value <= 60105 && value >= 60105" />
</capability>
Modifier and Type | Interface and Description |
---|---|
static class |
IPoyntCustomTransactionService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
void |
authorizeTransaction(java.lang.String requestId,
co.poynt.api.model.Transaction transaction,
IPoyntCustomTransactionServiceListener callback)
Authorize the given Transaction and return a updated
transaction by calling
IPoyntCustomPaymentServiceListener#onSucess , |
void |
captureTransaction(java.lang.String requestId,
java.lang.String transactionId,
IPoyntCustomTransactionServiceListener callback)
Mark the transaction as completed and update the status of the transaction as necessary.
|
void |
getTransaction(java.lang.String requestId,
java.lang.String transactionId,
IPoyntCustomTransactionServiceListener callback)
Retrieve the given custom transaction.
|
void |
refundTransaction(java.lang.String requestId,
co.poynt.api.model.Transaction transaction,
IPoyntCustomTransactionServiceListener callback)
Refund a completed transaction.
|
void |
voidTransaction(java.lang.String requestId,
java.lang.String transactionId,
IPoyntCustomTransactionServiceListener callback)
Void the given transaction that has not been processed yet.
|
void authorizeTransaction(java.lang.String requestId, co.poynt.api.model.Transaction transaction, IPoyntCustomTransactionServiceListener callback) throws android.os.RemoteException
IPoyntCustomPaymentServiceListener#onSucess
,requestId
- Request id of the call originator.transaction
- object to authorize, modify the transaction object to add custom payment
related information.callback
- IPoyntCustomPaymentServiceListener
updated transaction is returned back.android.os.RemoteException
void voidTransaction(java.lang.String requestId, java.lang.String transactionId, IPoyntCustomTransactionServiceListener callback) throws android.os.RemoteException
requestId
- requestID to identify void transaction.transactionId
- ID of the custom transaction transaction to voidcallback
- IPoyntCustomPaymentServiceListener
android.os.RemoteException
void captureTransaction(java.lang.String requestId, java.lang.String transactionId, IPoyntCustomTransactionServiceListener callback) throws android.os.RemoteException
requestId
- requestID to identify this transaction.transactionId
- ID of the custom transaction to capturecallback
- IPoyntCustomDiscountCompleteListener
android.os.RemoteException
void refundTransaction(java.lang.String requestId, co.poynt.api.model.Transaction transaction, IPoyntCustomTransactionServiceListener callback) throws android.os.RemoteException
requestId
- requestID to identify this transaction.transaction
- object to refund.callback
- IPoyntCustomTenderServiceListener
android.os.RemoteException
void getTransaction(java.lang.String requestId, java.lang.String transactionId, IPoyntCustomTransactionServiceListener callback) throws android.os.RemoteException
transactionId
- ID of the custom transaction to retrievecallback
- IPoyntCustomTenderServiceListener
android.os.RemoteException