Download the PHP package ivo-wmg/borica without Composer

On this page you can find all versions of the php package ivo-wmg/borica. 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 borica

Borica

Borica APGW (EMV 3DS) card payments for PHP and Laravel — and, more usefully, a written record of the failures the specification does not warn about.

Two production integrations reached the same conclusions independently, one a shop on pre-authorization, one a subscription service on tokenized recurring payments. The protocol layer here is tested byte-for-byte against the worked examples in Appendix 1 of P-OM-41 v5.0.

The repository holds three things:

package src/, config/, database/ the code
skill skill/ the same knowledge for an AI assistant
this file how to use either

Install

Laravel discovers the provider. Publish the config and the log table:

Keys belong outside the repository and outside the web root. The public key is Borica's, used to verify their callbacks; the private key is yours, used to sign your requests.


The part worth reading

P_SIGN is RSA-SHA256 over a string where each field is its byte length followed by its value, and an empty field is a bare -:

That final - is the RFU slot. On a merchant-initiated transaction it holds MERCH_TOKEN_ID instead, length-prefixed. Signing an MIT with the bare dash that works everywhere else returns RC -17 — "terminal denied access" — which reads as a certificate problem and is not one.


Usage

A one-off payment

$fields is an array to POST to the gateway from an auto-submitting form. The browser goes to the bank; your callback hears the result.

The callback

Verify, dispatch, redirect. Nothing else belongs here — see below.

Telling the customer what happened

Keep them apart. Nobody buying groceries can act on "error in the RRN field", and a shop that shows the technical text to a customer whose bank is still deciding tells them they were refused — so they pay somewhere else while the authorization lands.

Completing and reversing a pre-authorization

Recurring payments


Rules the package cannot enforce for you

  1. Verify every callback, and fail closed. A missing public key is an error, never a skipped check.
  2. A valid signature proves the sender, not the amount. Compare AMOUNT and CURRENCY to what you asked for.
  3. Return from the callback immediately. Do the work in a queued job. Anything slow here times out and Borica retries, giving you the payment twice.
  4. Never cancel on an in-progress code. -31, -33, -40 mean the customer is still at their bank.
  5. Never downgrade a successful authorization. Late duplicate declines arrive.
  6. Make every write idempotent. Callbacks repeat.
  7. ORDER is six digits. Plan the reverse lookup before you need it.
  8. Never log the POST body. It can carry a PAN.

skill/reference/traps.md explains what each of these costs when ignored.


The skill

skill/ is a Claude Code skill holding the same knowledge in a form an AI assistant will pick up on its own when it sees Borica work.

Use it in one project:

Use it everywhere:

The assistant loads it by its description when a task mentions Borica, APGW, P_SIGN, MAC_GENERAL, TRTYPE or MERCH_TOKEN_ID. Nothing needs invoking by hand.

With another tool. The files are plain Markdown with no Claude-specific syntax beyond the frontmatter. Point any assistant that reads files at skill/SKILL.md and it will work — for Cursor, .cursorrules; for Copilot, .github/copilot-instructions.md; otherwise paste skill/reference/traps.md into the conversation before starting.

What it contains

file
SKILL.md the signing rules, the decisions to settle first, a checklist
reference/traps.md every trap, with what it costs — read before writing signing code
reference/rc-codes.md one authoritative RC table and what to do per class

Testing

The signature tests reproduce both Appendix 1 examples byte for byte. If you change SignatureBuilder, those must still pass — they are the only check on this string that does not need a live terminal.


Going live

The dev gateway is open and useful. Production needs a different host, a different terminal id, and different keys. The certificate comes from B-Trust separately from the terminal credentials, and neither works without the other. On both integrations behind this package, waiting for those was longer than writing the code.


Licence

MIT. Not affiliated with or endorsed by Borica AD. Field definitions belong to their specification; what is here is the experience of implementing against it.


All versions of borica with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-openssl Version *
ext-json Version *
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 ivo-wmg/borica contains the following files

Loading the files please wait ...