Search in sources :

Example 1 with PayPalHttpClient

use of com.paypal.android.sdk.onetouch.core.network.PayPalHttpClient in project braintree_android by braintree.

the class PayPalOneTouchCore method initService.

private static void initService(Context context) {
    if (sConfigManager == null || sFptiManager == null) {
        PayPalHttpClient httpClient = new PayPalHttpClient().setBaseUrl(EnvironmentManager.LIVE_API_M_ENDPOINT);
        sConfigManager = new ConfigManager(getContextInspector(context), httpClient);
        sFptiManager = new FptiManager(getContextInspector(context), httpClient);
    }
    // always refresh configuration
    sConfigManager.refreshConfiguration();
}
Also used : FptiManager(com.paypal.android.sdk.onetouch.core.fpti.FptiManager) PayPalHttpClient(com.paypal.android.sdk.onetouch.core.network.PayPalHttpClient) ConfigManager(com.paypal.android.sdk.onetouch.core.config.ConfigManager)

Example 2 with PayPalHttpClient

use of com.paypal.android.sdk.onetouch.core.network.PayPalHttpClient in project braintree_android by braintree.

the class FptiManagerUnitTest method setup.

@Before
public void setup() throws NameNotFoundException {
    ContextInspector contextInspector = getMockContextInspector();
    PayPalHttpClient httpClient = mock(PayPalHttpClient.class);
    mFptiManager = spy(new FptiManager(contextInspector, httpClient));
}
Also used : ContextInspector(com.paypal.android.sdk.onetouch.core.base.ContextInspector) TestSetupHelper.getMockContextInspector(com.paypal.android.sdk.onetouch.core.test.TestSetupHelper.getMockContextInspector) PayPalHttpClient(com.paypal.android.sdk.onetouch.core.network.PayPalHttpClient) Before(org.junit.Before)

Aggregations

PayPalHttpClient (com.paypal.android.sdk.onetouch.core.network.PayPalHttpClient)2 ContextInspector (com.paypal.android.sdk.onetouch.core.base.ContextInspector)1 ConfigManager (com.paypal.android.sdk.onetouch.core.config.ConfigManager)1 FptiManager (com.paypal.android.sdk.onetouch.core.fpti.FptiManager)1 TestSetupHelper.getMockContextInspector (com.paypal.android.sdk.onetouch.core.test.TestSetupHelper.getMockContextInspector)1 Before (org.junit.Before)1