Hi conann, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member knows the solution, please feel free to reply.
Hey @conann,
For the Visa Digital Enablement SDK's In-App Provisioning, the `nameOnAccount` field typically expects alphanumeric characters. Whether spaces are allowed can be a bit unclear from the documentation, so it’s best to follow a conservative approach unless explicitly stated otherwise.
Recommendations
1. Check Documentation:
- Revisit the latest version of the Visa Developer documentation or any updates that might clarify the rules for special characters, including spaces.
2. Sanitize Input:
- If the documentation does not explicitly allow spaces, it is safer to sanitize the input by removing spaces or replacing them with an acceptable character (such as a hyphen).
Sanitizing Input Example
Here is a simple example in Python to sanitize the input by removing spaces:
```python
def sanitize_name(name):
return ''.join(e for e in name if e.isalnum())
Example usage
original_name = "John Doe-Smith"
sanitized_name = sanitize_name(original_name)
print(f'Sanitized Name: {sanitized_name}')
```
Handling Multi-Part Names
If you need to handle multi-part names without removing spaces, you might consider replacing spaces with a character that is allowed, like a hyphen:
```python
def handle_multi_part_name(name):
return name.replace(" ", "-")
# Example usage
original_name = "John Doe-Smith"
handled_name = handle_multi_part_name(original_name)
print(f'Handled Name: {handled_name}')
```
- Verify with official documentation to confirm if spaces are allowed.
- Sanitize input to remove or replace spaces if not allowed.
- Contact Visa Developer Support for definitive guidance.
By following these steps, you can ensure that the `nameOnAccount` field is correctly handled for In-App Provisioning.