| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
$tag_classes = $connected ? 'frm-lt-green-tag' : 'frm-grey-tag'; |
| 7 |
?> |
| 8 |
<div class="frm-card-item frm6"> |
| 9 |
<div class="frm-flex-col" style="width: 100%;"> |
| 10 |
<div> |
| 11 |
<span style="font-size: var(--text-lg); font-weight: 500; margin-right: 5px;"> |
| 12 |
<?php echo $mode === 'test' ? esc_html__( 'Test', 'formidable' ) : esc_html__( 'Live', 'formidable' ); ?> |
| 13 |
</span> |
| 14 |
<div class="frm-meta-tag <?php echo esc_attr( $tag_classes ); ?>" style="font-size: var(--text-sm); font-weight: 600;"> |
| 15 |
<?php |
| 16 |
if ( $connected ) { |
| 17 |
FrmAppHelper::icon_by_class( 'frmfont frm_checkmark_icon', array( 'style' => 'width: 10px; position: relative; top: 2px; margin-right: 5px;' ) ); |
| 18 |
esc_html_e( 'Connected', 'formidable' ); |
| 19 |
} else { |
| 20 |
esc_html_e( 'Not configured', 'formidable' ); |
| 21 |
} |
| 22 |
?> |
| 23 |
</div> |
| 24 |
</div> |
| 25 |
<div style="margin-top: 5px; flex: 1;"> |
| 26 |
<?php |
| 27 |
if ( 'live' === $mode ) { |
| 28 |
esc_html_e( 'Live version to process real customer transactions', 'formidable' ); |
| 29 |
} else { |
| 30 |
esc_html_e( 'Simulate payments and ensure everything works smoothly before going live.', 'formidable' ); |
| 31 |
} |
| 32 |
?> |
| 33 |
</div> |
| 34 |
<?php FrmPayPalLiteConnectHelper::render_seller_status_placeholder( $mode ); ?> |
| 35 |
<div class="frm-card-bottom"> |
| 36 |
<?php if ( $connected ) { ?> |
| 37 |
<a id="frm_disconnect_paypal_<?php echo esc_attr( $mode ); ?>" class="button-secondary frm-button-secondary" href="#"> |
| 38 |
<?php esc_html_e( 'Disconnect', 'formidable' ); ?> |
| 39 |
</a> |
| 40 |
<?php } else { ?> |
| 41 |
<a class="frm-connect-paypal-with-oauth button-secondary frm-button-secondary" data-mode="<?php echo esc_attr( $mode ); ?>" href="#"> |
| 42 |
<?php esc_html_e( 'Connect', 'formidable' ); ?> |
| 43 |
</a> |
| 44 |
<?php } ?> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
|