aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/paymentaddress/index.html
blob: c45261b36d5283d8e56a56067762e47c00fe71e7 (plain)
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
---
title: PaymentAddress
slug: Web/API/PaymentAddress
tags:
  - API
  - Interface
  - NeedsTranslation
  - Payment Request
  - PaymentRequest
  - Reference
  - TopicStub
  - paymentAddress
translation_of: Web/API/PaymentAddress
---
<p>{{SeeCompatTable}}{{APIRef("Payment Request API")}}</p>

<p>The <strong><code>PaymentAddress</code></strong> interface of the <a href="/en-US/docs/Web/API/Payment_Request_API">Payment Request API</a> stores address information.</p>

<h2 id="Properties">Properties</h2>

<dl>
	<dt>{{domxref('PaymentAddress.country')}} {{readonlyinline}} </dt>
	<dd>The Common Locale Data Repository region code. For example, US, GB, CN, etc.</dd>
	<dt>{{domxref('PaymentAddress.addressLine')}} {{readonlyinline}}</dt>
	<dd>An array of strings describing the address. The exact size and content varies by country or location and can include, for example, a street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box number.</dd>
	<dt>{{domxref('PaymentAddress.region')}} {{readonlyinline}}</dt>
	<dd>The top level administrative subdivision of the country, for example, a state, province, oblast, or prefecture.</dd>
	<dt>{{domxref('PaymentAddress.city')}} {{readonlyinline}}</dt>
	<dd>The city or town portion of the address.</dd>
	<dt>{{domxref('PaymentAddress.dependentLocality')}} {{readonlyinline}}</dt>
	<dd>The dependent locality or sublocality within a city, for example, a neighborhood, borough, district, or UK dependent locality.</dd>
	<dt>{{domxref('PaymentAddress.postalCode')}} {{readonlyinline}}</dt>
	<dd>A code used by a jurisdiction for mail routing, for example, the ZIP code in the United States or the PIN code in India.</dd>
	<dt>{{domxref('PaymentAddress.sortingCode')}} {{readonlyinline}}</dt>
	<dd>A postal sorting code such as is used in France.</dd>
	<dt>{{domxref('PaymentAddress.languageCode')}} {{readonlyinline}}</dt>
	<dd>The BCP-47 language code for the address, used to determine the field separators and the order of fields when formatting the address for display.</dd>
	<dt>{{domxref('PaymentAddress.organization')}} {{readonlyinline}}</dt>
	<dd>The name of the organization, firm, company, or institution at the payment address.</dd>
	<dt>{{domxref('PaymentAddress.recipient')}} {{readonlyinline}}</dt>
	<dd>The name of the recipient, purchaser, or contact person at the payment address.</dd>
	<dt>{{domxref('PaymentAddress.careOf')}} {{readonlyinline}} {{obsolete_inline()}}</dt>
	<dd>The name of an intermediary party or entity responsible for transferring packages between the postal service and the recipient.</dd>
	<dt>{{domxref('PaymentAddress.phone')}} {{readonlyinline}}</dt>
	<dd>The telephone number of the recipient or contact person.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p>None.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
	<tbody>
		<tr>
			<th scope="col">Specification</th>
			<th scope="col">Status</th>
			<th scope="col">Comment</th>
		</tr>
		<tr>
			<td>{{SpecName('Payment','#paymentaddress-interface','PaymentAddress')}}</td>
			<td>{{Spec2('Payment')}}</td>
			<td>Initial definition.</td>
		</tr>
	</tbody>
</table>

<h2 id="Browser_Compatibility">Browser Compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
	<tbody>
		<tr>
			<th>Feature</th>
			<th>Chrome</th>
			<th>Firefox (Gecko)</th>
			<th>Internet Explorer</th>
			<th>Opera</th>
			<th>Safari (WebKit)</th>
		</tr>
		<tr>
			<td>Basic support</td>
			<td>
			<p>{{CompatChrome(53.0)}}</p>
			</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
		</tr>
	</tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
	<tbody>
		<tr>
			<th>Feature</th>
			<th>Android</th>
			<th>Android Webview</th>
			<th>Firefox Mobile (Gecko)</th>
			<th>Firefox OS</th>
			<th>IE Mobile</th>
			<th>Opera Mobile</th>
			<th>Safari Mobile</th>
			<th>Chrome for Android</th>
		</tr>
		<tr>
			<td>Basic support</td>
			<td>{{CompatNo}}</td>
			<td>{{CompatChrome(53.0)}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatUnknown}}</td>
			<td>{{CompatChrome(53.0)}}</td>
		</tr>
	</tbody>
</table>
</div>