- Notifications
You must be signed in to change notification settings - Fork19
PHP payment library to easily integrate Baltic banklinks (supports old and new iPizza protocol), E-commerce gateaway (Estcard, Nets Estonia), Liisi Payment Link and Pocopay.
License
renekorss/Banklink
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PHP payment library to easily integrate Baltic banklinks, E-commerce gateaway (Estcard, Nets Estonia), Liizi Payment Link and Pocopay.
View API documentation athttps://renekorss.github.io/Banklink/
composer require renekorss/banklink
Country / Provider | Payment | Authentication |
---|---|---|
Estonia | ||
Danskebank | ✅ | ✅ |
Coop Pank | ✅ | ✅ |
LHV | ✅ | ✅ |
SEB | ✅ | ✅ |
Swedbank | ✅ | ✅ |
Luminor | ✅ | ✅ |
Nordea | ✅ | ✅ |
Pocopay | ✅ | does not apply |
Estcard | ✅ | does not apply |
Liisi Payment Link | ✅ | does not apply |
Lithuania | ||
SEB | ✅ | does not apply |
Swedbank | ✅ | does not apply |
Luminor | ✅ | does not apply |
Šiaulių | ✅ | does not apply |
Estcard | ✅ | does not apply |
For more information, please visitWiki. Basic example is below.
SECURITY WARNING
Never keep your private and public keys in publicly accessible folder. Instead place keysunder root folder (usually
public_html
orwww
).If you store keys as strings in database, then they should be accessible only over HTTPS protocol.
<?phprequire__DIR__ .'/vendor/autoload.php';useRKD\Banklink;// Init protocol$protocol =newBanklink\Protocol\IPizza('uid100010',// seller ID (VK_SND_ID)__DIR__ .'/../keys/seb_user_key.pem',// private key'',// private key password, leave empty, if not needed__DIR__ .'/../keys/seb_bank_cert.pem',// public key'http://localhost/banklink/SEB.php'// return url );// Init banklink$seb =newBanklink\EE\SEB($protocol);// Set payment data and get payment request object// orderId, sum, message, language$request =$seb->getPaymentRequest(123453,150,'Test makse','EST');// You can also add custom request data and/or override request data// Optional$request =$seb->getPaymentRequest(123453,150,'Test makse','EST','EUR', ['VK_REF' =>'my_custom_reference_number',// Override reference number'INAPP' =>true// Pocopay specific example ]);?><form method="POST" action="<?phpecho$request->getRequestUrl();?>"><?phpecho$request->getRequestInputs();?> <input type="submit" value="Pay with SEB!" /></form>
<?phprequire__DIR__ .'/vendor/autoload.php';useRKD\Banklink;// Init protocol$protocol =newBanklink\Protocol\IPizza('uid100010',// seller ID (SND ID)__DIR__ .'/../keys/seb_user_key.pem',// private key'',// private key password, leave empty, if not needed__DIR__ .'/../keys/seb_bank_cert.pem',// public key'http://localhost/banklink/SEB.php'// return url );// Init banklink$seb =newBanklink\EE\SEB($protocol);// Get auth request object$request =$seb->getAuthRequest();?><form method="POST" action="<?phpecho$request->getRequestUrl();?>"><?phpecho$request->getRequestInputs();?> <input type="submit" value="Authenticate with SEB!" /></form>
<?phprequire__DIR__ .'/vendor/autoload.php';useRKD\Banklink;// Init protocol$protocol =newBanklink\Protocol\IPizza('uid100010',// seller ID (SND ID)__DIR__ .'/../keys/seb_user_key.pem',// private key'',// private key password, leave empty, if not needed__DIR__ .'/../keys/seb_bank_cert.pem',// public key'http://localhost/banklink/SEB.php'// return url );// Init banklink$seb =newBanklink\EE\SEB($protocol);// Get response object$response =$seb->handleResponse($_POST);// Successfulif ($response->wasSuccessful()) {// Get whole array of response$responseData =$response->getResponseData();// User prefered language$language =$response->getLanguage();// Only for payment data$orderId =$response->getOrderId();$sum =$response->getSum();$currency =$response->getCurrency();$sender =$response->getSender();$transactionId =$response->getTransactionId();$transactionDate =$response->getTransactionDate();$message =$response->getMessage();$automatic =$response->isAutomatic();// true if response was sent automatically by bank// Only for auth data$userId =$response->getUserId();// Person ID$userName =$response->getUserName();// Person name$country =$response->getUserCountry();// Person country$authDate =$response->getAuthDate();// Authentication response datetime// Method used for authentication// Possible values: ID Card, Mobile ID, One-off code card, PIN-calculator, Code card or unknown$authMethod =$response->getAuthMethod();// Failed }else {// Payment data$orderId =$response->getOrderId();// Order id to cancel order etc. }?>
composer build
- build by running tests and all code checkscomposer test
- run testscomposer format
- format code against standardscomposer docs
- build API documentationcomposer phpmd
- run PHP Mess Detectorcomposer phpcs
- run PHP CodeSniffer
Licensed underMIT
About
PHP payment library to easily integrate Baltic banklinks (supports old and new iPizza protocol), E-commerce gateaway (Estcard, Nets Estonia), Liisi Payment Link and Pocopay.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.