LokiCheckout_Katapult
This Magento 2 module is an add-on package to the LokiCheckout.
It adds the Katapult lease-to-own payment method (katapult) to the Loki Checkout. It is a
standalone implementation of the Katapult JavaScript plugin and the Katapult API v3, and replaces the legacy
katapult/module-katapult-gateway (Magento 2.3) module, which must not be installed at the same time.
How it works
- When the shopper clicks Place Order, the module reserves the order number and opens the Katapult checkout modal
(
katapult.checkout.set()+katapult.checkout.load()) with the billing/shipping address, the items (with theleasableflag), shipping and discounts. The reserved order number is sent ascheckout.customer_id. - The modal reports the result via
postMessage. Messages from other origins than the configured Katapult domain are ignored. - The server verifies the result with the Katapult Sync API (
POST /api/v3/application/sync/) and only accepts the lease when Katapult returns the sameuidfor the reserved order number. The order is blocked when the lease is not verified, or when the grand total changed after the verification. - After the order is placed, the order is confirmed with Katapult (
confirm_order). A failed confirmation is logged and added as an order comment, but does not cancel the order. - Online credit memos cancel the refunded items with Katapult (
cancel_item). Voiding or cancelling an order cancels the Katapult order (cancel_order). - Cancelling within Katapult returns the shopper to the checkout with a notice.
- Optionally, a Get pre-approved button is shown above the checkout steps (
katapult.preapprove()).
Configuration
Stores > Configuration > Sales > Payment Methods > Katapult (Loki Checkout):
- Enabled, Title, Instructions
- Test Mode: uses the Test Domain (
sandbox.katapult.com) and the test tokens - Live/Test Public Token and Live/Test Private Token (supplied by Katapult, stored encrypted)
- Live Domain / Test Domain: hostname only
- Minimum Leasable Amount: the total of the leasable items (including tax, minus discounts) must reach this amount
- Payment Action: Authorize and Capture (default, creates a paid invoice) or Authorize Only
- Show Pre-Approval Button
- Payment from Applicable Countries: defaults to the US only
- Debug Logging: logs API requests to
var/log/loki_checkout_katapult.log(tokens are never logged)
Katapult is only available for quotes in USD. Products can be excluded from the lease with the product attribute
Leasable with Katapult (katapult_payment_leasable, default Yes).
Installation
Install this package via composer:
composer require loki-checkout/magento2-katapult
Next, enable this module:
bin/magento module:enable LokiCheckout_Katapult
Current status
@dev
to the composer command.
Support
For getting support, create an Issue under the following project URL:
https://gitlab.loki-extensions.com/loki-checkout/LokiCheckout_Katapult.git
Configuration Options
The following options of this module can be configured via the Store Configuration:
payment/katapult/active
payment/katapult/title
payment/katapult/instructions
payment/katapult/test_mode
payment/katapult/live_public_token
payment/katapult/live_private_token
payment/katapult/test_public_token
payment/katapult/test_private_token
payment/katapult/js_domain_live
payment/katapult/js_domain_test
payment/katapult/minimum_amount
payment/katapult/payment_action
payment/katapult/show_preapproval
payment/katapult/allowspecific
payment/katapult/specificcountry
payment/katapult/debug
payment/katapult/sort_order
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout.payment.methods.katapult.form
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Magento_AdminNotification
Magento_Backend
Magento_Catalog
Magento_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Cms
Magento_Config
Magento_Csp
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Indexer
Magento_MediaGalleryUiApi
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Rule
Magento_Sales
Magento_SalesRule
Magento_SalesSequence
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Theme
Magento_Ui
Magento_User
Magento_Variable
Magento_Vault
Magento_Widget
Yireo_CspUtilities
Composer details
LokiCheckout_Katapultloki-checkout/magento2-katapult
ext-json: *
ext-mbstring: *
ext-pcre: *
loki-checkout/magento2-core: ^2.8
loki/magento2-components: ^2.8
loki/magento2-css-utils: ^1.0
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-catalog: ^104.0
magento/module-checkout: ^100.4
magento/module-config: ^101.2
magento/module-directory: ^100.4
magento/module-eav: ^102.1
magento/module-payment: ^100.4
magento/module-quote: ^101.2
magento/module-sales: ^103.0
magento/module-store: ^101.1
monolog/monolog: ^2.0 | ^3.0
php: >=8.2 <8.6
psr/log: ^1.0 | ^2.0 | ^3.0