Comments (8)
As the javadoc and docs state, you the replacement for Braintree#getInstance
is Braintree#setup
. What specifically is not working for you?
from braintree_android.
@lkorth Here is the code I wrote
Braintree.setup(getActivity(),
clientToken, new Braintree.BraintreeSetupFinishedListener() {
@Override
public void onBraintreeSetupFinished(boolean setupSuccessful, Braintree braintree, String errorMessage, Exception exception) {
Log.d(TAG,"Exception:" + exception.getMessage());
if(setupSuccessful){
Log.d(TAG, "Received Braintree Setup");
mBraintree = braintree;
mBraintree.addListener(thisFrag);
mPaymentButton.initialize((MapsActivity)context, mBraintree);
}else{
Log.w(TAG,"ERROR SETUP FAILURE");
}
}
});
Seems to match header file. The first inner log never gets run, so I assume the function is simply never finishing. It'd be cool if there was at least one available working implementation of this instantiation.
from braintree_android.
Sounds like you are never receiving a callback. Have you tried setting a breakpoint and stepping in? There is a working implementation of it, Drop-in uses it completely. You could also try Drop-in to see if it works for you. The Demo app has been updated to use Braintree#setup
, it just hasn't been released yet.
from braintree_android.
I am stepping through it and I have no idea what I'm looking for. I really have no idea how the whole thing works, not sure how I'm messing this up. This is also in a fragment if that is known to have issues. What should I be looking for when stepping through the function? Thanks for the help btw
from braintree_android.
There are no know issues with Fragments
.
If you get into Braintree#setupHelper
it should be pretty clear to follow and see if there are any errors, that method is pretty straight forward.
You may also want to try launching Drop-in instead of calling Braintree#setup
and see if that works for you. If you can reproduce the issue in a simple new app, I'm happy to take a look at the code.
You can also reach our support team via phone or email and they will be happy to help.
from braintree_android.
The Demo app has been updated to use Braintree#setup
from braintree_android.
@CapitanRedBeard: looking at it more if the thread it's running on crashes, there will be no callback. One other person has run into this by passing a non-base64 or non-json client token to Braintree#setup
.
from braintree_android.
@CapitanRedBeard: version 1.6.2
that was released today includes additional error handling around setup and should call your callback in all cases. Feel free to re-open if it's still an issue.
from braintree_android.
Related Issues (20)
- ThreeDSecure Challenge UI is distorted in portrait mode HOT 3
- Duplicate class lib.android.paypal.com.magnessdk.Environment found in modules HOT 4
- com.braintreepayments.api.ThreeDSecureActivity instance is Leaking HOT 1
- com.paypal.android.sdk:data-collector not compliant with Play store policy HOT 9
- Absurd Migration Requirements HOT 1
- com.paypal.android.sdk:data-collector not compliant with Play store policy due to device location collection HOT 65
- Braintree - Paypal not working anymore if AppId contains Capital Letters HOT 5
- Allow processing browser switch redirect without requiring an Activity instance HOT 5
- URGENT!!: OnPayPalSuccess is never Called on Pixel Android Devices HOT 2
- Store in Vault - behaviour changes HOT 2
- Does checking if Google Pay is ready to pay require activity instead of plain context? HOT 2
- Users getting UserCanceledException on PayPal CustomTabs tokenization after minimizing the CustomTabs HOT 2
- SDK migration error "This transaction has been declined In order to comply with international regulations" HOT 2
- Cardinal Commerce Broken Credentials HOT 5
- Payment success deeplink show error for ~2-5 seconds befor resolving HOT 2
- java.lang.IllegalArgumentException: View=DecorView@d9de0d2[ThreeDSecureActivity] not attached to window manager HOT 1
- 📣 Upgrade your integration to continue accepting Braintree payments
- 403 when building the mobile SDK HOT 1
- URGENT!! java.lang.IllegalStateException: Method addObserver must be called on the main thread HOT 10
- Payment label and amount is visible somewhat randomly HOT 1
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.