Download the PHP package cafali-com/laravel-openpay without Composer

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

Laravel OpenPay

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for integrating with the OpenPay (BBVA) payment gateway. Supports card payments, SPEI bank transfers, Paynet cash payments, subscriptions, payouts, and webhooks.

Installation

Publish the config:

Add your credentials to .env:

Usage

Facade

Card Charges

Paynet (Cash at Convenience Stores)

SPEI (Bank Transfers)

Customers

Cards

Subscriptions

Payouts

Refunds

Billable Trait

Add the Billable trait to your User (or any model) for convenient payment methods:

Add the openpay_id column to your model's table:

Then use it:

Webhooks

The package registers a webhook endpoint at POST /openpay/webhooks automatically.

Events

Listen for these events in your EventServiceProvider or with Event::listen():

Event Fired when
WebhookReceived Any valid webhook (always dispatched)
VerificationReceived OpenPay sends a verification event during webhook activation, see Webhook Activation below
ChargeCompleted A charge is completed
ChargeFailed A charge fails
ChargeRefunded A charge is refunded
PayoutCompleted A payout is completed
PayoutFailed A payout fails
SpeiReceived A SPEI transfer is received
SubscriptionChargeFailed A subscription charge fails

Webhook Signature Verification

Set OPENPAY_WEBHOOK_SECRET in your .env to enable signature verification. The middleware will validate the X-Openpay-Webhook-Signature header automatically.

Webhook Activation

OpenPay's webhook activation is a two-step protocol that catches many integrations off guard:

  1. When a webhook is created, OpenPay POSTs to the webhook URL with {"type": "verification", "verification_code": "XXXXXXXX"}. The endpoint must respond with HTTP 200 (this package does that automatically).
  2. The merchant must then paste the verification_code into the OpenPay dashboard's Verify form to activate the webhook. Until this is done, OpenPay marks the webhook as "Sin verificar" and will not deliver any other events.

This package surfaces the verification code through three layers so merchants can find it without grepping log files:

A. The VerificationReceived event, dispatched as soon as the package receives the verification ping:

B. The openpay_webhook_verifications table. A default listener persists every verification code with webhook_id, payload, and a used_at timestamp you can flip once the merchant has pasted the code:

Disable the default listener (e.g., if you only want the event for your own side effects):

C. The openpay:webhook:verifications Artisan command for CLI access:

Pass --all to include codes already marked as used, --limit=N to change the row cap (default 10).

Registering with OpenPay

Register your webhook URL in the OpenPay dashboard or via the API:

Client-Side Tokenization (Openpay.js)

For PCI compliance, card data should never touch your server. Use Openpay.js:

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-openpay with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0||^12.0
openpay/sdk Version ^3.1
spatie/laravel-package-tools Version ^1.16
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 cafali-com/laravel-openpay contains the following files

Loading the files please wait ...