PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.0
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 2.10.2 All 137 releases
bit-form / includes / Core / Util / ApiResponse.php

ApiResponse.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.0, at includes/Core/Util/ApiResponse.php

31 lines 850 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\Core\Util;
4
5 use BitCode\BitForm\Core\Database\FormEntryLogModel;
6
7 final class ApiResponse {
8 public function apiResponse($logID, $integrationId, $apiType, $responseType, $responseObj) {
9 if (!$apiType || !$responseObj) {
10 return false;
11 }
12 $apiType = wp_json_encode($apiType);
13 $responseObj = wp_json_encode($responseObj);
14
15 $ipTool = new IpTool();
16 $user_details = $ipTool->getUserDetail();
17 $formEntryModel = new FormEntryLogModel();
18 $result = $formEntryModel->log_history_insert(
19 [
20 'log_id' => $logID,
21 'integration_id' => $integrationId,
22 'api_type' => $apiType,
23 'response_type' => $responseType,
24 'response_obj' => $responseObj,
25 'created_at' => $user_details['time'],
26 ]
27 );
28 return $result;
29 }
30 }
31