Changeset 3182951
- Timestamp:
- 11/06/2024 08:34:13 AM (4 months ago)
- Location:
- fapi-member
- Files:
-
- 411 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
fapi-member/trunk/fapi-member.php
r3169827 r3182951 15 15 * Plugin URI: https://fapi.cz/ 16 16 * Description: Plugin FAPI pro jednoduchou správu členských sekcí na webu. 17 * Version: 2.2. 217 * Version: 2.2.3 18 18 * Requires at least: 5.9 19 19 * Requires PHP: 8.1 … … 30 30 require __DIR__ . '/src/Utils/functions.php'; 31 31 32 define('FAPI_MEMBER_PLUGIN_VERSION', '2.2. 2');32 define('FAPI_MEMBER_PLUGIN_VERSION', '2.2.3'); 33 33 34 34 $FapiPlugin = new FapiMemberPlugin(); -
fapi-member/trunk/readme.txt
r3169827 r3182951 6 6 Requires PHP: 8.1 7 7 License: GPLv2 or later 8 Stable tag: 2.2. 28 Stable tag: 2.2.3 9 9 10 10 Plugin FAPI pro jednoduchou správu členských sekcí na webu. … … 26 26 27 27 == Changelog == 28 29 = 2.2.3 = 30 * Bug fix - Fixed user creation from voucher FAPI actions 28 31 29 32 = 2.2.2 = -
fapi-member/trunk/src/Service/ApiService.php
r3161406 r3182951 92 92 foreach ($this->getApiClients() as $apiClient) { 93 93 $response = $apiClient->getVoucher($id); 94 95 if (is_array($response) && !isset($response['error'])) {96 return $response;97 }98 }99 100 return false;101 }102 103 public function getItemTemplate(string $code) : false|array104 {105 foreach ($this->getApiClients() as $apiClient ) {106 $response = $apiClient->getItemTemplate($code);107 94 108 95 if (is_array($response) && !isset($response['error'])) { -
fapi-member/trunk/src/Service/EmailService.php
r3145967 r3182951 80 80 $voucherId = $data['voucher']; 81 81 $voucher = $this->apiService->getVoucher($voucherId); 82 $voucherItemTemplateCode = $voucher['item_template_code'];83 $itemTemplate = $this->apiService->getItemTemplate($voucherItemTemplateCode);84 82 85 83 if ($voucher === false) { … … 89 87 'description' => 'Error getting voucher.', 90 88 'errors' => $this->apiService->getLastErrors(), 91 )92 );93 }94 95 $itemTemplate = ($itemTemplate === false) ? array() : $itemTemplate;96 97 if (98 !FapiMemberPlugin::isDevelopment() &&99 !SecurityValidator::isVoucherSecurityValid(100 $voucher,101 $itemTemplate,102 $data['time'],103 $data['security'],104 )) {105 $this->apiController->callbackError(106 array(107 'class' => self::class,108 'description' => 'Voucher security is not valid.',109 89 ) 110 90 ); -
fapi-member/trunk/src/Utils/ApiClient.php
r3161406 r3182951 107 107 public function getVoucher(int $id): false|array 108 108 { 109 $response = $this->retryRequest($this->apiUrl . 'vouchers ' . $id);109 $response = $this->retryRequest($this->apiUrl . 'vouchers/' . $id); 110 110 111 111 if (!$response) { … … 114 114 115 115 return json_decode($response['body'], true); 116 }117 118 public function getItemTemplate(string $code): false|array119 {120 $response = $this->retryRequest($this->apiUrl . 'item_templates/?code=' . $code);121 122 if (!$response) {123 return false;124 }125 126 $data = json_decode($response['body'], true);127 128 if (!isset( $data['item_templates'][0])) {129 return false;130 }131 132 return $data['item_templates'][0];133 116 } 134 117 -
fapi-member/trunk/vendor/composer/installed.php
r3169827 r3182951 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 2a6fbc297aa2adcf677cee0eb5e0592e14543775',6 'reference' => 'e0af328462ff1837fcb0c5750e759c3fc60e2e13', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 2a6fbc297aa2adcf677cee0eb5e0592e14543775',16 'reference' => 'e0af328462ff1837fcb0c5750e759c3fc60e2e13', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.