Logo on stripe checkout fails

What I’m trying to do:

  • add a logo to the stripe checkout page

What I’ve tried and what’s not working:

  • initial break was using the default anvil logo; I wondered if this was because assets might have moved so I uploaded my own per these docs Anvil Docs | Themes and Styling and received the following error
logoUrl (https://j23wto3js2awd434.anvil.app/debug/I5BQM7ZL6LTVDJU5S7FGVO2S77H2TVBS%3DEZNIW36U26QXXGC2DT4RWRIA/_/api/_/theme/bluearch_logo.PNG) failed to load.

Code Sample:

# code snippet
 token, info = stripe.checkout.get_token(amount=50000, currency="USD",
                                           icon_url=anvil.server.get_api_origin()+"/_/theme/bluearch_logo")
1 Like

I think you might want anvil.server.get_app_origin() rather than get_api_origin() here.

3 Likes

Well, that is an embarrassing oversight. Thank you @stucork for the prompt reply!

A post was merged into an existing topic: Strange Issue Setting Stripe Logo Image