admin管理员组文章数量:1304972
When I load my website I get this error: Unable to download payment manifest "/".
This errors shows up indefinitely and eventually crashes the website. It happened when I developed my own code using the Docs. It happened also when I took the code straight from the NPM Docs. I cant figure it out.
This is the code that I am using.
import React from 'react';
import GooglePayButton from '@google-pay/button-react';
function GooglePay(props) {
return (
<GooglePayButton
environment='TEST'
paymentRequest={{
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['AMEX', 'DISCOVER', 'MASTERCARD', 'VISA']
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'example',
gatewyMerchantId: 'examleMerchantId',
},
},
},
],
merchantInfo: {
merchantId: '12345678901234567890',
merchantName: 'Demo',
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: props.totalAmount.toString(),
currencyCode: 'USD',
countryCode: 'US',
},
shippingAddressRequired: true,
callbackIntents: ['PAYMENT_AUTHORIZATION'],
}}
onLoadPaymentData={paymentRequest => {
console.log('Success', paymentRequest)
}}
onPaymentAuthorized={paymentData => {
console.log('Payment Authorized Success', paymentData)
return { transactionState: 'SUCCESS' }
}}
existingPaymentMethodRequired='false'
buttonColor='black'
buttonType='Buy'
/>
)
};
export default GooglePay;
I am expecting Google Pay to work every time I click on it. Instead it may work the first time (may not) and then bees un-clickable on the next re-load.
When I load my website I get this error: Unable to download payment manifest "https://pay.google./about/".
This errors shows up indefinitely and eventually crashes the website. It happened when I developed my own code using the Docs. It happened also when I took the code straight from the NPM Docs. I cant figure it out.
This is the code that I am using.
import React from 'react';
import GooglePayButton from '@google-pay/button-react';
function GooglePay(props) {
return (
<GooglePayButton
environment='TEST'
paymentRequest={{
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [
{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['AMEX', 'DISCOVER', 'MASTERCARD', 'VISA']
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
gateway: 'example',
gatewyMerchantId: 'examleMerchantId',
},
},
},
],
merchantInfo: {
merchantId: '12345678901234567890',
merchantName: 'Demo',
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPriceLabel: 'Total',
totalPrice: props.totalAmount.toString(),
currencyCode: 'USD',
countryCode: 'US',
},
shippingAddressRequired: true,
callbackIntents: ['PAYMENT_AUTHORIZATION'],
}}
onLoadPaymentData={paymentRequest => {
console.log('Success', paymentRequest)
}}
onPaymentAuthorized={paymentData => {
console.log('Payment Authorized Success', paymentData)
return { transactionState: 'SUCCESS' }
}}
existingPaymentMethodRequired='false'
buttonColor='black'
buttonType='Buy'
/>
)
};
export default GooglePay;
I am expecting Google Pay to work every time I click on it. Instead it may work the first time (may not) and then bees un-clickable on the next re-load.
Share Improve this question asked Jan 3, 2023 at 15:59 FlyingFinn91FlyingFinn91 811 gold badge1 silver badge2 bronze badges 1- Does the button work for you here: google-pay-react.stackblitz.io Also, the "Unable to download payment manifest" console error is a chrome bug and should not affect your Google Pay integration. See here: bugs.chromium/p/chromium/issues/detail?id=1405229 – Domi Commented Jul 24, 2023 at 13:58
2 Answers
Reset to default 4Be sure that:
- Your stripe dashboard the google pay is enabled
- Check if you have a real card added to your google wallet
- Check if have added a real card in Chrome Browser Payment methods
- Check if have added the real card in http://pay.google.
Some updates from Stripe Team Support
Thanks! Upon checking our resources, for using Google Pay on Stripe checkout you just need to have it enabled on your Dashboard payment methods:
https://dashboard.stripe./test/settings/payment_methods
But, to test your integration for Google Pay, you’ll need to fulfill specific browser requirements for Chrome. When testing Google Pay you should have a real card saved in your Chrome browser or Google Wallet, and have your test API keys/test Google Pay environment active. The real card does not get charged, and Google passes a test card during the checkout flow instead of a real card. Our normal test cards do not work with Google Pay when the user tries to save them in Chrome.
Chrome
- Chrome 61 or newer
- A saved payment card
Chrome Mobile for Android
- Chrome 61 or newer
- An activated Google Pay card or a saved card
When using Google Pay, including Android Pay, with a test mode key, you might see an “Unrecognized app” warning. This is expected and doesn’t show up in live mode.
Future readers may find it helpful to know that I was able to eliminate this error once I switched out of Incognito mode in Chrome.
本文标签: javascriptGoogle Pay Error API Unable to download payment manifestStack Overflow
版权声明:本文标题:javascript - Google Pay Error: API Unable to download payment manifest - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741795723a2397928.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论