#almusella-buy-button

1 messages · Page 1 of 1 (latest)

inland agateBOT
odd trout
#

How can I help?

#

@astral hare Please respond here and not in the main channel

inland agateBOT
odd trout
#

Copy pasting what you put in the main channel here:

I get this error in the console:  buy-button.js:1 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://js.stripe.com'/) does not match the recipient window's origin ('https://podiatrym.com'/).
#

Hmmm... do you have a site that repros this that I can take a look at?

inland agateBOT
#

almusella-buy-button

astral hare
cedar wave
#

Which problem in Test mode? We generally can't test a Live site

astral hare
#

When I use the test mode and test key, I get a lot of error in the console and the button doesn't load... but don't worry about that for now. You can load the page above and without pushing any buttons, the error is in the console

cedar wave
#

No that's actually the correct way to go. You would want to test and make sure everything works in Test mode before moving to Live mode. It's a Payment and you want to be perfectly confident before going Live

astral hare
#

to test, can I leave the stripe website set to live but use the test key, or do they both have to be set to test?

#

I just turned the stripe website to "test mode" and changed the key to the test key.. the button does not appear and just says "something went wrong"

cedar wave
#

Could you put some screenshot here? and the browser console?

astral hare
#

i fixed it.. made stupid mistake. trying to use the live button. had to create a test buttong... so now testing mode works. But still get the postmessage error.

cedar wave
#

Hmm are you embedding it inside an iframe?

#

Ah okie let me try the page

#

Do I need to click some where to see the Buy Tokens?

astral hare
#

no. frames.

#

i forgot - you have to log in.. give me a minute to set up a page without login.

#

I removed everything but the button. Still get the error

#

the entire source of the page is: <h2>Buy Tokens</h2>
test button
<script async
src="https://js.stripe.com/v3/buy-button.js">
</script>
<stripe-buy-button
buy-button-id="buy_btn_1OOsO4EgsjcjLiOi5GyDpJYx"
publishable-key="pk_test_51OCTDcEgsjcjLiOitsESknUhApRBXnHOx3dxUHUdB7Rf8PB8lWC7fO5nwZqMWYv1OFkAlfyF2HMOVBWT4hRsKcoA00Se9138TH"
client-reference-id="800"

</stripe-buy-button>

cedar wave
#

But click into it still works, right?

astral hare
#

works perfectly.

#

is it safe to ignore? I am going to make it much more elaborte and can't get the simple button to be error free.

cedar wave
#

Yeah I am trying it and I think it's safe to ignore as long as you can click it

astral hare
#

ok. thanks. One last question...

#

I need to allow people to buy 1,2,3,4,5 or 10 tokens. Each token is $33, but if they buy 10 there is a discount so 10 tokens is $250. Is there an easy way to have the button allow selection of number of tokens and have the price change when it hits 10 or do I need a seperate button for the 1-5 tokens at one price and a seperate button for 10 at the discount?

cedar wave
#

I think you would need to design your price structure separately from the button here