empatix/omnipay-swedbank

Swedbank driver for the Omnipay payment processing library

v1.1.0 2023-01-11 14:48 UTC

This package is auto-updated.

Last update: 2024-05-11 18:02:10 UTC


README

Swedbank driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Vipps support for Omnipay.

Latest Version on Packagist Build Status Quality Score Total Downloads

Installation

Omnipay is installed via Composer. To install, simply require league/omnipay and empatix/omnipay-swedbank with Composer:

composer require league/omnipay empatix/omnipay-swedbank

Basic Usage

The following gateways are provided by this package:

  • Swedbank Pay (Card payment instrument)

For general usage instructions, please see the main Omnipay repository and the Swedbank documentation

Initialize gateway, purchase and redirect to Swedbank

use Empatix\OmnipaySwedbank\Gateway;

$gateway = new Gateway();

$gateway->initialize([
    'merchantId' => '',
    'password'   => '',
]);

$response = $gateway->purchase([
    'amount'      => '10.00',
    'currency'    => 'NOK',
    'description' => 'This is a test transaction',
    'returnUrl'   => $fallbackUrl,
    'notifyUrl'   => $callbackPrefix,
])->send();

if ($response->isRedirect()) {
    $response->redirect();
}

Get the transaction details

$response = $gateway->completePurchase(['transactionReference' => $transactionReference])->send();

Out Of Scope

Omnipay does not cover recurring payments or billing agreements, and so those features are not included in this package. Extensions to this gateway are always welcome.

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.