Skip to content

Commit

Permalink
Merge pull request #54 from ericghpham/ericghpham/arrayify-verificati…
Browse files Browse the repository at this point in the history
…on-errors

Array-ify verification errors if necessary
  • Loading branch information
deanpapastrat authored Jan 8, 2020
2 parents 3dfb763 + 4ff1d0c commit f9a2eeb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addon/components/square-payment-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,12 @@ export default Component.extend({
this.paymentForm.verifyBuyer(
nonce,
this.createVerificationDetails(),
(verificationErrors, result) => {
(verificationError, result) => {
const errors = verificationError ? [verificationError] : null;
const verificationToken = result ? result.token : null;

this.onCardNonceResponseReceived(
verificationErrors,
errors,
nonce,
cardData,
billingContact,
Expand Down

0 comments on commit f9a2eeb

Please sign in to comment.