FAQ Database Discussion Community


Using Braintree and Stripe in Android app

android,stripe-payments,braintree
I have developped an Android app and the only thing left is to implement a payment solution to sell goods. I have been searching for a while and found Stripe and Braintree. It seems that they are pretty much the same in many aspects. However, I was wondering which one...

Braintree Drop in callback and Angular $scope doesn't work

javascript,angularjs,braintree
I am trying to utilize the braintree drop in UI within an angular controller eg. https://jsfiddle.net/6jmkwode/ function PaymentCtrl($scope) { $scope.hasCalledBack = 'Nope'; braintree.setup('BRAINTREE_KEY', 'dropin', { container: 'dropin', onPaymentMethodReceived: function (obj) { $scope.hasCalledBack = 'YEP!'; alert('Did the scope variable change? No? Well it should have....'); } }); } However the $scope.hasCalledBack...

How to post “amount” variable in a Braintree JS secure custom form?

javascript,python,braintree
Is it possible to send your amount at the same time as your payment form when using braintree? The Braintree guide explicitly says: "Make sure you don't include name attributes in your form elements. If the form is accidentally submitted and name attributes are present, sensitive data can reach your...

Issue on installing yii2-braintree via composer

composer-php,braintree
I've installed the Braintree component via composer successfully, and now I wish to install, also using composer, the yii2-braintree. I inserted, just like it's recommended, the "bryglen/yii2-braintree": "*" line in the require section of my composer.json: "require": { "php": ">=5.4.0", "yiisoft/yii2": "*", "yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-swiftmailer": "*", "braintree/braintree_php": "2.37.0", "bryglen/yii2-braintree": "*"...

Braintree Hosted Fields Example

iframe,braintree,pci-compliance
I am trying to get my head round the Hosted Fields framework of Braintree. It has been released just a few days ago and is still in beta. I looked at the docs. I'm getting the overall idea but it would be nice to have some sort of small working...

Android Braintree SDK Integration in current application's activity

android,braintree
I would like to integrate Braintree API into my android application.I referred to Braintree page and I got an idea for how we can integrate it into application. But I have an issue when I want to display Drop-In UI below of my currently showing activity's layout. But in demo...

Braintree API: How can I tell which payment_method is associated with my nonce?

braintree
Background: I create a braintree customer with firstName, lastName and email I use the dropin ui in checkout form and it creates a payment_method and token and sends me a nonce. Good so far. I need to add a billing address to the payment_method before I charge the nonce... Question:...

Difference between Braintree Customer and Submerchant?

payment,braintree
I've been reading through Braintree's documentation but I'm having a little bit of trouble figuring out the difference between creating a customer: https://developers.braintreepayments.com/ios+php/reference/request/customer/create and creating a SubMerchant account: https://developers.braintreepayments.com/ios+php/reference/request/merchant-account/create Can anyone help explain what situations would call for you to use one over the other?...

Does the latest transaction in a Braintree Subscription object appear at the top of the array or bottom?

braintree
I am having a hard time deciphering the the Subscription Object for Braintree that is returned via a web-hook upon each billing cycle. The Braintree documentation fails to shed light upon the nature of transactions which are supposed to appear in the transaction array. For example, will the latest transaction...

Is Braintree's braintree-data.js producing an FB global?

javascript,facebook,braintree,braintree-data
https://js.braintreegateway.com/v1/braintree-data.js produces a function called createThirdPartyBlock, which (upon calling BraintreeData.setup) injects https://www.paypalobjects.com/webstatic/r/fb/fb-all-prod.pp.min.js (gist copy (for posterity): https://gist.github.com/csmosx/55fae21b78468e6ba55f) Which seems to be adding an FB global... thus overriding any existing FB global, including the Facebook SDK. Why they would want to do this I have no idea, but the code is...

How to consume the node stream returned by braintree

node.js,braintree
Braintree provides an api to search for the transactions. Braintree has provided an example, but i'm not aware how to read the node stream returned by braintree. Please look into the following code snippet: var stream = gateway.transaction.search(function (search) { search.paymentMethodToken().is("h337xg"); }); stream.pipe(someWritableStream); //When I try to print the stream...

Header Not Found in ios Project

objective-c,xcode,xcode6,cocoapods,braintree
I am working on a project where I integrate Braintree. It works fine, but suddenly my Xcode started showing me an error of Missing Braintree.h; Braintree manage by cocoa-pods. I tried updating pods, reinstalling Pods, reinstalling Braintree SDK, and updating the SDK, but all are useless. Now my code is...

Meteor xcode project created with 'meteor build' vs. project created with 'meteor run ios-device'

iphone,xcode,cordova,meteor,braintree
I have a specific question about any differences in the build process for a Meteor (IOS) xcode project when you run the following two commands: meteor run ios-device --mobile-server 10.0.1.16:3000 --settings settings.json vs. meteor build /mobile-build --server 10.0.1.16:3000 --mobile-settings settings.json Both create an xcode project, which I can then run...

Braintree drop-in auto-reload despite paymentMethodNonceReceived

javascript,forms,braintree
So I have a single-page app, and a braintree drop-in located on the register page. There is an option for a free account, so I do not have the form that the drop-in is inside as the main form of the page. So I have a form like this: <form...

Will the Braintree JavaScript API work ok for Windows Phone?

windows-phone,braintree
I have been reviewing Braintree for an app I may be developing. I was wondering if I could use the JavaScript API to utilize Braintree on a Windows Phone 8.1 HTML / CSS / JS Runtime app(since there is no official Windows Phone API). Would I run into any issues?

How to create hidden 'payment_method_nonce' input by braintree.js?

javascript,braintree
I configure braintree.js like this: braintree.setup( brainTreeClientToken= 'token_from_server' 'dropin', { container: 'brainTreeDropin', form: 'checkout' }); </script> As i understand from the documentation of developers.braintree, you need to send a request param named 'payment_method_nonce' to your server, but it is not present in request. I don't see any js fault in...

Getting Braintree client token using PHP?

php,eclipse,google-app-engine,braintree
I'm following Braintree's instructions to create a client token using this page. I made a Sandbox Account. Then, I downloaded the PHP library. The file downloaded as braintree-php-2.37.0.tgz, which I unzipped. Then, using Eclipse for PHP Developers and following these directions, I: went to Eclipse, then Preferences..., then PHP, then...

Braintree Paypal works in Sandbox but not production

javascript,php,paypal,braintree
I am using Paypal/Braintree with PHP sdk and setting up Vault flow to create subscriptions. It all worked fine in Sandbox but now in product I get error code 93108, message: Unknown paymentMethodNonce. My client side code is: braintree.setup(GFormVATVars.br_client_token, "paypal", { container: "paypal-container", singleUse: false, onPaymentMethodReceived: function (obj) { $(".gform_next_button").show();...

Braintree iOS SDK saying no known class method

ios,xcode,braintree
I m getting this error. Anyone? -(void)clientToken{ NSURL *clientTokenURL = [NSURL URLWithString:@"http://tectutiveclients.com/projects/carboss/api/getToken"]; NSMutableURLRequest *clientTokenRequest = [NSMutableURLRequest requestWithURL:clientTokenURL]; [clientTokenRequest setValue:@"text/plain" forHTTPHeaderField:@"Accept"]; [NSURLConnection sendAsynchronousRequest:clientTokenRequest queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { // TODO: Handle errors...

Marketplace future payment : Escrow vs Scheduled Payment

payment,stripe-payments,marketplace,braintree,escrow
I am currently building a marketplace similar to airbnb/uber for the payment, where sellers would receive payment from buyers once the "service" is completed. The payment solutions I am considering are Stripe and Braintree. Braintree offers Escrow while Stripe doesn't. To make the transfer there are thus 2 solutions: with...

How to obtain all transactions of customer (python)

python,braintree
I need to implement a page containing all transactions of a customer. In the docs it's written that the customer contains transactions property, but in the latest version of the api (3.10.0) this is not true. How can I obtain all transaction of the given customer? I also looked inside...

Webmock: how to fake a gzipped response?

ruby-on-rails,ruby-on-rails-4,stub,braintree,webmock
I don't have much experience with stubbing and am having issues with requests to Braintree using webmock and braintree-rails. spec/spec_helper.rb RSpec.configure do |config| config.include(ConnectionHelper) config.before(:each) do stub_request(:post, /.*braintree.*/). with(braintree_hash).to_return(gzipped_response) end end spec/support/connection_helper.rb def gzipped_response { status: 200, body: "\u001F\x8B\b\0:\x87GU\0\u0003\u0003\0\0\0\0\0\0\0\0\0", headers: {} } end def braintree_hash { :body => /.*/, :headers...

Deleting customer credit card (paymentMethod) - what happens to subscriptions?

braintree
Let's say that customer has single credit card (paymentMethod) bound to his account and he starts (buys) subscription to monthly plan with 30 day trial. I would like to allow user to manage his credit card: delete it, add new (after deleting old card) and change it (delete+create new, actually)....

Is it safe to render customer card token in HTML

html,payment-gateway,braintree
in the system I'm working on we allow the user to store more than a payment card and then select one to use during checkout. The card token is a natural identifier for the card so it may seem a good key to use (we store nothing in our app)....

is this braintree testing multi purchase error something I should worry about?

ruby,integration-testing,payment,braintree
I'm trying to figure out how to test with braintree, and I'm running into what feels like a bandwidth error. response = ::Braintree::Customer.create(payment_method_nonce: Braintree::Test::Nonce::Transactable) token = response.customer.credit_card.first.token #so far so good response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00") #still good response = ::Braintree::Transaction.sale(payment_method_token: token, amount: "1.00") #response is failure # =>...

Using the Braintree drop-in UI to select the payment method for recurring billing — or: finding the payment method of a paymentMethodNonce

javascript,php,payment-gateway,braintree
I'm building a simple payment system using Braintree payments, PHP and JavaScript. I'm using Braintree's Drop-in UI, and would like to create subscriptions (i.e. recurring billing). For this, I'm using: // $_customer is a Braintree_Customer object; a customer stored in the Vault $subscription_create = Braintree_Subscription::create([ 'id' => $_customer->id, 'planId' =>...

Braintree IOS + rails error 91564 Cannot use a payment_method_nonce more than once

ruby-on-rails,ruby,braintree
I'm getting an error from Braintree on Braintree::Transaction.sale Braintree::ErrorResult params:{...} errors:transaction:[(91564) Cannot use a payment_method_nonce more than once. However when I check the nonce token, it's always different from the last request. Sample nonces received from IOS app: 10e368f1-81bc-4ace-b4b4-76cfdc4d1459 02cc81b2-d6c7-416b-b5d5-5b23c7e81fad ...

Changing customer_id in the vault with braintree ruby sdk

ruby-on-rails,ruby,ruby-on-rails-4,braintree
I have a rails app with gem 'braintree'. Documentation: https://developers.braintreepayments.com/ios+ruby/reference/request/credit-card/create https://developers.braintreepayments.com/ios+ruby/reference/response/customer I would like to change the way I store customer ids in the vault. (say, from "BT_#{id}" to "SOME_OTHER_KEY_BT#{id}") I would like to keep the existing cards each customer have in the vault. Two approaches: Updating existing customer ids...

BrainTree drop-in controller not show correctly

ios,braintree
why my Braintree Drop-In controller doesn't have label for Credit Card, Expire date, and CVV on their respective TextField? It only show blank textfield without label. ...

Why is the transaction_disbursed webhook deprecated?

braintree
On the pages documenting webhooks, like https://developers.braintreepayments.com/javascript+php/reference/general/webhooks, the transaction_disbursed webhook is listed as deprecated: Deprecated If your merchant account is associated with a participating bank then we will send you this Webhook once a transaction has been marked for disbursement (meaning it will leave our bank account today). You will...

BrainTree - Authorize credit card for a certain amount

payment-gateway,payment-processing,braintree
Using BrainTree API, is it possible to check if a credit card can be charged a certain amount before actually performing transaction? Lets say I have stored a customer's credit card token and before providing him with my service I want to make sure that that card can be charged...

Braintree: Creating a new subscription after the user has canceled

braintree
I am trying to decide how to handle the situation where a user has subscribed through the month, lets says 6/1 they are subscribed through until 6/31. Midway through the month they decide to cancel their subscription (6/15), but then on 6/20, they decide to restart their subscription again. How...

Braintree Drop-in UI - send form using AJAX

jquery,ajax,braintree
I'm trying to implement the Braintree Drop-in UI and I want to send the form using a custom jQuery ajax method. Previously, I used to send the (non drop-in UI) form using the jQuery serialize() method, but for the new (dynamically loaded) Dropin UI form the serialize() method doesn't seem...

Braintree Create Plan using API

php,braintree
Is there any way to create Plan using php API? In the documentation, its given that one needs to manually create plan from the account but i want to create Plan dynamically from the system.

Second transaction for same customer fails to increase transaction count

braintree
Dashboard --> Vault for a customer shows transaction count as 1 when even number of transaction for same customer is greater than 1. ckfmf6 Default Visa 411111******1111 05/11/15 1 Code below creates customer and executes transaction. TransactionRequest request = new TransactionRequest(); request.customer() .firstName("Jenna") .lastName("Smith"); request.creditCard() .number("4111111111111111") .expirationMonth("05") .expirationYear("2016") .cvv("100"); request.billingAddress()...

Callback function of tokenizeCard it's not called on Braintree

javascript,jquery-callback,braintree
I been integrating Braintree with my application and I found a problem. I need to use the method tokenizeCard but it seems the callback it's not called and I don't understand why. function buyNow() { var token = getSessionVarFromView('client_token_braintree'); console.error(token); braintree.setup(token, "custom", {id: "braintreePaymentForm"}); var client = new braintree.api.Client({clientToken: token});...

Braintree drop-in, disable submit button while processing

javascript,jquery,braintree
I'm trying to do something that seems easy but I cannot get it to work. I'm using Braintree dropin UI and I have submit button. I need to disable the button while processing and I cannot find a good event to attach to. var ct = 'tokenhere'; var bt =...

Rails ajax form: how to fix up fields before the form gets sent

ruby-on-rails,ajax,braintree,braintree-rails
In Rails 4.1.8 I'm working on a payment form (Braintree payments), I want it to work via Ajax. I can't use the standard Braintree form setup because that doesn't offer an onSuccess and onError method. But I can use a special javascript function that looks at the fields, talks to...

Unknown Payment Method Nonce

laravel-4,payment-gateway,braintree
My setup is: Laravel 4.2 Braintreepayments JS + PHP Laravel Braintree I tried to add a new customer as showed in the tutorial which works fine. But when I tried to add a payment method from the Front-End with the given code from the JavaScript SDK. I used the Drop-In-UI...

Braintree creditcard in UITableViewCell

ios,braintree
I'm currently using a drop in UI to complete a payment transaction flow. I'm able to successfully save a payment nonce to the braintree server associated with my customer id with their Drop-In UI. What I'd like to do, is instead of showing the Drop in UI shown below, instead...

Dx trouble writing output: already prepared… - Error in console

java,android,eclipse,e-commerce,braintree
braintree-api-1.6.1-full.jar android:minSdkVersion="14" android:targetSdkVersion="18" I need to implement braintree inside my android app which has no issues, but as I copy the braintree jar file, into my projects libs folder and import the necessary classes, my app crashes. Full error message in console: Dx trouble writing output: already prepared [2015-06-18...

Creating a customer in BrainTree with a credit card

node.js,braintree
I'm reading the docs about creating a customer. I need to create one with a credit card, a cvc number but I get an error and I don't know how I must create it. I show my code if(user.local.subscription == undefined){ //creamos cliente gateway.customer.create({ creditCard : { number : cardnumber,...