PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / paypal / views / settings / connect-settings-container.php

connect-settings-container.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at paypal/views/settings/connect-settings-container.php

83 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 ?>
7 <table class="form-table" style="width: 400px;">
8 <tr class="form-field">
9 <td>
10 <?php esc_html_e( 'Test Mode', 'formidable' ); ?>
11 </td>
12 <td>
13 <label>
14 <input type="hidden" name="frm_paypal_test_mode" value="0" />
15 <input type="checkbox" name="frm_paypal_test_mode" id="frm_paypal_test_mode" value="1" <?php checked( $settings->settings->test_mode, 1 ); ?> />
16 <?php esc_html_e( 'Use the PayPal test mode', 'formidable' ); ?>
17 </label>
18 </td>
19 </tr>
20 </table>
21
22 <div>
23 <div class="frm_grid_container">
24 <?php
25
26 $modes = array( 'live', 'test' );
27
28 foreach ( $modes as $mode ) {
29 FrmPayPalLiteConnectHelper::render_settings_for_mode( $mode );
30 }
31 ?>
32 </div>
33 </div>
34 <?php if ( ! is_ssl() ) { ?>
35 <div>
36 <em>
37 <?php esc_html_e( 'Your site is not using SSL. Before using PayPal to collect payments, you will need to install an SSL certificate on your site.', 'formidable' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
38 </em>
39 </div>
40 <?php } ?>
41
42 <?php
43 $debug_entries = get_option( 'frm_paypal_debug_ids', array() );
44 $two_days_ago = gmdate( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) );
45 $recent_entries = array_filter(
46 is_array( $debug_entries ) ? $debug_entries : array(),
47 function ( $entry ) use ( $two_days_ago ) {
48 return ! empty( $entry['timestamp'] ) && $entry['timestamp'] >= $two_days_ago;
49 }
50 );
51
52 if ( $recent_entries ) {
53 ?>
54 <div style="margin-top: var(--gap-lg);">
55 <h3><?php esc_html_e( 'Recent PayPal Debug IDs', 'formidable' ); ?></h3>
56 <p class="frm-description">
57 <?php esc_html_e( 'These debug IDs can be provided to PayPal support when troubleshooting payment issues.', 'formidable' ); ?>
58 </p>
59 <table class="widefat striped" style="max-width: 800px;">
60 <thead>
61 <tr>
62 <th><?php esc_html_e( 'Debug ID', 'formidable' ); ?></th>
63 <th><?php esc_html_e( 'Error', 'formidable' ); ?></th>
64 <th><?php esc_html_e( 'Context', 'formidable' ); ?></th>
65 <th><?php esc_html_e( 'Time', 'formidable' ); ?></th>
66 </tr>
67 </thead>
68 <tbody>
69 <?php foreach ( $recent_entries as $entry ) { ?>
70 <tr>
71 <td><code><?php echo esc_html( $entry['debug_id'] ); ?></code></td>
72 <td><?php echo esc_html( $entry['error_message'] ); ?></td>
73 <td><?php echo esc_html( $entry['context'] ); ?></td>
74 <td><?php echo esc_html( $entry['timestamp'] ); ?></td>
75 </tr>
76 <?php } ?>
77 </tbody>
78 </table>
79 </div>
80 <?php
81 }//end if
82 ?>
83