Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The DLL library should escape invalid XML characters #6

Open
dstj opened this issue Aug 5, 2022 · 0 comments
Open

The DLL library should escape invalid XML characters #6

dstj opened this issue Aug 5, 2022 · 0 comments

Comments

@dstj
Copy link

dstj commented Aug 5, 2022

Hi,

I've had a "Malformed XML" response from Moneris while using the ResAddToken class and API call. Turns out, the cause of the error was because the "note" I sent to the API contained a "&" character, which should be escaped in XML by &

Since the Moneris API deals with the XML, not me, it should do the necessary escaping.

For all I know, the API could send JSON or any proprietary format that is escaped differently. The user shouldn't have to know the underlying transmission mechanism to use the API DLL.

var resAddToken = new ResAddToken(tempToken, CryptType);
resAddToken.SetNote(note);  // I shouldn't have to espace & into & the SetNote() call should do it
...

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant