Android—Clover Go SDK release notes

v1.0.0

United States

Clover Go software development kit (SDK) v1.0.0 contains the following changes, features, improvements, and bug fixes.

Initialize Android—Clover GoSDK

To initialize the SDK and automatically connect a card reader:

  1. Access a project in Android Studio.
  2. Build an SDK configuration object.
    • Use the reconnectLastConnectedReader flag to connect to the last connected card reader instead of connecting manually every time.
  3. Call the GoSdkCreator function to create an instance of goSDK.
  4. If needed, call disconnect to override this setting and connect to the other card reader.

Updated the configuration object

The OAuth process configuration is updated and a few variable names are standardized.

reconnectLastConnectedReader

Added a reconnectLastConnectedReader flag to the configuration to give developers more control over reconnecting the card reader.

Config nameDescriptionChange
reconnectLastConnectedReaderSet this flag to false to not autoreconnect the last connected card reader.New
environmentEnvironment to connect to on Clover servers. Start with .stg1 for development.No change
OAuthFlowRedirectURI<http:///OAuthResponse>, where your domain is located.

When the OAuth flow starts, this uniform resource identifier (URI) is passed to the Clover login servers. After the user authenticates, this URI is called by Clover servers to link back to your app.

The URI value is validated against the Site URL you configured on Clover servers before Clover servers call it.
No change
OAuthFlowAppIDType: String

Unique identifier (ID) of your Clover App
No change
OAuthFlowAppSecretType: String

App Secret of your Clover App when you created it on Developer Dashboard.
No change
APIKeyType: String

Contact Clover Developer Relations for this value.
No change
APISecretType: String

Contact Clover Developer Relations for this value.
No change

Unified models for iOS and Android SDKs

All the model objects for passing parameters to the SDK are now unified, where possible, between the iOS and Android SDKs.

For example, in Android SDK:

CaptureRequest is under com.clover.sdk.gosdk.model.

Change CaptureRequest import from com.clover.go.sdk.model.CaptureRequest to import com.clover.sdk.gosdk.model.CaptureRequest

TipAdjustRequest

TipAdjustRequest accepts tip instead of TipAmount. paymentId and tip are non-null values.

See Capture and tip adjust for more information.

import com.clover.sdk.gosdk.model.TipAdjustRequest

Added sendReceipt

You can provide a customer’s phone number or email, or both on the sendReceipt (SendReceiptRequest and SendReceiptResponse) interface. If the request is successful, a SendReceiptStatus response returns. If validation or network errors exist, a CloverError of type CloverSendReceiptError or CloverNetworkError returns.

📘

NOTE:

An OrderID is needed on the SendReceiptRequest to send an email or SMS receipt.

Removed payment challenges

Invalid challenges are removed from the payment flow to closer align with the Clover REST API. Still valid challenges were moved to an issues enum array returned with the PayResponse.

The payment issues enum array in PayResponse can contain these values:

  • DUPLICATE_PAYMENT
  • PARTIAL_PAYMENT
  • SIGNATURE_REQUIRED
  • AVS_MISMATCH
  • CVV_MISMATCH
  • OFFLINE_PAYMENT (Note: This value is not used as offline payments are not supported currently.)

Integrators are responsible for checking the array list for issues and taking appropriate action. For example:

  • If an issue contains SIGNATURE_REQUIRED, you can create an interface to save the signature or take the signature on a paper receipt with transaction information.\
  • If you have a DUPLICATE_PAYMENT/PARTIAL_PAYMENT, consider calling VoidPayment to void the payment.

Errors

Errors are a subtype of CloverError, and are grouped by topic.

  • CloverCardError—Indicates a card error such as an expired card.
  • CloverMerchantBoardingError—Displays if the merchant status returns a .declined or .pending status from the server.
  • CloverNetworkError—Standard HTTP errors, captured during communications with our servers.
  • CloverReaderError—Errors encountered while communicating with the card reader.
  • CloverRkiError—Errors encountered while performing Remote Key Injection on the card reader.
  • CloverSendReceiptError - Indicates a validation error in SendReceipt such as INVALID_EMAIL_ADDRESS.
  • CloverTransactionError—Errors encountered while processing a transaction.
  • CloverGenericError—Any error that does not fall into a defined error group.