In the example on this repo that demonstrates a nodejs integration of SqPaymentForm.js, the user is presented with the minimum fields required for a transaction: Card Number; CVV; Billing Postcode; Expiry Date.
While this expedient form is great for a speedy integration, and a speedy transaction, is it possible to add more fields to the square payment form?
I would like the SqPaymentForm on my page to include billing address and/or shipping address, and buyer email address, as this would allow my websites transactions to qualify for Square Chargeback protection.
A secondary wish would be for the SqPaymentForm to facilitate the buyers given name, last name, and title, as this would be all the data that I really need to collect.
For example, will this give me an email input for the buyer_email_address with validity checking, if placed in a sq-payment-form
div?
div(class="sq-field sq-field--in-wrapper")
label(class="sq-label") Email Address
div(id="sq-buyer-email-address")
(along with some extension to the SqPaymentForm construction code..)
paymentForm = new SqPaymentForm({
applicationId: applicationId,
locationId: locationId,
inputClass: 'sq-input',
inputStyles: _squareInputStyles,
// Initialize a field for the buyers email address
buyerEmailAddress: {
elementId: 'sq-buyer-email-address'
},
......
It would be brilliant news if SqPaymentForm can validate these fields also.
(At the moment I'm trying to process two forms in an angularjs application on one button press..)
Perhaps this is already possible, perhaps it is not?
Thanks :)