Table of Contents
Overview
Deferred Authorizations are transactions that are processed offline at the merchant's own risk when internet connectivity is not available. More information and how to enable Deferred Authorizations can be found here.
Implementation
Once you have Deferred Authorizations enabled, if a standalone sale transaction attempts to go online but fails, the Deferred Authorization callback will be invoked, at which point the merchant can choose to accept a Deferred Authorization.
Parameters/CCParameters
- The Payment Device SDK uses a Parameter object, with parameter key and value sets passed into functions to proceed with transactions for Android and iOS respectively.
Please note that you will need to add the Deferred Authorization target/listener, as it is not included by default, this function will also need to be created.
iOS:
[ChipDnaMobile addDeferredAuthorizationTarget:self action:@selector(deferredAuthorisation:)];
-(void)deferredAuthorisation:(CCParameters *)request{ [request setValue:CCValueTrue forKey:CCParamResult]; // Add Operator PIN if required [request setValue:OPERATOR_PIN forKey:CCParamOperatorPin]; CCParameters *response = [[ChipDnaMobile sharedInstance] continueDeferredAuthorization:request]; }
Android:
ChipDnaMobile.getInstance().addDeferredAuthorizationListener(transactionListener);
@Override public void onDeferredAuthorizationListener(Parameters parameters) { parameters.add(ParameterKeys.Result, ParameterValues.TRUE); // Add Operator PIN if required parameters.add(ParameterKeys.OperatorPin, OPERATOR_PIN); Parameters response = ChipDnaMobile.getInstance().continueDeferredAuthorization(parameters); }
Once a Deferred Authorization is accepted and confirmed, the transaction will be added to the pending offline queue which will attempt to send the transaction to our platform once internet connectivity is reestablished for a period of 24 hours. If the transaction does not get sent to our platform within the 24-hour period, it will be moved from the pending queue to the failed queue.
*Transactions that get sent to our Platform and get declined will be placed back in the pending queue to be retried until the 24-hour period is reached or approved.
You can oversee Deferred Authorizations using the RequestQueueStatus
class. For more information, please review the following article.