codebar-ag/laravel-postfinance-b2b

B2B Service integration for Laravel

Maintainers

πŸ‘ codebar

Package info

github.com/codebar-ag/laravel-postfinance-b2b

pkg:composer/codebar-ag/laravel-postfinance-b2b

Statistics

Installs: 2 911

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 6

v12.0 2026-03-07 13:27 UTC

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT d0504c46bc603c94e99d131ffb2482ce72d27a65

laravelpostfinanceb2bcodebar-aglaravel-postfinance-b2b


README

πŸ‘ Image

πŸ‘ Latest Version on Packagist
πŸ‘ GitHub-Tests
πŸ‘ GitHub Code Style
πŸ‘ Total Downloads

This package was developed to give you a quick start to communicate with the PostFinance B2B REST API.

πŸ’‘ What is PostFinance B2B?

PostFinance B2B is a digital interface for all your invoices where you can send and receive your invoices electronically.

πŸ›  Requirements

Package PHP Laravel
v12.0.0 ^8.2 - ^8.4 12.x
v11.0.0 ^8.2 - ^8.3 11.x

βš™οΈ Installation

You can install the package via composer:

composer require codebar-ag/laravel-postfinance-b2b

Add the following environment variables to your .env file:

POSTFINANCE_B2B_USERNAME=
POSTFINANCE_B2B_PASSWORD=

πŸ— Usage

Invoice download web services provided by PostFinance

🚧 Testing

Copy your own phpunit.xml-file.

cp phpunit.xml.dist phpunit.xml

Modify environment variables in the phpunit.xml-file:

 <env name="POSTFINANCE_B2B_WSDL" value="wds"/>
 <env name="POSTFINANCE_B2B_CACHE_WSDL" value="wsdl"/>
 <env name="POSTFINANCE_B2B_USERNAME" value="username"/>
 <env name="POSTFINANCE_B2B_PASSWORD" value="password"/>
 <env name="POSTFINANCE_B2B_DEBUG" value="debug"/>

 <env name="POSTFINANCE_B2B_TESTS_PAYER_ID" value=""/>
 <env name="POSTFINANCE_B2B_TESTS_BILLER_ID" value=""/>
 <env name="POSTFINANCE_B2B_TESTS_TRANSACTION_ID" value=""/>
 <env name="POSTFINANCE_B2B_TESTS_FILE_TYPE" value="RGXMLSIG"/>

Run the tests:

./vendor/bin/pest

πŸ“ Changelog

Please see CHANGELOG for more information on what has changed recently.

✏️ Contributing

Please see CONTRIBUTING for details.

POSTFINANCE_B2B_USERNAME=xxxxx POSTFINANCE_B2B_PASSWORD='XXXXX' POSTFINANCE_B2B_DEBUG=true composer test

Code Style

./vendor/bin/pint

πŸ§‘β€πŸ’» Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

πŸ™ Credits

🎭 License

The MIT License (MIT). Please see License File for more information.