Download the PHP package mrdulal/laravel-vipps without Composer

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

Laravel MobilePay Vipps Package

Latest Version on Packagist Total Downloads License PHP Version Require Laravel Support Tests

A comprehensive Laravel package for MobilePay Vipps payment integration with support for all major Vipps payment methods. This package provides a clean, modern API for integrating with the Vipps MobilePay payment platform used across Norway, Denmark, and Finland.

โš ๏ธ Important Notice: This is an unofficial package and is not affiliated with, endorsed by, or officially supported by MobilePay or Vipps. This package is developed independently by a solo developer for Laravel developers. For official MobilePay Vipps integration documentation, please visit the Vipps Developer Portal.

๐ŸŽฏ Features

Payment Methods

Management & Operations

Developer Experience

๐ŸŒ Countries Supported

Country Service Market Penetration Users
๐Ÿ‡ณ๐Ÿ‡ด Norway Vipps 77% population 4.2M users
๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark MobilePay 75% population 4.4M users
๐Ÿ‡ซ๐Ÿ‡ฎ Finland MobilePay 50% population 2.8M users

Total Market Reach: 11+ million active users across Nordic countries

๐Ÿ“‹ Requirements

Requirement Version Notes
PHP 8.1+ Uses modern PHP features like enums, readonly properties
Laravel 9.0+ Compatible with Laravel 9, 10, 11, and 12
Guzzle HTTP 7.0+ For API communication
ext-json * JSON processing
ext-openssl * SSL/TLS support for API calls

Development Requirements

๐Ÿš€ Installation

1. Install via Composer

From Packagist (Recommended)

From GitHub Packages (Alternative)

See GitHub Packages Installation Guide for detailed instructions on installing from GitHub Packages.

2. Publish Configuration

3. Run Migrations

This will create the following tables:

4. Laravel Auto-Discovery

The package uses Laravel's auto-discovery feature. The service provider and facade will be registered automatically.

Manual Registration (if needed):

โš™๏ธ Configuration

Environment Variables

Add your Vipps credentials to your .env file:

Configuration File

The package configuration is located at config/vipps.php. Key sections include:

๐Ÿ Getting Started

1. Get Vipps MobilePay Account Keys

Step-by-Step Account Setup:

  1. Sign up at Vipps MobilePay Portal
  2. Wait for approval (1-2 days) - you'll receive login details via email
  3. Access Developer Portal:
    • Login to Vipps MobilePay Business Portal
    • Navigate to "Developer" tab
    • Select "Test Keys" for development or "Production Keys" for live environment
  4. Retrieve Credentials:
    • Merchant Serial Number (MSN) - 6-digit number displayed prominently
    • Client ID - Click "Show keys" to reveal
    • Client Secret - Click "Show keys" to reveal
    • Subscription Key - Listed as "Ocp-Apim-Subscription-Key"

Test vs Production

Environment Purpose API Endpoint Features
Test Development & Testing https://apitest.vipps.no Full API access, test cards
Production Live transactions https://api.vipps.no Real payments, KYC required

2. Webhook Setup

Vipps requires a webhook endpoint for payment status updates:

Register your webhook URL in the Vipps portal:

3. Basic Usage

ePayment (Standard Payment)

Express Checkout

Recurring Payments

๐Ÿ“š API Reference

Services Overview

Service Purpose Key Methods
ePayment Standard payments create(), capture(), refund(), cancel()
Express Quick checkout create(), generateQrCode(), createShareableLink()
Checkout Full checkout flow create(), updateSession(), getPaymentDetails()
Recurring Subscriptions createAgreement(), createCharge(), stopAgreement()
OrderManagement Payment operations capture(), refund(), cancel(), getPaymentHistory()
Webhook Event handling handleWebhook(), verifySignature()

ePayment Service

Create Payment

Capture Payment

Refund Payment

Express Service

Generate QR Code

