Skip to content

About

Sample Laravel + Vue bridge for Selldone Connect OS: OAuth login, signed webhooks and order sync for dropshipping and fulfillment providers.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Selldone Sample Connect Provider — Laravel + Vue reference bridge for Connect OS

Docs Selldone

A sample Laravel + Vue project that shows dropshipping suppliers and fulfillment services how to build a Selldone Connect Provider bridge.
Documentation · Quick start · Ecosystem · Selldone.com · Report an issue

Storefront · Page Builder · Components · Storefront SDK · Backoffice SDK · Vendor SDK · Community SDK · Core · CLI · Translate

Warning

This is a test project. Never use it as a live/production service. It ships with hard-coded sample credentials (client ID, client secret, authorization code and access token) and prints your provider keys into the page for learning purposes. Use it to understand the flow, then build your own bridge.

Overview

Connect OS is the Selldone® service that syncs products, orders and customers between Selldone shops and third-party services. A provider is such a third-party service — for example a dropshipping supplier, a fulfillment center or a marketplace. A bridge is the code on the provider's side that handles the authentication flow, webhooks and APIs between the provider and Connect OS.

If you are a retail/e-commerce service provider such as a dropshipping supplier, you can create a Connect Provider bridge on Selldone. Merchants on Selldone can then connect their shops to your service with one click and sync products. When an order is checked out, Selldone creates sub-orders (fulfillments) and sends them to the related connect providers.

This repository is a complete, minimal reference implementation of such a bridge in Laravel 8 (back end) and Vue 2 + Vuetify (a small panel that shows the values you need to copy into Selldone). It implements the OAuth 2.0 login flow, verifies webhook signatures and answers every webhook with sample data.

Key features

  • OAuth 2.0 provider flow — login, grant/reject and token endpoints (/auth/login, /auth/login/accept, /auth/login/reject, /auth/token).
  • Webhook signature verification — checks the Selldone-Sign-Id and Selldone-Sign-Hash headers with your webhook sign key.
  • Seven webhook handlers — notify shop, sync categories, sync products, create, confirm, get and cancel order.
  • Typed request parsing — Selldone\provider classes validate each webhook payload and expose models such as recipient, order items, retail costs and fulfillment.
  • Response builders — fluent helpers to return products, variants, categories, costs, carrier and tracking information.
  • Provider panel UI — Vue pages that show the return URL, client credentials, login/token URLs, webhook URLs and an API tester.
  • Connect modes reference — Migration, Dropshipping, Marketplace, Accounting and Other, with the webhooks and scopes each one uses.

Screenshots

Sample connect provider web app

Quick start

Requirements: PHP 7.4 or 8.x with Composer, Node.js with npm (or Yarn), and a server reachable from the internet so Selldone can call your webhooks.

git clone https://github.com/selldone/sample-connect-provider.git
cd sample-connect-provider

# Back end
composer install
cp .env.example .env
php artisan key:generate

# Front end
npm install
npm run watch        # or: yarn watch / npm run dev / npm run prod

Add your provider values to .env (read by config/selldone.php):

SD_PROVIDER_API=https://...                  # Provider API base URL
SD_PROVIDER_RETURN_URL=https://...           # Return URL from Selldone > Provider > Auth
SD_PROVIDER_WEBHOOK_SIGN_KEY=provider-sign-… # Selldone > Provider > Webhooks
SD_PROVIDER_SECRET_KEY=1:provider-acc-…      # Selldone > Provider > APIs

Run the back end. You should deploy this Laravel project on a public server to be able to connect it to Selldone via webhooks:

php artisan serve --port=80

Note

The public/ folder is ignored by Git in this repository. If public/index.php is missing after cloning, copy the public/ folder from a fresh Laravel 8 skeleton before serving the app.

On Windows, START SERVER.bat runs php artisan serve --port=10000.

Usage

How to start

  1. Go to the providers panel and create a new provider.
  2. Open the created provider and complete the information about your service on the Setting tab.
  3. Go to the Dashboard and click Create connect bridge. To create the bridge you need (1) a wallet in USD and (2) a 20 USD charge. Users can select your service in Channel > Connect OS only if your provider has a bridge.
  4. Get the access token (API secret key) in the APIs tab and the webhook sign key in the Webhooks tab. Use the access token in the Authorization header of API requests, and the sign key to validate webhooks received from Selldone.
  5. Go to the Auth tab and set up the user authentication flow.
  6. Implement all required webhooks (required).
  7. Using the APIs is optional and depends on your service.

