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 / Integration / Gclid / ApiHelper.php

ApiHelper.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.9.1, at includes/Core/Integration/Gclid/ApiHelper.php

39 lines 995 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\Integration\Gclid;
4
5 use BitCode\BitForm\Core\Util\HttpHelper;
6
7 class ApiHelper
8 {
9 private $_defaultHeader;
10 private $_licenseKey;
11
12 public function __construct($tokenDetails, $customerId, $licenseKey)
13 {
14 $this->_defaultHeader['Authorization'] = "Bearer {$tokenDetails->access_token}";
15 $this->_defaultHeader['clientCustomerId'] = $customerId;
16 $this->_licenseKey = $licenseKey;
17 }
18
19 public function getGclidInfo()
20 {
21 $data = [
22 'header' => $this->_defaultHeader,
23 'licenseKey' => $this->_licenseKey,
24 'isAuthorization' => false,
25 ];
26 return HttpHelper::post('https://api.bitpress.pro/getGoogleAdData', $data);
27 }
28
29 public function authenticateGoogleAdword()
30 {
31 $data = [
32 'header' => $this->_defaultHeader,
33 'licenseKey' => $this->_licenseKey,
34 'isAuthorization' => true,
35 ];
36 return HttpHelper::post('https://api.bitpress.pro/getGoogleAdData', $data);
37 }
38 }
39