Skip to content

Commit 3b6098b

Browse files
committed
fixed "form" method, bugged backlinks. removed logger. refactored.
1 parent 33a10ed commit 3b6098b

File tree

5 files changed

+348
-1312
lines changed

5 files changed

+348
-1312
lines changed

form_fields.php

Lines changed: 78 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,80 @@
11
<?php
22
return [
3-
'enabled' => [
4-
'title' => __('Enable/Disable', 'woocommerce'),
5-
'type' => 'checkbox',
6-
'label' => __('Enable Payment system PAYNETEASY', 'wc-payneteasy'),
7-
'default' => 'yes'
8-
],
9-
'title' => [
10-
'title' => __('Title', 'woocommerce'),
11-
'type' => 'text',
12-
'description' => __('This controls the title which the user sees during checkout.', 'woocommerce'),
13-
'default' => __('Payment system PAYNETEASY', 'wc-payneteasy'),
14-
'desc_tip' => true,
15-
],
16-
'description' => [
17-
'title' => __('Customer Message', 'wc-payneteasy'),
18-
'type' => 'textarea',
19-
'css' => 'width:500px;',
20-
'default' => __('Pay with PaynetEasy payment', 'wc-payneteasy'),
21-
'description' => __('The message which you want it to appear to the customer in the checkout page.', 'wc-payneteasy'),
22-
],
23-
'endpoint_id' => [
24-
'title' => __('Endpoint id', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
25-
'type' => 'text',
26-
'description' => __('Merchant\'s Endpoint id is required to call the API.', 'wc-payneteasy'),
27-
'placeholder' => __('Enter Endpoint id', 'wc-payneteasy'),
28-
'custom_attributes' => ['required' => 'required'],
29-
],
30-
'login' => [
31-
'title' => __('Login', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
32-
'type' => 'text',
33-
'description' => __('Merchant\'s Login is required to call the API.', 'wc-payneteasy'),
34-
'placeholder' => __('Enter Login', 'wc-payneteasy'),
35-
'custom_attributes' => ['required' => 'required'],
36-
],
37-
'control_key' => [
38-
'title' => __('Control key', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
39-
'type' => 'text',
40-
'description' => __('Merchant\'s Control key is required to call the API.', 'wc-payneteasy'),
41-
'placeholder' => __('Enter Control key', 'wc-payneteasy'),
42-
'custom_attributes' => ['required' => 'required'],
43-
],
44-
'payment_method' => [
45-
'title' => __('Payment method', 'wc-payneteasy'),
46-
'type' => 'select',
47-
'description' => __('', 'wc-payneteasy'),
48-
'placeholder' => __('Enter Payment method', 'wc-payneteasy'),
49-
'options' => [
50-
'form' => __('Form', 'wc-payneteasy'),
51-
'direct' => __('Direct', 'wc-payneteasy')
52-
],
53-
'desc_tip' => true,
54-
'default' => 'form'
55-
],
56-
'sandbox' => [
57-
'title' => __('Sandbox mode', 'wc-payneteasy'),
58-
'type' => 'checkbox',
59-
'label' => __('Enable sandbox mode', 'wc-payneteasy'),
60-
'description' => __('In this mode, the payment for the goods is not charged.', 'wc-payneteasy'),
61-
'default' => 'no'
62-
],
63-
'logging' => [
64-
'title' => __('Logging', 'wc-payneteasy'),
65-
'type' => 'checkbox',
66-
'label' => __('Enable logging', 'wc-payneteasy'),
67-
'description' => __('Logging is used to debug plugin performance by storing API request data.', 'wc-payneteasy'),
68-
'default' => 'no'
69-
],
70-
'three_d_secure' => [
71-
'title' => __('3D Secure', 'wc-payneteasy'),
72-
'type' => 'checkbox',
73-
'label' => __('Enable 3D Secure', 'wc-payneteasy'),
74-
'description' => __('3D Secure or Non 3D Secure (WORK ONLY WITH DIRECT INTEGRATION METHOD)', 'wc-payneteasy'),
75-
'default' => 'no'
76-
],
77-
'require_ssn' => [
78-
'title' => __('Require CPF', 'wc-payneteasy'),
79-
'type' => 'checkbox',
80-
'label' => __('Require Document Number (CPF)', 'wc-payneteasy'),
81-
'description' => __('Show CPF input field at checkout page', 'wc-payneteasy'),
82-
'default' => 'no'
83-
],
84-
'live_url' => [
85-
'title' => __('Gateway url (LIVE)', 'wc-payneteasy'),
86-
'type' => 'text',
87-
'description' => __("https://gate.payneteasy.com/ etc.", 'wc-payneteasy'),
88-
'placeholder' => __('Enter live url.', 'wc-payneteasy'),
89-
],
90-
'sandbox_url' => [
91-
'title' => __('Gateway url (SANDBOX)', 'wc-payneteasy'),
92-
'type' => 'text',
93-
'description' => __("https://sandbox.payneteasy.com/ etc.", 'wc-payneteasy'),
94-
'placeholder' => __('Enter sandbox url.', 'wc-payneteasy'),
95-
],
96-
'notify_url' => [
97-
'title' => __('Notify url', 'wc-payneteasy'),
98-
'type' => 'text',
99-
'description' => __('Notify gate url sprintf mask, order_id being parameter', 'wc-payneteasy'),
100-
'placeholder' => __('Enter notify gate url mask.', 'wc-payneteasy'),
101-
],
102-
'transaction_end' => [
103-
'title' => __('Successful transaction order status', 'wc-payneteasy'),
104-
'type' => 'select',
105-
'options' => wc_get_order_statuses(),
106-
'description' => __('Select the order status to be displayed after successful payment.', 'wc-payneteasy'),
107-
'default' => 'wc-processing'
108-
]
109-
];
3+
'enabled' => [
4+
'title' => __('Enable/Disable', 'woocommerce'),
5+
'type' => 'checkbox',
6+
'label' => __('Enable Payment system PAYNETEASY', 'wc-payneteasy'),
7+
'default' => 'yes' ],
8+
'title' => [
9+
'title' => __('Title', 'woocommerce'),
10+
'type' => 'text',
11+
'description' => __('This controls the title which the user sees during checkout.', 'woocommerce'),
12+
'default' => __('Payment system PAYNETEASY', 'wc-payneteasy'),
13+
'desc_tip' => true ],
14+
'description' => [
15+
'title' => __('Customer Message', 'wc-payneteasy'),
16+
'type' => 'textarea',
17+
'css' => 'width:500px;',
18+
'default' => __('Pay with PaynetEasy payment', 'wc-payneteasy'),
19+
'description' => __('The message which you want it to appear to the customer in the checkout page.', 'wc-payneteasy') ],
20+
'endpoint_id' => [
21+
'title' => __('Endpoint id', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
22+
'type' => 'text',
23+
'description' => __('Merchant\'s Endpoint id is required to call the API.', 'wc-payneteasy'),
24+
'placeholder' => __('Enter Endpoint id', 'wc-payneteasy'),
25+
'custom_attributes' => ['required' => 'required'] ],
26+
'login' => [
27+
'title' => __('Login', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
28+
'type' => 'text',
29+
'description' => __('Merchant\'s Login is required to call the API.', 'wc-payneteasy'),
30+
'placeholder' => __('Enter Login', 'wc-payneteasy'),
31+
'custom_attributes' => ['required' => 'required'] ],
32+
'control_key' => [
33+
'title' => __('Control key', 'wc-payneteasy') . ' <span style="color:red;">*<span/>',
34+
'type' => 'text',
35+
'description' => __('Merchant\'s Control key is required to call the API.', 'wc-payneteasy'),
36+
'placeholder' => __('Enter Control key', 'wc-payneteasy'),
37+
'custom_attributes' => ['required' => 'required'] ],
38+
'payment_method' => [
39+
'title' => __('Payment method', 'wc-payneteasy'),
40+
'type' => 'select',
41+
'description' => __('', 'wc-payneteasy'),
42+
'placeholder' => __('Enter Payment method', 'wc-payneteasy'),
43+
'options' => [
44+
'form' => __('Form', 'wc-payneteasy'),
45+
'direct' => __('Direct', 'wc-payneteasy') ],
46+
'desc_tip' => true,
47+
'default' => 'form' ],
48+
'require_ssn' => [
49+
'title' => __('Require CPF', 'wc-payneteasy'),
50+
'type' => 'checkbox',
51+
'label' => __('Require Document Number (CPF)', 'wc-payneteasy'),
52+
'description' => __('Show CPF input field at checkout page', 'wc-payneteasy'),
53+
'default' => 'no' ],
54+
'sandbox' => [
55+
'title' => __('Sandbox mode', 'wc-payneteasy'),
56+
'type' => 'checkbox',
57+
'label' => __('Enable sandbox mode', 'wc-payneteasy'),
58+
'description' => __('In this mode, the payment for the goods is not charged.', 'wc-payneteasy'),
59+
'default' => 'no' ],
60+
'live_url' => [
61+
'title' => __('Gateway url (LIVE)', 'wc-payneteasy'),
62+
'type' => 'text',
63+
'description' => __("https://gate.payneteasy.com/ etc.", 'wc-payneteasy'),
64+
'placeholder' => __('Enter live url.', 'wc-payneteasy') ],
65+
'sandbox_url' => [
66+
'title' => __('Gateway url (SANDBOX)', 'wc-payneteasy'),
67+
'type' => 'text',
68+
'description' => __("https://sandbox.payneteasy.com/ etc.", 'wc-payneteasy'),
69+
'placeholder' => __('Enter sandbox url.', 'wc-payneteasy') ],
70+
'notify_url' => [
71+
'title' => __('Notify url', 'wc-payneteasy'),
72+
'type' => 'text',
73+
'description' => __('Notify gate url sprintf mask, order_id being parameter', 'wc-payneteasy'),
74+
'placeholder' => __('Enter notify gate url mask.', 'wc-payneteasy') ],
75+
'transaction_end' => [
76+
'title' => __('Successful transaction order status', 'wc-payneteasy'),
77+
'type' => 'select',
78+
'options' => wc_get_order_statuses(),
79+
'description' => __('Select the order status to be displayed after successful payment.', 'wc-payneteasy'),
80+
'default' => 'wc-processing' ] ];

0 commit comments

Comments
 (0)