#benjamiiin-payment-request

1 messages · Page 1 of 1 (latest)

velvet epoch
#

What step in the docs are you getting that error on?

sacred lance
#

Step 2, if I comment that out I dont see the error

velvet epoch
#

Can you paste your exact code here? I don't see options in our code for that doc

sacred lance
#

` useEffect(() => {
if (stripe) {
const pr = stripe.paymentRequest({
country: 'GB',
currency: 'gbp',
total: {
label: 'Test test',
amount: 0,
},
requestPayerName: false,
requestPayerEmail: false,
});

  pr.canMakePayment().then((result) => {
    if (result) {
      setPaymentRequest(pr);
    }
  });
}

}, [stripe]);
`

#

I dont see option anywhere either, as I say both apple and google will go through, I just dont see any reference to that error

velvet epoch
#

Do you know which line you get it on?

sacred lance
#

``

#

Thats the trace im getting in the browser

velvet epoch
#

Can you single step through that function and see which line gets that error?

#

Oh wait

#

Try making pr just a normal var instead of const