# openpay/magento2-cards

> Credit card payment integration for Magento 2

`composer require openpay/magento2-cards`

Canonical URL: https://packagento.com/openpay/magento2-cards

## At a glance

- **Vendor**: openpay (https://packagento.com/openpay.md)
- **Latest version**: 3.5.15 — released 2025-09-24
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/openpay/magento2-cards and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require openpay/magento2-cards:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Credit card payment integration for Magento 2

## README

Extensión de pagos con tarjeta de crédito de Openpay para Magento2 (v2.4.2)


### Instalación

Ir a la carpeta raíz del proyecto de Magento y seguir los siguiente pasos:

```bash    
composer require openpay/magento2-cards:3.5.*
php bin/magento module:enable Openpay_Cards --clear-static-content
php bin/magento setup:upgrade
php bin/magento cache:clean
```


### Actualización
En caso de ya contar con el módulo instalado y sea necesario actualizar, seguir los siguientes pasos:

```bash
composer clear-cache
composer update openpay/magento2-cards
bin/magento setup:upgrade
php bin/magento cache:clean
```

### Screenshots


#### 1. Administración. Configuración del módulo

Para configurar el módulo desde el panel de administración de la tienda diríjase a: Stores > Configuration > Sales > Payment Methods > Openpay

##### Características

- Procesar cargos de forma **Directa**, a través de **3D Secure** y con **Autenticación Selectiva**.
- Configuración de **cargo inmediatos** o si serán únicamente **pre-autorizaciones**.
- Pago con puntos (solo si la tarjeta cuenta con esta característica).
- Permitir a los clientes guardar su tarjeta para futuras transacciones (se requiere que el cliente tenga una cuenta en la tienda).
- Ofrecer meses sin intereses ([revisar condiciones y comisiones](https://mage2.pro/t/755)).
- Limitar las tarjetas soportadas.

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/configuracion_tarjetas.png)

#### 2. Tienda. Pago utilizando una nueva tarjeta

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/checkout_sencillo.png)

#### 3. Tienda. Pago utilizando una tarjeta guardada

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/checkout_tarjeta_guardada.png)

#### 4. Administración. Pre-autorizaciones

Cuando se tiene habilitada la opción de pre-autorizaciones, el monto de la transacción le será congelado al cliente en su tarjeta en espera de que el administrador de la tienda haga efectivo el cargo.

El detalle de una compra que haya sido únicamente pre-autorizada se mostrará con adeudo y un monto  por pagar del total de la cuenta, tal como se muestra en la imagen siguiente:

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/preautorizacion_1.png)

Para hacer efectivo el cargo a la tarjeta el administrador deberá "facturar" la compra:
- Ingresar al detalle de la orden de compra
- Ir a la sección Factura (Invoice)
- Al final de la pantalla capturar el pago

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/preautorizacion_2.png)

Una vez realizado esto, el cobro será realizado a la tarjeta relacionada a la compra. 

**NOTA: Importante considerar los siguientes puntos:**
- Si el cargo no se ha hecho efectivo en los 7 días subsecuentes de la compra, el monto congelado en la tarjeta será liberado y no será posible aplicar el cobro.
- Cuando se genere la factura, es necesario seleccionar **"Capture Online"**.

#### 4. Administración. Reembolsos

Para efectuar un reembolso será necesario:
- Ingresar al detalle de la orden de compra
- Ir a la sección de **Facturas** (Invoices) e ingresar a su detalle
- Generar una **Nota de Crédito** (Credit Memo)
- Ingresar el monto a reemnolsar y ejecutar la acción

![](https://s3.amazonaws.com/openpay-plugins-screenshots/magento2/reembolso.png)

## Recent Versions

| Version | Released |
|---|---|
| 3.5.15 | 2025-09-24 |
| 3.5.14 | 2025-08-12 |
| 3.5.13 | 2025-01-29 |
| 3.5.12 | 2024-12-19 |
| 3.5.11 | 2024-10-28 |
| 3.5.10 | 2024-09-26 |
| 3.5.9 | 2024-08-28 |
| 3.5.8 | 2024-08-19 |
| 3.5.7 | 2024-08-09 |
| 3.5.6 | 2024-08-08 |

Showing 10 of 99 versions. Full release history on https://packagento.com/openpay/magento2-cards.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| openpay/sdk | 3.1.* |

## Quality

Latest release (3.5.15) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 998 | 27 errors, 971 warnings (ruleset: Magento2) — 675 auto-fixable with phpcbf |
| PHPMD | Warning | 54 | 54 rule violations (MissingImport:25, CyclomaticComplexity:6, NPathComplexity:6, ExcessiveMethodLength:4, UnusedLocalVariable:4) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 77 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 87 | 87 | – | – |
| 2.4.8 | – | 88 | 89 | – |
| 2.4.9 | – | – | 89 | 89 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["openpay/magento2-cards"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

openpay is a Magento 2 vendor on Packagento. See https://packagento.com/openpay.md for their full catalogue.

