commit b3f556b14625c3f65ba6f6976c206448a8d82522
parent 956df726dcd0741cf533d92850696fec7169fd08
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 29 Oct 2025 22:45:20 +0100
minor fixes
Diffstat:
3 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/assets/js/payment-button.js b/assets/js/payment-button.js
@@ -85,6 +85,8 @@
console.log('Payment still pending, continuing to poll...');
var endTime = Date.now();
// Prevent looping faster than the long-poll timeout
+ // (useful in case a bug causes the 402 to be returned
+ // immediately instead of long-polling properly).
var delay = (startTime + timeoutMs > endTime)
? (startTime + timeoutMs - endTime)
: 0;
@@ -132,7 +134,6 @@
if (paymentUrl && typeof QRCode !== 'undefined') {
$container.empty();
var talerUri = convertToTalerUri(paymentUrl, sessionId);
-
new QRCode($container[0], {
text: talerUri,
width: 200,
@@ -150,19 +151,6 @@
}
});
- // Update Taler payment button href to use Taler URI
- $('.taler-pay-button').each(function() {
- var $button = $(this);
- var paymentUrl = $button.attr('href');
- var $container = $button.closest('.taler-payment-container');
- var $qrContainer = $container.find('.taler-turnstile-qr-code-container');
- var sessionId = $qrContainer.data('session-id');
-
- if (paymentUrl && sessionId) {
- var talerUri = convertToTalerUri(paymentUrl, sessionId);
- $button.attr('href', talerUri);
- }
- });
});
})(jQuery);
diff --git a/includes/class-content-filter.php b/includes/class-content-filter.php
@@ -217,11 +217,11 @@ class Taler_Content_Filter {
</div>
</div>
- <div class="taler-payment-info">
+ <!-- div class="taler-payment-info">
<p class="taler-order-id">
<small><?php printf(esc_html__('Order ID: %s', 'taler-turnstile'), esc_html($order_id)); ?></small>
</p>
- </div>
+ </div -->
</div>
<?php
return ob_get_clean();
diff --git a/includes/class-taler-merchant-api.php b/includes/class-taler-merchant-api.php
@@ -190,7 +190,7 @@ class Taler_Merchant_API {
return $result;
case 403:
- error_log('Access denied by the merchant backend. Check your GNU Taler Turnstile configuration!');
+ error_log('Access denied by the merchant backend. Did your credentials change or expire? Check your GNU Taler Turnstile configuration!');
return $result;
case 404:
@@ -211,7 +211,7 @@ class Taler_Merchant_API {
'name' => $family['name'],
'label' => $slug,
'description' => $family['description'],
- 'description_i18n' => isset($family['description_i18n']) ? $family['description_i18n'] : array()
+ 'description_i18n' => ($family['description_i18n'] ?? NULL)
);
}
}