

Updating Braintree to the Latest Version in Xamarin Forms
source link: https://www.xamboy.com/2021/04/01/updating-braintree-to-the-latest-version-in-xamarin-forms/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Updating Braintree to the Latest Version in Xamarin Forms

A time ago I wrote a series of articles on how to integrate Braintree Payment in Xamarin Forms, since then a few things have changed. In this article, I’m going to guide you step by step on what you need to do if you were using the Naxam.BrainTree.Droid <= v3.14.0 and/or Naxam.BraintreeCore.iOS <= 4.11.0 and you want to update it to the latest versions.
IMPORTANT: If you are using an old version of this package is important you update it due to the Braintree SDK Deprecation policy,
Android
1. Update the Packages
Before doing anything if you haven’t updated the project to Android X is important you do that first. If you don’t know how to, I recommend you to read this article.
After that, update all the Braintree packages you are using to the latest version:
2. Small code changes
1.Instead of doing:
PayPal.AuthorizeAccount(mBraintreeFragment);
PayPal.RequestOneTimePayment(mBraintreeFragment, new PayPalRequest($"{amount}"));
2.Instead of doing:
mBraintreeFragment = BraintreeFragment.NewInstance(CrossCurrentActivity.Current.Activity, clientToken);
mBraintreeFragment = BraintreeFragment.NewInstance((AppCompatActivity)CrossCurrentActivity.Current.Activity, clientToken);
iOS
In iOS, you just must update all the Braintree related packages to the latest version and all the code should work the same.
You can check the full source code used here.
Happy Update!
Be First to Comment
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment
Name*
Email*
Website
Notify me of follow-up comments by email.
Notify me of new posts by email.
Recommend
-
101
-
13
Updating to the Latest Version of JumpStart Pro Dec 29, 2019 So I've been using JumpStart Pro to build a new side p...
-
10
Live Coding: Braintree Payment APISchedule time with mepowered by Calendly
-
9
Adding Swift Package Manager Support to the Braintree iOS SDKBy Susan Stevens and Sammy Cannil...
-
10
react-native-braintree-android A react native interface for integrating Braintree's native Drop-in Payment UI for Android using Braintree's v.zero SDK.
-
10
Payments A react native interface for integrating payments using Braintree's v.zero SDK ...
-
4
How to Build a Robust Payment Processing Flow with Braintree (feat. BT Playground)By Sreeram Vasudevan and
-
13
The popular MVVMCross Nuget PackageMigrating & Updating an old Xamarin Native MvvmCross project6 Steps taken to perform the migration, and some hindsightXamarin Native was extremely popul...
-
5
V2EX › 程序员 有人做过 Braintree 对接 paypal 支付吗?遇到了点问题 loonie · 12 小时...
-
6
@ekreative/react-native-braintree Getting started Android Specific Add this to your build.gradle allprojects {...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK