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

Authentication amount is corrupted in call to InitiateAuthentication #42

Open
iofly opened this issue Oct 20, 2020 · 0 comments
Open

Authentication amount is corrupted in call to InitiateAuthentication #42

iofly opened this issue Oct 20, 2020 · 0 comments

Comments

@iofly
Copy link

iofly commented Oct 20, 2020

The .Net SDK seems to be sending the incorrect amount to the InitiateAuthentication method. If I send a decimal defined with 1 decimal place, it sends an authentication amount that is 10 times too small.

e.g.

decimal amountToAuthenticatefor = 100.0M;

var threeDSecureData = Secure3dService.InitiateAuthentication(card, threeDSecureData)
				.WithAmount(amountToAuthenticatefor)
				.WithOrderId("Order123")
				.WithCurrency("EUR")
				.WithOrderCreateDate(DateTime.Now)
				.WithCustomerEmail("user@example.com")
				.WithAddress(billingAddress, AddressType.Billing)
				.WithBrowserData(browserData)
				.WithMethodUrlCompletion(MethodUrlCompletion.YES)
				.WithMobileNumber("353", "861234567")
				.Execute();

When I see the 3D Secure 2 challenge popup it will show that it is authenticating for the amount of 10.00 Euro!

However if in the above code I declare amountToAuthenticatefor as 100.00M (notice 2nd decimal place) it will correctly authenticate for 100.00 Euro.

What is the reason for this bahaviour? Is this a bug? Or the SDK shifting the decimal to ensure 2 characters after the decimal?

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