javascriptphppayment-gateway2checkout

Want to read input by Id instead of by name


i want javascript live read my input field by "id" because payment gateway not allow to add name in input field

formSelectors: {
              numberInput: 'input[name="number"]',
              expiryInput: 'input[name="expiry"]',
              cvcInput: 'input[name="cvc"]',
              nameInput: 'input[name="name"]';
            }

Solution

  • finally i got solution here is so simple change name to id

    formSelectors: {
              numberInput: 'input[id="number"]',
              expiryInput: 'input[id="expiry"]',
              cvcInput: 'input[id="cvc"]',
              nameInput: 'input[id="name"]'
            }