Skip to content

Commit

Permalink
Revert "NXO fix url response data sent inside native checkout client (#…
Browse files Browse the repository at this point in the history
…765)"

This reverts commit 88c173b.
  • Loading branch information
sshropshire committed Aug 17, 2023
1 parent 88c173b commit 10def4b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Braintree Android SDK Release Notes

## unreleased
* PayPalNativeCheckout
* Fix bug where `PayPalNativeCheckoutVaultRequest` flow in the EU results in failed requests when using the nonce in a server side request

## 4.36.0

* BraintreeCore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public JSONObject buildJSON() throws JSONException {
Iterator<String> urlResponseDataKeyIterator = urlResponseData.keys();
while (urlResponseDataKeyIterator.hasNext()) {
String key = urlResponseDataKeyIterator.next();
paymentMethodNonceJson.put(key, urlResponseData.get(key));

JSONObject response = new JSONObject();
response.put("webURL", urlResponseData.get(key));
paymentMethodNonceJson.put("response", response);
}

if (merchantAccountId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ PayPalNativeCheckoutAccount setupAccount(
}
urlResponseData.put("response", response);
urlResponseData.put("response_type", "web");
payPalAccount.setUrlResponseData(urlResponseData);
payPalAccount.setUrlResponseData(response);
} catch (JSONException jsonException) {
listener.onPayPalFailure(jsonException);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void build_correctlyBuildsAPayPalAccount() throws JSONException {

assertNull(jsonAccount.opt("details"));
assertEquals("correlation_id", jsonAccount.getString("correlationId"));
assertEquals("fake-url", jsonAccount.getJSONObject("response").getString("webURL"));
assertEquals("fake-url", jsonAccount.getJSONObject("response").getJSONObject("webURL").getString("webURL"));
assertEquals(client, jsonAccount.getJSONObject("client"));
assertEquals("alt_merchant_account_id", jsonObject.getString("merchant_account_id"));
assertFalse(jsonAccount.getJSONObject("options").getBoolean("validate"));
Expand Down

0 comments on commit 10def4b

Please sign in to comment.