Log in

Steps

  1. After retrieving login details, your app should call the method [Adyen loginWithMerchantCode:withUsername:withPassword:andCompletion:]. This method returns immediately and continues to run asynchronously.
    Adyen will provide you with the Merchant code, Username and Password.

  2. Once the method has completed, either by logging in successfully, or with an error, the completion block will be called, and your app can process the results.

Here is a login code example:

Adyen* adyen = [Adyen sharedInstance];
[Adyen loginWithMerchantCode:merchantCode
                withUsername:username
                withPassword:password
          andCompletionBlock:^(NSError*error){
    if(error) {
        // process login-error
    } else {
        // login was successful!
    }
}];

If an error occurs, it will be one of the errors in the Adyen error-domain.

Generally, logging in does not have to happen each time your app starts up. The Adyen toolkit remembers the last successful login and uses those credentials. To check whether a successful login has already happened, use the [Adyen isLoggedIn] method.