public interface PosClient
Intent
s that initiate transactions.Modifier and Type | Method and Description |
---|---|
android.content.Intent |
createChargeIntent(ChargeRequest chargeRequest)
Creates an
Intent that can be used to initiate a Square Point of Sale
transaction. |
boolean |
isPointOfSaleInstalled() |
void |
launchPointOfSale()
Launches the Square Point of Sale application.
|
void |
openPointOfSalePlayStoreListing()
Opens the Square Point of Sale install page in the Google Play Store.
|
ChargeRequest.Error |
parseChargeError(android.content.Intent data)
Use this method to parse the data
Intent passed in
android.app.Activity#onActivityResult(int, int, Intent) when resultCode
is equal to android.app.Activity#RESULT_CANCELED (canceled transaction). |
ChargeRequest.Success |
parseChargeSuccess(android.content.Intent data)
Use this method to parse the data
Intent passed in
android.app.Activity#onActivityResult(int, int, Intent) when resultCode
is equal to android.app.Activity#RESULT_OK (successful transaction). |
android.content.Intent createChargeIntent(ChargeRequest chargeRequest)
Intent
that can be used to initiate a Square Point of Sale
transaction. Provide the created Intent
to the
android.app.Activity#startActivityForResult(Intent, int)
to
initiate the transaction.android.content.ActivityNotFoundException
- if Square Point of Sale is not installed.java.lang.NullPointerException
- if chargeRequest is null.PosSdk
boolean isPointOfSaleInstalled()
true
if a version of Square Point of Sale that supports the Point of Sale API
is installed,
false
otherwise.void launchPointOfSale()
ChargeRequest.ErrorCode.TRANSACTION_ALREADY_IN_PROGRESS
error.android.content.ActivityNotFoundException
- if Square Point of Sale is not installed.void openPointOfSalePlayStoreListing()
ChargeRequest.Success parseChargeSuccess(android.content.Intent data)
Intent
passed in
android.app.Activity#onActivityResult(int, int, Intent)
when resultCode
is equal to android.app.Activity#RESULT_OK
(successful transaction).ChargeRequest.Error parseChargeError(android.content.Intent data)
Intent
passed in
android.app.Activity#onActivityResult(int, int, Intent)
when resultCode
is equal to android.app.Activity#RESULT_CANCELED
(canceled transaction).