2017 © Pedro Peláez
 

library php-message-code-mapper

A library to convert heidelpay message codes into customer friendly messages.

image

heidelpay/php-message-code-mapper

A library to convert heidelpay message codes into customer friendly messages.

  • Thursday, March 1, 2018
  • by heidelpay
  • Repository
  • 4 Watchers
  • 0 Stars
  • 3,838 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 116 % Grown

The README.md

Codacy Badge Codacy Badge Build Status Latest Stable on Packagist PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2, (*1)

Logo, (*2)

heidelpay message code mapper

This library provides user-friendly output of (error)-messages coming from the heidelpay API., (*3)

1. Installation, (*4)

Composer, (*5)

composer require heidelpay/php-message-code-mapper

manual Installation, (*6)

Download the latest release from github and unpack it into a folder of your choice inside your project., (*7)

2. Implementation, (*8)

Composer, (*9)

require_once 'path/to/autoload.php;
use Heidelpay\MessageCodeMapper\MessageCodeMapper;

manual Installation, (*10)

require_once 'path/to/php-message-code-mapper/lib/MessageCodeMapper.php';

Of course, the path needs to match the path from step 1., (*11)

3. Usage, (*12)

Assuming you have received an error code from one of our modules or the heidelpay PHP API and stored it in a variable called $errorcode. To get a message from that code, create a MessageCodeMapper instance:, (*13)

$instance = new \Heidelpay\MessageCodeMapper\MessageCodeMapper('de_DE');

The constructor takes two (optional) arguments:, (*14)

  1. The locale (e.g. 'en_US', 'de_DE')
  2. The path to the locales path (for example you want to use your own locale files) containing the .csv files with the codes and messages.

We provide 'de_DE' and 'en_US' locale files with this package. You can find them in the lib/locales folder. If you want to use one of these, the path doesn't need to be provided in the constructor., (*15)

By default, 'en_US' is used as the locale., (*16)

Now you can return or print out the message by calling the getMessage() method:, (*17)

return $instance->getMessage($errorcode); echo $instance->getMessage($errorcode);, (*18)

Error codes are accepted in either the 'XXX.XXX.XXX' or 'HP-Error-XXX.XXX.XXX' format., (*19)

Support

For any issues or questions please get in touch with our support., (*20)

Web page

https://dev.heidelpay.com/, (*21)

Email

support@heidelpay.com, (*22)

Phone

+49 (0)6221/6471-100, (*23)

Twitter

@devHeidelpay, (*24)

The Versions

01/03 2018

dev-master

9999999-dev http://dev.heidelpay.com

A library to convert heidelpay message codes into customer friendly messages.

  Sources   Download

proprietary Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.

The Requires

  • php ^5.6.0|^7.0.0

 

The Development Requires

php payment errors messages error-messages heidelpay

01/03 2018

v1.0.1

1.0.1.0 http://dev.heidelpay.com

A library to convert heidelpay message codes into customer friendly messages.

  Sources   Download

proprietary

The Requires

  • php ^5.6.0|^7.0.0

 

The Development Requires

php payment errors messages error-messages heidelpay

28/02 2018

dev-develop

dev-develop http://dev.heidelpay.com

A library to convert heidelpay message codes into customer friendly messages.

  Sources   Download

proprietary Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.

The Requires

  • php ^5.6.0|^7.0.0

 

The Development Requires

php payment errors messages error-messages heidelpay

23/02 2018

dev-PHPLIB-27/change/addautoloader_and_unit_tests

dev-PHPLIB-27/change/addautoloader_and_unit_tests https://dev.heidelpay.de

A library to convert heidelpay message codes into customer friendly messages.

  Sources   Download

proprietary

The Requires

  • php ^5.6.0|^7.0.0

 

The Development Requires

php payment errors messages error-messages heidelpay

04/12 2017

v1.0.0

1.0.0.0 https://dev.heidelpay.de

A library to convert heidelpay message codes into customer friendly messages.

  Sources   Download

Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.

The Requires

  • php ^5.6.0|^7.0.0

 

The Development Requires

php payment errors messages error-messages heidelpay