PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 1.0.4
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v1.0.4
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-3.php

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

182 lines 17.2 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-3 payment-form-layout">
17 <div class="tile is-ancestor m-0">
18 <?php if ( $sidebar_show ) : ?>
19 <div class="tile is-parent dynamic-amount-section ">
20 <div class="tile is-child">
21 <div class="dynamic-amount-section-inner has-text-white p-6">
22 <div class="pt-3 pb-3">
23 <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>
24 <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>
25 <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>
26 <p class="is-size-6-fix pt-2 dynamic-amount-section-subtitle bp-dynamic-amount-section-amount">
27 <?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>
28 <?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 ); ?>
29 </p>
30 <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) : '', wp_kses( $layout_form_currency_right, $valid_html_tags ) ), 'better-payment'), $valid_html_tags ); ?></h4>
31 </div>
32 </div>
33 </div>
34 </div>
35 <?php endif; ?>
36
37 <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'); ?>">
38 <div class="tile is-child">
39 <div class="form-content-section-inner p-6">
40 <div class="pt-3 pb-3">
41 <div class="form-content-section-fields">
42 <div class="field-payment_method">
43 <div class="control bp-radio-box columns">
44 <?php
45 $bp_paypal_button_enable = !empty( $settings[ 'better_payment_form_paypal_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paypal_enable' ];
46 $bp_stripe_button_enable = !empty( $settings[ 'better_payment_form_stripe_enable' ] ) && 'yes' === $settings[ 'better_payment_form_stripe_enable' ];
47 $bp_paystack_button_enable = !empty( $settings[ 'better_payment_form_paystack_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paystack_enable' ];
48 ?>
49
50 <?php if( true === $bp_paypal_button_enable ) : ?>
51 <label class="radio mb-5 payment-method-checkbox active column has-text-centered payment-method-checkbox-paypal">
52 <input type="radio" name="payment_method" class="layout-payment-method-input layout-payment-method-paypal" checked>
53 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
54 </label>
55 <?php endif; ?>
56
57 <?php if( true === $bp_stripe_button_enable ) : ?>
58 <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">
59 <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' : '' ?>>
60 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
61 </label>
62 <?php endif; ?>
63
64 <?php if( true === $bp_paystack_button_enable ) : ?>
65 <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">
66 <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' : '' ?>>
67 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="Paystack">
68 </label>
69 <?php endif; ?>
70 </div>
71 </div>
72
73 <?php
74 if ( !empty( $settings['better_payment_form_fields'] ) ) :
75 foreach ( $settings['better_payment_form_fields'] as $item ) :
76 if ( isset( $item["better_payment_field_name_show"] ) && 'yes' !== $item["better_payment_field_name_show"] ) {
77 $item_primary_field_type = !empty($item["better_payment_primary_field_type"]) ? $item["better_payment_primary_field_type"] : "";
78 $is_payment_amount_field = 'primary_payment_amount' === $item_primary_field_type ? 1 : 0;
79 $is_payment_amount_field_hidden = $is_payment_amount_field ? 1 : 0;
80
81 continue;
82 }
83
84 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
85
86 if ($is_payment_amount_field) : ?>
87 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
88 <?php
89 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
90 $this->render_amount_element($settings);
91 }
92 ?>
93 </div>
94 <?php endif; ?>
95
96 <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 ); ?>">
97 <div class="control has-icons-left">
98 <input class="input is-medium
99 <?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; ?>>
100 <span class="icon is-medium is-left">
101 <?php
102 $show_payment_default_symbol = 0;
103 if ( $is_payment_amount_field ) {
104 $show_payment_default_symbol = 'bp-icon bp-envelope' === $render_attribute_icon || 'bp-icon bp-user' === $render_attribute_icon;
105
106 if( $show_payment_default_symbol ){
107 ?>
108 <span class="icon is-medium is-left">
109 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
110 </span>
111 <?php
112 }
113 } ?>
114
115 <?php if ($layout_show_image) : ?>
116 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
117 <?php elseif( ! $show_payment_default_symbol ) : ?>
118 <i class="<?php echo esc_attr($render_attribute_icon); ?>"></i>
119 <?php endif; ?>
120 </span>
121 </div>
122 </div>
123 <?php
124 endforeach;
125 endif;
126 ?>
127
128 <?php if ( 0 === $payment_amount_field_exists ) : ?>
129 <div class="bp-payment-amount-wrap <?php echo esc_attr( $layout_put_amount_field_hide_show ); ?> <?php echo esc_attr( $payment_amount_field_class ); ?>">
130 <?php
131 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
132 $this->render_amount_element($settings);
133 }
134 ?>
135 </div>
136
137 <?php if ( 0 === $is_payment_amount_field_hidden ) : ?>
138 <div class="field-payment_amount pt-5 is-hidden1 <?php echo esc_attr( $payment_amount_field_class ); ?>">
139 <div class="control has-icons-left">
140 <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 ); ?>>
141 <span class="icon is-medium is-left">
142 <?php printf('<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
143 </span>
144 </div>
145 </div>
146 <?php endif; ?>
147
148 <?php endif; ?>
149
150 <div class="pb-5"></div>
151
152 <div class="field-process_payment_button pt-3">
153 <div class="control">
154 <div class="payment__option">
155 <?php
156 if ( !empty($settings['better_payment_form_paypal_enable']) && 'yes' === $settings['better_payment_form_paypal_enable'] ) {
157 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
158 }
159
160 if ( !empty($settings['better_payment_form_stripe_enable']) && 'yes' === $settings['better_payment_form_stripe_enable'] ) {
161 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
162 }
163
164 if ( !empty($settings['better_payment_form_paystack_enable']) && 'yes' === $settings['better_payment_form_paystack_enable'] ) {
165 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
166 }
167 ?>
168 </div>
169 </div>
170 </div>
171 </div>
172 </div>
173 </div>
174 </div>
175 </div>
176 </div>
177 </div>
178 </form>
179
180 </div>
181 </div>
182 </div>