Braintree iOS SDK
The Braintree iOS SDK is a software development kit that enables developers to handle payments within their iOS applications. This SDK offers various features, making online payment options dynamic, secure, and user-friendly.
Features
- Accept all major credit and debit cards
- Accept PayPal, Apple Pay, and Google Pay payments
- 3D Secure verification
- Venmo payments via the Braintree SDK
- Drop-in all-in-one UI and Hosted Fields
- An advanced fraud protection feature
- Seamless integration with a multitude of payment gateways
- upport for multi-currency
Installation
To install the Braintree iOS SDK, follow the steps below:
pod 'Braintree'
Integration Example
Here’s a basic example of integrating the Braintree iOS SDK into your application:
import Braintree
let braintreeClient = BTAPIClient(authorization: "your_tokenization_key")!
let request = BTDropInRequest()
let dropIn = BTDropInController(apiClient: braintreeClient, request: request)
{ (controller, result, error) in
if let error = error {
print("ERROR: \(error.localizedDescription)")
} else if (result?.isCancelled == true) {
print("CANCELLED")
} else if let result = result {
// Use the BTDropInResult properties to update your UI
let selectedPaymentOptionType = result.paymentOptionType
let selectedPaymentMethod = result.paymentMethod
let selectedPaymentMethodIcon = result.paymentIcon
let selectedPaymentMethodDescription = result.paymentDescription
}
present(dropIn!, animated: true, completion: nil)
}
Contact and Support
For any queries, feedback or bugs, navigate to the official GitHub repository or contact support@braintreepayments.com. Refer to the official Braintree documentation for comprehensive understanding and integration details.