About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
Chapter 1 Introducing the API |
|
1 | (26) |
|
Exploring the Benefits of Using the API |
|
|
4 | (1) |
|
Breaking Some Common Misconceptions |
|
|
5 | (2) |
|
Understanding Terminology Around the API |
|
|
7 | (2) |
|
Considering the UX Experience |
|
|
9 | (6) |
|
|
11 | (1) |
|
Sketching a User Flow Using Sketch |
|
|
12 | (3) |
|
|
15 | (9) |
|
|
17 | (5) |
|
Giving Feedback Throughout the Journey |
|
|
22 | (2) |
|
Addressing Security Concerns |
|
|
24 | (2) |
|
|
26 | (1) |
Chapter 2 Setting Up a Basic Checkout |
|
27 | (28) |
|
|
27 | (6) |
|
Setting Up a Suitable Web Server |
|
|
28 | (5) |
|
Checking Browser Support for the API |
|
|
33 | (1) |
|
Enabling Browsers to Use the API |
|
|
34 | (1) |
|
Creating a Simple Example for Desktop Browsers |
|
|
35 | (3) |
|
|
37 | (1) |
|
Managing Errors in the Checkout |
|
|
38 | (7) |
|
Understanding the Changes to Our Demo |
|
|
44 | (1) |
|
Adapting for Use on Mobile Devices |
|
|
45 | (3) |
|
Exploring How the API Works in Detail |
|
|
48 | (5) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (1) |
|
|
51 | (2) |
|
|
53 | (2) |
Chapter 3 Configuring and Customizing Our Checkout |
|
55 | (34) |
|
Setting Up a Payment Method |
|
|
55 | (1) |
|
|
56 | (6) |
|
Understanding How it Works |
|
|
61 | (1) |
|
|
62 | (1) |
|
Configuring Our Checkout Form |
|
|
63 | (17) |
|
|
63 | (1) |
|
Handling Different Currencies |
|
|
64 | (6) |
|
How Can We Handle Multiple Items Better? |
|
|
70 | (5) |
|
Accepting Gift Cards and Discounts |
|
|
75 | (5) |
|
Configuring Our Payment Process |
|
|
80 | (4) |
|
Asking for Details from Customers |
|
|
80 | (2) |
|
|
82 | (2) |
|
|
84 | (1) |
|
Handling Extra Information |
|
|
85 | (3) |
|
Exploring the Code in Detail |
|
|
87 | (1) |
|
|
88 | (1) |
Chapter 4 Shipping |
|
89 | (26) |
|
Getting Started with Shipping |
|
|
89 | (1) |
|
Obtaining the Shipping Address and Method |
|
|
90 | (6) |
|
Exploring How this Works in Detail |
|
|
93 | (1) |
|
Making Use of Details in Payment Request API |
|
|
94 | (2) |
|
Expanding Our Shipping Options |
|
|
96 | (3) |
|
Exploring the Changes Made |
|
|
98 | (1) |
|
Dealing with Changes to Shipping |
|
|
99 | (2) |
|
|
101 | (1) |
|
Implementing Delivery Restrictions |
|
|
101 | (5) |
|
|
105 | (1) |
|
|
106 | (6) |
|
Customer-Generated Errors |
|
|
107 | (1) |
|
Errors Generated During Development |
|
|
108 | (4) |
|
|
112 | (3) |
Chapter 5 Integrating with a Payment Handler |
|
115 | (36) |
|
|
115 | (5) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
118 | (1) |
|
Integrating with the Payment Request API |
|
|
119 | (1) |
|
Choosing between a PSP or Traditional Provider |
|
|
120 | (3) |
|
|
123 | (5) |
|
|
126 | (1) |
|
Understanding the Types of Payment Identifiers |
|
|
127 | (1) |
|
|
128 | (7) |
|
|
130 | (1) |
|
|
131 | (4) |
|
Dealing with Extra Charges |
|
|
135 | (5) |
|
Breaking Apart the Code in Detail |
|
|
139 | (1) |
|
Dealing with No Payment Apps |
|
|
140 | (7) |
|
Understanding What Happened |
|
|
146 | (1) |
|
Checking for No Apps: An Epilogue |
|
|
146 | (1) |
|
Taking Care of Pending Transactions |
|
|
147 | (2) |
|
|
149 | (2) |
Chapter 6 Pulling It All Together |
|
151 | (32) |
|
|
151 | (2) |
|
Building the Product Gallery |
|
|
153 | (3) |
|
Dissecting the Code thus Far |
|
|
155 | (1) |
|
Setting Up the Basic Basket |
|
|
156 | (5) |
|
|
161 | (1) |
|
Taking Care of Shipping (Plus Restrictions) |
|
|
161 | (7) |
|
Exploring the Code in More Detail |
|
|
167 | (1) |
|
|
168 | (3) |
|
Integrating a Payment Method |
|
|
168 | (2) |
|
Exploring the Code in More Detail |
|
|
170 | (1) |
|
|
171 | (1) |
|
Applying Charges When Necessary |
|
|
172 | (5) |
|
Exploring the Code in More Detail |
|
|
175 | (1) |
|
Applying Charges: A Postscript |
|
|
176 | (1) |
|
|
177 | (3) |
|
Exploring the Code in More Detail |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
181 | (2) |
Chapter 7 Project: Enabling the API in a Framework or CMS |
|
183 | (30) |
|
|
184 | (1) |
|
|
184 | (3) |
|
|
187 | (2) |
|
Creating the Store Front End |
|
|
189 | (5) |
|
|
193 | (1) |
|
Setting Up the Basic Checkout |
|
|
194 | (6) |
|
|
200 | (1) |
|
|
200 | (1) |
|
Case Study: Adding Geolocation Support |
|
|
201 | (8) |
|
|
201 | (1) |
|
|
202 | (5) |
|
|
207 | (1) |
|
What Next for Geolocation: Should We Use It? |
|
|
208 | (1) |
|
Case Study: Using QR Codes |
|
|
209 | (3) |
|
Understanding How It Works |
|
|
211 | (1) |
|
|
212 | (1) |
Chapter 8 Project: The Future of the Web Payments API |
|
213 | (30) |
|
What is the Payment Handler API? |
|
|
214 | (2) |
|
|
215 | (1) |
|
|
216 | (15) |
|
|
217 | (1) |
|
Defining a Payment Method Identifier |
|
|
218 | (1) |
|
|
219 | (2) |
|
|
221 | (2) |
|
Installing the Payment Handler |
|
|
223 | (7) |
|
|
230 | (1) |
|
|
231 | (2) |
|
Considering Security Implications |
|
|
233 | (1) |
|
Testing Our Payment Handler |
|
|
234 | (8) |
|
|
241 | (1) |
|
|
242 | (1) |
Appendix: API Reference |
|
243 | (2) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
Index |
|
245 | |