Changeset 3798076
- Timestamp:
- 11/12/2026 10:39:58 AM (3 days ago)
- Location:
- cod-anti-fraud-for-woocommerce
- Files:
-
- 38 added
- 16 edited
-
tags/2.0.2/includes/class-wccaf-admin.php (modified) (7 diffs)
-
tags/2.0.2/includes/class-wccaf-checkout.php (modified) (40 diffs)
-
tags/2.0.2/includes/class-wccaf-otp-manager.php (modified) (9 diffs)
-
tags/2.0.2/includes/class-wccaf-settings.php (modified) (17 diffs)
-
tags/2.0.2/includes/class-wccaf-whatsapp.php (modified) (10 diffs)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-de_DE.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-de_DE.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-en_GB.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-en_GB.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-en_US.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-en_US.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-es_ES.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-es_ES.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-fr_FR.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-fr_FR.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-it_IT.mo (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce-it_IT.po (added)
-
tags/2.0.2/languages/cod-anti-fraud-for-woocommerce.pot (added)
-
tags/2.0.2/languages/woo-cod-antifraud-de_DE.mo (added)
-
tags/2.0.2/languages/woo-cod-antifraud-de_DE.po (added)
-
tags/2.0.2/languages/woo-cod-antifraud-es_ES.mo (added)
-
tags/2.0.2/languages/woo-cod-antifraud-es_ES.po (added)
-
tags/2.0.2/languages/woo-cod-antifraud-fr_FR.mo (added)
-
tags/2.0.2/languages/woo-cod-antifraud-fr_FR.po (added)
-
tags/2.0.2/languages/woo-cod-antifraud.pot (modified) (24 diffs)
-
tags/2.0.2/readme.txt (modified) (5 diffs)
-
tags/2.0.2/woo-cod-antifraud.php (modified) (4 diffs)
-
trunk/includes/class-wccaf-admin.php (modified) (7 diffs)
-
trunk/includes/class-wccaf-checkout.php (modified) (40 diffs)
-
trunk/includes/class-wccaf-otp-manager.php (modified) (9 diffs)
-
trunk/includes/class-wccaf-settings.php (modified) (17 diffs)
-
trunk/includes/class-wccaf-whatsapp.php (modified) (10 diffs)
-
trunk/languages/cod-anti-fraud-for-woocommerce-de_DE.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-de_DE.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-en_GB.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-en_GB.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-en_US.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-en_US.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-es_ES.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-es_ES.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-fr_FR.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-fr_FR.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-it_IT.mo (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce-it_IT.po (added)
-
trunk/languages/cod-anti-fraud-for-woocommerce.pot (added)
-
trunk/languages/woo-cod-antifraud-de_DE.mo (added)
-
trunk/languages/woo-cod-antifraud-de_DE.po (added)
-
trunk/languages/woo-cod-antifraud-es_ES.mo (added)
-
trunk/languages/woo-cod-antifraud-es_ES.po (added)
-
trunk/languages/woo-cod-antifraud-fr_FR.mo (added)
-
trunk/languages/woo-cod-antifraud-fr_FR.po (added)
-
trunk/languages/woo-cod-antifraud.pot (modified) (24 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/woo-cod-antifraud.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-admin.php
r3778566 r3798076 44 44 '<a href="%s">%s</a>', 45 45 esc_url( $settings_url ), 46 esc_html__( 'Settings', ' woo-cod-antifraud' )46 esc_html__( 'Settings', 'cod-anti-fraud-for-woocommerce' ) 47 47 ); 48 48 array_unshift( $links, $settings_link ); … … 142 142 143 143 $custom_message = isset( $input['custom_message_template'] ) ? sanitize_textarea_field( $input['custom_message_template'] ) : ''; 144 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' );144 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ); 145 145 146 146 return $output; … … 162 162 add_meta_box( 163 163 'wccaf_order_meta_box', 164 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', ' woo-cod-antifraud' ),164 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'cod-anti-fraud-for-woocommerce' ), 165 165 array( $this, 'render_order_meta_box' ), 166 166 $screen, … … 194 194 if ( 'cod' !== $order->get_payment_method() ) { 195 195 ?> 196 <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', ' woo-cod-antifraud' ); ?></p>196 <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'cod-anti-fraud-for-woocommerce' ); ?></p> 197 197 <?php 198 198 return; … … 212 212 <div style="font-size:14px; line-height:1.6;"> 213 213 <p> 214 <strong><?php esc_html_e( 'WhatsApp Verification Status:', ' woo-cod-antifraud' ); ?></strong><br>214 <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 215 215 <?php if ( 'yes' === $whitelisted ) : ?> 216 <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', ' woo-cod-antifraud' ); ?></span>216 <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'cod-anti-fraud-for-woocommerce' ); ?></span> 217 217 <?php elseif ( 'yes' === $verified ) : ?> 218 <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', ' woo-cod-antifraud' ); ?></span>218 <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'cod-anti-fraud-for-woocommerce' ); ?></span> 219 219 <?php elseif ( 'no' === $otp_required ) : ?> 220 <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', ' woo-cod-antifraud' ); ?></span>220 <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'cod-anti-fraud-for-woocommerce' ); ?></span> 221 221 <?php else : ?> 222 <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', ' woo-cod-antifraud' ); ?></span>222 <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'cod-anti-fraud-for-woocommerce' ); ?></span> 223 223 <?php endif; ?> 224 224 </p> 225 225 226 226 <p> 227 <strong><?php esc_html_e( 'Risk Score:', ' woo-cod-antifraud' ); ?></strong><br>227 <strong><?php esc_html_e( 'Risk Score:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 228 228 <span style="background:<?php echo esc_attr( $badge_color ); ?>; color:#fff; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php echo esc_html( (string) $score_val ); ?> / 100</span> 229 229 </p> … … 231 231 <?php if ( $phone ) : ?> 232 232 <p> 233 <strong><?php esc_html_e( 'Verified Phone Number:', ' woo-cod-antifraud' ); ?></strong><br>233 <strong><?php esc_html_e( 'Verified Phone Number:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 234 234 <code><?php echo esc_html( (string) $phone ); ?></code> 235 235 </p> … … 238 238 <?php if ( $timestamp ) : ?> 239 239 <p> 240 <strong><?php esc_html_e( 'Verification Date and Time:', ' woo-cod-antifraud' ); ?></strong><br>240 <strong><?php esc_html_e( 'Verification Date and Time:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 241 241 <small><?php echo esc_html( (string) $timestamp ); ?></small> 242 242 </p> -
cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-checkout.php
r3778566 r3798076 113 113 'max_cart_action' => $max_action, 114 114 'verification_timing' => $verification_timing, 115 'not_configured_msg' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', ' woo-cod-antifraud' ),115 'not_configured_msg' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ), 116 116 'i18n' => array( 117 'enter_phone' => __( 'Please enter your phone number in the billing form first.', ' woo-cod-antifraud' ),118 'invalid_phone' => __( 'Please enter a valid phone number in the billing form.', ' woo-cod-antifraud' ),119 'sending_otp' => __( 'Sending OTP code...', ' woo-cod-antifraud' ),120 'resend_btn' => __( 'Resend WhatsApp Code', ' woo-cod-antifraud' ),121 'send_error' => __( 'Error while sending OTP.', ' woo-cod-antifraud' ),122 'conn_error' => __( 'Server connection error. Please try again.', ' woo-cod-antifraud' ),123 'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', ' woo-cod-antifraud' ),124 'verifying' => __( 'Verifying code...', ' woo-cod-antifraud' ),125 'verified_btn' => __( 'Verified', ' woo-cod-antifraud' ),126 'invalid_otp' => __( 'Invalid or expired OTP code.', ' woo-cod-antifraud' ),127 'verify_error' => __( 'Error during verification with server.', ' woo-cod-antifraud' ),128 'missing_phone' => __( 'Missing phone number.', ' woo-cod-antifraud' ),129 'otp_sent' => __( 'OTP code sent successfully!', ' woo-cod-antifraud' ),130 'verified_success' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),117 'enter_phone' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ), 118 'invalid_phone' => __( 'Please enter a valid phone number in the billing form.', 'cod-anti-fraud-for-woocommerce' ), 119 'sending_otp' => __( 'Sending OTP code...', 'cod-anti-fraud-for-woocommerce' ), 120 'resend_btn' => __( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ), 121 'send_error' => __( 'Error while sending OTP.', 'cod-anti-fraud-for-woocommerce' ), 122 'conn_error' => __( 'Server connection error. Please try again.', 'cod-anti-fraud-for-woocommerce' ), 123 'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'cod-anti-fraud-for-woocommerce' ), 124 'verifying' => __( 'Verifying code...', 'cod-anti-fraud-for-woocommerce' ), 125 'verified_btn' => __( 'Verified', 'cod-anti-fraud-for-woocommerce' ), 126 'invalid_otp' => __( 'Invalid or expired OTP code.', 'cod-anti-fraud-for-woocommerce' ), 127 'verify_error' => __( 'Error during verification with server.', 'cod-anti-fraud-for-woocommerce' ), 128 'missing_phone' => __( 'Missing phone number.', 'cod-anti-fraud-for-woocommerce' ), 129 'otp_sent' => __( 'OTP code sent successfully!', 'cod-anti-fraud-for-woocommerce' ), 130 'verified_success' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 131 131 ), 132 132 ); … … 157 157 <span style="font-size:22px; line-height:1;">📱</span> 158 158 <div> 159 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', ' woo-cod-antifraud' ); ?></strong>159 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 160 160 <p style="margin:4px 0 0 0; font-size:13px; color:#383d41;"> 161 <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', ' woo-cod-antifraud' ); ?>161 <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'cod-anti-fraud-for-woocommerce' ); ?> 162 162 </p> 163 163 </div> … … 171 171 <div class="wc-cod-otp-header"> 172 172 <span class="wc-cod-whatsapp-icon">📱</span> 173 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', ' woo-cod-antifraud' ); ?></h3>173 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'cod-anti-fraud-for-woocommerce' ); ?></h3> 174 174 </div> 175 175 176 176 <p class="wc-cod-otp-instructions"> 177 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', ' woo-cod-antifraud' ); ?>177 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'cod-anti-fraud-for-woocommerce' ); ?> 178 178 </p> 179 179 … … 181 181 <div class="wc-cod-otp-actions"> 182 182 <button type="button" id="wc-cod-send-otp-btn" class="button wc-cod-btn wc-cod-btn-send"> 183 <span>📱 <?php esc_html_e( 'Send WhatsApp Code', ' woo-cod-antifraud' ); ?></span>183 <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 184 184 </button> 185 185 </div> … … 188 188 <div class="wc-cod-otp-verify-block" id="wc-cod-otp-verify-block"> 189 189 <div class="wc-cod-input-row"> 190 <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', ' woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />190 <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" /> 191 191 <button type="button" id="wc-cod-verify-otp-btn" class="button wc-cod-btn wc-cod-btn-verify"> 192 <span><?php esc_html_e( 'Verify Code', ' woo-cod-antifraud' ); ?></span>192 <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 193 193 </button> 194 194 </div> … … 241 241 <div class="wc-cod-otp-header"> 242 242 <span class="wc-cod-whatsapp-icon">📱</span> 243 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', ' woo-cod-antifraud' ); ?></h3>243 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'cod-anti-fraud-for-woocommerce' ); ?></h3> 244 244 </div> 245 245 246 246 <?php if ( 'yes' === $whitelisted ) : ?> 247 247 <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;"> 248 🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', ' woo-cod-antifraud' ); ?></strong>248 🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 249 249 <p style="margin: 6px 0 0 0;"> 250 250 <?php … … 252 252 sprintf( 253 253 /* translators: 1: Order ID, 2: Phone number */ 254 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', ' woo-cod-antifraud' ),254 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'cod-anti-fraud-for-woocommerce' ), 255 255 intval( $order_id ), 256 256 $phone … … 262 262 <?php elseif ( 'yes' === $verified ) : ?> 263 263 <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;"> 264 ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', ' woo-cod-antifraud' ); ?></strong>264 ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 265 265 <p style="margin: 6px 0 0 0;"> 266 266 <?php … … 268 268 sprintf( 269 269 /* translators: 1: Order ID, 2: Phone number */ 270 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', ' woo-cod-antifraud' ),270 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'cod-anti-fraud-for-woocommerce' ), 271 271 intval( $order_id ), 272 272 $phone … … 282 282 sprintf( 283 283 /* translators: %s: Customer phone number */ 284 __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', ' woo-cod-antifraud' ),284 __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'cod-anti-fraud-for-woocommerce' ), 285 285 $phone 286 286 ) … … 291 291 <div class="wc-cod-otp-actions" style="margin-bottom: 12px;"> 292 292 <button type="button" id="wc-cod-thankyou-resend-btn" class="button wc-cod-btn wc-cod-btn-send" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>"> 293 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', ' woo-cod-antifraud' ); ?></span>293 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 294 294 </button> 295 295 </div> … … 297 297 <div class="wc-cod-otp-verify-block" style="display:block;"> 298 298 <div class="wc-cod-input-row"> 299 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', ' woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />299 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" /> 300 300 <input type="hidden" id="wc-cod-thankyou-order-key" value="<?php echo esc_attr( $order_key ); ?>" /> 301 301 <button type="button" id="wc-cod-thankyou-verify-btn" class="button wc-cod-btn wc-cod-btn-verify" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>"> 302 <span><?php esc_html_e( 'Verify Code', ' woo-cod-antifraud' ); ?></span>302 <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 303 303 </button> 304 304 </div> … … 322 322 return array( 323 323 'valid' => false, 324 'message' => __( 'WooCommerce is not available.', ' woo-cod-antifraud' ),324 'message' => __( 'WooCommerce is not available.', 'cod-anti-fraud-for-woocommerce' ), 325 325 ); 326 326 } … … 330 330 return array( 331 331 'valid' => false, 332 'message' => __( 'Invalid order specified.', ' woo-cod-antifraud' ),332 'message' => __( 'Invalid order specified.', 'cod-anti-fraud-for-woocommerce' ), 333 333 ); 334 334 } … … 337 337 return array( 338 338 'valid' => false, 339 'message' => __( 'The specified order does not use Cash on Delivery.', ' woo-cod-antifraud' ),339 'message' => __( 'The specified order does not use Cash on Delivery.', 'cod-anti-fraud-for-woocommerce' ), 340 340 ); 341 341 } … … 368 368 return array( 369 369 'valid' => false, 370 'message' => __( 'Permission denied or invalid order verification key.', ' woo-cod-antifraud' ),370 'message' => __( 'Permission denied or invalid order verification key.', 'cod-anti-fraud-for-woocommerce' ), 371 371 ); 372 372 } … … 382 382 return array( 383 383 'valid' => false, 384 'message' => __( 'The verified phone number does not match the billing phone number of this order.', ' woo-cod-antifraud' ),384 'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'cod-anti-fraud-for-woocommerce' ), 385 385 ); 386 386 } … … 406 406 wp_send_json_success( array( 407 407 'blacklisted' => true, 408 'message' => __( 'Cash on Delivery payment is not available for this address.', ' woo-cod-antifraud' ),408 'message' => __( 'Cash on Delivery payment is not available for this address.', 'cod-anti-fraud-for-woocommerce' ), 409 409 ) ); 410 410 } … … 413 413 wp_send_json_success( array( 414 414 'whitelisted' => true, 415 'message' => __( 'VIP/Trusted customer: OTP verification not required.', ' woo-cod-antifraud' ),415 'message' => __( 'VIP/Trusted customer: OTP verification not required.', 'cod-anti-fraud-for-woocommerce' ), 416 416 ) ); 417 417 } … … 451 451 wp_send_json_success( array( 452 452 'already_verified' => true, 453 'message' => __( 'Order is already verified.', ' woo-cod-antifraud' ),453 'message' => __( 'Order is already verified.', 'cod-anti-fraud-for-woocommerce' ), 454 454 ) ); 455 455 } … … 480 480 481 481 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 482 wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', ' woo-cod-antifraud' ) ) );482 wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ) ) ); 483 483 } 484 484 … … 487 487 wp_send_json_error( array( 488 488 'blacklisted' => true, 489 'message' => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', ' woo-cod-antifraud' ),489 'message' => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'cod-anti-fraud-for-woocommerce' ), 490 490 ) ); 491 491 } … … 513 513 wp_send_json_success( array( 514 514 'whitelisted' => true, 515 'message' => __( 'Phone number verified automatically (Trusted Whitelist Customer).', ' woo-cod-antifraud' ),515 'message' => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'cod-anti-fraud-for-woocommerce' ), 516 516 'token' => $token, 517 517 ) ); … … 527 527 $settings = get_option( 'wc_cod_antifraud_settings', array() ); 528 528 if ( ! WCCAF_WhatsApp::is_configured( $settings ) ) { 529 wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', ' woo-cod-antifraud' ) ) );529 wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ) ) ); 530 530 } 531 531 … … 539 539 // Strict Information Leakage Prevention: NEVER return OTP to client 540 540 wp_send_json_success( array( 541 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),541 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 542 542 ) ); 543 543 } else { 544 $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' );544 $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ); 545 545 wp_send_json_error( array( 'message' => $error_message ) ); 546 546 } … … 578 578 579 579 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 580 wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', ' woo-cod-antifraud' ) ) );580 wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'cod-anti-fraud-for-woocommerce' ) ) ); 581 581 } 582 582 583 583 if ( empty( $otp ) || strlen( $otp ) !== 6 ) { 584 wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', ' woo-cod-antifraud' ) ) );584 wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'cod-anti-fraud-for-woocommerce' ) ) ); 585 585 } 586 586 … … 598 598 599 599 wp_send_json_success( array( 600 'message' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),600 'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 601 601 'token' => $token, 602 602 ) ); … … 636 636 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 637 637 if ( function_exists( 'wc_add_notice' ) ) { 638 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ), 'error' );638 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 639 639 } 640 640 return; … … 650 650 $notice_msg = sprintf( 651 651 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 652 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),652 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 653 653 wc_price( $cart_total ), 654 654 wc_price( $max_amount ) … … 666 666 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 667 667 if ( function_exists( 'wc_add_notice' ) ) { 668 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ), 'error' );668 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 669 669 } 670 670 return; … … 689 689 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) { 690 690 if ( function_exists( 'wc_add_notice' ) ) { 691 wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ), 'error' );691 wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 692 692 } 693 693 } … … 716 716 // 1. Blacklist Check 717 717 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 718 $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ) );718 $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) ); 719 719 return; 720 720 } … … 730 730 $notice_msg = sprintf( 731 731 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 732 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),732 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 733 733 $formatted_cart, 734 734 $formatted_max … … 744 744 745 745 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 746 $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ) );746 $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) ); 747 747 return; 748 748 } … … 765 765 $token = isset( $_POST['wc_cod_otp_token'] ) ? sanitize_text_field( wp_unslash( $_POST['wc_cod_otp_token'] ) ) : ''; 766 766 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) { 767 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ) );767 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) ); 768 768 } 769 769 } … … 795 795 // 1. Blacklist Check 796 796 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 797 throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ) );797 throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) ); 798 798 } 799 799 … … 808 808 $exception_msg = sprintf( 809 809 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 810 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),810 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 811 811 $formatted_cart, 812 812 $formatted_max … … 821 821 822 822 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 823 throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ) );823 throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) ); 824 824 } 825 825 … … 839 839 if ( $is_required ) { 840 840 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone ) ) { 841 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ) );841 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) ); 842 842 } 843 843 } … … 867 867 // Strict Integrity Gate: se OTP è obbligatorio in pre-checkout, impedire la creazione dell'ordine non verificato 868 868 if ( 'pre_checkout' === $timing && $required && 'yes' !== $is_verified ) { 869 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', ' woo-cod-antifraud' ) );869 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'cod-anti-fraud-for-woocommerce' ) ); 870 870 } 871 871 -
cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-otp-manager.php
r3778566 r3798076 111 111 'message' => sprintf( 112 112 /* translators: 1: max requests, 2: minutes left */ 113 __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', ' woo-cod-antifraud' ),113 __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'cod-anti-fraud-for-woocommerce' ), 114 114 $max_requests, 115 115 $time_left … … 134 134 'message' => sprintf( 135 135 /* translators: %d: minutes left */ 136 __( 'Too many requests from this IP address. Please try again in %d minutes.', ' woo-cod-antifraud' ),136 __( 'Too many requests from this IP address. Please try again in %d minutes.', 'cod-anti-fraud-for-woocommerce' ), 137 137 $time_left 138 138 ), … … 253 253 return array( 254 254 'success' => false, 255 'message' => __( 'Phone number or OTP code not provided.', ' woo-cod-antifraud' ),255 'message' => __( 'Phone number or OTP code not provided.', 'cod-anti-fraud-for-woocommerce' ), 256 256 ); 257 257 } … … 271 271 return array( 272 272 'success' => false, 273 'message' => __( 'OTP code expired or invalid. Please request a new one.', ' woo-cod-antifraud' ),273 'message' => __( 'OTP code expired or invalid. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ), 274 274 ); 275 275 } … … 289 289 return array( 290 290 'success' => false, 291 'message' => __( 'OTP code expired. Please request a new one.', ' woo-cod-antifraud' ),291 'message' => __( 'OTP code expired. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ), 292 292 ); 293 293 } … … 303 303 return array( 304 304 'success' => false, 305 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', ' woo-cod-antifraud' ),305 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ), 306 306 ); 307 307 } … … 337 337 return array( 338 338 'success' => true, 339 'message' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),339 'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 340 340 'token' => $token, 341 341 ); … … 350 350 return array( 351 351 'success' => false, 352 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', ' woo-cod-antifraud' ),352 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ), 353 353 ); 354 354 } … … 364 364 'message' => sprintf( 365 365 /* translators: %d: remaining attempts */ 366 __( 'Incorrect OTP code. Attempts remaining: %d', ' woo-cod-antifraud' ),366 __( 'Incorrect OTP code. Attempts remaining: %d', 'cod-anti-fraud-for-woocommerce' ), 367 367 max( 0, $max_attempts - $data['attempts'] ) 368 368 ), -
cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-settings.php
r3778566 r3798076 22 22 public function __construct() { 23 23 $this->id = 'wc_cod_antifraud'; 24 $this->label = __( 'COD Anti-Fraud', ' woo-cod-antifraud' );24 $this->label = __( 'COD Anti-Fraud', 'cod-anti-fraud-for-woocommerce' ); 25 25 26 26 parent::__construct(); … … 34 34 public function get_sections() { 35 35 $sections = array( 36 '' => __( 'General Settings', ' woo-cod-antifraud' ),36 '' => __( 'General Settings', 'cod-anti-fraud-for-woocommerce' ), 37 37 ); 38 38 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound … … 48 48 $settings = array( 49 49 array( 50 'title' => __( 'WooCommerce COD Anti-Fraud Settings', ' woo-cod-antifraud' ),50 'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'cod-anti-fraud-for-woocommerce' ), 51 51 'type' => 'title', 52 'desc' => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', ' woo-cod-antifraud' ),52 'desc' => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'cod-anti-fraud-for-woocommerce' ), 53 53 'id' => 'wc_cod_antifraud_options_section', 54 54 ), 55 55 56 56 array( 57 'title' => __( 'OTP Verification Mode (Pre-Checkout Blocking)', ' woo-cod-antifraud' ),58 'desc' => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', ' woo-cod-antifraud' ),57 'title' => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'cod-anti-fraud-for-woocommerce' ), 58 'desc' => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'cod-anti-fraud-for-woocommerce' ), 59 59 'id' => 'wc_cod_antifraud_settings[require_otp_mode]', 60 60 'default' => 'always', 61 61 'type' => 'select', 62 62 'options' => array( 63 'always' => __( 'Always Required (All Cash on Delivery Orders)', ' woo-cod-antifraud' ),64 'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', ' woo-cod-antifraud' ),65 ), 66 ), 67 68 array( 69 'title' => __( 'Risk Score Threshold (0-100)', ' woo-cod-antifraud' ),70 'desc' => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', ' woo-cod-antifraud' ),63 'always' => __( 'Always Required (All Cash on Delivery Orders)', 'cod-anti-fraud-for-woocommerce' ), 64 'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'cod-anti-fraud-for-woocommerce' ), 65 ), 66 ), 67 68 array( 69 'title' => __( 'Risk Score Threshold (0-100)', 'cod-anti-fraud-for-woocommerce' ), 70 'desc' => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'cod-anti-fraud-for-woocommerce' ), 71 71 'id' => 'wc_cod_antifraud_settings[risk_threshold]', 72 72 'default' => '40', … … 80 80 81 81 array( 82 'title' => __( 'Minimum Cart Amount for OTP (€)', ' woo-cod-antifraud' ),83 'desc' => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', ' woo-cod-antifraud' ),82 'title' => __( 'Minimum Cart Amount for OTP (€)', 'cod-anti-fraud-for-woocommerce' ), 83 'desc' => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'cod-anti-fraud-for-woocommerce' ), 84 84 'id' => 'wc_cod_antifraud_settings[min_cart_amount_otp]', 85 85 'default' => '0', … … 92 92 93 93 array( 94 'title' => __( 'Maximum COD Cart Threshold (€)', ' woo-cod-antifraud' ),95 'desc' => __( 'Maximum cart value above which the high-threshold rule is applied.', ' woo-cod-antifraud' ),94 'title' => __( 'Maximum COD Cart Threshold (€)', 'cod-anti-fraud-for-woocommerce' ), 95 'desc' => __( 'Maximum cart value above which the high-threshold rule is applied.', 'cod-anti-fraud-for-woocommerce' ), 96 96 'id' => 'wc_cod_antifraud_settings[max_cart_amount_cod]', 97 97 'default' => '500', … … 104 104 105 105 array( 106 'title' => __( 'Action Above Maximum Threshold', ' woo-cod-antifraud' ),107 'desc' => __( 'Action to take when cart total exceeds the maximum threshold.', ' woo-cod-antifraud' ),106 'title' => __( 'Action Above Maximum Threshold', 'cod-anti-fraud-for-woocommerce' ), 107 'desc' => __( 'Action to take when cart total exceeds the maximum threshold.', 'cod-anti-fraud-for-woocommerce' ), 108 108 'id' => 'wc_cod_antifraud_settings[max_cart_action]', 109 109 'default' => 'require_otp', 110 110 'type' => 'select', 111 111 'options' => array( 112 'require_otp' => __( 'Require WhatsApp OTP Verification', ' woo-cod-antifraud' ),113 'disable_cod' => __( 'Disable Cash on Delivery Payment Method', ' woo-cod-antifraud' ),114 ), 115 ), 116 117 array( 118 'title' => __( 'Phone / Email Blacklist', ' woo-cod-antifraud' ),119 'desc' => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', ' woo-cod-antifraud' ),112 'require_otp' => __( 'Require WhatsApp OTP Verification', 'cod-anti-fraud-for-woocommerce' ), 113 'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'cod-anti-fraud-for-woocommerce' ), 114 ), 115 ), 116 117 array( 118 'title' => __( 'Phone / Email Blacklist', 'cod-anti-fraud-for-woocommerce' ), 119 'desc' => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ), 120 120 'id' => 'wc_cod_antifraud_settings[blacklist_phones]', 121 121 'default' => '', … … 125 125 126 126 array( 127 'title' => __( 'Phone / Email Whitelist (VIP)', ' woo-cod-antifraud' ),128 'desc' => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', ' woo-cod-antifraud' ),127 'title' => __( 'Phone / Email Whitelist (VIP)', 'cod-anti-fraud-for-woocommerce' ), 128 'desc' => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ), 129 129 'id' => 'wc_cod_antifraud_settings[whitelist_phones]', 130 130 'default' => '', … … 134 134 135 135 array( 136 'title' => __( 'Max OTP Requests Limit', ' woo-cod-antifraud' ),137 'desc' => __( 'Maximum number of OTP requests allowed before temporary lock.', ' woo-cod-antifraud' ),136 'title' => __( 'Max OTP Requests Limit', 'cod-anti-fraud-for-woocommerce' ), 137 'desc' => __( 'Maximum number of OTP requests allowed before temporary lock.', 'cod-anti-fraud-for-woocommerce' ), 138 138 'id' => 'wc_cod_antifraud_settings[rate_limit_max_requests]', 139 139 'default' => '3', … … 146 146 147 147 array( 148 'title' => __( 'Rate Limit Window (minutes)', ' woo-cod-antifraud' ),149 'desc' => __( 'Validity period for request limit in minutes.', ' woo-cod-antifraud' ),148 'title' => __( 'Rate Limit Window (minutes)', 'cod-anti-fraud-for-woocommerce' ), 149 'desc' => __( 'Validity period for request limit in minutes.', 'cod-anti-fraud-for-woocommerce' ), 150 150 'id' => 'wc_cod_antifraud_settings[rate_limit_window_minutes]', 151 151 'default' => '10', … … 158 158 159 159 array( 160 'title' => __( 'WhatsApp Provider', ' woo-cod-antifraud' ),161 'desc' => __( 'Select the WhatsApp provider for sending OTP codes.', ' woo-cod-antifraud' ),160 'title' => __( 'WhatsApp Provider', 'cod-anti-fraud-for-woocommerce' ), 161 'desc' => __( 'Select the WhatsApp provider for sending OTP codes.', 'cod-anti-fraud-for-woocommerce' ), 162 162 'id' => 'wc_cod_antifraud_settings[whatsapp_provider]', 163 163 'default' => 'beralabs', 164 164 'type' => 'select', 165 165 'options' => array( 166 'beralabs' => __( 'BeraLabs Gateway (Proprietary)', ' woo-cod-antifraud' ),167 'ultramsg' => __( 'UltraMsg API', ' woo-cod-antifraud' ),168 ), 169 ), 170 171 array( 172 'title' => __( 'BeraLabs Gateway Endpoint', ' woo-cod-antifraud' ),173 'desc' => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', ' woo-cod-antifraud' ),166 'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'cod-anti-fraud-for-woocommerce' ), 167 'ultramsg' => __( 'UltraMsg API', 'cod-anti-fraud-for-woocommerce' ), 168 ), 169 ), 170 171 array( 172 'title' => __( 'BeraLabs Gateway Endpoint', 'cod-anti-fraud-for-woocommerce' ), 173 'desc' => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'cod-anti-fraud-for-woocommerce' ), 174 174 'id' => 'wc_cod_antifraud_settings[beralabs_endpoint]', 175 175 'default' => 'https://api.beralabs.it/wa/api/send-otp', … … 179 179 180 180 array( 181 'title' => __( 'BeraLabs API Key', ' woo-cod-antifraud' ),182 'desc' => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', ' woo-cod-antifraud' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'woo-cod-antifraud' ) . ' →</a>',181 'title' => __( 'BeraLabs API Key', 'cod-anti-fraud-for-woocommerce' ), 182 'desc' => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'cod-anti-fraud-for-woocommerce' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'cod-anti-fraud-for-woocommerce' ) . ' →</a>', 183 183 'id' => 'wc_cod_antifraud_settings[beralabs_api_key]', 184 184 'default' => '', … … 188 188 189 189 array( 190 'title' => __( 'UltraMsg Instance ID', ' woo-cod-antifraud' ),191 'desc' => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', ' woo-cod-antifraud' ),190 'title' => __( 'UltraMsg Instance ID', 'cod-anti-fraud-for-woocommerce' ), 191 'desc' => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ), 192 192 'id' => 'wc_cod_antifraud_settings[instance_id]', 193 193 'default' => '', … … 196 196 197 197 array( 198 'title' => __( 'UltraMsg API Token', ' woo-cod-antifraud' ),199 'desc' => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', ' woo-cod-antifraud' ),198 'title' => __( 'UltraMsg API Token', 'cod-anti-fraud-for-woocommerce' ), 199 'desc' => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ), 200 200 'id' => 'wc_cod_antifraud_settings[api_token]', 201 201 'default' => '', … … 204 204 205 205 array( 206 'title' => __( 'OTP Expiry (minutes)', ' woo-cod-antifraud' ),207 'desc' => __( 'Validity duration of the generated OTP code.', ' woo-cod-antifraud' ),206 'title' => __( 'OTP Expiry (minutes)', 'cod-anti-fraud-for-woocommerce' ), 207 'desc' => __( 'Validity duration of the generated OTP code.', 'cod-anti-fraud-for-woocommerce' ), 208 208 'id' => 'wc_cod_antifraud_settings[otp_expiry_minutes]', 209 209 'default' => '5', … … 216 216 217 217 array( 218 'title' => __( 'Maximum OTP Attempts', ' woo-cod-antifraud' ),219 'desc' => __( 'Number of incorrect code attempts allowed before invalidation.', ' woo-cod-antifraud' ),218 'title' => __( 'Maximum OTP Attempts', 'cod-anti-fraud-for-woocommerce' ), 219 'desc' => __( 'Number of incorrect code attempts allowed before invalidation.', 'cod-anti-fraud-for-woocommerce' ), 220 220 'id' => 'wc_cod_antifraud_settings[max_attempts]', 221 221 'default' => '3', … … 228 228 229 229 array( 230 'title' => __( 'WhatsApp Message Template', ' woo-cod-antifraud' ),231 'desc' => __( 'Use {{otp}} as a placeholder for the generated numerical code.', ' woo-cod-antifraud' ),230 'title' => __( 'WhatsApp Message Template', 'cod-anti-fraud-for-woocommerce' ), 231 'desc' => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'cod-anti-fraud-for-woocommerce' ), 232 232 'id' => 'wc_cod_antifraud_settings[custom_message_template]', 233 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' ),233 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ), 234 234 'type' => 'textarea', 235 235 ), … … 262 262 public function save() { 263 263 if ( ! current_user_can( 'manage_woocommerce' ) && ! current_user_can( 'manage_options' ) ) { 264 wp_die( esc_html__( 'You do not have permission to modify these settings.', ' woo-cod-antifraud' ) );264 wp_die( esc_html__( 'You do not have permission to modify these settings.', 'cod-anti-fraud-for-woocommerce' ) ); 265 265 } 266 266 -
cod-anti-fraud-for-woocommerce/tags/2.0.2/includes/class-wccaf-whatsapp.php
r3778566 r3798076 57 57 return array( 58 58 'success' => false, 59 'message' => __( 'Invalid phone number for WhatsApp delivery.', ' woo-cod-antifraud' ),59 'message' => __( 'Invalid phone number for WhatsApp delivery.', 'cod-anti-fraud-for-woocommerce' ), 60 60 ); 61 61 } … … 67 67 return array( 68 68 'success' => false, 69 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', ' woo-cod-antifraud' ),69 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ), 70 70 ); 71 71 } … … 73 73 $template = isset( $settings['custom_message_template'] ) && ! empty( $settings['custom_message_template'] ) 74 74 ? $settings['custom_message_template'] 75 : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' );75 : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ); 76 76 77 77 $message = str_replace( '{{otp}}', $otp, $template ); … … 91 91 return array( 92 92 'success' => false, 93 'message' => __( 'Unsupported WhatsApp provider.', ' woo-cod-antifraud' ),93 'message' => __( 'Unsupported WhatsApp provider.', 'cod-anti-fraud-for-woocommerce' ), 94 94 ); 95 95 } … … 131 131 return array( 132 132 'success' => false, 133 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', ' woo-cod-antifraud' ),133 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'cod-anti-fraud-for-woocommerce' ), 134 134 ); 135 135 } … … 142 142 return array( 143 143 'success' => true, 144 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),144 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 145 145 'message_id' => isset( $data['messageId'] ) ? sanitize_text_field( $data['messageId'] ) : '', 146 146 ); … … 153 153 return array( 154 154 'success' => false, 155 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' ),155 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ), 156 156 ); 157 157 } … … 186 186 return array( 187 187 'success' => false, 188 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', ' woo-cod-antifraud' ),188 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'cod-anti-fraud-for-woocommerce' ), 189 189 ); 190 190 } … … 197 197 return array( 198 198 'success' => true, 199 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),199 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 200 200 ); 201 201 } … … 207 207 return array( 208 208 'success' => false, 209 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' ),209 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ), 210 210 ); 211 211 } -
cod-anti-fraud-for-woocommerce/tags/2.0.2/languages/woo-cod-antifraud.pot
r3769631 r3798076 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0. 1\n"9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.2\n" 10 10 "Report-Msgid-Bugs-To: https://beralabs.it\n" 11 "POT-Creation-Date: 2026-1 0-25 17:51+0100\n"11 "POT-Creation-Date: 2026-11-12 11:07+0100\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 20 #: woo-cod-antifraud.php:129 21 #, php-format 22 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active." 23 msgstr "" 24 25 #: woo-cod-antifraud.php:168 includes/class-wccaf-whatsapp.php:72 26 #: includes/class-wccaf-settings.php:236 20 #: includes/class-wccaf-admin.php:46 21 msgid "Settings" 22 msgstr "" 23 24 #: includes/class-wccaf-admin.php:144 includes/class-wccaf-settings.php:233 25 #: includes/class-wccaf-whatsapp.php:75 woo-cod-antifraud.php:170 27 26 msgid "" 28 27 "Your verification code for the Cash on Delivery order is: {{otp}}. Valid for " … … 30 29 msgstr "" 31 30 32 #: includes/class-wccaf-otp-manager.php:72 33 #, php-format 34 msgid "" 35 "You have exceeded the maximum number of attempts (%1$d requests). Please try " 36 "again in %2$d minutes." 37 msgstr "" 38 39 #: includes/class-wccaf-otp-manager.php:95 40 #, php-format 41 msgid "Too many requests from this IP address. Please try again in %d minutes." 42 msgstr "" 43 44 #: includes/class-wccaf-otp-manager.php:200 45 msgid "Phone number or OTP code not provided." 46 msgstr "" 47 48 #: includes/class-wccaf-otp-manager.php:210 49 msgid "OTP code expired or invalid. Please request a new one." 50 msgstr "" 51 52 #: includes/class-wccaf-otp-manager.php:224 53 msgid "" 54 "Maximum number of incorrect attempts exceeded. Please request a new code." 55 msgstr "" 56 57 #: includes/class-wccaf-otp-manager.php:238 58 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:446 59 msgid "Number verified successfully!" 60 msgstr "" 61 62 #: includes/class-wccaf-otp-manager.php:251 63 #, php-format 64 msgid "Incorrect OTP code. Attempts remaining: %d" 65 msgstr "" 66 67 #: includes/class-wccaf-whatsapp.php:56 68 msgid "Invalid phone number for WhatsApp delivery." 69 msgstr "" 70 71 #: includes/class-wccaf-whatsapp.php:66 72 msgid "" 73 "WhatsApp Gateway not configured. Please enter your API credentials in plugin " 74 "settings." 75 msgstr "" 76 77 #: includes/class-wccaf-whatsapp.php:94 78 msgid "Unsupported WhatsApp provider." 79 msgstr "" 80 81 #: includes/class-wccaf-whatsapp.php:142 includes/class-wccaf-whatsapp.php:214 82 #: includes/class-wccaf-checkout.php:405 83 msgid "Code sent! Please check your WhatsApp." 84 msgstr "" 85 86 #: includes/class-wccaf-whatsapp.php:159 87 #, php-format 88 msgid "Error while sending message via BeraLabs Gateway. Response code: %d" 89 msgstr "" 90 91 #: includes/class-wccaf-whatsapp.php:222 92 #, php-format 93 msgid "Error while sending WhatsApp message. Response code: %d" 94 msgstr "" 95 96 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:394 31 #: includes/class-wccaf-admin.php:164 32 msgid "COD & WhatsApp Anti-Fraud Analysis" 33 msgstr "" 34 35 #: includes/class-wccaf-admin.php:196 36 msgid "This order did not use Cash on Delivery payment method." 37 msgstr "" 38 39 #: includes/class-wccaf-admin.php:214 40 msgid "WhatsApp Verification Status:" 41 msgstr "" 42 43 #: includes/class-wccaf-admin.php:216 44 msgid "WHITELISTED CUSTOMER (VIP)" 45 msgstr "" 46 47 #: includes/class-wccaf-admin.php:218 48 msgid "VERIFIED VIA WHATSAPP" 49 msgstr "" 50 51 #: includes/class-wccaf-admin.php:220 52 msgid "BYPASSED (BELOW THRESHOLD)" 53 msgstr "" 54 55 #: includes/class-wccaf-admin.php:222 56 msgid "NOT VERIFIED" 57 msgstr "" 58 59 #: includes/class-wccaf-admin.php:227 60 msgid "Risk Score:" 61 msgstr "" 62 63 #: includes/class-wccaf-admin.php:233 64 msgid "Verified Phone Number:" 65 msgstr "" 66 67 #: includes/class-wccaf-admin.php:240 68 msgid "Verification Date and Time:" 69 msgstr "" 70 71 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:529 97 72 msgid "" 98 73 "WhatsApp Gateway not configured. Please enter API credentials in plugin " … … 100 75 msgstr "" 101 76 102 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php: 36077 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:482 103 78 msgid "Please enter your phone number in the billing form first." 104 79 msgstr "" … … 112 87 msgstr "" 113 88 114 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:2 8989 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:293 115 90 msgid "Resend WhatsApp Code" 116 91 msgstr "" … … 152 127 msgstr "" 153 128 129 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:600 130 #: includes/class-wccaf-otp-manager.php:339 131 msgid "Number verified successfully!" 132 msgstr "" 133 154 134 #: includes/class-wccaf-checkout.php:159 155 135 msgid "Cash on Delivery verification after order confirmation" … … 176 156 msgstr "" 177 157 178 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:29 5158 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:299 179 159 msgid "OTP Code (6 digits)" 180 160 msgstr "" 181 161 182 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php: 297162 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:302 183 163 msgid "Verify Code" 184 164 msgstr "" 185 165 186 #: includes/class-wccaf-checkout.php:2 39166 #: includes/class-wccaf-checkout.php:243 187 167 msgid "Cash on Delivery WhatsApp Verification" 188 168 msgstr "" 189 169 190 #: includes/class-wccaf-checkout.php:24 4170 #: includes/class-wccaf-checkout.php:248 191 171 msgid "Trusted Customer (Whitelist)" 192 172 msgstr "" 193 173 194 #: includes/class-wccaf-checkout.php:25 0174 #: includes/class-wccaf-checkout.php:254 195 175 #, php-format 196 176 msgid "" … … 198 178 msgstr "" 199 179 200 #: includes/class-wccaf-checkout.php:26 0180 #: includes/class-wccaf-checkout.php:264 201 181 msgid "Number Verified via WhatsApp OTP" 202 182 msgstr "" 203 183 204 #: includes/class-wccaf-checkout.php:2 66184 #: includes/class-wccaf-checkout.php:270 205 185 #, php-format 206 186 msgid "Order #%1$d has passed WhatsApp verification for phone number %2$s." 207 187 msgstr "" 208 188 209 #: includes/class-wccaf-checkout.php:28 0189 #: includes/class-wccaf-checkout.php:284 210 190 #, php-format 211 191 msgid "Enter the OTP code sent via WhatsApp to %s to confirm verification." 212 192 msgstr "" 213 193 214 #: includes/class-wccaf-checkout.php:319 194 #: includes/class-wccaf-checkout.php:324 195 msgid "WooCommerce is not available." 196 msgstr "" 197 198 #: includes/class-wccaf-checkout.php:332 199 msgid "Invalid order specified." 200 msgstr "" 201 202 #: includes/class-wccaf-checkout.php:339 203 msgid "The specified order does not use Cash on Delivery." 204 msgstr "" 205 206 #: includes/class-wccaf-checkout.php:370 207 msgid "Permission denied or invalid order verification key." 208 msgstr "" 209 210 #: includes/class-wccaf-checkout.php:384 211 msgid "" 212 "The verified phone number does not match the billing phone number of this " 213 "order." 214 msgstr "" 215 216 #: includes/class-wccaf-checkout.php:408 215 217 msgid "Cash on Delivery payment is not available for this address." 216 218 msgstr "" 217 219 218 #: includes/class-wccaf-checkout.php: 326220 #: includes/class-wccaf-checkout.php:415 219 221 msgid "VIP/Trusted customer: OTP verification not required." 220 222 msgstr "" 221 223 222 #: includes/class-wccaf-checkout.php:367 224 #: includes/class-wccaf-checkout.php:453 225 msgid "Order is already verified." 226 msgstr "" 227 228 #: includes/class-wccaf-checkout.php:489 223 229 msgid "" 224 230 "Cash on Delivery is not authorized for this contact. Please select another " … … 226 232 msgstr "" 227 233 228 #: includes/class-wccaf-checkout.php: 380234 #: includes/class-wccaf-checkout.php:515 229 235 msgid "Phone number verified automatically (Trusted Whitelist Customer)." 230 236 msgstr "" 231 237 232 #: includes/class-wccaf-checkout.php:426 238 #: includes/class-wccaf-checkout.php:541 includes/class-wccaf-whatsapp.php:144 239 #: includes/class-wccaf-whatsapp.php:199 240 msgid "Code sent! Please check your WhatsApp." 241 msgstr "" 242 243 #: includes/class-wccaf-checkout.php:544 includes/class-wccaf-whatsapp.php:155 244 #: includes/class-wccaf-whatsapp.php:209 245 msgid "" 246 "Could not deliver WhatsApp verification code. Please check your phone number " 247 "and try again." 248 msgstr "" 249 250 #: includes/class-wccaf-checkout.php:580 233 251 msgid "Missing or invalid phone number." 234 252 msgstr "" 235 253 236 #: includes/class-wccaf-checkout.php: 430254 #: includes/class-wccaf-checkout.php:584 237 255 msgid "Please enter a valid 6-digit OTP code." 238 256 msgstr "" 239 257 240 #: includes/class-wccaf-checkout.php: 479 includes/class-wccaf-checkout.php:554241 #: includes/class-wccaf-checkout.php: 628258 #: includes/class-wccaf-checkout.php:638 includes/class-wccaf-checkout.php:718 259 #: includes/class-wccaf-checkout.php:797 242 260 msgid "" 243 261 "Cash on Delivery is not available for this order. Please choose an " … … 245 263 msgstr "" 246 264 247 #: includes/class-wccaf-checkout.php: 493 includes/class-wccaf-checkout.php:568248 #: includes/class-wccaf-checkout.php: 641265 #: includes/class-wccaf-checkout.php:652 includes/class-wccaf-checkout.php:732 266 #: includes/class-wccaf-checkout.php:810 249 267 #, php-format 250 268 msgid "" … … 253 271 msgstr "" 254 272 255 #: includes/class-wccaf-checkout.php: 509 includes/class-wccaf-checkout.php:582256 #: includes/class-wccaf-checkout.php: 654273 #: includes/class-wccaf-checkout.php:668 includes/class-wccaf-checkout.php:746 274 #: includes/class-wccaf-checkout.php:823 257 275 msgid "" 258 276 "Please enter your phone number in the billing form first for Cash on " … … 260 278 msgstr "" 261 279 262 #: includes/class-wccaf-checkout.php: 530 includes/class-wccaf-checkout.php:601263 #: includes/class-wccaf-checkout.php: 672280 #: includes/class-wccaf-checkout.php:691 includes/class-wccaf-checkout.php:767 281 #: includes/class-wccaf-checkout.php:841 264 282 msgid "" 265 283 "WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. " … … 268 286 msgstr "" 269 287 270 #: includes/class-wccaf-admin.php:96 271 msgid "COD & WhatsApp Anti-Fraud Analysis" 272 msgstr "" 273 274 #: includes/class-wccaf-admin.php:127 275 msgid "This order did not use Cash on Delivery payment method." 276 msgstr "" 277 278 #: includes/class-wccaf-admin.php:145 279 msgid "WhatsApp Verification Status:" 280 msgstr "" 281 282 #: includes/class-wccaf-admin.php:147 283 msgid "WHITELISTED CUSTOMER (VIP)" 284 msgstr "" 285 286 #: includes/class-wccaf-admin.php:149 287 msgid "VERIFIED VIA WHATSAPP" 288 msgstr "" 289 290 #: includes/class-wccaf-admin.php:151 291 msgid "BYPASSED (BELOW THRESHOLD)" 292 msgstr "" 293 294 #: includes/class-wccaf-admin.php:153 295 msgid "NOT VERIFIED" 296 msgstr "" 297 298 #: includes/class-wccaf-admin.php:158 299 msgid "Risk Score:" 300 msgstr "" 301 302 #: includes/class-wccaf-admin.php:164 303 msgid "Verified Phone Number:" 304 msgstr "" 305 306 #: includes/class-wccaf-admin.php:171 307 msgid "Verification Date and Time:" 288 #: includes/class-wccaf-checkout.php:869 289 msgid "" 290 "Cash on Delivery order cannot be placed without completing WhatsApp OTP " 291 "phone verification." 292 msgstr "" 293 294 #: includes/class-wccaf-otp-manager.php:113 295 #, php-format 296 msgid "" 297 "You have exceeded the maximum number of attempts (%1$d requests). Please try " 298 "again in %2$d minutes." 299 msgstr "" 300 301 #: includes/class-wccaf-otp-manager.php:136 302 #, php-format 303 msgid "Too many requests from this IP address. Please try again in %d minutes." 304 msgstr "" 305 306 #: includes/class-wccaf-otp-manager.php:255 307 msgid "Phone number or OTP code not provided." 308 msgstr "" 309 310 #: includes/class-wccaf-otp-manager.php:273 311 msgid "OTP code expired or invalid. Please request a new one." 312 msgstr "" 313 314 #: includes/class-wccaf-otp-manager.php:291 315 msgid "OTP code expired. Please request a new one." 316 msgstr "" 317 318 #: includes/class-wccaf-otp-manager.php:305 319 #: includes/class-wccaf-otp-manager.php:352 320 msgid "" 321 "Maximum number of incorrect attempts exceeded. Please request a new code." 322 msgstr "" 323 324 #: includes/class-wccaf-otp-manager.php:366 325 #, php-format 326 msgid "Incorrect OTP code. Attempts remaining: %d" 308 327 msgstr "" 309 328 … … 316 335 msgstr "" 317 336 318 #: includes/class-wccaf-settings.php:5 3337 #: includes/class-wccaf-settings.php:50 319 338 msgid "WooCommerce COD Anti-Fraud Settings" 320 339 msgstr "" 321 340 322 #: includes/class-wccaf-settings.php:5 5341 #: includes/class-wccaf-settings.php:52 323 342 msgid "" 324 343 "Configure WhatsApp OTP verification and risk score management for Cash on " … … 327 346 msgstr "" 328 347 329 #: includes/class-wccaf-settings.php: 60348 #: includes/class-wccaf-settings.php:57 330 349 msgid "OTP Verification Mode (Pre-Checkout Blocking)" 331 350 msgstr "" 332 351 333 #: includes/class-wccaf-settings.php: 61352 #: includes/class-wccaf-settings.php:58 334 353 msgid "" 335 354 "WhatsApp OTP verification occurs directly in cart/checkout before placing " … … 337 356 msgstr "" 338 357 339 #: includes/class-wccaf-settings.php:6 6358 #: includes/class-wccaf-settings.php:63 340 359 msgid "Always Required (All Cash on Delivery Orders)" 341 360 msgstr "" 342 361 343 #: includes/class-wccaf-settings.php:6 7362 #: includes/class-wccaf-settings.php:64 344 363 msgid "Conditional (Based on Risk Score or Cart Total)" 345 364 msgstr "" 346 365 347 #: includes/class-wccaf-settings.php: 72366 #: includes/class-wccaf-settings.php:69 348 367 msgid "Risk Score Threshold (0-100)" 349 368 msgstr "" 350 369 351 #: includes/class-wccaf-settings.php:7 3370 #: includes/class-wccaf-settings.php:70 352 371 msgid "" 353 372 "Require OTP if calculated risk score exceeds this value (only applied in " … … 355 374 msgstr "" 356 375 357 #: includes/class-wccaf-settings.php:8 5376 #: includes/class-wccaf-settings.php:82 358 377 msgid "Minimum Cart Amount for OTP (€)" 359 378 msgstr "" 360 379 361 #: includes/class-wccaf-settings.php:8 6380 #: includes/class-wccaf-settings.php:83 362 381 msgid "" 363 382 "Require OTP only if cart total equals or exceeds this amount (0 for no " … … 365 384 msgstr "" 366 385 367 #: includes/class-wccaf-settings.php:9 7386 #: includes/class-wccaf-settings.php:94 368 387 msgid "Maximum COD Cart Threshold (€)" 369 388 msgstr "" 370 389 371 #: includes/class-wccaf-settings.php:9 8390 #: includes/class-wccaf-settings.php:95 372 391 msgid "Maximum cart value above which the high-threshold rule is applied." 373 392 msgstr "" 374 393 375 #: includes/class-wccaf-settings.php:10 9394 #: includes/class-wccaf-settings.php:106 376 395 msgid "Action Above Maximum Threshold" 377 396 msgstr "" 378 397 379 #: includes/class-wccaf-settings.php:1 10398 #: includes/class-wccaf-settings.php:107 380 399 msgid "Action to take when cart total exceeds the maximum threshold." 381 400 msgstr "" 382 401 383 #: includes/class-wccaf-settings.php:11 5402 #: includes/class-wccaf-settings.php:112 384 403 msgid "Require WhatsApp OTP Verification" 385 404 msgstr "" 386 405 387 #: includes/class-wccaf-settings.php:11 6406 #: includes/class-wccaf-settings.php:113 388 407 msgid "Disable Cash on Delivery Payment Method" 389 408 msgstr "" 390 409 391 #: includes/class-wccaf-settings.php:1 21410 #: includes/class-wccaf-settings.php:118 392 411 msgid "Phone / Email Blacklist" 393 412 msgstr "" 394 413 395 #: includes/class-wccaf-settings.php:1 22414 #: includes/class-wccaf-settings.php:119 396 415 msgid "" 397 416 "Enter phone numbers or emails to block from Cash on Delivery (one per line " … … 399 418 msgstr "" 400 419 401 #: includes/class-wccaf-settings.php:1 30420 #: includes/class-wccaf-settings.php:127 402 421 msgid "Phone / Email Whitelist (VIP)" 403 422 msgstr "" 404 423 405 #: includes/class-wccaf-settings.php:1 31424 #: includes/class-wccaf-settings.php:128 406 425 msgid "" 407 426 "Enter trusted phone numbers or emails to automatically bypass OTP " … … 409 428 msgstr "" 410 429 411 #: includes/class-wccaf-settings.php:13 9430 #: includes/class-wccaf-settings.php:136 412 431 msgid "Max OTP Requests Limit" 413 432 msgstr "" 414 433 415 #: includes/class-wccaf-settings.php:1 40434 #: includes/class-wccaf-settings.php:137 416 435 msgid "Maximum number of OTP requests allowed before temporary lock." 417 436 msgstr "" 418 437 419 #: includes/class-wccaf-settings.php:1 51438 #: includes/class-wccaf-settings.php:148 420 439 msgid "Rate Limit Window (minutes)" 421 440 msgstr "" 422 441 423 #: includes/class-wccaf-settings.php:1 52442 #: includes/class-wccaf-settings.php:149 424 443 msgid "Validity period for request limit in minutes." 425 444 msgstr "" 426 445 427 #: includes/class-wccaf-settings.php:16 3446 #: includes/class-wccaf-settings.php:160 428 447 msgid "WhatsApp Provider" 429 448 msgstr "" 430 449 431 #: includes/class-wccaf-settings.php:16 4450 #: includes/class-wccaf-settings.php:161 432 451 msgid "Select the WhatsApp provider for sending OTP codes." 433 452 msgstr "" 434 453 435 #: includes/class-wccaf-settings.php:16 9454 #: includes/class-wccaf-settings.php:166 436 455 msgid "BeraLabs Gateway (Proprietary)" 437 456 msgstr "" 438 457 439 #: includes/class-wccaf-settings.php:1 70458 #: includes/class-wccaf-settings.php:167 440 459 msgid "UltraMsg API" 441 460 msgstr "" 442 461 443 #: includes/class-wccaf-settings.php:17 5462 #: includes/class-wccaf-settings.php:172 444 463 msgid "BeraLabs Gateway Endpoint" 445 464 msgstr "" 446 465 447 #: includes/class-wccaf-settings.php:17 6466 #: includes/class-wccaf-settings.php:173 448 467 msgid "" 449 468 "Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://" … … 451 470 msgstr "" 452 471 453 #: includes/class-wccaf-settings.php:18 4472 #: includes/class-wccaf-settings.php:181 454 473 msgid "BeraLabs API Key" 455 474 msgstr "" 456 475 457 #: includes/class-wccaf-settings.php:18 5476 #: includes/class-wccaf-settings.php:182 458 477 msgid "" 459 478 "Enter the secret API key (x-api-key) for authentication with BeraLabs " … … 461 480 msgstr "" 462 481 463 #: includes/class-wccaf-settings.php:18 5482 #: includes/class-wccaf-settings.php:182 464 483 msgid "Request WhatsApp API Key" 465 484 msgstr "" 466 485 467 #: includes/class-wccaf-settings.php:19 3486 #: includes/class-wccaf-settings.php:190 468 487 msgid "UltraMsg Instance ID" 469 488 msgstr "" 470 489 471 #: includes/class-wccaf-settings.php:19 4490 #: includes/class-wccaf-settings.php:191 472 491 msgid "" 473 492 "Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used " … … 475 494 msgstr "" 476 495 477 #: includes/class-wccaf-settings.php: 201496 #: includes/class-wccaf-settings.php:198 478 497 msgid "UltraMsg API Token" 479 498 msgstr "" 480 499 481 #: includes/class-wccaf-settings.php: 202500 #: includes/class-wccaf-settings.php:199 482 501 msgid "" 483 502 "Enter the secret API Token provided by UltraMsg. Only used if UltraMsg " … … 485 504 msgstr "" 486 505 487 #: includes/class-wccaf-settings.php:20 9506 #: includes/class-wccaf-settings.php:206 488 507 msgid "OTP Expiry (minutes)" 489 508 msgstr "" 490 509 491 #: includes/class-wccaf-settings.php:2 10510 #: includes/class-wccaf-settings.php:207 492 511 msgid "Validity duration of the generated OTP code." 493 512 msgstr "" 494 513 495 #: includes/class-wccaf-settings.php:2 21514 #: includes/class-wccaf-settings.php:218 496 515 msgid "Maximum OTP Attempts" 497 516 msgstr "" 498 517 499 #: includes/class-wccaf-settings.php:2 22518 #: includes/class-wccaf-settings.php:219 500 519 msgid "Number of incorrect code attempts allowed before invalidation." 501 520 msgstr "" 502 521 503 #: includes/class-wccaf-settings.php:23 3522 #: includes/class-wccaf-settings.php:230 504 523 msgid "WhatsApp Message Template" 505 524 msgstr "" 506 525 507 #: includes/class-wccaf-settings.php:23 4526 #: includes/class-wccaf-settings.php:231 508 527 msgid "Use {{otp}} as a placeholder for the generated numerical code." 509 528 msgstr "" 529 530 #: includes/class-wccaf-settings.php:264 531 msgid "You do not have permission to modify these settings." 532 msgstr "" 533 534 #: includes/class-wccaf-whatsapp.php:59 535 msgid "Invalid phone number for WhatsApp delivery." 536 msgstr "" 537 538 #: includes/class-wccaf-whatsapp.php:69 539 msgid "" 540 "WhatsApp Gateway not configured. Please enter your API credentials in plugin " 541 "settings." 542 msgstr "" 543 544 #: includes/class-wccaf-whatsapp.php:93 545 msgid "Unsupported WhatsApp provider." 546 msgstr "" 547 548 #: includes/class-wccaf-whatsapp.php:133 549 msgid "Unable to connect to WhatsApp Gateway. Please try again later." 550 msgstr "" 551 552 #: includes/class-wccaf-whatsapp.php:188 553 msgid "Unable to connect to WhatsApp provider. Please try again later." 554 msgstr "" 555 556 #: woo-cod-antifraud.php:131 557 #, php-format 558 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active." 559 msgstr "" -
cod-anti-fraud-for-woocommerce/tags/2.0.2/readme.txt
r3778566 r3798076 2 2 Contributors: beralabs 3 3 Donate link: https://beralabs.it 4 Tags: woocommerce, cash on delivery, anti fraud, otp, whatsapp4 Tags: nachnahme, contra reembolso, cash on delivery, anti fraud, woocommerce 5 5 Requires at least: 6.0 6 6 Tested up to: 7.1 … … 28 28 * **Order Meta & Admin Details:** Transparent risk scores and verification timestamps displayed directly inside WooCommerce order details. 29 29 * **PHP 8.x & HPOS Certified:** Fully compatible and tested with PHP 8.0-8.3 and WooCommerce High-Performance Order Storage (HPOS). 30 * **Multi-language & Internationalization (i18n):** Native support for French (France, Belgique, Suisse, Maghreb - fr_FR), German (Deutschland, Österreich, Schweiz - de_DE), Spanish (España y Latinoamérica - es_ES), Italian (it_IT), and English (en_US / en_GB). 31 32 --- 33 34 ### Descripción en Español (Pago Contra Reembolso & Contra Entrega) 35 36 **COD Anti-Fraud for WooCommerce** es la solución definitiva de prevención de fraude y verificación para tiendas online que ofrecen **pago contra reembolso** (España) o **pago contra entrega** (México, Colombia, Chile, Perú, Argentina y Latinoamérica). 37 38 El pago contra reembolso suele sufrir altas tasas de rechazo, paquetes devueltos no reclamados, pedidos falsos y pérdidas logísticas elevadas. Este plugin elimina estos problemas validando la autenticidad del cliente antes de confirmar el pedido mediante **verificación OTP por WhatsApp** y un **motor de evaluación de riesgo**. 39 40 #### Características Principales en Español: 41 * **Verificación OTP por WhatsApp:** Envía automáticamente un código numérico de 6 dígitos al teléfono móvil del comprador vía WhatsApp. El cliente debe validar el código en el checkout antes de poder completar el pedido contra entrega. 42 * **Motor Antifraude Inteligente:** Calcula una puntuación de riesgo (0-100) analizando compras previas canceladas o devueltas, pedidos como invitado y valor del carrito. 43 * **Bloqueo Pre-Checkout Infranqueable:** Protección bidireccional (frontend y backend) que impide finalizar pedidos contra reembolso sin confirmación telefónica válida. 44 * **Umbrales Máximos y Reglas de Importe:** Define importes mínimos o máximos para permitir el pago contra reembolso y desactívalo o exige OTP cuando el carrito supere el límite deseado. 45 * **Gestión de Listas Negras y Listas Blancas (VIP):** Bloquea automáticamente números de teléfono o correos sospechosos y exime de verificación a clientes recurrentes de máxima confianza. 46 * **Prevención de Abusos y Rate Limiting:** Limita los intentos y las solicitudes por dirección IP y teléfono para evitar costes innecesarios de mensajería y ataques de fuerza bruta. 47 * **Integración con Pasarelas WhatsApp:** Compatible de forma nativa con UltraMsg y BeraLab WhatsApp Gateway, fácilmente ampliable a otras APIs. 48 * **Totalmente Localizado en Español:** Interfaz de usuario en el checkout y panel de administración 100% traducidos al español (es_ES / es_419). 49 50 --- 51 52 ### Deutsche Beschreibung (Nachnahme & Betrugsschutz für WooCommerce) 53 54 **COD Anti-Fraud for WooCommerce** ist die professionelle Lösung zur **Betrugsprävention** und Reduzierung von Annahmeverweigerungen für Online-Shops im DACH-Raum (Deutschland, Österreich, Schweiz), die **Nachnahme** als Zahlungsmethode anbieten. 55 56 Der Kauf per Nachnahme birgt für Händler erhebliche finanzielle Risiken: Unzustellbare Sendungen, Spaßbestellungen, unvollständige Adressen und hohe Kosten für Rücksendungen belasten die Marge empfindlich. Dieses Plugin bietet effektiven **Betrugsschutz für WooCommerce**, indem es betrügerische Bestellungen vorab filtert, Händlern hilft, die **Retourenquote reduzieren** zu können, und eine nahtlose **OTP-Verifizierung via WhatsApp & SMS** direkt im Kassenbereich (Pre-Checkout) erzwingt. 57 58 #### Wichtige Funktionen für den DACH-Markt: 59 * **Nachnahme absichern:** Schützen Sie Ihren Shop vor unüberlegten oder böswilligen Nachnahme-Bestellungen und minimieren Sie logistische Ausfallkosten. 60 * **Retourenquote reduzieren:** Durch die Echtzeit-Verifizierung der Mobilfunknummer sinken unzustellbare Pakete und Retouren drastisch (um bis zu 85 %). 61 * **OTP-Verifizierung via WhatsApp & SMS:** Der Kunde erhält direkt beim Checkout einen 6-stelligen Verifizierungscode per WhatsApp. Ohne gültige Bestätigung kann die Nachnahme-Bestellung nicht abgeschlossen werden. 62 * **Nachnahmegebühr & Schwellenwerte:** Schützen Sie sich vor hohen Nachnahmegebühren und logistischen Verlusten durch konfigurierbare Mindest- und Höchstbeträge im Warenkorb. 63 * **Intelligente Risikobewertung (0-100):** Analysiert Gastbestellungen, frühere Stornierungen und Warenkorbwerte zur automatischen Risikobewertung. 64 * **Sperrliste & VIP-Kunden (Blacklist/Whitelist):** Blockieren Sie verdächtige Rufnummern oder E-Mails und befreien Sie verifizierte Stammkunden von wiederholten Prüfungen. 65 * **DSGVO-freundlich & HPOS-zertifiziert:** Vollständige Unterstützung für WooCommerce High-Performance Order Storage (HPOS) und modernste PHP 8.x-Laufzeiten. 66 * **Vollständige deutsche Lokalisierung:** Sowohl das Checkout-Frontend als auch das gesamte Admin-Dashboard sind in fehlerfreiem Deutsch (de_DE) verfügbar. 67 68 --- 69 70 ### Description en Français (Paiement à la Livraison & Contre-Remboursement WooCommerce) 71 72 **COD Anti-Fraud for WooCommerce** est la solution de référence pour la prévention de la fraude et la sécurisation des boutiques en ligne proposant le **paiement à la livraison** (France, Belgique, Suisse et Maghreb : Maroc, Algérie, Tunisie). 73 74 Le paiement à la livraison (COD) engendre fréquemment des commandes fantômes, des adresses erronées et un **taux de retour colis** critique qui grève la rentabilité logistique des e-commerçants. Ce plugin d'**anti-fraude e-commerce** protège vos marges en introduisant une **vérification commande WhatsApp** par code OTP bloquante au panier et au checkout, ainsi qu'un calcul dynamique du risque d'impayé. 75 76 #### Fonctionnalités Clés pour le Marché Francophone : 77 * **Vérification Commande WhatsApp par OTP :** Envoi instantané d'un code de validation à 6 chiffres sur le WhatsApp du client avant la validation du paiement. 78 * **Sécurisation du Contre-Remboursement WooCommerce :** Bloque les commandes suspectes et empêche la finalisation d'un panier en contre-remboursement sans validation mobile préalable. 79 * **Gestion des Frais de Contre-Remboursement & Seuils :** Définissez des paniers minimum et maximum pour amortir ou compenser les **frais de contre-remboursement** et désactivez automatiquement le COD sur les commandes à haut risque. 80 * **Réduction Drastique du Taux de Retour Colis :** Élimine jusqu'à 85 % des colis refusés ou non réclamés à la livraison grâce à la confirmation téléphonique active de l'acheteur. 81 * **Moteur d'Évaluation des Risques (0-100) :** Analyse l'historique d'annulation, les commandes en mode invité et le montant du panier pour isoler les profils frauduleux. 82 * **Gestion des Listes Noires et Listes Blanches (VIP) :** Bannissez les numéros et e-mails récidivistes, tout en exemptant vos clients fidèles de la vérification OTP. 83 * **Haute Compatibilité HPOS & PHP 8.x :** Certifié compatible avec WooCommerce High-Performance Order Storage (HPOS) et PHP 7.4 à 8.3+. 84 * **Traduction Complète en Français (fr_FR) :** Interface client fluide au checkout et panneau d'administration traduits à 100 % en français pour un parcours utilisateur sans friction. 30 85 31 86 == External Services == … … 68 123 Yes, guest checkout is fully supported and analyzed with higher risk evaluation weights. 69 124 125 = ¿Cómo reduce este plugin las devoluciones en pago contra reembolso / contra entrega? = 126 Al exigir que el cliente verifique su número de teléfono mediante un código OTP recibido en su cuenta de WhatsApp activa en tiempo real, se filtran de raíz los números de teléfono falsos, compras impulsivas que luego no se recogen y direcciones fraudulentas. Esto reduce las entregas fallidas hasta en un 85%. 127 128 = ¿Está disponible en idioma español? = 129 Sí, el plugin incluye traducciones nativas y completas en español (es_ES) tanto para los mensajes y botones mostrados al cliente en la pantalla de pago (checkout) como para todo el panel de control y configuración del comerciante. 130 131 = Wie hilft dieses Plugin, die Retourenquote bei Nachnahme zu reduzieren? = 132 Durch die verpflichtende OTP-Verifizierung via WhatsApp & SMS vor dem Kaufabschluss werden gefälschte Adressen und Spaßbestellungen zuverlässig eliminiert. Händler im DACH-Raum können so ihre Retourenquote reduzieren und unnötige Nachnahmegebühr-Verluste sowie Rückversandkosten effektiv vermeiden. 133 134 = Ist das Plugin vollständig auf Deutsch verfügbar? = 135 Ja, das Plugin enthält eine vollständige und professionelle Lokalisierung auf Deutsch (de_DE) für das Kassen-Frontend sowie für alle Menüs und Optionen im WooCommerce-Adminbereich. 136 70 137 == Screenshots == 71 138 … … 82 149 * Enhancement: Protezione da brute force e rate limiting transazionale su Transient per le richieste OTP WhatsApp. 83 150 * Improvement: Piena conformità WooCommerce HPOS (High-Performance Order Storage) e capability check 'manage_woocommerce' nell'admin backend. 151 * Localization: Obiettivo strategico OBJ-08 completato - Internazionalizzazione completa con supporto per lingua spagnola (es_ES / LatAm), generazione template POT aggiornato, catalogo PO/MO compilato e allineamento formale text-domain standard. 84 152 85 153 = 2.0.1 = … … 109 177 == Upgrade Notice == 110 178 179 = 2.0.2 = 180 Recommended upgrade: complete Spanish/LatAm localization (OBJ-08), IDOR prevention, HPOS certified compatibility, and transactional rate limiting. 181 111 182 = 2.0.1 = 112 183 Recommended upgrade for all users: adds WhatsApp OTP checkout flow, strict anti-bypass validation, UX optimizations, certified HPOS compatibility, and passed E2E test validations. -
cod-anti-fraud-for-woocommerce/tags/2.0.2/woo-cod-antifraud.php
r3778566 r3798076 7 7 * Author: BeraLab 8 8 * Author URI: https://beralabs.it 9 * Text Domain: woo-cod-antifraud9 * Text Domain: cod-anti-fraud-for-woocommerce 10 10 * Domain Path: /languages 11 11 * Requires at least: 6.0 … … 92 92 // Load Translations 93 93 // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound 94 load_plugin_textdomain( ' woo-cod-antifraud', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );94 load_plugin_textdomain( 'cod-anti-fraud-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 95 95 96 96 // Include internal components … … 129 129 sprintf( 130 130 /* translators: %s: WooCommerce plugin link */ 131 __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', ' woo-cod-antifraud' ),131 __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'cod-anti-fraud-for-woocommerce' ), 132 132 '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" rel="noopener noreferrer">WooCommerce</a>' 133 133 ), … … 168 168 'otp_expiry_minutes' => 5, 169 169 'max_attempts' => 3, 170 'custom_message_template' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' ),170 'custom_message_template' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ), 171 171 ); 172 172 update_option( 'wc_cod_antifraud_settings', $defaults ); -
cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-admin.php
r3778566 r3798076 44 44 '<a href="%s">%s</a>', 45 45 esc_url( $settings_url ), 46 esc_html__( 'Settings', ' woo-cod-antifraud' )46 esc_html__( 'Settings', 'cod-anti-fraud-for-woocommerce' ) 47 47 ); 48 48 array_unshift( $links, $settings_link ); … … 142 142 143 143 $custom_message = isset( $input['custom_message_template'] ) ? sanitize_textarea_field( $input['custom_message_template'] ) : ''; 144 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' );144 $output['custom_message_template'] = ! empty( $custom_message ) ? $custom_message : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ); 145 145 146 146 return $output; … … 162 162 add_meta_box( 163 163 'wccaf_order_meta_box', 164 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', ' woo-cod-antifraud' ),164 esc_html__( 'COD & WhatsApp Anti-Fraud Analysis', 'cod-anti-fraud-for-woocommerce' ), 165 165 array( $this, 'render_order_meta_box' ), 166 166 $screen, … … 194 194 if ( 'cod' !== $order->get_payment_method() ) { 195 195 ?> 196 <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', ' woo-cod-antifraud' ); ?></p>196 <p><?php esc_html_e( 'This order did not use Cash on Delivery payment method.', 'cod-anti-fraud-for-woocommerce' ); ?></p> 197 197 <?php 198 198 return; … … 212 212 <div style="font-size:14px; line-height:1.6;"> 213 213 <p> 214 <strong><?php esc_html_e( 'WhatsApp Verification Status:', ' woo-cod-antifraud' ); ?></strong><br>214 <strong><?php esc_html_e( 'WhatsApp Verification Status:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 215 215 <?php if ( 'yes' === $whitelisted ) : ?> 216 <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', ' woo-cod-antifraud' ); ?></span>216 <span style="color:#fff; background:#0275d8; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'WHITELISTED CUSTOMER (VIP)', 'cod-anti-fraud-for-woocommerce' ); ?></span> 217 217 <?php elseif ( 'yes' === $verified ) : ?> 218 <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', ' woo-cod-antifraud' ); ?></span>218 <span style="color:#fff; background:#5cb85c; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'VERIFIED VIA WHATSAPP', 'cod-anti-fraud-for-woocommerce' ); ?></span> 219 219 <?php elseif ( 'no' === $otp_required ) : ?> 220 <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', ' woo-cod-antifraud' ); ?></span>220 <span style="color:#333; background:#e0e0e0; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'BYPASSED (BELOW THRESHOLD)', 'cod-anti-fraud-for-woocommerce' ); ?></span> 221 221 <?php else : ?> 222 <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', ' woo-cod-antifraud' ); ?></span>222 <span style="color:#fff; background:#d9534f; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php esc_html_e( 'NOT VERIFIED', 'cod-anti-fraud-for-woocommerce' ); ?></span> 223 223 <?php endif; ?> 224 224 </p> 225 225 226 226 <p> 227 <strong><?php esc_html_e( 'Risk Score:', ' woo-cod-antifraud' ); ?></strong><br>227 <strong><?php esc_html_e( 'Risk Score:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 228 228 <span style="background:<?php echo esc_attr( $badge_color ); ?>; color:#fff; padding:3px 8px; border-radius:3px; font-weight:bold; display:inline-block; margin-top:3px;"><?php echo esc_html( (string) $score_val ); ?> / 100</span> 229 229 </p> … … 231 231 <?php if ( $phone ) : ?> 232 232 <p> 233 <strong><?php esc_html_e( 'Verified Phone Number:', ' woo-cod-antifraud' ); ?></strong><br>233 <strong><?php esc_html_e( 'Verified Phone Number:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 234 234 <code><?php echo esc_html( (string) $phone ); ?></code> 235 235 </p> … … 238 238 <?php if ( $timestamp ) : ?> 239 239 <p> 240 <strong><?php esc_html_e( 'Verification Date and Time:', ' woo-cod-antifraud' ); ?></strong><br>240 <strong><?php esc_html_e( 'Verification Date and Time:', 'cod-anti-fraud-for-woocommerce' ); ?></strong><br> 241 241 <small><?php echo esc_html( (string) $timestamp ); ?></small> 242 242 </p> -
cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-checkout.php
r3778566 r3798076 113 113 'max_cart_action' => $max_action, 114 114 'verification_timing' => $verification_timing, 115 'not_configured_msg' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', ' woo-cod-antifraud' ),115 'not_configured_msg' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ), 116 116 'i18n' => array( 117 'enter_phone' => __( 'Please enter your phone number in the billing form first.', ' woo-cod-antifraud' ),118 'invalid_phone' => __( 'Please enter a valid phone number in the billing form.', ' woo-cod-antifraud' ),119 'sending_otp' => __( 'Sending OTP code...', ' woo-cod-antifraud' ),120 'resend_btn' => __( 'Resend WhatsApp Code', ' woo-cod-antifraud' ),121 'send_error' => __( 'Error while sending OTP.', ' woo-cod-antifraud' ),122 'conn_error' => __( 'Server connection error. Please try again.', ' woo-cod-antifraud' ),123 'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', ' woo-cod-antifraud' ),124 'verifying' => __( 'Verifying code...', ' woo-cod-antifraud' ),125 'verified_btn' => __( 'Verified', ' woo-cod-antifraud' ),126 'invalid_otp' => __( 'Invalid or expired OTP code.', ' woo-cod-antifraud' ),127 'verify_error' => __( 'Error during verification with server.', ' woo-cod-antifraud' ),128 'missing_phone' => __( 'Missing phone number.', ' woo-cod-antifraud' ),129 'otp_sent' => __( 'OTP code sent successfully!', ' woo-cod-antifraud' ),130 'verified_success' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),117 'enter_phone' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ), 118 'invalid_phone' => __( 'Please enter a valid phone number in the billing form.', 'cod-anti-fraud-for-woocommerce' ), 119 'sending_otp' => __( 'Sending OTP code...', 'cod-anti-fraud-for-woocommerce' ), 120 'resend_btn' => __( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ), 121 'send_error' => __( 'Error while sending OTP.', 'cod-anti-fraud-for-woocommerce' ), 122 'conn_error' => __( 'Server connection error. Please try again.', 'cod-anti-fraud-for-woocommerce' ), 123 'enter_6_digits' => __( 'Please enter the 6-digit code received before verifying.', 'cod-anti-fraud-for-woocommerce' ), 124 'verifying' => __( 'Verifying code...', 'cod-anti-fraud-for-woocommerce' ), 125 'verified_btn' => __( 'Verified', 'cod-anti-fraud-for-woocommerce' ), 126 'invalid_otp' => __( 'Invalid or expired OTP code.', 'cod-anti-fraud-for-woocommerce' ), 127 'verify_error' => __( 'Error during verification with server.', 'cod-anti-fraud-for-woocommerce' ), 128 'missing_phone' => __( 'Missing phone number.', 'cod-anti-fraud-for-woocommerce' ), 129 'otp_sent' => __( 'OTP code sent successfully!', 'cod-anti-fraud-for-woocommerce' ), 130 'verified_success' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 131 131 ), 132 132 ); … … 157 157 <span style="font-size:22px; line-height:1;">📱</span> 158 158 <div> 159 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', ' woo-cod-antifraud' ); ?></strong>159 <strong style="color:#004085; font-size:14px;"><?php esc_html_e( 'Cash on Delivery verification after order confirmation', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 160 160 <p style="margin:4px 0 0 0; font-size:13px; color:#383d41;"> 161 <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', ' woo-cod-antifraud' ); ?>161 <?php esc_html_e( 'You will receive the OTP code via WhatsApp immediately after confirming the order on the receipt page.', 'cod-anti-fraud-for-woocommerce' ); ?> 162 162 </p> 163 163 </div> … … 171 171 <div class="wc-cod-otp-header"> 172 172 <span class="wc-cod-whatsapp-icon">📱</span> 173 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', ' woo-cod-antifraud' ); ?></h3>173 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Mandatory WhatsApp Verification for Cash on Delivery', 'cod-anti-fraud-for-woocommerce' ); ?></h3> 174 174 </div> 175 175 176 176 <p class="wc-cod-otp-instructions"> 177 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', ' woo-cod-antifraud' ); ?>177 <?php esc_html_e( 'To complete your Cash on Delivery order, you will receive an OTP code on your WhatsApp number.', 'cod-anti-fraud-for-woocommerce' ); ?> 178 178 </p> 179 179 … … 181 181 <div class="wc-cod-otp-actions"> 182 182 <button type="button" id="wc-cod-send-otp-btn" class="button wc-cod-btn wc-cod-btn-send"> 183 <span>📱 <?php esc_html_e( 'Send WhatsApp Code', ' woo-cod-antifraud' ); ?></span>183 <span>📱 <?php esc_html_e( 'Send WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 184 184 </button> 185 185 </div> … … 188 188 <div class="wc-cod-otp-verify-block" id="wc-cod-otp-verify-block"> 189 189 <div class="wc-cod-input-row"> 190 <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', ' woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />190 <input type="text" id="wc-cod-otp-input" name="wc_cod_otp_input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" /> 191 191 <button type="button" id="wc-cod-verify-otp-btn" class="button wc-cod-btn wc-cod-btn-verify"> 192 <span><?php esc_html_e( 'Verify Code', ' woo-cod-antifraud' ); ?></span>192 <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 193 193 </button> 194 194 </div> … … 241 241 <div class="wc-cod-otp-header"> 242 242 <span class="wc-cod-whatsapp-icon">📱</span> 243 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', ' woo-cod-antifraud' ); ?></h3>243 <h3 class="wc-cod-otp-title">🔒 <?php esc_html_e( 'Cash on Delivery WhatsApp Verification', 'cod-anti-fraud-for-woocommerce' ); ?></h3> 244 244 </div> 245 245 246 246 <?php if ( 'yes' === $whitelisted ) : ?> 247 247 <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;"> 248 🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', ' woo-cod-antifraud' ); ?></strong>248 🌟 <strong><?php esc_html_e( 'Trusted Customer (Whitelist)', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 249 249 <p style="margin: 6px 0 0 0;"> 250 250 <?php … … 252 252 sprintf( 253 253 /* translators: 1: Order ID, 2: Phone number */ 254 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', ' woo-cod-antifraud' ),254 __( 'Order #%1$d was successfully confirmed for phone %2$s without requiring OTP.', 'cod-anti-fraud-for-woocommerce' ), 255 255 intval( $order_id ), 256 256 $phone … … 262 262 <?php elseif ( 'yes' === $verified ) : ?> 263 263 <div class="wc-cod-otp-status wc-cod-status-success" style="display:block; margin-top: 14px;"> 264 ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', ' woo-cod-antifraud' ); ?></strong>264 ✅ <strong><?php esc_html_e( 'Number Verified via WhatsApp OTP', 'cod-anti-fraud-for-woocommerce' ); ?></strong> 265 265 <p style="margin: 6px 0 0 0;"> 266 266 <?php … … 268 268 sprintf( 269 269 /* translators: 1: Order ID, 2: Phone number */ 270 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', ' woo-cod-antifraud' ),270 __( 'Order #%1$d has passed WhatsApp verification for phone number %2$s.', 'cod-anti-fraud-for-woocommerce' ), 271 271 intval( $order_id ), 272 272 $phone … … 282 282 sprintf( 283 283 /* translators: %s: Customer phone number */ 284 __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', ' woo-cod-antifraud' ),284 __( 'Enter the OTP code sent via WhatsApp to %s to confirm verification.', 'cod-anti-fraud-for-woocommerce' ), 285 285 $phone 286 286 ) … … 291 291 <div class="wc-cod-otp-actions" style="margin-bottom: 12px;"> 292 292 <button type="button" id="wc-cod-thankyou-resend-btn" class="button wc-cod-btn wc-cod-btn-send" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>"> 293 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', ' woo-cod-antifraud' ); ?></span>293 <span>📱 <?php esc_html_e( 'Resend WhatsApp Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 294 294 </button> 295 295 </div> … … 297 297 <div class="wc-cod-otp-verify-block" style="display:block;"> 298 298 <div class="wc-cod-input-row"> 299 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', ' woo-cod-antifraud' ); ?>" maxlength="6" autocomplete="one-time-code" />299 <input type="text" id="wc-cod-thankyou-otp-input" class="input-text wc-cod-otp-input" placeholder="<?php echo esc_attr__( 'OTP Code (6 digits)', 'cod-anti-fraud-for-woocommerce' ); ?>" maxlength="6" autocomplete="one-time-code" /> 300 300 <input type="hidden" id="wc-cod-thankyou-order-key" value="<?php echo esc_attr( $order_key ); ?>" /> 301 301 <button type="button" id="wc-cod-thankyou-verify-btn" class="button wc-cod-btn wc-cod-btn-verify" data-phone="<?php echo esc_attr( $phone ); ?>" data-order-id="<?php echo esc_attr( $order_id ); ?>" data-order-key="<?php echo esc_attr( $order_key ); ?>"> 302 <span><?php esc_html_e( 'Verify Code', ' woo-cod-antifraud' ); ?></span>302 <span><?php esc_html_e( 'Verify Code', 'cod-anti-fraud-for-woocommerce' ); ?></span> 303 303 </button> 304 304 </div> … … 322 322 return array( 323 323 'valid' => false, 324 'message' => __( 'WooCommerce is not available.', ' woo-cod-antifraud' ),324 'message' => __( 'WooCommerce is not available.', 'cod-anti-fraud-for-woocommerce' ), 325 325 ); 326 326 } … … 330 330 return array( 331 331 'valid' => false, 332 'message' => __( 'Invalid order specified.', ' woo-cod-antifraud' ),332 'message' => __( 'Invalid order specified.', 'cod-anti-fraud-for-woocommerce' ), 333 333 ); 334 334 } … … 337 337 return array( 338 338 'valid' => false, 339 'message' => __( 'The specified order does not use Cash on Delivery.', ' woo-cod-antifraud' ),339 'message' => __( 'The specified order does not use Cash on Delivery.', 'cod-anti-fraud-for-woocommerce' ), 340 340 ); 341 341 } … … 368 368 return array( 369 369 'valid' => false, 370 'message' => __( 'Permission denied or invalid order verification key.', ' woo-cod-antifraud' ),370 'message' => __( 'Permission denied or invalid order verification key.', 'cod-anti-fraud-for-woocommerce' ), 371 371 ); 372 372 } … … 382 382 return array( 383 383 'valid' => false, 384 'message' => __( 'The verified phone number does not match the billing phone number of this order.', ' woo-cod-antifraud' ),384 'message' => __( 'The verified phone number does not match the billing phone number of this order.', 'cod-anti-fraud-for-woocommerce' ), 385 385 ); 386 386 } … … 406 406 wp_send_json_success( array( 407 407 'blacklisted' => true, 408 'message' => __( 'Cash on Delivery payment is not available for this address.', ' woo-cod-antifraud' ),408 'message' => __( 'Cash on Delivery payment is not available for this address.', 'cod-anti-fraud-for-woocommerce' ), 409 409 ) ); 410 410 } … … 413 413 wp_send_json_success( array( 414 414 'whitelisted' => true, 415 'message' => __( 'VIP/Trusted customer: OTP verification not required.', ' woo-cod-antifraud' ),415 'message' => __( 'VIP/Trusted customer: OTP verification not required.', 'cod-anti-fraud-for-woocommerce' ), 416 416 ) ); 417 417 } … … 451 451 wp_send_json_success( array( 452 452 'already_verified' => true, 453 'message' => __( 'Order is already verified.', ' woo-cod-antifraud' ),453 'message' => __( 'Order is already verified.', 'cod-anti-fraud-for-woocommerce' ), 454 454 ) ); 455 455 } … … 480 480 481 481 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 482 wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', ' woo-cod-antifraud' ) ) );482 wp_send_json_error( array( 'message' => __( 'Please enter your phone number in the billing form first.', 'cod-anti-fraud-for-woocommerce' ) ) ); 483 483 } 484 484 … … 487 487 wp_send_json_error( array( 488 488 'blacklisted' => true, 489 'message' => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', ' woo-cod-antifraud' ),489 'message' => __( 'Cash on Delivery is not authorized for this contact. Please select another payment method.', 'cod-anti-fraud-for-woocommerce' ), 490 490 ) ); 491 491 } … … 513 513 wp_send_json_success( array( 514 514 'whitelisted' => true, 515 'message' => __( 'Phone number verified automatically (Trusted Whitelist Customer).', ' woo-cod-antifraud' ),515 'message' => __( 'Phone number verified automatically (Trusted Whitelist Customer).', 'cod-anti-fraud-for-woocommerce' ), 516 516 'token' => $token, 517 517 ) ); … … 527 527 $settings = get_option( 'wc_cod_antifraud_settings', array() ); 528 528 if ( ! WCCAF_WhatsApp::is_configured( $settings ) ) { 529 wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', ' woo-cod-antifraud' ) ) );529 wp_send_json_error( array( 'message' => __( 'WhatsApp Gateway not configured. Please enter API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ) ) ); 530 530 } 531 531 … … 539 539 // Strict Information Leakage Prevention: NEVER return OTP to client 540 540 wp_send_json_success( array( 541 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),541 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 542 542 ) ); 543 543 } else { 544 $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' );544 $error_message = ! empty( $result['message'] ) ? sanitize_text_field( $result['message'] ) : __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ); 545 545 wp_send_json_error( array( 'message' => $error_message ) ); 546 546 } … … 578 578 579 579 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 580 wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', ' woo-cod-antifraud' ) ) );580 wp_send_json_error( array( 'message' => __( 'Missing or invalid phone number.', 'cod-anti-fraud-for-woocommerce' ) ) ); 581 581 } 582 582 583 583 if ( empty( $otp ) || strlen( $otp ) !== 6 ) { 584 wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', ' woo-cod-antifraud' ) ) );584 wp_send_json_error( array( 'message' => __( 'Please enter a valid 6-digit OTP code.', 'cod-anti-fraud-for-woocommerce' ) ) ); 585 585 } 586 586 … … 598 598 599 599 wp_send_json_success( array( 600 'message' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),600 'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 601 601 'token' => $token, 602 602 ) ); … … 636 636 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 637 637 if ( function_exists( 'wc_add_notice' ) ) { 638 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ), 'error' );638 wc_add_notice( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 639 639 } 640 640 return; … … 650 650 $notice_msg = sprintf( 651 651 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 652 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),652 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 653 653 wc_price( $cart_total ), 654 654 wc_price( $max_amount ) … … 666 666 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 667 667 if ( function_exists( 'wc_add_notice' ) ) { 668 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ), 'error' );668 wc_add_notice( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 669 669 } 670 670 return; … … 689 689 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) { 690 690 if ( function_exists( 'wc_add_notice' ) ) { 691 wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ), 'error' );691 wc_add_notice( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ), 'error' ); 692 692 } 693 693 } … … 716 716 // 1. Blacklist Check 717 717 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 718 $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ) );718 $errors->add( 'validation', esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) ); 719 719 return; 720 720 } … … 730 730 $notice_msg = sprintf( 731 731 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 732 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),732 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 733 733 $formatted_cart, 734 734 $formatted_max … … 744 744 745 745 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 746 $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ) );746 $errors->add( 'validation', esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) ); 747 747 return; 748 748 } … … 765 765 $token = isset( $_POST['wc_cod_otp_token'] ) ? sanitize_text_field( wp_unslash( $_POST['wc_cod_otp_token'] ) ) : ''; 766 766 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone, $token ) ) { 767 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ) );767 $errors->add( 'validation', esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) ); 768 768 } 769 769 } … … 795 795 // 1. Blacklist Check 796 796 if ( WCCAF_Risk_Engine::is_blacklisted( $clean_phone, $billing_email ) ) { 797 throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', ' woo-cod-antifraud' ) );797 throw new \Exception( esc_html__( 'Cash on Delivery is not available for this order. Please choose an alternative payment method.', 'cod-anti-fraud-for-woocommerce' ) ); 798 798 } 799 799 … … 808 808 $exception_msg = sprintf( 809 809 /* translators: 1: formatted cart total, 2: formatted maximum amount */ 810 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', ' woo-cod-antifraud' ),810 __( 'Cart total (%1$s) exceeds the maximum allowed threshold for Cash on Delivery (%2$s). Please select an electronic payment method.', 'cod-anti-fraud-for-woocommerce' ), 811 811 $formatted_cart, 812 812 $formatted_max … … 821 821 822 822 if ( empty( $clean_phone ) || strlen( $digits_only ) < 6 ) { 823 throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', ' woo-cod-antifraud' ) );823 throw new \Exception( esc_html__( 'Please enter your phone number in the billing form first for Cash on Delivery verification.', 'cod-anti-fraud-for-woocommerce' ) ); 824 824 } 825 825 … … 839 839 if ( $is_required ) { 840 840 if ( ! WCCAF_OTP_Manager::is_phone_verified_in_session( $clean_phone ) ) { 841 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', ' woo-cod-antifraud' ) );841 throw new \Exception( esc_html__( 'WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. Please enter and verify the OTP code sent to your number before confirming the order.', 'cod-anti-fraud-for-woocommerce' ) ); 842 842 } 843 843 } … … 867 867 // Strict Integrity Gate: se OTP è obbligatorio in pre-checkout, impedire la creazione dell'ordine non verificato 868 868 if ( 'pre_checkout' === $timing && $required && 'yes' !== $is_verified ) { 869 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', ' woo-cod-antifraud' ) );869 throw new \Exception( esc_html__( 'Cash on Delivery order cannot be placed without completing WhatsApp OTP phone verification.', 'cod-anti-fraud-for-woocommerce' ) ); 870 870 } 871 871 -
cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-otp-manager.php
r3778566 r3798076 111 111 'message' => sprintf( 112 112 /* translators: 1: max requests, 2: minutes left */ 113 __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', ' woo-cod-antifraud' ),113 __( 'You have exceeded the maximum number of attempts (%1$d requests). Please try again in %2$d minutes.', 'cod-anti-fraud-for-woocommerce' ), 114 114 $max_requests, 115 115 $time_left … … 134 134 'message' => sprintf( 135 135 /* translators: %d: minutes left */ 136 __( 'Too many requests from this IP address. Please try again in %d minutes.', ' woo-cod-antifraud' ),136 __( 'Too many requests from this IP address. Please try again in %d minutes.', 'cod-anti-fraud-for-woocommerce' ), 137 137 $time_left 138 138 ), … … 253 253 return array( 254 254 'success' => false, 255 'message' => __( 'Phone number or OTP code not provided.', ' woo-cod-antifraud' ),255 'message' => __( 'Phone number or OTP code not provided.', 'cod-anti-fraud-for-woocommerce' ), 256 256 ); 257 257 } … … 271 271 return array( 272 272 'success' => false, 273 'message' => __( 'OTP code expired or invalid. Please request a new one.', ' woo-cod-antifraud' ),273 'message' => __( 'OTP code expired or invalid. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ), 274 274 ); 275 275 } … … 289 289 return array( 290 290 'success' => false, 291 'message' => __( 'OTP code expired. Please request a new one.', ' woo-cod-antifraud' ),291 'message' => __( 'OTP code expired. Please request a new one.', 'cod-anti-fraud-for-woocommerce' ), 292 292 ); 293 293 } … … 303 303 return array( 304 304 'success' => false, 305 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', ' woo-cod-antifraud' ),305 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ), 306 306 ); 307 307 } … … 337 337 return array( 338 338 'success' => true, 339 'message' => __( 'Number verified successfully!', ' woo-cod-antifraud' ),339 'message' => __( 'Number verified successfully!', 'cod-anti-fraud-for-woocommerce' ), 340 340 'token' => $token, 341 341 ); … … 350 350 return array( 351 351 'success' => false, 352 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', ' woo-cod-antifraud' ),352 'message' => __( 'Maximum number of incorrect attempts exceeded. Please request a new code.', 'cod-anti-fraud-for-woocommerce' ), 353 353 ); 354 354 } … … 364 364 'message' => sprintf( 365 365 /* translators: %d: remaining attempts */ 366 __( 'Incorrect OTP code. Attempts remaining: %d', ' woo-cod-antifraud' ),366 __( 'Incorrect OTP code. Attempts remaining: %d', 'cod-anti-fraud-for-woocommerce' ), 367 367 max( 0, $max_attempts - $data['attempts'] ) 368 368 ), -
cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-settings.php
r3778566 r3798076 22 22 public function __construct() { 23 23 $this->id = 'wc_cod_antifraud'; 24 $this->label = __( 'COD Anti-Fraud', ' woo-cod-antifraud' );24 $this->label = __( 'COD Anti-Fraud', 'cod-anti-fraud-for-woocommerce' ); 25 25 26 26 parent::__construct(); … … 34 34 public function get_sections() { 35 35 $sections = array( 36 '' => __( 'General Settings', ' woo-cod-antifraud' ),36 '' => __( 'General Settings', 'cod-anti-fraud-for-woocommerce' ), 37 37 ); 38 38 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound … … 48 48 $settings = array( 49 49 array( 50 'title' => __( 'WooCommerce COD Anti-Fraud Settings', ' woo-cod-antifraud' ),50 'title' => __( 'WooCommerce COD Anti-Fraud Settings', 'cod-anti-fraud-for-woocommerce' ), 51 51 'type' => 'title', 52 'desc' => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', ' woo-cod-antifraud' ),52 'desc' => __( 'Configure WhatsApp OTP verification and risk score management for Cash on Delivery orders. Protection is always active and operates in blocking pre-checkout mode before the order is placed.', 'cod-anti-fraud-for-woocommerce' ), 53 53 'id' => 'wc_cod_antifraud_options_section', 54 54 ), 55 55 56 56 array( 57 'title' => __( 'OTP Verification Mode (Pre-Checkout Blocking)', ' woo-cod-antifraud' ),58 'desc' => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', ' woo-cod-antifraud' ),57 'title' => __( 'OTP Verification Mode (Pre-Checkout Blocking)', 'cod-anti-fraud-for-woocommerce' ), 58 'desc' => __( 'WhatsApp OTP verification occurs directly in cart/checkout before placing the order. Select activation condition.', 'cod-anti-fraud-for-woocommerce' ), 59 59 'id' => 'wc_cod_antifraud_settings[require_otp_mode]', 60 60 'default' => 'always', 61 61 'type' => 'select', 62 62 'options' => array( 63 'always' => __( 'Always Required (All Cash on Delivery Orders)', ' woo-cod-antifraud' ),64 'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', ' woo-cod-antifraud' ),65 ), 66 ), 67 68 array( 69 'title' => __( 'Risk Score Threshold (0-100)', ' woo-cod-antifraud' ),70 'desc' => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', ' woo-cod-antifraud' ),63 'always' => __( 'Always Required (All Cash on Delivery Orders)', 'cod-anti-fraud-for-woocommerce' ), 64 'risk_based' => __( 'Conditional (Based on Risk Score or Cart Total)', 'cod-anti-fraud-for-woocommerce' ), 65 ), 66 ), 67 68 array( 69 'title' => __( 'Risk Score Threshold (0-100)', 'cod-anti-fraud-for-woocommerce' ), 70 'desc' => __( 'Require OTP if calculated risk score exceeds this value (only applied in conditional mode).', 'cod-anti-fraud-for-woocommerce' ), 71 71 'id' => 'wc_cod_antifraud_settings[risk_threshold]', 72 72 'default' => '40', … … 80 80 81 81 array( 82 'title' => __( 'Minimum Cart Amount for OTP (€)', ' woo-cod-antifraud' ),83 'desc' => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', ' woo-cod-antifraud' ),82 'title' => __( 'Minimum Cart Amount for OTP (€)', 'cod-anti-fraud-for-woocommerce' ), 83 'desc' => __( 'Require OTP only if cart total equals or exceeds this amount (0 for no minimum).', 'cod-anti-fraud-for-woocommerce' ), 84 84 'id' => 'wc_cod_antifraud_settings[min_cart_amount_otp]', 85 85 'default' => '0', … … 92 92 93 93 array( 94 'title' => __( 'Maximum COD Cart Threshold (€)', ' woo-cod-antifraud' ),95 'desc' => __( 'Maximum cart value above which the high-threshold rule is applied.', ' woo-cod-antifraud' ),94 'title' => __( 'Maximum COD Cart Threshold (€)', 'cod-anti-fraud-for-woocommerce' ), 95 'desc' => __( 'Maximum cart value above which the high-threshold rule is applied.', 'cod-anti-fraud-for-woocommerce' ), 96 96 'id' => 'wc_cod_antifraud_settings[max_cart_amount_cod]', 97 97 'default' => '500', … … 104 104 105 105 array( 106 'title' => __( 'Action Above Maximum Threshold', ' woo-cod-antifraud' ),107 'desc' => __( 'Action to take when cart total exceeds the maximum threshold.', ' woo-cod-antifraud' ),106 'title' => __( 'Action Above Maximum Threshold', 'cod-anti-fraud-for-woocommerce' ), 107 'desc' => __( 'Action to take when cart total exceeds the maximum threshold.', 'cod-anti-fraud-for-woocommerce' ), 108 108 'id' => 'wc_cod_antifraud_settings[max_cart_action]', 109 109 'default' => 'require_otp', 110 110 'type' => 'select', 111 111 'options' => array( 112 'require_otp' => __( 'Require WhatsApp OTP Verification', ' woo-cod-antifraud' ),113 'disable_cod' => __( 'Disable Cash on Delivery Payment Method', ' woo-cod-antifraud' ),114 ), 115 ), 116 117 array( 118 'title' => __( 'Phone / Email Blacklist', ' woo-cod-antifraud' ),119 'desc' => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', ' woo-cod-antifraud' ),112 'require_otp' => __( 'Require WhatsApp OTP Verification', 'cod-anti-fraud-for-woocommerce' ), 113 'disable_cod' => __( 'Disable Cash on Delivery Payment Method', 'cod-anti-fraud-for-woocommerce' ), 114 ), 115 ), 116 117 array( 118 'title' => __( 'Phone / Email Blacklist', 'cod-anti-fraud-for-woocommerce' ), 119 'desc' => __( 'Enter phone numbers or emails to block from Cash on Delivery (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ), 120 120 'id' => 'wc_cod_antifraud_settings[blacklist_phones]', 121 121 'default' => '', … … 125 125 126 126 array( 127 'title' => __( 'Phone / Email Whitelist (VIP)', ' woo-cod-antifraud' ),128 'desc' => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', ' woo-cod-antifraud' ),127 'title' => __( 'Phone / Email Whitelist (VIP)', 'cod-anti-fraud-for-woocommerce' ), 128 'desc' => __( 'Enter trusted phone numbers or emails to automatically bypass OTP verification (one per line or comma-separated).', 'cod-anti-fraud-for-woocommerce' ), 129 129 'id' => 'wc_cod_antifraud_settings[whitelist_phones]', 130 130 'default' => '', … … 134 134 135 135 array( 136 'title' => __( 'Max OTP Requests Limit', ' woo-cod-antifraud' ),137 'desc' => __( 'Maximum number of OTP requests allowed before temporary lock.', ' woo-cod-antifraud' ),136 'title' => __( 'Max OTP Requests Limit', 'cod-anti-fraud-for-woocommerce' ), 137 'desc' => __( 'Maximum number of OTP requests allowed before temporary lock.', 'cod-anti-fraud-for-woocommerce' ), 138 138 'id' => 'wc_cod_antifraud_settings[rate_limit_max_requests]', 139 139 'default' => '3', … … 146 146 147 147 array( 148 'title' => __( 'Rate Limit Window (minutes)', ' woo-cod-antifraud' ),149 'desc' => __( 'Validity period for request limit in minutes.', ' woo-cod-antifraud' ),148 'title' => __( 'Rate Limit Window (minutes)', 'cod-anti-fraud-for-woocommerce' ), 149 'desc' => __( 'Validity period for request limit in minutes.', 'cod-anti-fraud-for-woocommerce' ), 150 150 'id' => 'wc_cod_antifraud_settings[rate_limit_window_minutes]', 151 151 'default' => '10', … … 158 158 159 159 array( 160 'title' => __( 'WhatsApp Provider', ' woo-cod-antifraud' ),161 'desc' => __( 'Select the WhatsApp provider for sending OTP codes.', ' woo-cod-antifraud' ),160 'title' => __( 'WhatsApp Provider', 'cod-anti-fraud-for-woocommerce' ), 161 'desc' => __( 'Select the WhatsApp provider for sending OTP codes.', 'cod-anti-fraud-for-woocommerce' ), 162 162 'id' => 'wc_cod_antifraud_settings[whatsapp_provider]', 163 163 'default' => 'beralabs', 164 164 'type' => 'select', 165 165 'options' => array( 166 'beralabs' => __( 'BeraLabs Gateway (Proprietary)', ' woo-cod-antifraud' ),167 'ultramsg' => __( 'UltraMsg API', ' woo-cod-antifraud' ),168 ), 169 ), 170 171 array( 172 'title' => __( 'BeraLabs Gateway Endpoint', ' woo-cod-antifraud' ),173 'desc' => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', ' woo-cod-antifraud' ),166 'beralabs' => __( 'BeraLabs Gateway (Proprietary)', 'cod-anti-fraud-for-woocommerce' ), 167 'ultramsg' => __( 'UltraMsg API', 'cod-anti-fraud-for-woocommerce' ), 168 ), 169 ), 170 171 array( 172 'title' => __( 'BeraLabs Gateway Endpoint', 'cod-anti-fraud-for-woocommerce' ), 173 'desc' => __( 'Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://api.beralabs.it/wa/api/send-otp).', 'cod-anti-fraud-for-woocommerce' ), 174 174 'id' => 'wc_cod_antifraud_settings[beralabs_endpoint]', 175 175 'default' => 'https://api.beralabs.it/wa/api/send-otp', … … 179 179 180 180 array( 181 'title' => __( 'BeraLabs API Key', ' woo-cod-antifraud' ),182 'desc' => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', ' woo-cod-antifraud' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'woo-cod-antifraud' ) . ' →</a>',181 'title' => __( 'BeraLabs API Key', 'cod-anti-fraud-for-woocommerce' ), 182 'desc' => __( 'Enter the secret API key (x-api-key) for authentication with BeraLabs gateway.', 'cod-anti-fraud-for-woocommerce' ) . '<br><a href="https://beralabs.it/whatsapp-gateway.html" target="_blank" rel="noopener noreferrer" class="button button-secondary" style="margin-top:8px; display:inline-block; font-weight:600;">' . __( 'Request WhatsApp API Key', 'cod-anti-fraud-for-woocommerce' ) . ' →</a>', 183 183 'id' => 'wc_cod_antifraud_settings[beralabs_api_key]', 184 184 'default' => '', … … 188 188 189 189 array( 190 'title' => __( 'UltraMsg Instance ID', ' woo-cod-antifraud' ),191 'desc' => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', ' woo-cod-antifraud' ),190 'title' => __( 'UltraMsg Instance ID', 'cod-anti-fraud-for-woocommerce' ), 191 'desc' => __( 'Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ), 192 192 'id' => 'wc_cod_antifraud_settings[instance_id]', 193 193 'default' => '', … … 196 196 197 197 array( 198 'title' => __( 'UltraMsg API Token', ' woo-cod-antifraud' ),199 'desc' => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', ' woo-cod-antifraud' ),198 'title' => __( 'UltraMsg API Token', 'cod-anti-fraud-for-woocommerce' ), 199 'desc' => __( 'Enter the secret API Token provided by UltraMsg. Only used if UltraMsg provider is selected.', 'cod-anti-fraud-for-woocommerce' ), 200 200 'id' => 'wc_cod_antifraud_settings[api_token]', 201 201 'default' => '', … … 204 204 205 205 array( 206 'title' => __( 'OTP Expiry (minutes)', ' woo-cod-antifraud' ),207 'desc' => __( 'Validity duration of the generated OTP code.', ' woo-cod-antifraud' ),206 'title' => __( 'OTP Expiry (minutes)', 'cod-anti-fraud-for-woocommerce' ), 207 'desc' => __( 'Validity duration of the generated OTP code.', 'cod-anti-fraud-for-woocommerce' ), 208 208 'id' => 'wc_cod_antifraud_settings[otp_expiry_minutes]', 209 209 'default' => '5', … … 216 216 217 217 array( 218 'title' => __( 'Maximum OTP Attempts', ' woo-cod-antifraud' ),219 'desc' => __( 'Number of incorrect code attempts allowed before invalidation.', ' woo-cod-antifraud' ),218 'title' => __( 'Maximum OTP Attempts', 'cod-anti-fraud-for-woocommerce' ), 219 'desc' => __( 'Number of incorrect code attempts allowed before invalidation.', 'cod-anti-fraud-for-woocommerce' ), 220 220 'id' => 'wc_cod_antifraud_settings[max_attempts]', 221 221 'default' => '3', … … 228 228 229 229 array( 230 'title' => __( 'WhatsApp Message Template', ' woo-cod-antifraud' ),231 'desc' => __( 'Use {{otp}} as a placeholder for the generated numerical code.', ' woo-cod-antifraud' ),230 'title' => __( 'WhatsApp Message Template', 'cod-anti-fraud-for-woocommerce' ), 231 'desc' => __( 'Use {{otp}} as a placeholder for the generated numerical code.', 'cod-anti-fraud-for-woocommerce' ), 232 232 'id' => 'wc_cod_antifraud_settings[custom_message_template]', 233 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' ),233 'default' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ), 234 234 'type' => 'textarea', 235 235 ), … … 262 262 public function save() { 263 263 if ( ! current_user_can( 'manage_woocommerce' ) && ! current_user_can( 'manage_options' ) ) { 264 wp_die( esc_html__( 'You do not have permission to modify these settings.', ' woo-cod-antifraud' ) );264 wp_die( esc_html__( 'You do not have permission to modify these settings.', 'cod-anti-fraud-for-woocommerce' ) ); 265 265 } 266 266 -
cod-anti-fraud-for-woocommerce/trunk/includes/class-wccaf-whatsapp.php
r3778566 r3798076 57 57 return array( 58 58 'success' => false, 59 'message' => __( 'Invalid phone number for WhatsApp delivery.', ' woo-cod-antifraud' ),59 'message' => __( 'Invalid phone number for WhatsApp delivery.', 'cod-anti-fraud-for-woocommerce' ), 60 60 ); 61 61 } … … 67 67 return array( 68 68 'success' => false, 69 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', ' woo-cod-antifraud' ),69 'message' => __( 'WhatsApp Gateway not configured. Please enter your API credentials in plugin settings.', 'cod-anti-fraud-for-woocommerce' ), 70 70 ); 71 71 } … … 73 73 $template = isset( $settings['custom_message_template'] ) && ! empty( $settings['custom_message_template'] ) 74 74 ? $settings['custom_message_template'] 75 : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' );75 : __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ); 76 76 77 77 $message = str_replace( '{{otp}}', $otp, $template ); … … 91 91 return array( 92 92 'success' => false, 93 'message' => __( 'Unsupported WhatsApp provider.', ' woo-cod-antifraud' ),93 'message' => __( 'Unsupported WhatsApp provider.', 'cod-anti-fraud-for-woocommerce' ), 94 94 ); 95 95 } … … 131 131 return array( 132 132 'success' => false, 133 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', ' woo-cod-antifraud' ),133 'message' => __( 'Unable to connect to WhatsApp Gateway. Please try again later.', 'cod-anti-fraud-for-woocommerce' ), 134 134 ); 135 135 } … … 142 142 return array( 143 143 'success' => true, 144 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),144 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 145 145 'message_id' => isset( $data['messageId'] ) ? sanitize_text_field( $data['messageId'] ) : '', 146 146 ); … … 153 153 return array( 154 154 'success' => false, 155 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' ),155 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ), 156 156 ); 157 157 } … … 186 186 return array( 187 187 'success' => false, 188 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', ' woo-cod-antifraud' ),188 'message' => __( 'Unable to connect to WhatsApp provider. Please try again later.', 'cod-anti-fraud-for-woocommerce' ), 189 189 ); 190 190 } … … 197 197 return array( 198 198 'success' => true, 199 'message' => __( 'Code sent! Please check your WhatsApp.', ' woo-cod-antifraud' ),199 'message' => __( 'Code sent! Please check your WhatsApp.', 'cod-anti-fraud-for-woocommerce' ), 200 200 ); 201 201 } … … 207 207 return array( 208 208 'success' => false, 209 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', ' woo-cod-antifraud' ),209 'message' => __( 'Could not deliver WhatsApp verification code. Please check your phone number and try again.', 'cod-anti-fraud-for-woocommerce' ), 210 210 ); 211 211 } -
cod-anti-fraud-for-woocommerce/trunk/languages/woo-cod-antifraud.pot
r3769631 r3798076 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0. 1\n"9 "Project-Id-Version: COD Anti-Fraud for WooCommerce 2.0.2\n" 10 10 "Report-Msgid-Bugs-To: https://beralabs.it\n" 11 "POT-Creation-Date: 2026-1 0-25 17:51+0100\n"11 "POT-Creation-Date: 2026-11-12 11:07+0100\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 20 #: woo-cod-antifraud.php:129 21 #, php-format 22 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active." 23 msgstr "" 24 25 #: woo-cod-antifraud.php:168 includes/class-wccaf-whatsapp.php:72 26 #: includes/class-wccaf-settings.php:236 20 #: includes/class-wccaf-admin.php:46 21 msgid "Settings" 22 msgstr "" 23 24 #: includes/class-wccaf-admin.php:144 includes/class-wccaf-settings.php:233 25 #: includes/class-wccaf-whatsapp.php:75 woo-cod-antifraud.php:170 27 26 msgid "" 28 27 "Your verification code for the Cash on Delivery order is: {{otp}}. Valid for " … … 30 29 msgstr "" 31 30 32 #: includes/class-wccaf-otp-manager.php:72 33 #, php-format 34 msgid "" 35 "You have exceeded the maximum number of attempts (%1$d requests). Please try " 36 "again in %2$d minutes." 37 msgstr "" 38 39 #: includes/class-wccaf-otp-manager.php:95 40 #, php-format 41 msgid "Too many requests from this IP address. Please try again in %d minutes." 42 msgstr "" 43 44 #: includes/class-wccaf-otp-manager.php:200 45 msgid "Phone number or OTP code not provided." 46 msgstr "" 47 48 #: includes/class-wccaf-otp-manager.php:210 49 msgid "OTP code expired or invalid. Please request a new one." 50 msgstr "" 51 52 #: includes/class-wccaf-otp-manager.php:224 53 msgid "" 54 "Maximum number of incorrect attempts exceeded. Please request a new code." 55 msgstr "" 56 57 #: includes/class-wccaf-otp-manager.php:238 58 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:446 59 msgid "Number verified successfully!" 60 msgstr "" 61 62 #: includes/class-wccaf-otp-manager.php:251 63 #, php-format 64 msgid "Incorrect OTP code. Attempts remaining: %d" 65 msgstr "" 66 67 #: includes/class-wccaf-whatsapp.php:56 68 msgid "Invalid phone number for WhatsApp delivery." 69 msgstr "" 70 71 #: includes/class-wccaf-whatsapp.php:66 72 msgid "" 73 "WhatsApp Gateway not configured. Please enter your API credentials in plugin " 74 "settings." 75 msgstr "" 76 77 #: includes/class-wccaf-whatsapp.php:94 78 msgid "Unsupported WhatsApp provider." 79 msgstr "" 80 81 #: includes/class-wccaf-whatsapp.php:142 includes/class-wccaf-whatsapp.php:214 82 #: includes/class-wccaf-checkout.php:405 83 msgid "Code sent! Please check your WhatsApp." 84 msgstr "" 85 86 #: includes/class-wccaf-whatsapp.php:159 87 #, php-format 88 msgid "Error while sending message via BeraLabs Gateway. Response code: %d" 89 msgstr "" 90 91 #: includes/class-wccaf-whatsapp.php:222 92 #, php-format 93 msgid "Error while sending WhatsApp message. Response code: %d" 94 msgstr "" 95 96 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:394 31 #: includes/class-wccaf-admin.php:164 32 msgid "COD & WhatsApp Anti-Fraud Analysis" 33 msgstr "" 34 35 #: includes/class-wccaf-admin.php:196 36 msgid "This order did not use Cash on Delivery payment method." 37 msgstr "" 38 39 #: includes/class-wccaf-admin.php:214 40 msgid "WhatsApp Verification Status:" 41 msgstr "" 42 43 #: includes/class-wccaf-admin.php:216 44 msgid "WHITELISTED CUSTOMER (VIP)" 45 msgstr "" 46 47 #: includes/class-wccaf-admin.php:218 48 msgid "VERIFIED VIA WHATSAPP" 49 msgstr "" 50 51 #: includes/class-wccaf-admin.php:220 52 msgid "BYPASSED (BELOW THRESHOLD)" 53 msgstr "" 54 55 #: includes/class-wccaf-admin.php:222 56 msgid "NOT VERIFIED" 57 msgstr "" 58 59 #: includes/class-wccaf-admin.php:227 60 msgid "Risk Score:" 61 msgstr "" 62 63 #: includes/class-wccaf-admin.php:233 64 msgid "Verified Phone Number:" 65 msgstr "" 66 67 #: includes/class-wccaf-admin.php:240 68 msgid "Verification Date and Time:" 69 msgstr "" 70 71 #: includes/class-wccaf-checkout.php:115 includes/class-wccaf-checkout.php:529 97 72 msgid "" 98 73 "WhatsApp Gateway not configured. Please enter API credentials in plugin " … … 100 75 msgstr "" 101 76 102 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php: 36077 #: includes/class-wccaf-checkout.php:117 includes/class-wccaf-checkout.php:482 103 78 msgid "Please enter your phone number in the billing form first." 104 79 msgstr "" … … 112 87 msgstr "" 113 88 114 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:2 8989 #: includes/class-wccaf-checkout.php:120 includes/class-wccaf-checkout.php:293 115 90 msgid "Resend WhatsApp Code" 116 91 msgstr "" … … 152 127 msgstr "" 153 128 129 #: includes/class-wccaf-checkout.php:130 includes/class-wccaf-checkout.php:600 130 #: includes/class-wccaf-otp-manager.php:339 131 msgid "Number verified successfully!" 132 msgstr "" 133 154 134 #: includes/class-wccaf-checkout.php:159 155 135 msgid "Cash on Delivery verification after order confirmation" … … 176 156 msgstr "" 177 157 178 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:29 5158 #: includes/class-wccaf-checkout.php:190 includes/class-wccaf-checkout.php:299 179 159 msgid "OTP Code (6 digits)" 180 160 msgstr "" 181 161 182 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php: 297162 #: includes/class-wccaf-checkout.php:192 includes/class-wccaf-checkout.php:302 183 163 msgid "Verify Code" 184 164 msgstr "" 185 165 186 #: includes/class-wccaf-checkout.php:2 39166 #: includes/class-wccaf-checkout.php:243 187 167 msgid "Cash on Delivery WhatsApp Verification" 188 168 msgstr "" 189 169 190 #: includes/class-wccaf-checkout.php:24 4170 #: includes/class-wccaf-checkout.php:248 191 171 msgid "Trusted Customer (Whitelist)" 192 172 msgstr "" 193 173 194 #: includes/class-wccaf-checkout.php:25 0174 #: includes/class-wccaf-checkout.php:254 195 175 #, php-format 196 176 msgid "" … … 198 178 msgstr "" 199 179 200 #: includes/class-wccaf-checkout.php:26 0180 #: includes/class-wccaf-checkout.php:264 201 181 msgid "Number Verified via WhatsApp OTP" 202 182 msgstr "" 203 183 204 #: includes/class-wccaf-checkout.php:2 66184 #: includes/class-wccaf-checkout.php:270 205 185 #, php-format 206 186 msgid "Order #%1$d has passed WhatsApp verification for phone number %2$s." 207 187 msgstr "" 208 188 209 #: includes/class-wccaf-checkout.php:28 0189 #: includes/class-wccaf-checkout.php:284 210 190 #, php-format 211 191 msgid "Enter the OTP code sent via WhatsApp to %s to confirm verification." 212 192 msgstr "" 213 193 214 #: includes/class-wccaf-checkout.php:319 194 #: includes/class-wccaf-checkout.php:324 195 msgid "WooCommerce is not available." 196 msgstr "" 197 198 #: includes/class-wccaf-checkout.php:332 199 msgid "Invalid order specified." 200 msgstr "" 201 202 #: includes/class-wccaf-checkout.php:339 203 msgid "The specified order does not use Cash on Delivery." 204 msgstr "" 205 206 #: includes/class-wccaf-checkout.php:370 207 msgid "Permission denied or invalid order verification key." 208 msgstr "" 209 210 #: includes/class-wccaf-checkout.php:384 211 msgid "" 212 "The verified phone number does not match the billing phone number of this " 213 "order." 214 msgstr "" 215 216 #: includes/class-wccaf-checkout.php:408 215 217 msgid "Cash on Delivery payment is not available for this address." 216 218 msgstr "" 217 219 218 #: includes/class-wccaf-checkout.php: 326220 #: includes/class-wccaf-checkout.php:415 219 221 msgid "VIP/Trusted customer: OTP verification not required." 220 222 msgstr "" 221 223 222 #: includes/class-wccaf-checkout.php:367 224 #: includes/class-wccaf-checkout.php:453 225 msgid "Order is already verified." 226 msgstr "" 227 228 #: includes/class-wccaf-checkout.php:489 223 229 msgid "" 224 230 "Cash on Delivery is not authorized for this contact. Please select another " … … 226 232 msgstr "" 227 233 228 #: includes/class-wccaf-checkout.php: 380234 #: includes/class-wccaf-checkout.php:515 229 235 msgid "Phone number verified automatically (Trusted Whitelist Customer)." 230 236 msgstr "" 231 237 232 #: includes/class-wccaf-checkout.php:426 238 #: includes/class-wccaf-checkout.php:541 includes/class-wccaf-whatsapp.php:144 239 #: includes/class-wccaf-whatsapp.php:199 240 msgid "Code sent! Please check your WhatsApp." 241 msgstr "" 242 243 #: includes/class-wccaf-checkout.php:544 includes/class-wccaf-whatsapp.php:155 244 #: includes/class-wccaf-whatsapp.php:209 245 msgid "" 246 "Could not deliver WhatsApp verification code. Please check your phone number " 247 "and try again." 248 msgstr "" 249 250 #: includes/class-wccaf-checkout.php:580 233 251 msgid "Missing or invalid phone number." 234 252 msgstr "" 235 253 236 #: includes/class-wccaf-checkout.php: 430254 #: includes/class-wccaf-checkout.php:584 237 255 msgid "Please enter a valid 6-digit OTP code." 238 256 msgstr "" 239 257 240 #: includes/class-wccaf-checkout.php: 479 includes/class-wccaf-checkout.php:554241 #: includes/class-wccaf-checkout.php: 628258 #: includes/class-wccaf-checkout.php:638 includes/class-wccaf-checkout.php:718 259 #: includes/class-wccaf-checkout.php:797 242 260 msgid "" 243 261 "Cash on Delivery is not available for this order. Please choose an " … … 245 263 msgstr "" 246 264 247 #: includes/class-wccaf-checkout.php: 493 includes/class-wccaf-checkout.php:568248 #: includes/class-wccaf-checkout.php: 641265 #: includes/class-wccaf-checkout.php:652 includes/class-wccaf-checkout.php:732 266 #: includes/class-wccaf-checkout.php:810 249 267 #, php-format 250 268 msgid "" … … 253 271 msgstr "" 254 272 255 #: includes/class-wccaf-checkout.php: 509 includes/class-wccaf-checkout.php:582256 #: includes/class-wccaf-checkout.php: 654273 #: includes/class-wccaf-checkout.php:668 includes/class-wccaf-checkout.php:746 274 #: includes/class-wccaf-checkout.php:823 257 275 msgid "" 258 276 "Please enter your phone number in the billing form first for Cash on " … … 260 278 msgstr "" 261 279 262 #: includes/class-wccaf-checkout.php: 530 includes/class-wccaf-checkout.php:601263 #: includes/class-wccaf-checkout.php: 672280 #: includes/class-wccaf-checkout.php:691 includes/class-wccaf-checkout.php:767 281 #: includes/class-wccaf-checkout.php:841 264 282 msgid "" 265 283 "WhatsApp OTP phone verification is mandatory for Cash on Delivery orders. " … … 268 286 msgstr "" 269 287 270 #: includes/class-wccaf-admin.php:96 271 msgid "COD & WhatsApp Anti-Fraud Analysis" 272 msgstr "" 273 274 #: includes/class-wccaf-admin.php:127 275 msgid "This order did not use Cash on Delivery payment method." 276 msgstr "" 277 278 #: includes/class-wccaf-admin.php:145 279 msgid "WhatsApp Verification Status:" 280 msgstr "" 281 282 #: includes/class-wccaf-admin.php:147 283 msgid "WHITELISTED CUSTOMER (VIP)" 284 msgstr "" 285 286 #: includes/class-wccaf-admin.php:149 287 msgid "VERIFIED VIA WHATSAPP" 288 msgstr "" 289 290 #: includes/class-wccaf-admin.php:151 291 msgid "BYPASSED (BELOW THRESHOLD)" 292 msgstr "" 293 294 #: includes/class-wccaf-admin.php:153 295 msgid "NOT VERIFIED" 296 msgstr "" 297 298 #: includes/class-wccaf-admin.php:158 299 msgid "Risk Score:" 300 msgstr "" 301 302 #: includes/class-wccaf-admin.php:164 303 msgid "Verified Phone Number:" 304 msgstr "" 305 306 #: includes/class-wccaf-admin.php:171 307 msgid "Verification Date and Time:" 288 #: includes/class-wccaf-checkout.php:869 289 msgid "" 290 "Cash on Delivery order cannot be placed without completing WhatsApp OTP " 291 "phone verification." 292 msgstr "" 293 294 #: includes/class-wccaf-otp-manager.php:113 295 #, php-format 296 msgid "" 297 "You have exceeded the maximum number of attempts (%1$d requests). Please try " 298 "again in %2$d minutes." 299 msgstr "" 300 301 #: includes/class-wccaf-otp-manager.php:136 302 #, php-format 303 msgid "Too many requests from this IP address. Please try again in %d minutes." 304 msgstr "" 305 306 #: includes/class-wccaf-otp-manager.php:255 307 msgid "Phone number or OTP code not provided." 308 msgstr "" 309 310 #: includes/class-wccaf-otp-manager.php:273 311 msgid "OTP code expired or invalid. Please request a new one." 312 msgstr "" 313 314 #: includes/class-wccaf-otp-manager.php:291 315 msgid "OTP code expired. Please request a new one." 316 msgstr "" 317 318 #: includes/class-wccaf-otp-manager.php:305 319 #: includes/class-wccaf-otp-manager.php:352 320 msgid "" 321 "Maximum number of incorrect attempts exceeded. Please request a new code." 322 msgstr "" 323 324 #: includes/class-wccaf-otp-manager.php:366 325 #, php-format 326 msgid "Incorrect OTP code. Attempts remaining: %d" 308 327 msgstr "" 309 328 … … 316 335 msgstr "" 317 336 318 #: includes/class-wccaf-settings.php:5 3337 #: includes/class-wccaf-settings.php:50 319 338 msgid "WooCommerce COD Anti-Fraud Settings" 320 339 msgstr "" 321 340 322 #: includes/class-wccaf-settings.php:5 5341 #: includes/class-wccaf-settings.php:52 323 342 msgid "" 324 343 "Configure WhatsApp OTP verification and risk score management for Cash on " … … 327 346 msgstr "" 328 347 329 #: includes/class-wccaf-settings.php: 60348 #: includes/class-wccaf-settings.php:57 330 349 msgid "OTP Verification Mode (Pre-Checkout Blocking)" 331 350 msgstr "" 332 351 333 #: includes/class-wccaf-settings.php: 61352 #: includes/class-wccaf-settings.php:58 334 353 msgid "" 335 354 "WhatsApp OTP verification occurs directly in cart/checkout before placing " … … 337 356 msgstr "" 338 357 339 #: includes/class-wccaf-settings.php:6 6358 #: includes/class-wccaf-settings.php:63 340 359 msgid "Always Required (All Cash on Delivery Orders)" 341 360 msgstr "" 342 361 343 #: includes/class-wccaf-settings.php:6 7362 #: includes/class-wccaf-settings.php:64 344 363 msgid "Conditional (Based on Risk Score or Cart Total)" 345 364 msgstr "" 346 365 347 #: includes/class-wccaf-settings.php: 72366 #: includes/class-wccaf-settings.php:69 348 367 msgid "Risk Score Threshold (0-100)" 349 368 msgstr "" 350 369 351 #: includes/class-wccaf-settings.php:7 3370 #: includes/class-wccaf-settings.php:70 352 371 msgid "" 353 372 "Require OTP if calculated risk score exceeds this value (only applied in " … … 355 374 msgstr "" 356 375 357 #: includes/class-wccaf-settings.php:8 5376 #: includes/class-wccaf-settings.php:82 358 377 msgid "Minimum Cart Amount for OTP (€)" 359 378 msgstr "" 360 379 361 #: includes/class-wccaf-settings.php:8 6380 #: includes/class-wccaf-settings.php:83 362 381 msgid "" 363 382 "Require OTP only if cart total equals or exceeds this amount (0 for no " … … 365 384 msgstr "" 366 385 367 #: includes/class-wccaf-settings.php:9 7386 #: includes/class-wccaf-settings.php:94 368 387 msgid "Maximum COD Cart Threshold (€)" 369 388 msgstr "" 370 389 371 #: includes/class-wccaf-settings.php:9 8390 #: includes/class-wccaf-settings.php:95 372 391 msgid "Maximum cart value above which the high-threshold rule is applied." 373 392 msgstr "" 374 393 375 #: includes/class-wccaf-settings.php:10 9394 #: includes/class-wccaf-settings.php:106 376 395 msgid "Action Above Maximum Threshold" 377 396 msgstr "" 378 397 379 #: includes/class-wccaf-settings.php:1 10398 #: includes/class-wccaf-settings.php:107 380 399 msgid "Action to take when cart total exceeds the maximum threshold." 381 400 msgstr "" 382 401 383 #: includes/class-wccaf-settings.php:11 5402 #: includes/class-wccaf-settings.php:112 384 403 msgid "Require WhatsApp OTP Verification" 385 404 msgstr "" 386 405 387 #: includes/class-wccaf-settings.php:11 6406 #: includes/class-wccaf-settings.php:113 388 407 msgid "Disable Cash on Delivery Payment Method" 389 408 msgstr "" 390 409 391 #: includes/class-wccaf-settings.php:1 21410 #: includes/class-wccaf-settings.php:118 392 411 msgid "Phone / Email Blacklist" 393 412 msgstr "" 394 413 395 #: includes/class-wccaf-settings.php:1 22414 #: includes/class-wccaf-settings.php:119 396 415 msgid "" 397 416 "Enter phone numbers or emails to block from Cash on Delivery (one per line " … … 399 418 msgstr "" 400 419 401 #: includes/class-wccaf-settings.php:1 30420 #: includes/class-wccaf-settings.php:127 402 421 msgid "Phone / Email Whitelist (VIP)" 403 422 msgstr "" 404 423 405 #: includes/class-wccaf-settings.php:1 31424 #: includes/class-wccaf-settings.php:128 406 425 msgid "" 407 426 "Enter trusted phone numbers or emails to automatically bypass OTP " … … 409 428 msgstr "" 410 429 411 #: includes/class-wccaf-settings.php:13 9430 #: includes/class-wccaf-settings.php:136 412 431 msgid "Max OTP Requests Limit" 413 432 msgstr "" 414 433 415 #: includes/class-wccaf-settings.php:1 40434 #: includes/class-wccaf-settings.php:137 416 435 msgid "Maximum number of OTP requests allowed before temporary lock." 417 436 msgstr "" 418 437 419 #: includes/class-wccaf-settings.php:1 51438 #: includes/class-wccaf-settings.php:148 420 439 msgid "Rate Limit Window (minutes)" 421 440 msgstr "" 422 441 423 #: includes/class-wccaf-settings.php:1 52442 #: includes/class-wccaf-settings.php:149 424 443 msgid "Validity period for request limit in minutes." 425 444 msgstr "" 426 445 427 #: includes/class-wccaf-settings.php:16 3446 #: includes/class-wccaf-settings.php:160 428 447 msgid "WhatsApp Provider" 429 448 msgstr "" 430 449 431 #: includes/class-wccaf-settings.php:16 4450 #: includes/class-wccaf-settings.php:161 432 451 msgid "Select the WhatsApp provider for sending OTP codes." 433 452 msgstr "" 434 453 435 #: includes/class-wccaf-settings.php:16 9454 #: includes/class-wccaf-settings.php:166 436 455 msgid "BeraLabs Gateway (Proprietary)" 437 456 msgstr "" 438 457 439 #: includes/class-wccaf-settings.php:1 70458 #: includes/class-wccaf-settings.php:167 440 459 msgid "UltraMsg API" 441 460 msgstr "" 442 461 443 #: includes/class-wccaf-settings.php:17 5462 #: includes/class-wccaf-settings.php:172 444 463 msgid "BeraLabs Gateway Endpoint" 445 464 msgstr "" 446 465 447 #: includes/class-wccaf-settings.php:17 6466 #: includes/class-wccaf-settings.php:173 448 467 msgid "" 449 468 "Endpoint URL for BeraLabs WhatsApp OTP microservice (e.g., https://" … … 451 470 msgstr "" 452 471 453 #: includes/class-wccaf-settings.php:18 4472 #: includes/class-wccaf-settings.php:181 454 473 msgid "BeraLabs API Key" 455 474 msgstr "" 456 475 457 #: includes/class-wccaf-settings.php:18 5476 #: includes/class-wccaf-settings.php:182 458 477 msgid "" 459 478 "Enter the secret API key (x-api-key) for authentication with BeraLabs " … … 461 480 msgstr "" 462 481 463 #: includes/class-wccaf-settings.php:18 5482 #: includes/class-wccaf-settings.php:182 464 483 msgid "Request WhatsApp API Key" 465 484 msgstr "" 466 485 467 #: includes/class-wccaf-settings.php:19 3486 #: includes/class-wccaf-settings.php:190 468 487 msgid "UltraMsg Instance ID" 469 488 msgstr "" 470 489 471 #: includes/class-wccaf-settings.php:19 4490 #: includes/class-wccaf-settings.php:191 472 491 msgid "" 473 492 "Enter the Instance ID provided by UltraMsg (e.g., instance12345). Only used " … … 475 494 msgstr "" 476 495 477 #: includes/class-wccaf-settings.php: 201496 #: includes/class-wccaf-settings.php:198 478 497 msgid "UltraMsg API Token" 479 498 msgstr "" 480 499 481 #: includes/class-wccaf-settings.php: 202500 #: includes/class-wccaf-settings.php:199 482 501 msgid "" 483 502 "Enter the secret API Token provided by UltraMsg. Only used if UltraMsg " … … 485 504 msgstr "" 486 505 487 #: includes/class-wccaf-settings.php:20 9506 #: includes/class-wccaf-settings.php:206 488 507 msgid "OTP Expiry (minutes)" 489 508 msgstr "" 490 509 491 #: includes/class-wccaf-settings.php:2 10510 #: includes/class-wccaf-settings.php:207 492 511 msgid "Validity duration of the generated OTP code." 493 512 msgstr "" 494 513 495 #: includes/class-wccaf-settings.php:2 21514 #: includes/class-wccaf-settings.php:218 496 515 msgid "Maximum OTP Attempts" 497 516 msgstr "" 498 517 499 #: includes/class-wccaf-settings.php:2 22518 #: includes/class-wccaf-settings.php:219 500 519 msgid "Number of incorrect code attempts allowed before invalidation." 501 520 msgstr "" 502 521 503 #: includes/class-wccaf-settings.php:23 3522 #: includes/class-wccaf-settings.php:230 504 523 msgid "WhatsApp Message Template" 505 524 msgstr "" 506 525 507 #: includes/class-wccaf-settings.php:23 4526 #: includes/class-wccaf-settings.php:231 508 527 msgid "Use {{otp}} as a placeholder for the generated numerical code." 509 528 msgstr "" 529 530 #: includes/class-wccaf-settings.php:264 531 msgid "You do not have permission to modify these settings." 532 msgstr "" 533 534 #: includes/class-wccaf-whatsapp.php:59 535 msgid "Invalid phone number for WhatsApp delivery." 536 msgstr "" 537 538 #: includes/class-wccaf-whatsapp.php:69 539 msgid "" 540 "WhatsApp Gateway not configured. Please enter your API credentials in plugin " 541 "settings." 542 msgstr "" 543 544 #: includes/class-wccaf-whatsapp.php:93 545 msgid "Unsupported WhatsApp provider." 546 msgstr "" 547 548 #: includes/class-wccaf-whatsapp.php:133 549 msgid "Unable to connect to WhatsApp Gateway. Please try again later." 550 msgstr "" 551 552 #: includes/class-wccaf-whatsapp.php:188 553 msgid "Unable to connect to WhatsApp provider. Please try again later." 554 msgstr "" 555 556 #: woo-cod-antifraud.php:131 557 #, php-format 558 msgid "WooCommerce COD Anti-Fraud requires %s to be installed and active." 559 msgstr "" -
cod-anti-fraud-for-woocommerce/trunk/readme.txt
r3778566 r3798076 2 2 Contributors: beralabs 3 3 Donate link: https://beralabs.it 4 Tags: woocommerce, cash on delivery, anti fraud, otp, whatsapp4 Tags: nachnahme, contra reembolso, cash on delivery, anti fraud, woocommerce 5 5 Requires at least: 6.0 6 6 Tested up to: 7.1 … … 28 28 * **Order Meta & Admin Details:** Transparent risk scores and verification timestamps displayed directly inside WooCommerce order details. 29 29 * **PHP 8.x & HPOS Certified:** Fully compatible and tested with PHP 8.0-8.3 and WooCommerce High-Performance Order Storage (HPOS). 30 * **Multi-language & Internationalization (i18n):** Native support for French (France, Belgique, Suisse, Maghreb - fr_FR), German (Deutschland, Österreich, Schweiz - de_DE), Spanish (España y Latinoamérica - es_ES), Italian (it_IT), and English (en_US / en_GB). 31 32 --- 33 34 ### Descripción en Español (Pago Contra Reembolso & Contra Entrega) 35 36 **COD Anti-Fraud for WooCommerce** es la solución definitiva de prevención de fraude y verificación para tiendas online que ofrecen **pago contra reembolso** (España) o **pago contra entrega** (México, Colombia, Chile, Perú, Argentina y Latinoamérica). 37 38 El pago contra reembolso suele sufrir altas tasas de rechazo, paquetes devueltos no reclamados, pedidos falsos y pérdidas logísticas elevadas. Este plugin elimina estos problemas validando la autenticidad del cliente antes de confirmar el pedido mediante **verificación OTP por WhatsApp** y un **motor de evaluación de riesgo**. 39 40 #### Características Principales en Español: 41 * **Verificación OTP por WhatsApp:** Envía automáticamente un código numérico de 6 dígitos al teléfono móvil del comprador vía WhatsApp. El cliente debe validar el código en el checkout antes de poder completar el pedido contra entrega. 42 * **Motor Antifraude Inteligente:** Calcula una puntuación de riesgo (0-100) analizando compras previas canceladas o devueltas, pedidos como invitado y valor del carrito. 43 * **Bloqueo Pre-Checkout Infranqueable:** Protección bidireccional (frontend y backend) que impide finalizar pedidos contra reembolso sin confirmación telefónica válida. 44 * **Umbrales Máximos y Reglas de Importe:** Define importes mínimos o máximos para permitir el pago contra reembolso y desactívalo o exige OTP cuando el carrito supere el límite deseado. 45 * **Gestión de Listas Negras y Listas Blancas (VIP):** Bloquea automáticamente números de teléfono o correos sospechosos y exime de verificación a clientes recurrentes de máxima confianza. 46 * **Prevención de Abusos y Rate Limiting:** Limita los intentos y las solicitudes por dirección IP y teléfono para evitar costes innecesarios de mensajería y ataques de fuerza bruta. 47 * **Integración con Pasarelas WhatsApp:** Compatible de forma nativa con UltraMsg y BeraLab WhatsApp Gateway, fácilmente ampliable a otras APIs. 48 * **Totalmente Localizado en Español:** Interfaz de usuario en el checkout y panel de administración 100% traducidos al español (es_ES / es_419). 49 50 --- 51 52 ### Deutsche Beschreibung (Nachnahme & Betrugsschutz für WooCommerce) 53 54 **COD Anti-Fraud for WooCommerce** ist die professionelle Lösung zur **Betrugsprävention** und Reduzierung von Annahmeverweigerungen für Online-Shops im DACH-Raum (Deutschland, Österreich, Schweiz), die **Nachnahme** als Zahlungsmethode anbieten. 55 56 Der Kauf per Nachnahme birgt für Händler erhebliche finanzielle Risiken: Unzustellbare Sendungen, Spaßbestellungen, unvollständige Adressen und hohe Kosten für Rücksendungen belasten die Marge empfindlich. Dieses Plugin bietet effektiven **Betrugsschutz für WooCommerce**, indem es betrügerische Bestellungen vorab filtert, Händlern hilft, die **Retourenquote reduzieren** zu können, und eine nahtlose **OTP-Verifizierung via WhatsApp & SMS** direkt im Kassenbereich (Pre-Checkout) erzwingt. 57 58 #### Wichtige Funktionen für den DACH-Markt: 59 * **Nachnahme absichern:** Schützen Sie Ihren Shop vor unüberlegten oder böswilligen Nachnahme-Bestellungen und minimieren Sie logistische Ausfallkosten. 60 * **Retourenquote reduzieren:** Durch die Echtzeit-Verifizierung der Mobilfunknummer sinken unzustellbare Pakete und Retouren drastisch (um bis zu 85 %). 61 * **OTP-Verifizierung via WhatsApp & SMS:** Der Kunde erhält direkt beim Checkout einen 6-stelligen Verifizierungscode per WhatsApp. Ohne gültige Bestätigung kann die Nachnahme-Bestellung nicht abgeschlossen werden. 62 * **Nachnahmegebühr & Schwellenwerte:** Schützen Sie sich vor hohen Nachnahmegebühren und logistischen Verlusten durch konfigurierbare Mindest- und Höchstbeträge im Warenkorb. 63 * **Intelligente Risikobewertung (0-100):** Analysiert Gastbestellungen, frühere Stornierungen und Warenkorbwerte zur automatischen Risikobewertung. 64 * **Sperrliste & VIP-Kunden (Blacklist/Whitelist):** Blockieren Sie verdächtige Rufnummern oder E-Mails und befreien Sie verifizierte Stammkunden von wiederholten Prüfungen. 65 * **DSGVO-freundlich & HPOS-zertifiziert:** Vollständige Unterstützung für WooCommerce High-Performance Order Storage (HPOS) und modernste PHP 8.x-Laufzeiten. 66 * **Vollständige deutsche Lokalisierung:** Sowohl das Checkout-Frontend als auch das gesamte Admin-Dashboard sind in fehlerfreiem Deutsch (de_DE) verfügbar. 67 68 --- 69 70 ### Description en Français (Paiement à la Livraison & Contre-Remboursement WooCommerce) 71 72 **COD Anti-Fraud for WooCommerce** est la solution de référence pour la prévention de la fraude et la sécurisation des boutiques en ligne proposant le **paiement à la livraison** (France, Belgique, Suisse et Maghreb : Maroc, Algérie, Tunisie). 73 74 Le paiement à la livraison (COD) engendre fréquemment des commandes fantômes, des adresses erronées et un **taux de retour colis** critique qui grève la rentabilité logistique des e-commerçants. Ce plugin d'**anti-fraude e-commerce** protège vos marges en introduisant une **vérification commande WhatsApp** par code OTP bloquante au panier et au checkout, ainsi qu'un calcul dynamique du risque d'impayé. 75 76 #### Fonctionnalités Clés pour le Marché Francophone : 77 * **Vérification Commande WhatsApp par OTP :** Envoi instantané d'un code de validation à 6 chiffres sur le WhatsApp du client avant la validation du paiement. 78 * **Sécurisation du Contre-Remboursement WooCommerce :** Bloque les commandes suspectes et empêche la finalisation d'un panier en contre-remboursement sans validation mobile préalable. 79 * **Gestion des Frais de Contre-Remboursement & Seuils :** Définissez des paniers minimum et maximum pour amortir ou compenser les **frais de contre-remboursement** et désactivez automatiquement le COD sur les commandes à haut risque. 80 * **Réduction Drastique du Taux de Retour Colis :** Élimine jusqu'à 85 % des colis refusés ou non réclamés à la livraison grâce à la confirmation téléphonique active de l'acheteur. 81 * **Moteur d'Évaluation des Risques (0-100) :** Analyse l'historique d'annulation, les commandes en mode invité et le montant du panier pour isoler les profils frauduleux. 82 * **Gestion des Listes Noires et Listes Blanches (VIP) :** Bannissez les numéros et e-mails récidivistes, tout en exemptant vos clients fidèles de la vérification OTP. 83 * **Haute Compatibilité HPOS & PHP 8.x :** Certifié compatible avec WooCommerce High-Performance Order Storage (HPOS) et PHP 7.4 à 8.3+. 84 * **Traduction Complète en Français (fr_FR) :** Interface client fluide au checkout et panneau d'administration traduits à 100 % en français pour un parcours utilisateur sans friction. 30 85 31 86 == External Services == … … 68 123 Yes, guest checkout is fully supported and analyzed with higher risk evaluation weights. 69 124 125 = ¿Cómo reduce este plugin las devoluciones en pago contra reembolso / contra entrega? = 126 Al exigir que el cliente verifique su número de teléfono mediante un código OTP recibido en su cuenta de WhatsApp activa en tiempo real, se filtran de raíz los números de teléfono falsos, compras impulsivas que luego no se recogen y direcciones fraudulentas. Esto reduce las entregas fallidas hasta en un 85%. 127 128 = ¿Está disponible en idioma español? = 129 Sí, el plugin incluye traducciones nativas y completas en español (es_ES) tanto para los mensajes y botones mostrados al cliente en la pantalla de pago (checkout) como para todo el panel de control y configuración del comerciante. 130 131 = Wie hilft dieses Plugin, die Retourenquote bei Nachnahme zu reduzieren? = 132 Durch die verpflichtende OTP-Verifizierung via WhatsApp & SMS vor dem Kaufabschluss werden gefälschte Adressen und Spaßbestellungen zuverlässig eliminiert. Händler im DACH-Raum können so ihre Retourenquote reduzieren und unnötige Nachnahmegebühr-Verluste sowie Rückversandkosten effektiv vermeiden. 133 134 = Ist das Plugin vollständig auf Deutsch verfügbar? = 135 Ja, das Plugin enthält eine vollständige und professionelle Lokalisierung auf Deutsch (de_DE) für das Kassen-Frontend sowie für alle Menüs und Optionen im WooCommerce-Adminbereich. 136 70 137 == Screenshots == 71 138 … … 82 149 * Enhancement: Protezione da brute force e rate limiting transazionale su Transient per le richieste OTP WhatsApp. 83 150 * Improvement: Piena conformità WooCommerce HPOS (High-Performance Order Storage) e capability check 'manage_woocommerce' nell'admin backend. 151 * Localization: Obiettivo strategico OBJ-08 completato - Internazionalizzazione completa con supporto per lingua spagnola (es_ES / LatAm), generazione template POT aggiornato, catalogo PO/MO compilato e allineamento formale text-domain standard. 84 152 85 153 = 2.0.1 = … … 109 177 == Upgrade Notice == 110 178 179 = 2.0.2 = 180 Recommended upgrade: complete Spanish/LatAm localization (OBJ-08), IDOR prevention, HPOS certified compatibility, and transactional rate limiting. 181 111 182 = 2.0.1 = 112 183 Recommended upgrade for all users: adds WhatsApp OTP checkout flow, strict anti-bypass validation, UX optimizations, certified HPOS compatibility, and passed E2E test validations. -
cod-anti-fraud-for-woocommerce/trunk/woo-cod-antifraud.php
r3778566 r3798076 7 7 * Author: BeraLab 8 8 * Author URI: https://beralabs.it 9 * Text Domain: woo-cod-antifraud9 * Text Domain: cod-anti-fraud-for-woocommerce 10 10 * Domain Path: /languages 11 11 * Requires at least: 6.0 … … 92 92 // Load Translations 93 93 // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound 94 load_plugin_textdomain( ' woo-cod-antifraud', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );94 load_plugin_textdomain( 'cod-anti-fraud-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 95 95 96 96 // Include internal components … … 129 129 sprintf( 130 130 /* translators: %s: WooCommerce plugin link */ 131 __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', ' woo-cod-antifraud' ),131 __( 'WooCommerce COD Anti-Fraud requires %s to be installed and active.', 'cod-anti-fraud-for-woocommerce' ), 132 132 '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" rel="noopener noreferrer">WooCommerce</a>' 133 133 ), … … 168 168 'otp_expiry_minutes' => 5, 169 169 'max_attempts' => 3, 170 'custom_message_template' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', ' woo-cod-antifraud' ),170 'custom_message_template' => __( 'Your verification code for the Cash on Delivery order is: {{otp}}. Valid for 5 minutes.', 'cod-anti-fraud-for-woocommerce' ), 171 171 ); 172 172 update_option( 'wc_cod_antifraud_settings', $defaults );
Note:
See TracChangeset
for help on using the changeset viewer.