2017 © Pedro Peláez
 

library sbanken-bundle

image

pkj/sbanken-bundle

  • Thursday, January 25, 2018
  • by peec
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PkjSbankenBundle for Symfony

Create symfony based php apps with integration to Sbanken., (*1)

Uses https://github.com/peec/sbanken library. See that for docs of usage., (*2)

Install

Add to parameters.yml.dist:, (*3)

parameters:
    #.......
    sbanken_client_id: ~
    sbanken_client_secret: ~
    sbanken_customer_id: ~

Add to config.yml:, (*4)

pkj_sbanken:
    client_id: '%sbanken_client_id%'
    client_secret: '%sbanken_client_secret%'
    customer_id: '%sbanken_customer_id%'

Add to AppKernel.php:, (*5)

    new Pkj\Bundle\SbankenBundle\PkjSbankenBundle()

Run composer require, (*6)

composer require pkj/sbanken-bundle:^1.0

You will be asked to fill in client_id, client_secret and customer_id. Get these from sbanken website. (customer_id is your person number)., (*7)

Usage

This bundle exposes a new service pkj_sbanken.client which you have access to getApi()., (*8)

// Example, this can be run from controllers:

$bankAccountNumber = 11111111111;
$transactionRequest = new TransactionListRequest($bankAccountNumber);

$api = $transactions = $this->get('pkj_sbanken.client')->getApi();
$api->authorize();
$transactions = $api->Transactions()->getList($transactionRequest);
var_dump($transactions);
exit;

The Versions

25/01 2018

dev-master

9999999-dev

  Sources   Download

The Requires

 

25/01 2018

1.0.0

1.0.0.0

  Sources   Download

The Requires