Skip to content

Commit

Permalink
[3.x] Fix LPM Configuration Bug (#770)
Browse files Browse the repository at this point in the history
* update to use configuration.isPayPalEnabled for LPMs
* update demo app with client token that supports LPMs
  • Loading branch information
jaxdesmarais committed Aug 18, 2023
1 parent 5d2afd1 commit e11634f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void startPayment(final BraintreeFragment fragment, final LocalPay
fragment.waitForConfiguration(new ConfigurationListener() {
@Override
public void onConfigurationFetched(Configuration configuration) {
if (!configuration.getPayPal().isEnabled()) {
if (!configuration.isPayPalEnabled()) {
fragment.postCallback(new ConfigurationException("Local payments are not enabled for this merchant."));
return;
}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Braintree Android SDK Release Notes

## unreleased

* LocalPayment
* Fixed bug where the configuration was not returned the expected result for Local Payment Methods being enabled

## 3.21.0

* BraintreeDataCollector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected void onAuthorizationFetched() {
}

try {
mBraintreeFragment = BraintreeFragment.newInstance(this, Settings.getLocalPaymentsTokenizationKey(this));
mBraintreeFragment = BraintreeFragment.newInstance(this, "sandbox_f252zhq7_hh4cpc39zq4rgjcg");
mIdealButton.setEnabled(true);
} catch (InvalidArgumentException e) {
onError(e);
Expand Down

0 comments on commit e11634f

Please sign in to comment.