cancel
Showing results for 
Search instead for 
Did you mean: 

Ampersand in customer email

Hello,

 

If an ampersand is included in the customer's email address, the following error is returned during createTransactionRequest: Extra Options is invalid.

 

Request:

 

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
...
<customer>
<id>10</id>
<email>test&amp;test@test.com</email>
</customer>
...
</createTransactionRequest>

 

I cannot find any other post about this issue, so any help would be appreciated.

 

Thanks

chadParadox
Member
1 REPLY 1

Replying to an old post so that it can help someone..

 

You need to url encode the email to handle the special characters line &, + in the email..

 

for + it would be %2b and for & it would be %26

 

so, someone&else+123@email.com would become someone%26else%2b123%40email.com

 

this works fine to show the email in the hosted payment page and the email receipt is sent to the email..

 

but, in the email the characters are shown as spaces :(

gladson1976
Member