Download the PHP package helmutschneider/swish-php without Composer

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

Swish-PHP

Swish-PHP is a small wrapper for the swish merchant api. See https://www.getswish.se/handel/ for more information.

Dependencies

Upgrade notes

3.0.0

Installation via git

Installation via composer

Obtaining test certificates

As of 2024-09-22, a test certificate bundle (mss_test_2.0.zip) can be found by visiting: https://developer.swish.nu/documentation/environments#certificates

Begin by obtaining the SSL certificates required by Swish. The Swish server itself uses a self-signed root certificated so a CA-bundle to verify its origin is needed. You will also need a client certificate and corresponding private key so the Swish server can identify you.

As of 2024-09-22 the test certificates are called Swish_Merchant_TestCertificate_1234679304.key, Swish Merchant Test Certificate 1231181189.pem and Swish_TLS_RootCA.pem. You must concatenate Swish_Merchant_TestCertificate_1234679304.key and Swish Merchant Test Certificate 1231181189.pem together, otherwise they will not work with cURL. This bundle is your client certificate.

Usage

The client closely mirrors the swish api:

When you have the SSL certificates ready you may instantiate the client:

Notes for OSX

The bundled PHP in OSX 10.12 and earlier is not compatible with the above approach of forwarding SSL certificates. You must obtain a PHP-version that is compiled with cURL linked against OpenSSL or similar.

Run the tests

To run the tests you need certificates for the Swish test server. Place the root certificate in tests/_data/root.pem and the client certificate in tests/_data/client.pem.


All versions of swish-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-curl Version *
ext-openssl Version *
guzzlehttp/guzzle Version ^7.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 helmutschneider/swish-php contains the following files

Loading the files please wait ....