#Alan Tse
1 messages · Page 1 of 1 (latest)
.i met a problem
:const stripe = Stripe('pk_test_51Lzz85C4R2Nmvca4ZAvOkvRfkflsq3Aflk3kbz9O9q6dd0yeVFZ0sQqPM0vvs5m7QD36a1HC1XNOzPrBCQcQRYWy00ru4jyV6A', {
stripeAccount: 'acct_1Lzz85C4R2Nmvca4'
});
const paymentRequest = stripe.paymentRequest({
country: 'AU',
currency: 'aud',
total: {
label: 'Demo total',
amount: 1000,
},
requestPayerName: true,
requestPayerEmail: true,
requestPayerPhone: true,
});
paymentRequest.canMakePayment().then(result => {
console.log('paymentRequest.canMakePayment:', result)
})
have you created this first?
const prButton = elements.create('paymentRequestButton', {
paymentRequest,
});```
you need to mount your payment request button
Hey brother, why is your console in Chinese😆
@pure locust please refrain from entering threads that you are not supposed to be involved in and respect the code of conduct of this discord server/channel
Do you mean that I need to introduce element first before I can call this api
please read through this https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-mount-element
maybe you don't have an active payment method
when you do open https://stripe.com/docs/stripe-js/elements/payment-request-button do you see the Google Pay or Apple Pay buttons on the top of the page?
so if you read the warning message, it clearly states that you can't make a payment
either because the browser doesn't support the Payment Request API or you don't have a saved payment method
which browser are you using?
chrome
version?
107.0.5304.87 (arm64)
you need to go to your google wallet and add a real card
maybe it's my account problem ?
when you say you switched accounts do you mean Stripe or Google accounts?
ok what is the Stripe account id that didn't work
acct_1Lzz85C4R2Nmvca4 this one
let me take a look
i have turn on these paymentmetods
just now or do you mean before?
before
ok still checking
ok thx
@formal cloud bro i can see the goolgepay button in my chrome now
it seems like works
i use the acct_1Lzz85C4R2Nmvca4
I'm happy that this got resolved by itself
thx alot
let me know if you need any more help