Repository navigation
Getting Started
This page installs the sample bridge, configures it with your provider keys and runs it. You need a server with a public IP or domain, because Selldone must be able to reach your login, token and webhook URLs.
Warning
This is a test project. Never use it as a live/production service.
- PHP 7.4 or 8.x and Composer (the project uses Laravel 8).
- Node.js with npm or Yarn (the panel is built with Laravel Mix, Vue 2 and Vuetify 2).
- A public server (IP or domain) for the webhook and auth URLs.
- A Selldone account with access to the providers panel.
git clone https://github.com/selldone/sample-connect-provider.git
cd sample-connect-provider
composer install
cp .env.example .env
php artisan key:generate
npm installThe public/ folder is ignored by Git in this repository. If public/index.php is missing after cloning, copy the public/ folder (at least index.php and .htaccess) from the Laravel 8 skeleton.
The sample does not use a database; the default DB_* values in .env can stay as they are.
config/selldone.php reads four environment variables. Add them to .env with the values from Selldone > Your provider:
| Variable | Config key | Where to find it |
|---|---|---|
SD_PROVIDER_API |
selldone.provider-api |
Base URL of the Selldone provider API, used by the panel's API tester. |
SD_PROVIDER_RETURN_URL |
selldone.provider-return-url |
Auth tab > Return URL (generated by Selldone). |
SD_PROVIDER_WEBHOOK_SIGN_KEY |
selldone.provider-webhook-sign-key |
Webhooks tab > sign key. |
SD_PROVIDER_SECRET_KEY |
selldone.provider-secret-key |
APIs tab > secret key / access token. |
SD_PROVIDER_API=https://...
SD_PROVIDER_RETURN_URL=https://.../connect/<your-provider>/callback
SD_PROVIDER_WEBHOOK_SIGN_KEY=provider-sign-...
SD_PROVIDER_SECRET_KEY=1:provider-acc-...Sample OAuth client values and tokens are constants in app/Http/Controllers/Controller.php:
| Constant | Purpose |
|---|---|
CLIENT_ID |
Client ID you paste into Selldone's Auth tab. |
CLIENT_SECRET |
Client secret you paste into Selldone's Auth tab. |
SAMPLE_AUTHENTICATION_CODE |
Authorization code returned after the user grants access. |
SAMPLE_ACCESS_TOKEN |
Access token issued at /auth/token and expected in webhook Authorization headers. |
npm run watch # rebuild on change
# or
yarn watchOther scripts from package.json: npm run dev (development build), npm run prod (production build), npm run hot (hot reload), npm run watch-poll.
Deploy the project on a public server, then serve it:
php artisan serve --port=80On Windows you can double-click START SERVER.bat, which runs php artisan serve --port=10000.
Open the app in a browser. The panel has five pages: Home (mode, auth mode, keys), Webhooks (URLs to copy), APIs (API tester), Auth (OAuth values to copy) and Help (setup steps).
Follow Provider Setup to create your provider and bridge, paste the auth and webhook URLs, and connect a test shop.