Skip to content

Commit

Permalink
Update Braintree Core to 4.49.1 (#479)
Browse files Browse the repository at this point in the history
* Update braintree core to 4.49.1.

* Fix broken unit tests.

* Update drop in dependencies to fix broken integration tests.

* Add missing CHANGELOG entry.
  • Loading branch information
sshropshire committed Jul 29, 2024
1 parent 8f5a98a commit 8753b90
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## unreleased

* Bump braintree_android module dependency versions to `4.48.0`
* Bump braintree_android module dependency versions to `4.49.1`

## 6.16.0

Expand Down
8 changes: 4 additions & 4 deletions Drop-In/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ android {
dependencies {
// TODO: consider making this api in core to allow for PaymentType and other @IntDef / @StringDef constants to work for merchants
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.fragment:fragment:1.4.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.fragment:fragment:1.7.1'
implementation 'androidx.lifecycle:lifecycle-runtime:2.7.0'

api deps.braintreeCore
api deps.threeDSecure
Expand Down Expand Up @@ -102,8 +102,8 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.fragment:fragment-testing:1.3.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.fragment:fragment-testing:1.7.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'org.mockito:mockito-core:5.2.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void onAuthorizationResult(@Nullable Authorization authorization, @Nullab
callback.onResult(null, graphQLError);
}

braintreeClient.sendGraphQLPOST(base.toString(), (responseBody, httpError) -> {
braintreeClient.sendGraphQLPOST(base, (responseBody, httpError) -> {
if (responseBody != null) {
callback.onResult(paymentMethodNonce, null);
braintreeClient.sendAnalyticsEvent("delete-payment-methods.succeeded");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public BraintreeClient build() {
callback.onResult(null, sendGraphQLPOSTError);
}
return null;
}).when(braintreeClient).sendGraphQLPOST(anyString(), any(HttpResponseCallback.class));
}).when(braintreeClient).sendGraphQLPOST(any(), any(HttpResponseCallback.class));

return braintreeClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void deletePaymentMethodNonce_withTokenizationKey_throwsAnError() {
assertEquals("A client token with a customer id must be used to delete a payment method nonce.",
captor.getValue().getMessage());

verify(braintreeClient, never()).sendGraphQLPOST(anyString(), any(HttpResponseCallback.class));
verify(braintreeClient, never()).sendGraphQLPOST(any(), any(HttpResponseCallback.class));
}

@Test
Expand Down Expand Up @@ -374,10 +374,10 @@ public void deletePaymentMethodNonce_postToGraphQL()

verify(braintreeClient).getIntegrationType();

ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<JSONObject> captor = ArgumentCaptor.forClass(JSONObject.class);
verify(braintreeClient).sendGraphQLPOST(captor.capture(), any(HttpResponseCallback.class));

JSONObject graphQlRequest = new JSONObject(captor.getValue());
JSONObject graphQlRequest = captor.getValue();

String expectedGraphQLQuery = GraphQLQueryHelper.getQuery(
ApplicationProvider.getApplicationContext(), R.raw.delete_payment_method_mutation);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
}

ext.brainTreeVersion = "4.48.0"
ext.brainTreeVersion = "4.49.1"

ext.deps = [
"braintreeCore" : "com.braintreepayments.api:braintree-core:$brainTreeVersion",
Expand Down

0 comments on commit 8753b90

Please sign in to comment.