#janou75

1 messages · Page 1 of 1 (latest)

fickle ventureBOT
cursive steeple
#

👋 happy to help

#

are you using the official Stripe pricing-table script? or are you using a custom component designed for Gatsby?

knotty ermine
#

Hello, I'm using the official Stripe pricing-table script

cursive steeple
#

Upon examining the HTTP requests, I noticed the flag has_client_reference_id. Locally, this is correctly set to has_client_reference_id = true. However, as soon as I am in my production or staging environment, the flag has_client_reference_id is always set to false.
would you mind sharing more details, screenshots, etc,?

knotty ermine
#

Here is the request that I am examining (the request sent once the "Pay" button is clicked), and here is the payload with the "has_client_reference_id" flag (at the bottom of the screenshot).

#

Here is my stripe pricing table component

const StripeTable = ({ children }) => {
  useEffect(() => {
    const script = document.createElement('script')
    script.src = 'https://js.stripe.com/v3/pricing-table.js'
    script.async = true
    document.body.appendChild(script)
  }, [])

  return (
    <Container>
      {children}
    </Container>
  )
}
...
return (
    <>
      ...
      <StripeTable>
        <stripe-pricing-table
          pricing-table-id="xxx"
          publishable-key="xxx"
          client-reference-id={btoa(email)}>
        </stripe-pricing-table>
      </StripeTable>
    </>
  )
cursive steeple
#

where do you see has_client_reference_id = false

knotty ermine
cursive steeple
#

can you log btoa(email) maybe this is empty string

knotty ermine
#

yes it's dGVzdEB0ZXN0LmZy

cursive steeple
#

ok do you have an accessible website (in test mode preferably) where we can replicate the issue?

knotty ermine
#

can i send it to you privately ?

cursive steeple
#

Someone from my team or myself will try to pick it up and we'll continue discussing asynchronously