Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Incoming JSON request does not map to API request when trying to make a payment #299

Closed
gibona opened this issue Jun 20, 2016 · 6 comments
Closed

Comments

@gibona
Copy link

gibona commented Jun 20, 2016

This affects:
all modes(Mock/Sandbox/Live)
all PayPal Android SDK releases distributed via maven,
all Android Version and Devices

From sandbox debug console:
"message": "Incoming JSON request does not map to API request",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST",
"name": "MALFORMED_REQUEST",
"debug_id": "9a765ba5199cc"

When I looked into JSON request I noticed that the [] symbols (for start and end of array) are doubled like [[ ]].

To fix it add:
-keep class org.json.* { ; }
-keep interface org.json.* { ; }
-keep enum org.json.* { ; }
to your proguard configuration.

@braebot
Copy link
Contributor

braebot commented Jun 20, 2016

Hi there, thanks for reporting this! We haven't seen this issue before. What other dependencies do you have in your project? Have you been able to reproduce this in the sample app?

@gibona
Copy link
Author

gibona commented Jun 22, 2016

I'm integrating PayPal-Android-SDK into a large product (120M+ users). We have lots of modifications and lots of other SDK int that project. Our proguard config file is 900 lines long and I cannot guess which one is responsible for org.json.* obfuscation.

@braebot
Copy link
Contributor

braebot commented Jun 23, 2016

Looks like you're missing a * in the braces, so it should be { *; }. We can add the configuration above so that it's included in the proguard file within the distributed aar.

@gibona
Copy link
Author

gibona commented Jun 30, 2016

That will be great, thanks

@braebot
Copy link
Contributor

braebot commented Jul 5, 2016

👍 This will be ready in the next release, coming shortly.

@braebot
Copy link
Contributor

braebot commented Jul 6, 2016

Fixed in 2.14.4.

@braebot braebot closed this as completed Jul 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants