Support App Key authentication to wFirma.pl API
| | |
| | | Prerequisites: |
| | | - wFirma account with no 2FA enabled, |
| | | - wFirma access key, secret key and app key, |
| | | - separate invoice numbering scheme with no checking created in wFirma, |
| | | - tax included pricing set in UCRM. |
| | |
| | | "php": ">=8.1", |
| | | "ext-json": "*", |
| | | "ubnt/ucrm-plugin-sdk": "^0.9.0", |
| | | "webit/w-firma-api": "^2.3" |
| | | "webit/w-firma-api": "^2.6.0" |
| | | } |
| | | } |
| | |
| | | }, |
| | | "configuration": [ |
| | | { |
| | | "key": "wfirma_username", |
| | | "label": "wFirma.pl username" |
| | | "key": "wfirma_access_key", |
| | | "label": "wFirma.pl Access Key" |
| | | }, |
| | | { |
| | | "key": "wfirma_password", |
| | | "label": "wFirma.pl password" |
| | | "key": "wfirma_secret_key", |
| | | "label": "wFirma.pl Secret Key" |
| | | }, |
| | | { |
| | | "key": "wfirma_app_key", |
| | | "label": "wFirma App Key" |
| | | }, |
| | | { |
| | | "key": "wfirma_series_invoice", |
| | |
| | | |
| | | function create(): \Webit\WFirmaSDK\Entity\ModuleApiFactory { |
| | | $config = $this->ucrmHelper->getConfig(); |
| | | $wFirmaAuth = new \Webit\WFirmaSDK\Auth\BasicAuth($config['wfirma_username'], $config['wfirma_password']); |
| | | $wFirmaAuth = new \Webit\WFirmaSDK\Auth\ApiKeysAuth($config['wfirma_access_key'], $config['wfirma_secret_key'], $config['wfirma_app_key']); |
| | | |
| | | $wFirmaEntityApiFactory = new \Webit\WFirmaSDK\Entity\EntityApiFactory(); |
| | | $wFirmaEntityApi = $wFirmaEntityApiFactory->create($wFirmaAuth); |