Configuration on Selldone

Step Screenshot
Create a new provider for Connect OS at selldone.com/shuttle/providers Create new provider for Connect OS
Created bridge Selldone Connect Bridge
Get the API key (secret key) API key
Get the webhook sign key Webhook sign key
Configure Auth (OAuth 2.0) Auth configuration

Auth tab values (OAuth 2.0)

Field in Selldone Value from this project
Authentication mode OAuth 2.0
Return URL Generated by Selldone; copy it to SD_PROVIDER_RETURN_URL
Client ID CLIENT_ID in app/Http/Controllers/Controller.php
Client Secret CLIENT_SECRET in app/Http/Controllers/Controller.php
OAuth URL https://yourdomain.com/auth/login
Token Generation API https://yourdomain.com/auth/token

The login and token paths are defined in routes/web.php. Note that POST /auth/token is mapped to Controller::class, while the token() method lives in AuthorizationController; if the token exchange fails, point the route to AuthorizationController::class in your copy.

Webhook URLs

Paste these into Selldone > Your provider > Webhooks (routes are defined in routes/api.php):

Webhook Route in this sample Handler
Notify shop POST /api/shop WebhooksController@notifyShop
Fetch categories GET /api/categories WebhooksController@syncCategories
Fetch products GET /api/products WebhooksController@syncProducts
Create order POST /api/create-order WebhooksController@createOrder
Confirm order manually POST /api/confirm-order WebhooksController@confirmOrder
Get order status GET /api/get-order WebhooksController@getOrder
Cancel order POST /api/cancel-order WebhooksController@cancelOrder

Every webhook call carries three headers: Selldone-Sign-Id (a unique UTC timestamp), Selldone-Sign-Hash (a Bcrypt hash of {sign key}:{Selldone-Sign-Id}) and Authorization (the access token your service issued, e.g. Bearer <token>).

Supported modes

Mode Description
Migration Get products, categories, and customers. After the user deletes this service, the received products, categories, and customers will not be deleted.
Dropshipping Get products, categories, and orders. The system removes products after the user removes the service.

The panel's enums also describe Marketplace, Accounting and Other modes; see the Connect Modes wiki page.

Build frontend

This project has a sample frontend with Vue (built with Laravel Mix):

npm run watch

or

yarn watch

Documentation

Page What you'll learn
Home Connect OS, providers and bridges in one page.
Getting Started Install, configure and run the sample.
Provider Setup Create the provider and bridge on Selldone, step by step.
Authentication Flow OAuth 2.0 login, grant/reject and token exchange.
Webhooks Signature verification, payloads and responses for every webhook.
Provider API Calling the Selldone provider API with your secret key.
Connect Modes Modes, required webhooks and access scopes.
Project Structure Where things live in the Laravel and Vue code.
FAQ Common questions and troubleshooting.

How it fits in the ecosystem

Connect Provider bridges sit on the provider's side of Selldone Business OS: Selldone calls your bridge through webhooks to sync catalogs and send fulfillments, and your service calls the provider API with its secret key. Merchants manage connected services from their shop's Channel > Connect OS tab.

Selldone open-source ecosystem

Related projects

Project Why it is relevant
erp Guide and demos to connect ERP software to Selldone shops.
backoffice-sdk Admin API client for custom dashboards and integrations.
vendor-sdk Marketplace vendor panel API client.
core Shared models, types and enums used across Selldone.
clone-sheet Clone shop data into MariaDB/MySQL.

Contributing

Contributions are welcome. Please read the organization contributing guide and code of conduct.

Security

Please do not report security vulnerabilities in public issues. Follow the security policy and email security@selldone.com. Never commit real sign keys, secret keys or client secrets, and regenerate your API key and webhook sign key when you go live.

Author & Designer

Mehrdad Pajuhaan Mehrdad Pajuhaan — LinkedIn

License

Laravel Selldone Connect Provider is open-sourced software licensed under the MIT license.


Part of the Selldone® Business OS open-source ecosystem · selldone.com

About

Sample Laravel + Vue bridge for Selldone Connect OS: OAuth login, signed webhooks and order sync for dropshipping and fulfillment providers.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages