Download the PHP package coretrekas/vipps without Composer
On this page you can find all versions of the php package coretrekas/vipps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package vipps
Vipps MobilePay PHP SDK
A comprehensive, production-ready PHP SDK for Vipps MobilePay APIs, providing easy integration with:
- ePayment API v1 - Online and in-person payments with full lifecycle management
- Checkout API v3 - Complete checkout sessions for payments and subscriptions
- Recurring Payments API v3 - Recurring payment agreements and charges
- Login API v1 - OAuth 2.0 / OpenID Connect authentication
Features
- ✅ Full API Coverage - Complete support for ePayment API v1, Checkout API v3, Recurring Payments API v3, and Login API v1
- ✅ Automatic Token Management - Access tokens cached and refreshed automatically
- ✅ Fluent Builders - Easy-to-use builder interfaces for sessions, agreements, and authorization URLs
- ✅ System Info Headers - Optional system information headers for better tracking and support
- ✅ Type-Safe - PHP 8.1+ with strict types and full type hints
- ✅ Error Handling - Comprehensive exception handling with detailed error information
- ✅ PSR Compliant - PSR-3 (Logger), PSR-4 (Autoloading), PSR-12 (Code Style), PSR-18 (HTTP Client)
- ✅ Well Tested - 89 unit tests with 187 assertions, 100% pass rate
- ✅ Code Quality - PHPStan level 5, Laravel Pint for code style
- ✅ Environment Support - Separate test and production configurations
- ✅ Production Ready - Comprehensive documentation and examples
Requirements
- PHP 8.1 or higher
- ext-json
Installation
Install via Composer:
Note: This package requires PHP 8.1 or higher.
Package Structure
The SDK is organized under the Coretrek\Vipps namespace:
All classes use the Coretrek\Vipps namespace prefix.
Quick Start
Initialize the Client
Optional: Set System Information Headers
You can optionally provide system information that will be sent with all API requests for better tracking and support:
These headers help Vipps support team identify your integration and provide better assistance.
ePayment API
The ePayment API is designed for online and in-person payments with full lifecycle management including authorization, capture, refund, and cancellation.
Create a Payment
Create a Payment with Builder (Recommended)
Create a Payment with Receipt
Get Payment Details
Capture a Payment
Refund a Payment
Cancel a Payment
Get Payment Event Log
QR Code Payment
Push Message Payment
Payment with Shipping Options
Checkout API
Create a Payment Session (Checkout API)
Create a Payment Session with Builder (Recommended)
Get Session Information
Create a Recurring Agreement
List Agreements
Create a Charge
Capture a Reserved Charge
Refund a Charge
Advanced Usage
Custom HTTP Client
You can provide your own PSR-18 compatible HTTP client:
Custom Logger
Integrate with your PSR-3 compatible logger:
Error Handling
Checkout API Examples
Payment with Logistics Options
Subscription Session
Recurring API Examples
Agreement with Campaign
Variable Amount Agreement
Create Multiple Charges Asynchronously
Login API Examples
OAuth 2.0 / OpenID Connect Flow
App-to-App Flow
For mobile apps, you can use the app-to-app flow to redirect users from your app to the Vipps app and back:
The requestedFlow('app_to_app') parameter tells Vipps to use the app-to-app flow, and appCallbackUri() specifies the deep link URI where the user will be redirected after authenticating in the Vipps app.
Handle OAuth Callback
CIBA Flow (Merchant-Initiated Login)
Get OpenID Configuration
Testing
Running Tests
Code Quality
Integration Tests
Integration tests require valid Vipps test environment credentials. Set these environment variables:
Note: Integration tests are skipped by default if environment variables are not set.
API Documentation
For detailed API documentation, visit:
Support
- Issues: GitHub Issues
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Development Setup
License
This SDK is licensed under the MIT License. See the LICENSE file for details.
Changelog
See CHANGELOG.md for version history.
All versions of vipps with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/log Version ^3.0