Download the PHP package nedarta/yii2-omnipay without Composer

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

Yii 2 Omnipay Extension

Latest Stable Version Total Downloads License

A premium, elegant, and lightweight payment processing integration for the Yii 2 framework, built on top of the powerful Omnipay library. Configure payment gateways as standard Yii 2 components with clean, modern magic delegation.


Features


Installation

Install the package via Composer:

To use specific gateways, you should also require their respective Omnipay drivers:


Configuration

Add the gateway components directly to your application configuration file (usually config/web.php or common/config/main.php):


Usage Examples

1. Stripe Checkout

Because of magic-method delegation, you can call all underlying gateway methods directly on the Yii 2 component (Yii::$app->stripe).


2. PayPal Express Checkout Workflow

PayPal Express requires a redirection to PayPal's checkout page and a secondary step to capture the payment on return.

Step A: Initiate the PayPal Purchase

Step B: Capture and Complete the Purchase


Advanced Usage: Dynamic Reinitialization

In multi-tenant setups, SaaS environments, or instances where merchant credentials must be loaded dynamically from a database at runtime, you can reconfigure components on the fly.

1. Update Parameters Dynamically

To update configuration parameters for the current gateway:

2. Complete Gateway Rebuilding

To reconfigure the entire component dynamically (e.g., swapping gateway drivers, updating test mode flags, and resetting parameters all at once):

[!NOTE] The reinitialize() method uses strict safety validation. Attempting to assign unknown or read-only properties will throw a yii\base\InvalidConfigException immediately to prevent silent typos or configuration bugs in production.


Webhooks & CSRF Validation

When integrating payment gateways, they will send asynchronous payment update notifications via webhooks (e.g. Stripe webhooks or PayPal IPN notifications) as standard HTTP POST requests.

By default, Yii 2 validates CSRF tokens on all POST requests, which will block incoming gateway webhooks with an HTTP 400 Bad Request error. To resolve this, disable CSRF validation for your webhook action inside your payment controller:


Running Tests

This library includes automated unit tests written in PHPUnit. To run tests, use the following command:

Tests are located in the /tests/ directory.


License

This project is licensed under the MIT License - see the LICENCE.md file for details.

Developed with ❤️ by Edgars Karlsons.


All versions of yii2-omnipay with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
yiisoft/yii2 Version ~2.0.0
omnipay/common 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 nedarta/yii2-omnipay contains the following files

Loading the files please wait ...