Braintree Paypal with DropIn UI and Vault not working
I've been reading the documentation for the past 3 days and haven't been able to figure it out (or at least get it to work).
What I want is the Drop-In UI that remembers previously added Paypal accounts so the user only has to click the account name again, so I'll be using the Vault flow.
What I've done is as follows
- Retrieve a braintree token from my server
Define the URL scheme as:
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
Initialize a BraintreeFragment and the Dropin UI using the following code:
braintreeFragment = BraintreeFragment.newInstance(getActivity(),
braintreeToken);
braintreeFragment.addListener(PaymentFragment.this);
DropInRequest dropInRequest = new DropInRequest()
.clientToken(braintreeToken)
.collectDeviceData(true);
startActivityForResult(dropInRequest.getIntent(context), 1);
@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce)
{
if (paymentMethodNonce instanceof PayPalAccountNonce)
{
PayPalAccountNonce paypalAccountNonce = (PayPalAccountNonce) paymentMethodNonce;
Toasty.info(context, paypalAccountNonce.getFirstName()).show();
}
}
When I run the app, the drop-in UI doesn't show up, and instead I see a white area at the bottom of the screen with a progress circle.
If I remove the BraintreeFragment
and onPaymentMethodNonceCreated
, the DropIn UI shows up normally but pressing the Paypal button does nothing other than dismissing the UI.
What am I doing wrong here? I have seen plenty of tutorials for CreditCard implementation but none for paypal that can help me.
android paypal braintree
add a comment |
I've been reading the documentation for the past 3 days and haven't been able to figure it out (or at least get it to work).
What I want is the Drop-In UI that remembers previously added Paypal accounts so the user only has to click the account name again, so I'll be using the Vault flow.
What I've done is as follows
- Retrieve a braintree token from my server
Define the URL scheme as:
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
Initialize a BraintreeFragment and the Dropin UI using the following code:
braintreeFragment = BraintreeFragment.newInstance(getActivity(),
braintreeToken);
braintreeFragment.addListener(PaymentFragment.this);
DropInRequest dropInRequest = new DropInRequest()
.clientToken(braintreeToken)
.collectDeviceData(true);
startActivityForResult(dropInRequest.getIntent(context), 1);
@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce)
{
if (paymentMethodNonce instanceof PayPalAccountNonce)
{
PayPalAccountNonce paypalAccountNonce = (PayPalAccountNonce) paymentMethodNonce;
Toasty.info(context, paypalAccountNonce.getFirstName()).show();
}
}
When I run the app, the drop-in UI doesn't show up, and instead I see a white area at the bottom of the screen with a progress circle.
If I remove the BraintreeFragment
and onPaymentMethodNonceCreated
, the DropIn UI shows up normally but pressing the Paypal button does nothing other than dismissing the UI.
What am I doing wrong here? I have seen plenty of tutorials for CreditCard implementation but none for paypal that can help me.
android paypal braintree
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04
add a comment |
I've been reading the documentation for the past 3 days and haven't been able to figure it out (or at least get it to work).
What I want is the Drop-In UI that remembers previously added Paypal accounts so the user only has to click the account name again, so I'll be using the Vault flow.
What I've done is as follows
- Retrieve a braintree token from my server
Define the URL scheme as:
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
Initialize a BraintreeFragment and the Dropin UI using the following code:
braintreeFragment = BraintreeFragment.newInstance(getActivity(),
braintreeToken);
braintreeFragment.addListener(PaymentFragment.this);
DropInRequest dropInRequest = new DropInRequest()
.clientToken(braintreeToken)
.collectDeviceData(true);
startActivityForResult(dropInRequest.getIntent(context), 1);
@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce)
{
if (paymentMethodNonce instanceof PayPalAccountNonce)
{
PayPalAccountNonce paypalAccountNonce = (PayPalAccountNonce) paymentMethodNonce;
Toasty.info(context, paypalAccountNonce.getFirstName()).show();
}
}
When I run the app, the drop-in UI doesn't show up, and instead I see a white area at the bottom of the screen with a progress circle.
If I remove the BraintreeFragment
and onPaymentMethodNonceCreated
, the DropIn UI shows up normally but pressing the Paypal button does nothing other than dismissing the UI.
What am I doing wrong here? I have seen plenty of tutorials for CreditCard implementation but none for paypal that can help me.
android paypal braintree
I've been reading the documentation for the past 3 days and haven't been able to figure it out (or at least get it to work).
What I want is the Drop-In UI that remembers previously added Paypal accounts so the user only has to click the account name again, so I'll be using the Vault flow.
What I've done is as follows
- Retrieve a braintree token from my server
Define the URL scheme as:
android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
Initialize a BraintreeFragment and the Dropin UI using the following code:
braintreeFragment = BraintreeFragment.newInstance(getActivity(),
braintreeToken);
braintreeFragment.addListener(PaymentFragment.this);
DropInRequest dropInRequest = new DropInRequest()
.clientToken(braintreeToken)
.collectDeviceData(true);
startActivityForResult(dropInRequest.getIntent(context), 1);
@Override
public void onPaymentMethodNonceCreated(PaymentMethodNonce paymentMethodNonce)
{
if (paymentMethodNonce instanceof PayPalAccountNonce)
{
PayPalAccountNonce paypalAccountNonce = (PayPalAccountNonce) paymentMethodNonce;
Toasty.info(context, paypalAccountNonce.getFirstName()).show();
}
}
When I run the app, the drop-in UI doesn't show up, and instead I see a white area at the bottom of the screen with a progress circle.
If I remove the BraintreeFragment
and onPaymentMethodNonceCreated
, the DropIn UI shows up normally but pressing the Paypal button does nothing other than dismissing the UI.
What am I doing wrong here? I have seen plenty of tutorials for CreditCard implementation but none for paypal that can help me.
android paypal braintree
android paypal braintree
asked Dec 31 '18 at 16:45
AsimAsim
1,73542549
1,73542549
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04
add a comment |
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53989613%2fbraintree-paypal-with-dropin-ui-and-vault-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53989613%2fbraintree-paypal-with-dropin-ui-and-vault-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support at help.braintreepayments.com. In order to better assist you I would recommend writing in to our Support team to start a ticket. We may need to review some information within your specific account to better troubleshoot you, which won't work as well through a SO thread. Once you write into our Support team someone will be able to assist you.
– bbusby
Jan 2 at 14:04