CustomerSession#getPaymentMethods()
andCustomerSession#attachPaymentMethod()
have been addedPaymentSessionData#getSelectedPaymentMethodId()
is nowPaymentSessionData#getPaymentMethod()
and returns aPaymentMethod
. See usage in the samplestore app's PaymentActivity.java.- Remove the following unused methods from
PaymentConfiguration
getRequiredBillingAddressFields()
setRequiredBillingAddressFields()
getShouldUseSourcesForCards()
setShouldUseSourcesForCards()
-
minSdkVersion
is now 19 -
AccountParams.createAccountParams()
requires aAccountParams#BusinessType
parameter// before AccountParams.createAccountParams( true, createBusinessData() ); // after, AccountParams.BusinessType is required // for Individual entities AccountParams.createAccountParams( true, BusinessType.Individual, createBusinessData() ); // for Company entities AccountParams.createAccountParams( true, BusinessType.Company, createBusinessData() );
-
CustomerSession.initCustomerSession()
now has aContext
parameter. Related,CustomerSession
public instance methods no longer have aContext
parameter.// before CustomerSession.initCustomerSession(ephemeralKeyProvider); CustomerSession.getInstance().setCustomerShippingInformation(this, listener); // after CustomerSession.initCustomerSession(this, ephemeralKeyProvider); CustomerSession.getInstance().setCustomerShippingInformation(listener);
-
PaymentIntent
has been updated to reflect API version 2019-02-11PaymentIntent.Status.RequiresSource
is nowPaymentIntent.Status.RequiresPaymentMethod
PaymentIntent.Status.RequiresSourceAction
is nowPaymentIntent.Status.RequiresAction
PaymentIntent.NextActionType.AuthorizeWithUrl
has been removedPaymentIntent#getNextSourceAction()
is nowPaymentIntent#getNextAction()
PaymentIntent#getAuthorizationUrl()
is nowPaymentIntent#getRedirectUrl()
PaymentIntent#requiresAction()
has been added as a conveniencePaymentIntent#getStatus()
now returns aPaymentIntent.Status
enum value instead of aString
-
Address
is now immutable and its setters have been removed. UseAddress.Builder
to create a newAddress
object.
- Remove Bitcoin source support because Stripe no longer processes Bitcoin payments
- Sources can no longer have a "BITCOIN" source type. These sources will now be interpreted as "UNKNOWN".
- You can no longer
createBitcoinParams
. Please use a different payment method.
StripeApiHandler
methods can no longer be called directly.PaymentConfiguration
now stores your public key and is depended upon forCustomerSession
.- Many Utils classes have been migrated to package-private access.
- Instantiation of a Stripe object can no longer throw an
AuthenticationException
.- Any time you were instantiating a Stripe object in a try/catch block will be simplified.
now becomesStripe stripe; try { stripe = new Stripe(mContext, MY_PUBLISHABLE_KEY); } catch (AuthenticationException authEx) { // This never happens because you check your key. }
Stripe stripe = new Stripe(mContext, MY_PUBLISHABLE_KEY);
Stripe#setDefaultPublishableKey(String key)
has similarly been changed, and no longer needs to be wrapped.- Both methods can still throw an
IllegalArgumentException
if an invalid key is used, but as a runtime exception, that does not need to be wrapped. AuthenticationException
will now only be thrown if you attempt to create aToken
orSource
with an invalid key.