Iframe with allowpaymentrequest property does not allow express payment methods
See original GitHub issueSummary
stripe.paymentRequest
does not have the same result as the native PaymentRequest
when calling canMakePayment
within an Iframe. The Iframe has the allowpaymentrequest
attribute as specified in the documentation.
Other information
Sample stripe code
const paymentRequest = stripe.paymentRequest({
country: 'US',
currency: 'usd',
total: {
label: 'Demo total',
amount: 0,
},
requestPayerName: true,
requestPayerEmail: true,
requestPayerPhone: true,
requestShipping: true,
shippingOptions: [],
});
paymentRequest.canMakePayment().then(result => {
if (result) {
// Always null
}
});
Sample native PaymentRequest code
new window.PaymentRequest(
[
{
supportedMethods: 'https://google.com/pay',
data: {
...
}
},
],
{
total: {
label: 'Total',
amount: {
currency: 'USD',
value: '0.00',
},
},
},
)
.canMakePayment()
.then(canPay => {
// Returns true
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Payment Request API - W3C
This specification standardizes an API to allow merchants (i.e. web sites selling physical or digital goods) to utilize one or more payment ......
Read more >HTMLIFrameElement.allowPaymentRequest - Web APIs | MDN
The allowPaymentRequest property of the HTMLIFrameElement interface returns a boolean value indicating whether the Payment Request API may ...
Read more >Apple Pay Payment Request API iframe - Stack Overflow
The allowPaymentRequest property of the HTMLIFrameElement interface returns a Boolean indicating whether the Payment Request API may be ...
Read more >Spreedly iFrame Payment Form
Spreedly's iFrame payment form is a pure, JavaScript library that provides two Spreedly-managed, fields for collecting the credit card number and CVV (the...
Read more >HTML Iframes - GeeksforGeeks
An inline frame is used to embed another document within the current HTML document. The HTML iframe name attribute is used to specify...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There hasn’t been any changes that would cause Google Pay to stop working if it was before, neither in Chrome nor in Stripe.js. The main reason Google Pay wouldn’t work is if the Google Pay Payment Handler is not installed (Google Pay never used before on the browser), or if no cards are saved in the Google Pay wallet. You can verify the former by checking if a service worker with scope
https://pay.google.com/gp/p/
is installed in chrome://serviceworker-internals/@hofman-stripe So has anything changed recently? The google pay functionality used to work but no longer does