PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Core/Integration/ZohoSign/ZohoSignHandler.php +10 -34 3.3.12.15.3 View file →
@@ -6,16 +6,11 @@
6 6 */
7 7
8 8 namespace BitCode\BitForm\Core\Integration\ZohoSign;
9 9
10 -if (!defined('ABSPATH')) {
11 - exit;
12 -}
13 -
14 10 use BitCode\BitForm\Core\Integration\IntegrationHandler;
15 11 use BitCode\BitForm\Core\Util\HttpHelper;
16 12 use BitCode\BitForm\Core\Util\IpTool;
17 -use BitCode\BitForm\GlobalHelper;
18 13 use WP_Error;
19 14
20 15 /**
21 16 * Provide functionality for ZohoCrm integration
@@ -49,16 +44,11 @@
49 44 * @return JSON zoho crm api response and status
50 45 */
51 46 public static function generateTokens()
52 47 {
53 - if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_REQUEST['_ajax_nonce'])), 'bitforms_save')) {
54 - GlobalHelper::requirePostMethod();
55 -
56 - try {
57 - $requestsParams = GlobalHelper::formatRequestData();
58 - } catch (\InvalidArgumentException $e) {
59 - wp_send_json_error($e->getMessage(), 400);
60 - }
48 + if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce($_REQUEST['_ajax_nonce'], 'bitforms_save')) {
49 + $inputJSON = file_get_contents('php://input');
50 + $requestsParams = json_decode($inputJSON);
61 51 if (
62 52 empty($requestsParams->{'accounts-server'})
63 53 || empty($requestsParams->dataCenter)
64 54 || empty($requestsParams->clientId)
@@ -169,19 +159,12 @@
169 159 }
170 160
171 161 public static function refreshTemplatesAjaxHelper()
172 162 {
173 - if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_REQUEST['_ajax_nonce'])), 'bitforms_save')) {
163 + if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce($_REQUEST['_ajax_nonce'], 'bitforms_save')) {
174 164 $authorizationHeader = null;
175 -
176 - GlobalHelper::requirePostMethod();
177 -
178 - try {
179 - $queryParams = GlobalHelper::formatRequestData();
180 - } catch (\InvalidArgumentException $e) {
181 - wp_send_json_error($e->getMessage(), 400);
182 - }
183 -
165 + $inputJSON = file_get_contents('php://input');
166 + $queryParams = json_decode($inputJSON);
184 167 if (
185 168 empty($queryParams->tokenDetails)
186 169 || empty($queryParams->dataCenter)
187 170 || empty($queryParams->clientId)
@@ -238,19 +221,12 @@
238 221 }
239 222
240 223 public static function refreshTemplateDetailsAjaxHelper()
241 224 {
242 - if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_REQUEST['_ajax_nonce'])), 'bitforms_save')) {
225 + if (isset($_REQUEST['_ajax_nonce']) && wp_verify_nonce($_REQUEST['_ajax_nonce'], 'bitforms_save')) {
243 226 $authorizationHeader = null;
244 -
245 - GlobalHelper::requirePostMethod();
246 -
247 - try {
248 - $queryParams = GlobalHelper::formatRequestData();
249 - } catch (\InvalidArgumentException $e) {
250 - wp_send_json_error($e->getMessage(), 400);
251 - }
252 -
227 + $inputJSON = file_get_contents('php://input');
228 + $queryParams = json_decode($inputJSON);
253 229 if (
254 230 empty($queryParams->tokenDetails)
255 231 || empty($queryParams->dataCenter)
256 232 || empty($queryParams->clientId)
@@ -331,9 +307,9 @@
331 307 }
332 308 }
333 309
334 310 // $actions = $integrationDetails->actions;
335 - $recordApiHelper = new RecordApiHelper($tokenDetails, $this->_integrationID, $logID, $this->_formID, $entryID);
311 + $recordApiHelper = new RecordApiHelper($tokenDetails, $this->_integrationID, $logID);
336 312
337 313 $zsignApiResponse = $recordApiHelper->executeRecordApi(
338 314 $dataCenter,
339 315 $template,