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

  1. Customize the payment forms of each payment method that your store supports.
  2. 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
  3. 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>));
  4. Implement extension code for the following extension points for payment tokenization.
    • create_payment_token
    • remove_payment_token
    • update_payment_token
    • approve_payment
    For more information about the extension points, see Payment tokenization extension points.
  5. Register the extension code that you created for the extension points into the database.
    1. Create input files by using the CmdReg and UEConfig keywords.

      For more information, see Assigning extension code to extension points.

      The following input files are provided as samples that you can use and edit as needed.
      The samples include:
      1. The sample extension point configuration for create_payment_token, which maps to POST extension/payment/create_payment_token on the Customization server.
      2. The sample extension point configuration for update_payment_token, which maps to POST extension/payment/update_payment_token on the Customization server.
      3. The sample extension point configuration for remove_payment_token, which maps to POST extension/payment/remove_payment_token on the Customization server.
      4. The sample extension point configuration for approve_payment, which maps to POST extension/payment/approve_payment on the Customization server.
    2. Save the input files to the WCDE_installdir/samples/DataLoad/xC directory.
    3. Load the CmdReg and UEConfig files to the database.
  6. Test the payment method in your store.
    1. Select VISA or Mastercard as the payment method when you check out.
      Your extension code for create_payment_token is called when the payment information is submitted.
    2. Submit the order on the Order confirmation page.
      Your extension code for approve_payment is called when the order is submitted.

What to do next

To enable in your production environment:
  • 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.