PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 1.2.6
JetFormBuilder — Dynamic Blocks Form Builder v1.2.6
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / gateways / gateways-editor-data.php
jetformbuilder / includes / gateways Last commit date
paypal 4 years ago base-gateway.php 4 years ago gateway-manager.php 4 years ago gateways-editor-data.php 4 years ago
gateways-editor-data.php
71 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Gateways;
5
6
7 use Jet_Form_Builder\Plugin;
8
9 trait Gateways_Editor_Data {
10
11 private function labels() {
12 return array_merge(
13 array(
14 'notifications_before' => __( 'Before payment processed:', 'jet-form-builder' ),
15 'notifications_success' => __( 'On successful payment:', 'jet-form-builder' ),
16 'notifications_failed' => __( 'On failed payment:', 'jet-form-builder' ),
17 'price_field' => __( 'Price/amount field', 'jet-form-builder' ),
18 'message_success' => __( 'Payment success message', 'jet-form-builder' ),
19 'message_failed' => __( 'Payment failed message', 'jet-form-builder' ),
20 'use_success_redirect' => __( 'Use redirect URL from Redirect notification', 'jet-form-builder' ),
21 'action_order' => __( 'Create payment order notification:', 'jet-form-builder' )
22 ),
23 $this->options_labels()
24 );
25 }
26
27 public function default_messages() {
28 return array(
29 'success' => 'Payment success message',
30 'failed' => 'Payment failed message',
31 );
32 }
33
34 private function options_labels() {
35 $result = array();
36
37 foreach ( $this->_gateways as $gateway ) {
38 $result[ $gateway->get_id() ] = $gateway->options( 'label' );
39 }
40
41 return $result;
42 }
43
44 private function gateways_for_js() {
45 $result = array();
46
47 foreach ( $this->_gateways as $gateway ) {
48 $result[] = array(
49 'value' => $gateway->get_id(),
50 'label' => $gateway->get_name()
51 );
52 }
53
54 return $result;
55 }
56
57 public function editor_data() {
58 $result = array(
59 'allowed' => Plugin::instance()->allow_gateways
60 );
61
62 if ( $result['allowed'] ) {
63 $result['labels'] = $this->labels();
64 $result['list'] = $this->gateways_for_js();
65 $result['messages'] = $this->default_messages();
66 }
67
68 return $result;
69 }
70
71 }