Download the PHP package justinholtweb/craft-twinsies without Composer

On this page you can find all versions of the php package justinholtweb/craft-twinsies. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-twinsies

Twinsies

Twinfield integration for Craft Commerce 5.

Twinsies posts completed Commerce orders into Twinfield — as sales invoices, or as journal transactions — keeps customers and articles in step, reads payment status back, and credits refunds.

Requires PHP 8.2+, Craft CMS 5.3+ and Craft Commerce 5.0+. No ext-soap, no build step, no runtime dependencies beyond Craft's own.


Two ways to post an order

Twinfield's invoicing module is a separate product, and plenty of Dutch shops do not have it — they send their own invoices and only need the bookkeeping. So Twinsies does both, and you pick one in the settings.

Sales invoice produces a document Twinfield can print, email and chase.

Journal transaction posts the accounting only: the debtor is debited, revenue is credited, Twinfield derives the VAT.

What else it does

Install

Connect

  1. Register an app in the Twinfield developer portal.
  2. Copy the Redirect URI shown on Twinsies' settings screen into that registration, character for character — Twinfield matches it exactly.
  3. Paste the client ID and secret into the settings screen. Put the secret in .env and reference it ($TWINFIELD_CLIENT_SECRET): plugin settings are project config, and project config is committed.
  4. Press Connect to Twinfield and authorise.
  5. Pick an office, then press Test connection.

The grant is stored in {{%twinsies_auth}}, encrypted with Craft's security key — never in project config. A Twinfield refresh token is good for about 25 years and grants full access to a company's accounts.

Set it up

Work through the settings screen top to bottom. The order that saves pain:

  1. Mode — sales invoice or journal transaction.
  2. Articles and accounts — a default article and a default revenue account, at minimum. Both are dropdowns fed from your real Twinfield administration.
  3. VAT — map each rate you charge to a Twinfield VAT code, and set a zero-rate code.
  4. Customers — leave debtor numbering to Twinfield unless you have a reason not to.
  5. Trigger — leave it on manual until a preview looks right.

Then open a completed order, press Preview XML, and read what comes out. That preview runs the same builder the push does, so it is exactly what Twinfield would receive.

Leave documents on concept (or provisional) until you are happy. A final invoice cannot be deleted in Twinfield, only credited.

Console

Reconciliation queues itself on an interval, so a cron entry is an optimisation rather than a requirement.

Twig

Everything on the front end is read-only. Nothing there can post to Twinfield.

Things worth knowing

Twinfield has no idea a repost is a repost. Unless the site sends its own invoice numbers, posting an order a second time creates a second document rather than replacing the first. The control panel makes you confirm; the trigger never does it.

Reconciliation needs booked documents. A concept invoice or a provisional transaction is not a financial transaction, so it has no open value and no match status. Twinsies says so rather than looking permanently unpaid.

A document that does not add up is not posted. If the lines do not reconcile against order.totalPrice, a difference within a cent or two is booked to a visible Rounding line and anything larger fails the build, naming the adjustment types Twinsies could not express. Books that reconcile and are wrong cost more than a support ticket.

Nothing here can stop a checkout. The trigger catches everything, and pushing through the queue is on by default.

Support

[email protected]

Twinsies is not affiliated with Wolters Kluwer or Twinfield.


All versions of craft-twinsies with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-dom Version *
ext-libxml Version *
craftcms/cms Version ^5.3.0
craftcms/commerce Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-twinsies contains the following files

Loading the files please wait ...