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 deferredAuthorization
(Android)/deferredAuthorizationOperatorPinRequired
(iOS) callback method will be invoked, at which point the merchant can choose to accept a Deferred Authorization.
iOS
- (void)deferredAuthorizationOperatorPinRequired:(BOOL)operatorPinRequired onlinePinPresent:(BOOL)onlinePinPresent
Android
void deferredAuthorization(boolean operatorPinRequired, boolean onlinePin)
operatorPinRequired
- True if the listener needs to pass in an operator PIN in order to accept the deferred authorization.onlinePin
- True if an online PIN block is present in the request.
At this point the merchant should be asked to confirm if they would like to proceed with a Deferred Authorization. If operatorPinRequired = true
, the operatorPin
will have to be passed in to the continueDeferredAuthorization
method.
iOS
- (BOOL)continueDeferredAuthorization:(BOOL)accepted operatorPin:(NSString *)operatorPin error:(NSError **)error
Android
public void continueDeferredAuthorization(boolean accepted, String operatorPin) throws TransactionException
Once a Deferred Authorization is accepted, 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 at a later time, until the 24 hour period is reached.
You can oversee Deferred Authorizations using the OfflineProcessingManager
class.
iOS
- Total number of pending offline requests currently stored
- (NSInteger) numberOfStoredRequestsError: (NSError **) error
- Total number of pending offline requests currently stored, grouped by request type
- (NSDictionary *) pendingRequestTotalsError: (NSError **) error
- Total number of failed offline requests currently stored
- (NSInteger) numberOfFailedRequestsError: (NSError **) error
- Retrieve records of failed offline requests(returns array of
OfflineRequest
objects) - (NSArray *) failedOfflineRequestsError: (NSError **) error
- Resend a failed transaction request
- (void) resendFailedTransactionRequest: (OfflineRequest *) failedOfflineRequest delegate: (id< OfflineDelegate >) delegate error: (NSError **) error
Android
- Total number of pending offline requests currently stored
public int numberOfStoredRequests( ) throws StorageException
- Total number of pending offline requests currently stored, grouped by request type
public HashMap<OfflineRequest.CEMOfflineRequestType, Integer> pendingRequestTotals() throws StorageException
- Total number of failed offline requests currently stored
public int numberOfFailedRequests() throws StorageException
- Retrieve records of failed offline requests
public List<OfflineRequest> failedOfflineRequests() throws StorageException
- Resend a failed transaction request
public void resendFailedTransactionRequest(OfflineRequest failedOfflineRequest, IOfflineListener listener) throws StorageException