braintree / braintree_android Goto Github PK
View Code? Open in Web Editor NEWBraintree SDK for Android
Home Page: https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
License: MIT License
Braintree SDK for Android
Home Page: https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
License: MIT License
Initial conditions:
- Turn on "Do not keep activities" flag in Developer Options
Scenario:
- Press Drop-In button
- Enter credit card information e.g. 4242 4242 4242 4242
- Press Buy button
Expected:
- Main Activity is in the foreground displaying the nonce
Actual:
- Demo app crashes
Solution:
Hi,
Previously my app didn't crash for the paypal. it just recently the app crash when trying to use paypal.
Here's the log:
03-21 22:08:59.795: E/AndroidRuntime(20978): java.lang.NullPointerException
03-21 22:08:59.795: E/AndroidRuntime(20978): at com.braintreepayments.api.PayPalHelper.buildPayPalConfiguration(PayPalHelper.java:136)
03-21 22:08:59.795: E/AndroidRuntime(20978): at com.braintreepayments.api.PayPalHelper.buildPayPalServiceIntent(PayPalHelper.java:153)
03-21 22:08:59.795: E/AndroidRuntime(20978): at com.braintreepayments.api.PayPalHelper.startPaypal(PayPalHelper.java:39)
03-21 22:08:59.795: E/AndroidRuntime(20978): at com.braintreepayments.api.BraintreeApi.startPayWithPayPal(BraintreeApi.java:108)
03-21 22:08:59.795: E/AndroidRuntime(20978): at com.braintreepayments.api.Braintree.startPayWithPayPal(Braintree.java:183)
I already install newest library 1.3.0, but still crash.
I use custom button. So the call is just 2 lines:
braintree = Braintree.getInstance(this, clientToken);
braintree.startPayWithPayPal(this, PAYPAL_REQUEST_CODE);
Please help.
Thank you
MonthYearEditText does not animate and draw the hint as a floating label as the other text widgets do. Possibly because it overrides the text change listener?
Would it be possible to add first and last names to the billing address model? Currently it is required that to be part of the nonce for webside calls and would be ideal to be part of the nonce for our client side calls as well.
Hi, i tried to include the braintree android sdk by adding the following code under dependencies in my gradle file.
compile 'com.braintreepayments.api:braintree:1.+'
But i am not able to build the project. Its showing an error.
Error :Failed to find: com.braintreepayments.api:braintree:1.+
Hi,
I need to implement braintree inside my android app which has no issues, but as I copy the braintree jar file, into my projects libs folder and import the necessary classes, my app crashes.
Full error message in console:
Dx trouble writing output: already prepared
[2015-06-18 15:31:42 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;
[2015-06-18 15:31:42 - foto.studio] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;
I have removed, re imported everything twice, updated Eclipse packages too the latest version, and cleaned my project. But still got this issue. As I remove the braintree library my app returns to normal.
Please advice me what to do.
Thanks!
CustomFormActivity.java uses Braintree.getInstance which is deprecated. I am having trouble getting my app with a similar setup working and I would like to reference this.
I use getDeviceData function to collect data and sent to Braintree
mBraintreeDeviceData = Braintree.getDeviceData(this);
We got a lot of crash on this ~0.5% of sessions.
Not sure if this related to Braintree but It's cause by library that you included in SDK.
Crash log:
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:848)
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)
at com.devicecollector.CollectorProcess.doInBackground(CollectorProcess.java:102)
at com.devicecollector.CollectorProcess.doInBackground(CollectorProcess.java:34)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:848)
This was mentioned in #13, but the version of the Card.io SDK in v1.2.7 of the Braintree android SDK is not working for me and I would like to try the live version.
However, the Card.io SDK cannot be excluded as dependencies normally would in an Android library. In the StackOverflow post related to #13, it's mentioned that you guys are trying to get Card.io removed.
Any update on the progress of this or if there's any other workaround that would let me exclude Card.io without having to rip the jar apart and put it back together?
Hello,
Any plans on removing Apache HTTP from ThreeDSecureWebViewActivity.java now that it has been deprecated in Android M?
In the latest build First name and last name were added to the billing address. Unfortunately They are not able to be used as part of the CardBuilder class. A setFristName and setLastName function needs to be added in order to access the fields within BillingAddress.
My app uses okhttp 2.0.0. When I call braintree.tokenize(cardBuilder)
, I get this error:
Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method
com.braintreepayments.api.internal.HttpRequest.execute
The error comes from mClient.open
in HttpRequest.java
, which is removed in okhttp 2.0.0.
Hi,
Sorry for bothering you but I had a problem using braintree android SDK with the Card IO. Can you refer to this post on StackOverflow for more details please !
http://stackoverflow.com/questions/27378424/card-io-android-sdk-clashes-with-braintree-android-sdk
I will be really appreciated if you could share some of your thoughts on what I've done wrong please.
Many thanks
Hyde
Is there any similar methods for offline testing in Android like the one in iOS (BTClient+Offline.h) ?.
Paypal SDK in braintree-api-1.7.0-full.jar missing some classes (eg:PayPalPayment, PaymentActivity, PaymentConfirmation), which leads to the method of Paypal before the call can not be used
Our requirement is that we need to take credit card information from the user in our designed UI and then we have to do payment transaction using these credit card details. We also need to store previously used card details, so that user can use it for future transaction. We also want to provide user facility of adding new card or replacing existing cards.
Could you please let us know how we can fulfill above requirements using braintree. Also what will be impact of solution on PCI compliance. do we need go for PCI compliance?
Steps to reproduce the problem:
Null PointerException
I debugged the app and in this line of class CustomFormActivity
mPaymentButton = (PaymentButton) findViewById(R.id.bt_payment_button);
mPaymentButton is null after this...
Therefore throwing the exception here
mPaymentButton.initialize(this, mBraintree);
10-20 17:21:04.501 5296-5296/com.braintreepayments.demo W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x410b39a8)
10-20 17:21:04.503 5296-5296/com.braintreepayments.demo E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.braintreepayments.demo/com.braintreepayments.demo.CustomFormActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5297)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.braintreepayments.demo.CustomFormActivity.onCreate(CustomFormActivity.java:33)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5297)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Suddenly out of nowhere I get this error upon building my project:
:app:preReleaseBuild UP-TO-DATE
:braintree:compileLint
:braintree:copyReleaseLint UP-TO-DATE
:braintree:preBuild UP-TO-DATE
:braintree:preReleaseBuild UP-TO-DATE
:braintree:checkReleaseManifest
:braintree:preDebugAndroidTestBuild UP-TO-DATE
:braintree:preDebugBuild UP-TO-DATE
:braintree:preDebugUnitTestBuild UP-TO-DATE
:braintree:preReleaseUnitTestBuild UP-TO-DATE
:braintree:prepareComAndroidSupportAppcompatV72301Library
:braintree:prepareComAndroidSupportSupportV42301Library
:braintree:prepareComBraintreepaymentsApiDropIn200SNAPSHOTLibrary
:braintree:prepareComBraintreepaymentsCardForm210Library
:braintree:prepareComFacebookFrescoDrawee061Library
:braintree:prepareComFacebookFrescoFbcore061Library
:braintree:prepareComFacebookFrescoFresco061Library
:braintree:prepareComFacebookFrescoImagepipeline061Library
:braintree:prepareComFacebookFrescoImagepipelineOkhttp061Library
:braintree:prepareComFacebookReactReactNative0120Library
:braintree:prepareOrgWebkitAndroidJscR174650Library
:braintree:prepareReleaseDependencies
:braintree:compileReleaseAidl
:braintree:compileReleaseRenderscript
:braintree:generateReleaseBuildConfig
:braintree:generateReleaseAssets UP-TO-DATE
:braintree:mergeReleaseAssets
:braintree:generateReleaseResValues UP-TO-DATE
:braintree:generateReleaseResources
:braintree:mergeReleaseResources
:braintree:processReleaseManifest
:braintree:processReleaseResources
:braintree:generateReleaseSources
:braintree:processReleaseJavaRes UP-TO-DATE
:braintree:compileReleaseJavaWithJavac
/Users/jakeforaker/app/android/braintree/src/main/java/com/jforaker/braintree/BraintreeModule.java:7: error: TokenizationClient is not public in com.braintreepayments.api; cannot be accessed from outside package
import com.braintreepayments.api.TokenizationClient;
^
/Users/jakeforaker/app/android/braintree/src/main/java/com/jforaker/braintree/BraintreeModule.java:12: error: cannot find symbol
import com.braintreepayments.api.interfaces.PaymentMethodCreatedListener;
^
symbol: class PaymentMethodCreatedListener
location: package com.braintreepayments.api.interfaces
/Users/jakeforaker/app/android/braintree/src/main/java/com/jforaker/braintree/BraintreeModule.java:14: error: cannot find symbol
import com.braintreepayments.api.models.PaymentMethod;
^
symbol: class PaymentMethod
location: package com.braintreepayments.api.models
/Users/jakeforaker/app/android/braintree/src/main/java/com/jforaker/braintree/BraintreeModule.java:72: error: cannot find symbol
mBraintreeFragment.addListener(new PaymentMethodCreatedListener() {
^
symbol: class PaymentMethodCreatedListener
location: class BraintreeModule
/Users/jakeforaker/app/android/braintree/src/main/java/com/jforaker/braintree/BraintreeModule.java:123: error: cannot find symbol
TokenizationClient.tokenize(mBraintreeFragment, builder);
^
symbol: variable TokenizationClient
location: class BraintreeModule
5 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':braintree:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Hi,
since your last update 2 days ago (1.6) I get a NoClassDefFoundErrorexception on a google service.
With version 1.5.1 everything is fine.
Thanks in advance for investigating ...
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GoogleApiAvailability;
at com.braintreepayments.api.BraintreeApi.isAndroidPayEnabled(BraintreeApi.java:164)
at com.braintreepayments.api.Braintree.isAndroidPayEnabled(Braintree.java:333)
at com.braintreepayments.api.dropin.view.PaymentButton.initialize(PaymentButton.java:95)
at com.braintreepayments.api.dropin.view.PaymentButton.initialize(PaymentButton.java:75)
at com.braintreepayments.api.dropin.AddPaymentMethodViewController.initViews(AddPaymentMethodViewController.java:69)
at com.braintreepayments.api.dropin.AddPaymentMethodViewController.<init>(AddPaymentMethodViewController.java:54)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.initAddPaymentMethodView(BraintreePaymentActivity.java:332)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.showAddPaymentMethodView(BraintreePaymentActivity.java:323)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.onPaymentMethodsUpdated(BraintreePaymentActivity.java:205)
at com.braintreepayments.api.Braintree$12$1.run(Braintree.java:1119)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.GoogleApiAvailability" on path: DexPathList[[zip file "/data/app/net.fashionfreax-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.braintreepayments.api.BraintreeApi.isAndroidPayEnabled(BraintreeApi.java:164)
at com.braintreepayments.api.Braintree.isAndroidPayEnabled(Braintree.java:333)
at com.braintreepayments.api.dropin.view.PaymentButton.initialize(PaymentButton.java:95)
at com.braintreepayments.api.dropin.view.PaymentButton.initialize(PaymentButton.java:75)
at com.braintreepayments.api.dropin.AddPaymentMethodViewController.initViews(AddPaymentMethodViewController.java:69)
at com.braintreepayments.api.dropin.AddPaymentMethodViewController.<init>(AddPaymentMethodViewController.java:54)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.initAddPaymentMethodView(BraintreePaymentActivity.java:332)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.showAddPaymentMethodView(BraintreePaymentActivity.java:323)
at com.braintreepayments.api.dropin.BraintreePaymentActivity.onPaymentMethodsUpdated(BraintreePaymentActivity.java:205)
at com.braintreepayments.api.Braintree$12$1.run(Braintree.java:1119)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.GoogleApiAvailability
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 19 more
I am looking for a way to obtain the email address associated with the paypal account that becomes linked upon completion of the onPaymentMethodNonce() callback. What would be the best way to do this?
05-12 13:46:09.763 13657-13657/org.coursera.android.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: org.coursera.android.debug, PID: 13657
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.braintreepayments.api.Braintree.sendAnalyticsEvent(java.lang.String)' on a null object reference
at com.braintreepayments.api.dropin.BraintreePaymentActivity.onBackPressed(BraintreePaymentActivity.java:381)
at android.app.Activity.onKeyUp(Activity.java:2456)
at android.view.KeyEvent.dispatch(KeyEvent.java:2643)
at android.app.Activity.dispatchKeyEvent(Activity.java:2707)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2276)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4020)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3982)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3680)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3737)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3713)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3874)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2208)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1849)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1840)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2185)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
https://developers.braintreepayments.com/android+node/sdk/client/setup
I followed this link and add braintree-api1.2.7 into my project lib folder and then try to write this code
public void onBraintreeSubmit(View v) {
Intent intent = new Intent(context, BraintreePaymentActivity.class);
intent.putExtra(BraintreePaymentActivity.EXTRA_CLIENT_TOKEN, clientToken);
// REQUEST_CODE is arbitrary and is only used within this activity.
startActivityForResult(intent, REQUEST_CODE);
}
It gives error on BraintreePaymentActivity.class cause in library there is no calass with this name....
so how i can fix this issue???
We have set up our account to require street address for all credit cards. Since CardBuilder
only have postalCode()
for BillingAddress
, we are not able to create a new credit card payment method on Android.
Let me know if you are interested in a pull request. I have modified the SDK locally, adding these methods to CardBuilder
:
streetAddress()
locality()
region()
countryName()
No Results Found
https://sandbox.braintreegateway.com/merchants/xgz6xz9cmwmbdjm5/transactions/advanced_search
in Transactions ; No Results Found
Even I set private static final String BRAINTREE_MERCHANT_ID = "xgz6xz9cmwmbdjm5";
Every time I build using Gradle on Android Studio, I get warnings of this type for pretty much every drawable resource in your library:
[path to project]/com.braintreepayments.api/braintree/1.2.7/res/drawable-mdpi-v4/bt_loading.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Is there some kind of setting I should be looking at to ignore this on my end? Or is this something you guys can fix on your end?
When the CardEditText tries to move the focus to the next field on an Android 2.3 device (SDK 10), a crash is experienced:
FATAL EXCEPTION: main
java.lang.IllegalArgumentException: direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.
at android.view.FocusFinder.isCandidate(FocusFinder.java:263)
at android.view.FocusFinder.isBetterCandidate(FocusFinder.java:163)
at android.view.FocusFinder.findNextFocus(FocusFinder.java:141)
at android.view.FocusFinder.findNextFocus(FocusFinder.java:93)
at android.view.ViewGroup.focusSearch(ViewGroup.java:476)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.ViewGroup.focusSearch(ViewGroup.java:478)
at android.view.View.focusSearch(View.java:3494)
at com.braintreepayments.cardform.view.FloatingLabelEditText.focusNext(FloatingLabelEditText.java:168)
at com.braintreepayments.cardform.view.CardEditText.afterTextChanged(CardEditText.java:83)
at android.widget.TextView.sendAfterTextChanged(TextView.java:6330)
This happens on an HTX Nexus One running Android 2.3.6. I am using version 1.3.0 of the Braintree SDK.
Video of issue https://youtu.be/wf8NPakomkQ
After entering the last character of a form field, input focus moves to the next field and is visible momentarily. See line 112 in ErrorEditText class. Then the view scrolls to the first field (Card Number), but input focus remains with the correct field. Also if you click in any field it scrolls to the first field. See line 141 in AddPaymentMethodViewController class. It appears to me that field.getTop() always returns 0 and causes the ScrollView to go to the first item.
I did go to BuildTools 21.1.1. My project grade is on 1.0.0-rc4
exploded-aar/com.braintreepayments.api/braintree/1.2.7/res/layout/bt_payment_button.xml
Error:(18) No resource identifier found for attribute 'layout_toStartOf' in package 'android'
Error:(26) No resource identifier found for attribute 'layout_toEndOf' in package 'android'
/exploded-aar/com.braintreepayments.api/braintree/1.2.7/res/layout/bt_payment_description.xml
Error:(18) No resource identifier found for attribute 'layout_alignParentStart' in package 'android'
Error:(29) No resource identifier found for attribute 'layout_alignParentStart' in package 'android'
Error:(41) No resource identifier found for attribute 'layout_alignParentEnd' in package 'android'
/exploded-aar/com.braintreepayments.api/braintree/1.2.7/res/layout/bt_payment_method.xml
Error:(4) No resource identifier found for attribute 'layout_alignParentStart' in package 'android'
Error:(4) No resource identifier found for attribute 'layout_marginStart' in package 'android'
Error:(14) No resource identifier found for attribute 'layout_toEndOf' in package 'android'
Error:(14) No resource identifier found for attribute 'layout_marginStart' in package 'android'
Error:(26) No resource identifier found for attribute 'layout_toEndOf' in package 'android'
Hey,
We recently tested the 1.0.2 version on an older android device (API 10) and it crashed with a NoClassDefFoundError as it can't find the StandardCharsets class (which was added in API 19, https://developer.android.com/reference/java/nio/charset/StandardCharsets.html) while getting the UTF8 constant.
Might I suggest using some other UTF8 constant? :)
Regards,
Vadim.
I'm using 'com.braintreepayments.api:braintree:1+' but couldn't find the BrainTreePaymentActivity in that repository. In your documentation you are saying about calling the method below.
(It is buggy).
public void onBraintreeSubmit(View v) {
Intent intent = new Intent(context, BraintreePaymentActivity.class);
.putExtra(BraintreePaymentActivity.EXTRA_CLIENT_TOKEN, "token");
startActivityForResult(intent, 100);
}
So after writing a documentation like this and you are not providing the specified class, is really painful for developers. I'm using Android studio and I want to use your drop in UI. Is there any way for me to use the DropIn UI, not by switching to your package as stated " Unable to fined BraintreePaymentActivity Calass in Braintreen-api-1.2.7.jar #18"..
When I try to run demo app I got error dialog "Unable to get a client token. Error:java.security.cert.CertPathValidatorException: Trust actor for certification path not found."
I have added two credit cards in Braintree and want to change my first card as default payment.
How can I change my first card as default payment card?
I see the document for change payment method but I do not see update method under PaymentMethod and PaymentMethodOptions class under BraintreeApi library.
result = Braintree::PaymentMethod.update(
"the_token",
:options => {
:make_default => true
}
)
I have download all necessary libraries BraintreeApi,BraintreeData,DropIn and demo library.
Please help me where will I get these methods and how to change default payment.
Hey folks,
This SDK gets broken on proguarded builds, We couldn't find any documentation on this matter nor here nor on the website so we ended up including following lines in our configuration, it would be nice to have official docs on it.
# Braintree/PayPal
-dontwarn com.braintreepayments.**
-keep class com.braintreepayments.** { *; }
-keep interface com.braintreepayments.** { *; }
-dontwarn com.paypal.**
-keep class com.paypal.** { *; }
-keep interface com.paypal.** { *; }
After making the startPayWithPayPal() call, if the user does not have paypal installed, they see a spinner for the indefinite future. I want to know the best way to detect if the user has paypal so we can hide the button that allows them to add paypal if they do not have the paypal app. I can do so by checking the package name, but that means if the package name for the paypal app ever is changed in the future and I do not notice, then none of our users will see the add paypal button. Please provide guidance.
I kind of feel that you have an error in MonthYearEditText.java
It looks like it tries to clean AppendSpaceSpan instead of AppendSlashSpan ?
current MonthYearEditText.java:
Object[] paddingSpans = editable.getSpans(0, editable.length(), AppendSpaceSpan.class);
for (Object span : paddingSpans) {
editable.removeSpan(span);
}
private void addDateSlash(Editable editable) {
final int index = 2;
final int length = editable.length();
if (index <= length) {
editable.setSpan(new AppendSlashSpan(), index - 1, index,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
}
We have a case where we want to put a multiline secondary description. Is there any reason to limit it to 1 line? On iOS it works as expected, so I would assume it's a copy-paste bug on Android.
Gradle can't resolve braintree with:
compile 'com.braintreepayments.api:braintree:2.+'
I got Gradle Sync error:
Failed to resolve: com.braintreepayments.api:braintree:2.+
I have repositories { mavenCentral() }
in my app's build.gradle file, with:
dependencies {
compile 'com.android.support:appcompat-v7:23.+' //appcompat activity for navigation drawer
compile 'com.android.support:design:23.+' //support for pre Android L desing views
compile 'com.android.support:support-v13:23.+' //support for pre Android L other
compile 'com.google.android.gms:play-services:8.1.0' //for google maps
compile 'com.facebook.android:facebook-android-sdk:4.6.0' //facebook lib
compile 'de.hdodenhof:circleimageview:2.0.0' //circle image view
compile 'com.squareup.picasso:picasso:2.5.2' //image downloader lib
compile 'com.google.code.gson:gson:2.4' //gson for serialization
compile 'com.squareup.okhttp:okhttp-android-support:2.5.0' //
compile 'com.squareup.okio:okio:1.6.0' //okhttp dependency
compile 'com.squareup.okhttp:okhttp:2.5.0' //networking lib
compile 'com.googlecode.libphonenumber:libphonenumber:5.5' //phone number validation
//Braintree for payments
compile 'com.braintreepayments.api:braintree:2.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Please help if you can.
It's slowing down my builds slightly, these warnings are everywhere from this invaluable
library....
app/build/intermediates/exploded-aar/com.braintreepayments/card-form/1.4.0/res/
drawable-mdpi-v4/bt_diners.png: libpng warning: iCCP: Not recognizing known sRGB
profile that has been edited
here's a solution to rid the library of them....
clear up all images in a directory (must fix path):
for i in $(find / -type f -name "*.png")
do
convert $i -strip $i
done
or
To just remove the image profile sRGB use the following command:
mogrify +profile sRGB <png file>
or as batch command:
find <path to res folder> -name *.png -exec mogrify +profile sRGB {} \;
I am new to payment service. I need followings.
step 1: Need login screen of Paypal service.
step 2: I need nonce ID for a successful login.
Once get nonce ID, I will send it to my server (back end team) they will do the payment.
I need following support from you.
I'm not able to import
import com.braintreepayments.api.dropin.BraintreePaymentActivity;
using the 2.0 beta version...
public void onBraintreeSubmit(View v) {
Intent intent = new Intent(context, BraintreePaymentActivity.class);
.putExtra(BraintreePaymentActivity.EXTRA_CLIENT_TOKEN, TOKEN);
startActivityForResult(intent, 100);
}
I am using compile 'com.braintreepayments.api:braintree:1.7.4'
in gradle to use the library
Code block is from developers website.
In version 1.7.3, I can import BraintreePaymentActivity
in my code but during version 1.7.4, I cannot.
onPaymentMethodNonce method not getting called on fragment....
@Override
public void onPaymentMethodNonce(String paymentMethodNonce) {
Log.i("paymentListner--------", paymentMethodNonce);
Toast.makeText(getActivity(),"paymentMethodNonce"+paymentMethodNonce,Toast.LENGTH_LONG).show();
postNonceToServer(paymentMethodNonce);
}
In case of Custom option credit card payment not working.
Using the sandbox, I create a user with 2 credit cards using the drop-in UI. Each time I return the the activity it shows the last added payment method. If I change the payment method in the drop-in UI, I can see the payment method has been updated in the sandbox, but the payment method shown is never updated.
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:com.android.dx.cf.iface.ParseException: class name (com/paypal/android/sdk/a) does not match path (com/paypal/android/sdk/A.class)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:749)
... 21 more
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:com.android.dx.cf.iface.ParseException: class name (com/paypal/android/sdk/aa) does not match path (com/paypal/android/sdk/aA.class)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:749)
... 21 more
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:com.android.dx.cf.iface.ParseException: class name (com/paypal/android/sdk/ab) does not match path (com/paypal/android/sdk/aB.class)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:749)
... 21 more
Hi,
can you please make the method static PaymentType forType(String paymentMethodType)
public in class PaymentMethodView?. The enum itself is accessable but method isn't from outside.
Thanks.
When we select custom option from demo app, credit card payment not working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.