#Alan Tse

1 messages · Page 1 of 1 (latest)

rigid sorrelBOT
hasty rover
#

👋 happy to help

#

any more details?

empty crane
#

.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)
})

hasty rover
#

have you created this first?

const prButton = elements.create('paymentRequestButton', {
  paymentRequest,
});```
#

you need to mount your payment request button

pure locust
#

Hey brother, why is your console in Chinese😆

hasty rover
#

@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

empty crane
#

Do you mean that I need to introduce element first before I can call this api

hasty rover
#

maybe you don't have an active payment method

empty crane
hasty rover
#

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?

empty crane
#

chrome

hasty rover
#

version?

empty crane
#

107.0.5304.87 (arm64)

hasty rover
#

you need to go to your google wallet and add a real card

empty crane
#

when i swich another acount ,it worls

#

works.

hasty rover
#

perfect

#

now you can try your code

empty crane
#

maybe it's my account problem ?

hasty rover
#

when you say you switched accounts do you mean Stripe or Google accounts?

empty crane
#

i apply a test account in AU to intergate

#

i swich the stripe account

hasty rover
#

ok what is the Stripe account id that didn't work

empty crane
#

acct_1Lzz85C4R2Nmvca4 this one

hasty rover
#

let me take a look

empty crane
#

i have turn on these paymentmetods

hasty rover
#

just now or do you mean before?

empty crane
#

before

hasty rover
#

ok still checking

empty crane
#

ok thx

#

@formal cloud bro i can see the goolgepay button in my chrome now

#

it seems like works

#

i use the acct_1Lzz85C4R2Nmvca4

hasty rover
#

I'm happy that this got resolved by itself

empty crane
#

thx alot

hasty rover
#

let me know if you need any more help