I’m working on updating a payment plugin that uses card tokens instead of card numbers.
The vendor loads a JS script on that page that has the user input card information. This script then generates a single-use encrypted token that gets submitted for processing instead of the card number.
After the user completes the token generation the script performs two actions:
- callback a js function with the response included obscured card number and token
- Inserts a hidden field with the id payment_token and value of the token
I could create a JS function that populates a known GF form field with this token data, but it seems to be easier to just read the hidden field that is inserted into the form; but i’m having trouble sorting out how to access this.
Since the input is being dynamically generated and then inserted into the form do I need to create a filter/hook to grab the input and add it to the $entry object?
Is there an easier way?