PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 1.0.3
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v1.0.3
2.4.1 2.4.0 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 All 68 releases
better-payment / includes / Admin / views / elementor / layouts / layout-2.php

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

219 lines 20.3 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
12 <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">
13 <input type="hidden" name="better_payment_page_id" value="<?php echo esc_attr( get_the_ID() ); ?>">
14 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr( $widgetObj->get_id() ); ?>">
15
16 <div class="payment-form-layout-2 payment-form-layout">
17 <div class="columns">
18
19 <div class="column is-8 <?php esc_attr_e($layout_form_content_offset_class, 'better-payment'); ?>">
20 <div class="has-background-white-fix form-content-section">
21 <div class="form-content-section-inner p-6">
22 <div class="pt-3 pb-3">
23 <div class="form-content-section-fields">
24 <?php
25 $bp_paypal_button_enable = !empty( $settings[ 'better_payment_form_paypal_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paypal_enable' ];
26 $bp_stripe_button_enable = !empty( $settings[ 'better_payment_form_stripe_enable' ] ) && 'yes' === $settings[ 'better_payment_form_stripe_enable' ];
27 $bp_paystack_button_enable = !empty( $settings[ 'better_payment_form_paystack_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paystack_enable' ];
28 $bp_number_of_items_enable_class = $bp_paypal_button_enable && $bp_stripe_button_enable && $bp_paystack_button_enable ? 'bp-three-items-enabled' : '';
29 ?>
30 <div class="field-payment_method <?php echo esc_attr( $bp_number_of_items_enable_class . '-wrap' ); ?>">
31 <div class="control bp-radio-box">
32 <?php if( true === $bp_paypal_button_enable ) : ?>
33 <?php if(true == $bp_stripe_button_enable || true == $bp_paystack_button_enable): ?>
34 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-paypal <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
35 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
36 <?php esc_html_e('PayPal', 'better-payment'); ?>
37 </label>
38 <?php else: ?>
39 <label class="radio pr-6 mb-5 payment-method-checkbox payment-method-checkbox-paypal single-item active column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
40 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
41 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
42 </label>
43 <?php endif; ?>
44 <?php endif; ?>
45
46 <?php if( true === $bp_stripe_button_enable ) : ?>
47 <?php if( true === $bp_paypal_button_enable || true === $bp_paystack_button_enable ) : ?>
48 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-stripe <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
49 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?>>
50 <?php esc_html_e('Stripe', 'better-payment'); ?>
51 </label>
52 <?php else: ?>
53 <label class="radio pr-6 mb-5 payment-method-checkbox payment-method-checkbox-stripe single-item <?php echo esc_attr('active'); ?> column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
54 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo 'checked'; ?>>
55 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
56 </label>
57 <?php endif; ?>
58 <?php endif; ?>
59
60 <?php if( true === $bp_paystack_button_enable ) : ?>
61 <?php if( true === $bp_paypal_button_enable || true === $bp_stripe_button_enable ) : ?>
62 <label class="radio payment-method-checkbox payment-method-checkbox-paystack <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
63 <input type="radio" name="payment_method" class="layout-payment-method-paystack">
64 <?php esc_html_e('Paystack', 'better-payment'); ?>
65 </label>
66 <?php else: ?>
67 <label class="radio mb-5 payment-method-checkbox payment-method-checkbox-paystack single-item <?php echo esc_attr('active'); ?> column has-text-centered <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
68 <input type="radio" name="payment_method" class="layout-payment-method-paystack" <?php echo 'checked'; ?>>
69 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="">
70 </label>
71 <?php endif; ?>
72 <?php endif; ?>
73 </div>
74 </div>
75
76 <?php
77 if ( !empty( $settings['better_payment_form_fields'] ) ) :
78 foreach ( $settings['better_payment_form_fields'] as $item ) :
79 if ( isset( $item["better_payment_field_name_show"] ) && 'yes' !== $item["better_payment_field_name_show"] ) {
80 $item_primary_field_type = !empty($item["better_payment_primary_field_type"]) ? $item["better_payment_primary_field_type"] : "";
81 $is_payment_amount_field = 'primary_payment_amount' === $item_primary_field_type ? 1 : 0;
82 $is_payment_amount_field_hidden = $is_payment_amount_field ? 1 : 0;
83
84 continue;
85 }
86
87 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
88
89 if ($is_payment_amount_field) : ?>
90 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
91 <?php
92 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
93 $this->render_amount_element($settings);
94 }
95 ?>
96 </div>
97 <?php endif; ?>
98
99 <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 ); ?>">
100 <div class="control has-icons-left">
101 <input class="input is-medium
102 <?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) : ?> min="<?php echo esc_attr( $render_attribute_min ); ?>" max="<?php echo esc_attr( $render_attribute_max ); ?>" value="<?php echo $is_payment_type_woocommerce ? floatval($product_price) : esc_attr( $render_attribute_default ); ?>" <?php echo esc_attr( $render_attribute_default_fixed ); ?> <?php endif; ?>>
103 <span class="icon is-medium is-left">
104 <?php
105 $show_payment_default_symbol = 0;
106 if ( $is_payment_amount_field ) {
107 $show_payment_default_symbol = 'bp-icon bp-envelope' === $render_attribute_icon || 'bp-icon bp-user' === $render_attribute_icon;
108
109 if( $show_payment_default_symbol ){
110 ?>
111 <span class="icon is-medium is-left">
112 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
113 </span>
114 <?php
115 }
116 } ?>
117
118 <?php if ($layout_show_image) : ?>
119 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
120 <?php elseif( ! $show_payment_default_symbol ) : ?>
121 <i class="<?php echo esc_attr($render_attribute_icon); ?>"></i>
122 <?php endif; ?>
123 </span>
124 </div>
125 </div>
126
127 <?php
128 endforeach;
129 endif;
130 ?>
131
132 <?php if ( 0 === $payment_amount_field_exists ) : ?>
133 <div class="bp-payment-amount-wrap <?php echo esc_attr( $layout_put_amount_field_hide_show ); ?> <?php echo esc_attr( $payment_amount_field_class ); ?>">
134 <?php
135 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
136 $this->render_amount_element($settings);
137 }
138 ?>
139 </div>
140
141 <?php if ( 0 === $is_payment_amount_field_hidden ) : ?>
142 <div class="field-payment_amount pt-5 is-hidden1 <?php echo esc_attr( $payment_amount_field_class ); ?>">
143 <div class="control has-icons-left">
144 <input class="input is-medium bp-custom-payment-amount" type="number" placeholder="<?php esc_attr_e('Payment Amount', 'better-payment'); ?>" name="primary_payment_amount" required min="<?php echo esc_attr( $render_attribute_min ); ?>" max="<?php echo esc_attr( $render_attribute_max ); ?>" value="<?php echo esc_attr( $render_attribute_default ); ?>" <?php echo esc_attr( $render_attribute_default_fixed ); ?>>
145 <span class="icon is-medium is-left">
146 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
147 </span>
148 </div>
149 </div>
150 <?php endif; ?>
151
152 <?php endif; ?>
153
154 <div class="pb-5"></div>
155
156 <div class="field-process_payment_button pt-3">
157 <div class="control">
158 <div class="payment__option">
159 <?php
160 if ( !empty( $settings['better_payment_form_paypal_enable'] ) && 'yes' === $settings['better_payment_form_paypal_enable'] ) {
161 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
162 }
163
164 if ( !empty($settings['better_payment_form_stripe_enable'] ) && 'yes' === $settings['better_payment_form_stripe_enable'] ) {
165 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
166 }
167
168 if ( !empty($settings['better_payment_form_paystack_enable'] ) && 'yes' === $settings['better_payment_form_paystack_enable'] ) {
169 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
170 }
171 ?>
172 </div>
173 </div>
174 </div>
175 </div>
176 </div>
177 </div>
178 </div>
179 </div>
180
181 <div class="column">
182 <div class="dynamic-amount-section has-background-link ">
183 <div class="dynamic-amount-section-inner has-text-white p-6">
184 <div class="pt-3 pb-3">
185 <p class="bp-dynamic-amount-section-icon-wrap"><i class="bp-icon bp-swap is-size-1-fix bp-dynamic-amount-section-icon"></i></p>
186 <h4 class="is-size-5-fix pt-5 bp-dynamic-amount-section-title"><?php echo esc_html_e($layout_form_transaction_details_heading, 'better-payment'); ?></h4>
187 <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>
188 <p class="is-size-6-fix pt-2 bp-dynamic-amount-section-amount">
189 <?php echo wp_kses( __(sprintf("%s <a class='has-text-white %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>
190 <?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) : ''), 'better-payment'), $valid_html_tags ); ?>
191 </p>
192 <h4 class="is-size-2-fix pt-5 bp-dynamic-amount-section-amount-summary">
193 <?php
194 echo wp_kses(
195 __(
196 sprintf('%s<span class="bp-transaction-details-amount-text">%s</span>%s',
197 wp_kses( $layout_form_currency_left, $valid_html_tags ),
198 '' !== $product_price ? floatval($product_price) : '',
199 wp_kses( $layout_form_currency_right, $valid_html_tags )
200 ),
201 'better-payment'
202 ),
203 $valid_html_tags
204 );
205 ?>
206 </h4>
207 </div>
208 </div>
209 </div>
210 </div>
211
212 </div>
213
214 </div>
215
216 </form>
217 </div>
218 </div>
219 </div>