@Test public void createSourceSynchronous_withSepaDebitParams_passesIntegrationTest() { Stripe stripe = getNonLoggingStripe(mContext); String validIban = "DE89370400440532013000"; SourceParams params = SourceParams.createSepaDebitParams( "Sepa Account Holder", validIban, "123 Main St", "Eureka", "90210", "EI"); Map<String, String> metamap = new HashMap<String, String>() {{ put("water source", "well"); put("type", "brackish"); put("value", "100000"); }}; params.setMetaData(metamap); try { Source sepaDebitSource = stripe.createSourceSynchronous(params, FUNCTIONAL_SOURCE_PUBLISHABLE_KEY); assertNotNull(sepaDebitSource); assertNotNull(sepaDebitSource.getClientSecret()); assertNotNull(sepaDebitSource.getId()); assertEquals(Source.SEPA_DEBIT, sepaDebitSource.getType()); assertNotNull(sepaDebitSource.getSourceTypeData()); assertNotNull(sepaDebitSource.getOwner()); assertNotNull(sepaDebitSource.getOwner().getAddress()); assertNotNull(sepaDebitSource.getSourceTypeModel()); assertTrue(sepaDebitSource.getSourceTypeModel() instanceof SourceSepaDebitData); assertEquals("eur", sepaDebitSource.getCurrency()); assertEquals("Eureka", sepaDebitSource.getOwner().getAddress().getCity()); assertEquals("90210", sepaDebitSource.getOwner().getAddress().getPostalCode()); assertEquals("123 Main St", sepaDebitSource.getOwner().getAddress().getLine1()); assertEquals("EI", sepaDebitSource.getOwner().getAddress().getCountry()); assertEquals("Sepa Account Holder", sepaDebitSource.getOwner().getName()); JsonTestUtils.assertMapEquals(metamap ,sepaDebitSource.getMetaData()); } catch (StripeException stripeEx) { fail("Unexpected error: " + stripeEx.getLocalizedMessage()); } }
@Nullable public Source createSourceSynchronous(@NonNull SourceParams params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createSourceSynchronous(params, null); }
Stripe { @Nullable public Source createSourceSynchronous(@NonNull SourceParams params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createSourceSynchronous(params, null); } }
Stripe { @Nullable public Source createSourceSynchronous(@NonNull SourceParams params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createSourceSynchronous(params, null); } Stripe(@NonNull Context context);  Stripe(@NonNull Context context, String publishableKey); }
Stripe { @Nullable public Source createSourceSynchronous(@NonNull SourceParams params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createSourceSynchronous(params, null); } Stripe(@NonNull Context context);  Stripe(@NonNull Context context, String publishableKey); void createBankAccountToken(
            @NonNull final BankAccount bankAccount,
            @NonNull final TokenCallback callback); void createBankAccountToken(
            @NonNull final BankAccount bankAccount,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); void createPiiToken(
            @NonNull final String personalId,
            @NonNull final TokenCallback callback); void createPiiToken(
            @NonNull final String personalId,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); Token createBankAccountTokenSynchronous(final BankAccount bankAccount); Token createBankAccountTokenSynchronous(
                final BankAccount bankAccount,
                String publishableKey); void createSource(@NonNull SourceParams sourceParams, @NonNull SourceCallback callback); void createSource(
            @NonNull SourceParams sourceParams,
            @NonNull SourceCallback callback,
            @Nullable String publishableKey,
            @Nullable Executor executor); void createToken(@NonNull final Card card, @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull final String publishableKey,
            @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull final Executor executor,
            @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); @Nullable Source createSourceSynchronous(@NonNull SourceParams params); Source createSourceSynchronous(
            @NonNull SourceParams params,
            @Nullable String publishableKey); Token createTokenSynchronous(final Card card); Token createTokenSynchronous(final Card card, String publishableKey); Token createPiiTokenSynchronous(@NonNull String personalId); Token createPiiTokenSynchronous(@NonNull String personalId, String publishableKey); void logEventSynchronous(
            @NonNull List<String> productUsageTokens,
            @NonNull StripePaymentSource paymentSource); Source retrieveSourceSynchronous(
            @NonNull @Size(min = 1) String sourceId,
            @NonNull @Size(min = 1) String clientSecret); Source retrieveSourceSynchronous(
            @NonNull @Size(min = 1) String sourceId,
            @NonNull @Size(min = 1) String clientSecret,
            @Nullable String publishableKey); void setDefaultPublishableKey(@NonNull @Size(min = 1) String publishableKey); void setStripeAccount(@NonNull @Size(min = 1) String stripeAccount); }
Stripe { @Nullable public Source createSourceSynchronous(@NonNull SourceParams params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { return createSourceSynchronous(params, null); } Stripe(@NonNull Context context);  Stripe(@NonNull Context context, String publishableKey); void createBankAccountToken(
            @NonNull final BankAccount bankAccount,
            @NonNull final TokenCallback callback); void createBankAccountToken(
            @NonNull final BankAccount bankAccount,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); void createPiiToken(
            @NonNull final String personalId,
            @NonNull final TokenCallback callback); void createPiiToken(
            @NonNull final String personalId,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); Token createBankAccountTokenSynchronous(final BankAccount bankAccount); Token createBankAccountTokenSynchronous(
                final BankAccount bankAccount,
                String publishableKey); void createSource(@NonNull SourceParams sourceParams, @NonNull SourceCallback callback); void createSource(
            @NonNull SourceParams sourceParams,
            @NonNull SourceCallback callback,
            @Nullable String publishableKey,
            @Nullable Executor executor); void createToken(@NonNull final Card card, @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull final String publishableKey,
            @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull final Executor executor,
            @NonNull final TokenCallback callback); void createToken(
            @NonNull final Card card,
            @NonNull @Size(min = 1) final String publishableKey,
            @Nullable final Executor executor,
            @NonNull final TokenCallback callback); @Nullable Source createSourceSynchronous(@NonNull SourceParams params); Source createSourceSynchronous(
            @NonNull SourceParams params,
            @Nullable String publishableKey); Token createTokenSynchronous(final Card card); Token createTokenSynchronous(final Card card, String publishableKey); Token createPiiTokenSynchronous(@NonNull String personalId); Token createPiiTokenSynchronous(@NonNull String personalId, String publishableKey); void logEventSynchronous(
            @NonNull List<String> productUsageTokens,
            @NonNull StripePaymentSource paymentSource); Source retrieveSourceSynchronous(
            @NonNull @Size(min = 1) String sourceId,
            @NonNull @Size(min = 1) String clientSecret); Source retrieveSourceSynchronous(
            @NonNull @Size(min = 1) String sourceId,
            @NonNull @Size(min = 1) String clientSecret,
            @Nullable String publishableKey); void setDefaultPublishableKey(@NonNull @Size(min = 1) String publishableKey); void setStripeAccount(@NonNull @Size(min = 1) String stripeAccount);  }