forked from w3c/payment-method-basic-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
236 lines (209 loc) · 9.73 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html>
<head>
<title>Basic Card Payment</title>
<meta charset='utf-8'>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
async class='remove'></script>
<script class='remove'>
var respecConfig = {
shortName: "payment-method-basic-card",
edDraftURI: "https://w3c.github.io/webpayments-methods-card/",
specStatus: "ED",
editors: [{
name: "Adrian Bateman",
company: "Microsoft Corporation",
w3cid: 42763,
}, {
name: "Zach Koch",
company: "Google",
w3cid: 76588,
}, {
name: "Roy McElmurry",
company: "Facebook",
w3cid: 88345,
}, ],
license: "w3c-software-doc",
noRecTrack: true,
previousMaturity: "FPWD",
previousPublishDate: "2016-04-21",
wg: "Web Payments Working Group",
wgURI: "https://www.w3.org/Payments/WG/",
wgPublicList: "public-payments-wg",
wgPatentURI: "https://www.w3.org/2004/01/pp-impl/83744/status",
issueBase: "https://github.com/w3c/webpayments-methods-card/issues",
localBiblio: {
"PAYMENT-REQUEST-API": {
title: "Payment Request API"
, href: "https://www.w3.org/TR/payment-request/"
, authors: [
"Adrian Bateman"
, "Zach Koch"
, "Roy McElmurry"
]
, status: "WD"
},
"METHOD-IDENTIFIERS": {
title: "Payment Method Identifiers"
, href: "https://www.w3.org/TR/payment-method-id/"
, authors: [
"Adrian Bateman"
, "Zach Koch"
, "Roy McElmurry"
]
, status: "WD"
}
},
otherLinks: [{
key: "Version control",
data: [{
value: "Github Repository",
href: "https://github.com/w3c/webpayments-methods-card/"
}, {
value: "Issues",
href: "https://github.com/w3c/webpayments-methods-card/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20-label%3A%22Priority%3A%20Postponed%22%20"
}]
}]
};
</script>
<style>
dt { margin-top: 0.75em; }
table { margin-top: 0.75em; border-collapse:collapse; border-style:hidden hidden none hidden }
table thead { border-bottom:solid }
table tbody th:first-child { border-left:solid }
table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
li { margin-top: 0.5em; margin-bottom: 0.5em;}
</style>
</head>
<body>
<section id='abstract'>
<p>
The Basic Card Payment specification describes the data formats used by the
PaymentRequest API [[!PAYMENT-REQUEST-API]] to support payment by payment cards such as
credit or debit cards.
</p>
</section>
<section id='sotd'>
<p>
The working group maintains <a href="https://github.com/w3c/webpayments-methods-card/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20-label%3A%22Priority%3A%20Postponed%22%20">a
list of all bug reports that the group has not yet addressed</a>.
Pull requests with proposed specification text for outstanding issues are strongly encouraged.
</p>
<p>
This specification was derived from a report published previously by the
<a href="https://www.w3.org/community/wicg/">Web Platform Incubator Community Group</a>.
</p>
<div class="note">
<p><strong>Sending comments on this document</strong></p>
<p>If you wish to make comments regarding this document, please raise them as
<a href="https://github.com/w3c/webpayments-methods-card/issues">GitHub issues</a>.
Only send comments by email if you are unable to raise issues on GitHub (see
links below). All comments are welcome.</p>
</div>
</section>
<section class='informative'>
<h2>Introduction</h2>
<p>
This specification is a Payment Method specification for use with the PaymentRequest API [[!PAYMENT-REQUEST-API]].
With it, merchants can collect the basic card details (card holder name, card number, etc.) through the
PaymentRequest API that they have traditionally collected through Web forms, but with an improved user experience.</p>
<p class="note">The Web Payments Working Group is also investigating payment methods that offer greater security (e.g., through tokenization).</p>
</section>
<section id="dependencies">
<h2>Dependencies</h2>
<p>
This specification relies on several other underlying specifications.
</p>
<dl>
<dt>Payment Request API</dt>
<dd>The terms <dfn>PaymentRequest constructor</dfn>, and <dfn>PaymentAddress</dfn>
are defined by the PaymentRequest API specification [[!PAYMENT-REQUEST-API]].</dd>
<dt>Payment Method Identifiers</dt>
<dd>The term <dfn data-lt="payment method identifier|payment method identifiers">Payment
Method Identifier</dfn> is defined by the Payment Method Identifiers specification
[[!METHOD-IDENTIFIERS]].</dd>
<dt>Web IDL</dt>
<dd>The IDL in this specification is defined by Web IDL [[!WEBIDL]].</dd>
</dl>
</section>
<section id="method-id">
<h2>Payment Method Identifier</h2>
<p>The <a>payment method identifier</a> string for the Basic Card Payment method is <dfn><code>basic-card</code></dfn>.</p>
</section>
<section id="request">
<h2>Payment Method Specific Data for the PaymentRequest constructor</h2>
<p>This section describes payment method specific data that is supplied as part of the <code>data</code>
argument to the <a>PaymentRequest constructor</a>.</p>
<section>
<h3>BasicCardRequest</h3>
<pre class="idl">
enum BasicCardType { "credit", "debit", "prepaid" };
dictionary BasicCardRequest {
sequence<DOMString> supportedNetworks;
sequence<BasicCardType> supportedTypes;
};
</pre>
<p>
The <code>BasicCardResponse</code> dictionary contains the following fields:
</p>
<dl>
<dt><dfn><code>supportedNetworks</code></dfn></dt>
<dd>The <code>supportedNetworks</code> field contains a sequence of identifiers for card networks
that the merchant accepts.</dd>
<dt><dfn><code>supportedTypes</code></dfn></dt>
<dd>The <code>supportedTypes</code> field contains a sequence of card types that the merchant
accepts. Implementations will determine how to match the type values <code>credit</code>,
<code>debit</code>, and <code>prepaid</code>.</dd>
</dl>
<p class="note">
The <code>supportedNetworks</code> and <code>supportedTypes</code> fields are both optional.
If neither is provided then any card may be returned. If only <code>supportedNetworks</code>
is provided then any card type may be returned provided it matches one of the networks.
If only <code>supportedTypes</code> is provided then a card may be returned from any network
provided it matches one of the types.
</p>
</section>
</section>
<section id="response">
<h2>Payment Method Response</h2>
<p>The <dfn><code>BasicCardResponse</code></dfn> dictionary contains the response from the
PaymentRequest API when a user accepts payment with a Basic Payment Card payment method.</p>
<section>
<h3>BasicCardResponse</h3>
<pre class="idl">
dictionary BasicCardResponse {
DOMString cardholderName;
required DOMString cardNumber;
DOMString expiryMonth;
DOMString expiryYear;
DOMString cardSecurityCode;
PaymentAddress? billingAddress;
};
</pre>
<p>
The <code>BasicCardResponse</code> dictionary contains the following fields:
</p>
<dl>
<dt><dfn><code>cardholderName</code></dfn></dt>
<dd>The <code>cardholderName</code> field contains the cardholder's name as it appears on the card.</dd>
<dt><dfn><code>cardNumber</code></dfn></dt>
<dd>The <code>cardNumber</code> field contains the primary account number (PAN) for the payment card.</dd>
<dt><dfn><code>expiryMonth</code></dfn></dt>
<dd>The <code>expiryMonth</code> field contains a two-digit string for the expiry month
of the card in the range <code>01</code> to <code>12</code>.</dd>
<dt><dfn><code>expiryYear</code></dfn></dt>
<dd>The <code>expiryYear</code> field contains a two-digit string for the expiry year
of the card in the range <code>00</code> to <code>99</code>.</dd>
<dt><dfn><code>cardSecurityCode</code></dfn></dt>
<dd>The <code>cardSecurityCode</code> field contains a three or four digit string for the
security code of the card (sometimes known as the CVV, CVC, CVN, CVE or CID).</dd>
</dl>
</section>
</section>
<section id="security">
<h2>Security and Privacy Considerations</h2>
<p>Owners of web sites SHOULD NOT store the payer's card information except where warranted, such as storage for future and recurring payments. When card information is stored, web site owners SHOULD take measures to prevent its disclosure.</p>
<p><strong>Note</strong>: Implementers may be subject to PCI DSS or other regulations, but discussion of those considerations lies outside the scope of this document.</p>
</section>
</body>
</html>