Download the PHP package currence/emandates without Composer

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

eMandates PHP Library

PHP library for Dutch electronic SEPA direct debit mandates (eMandates) using the iDx protocol. It provides a complete implementation for issuing, amending, cancelling, and checking the status of eMandates through the Currence eMandates scheme.

Requirements

Installation

Then include the Composer autoloader in your application:

Configuration

The library needs credentials, certificate paths, and acquirer URLs before it can communicate with the eMandates platform. There are three ways to provide configuration.

Option 1: Global config array with Configuration::getDefault()

Create a file (e.g. eMandatesConfig.php) that populates a global array:

Then obtain a Configuration object:

Option 2: Constructor

Build a Configuration directly:

Option 3: XML config file with Configuration::load()

If you store settings in an XML file:

Load it:

Usage Examples

Creating a Communicator

CoreCommunicator handles SEPA Core mandates. B2BCommunicator extends it for SEPA B2B mandates and adds cancellation support.

1. Directory Request -- Get List of Debtor Banks

2. New Mandate -- Issue a New eMandate

3. Amendment -- Amend an Existing Mandate

4. Cancellation -- Cancel a Mandate (B2B only)

Cancellation is only available through B2BCommunicator.

5. Get Status -- Check Transaction Status

After the debtor returns from the bank, check the transaction outcome.

Custom Logger

Implement LoggerInterface to capture log output (e.g. to a database):

Pass the logger when constructing a communicator:

Error Handling

All communicator methods (Directory, NewMandate, Amend, Cancel, GetStatus) return response objects that include error information rather than throwing exceptions to the caller. This includes acquirer errors, unexpected response formats, missing XML elements, and non-XML error messages.

The ErrorResponse object provides these properties:

Property Description
ErrorCode Machine-readable error code from the acquirer
ErrorMessage Human-readable error description
ErrorDetails Additional detail about the error
SuggestedAction Recommended corrective action
ConsumerMessage Message suitable for display to the end user

Note: Transaction response objects (NewMandateResponse, AmendmentResponse, CancellationResponse) also accept AcquirerStatusRes XML. In this case the response will not have an IssuerAuthenticationUrl, so always use null-safe access:

If a communication-level error occurs (e.g. invalid XML response, schema validation failure), a CommunicatorException may be thrown internally. This exception provides errorCode and errorMessage as readonly properties:

Upgrading from the Legacy Version

If you are upgrading from the older PHP 5.5+ version of this library, see UPGRADE.md for a complete list of breaking changes and migration steps.

License

This library is released under the MIT License.

Copyright (c) 2018 Currence-Online


All versions of emandates with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-dom Version *
ext-simplexml Version *
ext-curl Version *
ext-openssl Version *
robrichards/xmlseclibs Version ^3.1
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 currence/emandates contains the following files

Loading the files please wait ...