0

I have a website built in Squarespace with a booking form that uses Design My Night.

The form POSTs to https://bookings.designmynight.com and uses the following to redirect back to a THANK YOU page on the squarespace site:

 <script>
 DMN.val('return_url', 'https://www.our-url.co.uk/thank-you');
 DMN.val('return_method', 'post');
 </script> 

This is causing an error in the console:

Uncaught ReferenceError: DMN is not defined

I am told by Design My Night (Collins) that is because Squarespace/webserver and application cannot accept POST requests from the designmynight.com domain (including any subdomains).

Any ideas on how to rectify this? Is there a way to configure Squarespace for this?

j00m
  • 491
  • 5
  • 20

1 Answers1

0

Have you done the authorization?

Also, did you connect the DMN library or whatever, because this error basically says that JavaScript doesn't know what DMN is.

You can find the documentation here: https://docs.collinsbookings.com/

$ curl -H "Authorization: Bearer 1234567890" https://api.collinsbookings.com/api/customers

You can do the way it is described here: Perform curl request in javascript?

And this is what you will need to do to send the POST request: https://docs.collinsbookings.com/#operation/ReplaceAssignedAreas

I hope that this is helpful.

  • Have a look here: https://developers.designmynight.com/collins/booking-url/#custom-return-url These were the guidelines I was following And it also says: When using the POST return method, you need to ensure that your webserver and application can accept POST requests from the designmynight.com domain, including any subdomain. – j00m Sep 03 '20 at 10:56