open-pay / openpay-js

Openpay Javascript bindings
Apache License 2.0
24 stars 28 forks source link

TypeError: object[fieldName].push is not a function #16

Closed angelscabrerag closed 3 years ago

angelscabrerag commented 6 years ago

El Error:

TypeError: object[fieldName].push is not a function
openpay.v1.js:318:25
openpay.v1.js:332:33
openpay.v1.js:557:27

Solo aparece solo cuando utilizo los campos en el formulario:

data-openpay-card-address="line1"
data-openpay-card-address="line2"
data-openpay-card-address="line3"
data-openpay-card-address="city"
data-openpay-card-address="state"
data-openpay-card-address="country_code"
data-openpay-card-address="postal_code"

Al revisar las lineas de codigo indicadas en https://openpay.s3.amazonaws.com/openpay.v1.js o https://openpay.s3.amazonaws.com/openpay.v1.min.js son las siguientes:

318 object[fieldName].push(inputValue || ''); 332 objectAddress = createObject(addressFields, 'data-openpay-card-address'); 557 var _params = INSTANCE.extractFormInfo(_form);

El mismo error aparece al usar ambas versiones de la libreria (no min.js o min.js). Al retirar los campos data-openpay-card-address todo funciona correctamente.