Skip to content

Commit

Permalink
Fix demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Dec 12, 2023
1 parent b91eb3c commit fec9c01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Demo/src/main/java/com/braintreepayments/demo/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public class Settings {
private static final String PRODUCTION_BASE_SERVER_URL = MERCHANT_SERVER_URL + "/braintree/production";
private static final String MOCKED_PAY_PAL_SANDBOX_SERVER_URL = MERCHANT_SERVER_URL + "/braintree/mock_pay_pal";

private static final String SANDBOX_TOKENIZATION_KEY = "sandbox_f252zhq7_hh4cpc39zq4rgjcg";
// private static final String SANDBOX_TOKENIZATION_KEY = "sandbox_tmxhyf7d_dcpspy2brwdjr3qn";
private static final String SANDBOX_TOKENIZATION_KEY = "sandbox_tmxhyf7d_dcpspy2brwdjr3qn";
private static final String PRODUCTION_TOKENIZATION_KEY = "production_t2wns2y2_dfy45jdj3dxkmz5m";
private static final String MOCKED_PAY_PAL_SANDBOX_TOKENIZATION_KEY = "sandbox_q7v35n9n_555d2htrfsnnmfb3";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static junit.framework.Assert.assertNotNull;

import static org.junit.Assert.assertTrue;

import androidx.test.core.app.ApplicationProvider;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

Expand Down Expand Up @@ -43,9 +45,10 @@ public void createPaymentAuthRequest_callsBack_withApprovalUrl_andPaymentId() th
request.setCurrencyCode("EUR");

LocalPaymentClient sut = new LocalPaymentClient(braintreeClient);
sut.createPaymentAuthRequest(request, (localPaymentResult, error) -> {
assertNotNull(localPaymentResult.getApprovalUrl());
assertNotNull(localPaymentResult.getPaymentId());
sut.createPaymentAuthRequest(request, (localPaymentAuthRequest) -> {
assertTrue(localPaymentAuthRequest instanceof LocalPaymentAuthRequest.ReadyToLaunch);
assertNotNull(((LocalPaymentAuthRequest.ReadyToLaunch) localPaymentAuthRequest).getRequestParams().getApprovalUrl());
assertNotNull(((LocalPaymentAuthRequest.ReadyToLaunch) localPaymentAuthRequest).getRequestParams().getPaymentId());
countDownLatch.countDown();
});

Expand Down

0 comments on commit fec9c01

Please sign in to comment.