-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from WICG/spec_deploy
Add necessary files to deploy spec using template
- Loading branch information
Showing
5 changed files
with
53 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# See the documentation at | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
# Update actions used by .github/workflows in this repository. | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
actions-org: # Groups all Github-authored actions into a single PR. | ||
patterns: ["actions/*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: CI | ||
on: | ||
pull_request: {} | ||
push: | ||
branches: [main] | ||
jobs: | ||
main: | ||
name: Build, Validate and Deploy | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: w3c/spec-prod@v2 | ||
with: | ||
GH_PAGES_BRANCH: gh-pages | ||
BUILD_FAIL_ON: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"src_file": "index.bs", | ||
"type": "bikeshed", | ||
"params": { | ||
"force": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,18 @@ URL: https://github.com/WICG/paymentlink | |
Editor: Junhui He, Google https://google.com, [email protected] | ||
Abstract: This specification defines a mechanism for web pages to indicate the availability of push-based payment methods using the <{link}> element, enabling user agents to facilitate seamless payment experiences. | ||
Markup Shorthands: markdown yes, css no | ||
Complain About: accidental-2119 yes, missing-example-ids yes | ||
Complain About: accidental-2119 yes, missing-example-ids yes, mixed-indents no | ||
Assume Explicit For: yes | ||
Die On: warning | ||
WPT Path Prefix: payment-link | ||
WPT Display: closed | ||
Include MDN Panels: if possible | ||
Include Can I Use Panels: yes | ||
</pre> | ||
|
||
<pre class="link-defaults"> | ||
spec:html; type:element; text:link | ||
</pre> | ||
|
||
Introduction {#intro} | ||
===================== | ||
|
||
|
@@ -35,33 +38,31 @@ This specification uses the following terms: | |
|
||
* **Payment client:** An integrated wallet or a browser wallet extension that is responsible for facilitating payments. | ||
|
||
* **Payment method:** A specific way of making a payment, such as UPI, Bitcoin, or a particular eWallet. It is identified by the URL [=url/scheme=] in the <{link/href}> attribute of a <{link/rel/payment}> link. | ||
|
||
|
||
* **Payment method:** A specific way of making a payment, such as UPI, Bitcoin, or a particular eWallet. It is identified by the URL [=url/scheme=] in the <{link/href}> attribute of a <{link/rel/payment}> link. | ||
|
||
Link type "<dfn attr-value for="link/rel">payment</dfn>" {#payment-link-type} | ||
=========================================== | ||
|
||
The <{link/rel/payment}> keyword may be used with <{link}> elements. The keywords creates an [=external resource link=]. The keyword is [=body-ok=]. | ||
The <{link/rel/payment}> keyword may be used with <{link}> elements. The keywords creates an [=external resource link=]. The keyword is <a spec=HTML>body-ok</a>. | ||
|
||
The <{link/rel/payment}> keyword indicates the availability of a push payment method on a web page. It creates a relationship between the document and a payment method resource. | ||
|
||
There is no default type for resources given by the <{link/rel/payment}> keyword. | ||
|
||
A user agent must not [=delay the load event=] for this link type. | ||
A user agent must not <a href="https://html.spec.whatwg.org/multipage/syntax.html#delay-the-load-event">delay the load event</a> for this link type. | ||
|
||
The URL [=URL/scheme=] of the <{link/href}> attribute indicates supported payment methods. The URL may contain additional information specific to the payment method. | ||
The URL [=url/scheme=] of the <{link/href}> attribute indicates supported payment methods. The URL may contain additional information specific to the payment method. | ||
|
||
<div class="example" heading="UPI"> | ||
<p><code class="html"><link rel="payment" href="upi://pay?pa=merchant@bank&pn=Test&am=100&cu=INR"></code></p> | ||
<div class="example" id="example-upi" heading="UPI"> | ||
<p><code class="html"><link rel="payment" href="upi://pay?pa=merchant@bank&pn=Test&am=100&cu=INR"></code></p> | ||
</div> | ||
|
||
<div class="example" heading="Bitcoin"> | ||
<p><code class="html"><link rel="payment" href="bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Donation"></code></p> | ||
<div class="example" id="example-bitcoin" heading="Bitcoin"> | ||
<p><code class="html"><link rel="payment" href="bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Donation"></code></p> | ||
</div> | ||
|
||
<div class="example" heading="PayPal"> | ||
<p><code class="html"><link rel="payment" href="paypal://paypal.com?payee-address=175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W¤cy=USD&amount=20.3&payee-name=Walmart"></code></p> | ||
<div class="example" id="example-paypal" heading="PayPal"> | ||
<p><code class="html"><link rel="payment" href="paypal://paypal.com?payee-address=175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W&currency=USD&amount=20.3&payee-name=Walmart"></code></p> | ||
</div> | ||
|
||
The appropriate times to <a spec="HTML">fetch and process the linked resource</a> for such a link are: | ||
|
@@ -79,15 +80,14 @@ The [fetch and process the linked resource](https://html.spec.whatwg.org/multipa | |
5. Let |url| be the result of [=encoding-parsing a URL=] given |el|'s <{link/href}> attribute's value, relative to |el|'s [=Node/node document=]. | ||
6. If |url| is failure, then return. | ||
7. If |url|’s [=url/scheme=] is not supported by the user agent, then return. | ||
8. Find all payment wallets integrated with the user agent which are compatible with |url|'s [=scheme=]. Let |compatibleWallets| be a [=/set=] containing all such wallets. | ||
8. Find all payment wallets integrated with the user agent which are compatible with |url|'s [=url/scheme=]. Let |compatibleWallets| be a [=/set=] containing all such wallets. | ||
9. If |compatibleWallets|'s [=set/size=] is 0, then return. | ||
10. Prompt the user with a wallet selector containing |compatibleWallets| for users to choose the payment method they want to use. | ||
11. If the wallet selector is dismissed, then return. | ||
12. Hands off |url| to OS component or browser extension to display a payment confirmation dialog that includes details from the |url|, such as the payment amount, payee, and currency. | ||
13. (Optional) Launch the selected wallet application or interface. | ||
14. Provide instructions to the user on how to proceed with the payment. | ||
|
||
|
||
Security Considerations {#security-considerations} | ||
================================================= | ||
|
||
|