2017 © Pedro Peláez
 

library omnipay-barzahlen

Barzahlen driver for the Omnipay payment processing library

image

sauladam/omnipay-barzahlen

Barzahlen driver for the Omnipay payment processing library

  • Wednesday, June 3, 2015
  • by sauladam
  • Repository
  • 2 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Omnipay: Barzahlen

Barzahlen driver for the Omnipay PHP payment processing library, (*1)

Build Status Total Downloads, (*2)

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)

Installation

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

Basic Usage

The following gateways are provided by this package:, (*7)

  • Barzahlen

For general usage instructions, please see the main Omnipay repository., (*8)

Basically it's pretty straight forward:, (*9)

Purchase (create a transaction):

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)

Update (update the order-id)

$request = $gateway->update(array(
    'transactionId' => $transactionId,
    'orderId' => 'n3w0rd3r1d',
));

Resend Email (resend the email to the customer)

$request = $gateway->resendEmail(array(
    'transactionId' => $transactionId,
    'language' => 'de', // not mandatory
));

Void (cancel the transaction so the customer will stop receiving payment reminders)

$request = $gateway->void(array(
    'transactionId' => $transactionId,
    'language' => 'de', // not mandatory
));

Refund (give them their money back...)

$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)

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., (*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)

The Versions

03/06 2015

dev-master

9999999-dev https://github.com/sauladam/omnipay-barzahlen

Barzahlen driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Saulius Adamonis

payment omnipay barzahlen