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

Add reference to issue #47. #81

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions specs/paymentrequest.html
Expand Up @@ -249,6 +249,30 @@ <h2>PaymentRequest interface</h2>
<a>user agent</a> while the user is providing input before approving or denying a payment request.
</p>

<div class="issue" data-number="47" title="Should a payment request be just data, or a programmable object?">
Instead of a programmable object, it has been suggested that a payment
request should be just pure data that can be operated on by methods
like so:
<pre class="example highlight">
// data-only payment request object example
var request = {
type: 'PaymentRequest',
description: 'Payment to ExampleMerch for widgets',
acceptablePayment: {
paymentMethod: 'Visa',
paymentAmount: {
amount: '4.35',
currency: 'USD'
}
}
};

// request payment and get a promise that will resolve to
// a payment acknowledgement
var payment = navigator.payment.request(request);
</pre>
</div>

<p>The following example shows how to construct a <a><code>PaymentRequest</code></a> and begin the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msporny Can you reword this to be a lot simpler and leave the deeper explanation for users to read in the issue itself? I would also suggest placing this issue marker alongside those for #15 and #16 which also relate to the shape of the API.

Suggestion:

<div class="issue" data-number="47" title="Should a payment request be just data, or a 
programmable object?"> There is an open issue about whether the payment request should 
be a programmable object or should be just pure data that can be operated on by methods.</div>

user interaction:</p>

Expand Down