-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Checkout: Send billing info to transaction endpoint #847
Checkout: Send billing info to transaction endpoint #847
Conversation
var validation = validateCardDetails( this._initialData.payment.newCardDetails ); | ||
const newCardDetails = this._initialData.payment.newCardDetails, | ||
validation = validateCardDetails( newCardDetails ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely not mandatory but you could use destructuring here:
const { newCardDetails } = this._initialData.payment,
validation = validateCardDetails( newCardDetails );
This saves a few characters :P.
I know this isn't part of the original issue but could you add a semicolon here while you're at it? |
Tested and works fine - we now send the following payment parameters:
I've made a few suggestions but otherwise this is good to go. |
ec685c8
to
4eae543
Compare
…ransaction-endpoint Checkout: Send billing info to transaction endpoint
Thanks @stephanethomas for the suggestions, I have not yet used much of the ES6 features, this is great way to learn it! |
For some reason we were not passing these fields along before. These fields are not PCI DSS covered, so we can freely pass them to backend.
To test, make purchase and observe data sent to the
/transactions
endpoint.