Skip to main content
Version: iOS SDK 4.0.1

Migration from 3.X

tip

Version 4.0.0 introduces a well defined, typed, way of passing extra values, options, parameters or flags to the financial transactions.

We have unified all the extra and optional parameters in an Options object. Different operations have different options.

1. For a Sale or Sale and Tokenize operation
If you use a customer reference:

    SaleOptions *options = [SaleOptions new];
options.customerReference = @"Your customer reference";

If you need Multi MID / Custom merchant Authentication:

    MerchantAuth *auth = [MerchantAuth new];
Credential *cred = [Credential new];
//Optionally
cred.acquirer = [Credential getAcquirerFromString:@"acquirer"];
//Optionally
cred.mid = @"mid";
//Optionally
cred.tid = @"tid";
//Add as many credentials as Acquirers your merchant have agreements with
[auth add:cred];
options.merchantAuth = auth;

If you want to specify the budget period Only available for SureSwipe/Altech (South Africa):

options.divideByMonths = @"YOUR_BUDGET_NUMBER";

Finally:

[self.api saleWithAmount:amount currency:currency options:options];

2. for a Refund operation (less optional parameters)
If you use a customer reference:

    SaleOptions *options = [SaleOptions new];
options.customerReference = @"Your customer reference";

If you need Multi MID / Custom merchant Authentication:

MerchantAuth *auth = [MerchantAuth new];
Credential *cred = [Credential new];
//Optionally
cred.acquirer = [Credential getAcquirerFromString:@"acquirer"];
//Optionally
cred.mid = @"mid";
//Optionally
cred.tid = @"tid";
//Add as many credentials as Acquirers your merchant have agreements with
[auth add:cred];
options.merchantAuth = auth;

Finally:

[self.api refundWithAmount:amount currency:currency transaction:originalTransactionID options:options];

3. For the rest of operations
If you use a customer reference:

options.customerReference = @"Your customer reference";