dev-master
9999999-dev https://github.com/sauladam/omnipay-barzahlenBarzahlen driver for the Omnipay payment processing library
MIT
The Requires
The Development Requires
by Saulius Adamonis
payment omnipay barzahlen
Wallogit.com
2017 © Pedro Peláez
Barzahlen driver for the Omnipay payment processing library
Barzahlen driver for the Omnipay PHP payment processing library, (*1)
This is non-official Omnipay-driver for the German payment gateway provider Barzahlen. In order to use it the Omnipay-Framework is required., (*3)
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements barzahlen support for Omnipay., (*4)
This package is installed via Composer. To install, simply add it
to your composer.json file:, (*5)
{
"require": {
"sauladam/omnipay-barzahlen": "dev-master"
}
}
And run composer to update your dependencies:, (*6)
$ curl -s http://getcomposer.org/installer | php $ php composer.phar update
The following gateways are provided by this package:, (*7)
For general usage instructions, please see the main Omnipay repository., (*8)
Basically it's pretty straight forward:, (*9)
require 'vendor/autoload.php';
use Omnipay\Omnipay;
$gateway = Omnipay::create('Barzahlen');
// Testmode is on by default until you explicitly switch it off.
// You can either do this here on the gateway level or for each request.
$gateway->setTestMode(false);
$gateway->setShopId('yourShopid');
$gateway->setPaymentKey('yourPaymentKey');
$request = $gateway->purchase(
array(
'currency' => 'EUR',
// Amounts higher than 999.99 will not be accepted
'amount' => '111.59',
// The order_id is not mandatory, you can set
// it later in another request if you want.
'orderId' => '123456',
'customerDetails' => array(
'email' => 'test@test.com',
'street_nr' => 'Testsreet 10a',
'zipcode' => '12345',
'city' => 'Test City',
'country' => 'DE',
),
// If you want to pass in any custom vars (not mandatory),
// make sure you pass them in the right order
'customVars' => array(
'some var 0',
'some var 1',
),
)
);
$response = $request->send();
if ($response->isSuccessful() && $response->isVerified())
{
$transactionId = $response->getTransactionReference();
}
All the other Requests work accordingly:, (*10)
$request = $gateway->update(array(
'transactionId' => $transactionId,
'orderId' => 'n3w0rd3r1d',
));
$request = $gateway->resendEmail(array(
'transactionId' => $transactionId,
'language' => 'de', // not mandatory
));
$request = $gateway->void(array(
'transactionId' => $transactionId,
'language' => 'de', // not mandatory
));
$request = $gateway->refund(array(
'transactionId' => $transactionId,
'amount' => '20.00',
'currency' => 'EUR',
'language' => 'de', // not mandatory
));
You can find a really great API documentation at https://integration.barzahlen.de/de/api, (*11)
Please note that this is not the official API implementation! You can find officially supportet Barzahlen API libraries at https://integration.barzahlen.de/de/api/api-bibliotheken, (*12)
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., (*13)
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., (*14)
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., (*15)
Barzahlen driver for the Omnipay payment processing library
MIT
payment omnipay barzahlen