Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially ambiguous field names #146

Closed
zanderwar opened this issue Nov 2, 2016 · 2 comments
Closed

Potentially ambiguous field names #146

zanderwar opened this issue Nov 2, 2016 · 2 comments

Comments

@zanderwar
Copy link
Contributor

zanderwar commented Nov 2, 2016

tl;dr Change field number and name that represents a credit card number and name to cardNumber and cardName

This could cause ambiguity when you $fields->merge($gatewayFactory->getFields());

Might be worth changing it to something more semantic such as cardNumber and cardName so the chance of conflicts with the merge above are reduced.

I've had to give my original fields less-semantic names due to this (not like it's a big issue)

Feel free to close this issue if you think otherwise :)

@zanderwar zanderwar changed the title Potentially ambiguous field name Potentially ambiguous field names Nov 2, 2016
@bummzack
Copy link
Collaborator

bummzack commented Nov 2, 2016

I agree that this isn't ideal, but the field-names just map directly to the properties of the Omnipay CreditCard class. Renaming them would also mean to introduce a proper mapping from the form-field-names to the omnipay properties.

There's so many use-cases for front-end forms and the GatewayFieldsFactory just provides the bare minimum. It should be replaced with a more versatile solution…

@bummzack
Copy link
Collaborator

Closed via #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants