PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.9.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.9.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 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.9.1, at includes/Core/Util/ApiResponse.php

33 lines 852 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 {
9 public function apiResponse($logID, $integrationId, $apiType, $responseType, $responseObj)
10 {
11 if (!$apiType || !$responseObj) {
12 return false;
13 }
14 $apiType = wp_json_encode($apiType);
15 $responseObj = wp_json_encode($responseObj);
16
17 $ipTool = new IpTool();
18 $user_details = $ipTool->getUserDetail();
19 $formEntryModel = new FormEntryLogModel();
20 $result = $formEntryModel->log_history_insert(
21 [
22 'log_id' => $logID,
23 'integration_id' => $integrationId,
24 'api_type' => $apiType,
25 'response_type' => $responseType,
26 'response_obj' => $responseObj,
27 'created_at' => $user_details['time'],
28 ]
29 );
30 return $result;
31 }
32 }
33