Looking to hire Laravel developers? Try LaraJobs

laravel-postfinance-b2b maintained by codebar-ag

Description
B2B Service integration for Laravel
Last update
2026/04/09 09:07 (dev-main)
License
Downloads
2 885

Comments
comments powered by Disqus

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.