Create Shareable Link

Recurring Service

Create Agreement

Order Management Service

Get Payment History

Send Receipt

๐Ÿ”— Webhook Handling

Setup Webhook Route

Event Listeners

Event Listener Example

Webhook Security

The package automatically verifies webhook signatures using HMAC-SHA256:

๐ŸŽญ Events

The package fires Laravel events for all major payment actions:

Event Trigger Payload
PaymentCreated Payment initiated orderId, webhook payload
PaymentCompleted Payment authorized/completed orderId, webhook payload
PaymentCancelled Payment cancelled orderId, webhook payload
PaymentCaptured Payment captured orderId, webhook payload
PaymentRefunded Payment refunded orderId, webhook payload
RecurringAgreementCreated Recurring agreement created agreementId, webhook payload
RecurringChargeCreated Recurring charge created chargeId, webhook payload

Custom Event Handling

๐Ÿงช Testing

Running Tests

Writing Tests

The package provides a comprehensive test suite. Here's how to test your Vipps integration:

Mock Vipps Responses

Test Webhook Handling

Test Environment Configuration

๐Ÿ› ๏ธ Advanced Configuration

Complete Configuration Options

๐ŸŽฏ Order Management & Payment Lifecycle

Payment States & Transitions

Comprehensive Order Management

Payment Reservations & Timeouts

Payment Method Reservation Period Auto-Cancel
Vipps 180 days Yes
MobilePay 14 days Yes
Credit Card (via Checkout) 7 days Yes

โš ๏ธ Important: Capture payments before the reservation expires to avoid automatic cancellation.

โš ๏ธ Error Handling & Troubleshooting

Exception Hierarchy

Comprehensive Error Handling

Common Error Scenarios

1. Authentication Errors

2. Validation Errors

3. Order ID Conflicts

Debugging Tools

Enable Logging

View Logs

Test API Connectivity

Production Checklist

Common Issues & Solutions

Issue Cause Solution
"Access denied" Wrong credentials Verify API keys in Vipps portal
"Invalid amount" Amount < 100 รธre Ensure minimum 1.00 NOK (100 รธre)
"Order ID exists" Duplicate order ID Use unique order identifiers
"Webhook failed" Invalid signature Check webhook secret configuration
"Payment expired" Not captured in time Capture within reservation period
"Merchant not found" Wrong MSN Verify Merchant Serial Number

๐ŸŽจ Frontend Integration

Express Checkout Button

The package includes a pre-built Blade component for express checkout:

Custom Frontend Implementation

React/Vue.js Integration

๐Ÿš€ Deployment Guide

Environment Setup

Production Environment Variables

Server Requirements

Docker Deployment

Load Balancer Configuration

Monitoring & Alerting

๐Ÿ“Š Performance Optimization

Caching Strategy

Queue Configuration

Database Optimization

๐Ÿ“š Resources & References

Official Documentation

Laravel Resources

Community & Support

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on:

Quick Contribution Guide

๐Ÿ”’ Security

Reporting Security Vulnerabilities

Please DO NOT report security vulnerabilities through public GitHub issues. Instead:

  1. Email security issues to: [email protected]
  2. Include detailed information about the vulnerability
  3. Allow reasonable time for response before public disclosure

Security Best Practices

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.

๐Ÿ† Credits

Core Contributors

Acknowledgments


**โญ Star this repository if it helped you!** [Report Bug](https://github.com/mrdulal/laravel-vipps/issues) โ€ข [Request Feature](https://github.com/mrdulal/laravel-vipps/issues) โ€ข [Documentation](https://github.com/mrdulal/laravel-vipps/wiki)

All versions of laravel-vipps with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/config Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/routing Version ^9.0|^10.0|^11.0|^12.0
illuminate/validation Version ^9.0|^10.0|^11.0|^12.0
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 mrdulal/laravel-vipps contains the following files

Loading the files please wait ...