Download the PHP package ownpay/ownpay-laravel without Composer

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

OwnPay Laravel SDK

Latest Version on Packagist Total Downloads License

Official Laravel SDK for the OwnPay payment gateway platform. This package provides a clean, fluent interface for integrating OwnPay payments into your Laravel application.

Features

Requirements

Installation

Install the package via Composer:

The package will automatically register its service provider and facade.

Publish Configuration

Publish the configuration file:

This will create config/ownpay.php in your application.

Publish Migrations (Optional)

If you want to log webhooks to a database table:

Configuration

Add the following environment variables to your .env file:

Configuration Options

Option Default Description
api_key null Your OwnPay API key (starts with op_)
webhook_secret null Webhook signing secret for verification
base_url https://pay.ownpay.org Your OwnPay instance URL
timeout 30 Request timeout in seconds
retry_attempts 3 Number of retry attempts for failed requests
retry_delay 100 Base delay in milliseconds between retries
verify_ssl true Whether to verify SSL certificates
log_channel null Log channel for SDK logging
cache_ttl 0 Cache TTL in seconds (0 to disable)

Usage

Using the Facade

Using Dependency Injection

Payment Flow

Webhook Handling

Setup Webhook Route

The package automatically registers a webhook route at /webhooks/ownpay. You can customize this in your routes:

Listen for Webhook Events

Create an event listener in your EventServiceProvider:

Example Listener

Transaction Management

Customer Management

API Key Management

Error Handling

The package provides a comprehensive exception hierarchy:

Value Objects

The package uses type-safe value objects:

Money

Status Enums

Testing

Running Tests

Mocking HTTP Calls

Verifying Webhooks in Tests

Artisan Commands

Test Connection

Verify Webhook

Security

API Key Security

Webhook Verification

All incoming webhooks are verified using HMAC-SHA256 signatures:

Best Practices

  1. Never commit API keys to version control
  2. Use HTTPS for all API communication
  3. Verify webhook signatures before processing
  4. Implement idempotency for critical operations
  5. Handle rate limits gracefully with retry logic
  6. Log all payment events for audit trail

API Reference

Payments

Method Description
createPayment(array $data) Create a new payment intent
getPayment(string $id) Get payment by ID

Transactions

Method Description
listTransactions(array $params) List transactions with filters
getTransaction(string $id) Get transaction by ID

Refunds

Method Description
createRefund(array $data) Create a refund
listRefunds(array $params) List refunds with filters
getRefund(string $id) Get refund by transaction ID

Customers

Method Description
createCustomer(array $data) Create a customer
listCustomers(array $params) List customers
getCustomer(string $id) Get customer by email or phone

Webhooks

Method Description
testWebhook() Test webhook endpoint
listWebhookDeliveries() List webhook deliveries

API Keys

Method Description
listApiKeys() List API keys
generateApiKey(array $params) Generate new API key
revokeApiKey(int $id) Revoke API key

Health

Method Description
health() Check API health status

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover a security vulnerability, please email [email protected]. All security vulnerabilities will be promptly addressed.

License

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


All versions of ownpay-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-bcmath Version *
ext-hash Version *
ext-json Version *
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/config Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
psr/log Version ^3.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 ownpay/ownpay-laravel contains the following files

Loading the files please wait ...