Release notes
The first release; the version in plugin.json and the project is 1.0.0, and the release tag is v1.0.0.
Added
- Square payment gateway plugin published by Innovayse, built against
Hostpanel.Sdk3.5.0, manifest version 2. - Payments through Square payment links of the Checkout API on Square's hosted checkout page. The id of the order Square creates for the link is the gateway order id. A retry of the same request carries the same idempotency key.
- The payer is redirected only to a Square address of the active mode:
sandbox.square.linkandsquareupsandbox.comin the sandbox,square.link,square.siteandsquareup.comin production. An address of the other mode is refused. - A status read through the order and its payment. An order is
Paidonly when it is the order that was asked for, is completed, was paid by one completed payment of that order, and the payment has a known currency and a positive whole amount; otherwise it is pending and a warning is logged. A canceled order is pending, never declined. Only an order Square reports as not found is declined. Every other refusal and every outage is raised. - Full and partial refunds of a paid payment through the Refunds API, safe to retry: the host's refund id is the idempotency key and the reason of the refund. The refunded total of the payment is read first; when it already covers the refund, nothing is sent and the id of the refund made for that refund id is found among the payment's refunds. A total that cannot be read, or a covered refund that cannot be found, raises and sends nothing.
- The refund overload without a refund id always throws
NotSupportedException, because it could not be made safe to repeat. - Separate sandbox and production settings: each mode has its own access token and location, its own host, and nothing is borrowed from the other mode. An empty mode means the sandbox, any other value than
sandboxorproductionis refused before any call, and a malformed token is refused too. An order unknown in the current mode but known in the other mode is raised as a mode mismatch. - Settings with English, Russian and Armenian texts: mode, sandbox and production access tokens (secrets) and locations, and the currency.
- No webhook and no external origin: the SDK gives a callback no way to settle a payment, so settlement is the host's polling of the status.
- Amounts are whole minor units end to end; nothing is converted or rounded. Answers are read up to 1 MiB, and an error code that is not shaped like a code is never put in a message or a log.
- The plugin icon, the cover and the screenshots show the official Square logo from Square's logo page, unaltered; the icon adds only a role and a title.
- Marketplace listing: a cover and three screenshots of 1600 by 1000 pixels in
screenshots/, with their SVG sources indesign/, shipped in the package.PluginListingTestspins the tags, the images and their size. - Unit tests over a fake HTTP handler, a layer architecture test, the house rules in
rules/,ci.ymland a signedrelease.yml.
Install this version
- 1
Open the plugin list in your Hostpanel admin.
- 2
Install the plugin with the id "square" and choose version 1.0.0.
- 3
Hostpanel downloads this signed package from the registry and checks the signature and the SDK version before it loads.