Magento Plugin

Magento 2 Extension

Accept SagaPay payments in your Magento 2 store with our official extension.

Requirements

  • Magento 2.4.0 or higher
  • PHP 7.4 or higher (8.1+ recommended)
  • Composer
  • SSL certificate (HTTPS)
  • SagaPay merchant account

Download

Something went wrong!

Installation

$# Navigate to your Magento root directory
>cd /path/to/magento
>
># Extract the module
>unzip sagapay-magento-1.1.0.zip -d app/code/
>
># Enable the module
>bin/magento module:enable SagaPay_Payment
>
># Run setup upgrade
>bin/magento setup:upgrade
>
># Compile DI
>bin/magento setup:di:compile
>
># Deploy static content (production mode)
>bin/magento setup:static-content:deploy -f
>
># Clear cache
>bin/magento cache:clean

Method 2: Manual Installation

  1. Extract the ZIP file
  2. Create directory: app/code/SagaPay/Payment/
  3. Copy all files to that directory
  4. Run the commands above starting from bin/magento module:enable

Configuration

  1. Log in to Magento Admin
  2. Go to StoresConfigurationSalesPayment Methods
  3. Expand the SagaPay section
  4. Configure settings:

General Settings

FieldDescription
EnabledEnable/disable SagaPay
TitleDisplay title at checkout
API KeyYour SagaPay API key
API SecretYour SagaPay API secret
Merchant IDYour merchant identifier
Store IDYour store identifier
EnvironmentSandbox or Production
Debug ModeLog detailed information

Payment Methods

Enable and configure individual payment methods:

  • Card Payments: Visa, Mastercard, Amex
  • Vipps: Norwegian mobile payments
  • Klarna: Buy now, pay later
  • Invoice: Invoice payments

Order Settings

FieldDescription
Payment ActionAuthorize or Authorize & Capture
New Order StatusStatus for new orders
Sort OrderDisplay order at checkout

Multi-Store Configuration

SagaPay supports Magento multi-store setups. Configure different credentials per store view:

  1. Switch to the specific store view scope
  2. Uncheck “Use Default” for settings to override
  3. Enter store-specific credentials

Refunds

Process refunds from the Magento admin:

  1. Open the order
  2. Go to Invoices tab
  3. Click on the invoice
  4. Click Credit Memo
  5. Select items/enter amount
  6. Click Refund

Online refunds will be processed automatically through SagaPay. Offline refunds only update Magento.

Webhooks

Configure webhook URL in SagaPay dashboard:

https://your-store.com/sagapay/webhook/notify

Troubleshooting

$bin/magento module:status SagaPay_Payment
>bin/magento setup:upgrade
>bin/magento cache:flush
  1. Verify credentials in configuration
  2. Check if the payment method is enabled
  3. Verify country/currency settings match
  4. Check var/log/sagapay.log for errors
$rm -rf generated/code/*
>rm -rf var/cache/*
>bin/magento setup:di:compile

Logs

SagaPay logs are stored in:

  • var/log/sagapay.log - General logs
  • var/log/sagapay_debug.log - Debug logs (when enabled)

Changelog

Version 1.1.0

  • Added Vipps and Klarna support
  • Improved multi-store handling
  • Fixed partial refund issues

Version 1.0.0

  • Initial release
  • Card payments support
  • Basic refund functionality

Support

Need help? Contact us: