Changeset 3777423
- Timestamp:
- 10/31/2026 11:35:48 PM (7 hours ago)
- Location:
- bankglyph-qr-payments
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.7 (copied) (copied from bankglyph-qr-payments/trunk )
-
tags/1.0.7/bankglyph-qr-payments.php (modified) (2 diffs)
-
tags/1.0.7/readme.txt (modified) (2 diffs)
-
tags/1.0.7/src/Modules/BankwireQr/Gateway.php (modified) (3 diffs)
-
trunk/bankglyph-qr-payments.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Modules/BankwireQr/Gateway.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bankglyph-qr-payments/tags/1.0.7/bankglyph-qr-payments.php
r3771902 r3777423 5 5 * Plugin URI: https://woomoduly.cz/produkt/bankovni-prevod-qr-platba/ 6 6 * Description: Adds bank transfer payments with locally generated SPAYD QR codes and Slovak Pay by square support. 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Author: WooModuly.cz 9 9 * Author URI: https://woomoduly.cz/ … … 54 54 // Per-plugin konstanty (unikatni prefix) - zrcadlo hub konstant, aby 2 solo 55 55 // pluginy vedle sebe nesdilely cesty/URL (sdilene jmeno vyhraje prvni nactene). 56 define('SHAIM_BANKWIRE_VERSION', '1.0. 6');56 define('SHAIM_BANKWIRE_VERSION', '1.0.7'); 57 57 define('SHAIM_BANKWIRE_FILE', __FILE__); 58 58 define('SHAIM_BANKWIRE_DIR', plugin_dir_path(__FILE__)); -
bankglyph-qr-payments/tags/1.0.7/readme.txt
r3771902 r3777423 7 7 WC requires at least: 8.2 8 8 WC tested up to: 10.8 9 Stable tag: 1.0. 69 Stable tag: 1.0.7 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 83 83 == Changelog == 84 84 85 = 1.0.7 = 86 * Fixed missing QR images in transactional e-mails sent through Brevo: the e-mail now links to a PNG stored on the shop server. 87 85 88 = 1.0.6 = 86 89 * Added the recipient name to the Czech QR Payment code. -
bankglyph-qr-payments/tags/1.0.7/src/Modules/BankwireQr/Gateway.php
r3771902 r3777423 29 29 * IBAN-prefix-based -- no separate "CZ/SK mode" setting needed. 30 30 * 31 * E-mails carry the QR as a PNG embedded via Content-ID: Gmail drops both inline32 * SVG and data URI images, Outlook, Yahoo and Seznam drop inline SVG.31 * E-mails link to a PNG stored in the shop uploads. CID remains a fallback when 32 * uploads are unavailable; Brevo transactional mail does not support CID images. 33 33 * 34 34 * Discount: registered via SurchargeFee with a negative amount so the cart … … 349 349 350 350 /** 351 * Ulozi PNG z data URI pro embedEmailImages() a vrati odkaz cid: na nej. Jiny vstup nez PNG352 * data URI vrati prazdny retezec, takze se do e-mailu nedostane rozbity obrazek.351 * PNG zustava v uploads i po odeslani, aby ho klient mohl nacist pozdeji. Nazev je 352 * vazany na tajemstvi e-shopu, ne na verejne platebni udaje. Bez uploads zustane CID. 353 353 * 354 354 * @param string $dataUri … … 362 362 if ($png === false || $png === '') { 363 363 return ''; 364 } 365 366 $uploads = wp_upload_dir(null, false); 367 if (empty($uploads['error'])) { 368 $directory = $uploads['basedir'] . '/shaim-bankwire-qr'; 369 $filename = hash_hmac('sha256', $png, wp_salt('auth')) . '.png'; 370 $path = $directory . '/' . $filename; 371 if (!is_file($path) && wp_mkdir_p($directory)) { 372 if (!class_exists('WP_Filesystem_Direct')) { 373 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'; 374 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php'; 375 } 376 $filesystem = new \WP_Filesystem_Direct(null); 377 $temporary = tempnam($directory, 'qr-'); 378 if ($temporary !== false) { 379 if (file_put_contents($temporary, $png) === strlen($png)) { 380 // tempnam vytvori 0600; staticky obrazek musi precist take webovy server. 381 $stat = stat($directory); 382 chmod($temporary, $stat['mode'] & 0000666); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- WP_Filesystem_Direct::chmod skips changing 0600 to 0644. 383 $filesystem->move($temporary, $path); 384 } 385 if (is_file($temporary)) { 386 wp_delete_file($temporary); 387 } 388 } 389 } 390 if (is_file($path)) { 391 return $uploads['baseurl'] . '/shaim-bankwire-qr/' . $filename; 392 } 364 393 } 365 394 -
bankglyph-qr-payments/trunk/bankglyph-qr-payments.php
r3771902 r3777423 5 5 * Plugin URI: https://woomoduly.cz/produkt/bankovni-prevod-qr-platba/ 6 6 * Description: Adds bank transfer payments with locally generated SPAYD QR codes and Slovak Pay by square support. 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Author: WooModuly.cz 9 9 * Author URI: https://woomoduly.cz/ … … 54 54 // Per-plugin konstanty (unikatni prefix) - zrcadlo hub konstant, aby 2 solo 55 55 // pluginy vedle sebe nesdilely cesty/URL (sdilene jmeno vyhraje prvni nactene). 56 define('SHAIM_BANKWIRE_VERSION', '1.0. 6');56 define('SHAIM_BANKWIRE_VERSION', '1.0.7'); 57 57 define('SHAIM_BANKWIRE_FILE', __FILE__); 58 58 define('SHAIM_BANKWIRE_DIR', plugin_dir_path(__FILE__)); -
bankglyph-qr-payments/trunk/readme.txt
r3771902 r3777423 7 7 WC requires at least: 8.2 8 8 WC tested up to: 10.8 9 Stable tag: 1.0. 69 Stable tag: 1.0.7 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 83 83 == Changelog == 84 84 85 = 1.0.7 = 86 * Fixed missing QR images in transactional e-mails sent through Brevo: the e-mail now links to a PNG stored on the shop server. 87 85 88 = 1.0.6 = 86 89 * Added the recipient name to the Czech QR Payment code. -
bankglyph-qr-payments/trunk/src/Modules/BankwireQr/Gateway.php
r3771902 r3777423 29 29 * IBAN-prefix-based -- no separate "CZ/SK mode" setting needed. 30 30 * 31 * E-mails carry the QR as a PNG embedded via Content-ID: Gmail drops both inline32 * SVG and data URI images, Outlook, Yahoo and Seznam drop inline SVG.31 * E-mails link to a PNG stored in the shop uploads. CID remains a fallback when 32 * uploads are unavailable; Brevo transactional mail does not support CID images. 33 33 * 34 34 * Discount: registered via SurchargeFee with a negative amount so the cart … … 349 349 350 350 /** 351 * Ulozi PNG z data URI pro embedEmailImages() a vrati odkaz cid: na nej. Jiny vstup nez PNG352 * data URI vrati prazdny retezec, takze se do e-mailu nedostane rozbity obrazek.351 * PNG zustava v uploads i po odeslani, aby ho klient mohl nacist pozdeji. Nazev je 352 * vazany na tajemstvi e-shopu, ne na verejne platebni udaje. Bez uploads zustane CID. 353 353 * 354 354 * @param string $dataUri … … 362 362 if ($png === false || $png === '') { 363 363 return ''; 364 } 365 366 $uploads = wp_upload_dir(null, false); 367 if (empty($uploads['error'])) { 368 $directory = $uploads['basedir'] . '/shaim-bankwire-qr'; 369 $filename = hash_hmac('sha256', $png, wp_salt('auth')) . '.png'; 370 $path = $directory . '/' . $filename; 371 if (!is_file($path) && wp_mkdir_p($directory)) { 372 if (!class_exists('WP_Filesystem_Direct')) { 373 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'; 374 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php'; 375 } 376 $filesystem = new \WP_Filesystem_Direct(null); 377 $temporary = tempnam($directory, 'qr-'); 378 if ($temporary !== false) { 379 if (file_put_contents($temporary, $png) === strlen($png)) { 380 // tempnam vytvori 0600; staticky obrazek musi precist take webovy server. 381 $stat = stat($directory); 382 chmod($temporary, $stat['mode'] & 0000666); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- WP_Filesystem_Direct::chmod skips changing 0600 to 0644. 383 $filesystem->move($temporary, $path); 384 } 385 if (is_file($temporary)) { 386 wp_delete_file($temporary); 387 } 388 } 389 } 390 if (is_file($path)) { 391 return $uploads['baseurl'] . '/shaim-bankwire-qr/' . $filename; 392 } 364 393 } 365 394
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)