Pay Now Button on Squarespace not working


(Grass + Grit Farm) #1

Hello,

I created a “Pre-Defined Amounts” button using the Dwolla button generator. I input the code into Squarespace. Squarespace doesn’t allow me to preview the button, but I can see when I go to my live site that the button is there. However, when I try to use the button (by selecting an option and clicking the arrow on the button to take me to the Dwolla payment page), I’m instead brought to my redirect page (http://www.grassgritfarm.com). The link in the address bar on the redirect page reads:

http://www.grassgritfarm.com/?error=failure&error_description=Application+or+purchase+order+does+not+have+a+payment+callback+URL+associated+with+it.+Please+submit+an+application+details+change+request+or+provide+a+callback+URL.

What am I missing in my button code that’s keeping the button from going to Dwolla’s payment page?

Thank you for your help!


(Spencer Hunter) #2

@Grass_Grit_Farm, A requirement of the button is to specify a callback url to handle the callback from Dwolla’s Off-site payment gateway. I believe this is done with the use of the data-callback button parameter. You’ll want to add this parameter in to the button script code if you do not have one set. See the example below…

<script
src="https://www.dwolla.com/scripts/button.min.js" 
class="dwolla_button" 
type="text/javascript"
data-key="[YOUR KEY HERE]"
data-redirect="http://www.mywebsite.com/return"
data-callback=”http://www.mywebsite.com/return”
data-label="A Test Button!"
data-name="Test Product"
data-description="I love tests!"
data-amount="75"
data-shipping="0"
data-tax="0"
data-guest-checkout="true"
data-type="options"
data-options="Item1:::1000|||Item2:::75|||Item3:::987.12"
>

Let us know if after setting a callback url if the button is not behaving correctly!


(Grass + Grit Farm) #3

Hi Spencer,

Thank you for your help. I added the “data-callback” line and it worked! But only for the first time. When I reloaded the page to test again, the drop-down menu was gone from the button and when you click on the button, it doesn’t take you anywhere. Any idea what’s happening there?


(Spencer Hunter) #4

Hmm, I am thinking that the drop-down menu may be getting cut off because the container you are trying to drop it in is too small. Unfortunately the button is not very responsive when placing it into the page. Do you have a link where I can test it out?


(Grass + Grit Farm) #5

I think you’re right! It was the spacing. I re-added the button and didn’t add any spacers, and it seems to be working just fine now on multiple tests. Thanks for the help!