/** * Create the parameters necessary for confirming a PaymentIntent while attaching Source data * * @param sourceParams params for the source that will be attached to this payment intent * @param clientSecret client secret from the PaymentIntent that is to be confirmed * @param returnUrl the URL the customer should be redirected to after the authorization * process * @return params that can be use to confirm a PaymentIntent */ @NonNull public static PaymentIntentParams createConfirmPaymentIntentWithSourceDataParams( @Nullable SourceParams sourceParams, @NonNull String clientSecret, @Nullable String returnUrl) { return new PaymentIntentParams() .setSourceParams(sourceParams) .setClientSecret(clientSecret) .setReturnUrl(returnUrl); }