2017 © Pedro Peláez
 

library php-customer-messages

A libary for heidelpay messages.

image

heidelpay/php-customer-messages

A libary for heidelpay messages.

  • Friday, February 9, 2018
  • by heidelpay
  • Repository
  • 3 Watchers
  • 1 Stars
  • 8,450 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 14 % Grown

The README.md

Latest Version on Packagist Coverage Status Build Status Codacy Badge, (*1)

Logo, (*2)

heidelpay Customer Messages, (*3)

ATTENTION: This package is abandoned and replaced by heidelpay/php-message-code-mapper., (*4)

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

1. Installation, (*6)

Composer, (*7)

composer require heidelpay/php-customer-messages

manual Installation, (*8)

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

2. Implementation, (*10)

Composer, (*11)

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

manual Installation, (*12)

require_once 'path/to/php-customer-messages/lib/CustomerMessage.php';

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

3. Usage, (*14)

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 CustomerMessage instance:, (*15)

$instance = new \Heidelpay\CustomerMessages\CustomerMessage('de_DE');

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

  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., (*17)

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

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

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

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

The Versions

09/02 2018

dev-develop

dev-develop https://dev.heidelpay.de

A libary for heidelpay 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

09/02 2018

dev-master

9999999-dev https://dev.heidelpay.de

A libary for heidelpay 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

11/10 2017

17.10.11

17.10.11.0 https://dev.heidelpay.de

A libary for heidelpay 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

03/08 2017

17.8.3

17.8.3.0 https://dev.heidelpay.de

A libary for heidelpay 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

03/02 2017

17.2.3

17.2.3.0 https://dev.heidelpay.de

A libary for heidelpay 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

02/02 2017

17.01.04

17.01.04.0 https://dev.heidelpay.de

A libary for heidelpay 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