creditkey / b2bgateway
Credit Key integration with payment gateway
Package info
github.com/creditkey/magento2-b2bgateway
Type:magento2-module
pkg:composer/creditkey/b2bgateway
Requires
- php: ~8.2.0||~8.3.0||~8.4.0||~8.5.0
- creditkey/creditkey-php: ^1.0.8
- magento/framework: ^103.0 || ^104.0
- magento/module-catalog: ^104.0 || ^105.0
- magento/module-checkout: ^100.4
- magento/module-customer: ^103.0
- magento/module-payment: ^100.4
- magento/module-quote: ^101.2
- magento/module-sales: ^103.0 || ^104.0
- magento/module-store: ^101.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 1.0.74
- 1.0.72
- 1.0.71
- 1.0.69
- 1.0.68
- 1.0.66
- 1.0.65
- 1.0.64
- 1.0.63
- 1.0.62
- 1.0.61
- 1.0.60
- 1.0.59
- 1.0.58
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.15
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.2
- 1.0.1
- 1.0.0
- 0.9.1
- 0.9.0
- dev-codex/checkout-logo-2026
- dev-codex/pay-by-bank-theme-styles
- dev-codex/bump-version-1.0.74
- dev-codex/pay-by-bank
- dev-update-version-1.0.73
- dev-update/upgrade-insecure-dependency
- dev-CU-86b5w8mrv-upgrade-php-sdk-version
- dev-CU-86b4k581g-fix-redirection-issue
- dev-CU-86b57t5at-csp-whitelist
- dev-CU-86b50eaxm-php82-compatible
- dev-CU-86b4acpfn-extension-submission
- dev-CU-86b412gmb-order-total-update
- dev-CU-86b1cdv8v-php-compatibility-fix
- dev-CU-86b1gdp5m-restrict-payment
- dev-fix/customer-session
- dev-fix/logger
- dev-update/country-selector
- dev-patch/Meetanshi_AutoInvShip
- dev-fix/braintree
- dev-feature/auto_ship
- dev-feature/modal_experience
- dev-patch/aheadworks_onestepcheckout
- dev-aheadworkds-updated
- dev-fix/order_status
- dev-feature/admin_checkout
- dev-bump-module-version-1.0.58
- dev-feature/minimum_price
- dev-bump-module-version-for-auth-and-capture
- dev-feature/auto_invoice
- dev-update-creditkey-js-version-in-admin
- dev-feature/load-sdk-scripts-from-cdn
- dev-feature/cdn_js
- dev-fix/marketplace
- dev-test/redirect
- dev-test/auth
- dev-feature/checkout-css-new-standard
- dev-fix/modal-css2
- dev-fix/modal-css
- dev-fix/redirects
- dev-test/apply
This package is auto-updated.
Last update: 2026-11-12 20:07:47 UTC
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.
Pay by Bank
Requires creditkey/creditkey-php ^1.0.8. In Stores > Configuration > Sales > Payment Methods > Credit Key (Gateway), check Enable Pay by Bank and save. The checkbox defaults to off and supports website/store inheritance.
Checkout displays the bundled Credit Key — BUSINESS Pay Over Time SVG and, when enabled, the Credit Key — BUSINESS Pay by Bank SVG. Each image is the complete payment label: no separate visible title or subtitle is rendered. Descriptive alt text identifies each option to assistive technology. Artwork displays at 24px high with automatic width and fits proportionally within narrow containers; the store theme supplies the radio appearance, borders, padding, and button styling.
Pay by Bank inherits Credit Key's enabled status, minimum checkout price, applicable countries, API eligibility, credentials, checkout mode, payment action, and order-processing commands. It is a storefront method (creditkey_pay_by_bank); the existing CSR method remains separate. Pay by Bank orders retain their method code for capture, refund, shipment, and order-total updates.
The create controller reads the payment method saved on the quote. Only Pay by Bank sends merchant_data: {"pay_now": true}. Standard Credit Key omits merchant data. Availability and eligibility are checked again before starting checkout, including after configuration or cart changes.
This renderer targets standard Magento checkout and includes the existing Aheadworks renderer registration. The separate Hyvä module needs its own renderer for the second payment option.
Regression tests
With an installed Magento environment and PHPUnit 12 available, run:
MAGENTO_ROOT=/path/to/magento /path/to/phpunit --no-configuration --bootstrap Test/Unit/bootstrap.php Test/Unit
Tests cover store-scoped configuration inheritance, both enable flags, minimum boundaries for both methods, eligibility/country rejection, unsupported payment methods, and boolean Pay by Bank metadata. They do not contact the API.
Run the renderer regression tests with Node.js:
node --test Test/Unit/payment-renderer.test.cjs
These cover method switching, modal replacement, delayed cancellation, failed saves, validation, and duplicate clicks. Each successful checkout attempt opens a fresh flow so the JavaScript SDK cannot reuse the previous payment method's hidden modal.
Before release, verify both modal and redirect checkout, returning customers and guests, disabling the checkbox, amounts below/equal to the minimum, cancellation/retry, and completed-order capture/refund in a staging environment. Deploy with the usual Magento dependency-injection compilation, static-content deployment, and cache-clean steps.
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.