Skip to content. | Skip to navigation

Sections
Credit Card Processing Simplified
Payment Processing Simplified ®
Personal tools
Home Support Center Trevance URL Encoding

URL Encoding

What Is It and Why Do I Care?

Overview

URLEncoding of Web URLs allows special characters to be sent as normal data. This is most useful in the Trevance environment where address and name data can contain special characters such as the character you ve chosen to use as your delimiter.

Simple Sample

Consider the following (highly truncated for this example) line, consisting of three parameters, to be sent to the Trevance Web server:

BILLADD1=Fifth&Vine&BILLLNAME=Smith&Jones&CMT1=3% Discount


When this string is sent to Trevance, the software cannot distinguish between the '&' that is used a delimiter and the '&' that is in the middle of the address or last name.

You could select to use a different delimiter, but then you would need to check that your addresses and names did not contain that character. Also, '&' is the most common delimiter used on Web sites and web programmers are very comfortable with it.

URL Encoding

Most modern language environments can communicate with Web standards either through built-in libraries or through third-party contributed libraries. Any language that can communicate to the Web will include a function named something like URLEncode. The last section of this document contains a list of useful links for URLEncode functions for various languages.

You want to encode only the data items. URL Encoding replaces the special characters with their hexadecimal equivalent. The encoded version of the string looks as follows:

BILLADD1=Fifth%26Vine&BILLLNAME=Smith%26Jones&CMT1=3%25%20Discount


Note that the '%' character is also encoded. This is necessary since every '%' is now going to indicate a hexadecimal value. The space in the comment also became encoded. Alternately, you may find that your URLEncode function replaces spaces with the + symbol. This is also acceptable.

Configuring Trevance

Pause Trevance and select the Configure/Real Time Web Interface menu item. Click on the Web Request Format tab. Check that the URL-Encoded option is selected.

Useful Links

The following is a collection of URL Encode-related links for various languages. Frequently, there is more than one way to solve this particular problem in either the base language or through various libraries. The links below are provided as samples.

Auric Systems International makes no warranty of the specific information found at any of these links. If you have links for additional languages, or find that any of these links is no longer valid, please let us know

 

AURIC SYSTEMS IS A LEVEL 1 PCI DSS VALIDATED SERVICE PROVIDER

Document Actions