0.0.6 • Published 6 years ago

capacitor-braintree v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

capacitor-braintree

A Capacitor plugin for the Braintree mobile payment processing SDK

Installation

$ npm i capacitor-braintree

iOS configuration

Add the following in the ios/App/App/info.plist file:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>capacitor-braintree</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>{Bundle Identifier}.payments</string>
        </array>
    </dict>
</array>

More information can be found here: https://developers.braintreepayments.com/guides/paypal/client-side/ios/v4

Android configuration

(Under development)

Usage

import {Braintree, DropInResult} from 'capacitor-braintree';
...
const braintree = new Braintree();
braintree.setToken({
    token: token
}).then(
    () => {
        braintree.showDropIn({
            amount: '10.0',
            disabled: ['venmo'] // (optional) 'paypal', 'card', 'venmo', 'applePay'
        }).then(
            (payment: DropInResult) => {
                console.log(payment);
            }).catch((error) => {
            console.log(error);
        });

    }).catch((error) => {
    console.log(error);
});
0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago