Darb Delivery for WooCommerce

Description

When an order reaches the status you choose, this plugin hands it to Darb. Darb works out the delivery fee, deducts it from your Darb credit, contacts the customer for their exact location, and assigns a courier. You never calculate a delivery fee and never contact a driver.

What it does

  • Sends the order automatically when it becomes Processing (or a status you pick)
  • Or sends it by hand, from a button on the order screen
  • Shows each order’s Darb status and order id in the orders list
  • Records the reason in an order note when Darb rejects an order
  • Signs every request with HMAC-SHA256, so a request cannot be tampered with or replayed

It will not break your shop. If Darb is slow, unreachable, or rejects the order, the order is still saved and the customer’s checkout still completes. The failure is recorded on the order so you can see it and resend.

Duplicate protection. Every order carries a reference that is unique for its whole life. Resending it — after a timeout, or by clicking the button twice — returns the delivery that already exists instead of creating a second one.

About the delivery location. WooCommerce stores a written address, not map coordinates. Darb therefore messages the customer a link to share their exact location, and the written address is passed along to help the courier. If you already store coordinates in a custom field, use the darb_delivery_order_payload filter to add them and Darb will dispatch immediately.

External services

This plugin connects to the Darb delivery marketplace to create delivery
orders from your WooCommerce orders. Sending deliveries to Darb is what the
plugin is for, so it cannot work without contacting the service.

Only when an order is sent — automatically on the status you choose, or by
pressing Send on the order screen — does the plugin transmit to Darb’s API the
details needed to fulfil it: your WooCommerce order number, the customer’s name
and phone number, the delivery wilaya and, if you switch the option on, the
shipping address, plus the line items and quantities. Each request is signed
with the secret key Darb issued you. Nothing is sent until you enter your
credentials and switch sending on, and the plugin does not track usage or
contact any other service.

  • Service: Darb delivery marketplace — https://darbarise.com/
  • API endpoint: https://us-central1-darb-42eca.cloudfunctions.net/shopApi
    (test mode uses https://us-central1-darbdev.cloudfunctions.net/shopApi)
  • Terms of Service: https://darbarise.com/terms-of-use/
  • Privacy Policy: https://darbarise.com/privacy-policy/

Installation

  1. Upload the plugin folder to /wp-content/plugins/, or install the zip through Plugins Add New Upload.
  2. Activate it.
  3. Go to WooCommerce Settings Integration Darb Delivery.
  4. Enter the Shop ID and Secret key that Darb issued you.
  5. Leave Environment on Test and place a test order. When you are happy, switch to Production.
  6. Tick Send orders to Darb.

FAQ

Where do I get the Shop ID and Secret key?

Darb issues them. They are shown once, so store them safely.

Should I use HMAC or the API key?

HMAC. It binds each request to its contents and expires after three minutes, so a captured request cannot be reused. The API key exists only for shops that cannot sign requests.

What is “Goods value” and does it include delivery?

It is the value of the items, taken from the order subtotal. It excludes shipping and tax. Darb sets the delivery fee itself.

An order says “Failed”. What now?

Open the order — the note and the side panel show the reason exactly as Darb reported it, for example an invalid phone number or an address outside the delivery zone. Fix the cause and press Send to Darb.

Does it work with High-Performance Order Storage?

Yes. The plugin declares compatibility and uses the CRUD API throughout.

What happens if I cancel an order in WooCommerce?

The plugin tells Darb to cancel the delivery and release the charge. Darb only
allows this while no courier has accepted the job; once one has, the order note
says so and you need to contact Darb directly.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Darb Delivery for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Cancelling or refunding an order in WooCommerce now cancels the Darb delivery and releases the charge, while no courier has accepted it.
  • First release: automatic and manual order push, HMAC signing, duplicate protection, order-screen panel and orders-list column.