Comments (8)
It sounds like fetching the token from the server is the issue since Drop-in launches fine with a hard coded client token.
You can verify your client token is correct by following these steps:
When Drop-in is passed a malformed authorization it finishes with an error.
This example usage in our README shows where that error is referenced back to your activity.
That exception will clue into why Drop-in is not starting.
from braintree-android-drop-in.
@jin9393 I'm going to close this. Feel free to reopen it if you are still having issues.
from braintree-android-drop-in.
Sorry I forget I posted here as i have been on email with braintree support team. Yes i am still facing the same error since that day.
onActivityResult, i cant cast data to exception. The drop-in ui is still not loading. I have sent over the whole code to the support team and still waiting for their feedback.
from braintree-android-drop-in.
You shouldn't cast Intent data
to an Exception
. See our Usage example.
If some serializable extra exists under DropInActivity.EXTRA_ERROR
then the exception will be there.
from braintree-android-drop-in.
My bad, I did exactly what is stated on the example and i got this when i try to log the exception.
"Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Exception".
from braintree-android-drop-in.
Another thing to take note is the onActivityResult resultCode. The resultCode is returning 1 and its not loading into resultCode == Activity.RESULT_OK, even though the drop-in is not loading
from braintree-android-drop-in.
when i try to log the exception.
"Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Exception"
Hmm, we do pass a string as a value for DropInActivity.EXTRA_ERROR
when BraintreeFragment has an invalid argument which sounds like it would be the Client Token mentioned in your first comment. We should be passing the Exception back and not the String though so we'll work on a fix for that! This would be unrelated to the invalid argument that is being passed in though.
resultCode is returning 1 and its not loading into resultCode == Activity.RESULT_OK, even though the drop-in is not loading
This makes sense, Activity.RESULT_OK == -1
. RESULT_OK
would be used when Drop-in finishes successfully. If it has an issue it would not return RESULT_OK
Activity.RESULT_FIRST_USER == 1
which is the value we use to represent that an error has happened when using Drop-in.
Please check the value you're getting back for DropInActivity.EXTRA_ERROR
. If the error is Tokenization Key or client token was invalid
we will know that the client token is malformed, and there is some issue with passing the String from your server.
from braintree-android-drop-in.
Yes client token was invalid. Thing have been solved. The token from the server pass in with a extra double quote and it was insert into the drop-in ui token. Was solved after removing it. Thanks you very much
from braintree-android-drop-in.
Related Issues (20)
- Attempt to read from field 'java.lang.String com.cardinalcommerce.a.td.d' HOT 2
- Get reject by google play due to violation of User Data policy HOT 1
- AddCardFragment crashes upon device rotation with NullPointerException HOT 2
- Drop In wont able back to app HOT 10
- NullPointerException upon returning to app HOT 4
- Paypal payments end with 'User cancelled dropin' HOT 3
- Cardinal SDK configure Error HOT 2
- How set amount of money HOT 1
- Drop in probably stores payment data HOT 2
- Change Language Programmatically in braintree android dropin sdk HOT 3
- Google Play Console warning regarding com.braintreepayments.api:data-collector HOT 6
- Nonce is already consumed HOT 2
- Get Rejected by Google Play because of Violation of User Data, Permissions and APIs that Access Sensitive Information policy HOT 2
- Gradle wrapper jar not recognized by Gradle Wrapper Validation Action HOT 1
- Google is warning removal from Play Store because of Violation of User Data, Permissions and APIs that Access Sensitive Information policies HOT 16
- Upgrade braintree_android to 4.41.0 HOT 6
- UserCanceledException if the app is killed by the system while in background HOT 2
- Why doesn't the PayPalAccountNonce carry the BA token?
- Unable to register DropInClient within coroutines or suspend functions or view model HOT 3
- Crash in braintree HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braintree-android-drop-in.