PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.3.3
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.3.3
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 66 releases
better-payment / includes / Admin / views / elementor / layouts / layout-3.php

layout-3.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.3.3, at includes/Admin/views/elementor/layouts/layout-3.php

167 lines 15.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="better-payment">
2 <div class="better-payment--wrapper">
3 <div class="better-payment--container">
4 <?php
5 use Better_Payment\Lite\Classes\Helper;
6
7 $better_payment_helper_obj = new Helper();
8
9 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-vars.php";
10
11 $render_attribute_default_text = $this->render_attribute_default_text( $settings );
12 ?>
13
14 <form name="better-payment-form-<?php echo esc_attr( $widgetObj->get_id() ); ?>" data-better-payment="<?php echo esc_attr($layout_setting_meta); ?>" class="better-payment-form" id="better-payment-form-<?php echo esc_attr($widgetObj->get_id()); ?>" action="<?php echo esc_url($layout_action); ?>" method="post">
15 <input type="hidden" name="better_payment_page_id" value="<?php echo esc_attr( get_the_ID() ); ?>">
16 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr( $widgetObj->get_id() ); ?>">
17 <?php
18 if ( method_exists( $widgetObj, 'render_campaign_id_hidden_field' ) ) {
19 echo $widgetObj->render_campaign_id_hidden_field( $settings );
20 }
21 ?>
22
23 <div class="payment-form-layout-3 payment-form-layout">
24 <div class="tile is-ancestor m-0">
25 <?php if ( $sidebar_show ) : ?>
26 <div class="tile is-parent dynamic-amount-section ">
27 <div class="tile is-child">
28 <div class="dynamic-amount-section-inner has-text-white p-6">
29 <div class="pt-3 pb-3">
30 <p class="bp-dynamic-amount-section-icon-wrap"><i class="bp-icon bp-logo-2 is-size-1-fix dynamic-amount-section-icon bp-dynamic-amount-section-icon"></i></p>
31 <h4 class="is-size-5-fix pt-5 dynamic-amount-section-title bp-dynamic-amount-section-title"><?php esc_html_e($layout_form_transaction_details_heading, 'better-payment'); ?></h4>
32 <p class="is-size-6-fix pt-3 dynamic-amount-section-subtitle bp-dynamic-amount-section-sub-title"><?php esc_html_e($layout_form_transaction_details_sub_heading, 'better-payment'); ?></p>
33 <p class="is-size-6-fix pt-2 dynamic-amount-section-subtitle bp-dynamic-amount-section-amount">
34 <?php echo wp_kses( __(sprintf("%s <a class=' %s ' href='%s'>%s</a>", $layout_form_transaction_details_product_title, $layout_dynamic_payment_hide_show ,$product_permalink, $product_name), 'better-payment'), $valid_html_tags ); ?><br>
35 <?php echo wp_kses( __(sprintf("%s <span class='bp-transaction-details-amount-text'>%s</span>", $layout_form_transaction_details_amount_text, '' !== $product_price ? floatval($product_price) : $render_attribute_default_text), 'better-payment'), $valid_html_tags ); ?>
36 </p>
37 <h4 class="is-size-2-fix pt-5 dynamic-amount-section-amount bp-dynamic-amount-section-amount-summary"><?php echo wp_kses( __(sprintf('%s<span class="bp-transaction-details-amount-text">%s</span>%s', wp_kses( $layout_form_currency_left, $valid_html_tags ), '' !== $product_price ? floatval($product_price) : $render_attribute_default_text, wp_kses( $layout_form_currency_right, $valid_html_tags ) ), 'better-payment'), $valid_html_tags ); ?></h4>
38 </div>
39 </div>
40 </div>
41 </div>
42 <?php endif; ?>
43
44 <div class="tile is-parent has-background-white-fix form-content-section <?php echo ( intval( $sidebar_show ) ? esc_attr('is-8') : esc_attr('is-12') ); ?> <?php esc_attr_e($layout_form_content_offset_class, 'better-payment'); ?>">
45 <div class="tile is-child">
46 <div class="form-content-section-inner p-6">
47 <div class="pt-3 pb-3">
48 <div class="form-content-section-fields">
49 <div class="field-payment_method">
50 <div class="control bp-radio-box columns">
51 <?php
52 $bp_paypal_button_enable = !empty( $settings[ 'better_payment_form_paypal_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paypal_enable' ];
53 $bp_stripe_button_enable = !empty( $settings[ 'better_payment_form_stripe_enable' ] ) && 'yes' === $settings[ 'better_payment_form_stripe_enable' ];
54 $bp_paystack_button_enable = !empty( $settings[ 'better_payment_form_paystack_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paystack_enable' ];
55 ?>
56
57 <?php if( true === $bp_paypal_button_enable ) : ?>
58 <label class="radio mb-5 payment-method-checkbox active column has-text-centered payment-method-checkbox-paypal">
59 <input type="radio" name="payment_method" class="layout-payment-method-input layout-payment-method-paypal" checked>
60 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
61 </label>
62 <?php endif; ?>
63
64 <?php if( true === $bp_stripe_button_enable ) : ?>
65 <label class="radio mb-5 payment-method-checkbox payment-method-checkbox-stripe <?php echo empty($settings['better_payment_form_paypal_enable']) ? esc_attr('active') : ''; ?> column has-text-centered">
66 <input type="radio" name="payment_method" class="layout-payment-method-input layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?>>
67 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
68 </label>
69 <?php endif; ?>
70
71 <?php if( true === $bp_paystack_button_enable ) : ?>
72 <label class="radio mb-5 payment-method-checkbox payment-method-checkbox-paystack <?php echo empty($settings['better_payment_form_paypal_enable']) && empty($settings['better_payment_form_stripe_enable']) ? esc_attr('active') : ''; ?> column has-text-centered">
73 <input type="radio" name="payment_method" class="layout-payment-method-input layout-payment-method-paystack" <?php echo empty($settings['better_payment_form_paypal_enable']) && empty($settings['better_payment_form_stripe_enable']) ? 'checked' : '' ?>>
74 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="Paystack">
75 </label>
76 <?php endif; ?>
77 </div>
78 </div>
79
80 <?php
81 if ( !empty( $settings['better_payment_form_fields'] ) ) :
82 foreach ( $settings['better_payment_form_fields'] as $item ) :
83 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
84
85 if ($is_payment_amount_field) : ?>
86 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
87 <?php
88 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
89 $this->render_amount_element($settings);
90 }
91 ?>
92 </div>
93 <?php endif; ?>
94
95 <div class="better-payment-field-advanced-layout field-<?php echo esc_attr($render_attribute_name); ?> pt-5 elementor-repeater-item-<?php echo esc_attr($item['_id']); ?> <?php echo esc_attr( $payment_amount_field_class ); ?> <?php echo esc_attr( $item_visible_class ); ?>">
96 <div class="control has-icons-left">
97 <input class="input is-medium
98 <?php echo esc_attr($render_attribute_class); ?>" type="<?php echo esc_attr($render_attribute_type); ?>" placeholder="<?php echo esc_attr($render_attribute_placeholder); ?>" name="<?php echo esc_attr($render_attribute_name); ?>" <?php if ($render_attribute_required) : ?> required="<?php echo esc_attr($render_attribute_required); ?>" <?php endif; ?> <?php if ($is_payment_amount_field) : ?> step="any" min="<?php echo esc_attr( $render_attribute_min ); ?>" max="<?php echo esc_attr( $render_attribute_max ); ?>" value="<?php echo $is_payment_type_woocommerce || $is_payment_type_fluentcart || $is_payment_type_stripe ? floatval($product_price) : esc_attr( $render_attribute_default ); ?>" <?php echo esc_attr( $render_attribute_default_fixed ); ?> <?php endif; ?>>
99 <span class="icon is-medium is-left">
100 <?php
101 $show_payment_default_symbol = 0;
102 if ( $is_payment_amount_field ) {
103 $show_payment_default_symbol = 'bp-icon bp-envelope' === $render_attribute_icon || 'bp-icon bp-user' === $render_attribute_icon;
104
105 if( $show_payment_default_symbol ){
106 ?>
107 <span class="icon is-medium is-left">
108 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
109 </span>
110 <?php
111 }
112 } ?>
113
114 <?php if ($layout_show_image) : ?>
115 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
116 <?php elseif( ! $show_payment_default_symbol ) : ?>
117 <?php
118 // Use Elementor's Icons_Manager to properly render icons with FontAwesome support
119 if (!empty($item['better_payment_field_icon']['value'])) {
120 \Elementor\Icons_Manager::render_icon($item['better_payment_field_icon'], ['aria-hidden' => 'true']);
121 } else {
122 // Fallback to default icons
123 echo '<i class="' . esc_attr($render_attribute_icon) . '"></i>';
124 }
125 ?>
126 <?php endif; ?>
127 </span>
128 </div>
129 </div>
130 <?php
131 endforeach;
132 endif;
133 ?>
134
135 <div class="pb-5"></div>
136
137 <div class="field-process_payment_button pt-3">
138 <div class="control">
139 <div class="payment__option">
140 <?php
141 if ( !empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable'] ) {
142 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
143 }
144
145 if ( !empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable'] ) {
146 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
147 }
148
149 if ( !empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable'] ) {
150 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
151 }
152 ?>
153 </div>
154 </div>
155 </div>
156 </div>
157 </div>
158 </div>
159 </div>
160 </div>
161 </div>
162 </div>
163 </form>
164
165 </div>
166 </div>
167 </div>