Skip to content

RECURRING_SALE

Basil Miller edited this page Feb 1, 2021 · 5 revisions

This page describes the Akurateco Android SDK RECURRING_SALE Adapter.

Overview

Recurring payments are commonly used to create new transactions based on already stored cardholder information from previous operations.

RECURRING_SALE request has same logic as SALE request, the only difference is that you need to provide primary transaction id, and this request will create a secondary transaction with previously used cardholder data from primary transaction.

RECURRING_SALE

  1. The RECURRING_SALE Adapter operation method based on the cardholder data:
/**
 * @param payerEmail customer’s email. String up to 256 characters.
 * @param cardNumber the credit card number.
 * @param auth indicates that transaction must be only authenticated, but not captured.
 * @param callback the [AkuratecoSaleCallback].
 */
fun execute(
    @NonNull
    order: AkuratecoOrder,
    @NonNull
    options: AkuratecoRecurringOptions,
    @NonNull
    payerEmail: String,
    @NonNull
    cardNumber: String,
    @NonNull
    auth: Boolean,
    @NonNull
    callback: AkuratecoSaleCallback
)
  1. The RECURRING_SALE Adapter operation method based on the hash data:
/**
 * @param hash special signature to validate your request to payment platform.
 * @param auth indicates that transaction must be only authenticated, but not captured.
 * @param callback the [AkuratecoSaleCallback].
 */
fun execute(
    @NonNull
    order: AkuratecoOrder,
    @NonNull
    options: AkuratecoRecurringOptions,
    @NonNull
    hash: String,
    @NonNull
    auth: Boolean,
    @NonNull
    callback: AkuratecoSaleCallback
)

Response from Payment Platform is the same as by SALE command, except for the value of the difference parameter "action=RECURRING_SALE".

  1. The AkuratecoSaleCallback results:
Result Description
AkuratecoSaleResult.Success success result.
AkuratecoSaleResult.Decline result with the decline reason.
AkuratecoSaleResult.Recurring result with the recurring parameters.
AkuratecoSaleResult.Secure3D result with the redirect parameters.

Akurateco

The Akurateco Android SDK - https://akurateco.com

Clone this wiki locally