braintree-rails is a framework that wraps the official braintree_ruby client library and provides ActiveModel compatible models that can be easily fit into an rails app.
Questions tagged [braintree-rails]
35 questions
5
votes
2 answers
Braintree on validation error
I'm using Drop-in UI which is configured in Braintree control panel to automatically verificate if the payment method is legit.
So in my application I disable form submit button when it is clicked, and if user payment method is not legit, it says…

Silverfall05
- 1,107
- 14
- 28
5
votes
1 answer
Add Discount to Braintree Rails Subscription
I'm trying to add a discount object to a subscription with the braintree-rails gem, but it is not applied. I'm guessing my code must be wrong, but I can't find a working example.
discount =…

Jonah
- 9,991
- 5
- 45
- 79
3
votes
2 answers
Duplicate nonce in BrainTree using Dropin UI
I'm using Braintree marketplace in the Sandbox, and I have a problem/question.
I'm using Customer ID when generating the client_token, saving the payment_nonce in my database and using it later (w/in 3-4 min) to submit_for_settlement. The problem is…

paolino
- 31
- 2
2
votes
1 answer
Creating a User with CC info with Braintree.js
I'm trying to submit a form that creates a new user (devise) and payment token through braintree.js all in one form. My html form looks like this.
Sign up
<%= form_for(resource, as:…
jmoon90
- 339
- 4
- 17
1
vote
0 answers
Is there any way to identify unique_number_identifier for Braintree::AndroidPayCard?
I am using Braintree for payment processing and also I am using Android pay through Braintree. I am saving card details in Braintree for future processing.
While saving card details to Braintree for Android pay users, Braintree did not provide a way…

Ravindra Yadav
- 619
- 2
- 6
- 15
1
vote
1 answer
Rails braintree catch error on focusout of the inputbox
I am using braintree in my Rails application. Integrated using gem 'braintree'. I use a dropin UI which is implemented like this:
braintree.dropin.create({
authorization: client_token,
container: '#bt-dropin'
}, function (createErr, instance)…

shahana hamza
- 107
- 1
- 1
- 10
1
vote
0 answers
Split Order Payment by Authorizing each shipment separately - Spree and Braintree
Braintree does not support partial payments in a single order authorization with more than one shipment when I set auto_capture_on_dispatch = true in Spree. It works for the first capture attempt but on second attempt will raise below error.
…

aminhs
- 45
- 6
1
vote
2 answers
Braintree, How do I delete a users credit card with the nonce from the client?
Server side there is a function to delete a payment method (result = Braintree::PaymentMethod.delete("the_token")) but it takes a payment method token. How do I get the payment methods token with the nonce from the client?
edit: I'm not using the…

Jake
- 383
- 6
- 26
1
vote
0 answers
When I called Braintree::Transaction.sale, got error "CVV must be 4 digits for American Express and 3 digits for other card types"
When I called Braintree::Transaction.sale with the "payment_method_nonce" which created by Drop-in UI, everything is alright.
However, after I added some custom fields in the Drop-in UI and call the same API, I got an error "CVV must be 4 digits for…

Kinglun Poon
- 41
- 4
1
vote
2 answers
Rails Braintree - To override braintree-dropin.css
I am using braintree as payment gateway in one of my ruby on rails app. But I am unable to customize the braintree submit form styles(css) for dropin form submit created by braintree js. How could I customize / override the css (style)?

Robin Garg
- 203
- 2
- 13
1
vote
1 answer
How to store Brain Tree Transaction Details Into Database in Rails 4
In my rails 4 application I am using Braintree sandbox testing transaction gateway. I am able to perform transactions and the transaction details are visible in my sandbox account.But my question is how to store the Transaction details into a table…

Praveen George
- 9,237
- 4
- 26
- 53
1
vote
1 answer
How to find payment method type when querying Braintree in Rails
I'm trying to query the payment method associated with a Braintree::Customer. I would like to display the type of the payment method(s) attached to the account and additional information (last 4 digits of card number if it's a credit card; email if…

Richard
- 828
- 1
- 8
- 28
1
vote
1 answer
Braintree Client Token Being Decrypted In ERB
I'm using Braintree with Ruby and JS to try and do a basic implementation of the Braintree Drop-In UI.
Here are some relevant code snippets:
Transactions Controller Creating The Token
@client_token = Braintree::ClientToken
Page Initializing The…

Nilnoc
- 101
- 1
- 13
1
vote
0 answers
Override Braintree Credit Card Error Messages on Spree and Ruby on Rails
Whenever the user enters a empty string during checkout, the following error message is flashed:
Credit card number is required. (81714)
Instead of showing that to the user, I would like to show:
Credit card number is needed to process your…

neo
- 4,078
- 4
- 25
- 41
1
vote
1 answer
Rails controller redirect to form in another controller then back to saved model
I need to do something kind of weird in my Rails app. Once a user creates a Product instance through the create action, I need it to save and then redirect them to a Braintree payment method form if they haven't already added one to their account,…

Tom Maxwell
- 9,273
- 17
- 55
- 68