# creditkey/b2bgateway

> Credit Key integration with payment gateway

`composer require creditkey/b2bgateway`

Canonical URL: https://packagento.com/creditkey/b2bgateway

## At a glance

- **Vendor**: creditkey (https://packagento.com/creditkey.md)
- **Latest version**: 1.0.72 — released 2026-05-21
- **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/creditkey/b2bgateway 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 creditkey/b2bgateway:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Credit Key integration with payment gateway

## README

### Installation

From your root Magento directory, run the following command:

```
% composer require creditkey/b2bgateway
```

Then enable the module with the following commands:
```
% php bin/magento module:enable CreditKey_B2BGateway
% php bin/magento setup:upgrade
```

### Configuration

From the Magento admin, navigate to ```Stores > Configuration > Sales > Payment Methods``` and scroll down to the ```Credit Key (Gateway)``` section.

The `Marketing Content on Product Pages` section allows you to enable the Credit Key marketing content to be displayed on the selected product detail pages. You can enable/disable this feature globally, select the specific categories to allow the content to be displayed on the products belonging to said categories, and select the style of the displayed content.

Payment Action can be set to ```Authorize``` or ```Authorize and Capture```. ```Authorize and Capture``` will create an invoice when an order is created. ```Authorize``` will not create an invoice when an order is created.
### Customization

To move the location of the marketing display on the product details page you will need to modify the file `catalog_product_view.xml` from your active theme. This will most likely be located at `{magento_root}/app/design/frontend/{YourCompany}/{theme-name}/Magento_Catalog/layout/catalog_product_view.xml`. 

In this file you would simply use the `<move>` element to move our block, named `product.info.creditkey.marketing`, to the new location. For example, if you wanted it to be just below the "Add to Cart" button it would look something like the following where `element` is the name of our block, `destination` is the name of the container you are moving it into, and `after` is the name of the block or container it will go after. This could instead be `before` if you want to place it before a specific block/container.

    <?xml version="1.0"?>
    <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <move element="product.info.creditkey.marketing" 
                    destination="product.info.form.content" 
                    after="product.info.addtocart"/>
        </body>
    </page>

To see the available containers you can use reference Magento's primary `catalog_product_view.xml` file, located at `vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml`.

## Recent Versions

| Version | Released |
|---|---|
| 1.0.72 | 2026-05-21 |
| 1.0.71 | 2025-09-17 |
| 1.0.69 | 2025-06-06 |
| 1.0.68 | 2025-05-16 |
| 1.0.66 | 2025-04-08 |
| 1.0.65 | 2024-08-20 |
| 1.0.64 | 2023-12-26 |
| 1.0.63 | 2023-01-10 |
| 1.0.62 | 2022-09-30 |
| 1.0.61 | 2022-09-12 |

Showing 10 of 67 versions. Full release history on https://packagento.com/creditkey/b2bgateway.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| creditkey/creditkey-php | >=1.0.7 |
| magento/framework | >=101.0.0 |
| magento/module-checkout | >=100.2.0 |
| magento/module-payment | >=100.2.0 |
| magento/module-sales | >=101.0.0 |

## Quality

Latest release (1.0.72) 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 | 1 |


### 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 | Warning | 28 | 28 warnings (ruleset: Magento2) |
| PHPMD | Warning | 15 | 15 rule violations (UnusedLocalVariable:5, MissingImport:4, NPathComplexity:2, ExcessiveMethodLength:2, ExcessiveParameterList:1) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 68 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 7 | valid; 7 advisory notes (composer validate --strict) |

#### 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 | 33 | 33 | – | – |
| 2.4.8 | – | 33 | 33 | – |
| 2.4.9 | – | – | 33 | 34 |


### 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=["creditkey/b2bgateway"],
  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

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

