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.
Omnipay is installed via Composer. To install, simply require league/omnipay
and empatix/omnipay-swedbank
with Composer:
composer require league/omnipay empatix/omnipay-swedbank
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
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();
}
$response = $gateway->completePurchase(['transactionReference' => $transactionReference])->send();
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.
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.