The server side component of the cc-tokenizer.
npm install --global @brad-jones/cc-tokenizer-server
yarn global add @brad-jones/cc-tokenizer-server
The server use environment variables for configuration.
developmentwhen testing and debugging.
0.0.0.0to attach to all interfaces.
Then just run
cc-tokenizer-server, which should be on your
$PATH after doing a global install of the package.
NOTE: Alternative Install Method
Instead of installing the package globally, you could install it into a local node.js project. And then create a
.envfile with the above configuration.
This package is all well and good, it can create new credit card tokens for you. However it obviously does not understand how / where you would like to store your new credit card tokens.
The token receiver is a fully qualified URL that will be "POSTed" to every time a new token is created.
The payload that your reciever endpoint will get, looks like:
Now you can store the
token against the
customerRef in your database.
resultTokenis an intermediate token and is only included for "completeness" sake. Maybe it might be useful in debugging / logging.