Country-code spoofing

Worldpay payments are based on country codes, and if a country’s code is not accepted by Worldpay, then no payment methods appear in the checkout page. To overcome this, there is a country-code spoofing option.

Use this option to override a refused country code by mapping it to an accepted country code.

How does it work?

Magento assigns a country code to orders based on the customer's billing address. Worldpay then fetches the accepted payment methods for that country code.

Because Worldpay does not recognize country codes for areas such as Jersey (JE) and the Isle of Man (IM), you can opt to implement country-code spoofing. This ensures that a refused country code is mapped to an accepted country code.

To configure this, do the following:

  1. Go to: Stores/Configuration/Sales/Worldpay/Miscellaneous The Miscellaneous screen appears:

Miscellaneous - Country codes

  1. Enter JE-GB where JE is the refused code and GB is the code you want to map. To enter multiple country-code spoofs, separate your entries with commas.

If an order is placed with a refused country code, the shopper sees the error message below:

Miscellaneous - Country codes