URLs

Learn About URLs in Donation Store

There are two main URLs involved with Donation Store. The application URL and the store(s) URLs. Below explains what each is, why it is needed and what you should set yours as.

Application URL

When Donation Store makes a request to a payment gateway, it needs to tell it where your application is located so it can return a confirmation that the payment was completed. Donation Store could use your server's IP for this, however if it is hidden behind some sort of proxy, this isn't information you want being revealed. Plus, for most payment gateways, the notify URL is actually sent by the user when they click purchase and you definitely don't want the user knowing the IP.

You can set the application URL during installation but also in the Application Settings part of the application. You must set it to the root location of your server. Here are some examples:

If you installed Donation Store and you are accessing the control panel through your servers IP, like this:

https://123.456.123.21:8000/control-panel/login

You should create a subdomain, or link a domain to the server so it looks something like this:

https://myawesomeserver.com/control-panel/login

Then, all you need to provide in the URL section of the installer is:

myawesomeserver.com

With no HTTP or HTTPS prefix and no path after it. Now Donation Store will tell the providers that when they have requests, send them to the above domain instead.


Webstore URL(s)

Each webstore you create has a URL associated with it. This is where Donation Store will redirect to for things like gateway returns when a user cancels or a payment is completed etc. You must set a URL or else Donation Store will not be able to find where your store is located after certain events.

By providing a URL, you can setup a sub domain and then provide that meaning that Donation Store will redirect to that, rather than to its own representation of a webstore. For example, a webstore's URL using Donation Store may look like:

https://myawesomeserver.com/store/1

Obviously this isn't appealing to the eye and if Donation Store used the server host as the source to redirect back to, it would work, but it would be more than likely the IP address of the server. You don't want people knowing the actual IP of the server Donation Store is on, especially if it is proxied. To solve this, you could create a CNAME subdomain that points to the above URL, that looks like:

https://store.myawesomeserver.com

Then, provide just the following to Donation Store as the URL (Without HTTP or HTTPS):

store.myawesomeserver.com

Then Donation Store will make any redirects to there, like:

https://store.myawesomeserver.com/payment-cancelled
https://store.myawesomeserver.com/payment-complete

If you don't have a subdomain, simply set the URL field to that of your webstore (as Donation Store displays it), like this:

https://myawesomeserver.com/store/1