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

Verifying the total #702

Closed
stpeter opened this issue Apr 24, 2018 · 5 comments · Fixed by #704
Closed

Verifying the total #702

stpeter opened this issue Apr 24, 2018 · 5 comments · Fixed by #704
Assignees

Comments

@stpeter
Copy link

stpeter commented Apr 24, 2018

The spec is unclear on this point: "It is the developer's responsibility to verify that the total amount is the sum of these items."

Is it the responsibility of the merchant to verify these amounts before generating the PaymentDetails?

Is it the responsibility of the browser to verify these amounts after receiving the PaymentDetails from the merchant?

@marcoscaceres
Copy link
Member

Is it the responsibility of the merchant to verify these amounts before generating the PaymentDetails?

Correct.

Is it the responsibility of the browser to verify these amounts after receiving the PaymentDetails from the merchant?

There is no expectation in the spec that the browser do any mathematical calculations of any kind.

@stpeter
Copy link
Author

stpeter commented Apr 24, 2018

Perhaps then it makes sense to say "It is the developer's responsibility to verify that the total amount is the sum of these items before generating the PaymentRequest."

@marcoscaceres
Copy link
Member

Good suggestion, but I need to check the context, because "before generating" doesn't apply in all cases. Consider, the total can be updated by .show() and via .updateWith().

@stpeter
Copy link
Author

stpeter commented Apr 30, 2018

Yes, perhaps not "before generating" but "It is the developer's responsibility, when generating or updating the PaymentRequest, to verify that the total amount is the sum of these items."

@marcoscaceres
Copy link
Member

@stpeter thanks for the suggestion - that makes it more clear. I'll add it.

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