Skip to content

BankID Wrapper writen in PHP. Production ready composer package for BankID Web service API. Supports BankID API version 6.0.

License

Notifications You must be signed in to change notification settings

hajarrashidi/bankid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BankID

Packagist.org

https://packagist.org/packages/hajarrashidi/bankid

composer require hajarrashidi/bankid

Description:

PHP Composer package for BankID, supports v6.0 with QR and App link support.

  • BankID v6.0 production
  • BankID v6.0 development

Requirements:

  • /auth
  • /collect
  • /cancel
  • /sign
  • /phone/auth
  • /phone/sign

Helper methods:

  • QR-code generator
  • App-link generator

Code example:

<?php
// If you don't have Composer autoload
require_once __DIR__ . '/vendor/autoload.php';

use BankID\v_6_0\Bankid_6_0_dev;

$bankid = new Bankid_6_0_dev([
    'verify' => false,
    'headers' => [
        'Content-Type' => 'application/json',
    ],
    'cert' => __DIR__ . '/bankid_test_cert.pem'
]);

$response = $bankid->auth([ 'endUserIp' => "127.0.0.1" ]);
//$response = $bankid->sign([ 'endUserIp' => "127.0.0.1", 'userVisibleData' => base64_encode("hello") ]);
//$response = $bankid->phoneSign([ 'personalNumber' => "111122334444", "userVisibleData" => base64_encode("hello"), "callInitiator" => "user"]);
//$response = $bankid->phoneAuth([ 'personalNumber' => "111122334444", "callInitiator" => "user"]);

var_dump($response);

financial support:

Github Sponsor

Patreon

About

BankID Wrapper writen in PHP. Production ready composer package for BankID Web service API. Supports BankID API version 6.0.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages