codebar-ag/laravel-postfinance-b2b

B2B Service integration for Laravel

Maintainers

Package info

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

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

Statistics

Installs: 2 858

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 6


README

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.