Skip to content

Releases: payabli/sdk-android

Payabli Android SDK 0.1.1

Choose a tag to compare

@github-actions github-actions released this 22 Oct 18:01
f7c67cc

This is a beta release. It changes public types, so an app built on 0.1.0 needs the changes below before it compiles.

Breaking changes

  • The app no longer sets idempotency keys. PayInTransactionOptions.idempotencyKey and
    PayInAuthorizedRequest.idempotencyKey are removed, and so is the second parameter of
    PayabliPayIn.voidTransaction(transId, idempotencyKey). The SDK creates and holds every key. To retry a payment
    whose outcome is unknown, send the same paymentReference with attempt = PayabliAttempt.Retry. (#170)
  • PayInSubmissionState.Failed.retryKey is removed. Declare a retry with attempt = PayabliAttempt.Retry
    and the payment's paymentReference, which PayInException.Unsettled.paymentReference returns. (#164)
  • Four payment flags are removed from PayInTransactionOptions: sameDayAch, isAsync, useCaching and
    validationCode. They are no longer sent. achValidation and forceCustomerCreation stay. A constructor call
    that passes arguments by position after subscriptionId has to be rewritten. (#167)
  • A Tap to Pay charge after an unknown outcome is a new sale unless you declare it a retry. In 0.1.0 the next
    PayabliTTP.charge reused the held key on its own. Now pass attempt = PayabliAttempt.Retry to retry the same
    sale. Code that keeps calling charge the 0.1.0 way still compiles, but it now starts a second sale. (#164)
  • A repeated capture of an authorization or a repeated void that the service refuses now arrives over
    RETRY_REFUSED, not CONFLICT.
    It is still PayInException.Unsettled. Read the transaction back with
    readTransaction. (#164)
  • New enum values. PayabliErrorType gains TRANSACTION_NOT_FOUND, RETRY_REFUSED,
    RETRY_NOT_SAME_PAYMENT and PAYMENT_REFERENCE_OPEN, and TapToPayFailureReason gains SESSION_ENDED. An
    exhaustive when over either type needs the new values or an else branch. (#160, #163, #167, #169, #170)
  • Java callers: PayInException.Unsettled no longer has a one-argument constructor. (#170)

Behaviour changes

  • A card-not-present payment that fails before its request leaves the device now reports its own error:
    NETWORK_ERROR, a cancellation, or the token error. In 0.1.0 it was PayInException.Unsettled. (#164, #172)

  • A processor timeout is reported as an unknown outcome and an unrecognised processor answer as SERVER_ERROR,
    whatever HTTP status carries them. An unknown outcome keeps the transaction ID the service returned. (#166)

  • A PayabliTTP created from a session that was later replaced or ended stops working. initialize,
    reinitializeIfNeeded, activateDevice and charge are refused with SESSION_NOT_INITIALIZED, and
    sessionState becomes Failed(SESSION_ENDED). Create a new PayabliTTP from the current session. (#168, #173)

  • Calling initialize, reinitializeIfNeeded or activateDevice while a card is being read now waits until the
    charge ends. (#168)

  • New error text: READER_DEVICE_REFUSED (3015) now reads "This device is not set up for Tap to Pay with this
    app. Contact Payabli support with the device ID." CHARGE_NOT_FINISHED (3034) says to wait four minutes, not
    three. (#164, #174)

  • A blank section title is treated as not given. A blank summary title shows the default heading, and a blank
    inputs title shows no heading. (#156)

  • The payment summary changes (#182):

    • It counts a surcharge the host sends once. Total is totalAmount, and Amount is totalAmount less the service
      fee and the surcharge.
    • A payment is refused at submission when its service fee plus surcharge is not below the total, and when its
      surcharge is negative.
    • A refusal before anything is sent keeps the card and bank fields the payer typed. The fields are cleared only
      once the service may have acted on the payment, and a 401 counts as not acted on.

Added

  • PayabliAttempt (NewPayment, Retry), with PayInTransactionOptions.attempt and a new final attempt
    parameter on PayabliTTP.charge, so you can declare a retry. Both default to NewPayment. (#163, #164)
  • PayInTransactionOptions.paymentReference, your own name for a payment, which is never sent. Use it to retry
    that payment later. A new payment that reuses the reference of a payment still unknown is refused as
    PAYMENT_REFERENCE_OPEN. A retry that describes a different payment is refused as RETRY_NOT_SAME_PAYMENT.
    PayInException.Unsettled.paymentReference returns the reference. (#164, #170)
  • PayabliPayIn.readTransaction(transId) reads a transaction back. It returns PayInTransaction with the new
    status: PayInTransactionStatus (Initiated, Authorized, Captured, Declined, Voided, Blocked,
    Failed, Other). Use it to check the outcome of a payment that ended unknown. (#160, #161)
  • Every public function and parameter in core and payin is documented. (#158)

Fixed

  • An expired token on Tap to Pay device setup is renewed once and the setup runs again. Before, the expired-token
    error went straight to the app. (#162)

  • Tap to Pay device setup reports the service's own refusal reason, not just the HTTP status. An activation that
    fails, unless the failure says the device or the entry point can no longer be used, leaves the session waiting
    for the activation code. (#157)

  • Activating a device that already holds a live setup under another credential reports CONFLICT and keeps
    waiting for the code. (#159)

  • An app that is not registered on the paypoint reports DEVICE_SETUP_NOT_CONFIGURED. (#175)

  • Two activateDevice calls with different codes no longer share one result. Each code is sent in turn. (#176)

  • A token request made while a payment is in progress no longer marks that payment as possibly sent, and a 401
    before the replay no longer counts as sent. (#172)

  • A Tap to Pay charge whose session is replaced after its payment opens reads no card, and reports the payment as
    not charged. (#181)

  • A telemetry 401 no longer causes a later device setup to replace a working token. A telemetry batch that fails to
    send goes back to the queue instead of being dropped. The README's privacy section now lists what Google Play's
    Data safety form needs. (#180)

  • A Tap to Pay charge declared a retry, whose opening the service refuses as a duplicate of an earlier payment,
    now reports CONFLICT and not CHARGE_NOT_FINISHED. Any answer the service gives to a retry now restarts the
    hold on its key. (#183)

Internal, not listed above: version bump to 0.1.1 (#154); core public-surface signature check in CI (#155);
Gradle dependency verification removed from the build (#171); token-provider call-count tests (#177); the sample
app shows the error its initialize threw (#178); telemetry event properties (#179).

Payabli Android SDK 0.1.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 17:54
e9fa9d3

Payabli Android SDK 0.1.0

A beta release of the Payabli Android SDK. The public interface can still change in ways that aren't backward compatible.

Highlights

  • Card-not-present payments. A ready-made payment form for cards and bank accounts, with a payment summary and customizable wording, plus stored payment methods and authorize and capture.
  • Tap to Pay on Android. Take contactless payments on the phone itself, with device activation and live reader progress on the session state.
  • Voids. Void a transaction from the SDK.
  • Clear outcomes. One error catalog across the SDK, with a numbered code for every error.
  • No secrets in your app. Your app provides tokens through a callback and never holds one.
  • Device identity. A stable device ID on the session.

Install

Add https://sdk.payabli.com/maven with your Payabli credentials, then depend on com.payabli:sdk-android:0.1.0 for both, or sdk-android-payin or sdk-android-taptopay alone. See the README.

sdk-android and sdk-android-taptopay need minSdk 30; sdk-android-payin alone works from minSdk 23. Tap to Pay needs Android 12 on a 64-bit phone with NFC.

0.0.2

Choose a tag to compare

@github-actions github-actions released this 01 Oct 06:23
5417d78

What's Changed

Full Changelog: 0.0.1...0.0.2