TranslatorManager

A class that provides a ErrorMessageTranslator for translating server-provided error messages, as defined in Stripe API Errors Reference.

See com.stripe.android.view.PaymentMethodsActivity for example usage.

To use a custom ErrorMessageTranslator in your app, override Application.onCreate in your app's Application subclass and call setErrorMessageTranslator.

public class MyApp extends Application {
public void onCreate() {
    super.onCreate();
    TranslatorManager.setErrorMessageTranslator(new MyErrorMessageTranslator());
}
}

Functions