Download the PHP package rikudou/euqrpayment without Composer

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

QR code payment (EU)

Tests Coverage Status Download

Library to generate QR payment codes for European Union (EPC standard, also called GiroCode in Germany). Currently used in Germany, Austria, Netherlands, Finland and Belgium.

See also QR code payment generator for Czech, Slovak or Hungarian accounts

Installation

Via composer: composer require rikudou/euqrpayment

Usage

In the constructor you must supply IBAN which may be a string or an instance of rikudou\EuQrPayment\Iban\IbanInterface.

Example with string:

Example with base IBAN class:

The IbanInterface is useful in case you want to create an adapter that transforms your local format (BBAN) to IBAN.

This package contains one such class for Czech accounts:

Setting payment details

All payment details can be set via setters:

Exceptions

This library throws LogicException and InvalidArgumentException, here is a list of methods that throw exceptions and the reason for that:

QR Code image

This library provides many implementations of QR code image using its sister library rikudou/qr-payment-qr-code-provider. If any supported QR code generating library is installed, the method getQrCode() will return an instance of \Rikudou\QrPaymentQrCodeProvider\QrCode which can be used to get an image containing the generated QR payment data.

List of public methods

Constructor

Params

Example

getIban()

Returns instance of IbanInterface, you can get the string representation of IBAN via method asString() of IbanInterface or by casting the object to string.

Returns

rikudou\EuQrPayment\Iban\IbanInterface

Example

getCharacterSet()

Returns the character set as integer from specification. You can check it against rikudou\EuQrPayment\Sepa\CharacterSet constants. Defaults to 1 (utf-8).

Returns

int

Example

getBic() or getSwift()

Returns the BIC (SWIFT) of the payment. getSwift() is alias to getBic(). Defaults to empty string.

Returns

string

Example

getBeneficiaryName()

Returns the name of the beneficiary. Defaults to empty string.

Returns

string

Example

getAmount()

Returns the amount of the payment. Defaults to 0.0.

Returns

float

Example

getPurpose()

Returns the purpose text, you can check it against the rikudou\EuQrPayment\Sepa\Purpose constants. Defaults to empty string.

Returns

string

Example

getRemittanceText()

Returns the remittance text, e.g. payment reference. Defaults to empty string.

Returns

string

Example

getCreditorReference()

Returns the structured creditor reference. Defaults to empty string.

Returns

string

Example

getInformation() or getComment()

Returns the information (comment) of the payment. getComment() is alias to getInformation(). Defaults to empty string.

Returns

string

Example

getCurrency()

Returns the currency of the payment. Defaults to EUR.

Returns

string

Example

setCharacterSet()

Sets the character set.

Params

Returns

$this

Example

setBic() or setSwift()

Sets the BIC (SWIFT) for the payment. setSwift() is alias to setBic().

Params

Returns

$this

Example

setBeneficiaryName()

Sets the name of the beneficiary, this parameter is required.

Params

Returns

$this

Example

setAmount()

Sets the payment amount.

Params

Returns

$this

Example

setPurpose()

Sets the purpose according to SEPA specification, use class rikudou\EuQrPayment\Sepa\Purpose.

Params

Returns

$this

Example

setRemittanceText()

The payment reference, up to 140 characters.

Note: You cannot set both remittance text and creditor reference

Params

Returns

$this

Example

setCreditorReference()

The structured creditor reference (ISO 11649), up to 35 characters.

Note: You cannot set both remittance text and creditor reference

Params

Returns

$this

Example

setInformation() or setComment()

Comment for the payment, up to 70 characters. setComment() is alias to setInformation().

Params

Returns

$this

Example

setCurrency()

Sets the currency of the payment, must be an ISO 4217 string.

Params

Returns

$this

Example

getQrString()

Returns the string that should be encoded in QR image.

Returns

string

Example

getQrImage()

Returns a Qr code via third-party library.

Returns

\Endroid\QrCode\QrCode

Example

The Purpose class

The class is generated via script createLists.php as it downloads the XLS file that documents all the purpose strings. The class is committed to git so that there doesn't have to be any remote file downloading etc. when using this package in production.

After generating the class you should check that there are no errors as the code that generates it is most likely not bullet-proof.


All versions of euqrpayment with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
ext-mbstring Version *
rikudou/qr-payment-interface Version ^1.0
rikudou/qr-payment-qr-code-provider Version ^1.0
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 rikudou/euqrpayment contains the following files

Loading the files please wait ....