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.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-block / layout-2.php

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

192 lines 17.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="better-payment <?php echo esc_attr( ! empty( $extraDatas['block_id'] ) ? 'bp-' . $extraDatas['block_id'] : '' ); ?>">
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 // Block only: treat 'stripe' product source the same as woocommerce/fluentcart —
12 // hide the manual amount field and show the product price section.
13 if ( ! empty( $settings['better_payment_form_payment_source'] ) && 'stripe' === $settings['better_payment_form_payment_source'] ) {
14 $layout_put_amount_field_hide_show = 'is-hidden';
15 $layout_dynamic_payment_hide_show = '';
16 }
17
18 $render_attribute_default_text = $this->render_attribute_default_text( $settings );
19 ?>
20
21 <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">
22 <input type="hidden" name="better_payment_page_id" value="<?php echo esc_attr( get_the_ID() ); ?>">
23 <input type="hidden" name="better_payment_widget_id" value="<?php echo esc_attr( $widgetObj->get_id() ); ?>">
24 <input type="hidden" name="better_payment_source" value="gutenberg">
25 <?php
26 if ( method_exists( $widgetObj, 'render_campaign_id_hidden_field' ) ) {
27 echo $widgetObj->render_campaign_id_hidden_field( $settings );
28 }
29 ?>
30
31 <div class="payment-form-layout-2 payment-form-layout">
32 <div class="columns">
33
34 <div class="column <?php echo ( intval( $sidebar_show ) ? esc_attr('is-8') : esc_attr('is-12') ); ?> <?php esc_attr_e($layout_form_content_offset_class, 'better-payment'); ?>">
35 <div class="has-background-white-fix form-content-section">
36 <div class="form-content-section-inner p-6">
37 <div class="pt-3 pb-3">
38 <div class="form-content-section-fields">
39 <?php
40 $bp_paypal_button_enable = !empty( $settings[ 'better_payment_form_paypal_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paypal_enable' ];
41 $bp_stripe_button_enable = !empty( $settings[ 'better_payment_form_stripe_enable' ] ) && 'yes' === $settings[ 'better_payment_form_stripe_enable' ];
42 $bp_paystack_button_enable = !empty( $settings[ 'better_payment_form_paystack_enable' ] ) && 'yes' === $settings[ 'better_payment_form_paystack_enable' ];
43 $bp_number_of_items_enable_class = $bp_paypal_button_enable && $bp_stripe_button_enable && $bp_paystack_button_enable ? 'bp-three-items-enabled' : '';
44 ?>
45 <div class="field-payment_method <?php echo esc_attr( $bp_number_of_items_enable_class . '-wrap' ); ?>">
46 <div class="control bp-radio-box">
47 <?php if( true === $bp_paypal_button_enable ) : ?>
48 <?php if(true == $bp_stripe_button_enable || true == $bp_paystack_button_enable): ?>
49 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-paypal <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
50 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
51 <?php esc_html_e('PayPal', 'better-payment'); ?>
52 </label>
53 <?php else: ?>
54 <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 ); ?>">
55 <input type="radio" name="payment_method" class="layout-payment-method-paypal" checked>
56 <img src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paypal.png'); ?>" alt="PayPal">
57 </label>
58 <?php endif; ?>
59 <?php endif; ?>
60
61 <?php if( true === $bp_stripe_button_enable ) : ?>
62 <?php if( true === $bp_paypal_button_enable || true === $bp_paystack_button_enable ) : ?>
63 <label class="radio pr-6 payment-method-checkbox payment-method-checkbox-stripe <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
64 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo empty($settings['better_payment_form_paypal_enable']) ? 'checked' : '' ?>>
65 <?php esc_html_e('Stripe', 'better-payment'); ?>
66 </label>
67 <?php else: ?>
68 <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 ); ?>">
69 <input type="radio" name="payment_method" class="layout-payment-method-stripe" <?php echo 'checked'; ?>>
70 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/stripe.svg'); ?>" alt="Stripe">
71 </label>
72 <?php endif; ?>
73 <?php endif; ?>
74
75 <?php if( true === $bp_paystack_button_enable ) : ?>
76 <?php if( true === $bp_paypal_button_enable || true === $bp_stripe_button_enable ) : ?>
77 <label class="radio payment-method-checkbox payment-method-checkbox-paystack <?php echo esc_attr( $bp_number_of_items_enable_class ); ?>">
78 <input type="radio" name="payment_method" class="layout-payment-method-paystack">
79 <?php esc_html_e('Paystack', 'better-payment'); ?>
80 </label>
81 <?php else: ?>
82 <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 ); ?>">
83 <input type="radio" name="payment_method" class="layout-payment-method-paystack" <?php echo 'checked'; ?>>
84 <img style="margin-left: -35px" src="<?php echo esc_url(BETTER_PAYMENT_ASSETS . '/img/paystack.svg'); ?>" alt="">
85 </label>
86 <?php endif; ?>
87 <?php endif; ?>
88 </div>
89 </div>
90
91 <?php
92 if ( !empty( $settings['better_payment_form_fields'] ) ) :
93 foreach ( $settings['better_payment_form_fields'] as $item ) :
94 include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/layout-repeater-vars.php";
95
96 if ($is_payment_amount_field) : ?>
97 <div class="bp-payment-amount-wrap <?php esc_attr_e($layout_put_amount_field_hide_show, 'better-payment'); ?>">
98 <?php
99 if (!empty($settings['better_payment_show_amount_list']) && 'yes' === $settings['better_payment_show_amount_list']) {
100 $this->render_amount_element($settings);
101 }
102 ?>
103 </div>
104 <?php endif; ?>
105
106 <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 ); ?>">
107 <div class="control has-icons-left">
108 <input class="input is-medium
109 <?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; ?>>
110 <span class="icon is-medium is-left">
111 <?php if ( $is_payment_amount_field ) : ?>
112 <?php printf( '<span class="bp-currency-symbol">%s</span>', esc_html( $layout_form_currency_symbol ) ); ?>
113 <?php elseif ($layout_show_image) : ?>
114 <img src="<?php echo esc_url($render_attribute_icon); ?>" alt="Icon" width="20">
115 <?php else : ?>
116 <i class="<?php echo esc_attr($render_attribute_icon); ?>"></i>
117 <?php endif; ?>
118 </span>
119 </div>
120 </div>
121
122 <?php
123 endforeach;
124 endif;
125 ?>
126
127 <div class="pb-5"></div>
128
129 <div class="field-process_payment_button pt-3">
130 <div class="control">
131 <div class="payment__option">
132 <?php
133 if ( !empty( $settings['better_payment_form_paypal_enable'] ) && 'yes' === $settings['better_payment_form_paypal_enable'] ) {
134 echo Better_Payment\Lite\Classes\Handler::paypal_button(esc_attr($widgetObj->get_id()), $settings);
135 }
136
137 if ( !empty($settings['better_payment_form_stripe_enable'] ) && 'yes' === $settings['better_payment_form_stripe_enable'] ) {
138 echo Better_Payment\Lite\Classes\Handler::stripe_button(esc_attr($widgetObj->get_id()), $settings);
139 }
140
141 if ( !empty($settings['better_payment_form_paystack_enable'] ) && 'yes' === $settings['better_payment_form_paystack_enable'] ) {
142 echo Better_Payment\Lite\Classes\Handler::paystack_button(esc_attr($widgetObj->get_id()), $settings);
143 }
144 ?>
145 </div>
146 </div>
147 </div>
148 </div>
149 </div>
150 </div>
151 </div>
152 </div>
153
154 <div class="column">
155 <?php if ( $sidebar_show ) : ?>
156 <div class="dynamic-amount-section has-background-link ">
157 <div class="dynamic-amount-section-inner has-text-white p-6">
158 <div class="pt-3 pb-3">
159 <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>
160 <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>
161 <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>
162 <p class="is-size-6-fix pt-2 bp-dynamic-amount-section-amount">
163 <?php if ( $is_payment_type_woocommerce || $is_payment_type_fluentcart ) : ?>
164 <?php printf( wp_kses( __( '%1$s <a class="has-text-white" href="%2$s">%3$s</a>', 'better-payment' ), $valid_html_tags ), esc_html( $layout_form_transaction_details_product_title ), esc_url( $product_permalink ), esc_html( $product_name ) ); ?><br>
165 <?php endif; ?>
166 <?php printf( wp_kses( __( '%1$s <span class="bp-transaction-details-amount-text">%2$s</span>', 'better-payment' ), $valid_html_tags ), esc_html( $layout_form_transaction_details_amount_text ), '' !== $product_price ? floatval( $product_price ) : esc_html( $render_attribute_default_text ) ); ?>
167 </p>
168 <h4 class="is-size-2-fix pt-5 bp-dynamic-amount-section-amount-summary">
169 <?php
170 printf(
171 wp_kses( __( '%1$s<span class="bp-transaction-details-amount-text">%2$s</span>%3$s', 'better-payment' ), $valid_html_tags ),
172 wp_kses( $layout_form_currency_left, $valid_html_tags ),
173 '' !== $product_price ? floatval( $product_price ) : esc_html( $render_attribute_default_text ),
174 wp_kses( $layout_form_currency_right, $valid_html_tags )
175 );
176 ?>
177 </h4>
178 </div>
179 </div>
180 </div>
181 <?php endif; ?>
182 </div>
183
184 </div>
185
186 </div>
187
188 </form>
189 </div>
190 </div>
191 </div>
192