dimafe6 / bank-id-bundle
瑞典BankID库的Symfony扩展包
1.0.1
2017-11-13 17:52 UTC
Requires
- php: >=5.6.0
- dimafe6/bank-id: 1.0.*
- symfony/framework-bundle: ^2.7|^3.0
This package is auto-updated.
Last update: 2024-09-19 00:22:15 UTC
README
此扩展包用于将Bank-ID库连接到您的Symfony应用程序。
要求
- PHP 5.6+ 或 7.0+
- Symfony 2.7+ 或 3+
安装
使用composer获取扩展包
composer require dimafe6/bank-id-bundle
启用扩展包
要开始使用扩展包,请在应用程序的kernel类中注册该扩展包
// app/AppKernel.php // ... class AppKernel extends Kernel { // ... public function registerBundles() { $bundles = array( // ... new Dimafe6\BankIDBundle\BankIDBundle(), ); // ... } }
配置扩展包
# app/config/config.yml bank_id: wsdl_url: 'https://appapi2.test.bankid.com/rp/v4?wsdl' ssl: false
完整扩展包配置
# app/config/config.yml bank_id: wsdl_url: 'https://appapi2.test.bankid.com/rp/v4?wsdl' ssl: false local_cert: '%kernel.project_dir%/vendor/dimafe6/bank-id/tests/bankId.pem' soap_options: cache_wsdl: 'memory' #Available values: [none, disk, memory, both] soap_version: '1.1' #Available values: [1.1, 1.2] compression: true trace: true connection_timeout: 60 #In seconds user_agent: 'User-Agent: <your-user-agent>'
用法
// ... $orderRef = $container->get('dimafe6.bankid')->getAuthResponse($personalNumber)->orderRef; // ... $response = $container->get('dimafe6.bankid')->collectResponse($orderRef); // ...
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。