Comments (9)
Hi foresto,
The required format of the parameter names apply only to the "name" attribute of the fields. The "id" attribute can be whatever format you prefer. Only the name and value attributes are used when the form is posted.
If the specific web form library you're using doesn't provide an easy way to specify the form element name separate from the id, we'd definitely be interested in learning more details. We're always interested in making the integration experience as easy as possible and feedback like this is very helpful.
Hammer
Braintree Developer
from braintree_python.
Yes, I understand that the "id" attribute doesn't affect Braintree's server.
My point is that, in modern web development, the "name" attribute affects more than just the html and the data that gets posted to a server. A lot of people use web toolkits to simplify / automate form handling, and some of the ways those toolkits make our lives easier rely on "name" attributes being shared with "id" and "for" attributes in the HTML, as well as native class attributes and variables in the programming language that fills the templates. By requiring square brackets in the "name" attribute, Braintree effectively forces programmers to abandon their form toolkits or else (sometimes extensively) rewrite form handling code that would otherwise be automated.
I never claimed that working with Braintree's naming convention was impossible. It's just time consuming, fiddly, error prone, and generally irritating. The opposite of elegant, if you will. If you allowed a more widely-compatible naming convention like the one I suggested, our programmers could spend their time on more productive things.
from braintree_python.
It's probably worth noting that at least one of your competitors who offer functionality similar to Transparent Redirects use an underscore to delimit subfields within "name" attributes. (Similar to what I suggested in my bug report here.) I have no doubt that they chose this approach for maximum compatibility.
from braintree_python.
I see that this issue is now marked as "closed", yet it has not been addressed. You seem to have misunderstood the second use case in my report, and completely ignored the first.
from braintree_python.
Closing was accidental, reopening.
from braintree_python.
We'll be releasing support for using double underscores this week.
from braintree_python.
Hooray! This will allow our Braintree form code to work like all the other form code in our system, rather than re-implementing library functionality in bizarre ways and requiring special knowledge to avoid breaking.
from braintree_python.
I just got a chance to try the new syntax, and it seems to be working quite nicely. Thank you! I hope to incorporate it into our integration code soon. Any chance it will find its way into a future rev of the documentation?
from braintree_python.
On a more personal note, I'm sorry about the strident tone of my earlier message. I had only intended to clarify the nature of the problem I was reporting, and upon rereading, I see it came out a bit harsh. For the record, you folks have been doing an outstanding job of addressing issues as they arise. I'll mind my phrasing next time.
from braintree_python.
Related Issues (20)
- gateway.transaction.find raises a TypeError when initialised with client_id and secret HOT 2
- Respect the requests_ca_bundle environment variable HOT 2
- Transaction using nonce fails but payment method gets vaulted with option "store_in_vault_on_success" HOT 1
- Is this library thread-safe? HOT 3
- Connection pooling HOT 3
- Module fails on import HOT 1
- TypeError: can only concatenate str (not "NoneType") to str HOT 1
- Braintree created subscription not showing in sandox account HOT 3
- Print transactions in JSON format HOT 4
- Headers provided by braintree http util contain mixture of str/bytes HOT 2
- Remove universal wheel, python 2 is unsupported HOT 2
- Use python_requires='>=3.5' HOT 2
- Paypal credit
- strings with special regex characters are causing a DeprecationWarning HOT 3
- Include updated_at field in TransactionSearch HOT 2
- Go SDK + CloudQuery source plugin? HOT 1
- Can't upgrade to Braintree 4.18.1 / Python 3.10.9 (DeprecationWarning: Use ProtectionLevel enum instead) HOT 11
- braintree python sdk support initWithAuthorization/initWIthAPIClient like iOS SDK and receive client token as argues? HOT 1
- Unittest failures on Python 3.12 HOT 1
- Expose error details in "UnexpectedException" in Python library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braintree_python.