SEB banklink (pangalink) specifics

Recently I wrote about Banklink(Pangalink) payment configuration with php. I want to add some specifics on SEB iPizza implementation.

Here is the working code for generating request to SEB

   $value) {
	$value_len = strlen($value);
	if (strlen($value_len) < 3) {
		while (strlen($value_len) < 3) {
			$value_len = '0'.$value_len;
	$mac_pre = $value_len.$value.$mac_pre;

$fp = fopen('../pangalink/keys/privkey.pem', 'r');
$private_key = fread($fp, 8192);
$private_key_id = openssl_get_privatekey($private_key, '');

openssl_sign($mac_pre, $mac, $private_key_id);
$mac = base64_encode($mac);

$VK_a['VK_MAC'] = $mac; // Digital signature. See further how to generate it.

$VK_a['VK_ACC'] = 123456787996; // Company bank account
$VK_a['VK_NAME'] = "Company OÜ"; // Company name

$url=''; //the domain should be the same as specified while signing the agreement
$VK_a['VK_RETURN'] = $url. '/pangalink/vk_return.php; // page, there bank will return in case of successful payment.
$VK_a['VK_CANCEL'] = $url. '/pangalink/vk_return.php; // page, there bank will return in case of payment cancellation. If it is the same page as  VK_RETURN, you can leave it blank.
$VK_a['VK_LANG'] = 'EST'; // Preferred Invoice language
$VK_value) { print ''; } ?>

NOTE: I used in FORM tag attribute enctype=”multipart/form-data”. Request to SEB permanently returns error 500. Support team confirmed, that this issue is on their side and they are going to fix it in nearest future. So, just do not use this attribute in your FORM tag.

1 comment

  1. You can use website to purchase Banklinks for most popupar open source systems such as Magento, Prestashop, WP-e-Commerce plugin.
    Price is very reasonable and also there are banklinks available for Latvia and Lithuania.

Leave a Reply

%d bloggers like this: