Initializing the Paysafe Library

The following parameters should be passed during initialization to the framework from the application:

  • Merchant User ID (registered Paysafe API Key username)
  • Merchant Paysafe Password (registered Paysafe API Key password)
  • Merchant Account Number (registered Paysafe Account Number)
  • Environment (TEST/ LIVE)

You also need to import the PaysafeApiClient class in your application (where the framework is referring).

import com.paysafe.PaysafeApiClient;

Initialize the PaysafeApiClient object.

import com.paysafe.Environment;
private final String apiKey = "";
private final String apiPassword = "";
private final String accountNumber = "";

/* Create PaysafeApiClient Object
* @param: API Key
* @param: API Password
* @param: Environment (TEST/ LIVE)
* @param: Account Number
* */
PaysafeApiClient client = new PaysafeApiClient(apiKey, apiPassword, Environment.TEST, accountNumber);

Did you find this page useful?