Skip to content

Commit

Permalink
Updated examples to reflect changes in recent PRs
Browse files Browse the repository at this point in the history
PRs #158, #160, and #161 made changes that affect the examples. These
weren't reflected in original PRs to keep those changes simple and to
avoid merge conflicts from changing the same lines in the spec. This
changes updates the examples.

Also updating the syntax to be consistent and use JavaScript (rather
than JSON).

Fixes #164.
  • Loading branch information
adrianba committed Apr 28, 2016
1 parent 8ac108d commit acf1150
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions specs/paymentrequest.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h2>PaymentRequest interface</h2>
// Process paymentResponse
// paymentResponse.methodName contains the selected payment method
// paymentResponse.details contains a payment method specific response
paymentResponse.complete(true);
paymentResponse.complete("success");
}).catch(function(err) {
console.error("Uh oh, something bad happened", err.message);
});
Expand Down Expand Up @@ -297,8 +297,8 @@ <h2>PaymentRequest constructor</h2>
{
supportedMethods: ["bobpay.com"],
data: {
"merchantIdentifier": "XXXX",
"bobPaySpecificField": true
merchantIdentifier: "XXXX",
bobPaySpecificField: true
}
]
</pre>
Expand All @@ -307,23 +307,20 @@ <h2>PaymentRequest constructor</h2>
user is being asked to complete such as the line items in an order.</p>
<pre class="example highlight">
{
"items": [
displayItems: [
{
"id": "basket",
"label": "Sub-total",
"amount": { "currency": "USD", "value" : "55.00" }, // US$55.00
label: "Sub-total",
amount: { currency: "USD", value : "55.00" }, // US$55.00
},
{
"id": "tax",
"label": "Sales Tax",
"amount": { "currency": "USD", "value" : "5.00" }, // US$5.00
},
{
"id": "total",
"label": "Total due",
"amount": { "currency": "USD", "value" : "60.00" }, // US$60.00
label: "Sales Tax",
amount: { currency: "USD", value : "5.00" }, // US$5.00
}
]
],
total: {
label: "Total due",
amount: { currency: "USD", value : "60.00" }, // US$60.00
}
}
</pre>

Expand All @@ -332,7 +329,7 @@ <h2>PaymentRequest constructor</h2>

<pre class="example highlight">
{
"requestShipping": true
requestShipping: true
}
</pre>
</div>
Expand Down

0 comments on commit acf1150

Please sign in to comment.