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

Getting invalid base64 string when testing 3DS notification URLs #70

Open
patrickryan79 opened this issue Oct 31, 2022 · 2 comments
Open

Comments

@patrickryan79
Copy link

On this page: here we find:

Sample Challenge Notification endpoint (server side)

For .NET, the value of "cres" that I'm getting back from the ACS is not a valid base64 string. I have no idea where to go from here. Is this documentation outdated?

@Externaluse
Copy link

We use a static method to decode it from base64 first;
while (input.Length % 4 != 0) { input += "="; } var data = Convert.FromBase64CharArray(input.ToCharArray(), 0, input.Length); return Encoding.UTF8.GetString(data); }

@SneyderOspinaChavarria
Copy link

You could use this to avoid the issue from base64

var a = Convert.FromBase64String(cres.Replace('-', '+').Replace('_', '/') + "=");
var challengeUrlResponseString = Encoding.UTF8.GetString(a);

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

3 participants