File tree Expand file tree Collapse file tree 7 files changed +576
-1247
lines changed Expand file tree Collapse file tree 7 files changed +576
-1247
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ composer update
34
34
and see if specifying a version resolves the issue, example:
35
35
36
36
``` php
37
- composer require quickbooks/payments-sdk 1.0.2
37
+ composer require quickbooks/payments-sdk 1.0.5
38
38
```
39
39
40
40
To use the package, use Composer's [ autoload] ( https://getcomposer.org/doc/01-basic-usage.md#autoloading ) :
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class ClientFactory
8
8
public static function buildCurlClient (
9
9
int $ connectionTimeOut = 10 ,
10
10
int $ requestTimeOut = 100 ,
11
- bool $ isVerify = true
11
+ bool $ isVerify = false
12
12
) {
13
13
$ client = new HttpCurlClient ();
14
14
$ client ->setVerifySSL ($ isVerify );
@@ -19,7 +19,7 @@ public static function buildCurlClient(
19
19
public static function buildGuzzleClient (
20
20
int $ connectionTimeOut = 10 ,
21
21
int $ requestTimeOut = 100 ,
22
- bool $ isVerify = true
22
+ bool $ isVerify = false
23
23
) {
24
24
$ client = new GuzzleClient ();
25
25
$ client ->setVerifySSL ($ isVerify );
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ private function prepare(RequestInterface $request) : void
115
115
} else {
116
116
$ this ->baseCurl ->setupOption (CURLOPT_CUSTOMREQUEST , $ request ->getMethod ());
117
117
}
118
+ $ this ->baseCurl ->setupOption (CURLOPT_SSL_VERIFYPEER , true );
118
119
if ($ this ->isVerifySSL ) {
119
120
$ this ->setSSLConfig ();
120
121
} else {
@@ -145,19 +146,13 @@ private function setPostBodyAndMethod(RequestInterface $request)
145
146
146
147
private function setSSLConfig ()
147
148
{
148
- $ tlsVersion = $ this ->baseCurl ->versionOfTLS ();
149
- $ versions = ['TLS 1.2 ' , 'TLS 1.3 ' ];
150
- if (!in_array ($ tlsVersion , $ versions )) {
151
- throw new \RuntimeException ("Error. Checking TLS 1.2/1.3 version failed. Please make sure your PHP cURL supports TSL 1.2/1.3 " );
152
- }
153
- $ this ->baseCurl ->setupOption (CURLOPT_SSL_VERIFYPEER , true );
154
149
$ this ->baseCurl ->setupOption (CURLOPT_SSL_VERIFYHOST , 2 );
155
150
$ this ->baseCurl ->setupOption (CURLOPT_CAINFO , CoreConstants::getCertPath ());
156
151
}
157
152
158
153
private function acceptAll ()
159
154
{
160
- $ this ->baseCurl ->setupOption (CURLOPT_SSL_VERIFYPEER , false );
155
+ $ this ->baseCurl ->setupOption (CURLOPT_SSL_VERIFYHOST , 0 );
161
156
}
162
157
163
158
private function updateCurlSettings ()
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class Card extends Entity
21
21
public $ entityVersion ;
22
22
public $ entityId ;
23
23
public $ entityType ;
24
+ public $ zeroDollarVerification ;
24
25
25
26
public function __construct (array $ array = array ())
26
27
{
Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace QuickBooksOnline \Payments \Modules ;
3
+
4
+ use QuickBooksOnline \Payments \Operations \OperationsConverter ;
5
+
6
+ class ZeroDollarVerification
7
+ {
8
+ public $ status ;
9
+
10
+ public function __construct (array $ array = array ())
11
+ {
12
+ foreach ($ array as $ name => $ value ) {
13
+ if (property_exists (get_class ($ this ), $ name )) {
14
+ if (isset ($ value )) {
15
+ if (is_array ($ value )) {
16
+ $ className = ModulesConstants::NAMESPACE_Modules . OperationsConverter::toUpperCaseClassName ($ name );
17
+ $ obj = new $ className ($ value );
18
+ $ this ->{$ name } = $ obj ;
19
+ } else {
20
+ $ this ->{$ name } = $ value ;
21
+ }
22
+ }
23
+ } else {
24
+ throw new \RuntimeException ("Property name: [ " . $ name . "] is not a valid field for: [ " . get_class ($ this ) . "]. Please check your keys. " );
25
+ }
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ final class TestClientCreator
10
10
public static function createInstance ()
11
11
{
12
12
$ client = new PaymentClient ();
13
- $ client ->setAccessToken ("eyJlbmMiOiJBMTI4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RlSMj0JexcB9qn-qwAi4U5uaqixZ93Qq6OFIJCBYwW_9C15OG6jcL7lrtXjQPKE6I6p1PEeih6IjArlvSiLmENtcIpv8TTL5AASqDuNoFtbGkCt8VHmAMdkoDos2YRvXQdI_hXzvqYtulC9kzf0b0GVc-rtA0X1HYlLiJ2f9pE6U_nU4g-ndGTR-V8VYN9_X8ftjHAhn6CgBsPptgI9bsWHw5t5fVNo4fBIwuuHoMTHiVp_UM4K-gCimTuDz3W07gf3yfsCvGfOqxpW8hc8mhPRpkuLE3oT5b7UrEpqyOCk0tUSi3KLbez8gpVutsp2J-4zmsaf4Zbl1IAfDkqjgfYSzD3lwn0pkjzvTDErFkxaz7uFH4vSoZ58rmQm0GjSdjcxgKGR_-c63-WKm3Cp14Q2NJx1CO8sRkbefyF-zttvas2PS0rpZaHLOEtLdRZxWW6eVAAZie3i0joZIrcQ4JU6ERuMstYI0il4bH9OyeWGuM9uFUEJ6cPgyxIiLWvKAi_FtGvSpzD6olhPbJun6yOBxESxkdIcuvruw.wuAWaQkIIIfV6R2InAdJrg " )
14
14
->setEnvironment ("sandbox " );
15
15
return $ client ;
16
16
}
You can’t perform that action at this time.
0 commit comments