/** * @param returnUrl a redirect URL for this source. * @return {@code this}, for chaining purposes */ public SourceParams setReturnUrl(@NonNull @Size(min = 1) String returnUrl) { if (mRedirect == null) { setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); } else { mRedirect.put(FIELD_RETURN_URL, returnUrl); } return this; }
/** * Create parameters needed to make a Visa Checkout source. * * @param callId The payment request ID (callId) from the Visa Checkout SDK. * @return a {@link SourceParams} object that can be used to create a Visa Checkout Card Source. * * @see <a href="https://stripe.com/docs/visa-checkout">https://stripe.com/docs/visa-checkout</a> * @see <a href="https://developer.visa.com/capabilities/visa_checkout/docs">https://developer.visa.com/capabilities/visa_checkout/docs</a> */ @NonNull public static SourceParams createVisaCheckoutParams(@NonNull String callId) { return new SourceParams() .setType(Source.CARD) .setApiParameterMap( createSimpleMap(VISA_CHECKOUT, createSimpleMap(CALL_ID, callId))); }
/** * Create parameters needed to make a Masterpass source * * @param transactionId The transaction ID from the Masterpass SDK. * @param cartID A unique string that you generate to identify the purchase when creating a cart * for checkout in the Masterpass SDK. * * @return a {@link SourceParams} object that can be used to create a Masterpass Card Source. * * @see <a href="https://stripe.com/docs/masterpass">https://stripe.com/docs/masterpass</a> * @see <a href="https://developer.mastercard.com/product/masterpass">https://developer.mastercard.com/product/masterpass</a> * @see <a href="https://developer.mastercard.com/page/masterpass-merchant-mobile-checkout-sdk-for-android-v2">https://developer.mastercard.com/page/masterpass-merchant-mobile-checkout-sdk-for-android-v2</a> */ @NonNull public static SourceParams createMasterpassParams( @NonNull String transactionId, @NonNull String cartID) { final Map<String, Object> map = createSimpleMap(TRANSACTION_ID, transactionId); map.put(CART_ID, cartID); return new SourceParams() .setType(Source.CARD) .setApiParameterMap(createSimpleMap(MASTERPASS, map)); }
.setCurrency(Source.EURO) .setAmount(amount) .setOwner(createSimpleMap(FIELD_NAME, name)) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); createSimpleMap(FIELD_STATEMENT_DESCRIPTOR, statementDescriptor); params.setApiParameterMap(additionalParamsMap);
/** * Create parameters necessary to create a 3D Secure source. * * @param amount A positive integer in the smallest currency unit representing the amount to * charge the customer (e.g., 1099 for a €10.99 payment). * @param currency The currency the payment is being created in (e.g., eur). * @param returnUrl The URL the customer should be redirected to after the verification process. * @param cardID The ID of the card source. * @return a {@link SourceParams} object that can be used to create a 3D Secure source * * @see <a href="https://stripe.com/docs/sources/three-d-secure">https://stripe.com/docs/sources/three-d-secure</a> */ @NonNull public static SourceParams createThreeDSecureParams( @IntRange(from = 0) long amount, @NonNull String currency, @NonNull String returnUrl, @NonNull String cardID) { final SourceParams params = new SourceParams() .setType(Source.THREE_D_SECURE) .setCurrency(currency) .setAmount(amount) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); params.setApiParameterMap(createSimpleMap(FIELD_CARD, cardID)); return params; }
.setCurrency(Source.EURO) .setAmount(amount) .setOwner(createSimpleMap(FIELD_NAME, name)) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); createSimpleMap(FIELD_STATEMENT_DESCRIPTOR, statementDescriptor); params.setApiParameterMap(additionalParamsMap);
.setCurrency(Source.EURO) .setAmount(amount) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); if (name != null) { params.setOwner(createSimpleMap(FIELD_NAME, name));
/** * Create parameters necessary to create a Multibanco source. * * @param amount A positive integer in the smallest currency unit representing the amount to * charge the customer (e.g., 1099 for a €10.99 payment). * @param returnUrl The URL the customer should be redirected to after the authorization * process. * @param email The full email address of the customer. * @return a {@link SourceParams} object that can be used to create a Multibanco source * * @see <a href="https://stripe.com/docs/sources/multibanco">https://stripe.com/docs/sources/multibanco</a> */ @NonNull public static SourceParams createMultibancoParams( @IntRange(from = 0) long amount, @NonNull String returnUrl, @NonNull String email) { return new SourceParams() .setType(Source.MULTIBANCO) .setCurrency(Source.EURO) .setAmount(amount) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)) .setOwner(createSimpleMap(FIELD_EMAIL, email)); }
.setCurrency(Source.EURO) .setAmount(amount) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)); final Map<String, Object> sofortMap = createSimpleMap(FIELD_COUNTRY, country); if (statementDescriptor != null) { sofortMap.put(FIELD_STATEMENT_DESCRIPTOR, statementDescriptor);
.setCurrency(Source.EURO) .setAmount(amount) .setOwner(createSimpleMap(FIELD_NAME, name)) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl));
.setType(Source.ALIPAY) .setCurrency(currency) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl)) .setUsage(Source.REUSABLE);
.setType(Source.P24) .setCurrency(currency) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl));
.setApiParameterMap(createSimpleMap(FIELD_IBAN, iban));
.setCurrency(currency) .setAmount(amount) .setRedirect(createSimpleMap(FIELD_RETURN_URL, returnUrl));