When I initiate a HPS payment with customer's country set in human readable format (for example, Latvia), upon transaction query I get non-interrupting error message which says The 'country' element is invalid - The value 'Latvia' is invalid according to its datatype 'Union' - The value 'Latvia' is not valid according to any of the memberTypes of the union. at line 0, position 0.
When I initiate a HPS payment with customer's country set to country code (for example, LV), I do not get such a message.
The solution
Docs should be updated with indication that country in customer's details should be formatted as a country code, not human readable format.
<!-- snip -->
<Risk>
<action_response>
<bankresult_response>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Successful</response_message>
<transaction_id>xxxxxxxxxxxxxxxx</transaction_id>
</bankresult_response>
<error_response>
<additional_messages>
<message>The 'country' element is invalid - The value 'Latvia' is invalid according to its datatype 'Union' - The value 'Latvia' is not valid according to any of the memberTypes of the union. at line 0, position 0</message>
</additional_messages>
<response_code>997</response_code>
<response_message>Validation of Xml message failed</response_message>
</error_response>
</action_response>
</Risk>
<!-- snip -->
The problem
When I initiate a HPS payment with customer's country set in human readable format (for example,
Latvia
), upon transaction query I get non-interrupting error message which saysThe 'country' element is invalid - The value 'Latvia' is invalid according to its datatype 'Union' - The value 'Latvia' is not valid according to any of the memberTypes of the union. at line 0, position 0
.When I initiate a HPS payment with customer's country set to country code (for example,
LV
), I do not get such a message.The solution
Docs should be updated with indication that country in customer's details should be formatted as a country code, not human readable format.
The logs
Scenario 1 (full country name)
Payment initiated with following billing data:
Transaction query response:
Scenario 2 (country code)
Payment initiated with following billing data:
Transaction query response: