Integrated Experiences
Progressive Web App Roadshow
Presenters Name
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Fast
Engaging
Reliable
Integrated
Fast
Engaging
Reliable
Integrated
Add to�Home Screen
80%
Source: comScore Custom Survey, U.S., Age 18+, 2017 Wave
intentionally moved apps to their home screen
Broken Experience
Required user interaction�Buried deep in menus
Where would it start?�Dependent on bookmark
Would it work offline?�Users didn't expect offline
Web App Manifest
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="/manifest.json">
{
"name": "CNET Tech Today",
"short_name": "Tech Today",
"icons": [{
"src": "icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}, {...}],
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait",
"background_color": "#FF0000",
"theme_color": "#FF0000"
}
Home Screen Name & Icons
{
"name": "CNET Tech Today",
"short_name": "Tech Today",
"icons": [{
"src": "icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}, {...}],
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait",
"background_color": "#FF0000",
"theme_color": "#FF0000"
}
Splash Screen
{
"name": "CNET Tech Today",
"short_name": "Tech Today",
"icons": [{
"src": "icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}, {...}],
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait",
"background_color": "#FF0000",
"theme_color": "#FF0000"
}
Start Up Options
{
"name": "CNET Tech Today",
"short_name": "Tech Today",
"icons": [{
"src": "icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}, {...}],
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait",
"background_color": "#FF0000",
"theme_color": "#FF0000"
}
Task Switcher Colors
{
"name": "CNET Tech Today",
"short_name": "Tech Today",
"icons": [{
"src": "icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}, {...}],
"start_url": "/index.html",
"display": "standalone",
"orientation": "portrait",
"background_color": "#FF0000",
"theme_color": "#FF0000"
}
Good, but what about
Prompt to Install?
Prompt to Install
Prompt to Install
Prompt to Install
Prompt to Install
Why are the requirements
so strict?
A Promise to the User
Fast
Engaging
Reliable
Integrated
Web Payments
66%
of purchases on mobile are on the web
66%
Fewer conversions on mobile websites
Checkout Forms Today
Manual
Tedious
Slow
n-Taps
Autofill
Fill web forms with a
single click
Tell the browser with
autocomplete attributes
30%
faster form completion with autocomplete
Autocomplete Attributes
<label for="frmNameCC">Name on card</label>
<input name="ccname" autocomplete="cc-name">
<label for="frmCCNum">Card Number</label>
<input name="cardnumber" autocomplete="cc-number">
<label for="frmCCCVC">CVC</label>
<input name="cvc" autocomplete="cc-csc">
<label for="frmCCExp">Expiry</label>
<input name="cc-exp" autocomplete="cc-exp">
https://goo.gl/5mLti2
Checkout Forms Today
Slow
n-Taps
Manual
Tedious
Automatic
Simple
Imagine a world�without forms...
PaymentRequest API
A new payments API
built for the web
PaymentRequest
PaymentRequest
PaymentRequest
PaymentRequest
PaymentRequest
PaymentRequest
PaymentRequest
PaymentRequest
Cross Browser
Cross Platform
Open Ecosystem
PaymentRequest is NOT
a new payment method
Slow
n-Taps
Automatic
Simple
Fast
1-tap
PaymentRequest
Create the PaymentRequest
let pr = new
PaymentRequest(paymentMethods, txInfo, options);
Payment Methods
let paymentMethods = [{
supportedMethods: ['basic-card'],
data: {
supportedNetworks: ['visa', 'mastercard', '...']
}
}, {
supportedMethods: ['https://android.pay/pay'],
data: {
merchantID: '12345'
...
}
}];
Transaction Details
let txInfo = {
total: {
label: 'Total',
amount: {currency: 'USD', value: '50.00'}
},
displayItems: [{
label: 'Subtotal',
amount: {currency: 'USD', value: '50.00'}
}]
};
Optional: Shipping Methods
txInfo.shippingOptions = [{
id: 'standard',
label: 'Standard shipping',
amount: {currency: 'USD', value: '10.00'},
selected: true
}, {
id: 'express',
label: 'Express shipping',
amount: {currency: 'USD', value: '20.00'}
}];
Optional: Extra Info
let options = {
requestShipping: true,
requestPayerEmail: true,
requestPayerPhone: true
requestPayerName: true,
shippingType: 'shipping'
}
PaymentRequest
Show the Payment Request Interface
pr.show().then(function(paymentResponse) {
// send paymentResponse to payment processor
return collectPayment(paymentResponse)
.then(res => {
paymentResponse.complete('success');
})
.catch(err => {
paymentResponse.complete('fail');
});
});
PaymentRequest
Get Payment Details
pr.show().then(function(paymentResponse) {
// send paymentResponse to payment processor
return collectPayment(paymentResponse)
.then(res => {
paymentResponse.complete('success');
})
.catch(err => {
paymentResponse.complete('fail');
});
});
PaymentResponse
{
"methodName": "basic-card",
"details": {
"cardholderName": "Larry Page",
"cardNumber": "4111111111111111",
"expiryMonth": "12",
"expiryYear": "2020",
"cardSecurityCode": "111",
"billingAddress": { ... }
},
"shippingAddress": { ... }
"shippingOption": "express",
"payerName": "Larry Page",
"payerPhone": "212-555-1212",
"payerEmail": "user@example.com"
}
Collect the Payment
pr.show().then(function(paymentResponse) {
// send paymentResponse to payment processor
return collectPayment(paymentResponse)
.then(res => {
paymentResponse.complete('success');
})
.catch(err => {
paymentResponse.complete('fail');
});
});
Show Completion UX
pr.show().then(function(paymentResponse) {
// send paymentResponse to payment processor
return processPayment(paymentResponse)
.then(res => {
paymentResponse.complete('success');
})
.catch(err => {
paymentResponse.complete('fail');
});
});
A W3C standard to eliminate forms for users and standardize payment collection for sites.
Enable autofill with
autocomplete attributes
+
Progressively enhance with PaymentRequest
More Integration Points
Resources
Add to Home Screen and the Web App Manifest�https://goo.gl/GHZXqb
Introduction to the PaymentRequest API�https://goo.gl/ZKupju
List of Auto-complete Attributes�https://goo.gl/5mLti2
Thank You!