Enabling payment tokenization
You can enable payment tokenization by configuring your store's payment form to support tokenization, and then creating extension code to create, update, or remove tokens.
Procedure
-
Customize the payment forms of each payment method that your store supports.
-
Download and extract the following paymentstokenize.zip file to the
workspace_dir/WC/xml/config/ directory.
The package includes sample files to set up the payment method configuration, and payment mappings needed for tokenization.This will set up:
- The sample payment system CustomizationSystem, which maps to the payment plug-in CustomizationPlugin.
- The sample payment method configuration TokenFlow, which maps to the payment system CustomizationSystem.
- Mapping from payment methods VISA and MasterCard to payment method configuration TokenFlow.
Ensure that after extraction, your environment contains the following directory structure.- workspace_dir/WC/xml/config/payments/edp
- workspace_dir/WC/xml/config/payments/ppc
-
Add the payment tokenization payment methods to the database.
Note: Ensure that you update <StoreIdentifier> in the following statement. This statement updates existing VISA/Master Card policies to support tokenization on the target store.
update policy set properties=concat(properties,'&tokenization=true') where policyname in ('VISA','Master Card') and storeent_id in (select storeent_id from storeent where identifier in (<StoreIdentifier>));
-
Implement extension code for the following extension points for payment tokenization.
create_payment_token
remove_payment_token
update_payment_token
approve_payment
-
Register the extension code that you created for the extension points into the database.
-
Test the payment method in your store.
What to do next
- Repeat the SQL statements against your production database.
- Check in the source code to your source code repository for the CI/CD pipeline to package and deploy the customizations.
- Load your dataload CSV files to your production environment.