2017 © Pedro Peláez
 

library sepa-qr

Generate SEPA QR codes

image

smhg/sepa-qr

Generate SEPA QR codes

  • Monday, January 8, 2018
  • by smhg
  • Repository
  • 3 Watchers
  • 6 Stars
  • 246 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 7 Versions
  • 114 % Grown

The README.md

This project is deprecated. Use smhg/sepa-qr-data instead.

A migration guide is available., (*1)

sepa-qr-php CI

Generates SEPA QR codes based on the European Payments Council's standard. These QR codes are scannable by many mobile banking apps. Because app support is at a decent level, it is a good idea to print such a code on an invoice., (*2)

Extends endroid/qr-code preserving all its functionality in case lower level QR code manipulation is needed., (*3)

PHP 8 support: use smhg/sepa-qr-data., (*4)

PHP 5.6 and <7.1 support: use version 2.x of this library., (*5)

Installation

composer require smhg/sepa-qr

Example

use SepaQr\SepaQr;

$sepaQr = new SepaQr();

$sepaQr
  ->setName('Name of the beneficiary')
  ->setIban('BE123456789123456789')
  ->setAmount(100) // The amount in Euro
  ->setRemittanceText('Invoice 123456789')
  ->setSize(300);

// Output to browser:
header('Content-Type: ' . $sepaQr->getContentType());
echo $sepaQr->writeString();

// Or embed as image:
echo '<img src="' . $sepaQr->writeDataUri() . '">';

// Or generate a temporary file:
$tmpFileName = tempnam('/tmp', 'prefix');
$tmpFile = fopen($tmpFileName, 'w');
fwrite($tmpFile, $sepaQr->writeString());
// ... add file to your PDF
fclose($tmpFile);
unlink($tmpFileName);

Methods

setServiceTag($serviceTag = 'BCD')

Set the service tag. Currently (?) only one value is allowed: BCD., (*6)

setVersion($version = 2)

Set the SEPA QR standard version. In version 1 a BIC is mandatory. In version 2 a BIC is only mandatory outside EEA countries., (*7)

setCharacterSet($characterSet = SepaQr::UTF_8)

Set the character set. Available constants are UTF_8, ISO8859_5, ISO8859_1, ISO8859_7, ISO8859_2, ISO8859_10, ISO8859_4 or ISO8859_15., (*8)

setIdentification($identification = 'SCT')

Set the identification code. Currently (?) only one value is allowed: SCT., (*9)

setBic($bic)

Set the AT-23 BIC of the beneficiary bank., (*10)

setName($name)

Set the AT-21 name of the beneficiary, (*11)

setIban($iban)

Set the AT-20 account number of the beneficiary. Only IBAN is allowed., (*12)

setAmount($amount)

Set the AT-04 amount of the credit transfer. Currently (?) only amounts in Euro are allowed., (*13)

setPurpose($purpose)

Set the AT-44 purpose of the credit transfer., (*14)

setRemittanceReference($remittanceReference)

Set the AT-05 remittance information (structured). Creditor reference (ISO 11649) RF creditor reference may be used., (*15)

setRemittanceText($remittanceText)

Set the AT-05 remittance information (unstructured)., (*16)

setInformation($information)

Set the beneficiary to originator information., (*17)

The Versions

08/01 2018

v1.1.1

1.1.1.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

08/01 2018

dev-master

9999999-dev

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

08/01 2018

v2.0.1

2.0.1.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

05/11 2017

v2.0.0

2.0.0.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

09/01 2017

v1.1.0

1.1.0.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

09/01 2017

v1.0.0

1.0.0.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar smhg

15/11 2016

v0.1.0

0.1.0.0

Generate SEPA QR codes

  Sources   Download

MIT

The Requires

 

by Avatar smhg