PHP code example of 99x / craft-swish-suite
1. Go to this page and download the library: Download 99x/craft-swish-suite library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
99x / craft-swish-suite example snippets
text
$SWISH_NUMBER
$SWISH_CERT_PATH
$SWISH_CERT_PASSWORD
$SWISH_CA_PATH
dotenv
# Swish Integration
SWISH_NUMBER=1234679304
SWISH_CERT_PATH=/var/www/certs/swish-merchant.p12
SWISH_CERT_PASSWORD=your-secure-password-here
SWISH_CA_PATH=/var/www/certs/Swish_TLS_RootCA.pem
# Optional: Override API endpoint for testing
SWISH_BASE_URL=https://mss.cpc.getswish.net/swish-cpcapi/api/v2
# Optional: Custom callback route
SWISH_CALLBACK_URI=/payments/swish-callback