Skip to content

Commit 5629320

Browse files
Fixed issue with https websites
1 parent 72c48d2 commit 5629320

File tree

3 files changed

+10
-228
lines changed

3 files changed

+10
-228
lines changed

android/local.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
sdk.dir=H:\\Android\\sdk
2-
flutter.sdk=H:\\flutter
1+
sdk.dir=/Users/samarthagarwal/Library/Android/sdk
2+
flutter.sdk=/Users/samarthagarwal/flutter
33
flutter.versionName=0.0.6

lib/woocommerce_api.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'dart:convert';
66
import "dart:math";
77
import "dart:core";
88
import 'package:crypto/crypto.dart' as crypto;
9-
import 'package:http/http.dart';
109
import 'package:woocommerce_api/query_string.dart';
1110
import 'package:http/http.dart' as http;
1211

@@ -31,8 +30,8 @@ class WooCommerceAPI {
3130

3231

3332
_getOAuthURL(String request_method, String endpoint) {
34-
var consumerKey = this.consumerKey; //"ck_4e943ec0f3c76eba33fffac4b7fc0d2f1f3ca91a";
35-
var consumerSecret = this.consumerSecret; //"cs_fbb723138e354e30c3d4d4e0c0f95389bf610044";
33+
var consumerKey = this.consumerKey;
34+
var consumerSecret = this.consumerSecret;
3635

3736
var token = "";
3837
var token_secret = "";
@@ -41,7 +40,7 @@ class WooCommerceAPI {
4140

4241
// If website is HTTPS based, no need for OAuth, just return the URL with CS and CK as query params
4342
if(this.isHttps == true){
44-
return url + (containsQueryParams == true ? "&consumerKey=" + this.consumerKey + "&consumerSecret=" + this.consumerSecret : "?consumerKey=" + this.consumerKey + "&consumerSecret=" + this.consumerSecret);
43+
return url + (containsQueryParams == true ? "&consumer_key=" + this.consumerKey + "&consumer_secret=" + this.consumerSecret : "?consumer_key=" + this.consumerKey + "&consumer_secret=" + this.consumerSecret);
4544
}
4645

4746
var rand = new Random();

pubspec.lock

Lines changed: 5 additions & 222 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
# Generated by pub
22
# See https://www.dartlang.org/tools/pub/glossary#lockfile
33
packages:
4-
analyzer:
5-
dependency: transitive
6-
description:
7-
name: analyzer
8-
url: "https://pub.dartlang.org"
9-
source: hosted
10-
version: "0.32.4"
11-
args:
12-
dependency: transitive
13-
description:
14-
name: args
15-
url: "https://pub.dartlang.org"
16-
source: hosted
17-
version: "1.5.0"
184
async:
195
dependency: transitive
206
description:
@@ -57,13 +43,6 @@ packages:
5743
url: "https://pub.dartlang.org"
5844
source: hosted
5945
version: "2.0.6"
60-
csslib:
61-
dependency: transitive
62-
description:
63-
name: csslib
64-
url: "https://pub.dartlang.org"
65-
source: hosted
66-
version: "0.14.5"
6746
flutter:
6847
dependency: "direct main"
6948
description: flutter
@@ -74,83 +53,20 @@ packages:
7453
description: flutter
7554
source: sdk
7655
version: "0.0.0"
77-
front_end:
78-
dependency: transitive
79-
description:
80-
name: front_end
81-
url: "https://pub.dartlang.org"
82-
source: hosted
83-
version: "0.1.4"
84-
glob:
85-
dependency: transitive
86-
description:
87-
name: glob
88-
url: "https://pub.dartlang.org"
89-
source: hosted
90-
version: "1.1.7"
91-
html:
92-
dependency: transitive
93-
description:
94-
name: html
95-
url: "https://pub.dartlang.org"
96-
source: hosted
97-
version: "0.13.3+3"
9856
http:
9957
dependency: "direct main"
10058
description:
10159
name: http
10260
url: "https://pub.dartlang.org"
10361
source: hosted
10462
version: "0.11.3+17"
105-
http_multi_server:
106-
dependency: transitive
107-
description:
108-
name: http_multi_server
109-
url: "https://pub.dartlang.org"
110-
source: hosted
111-
version: "2.0.5"
11263
http_parser:
11364
dependency: transitive
11465
description:
11566
name: http_parser
11667
url: "https://pub.dartlang.org"
11768
source: hosted
11869
version: "3.1.3"
119-
io:
120-
dependency: transitive
121-
description:
122-
name: io
123-
url: "https://pub.dartlang.org"
124-
source: hosted
125-
version: "0.3.3"
126-
js:
127-
dependency: transitive
128-
description:
129-
name: js
130-
url: "https://pub.dartlang.org"
131-
source: hosted
132-
version: "0.6.1+1"
133-
json_rpc_2:
134-
dependency: transitive
135-
description:
136-
name: json_rpc_2
137-
url: "https://pub.dartlang.org"
138-
source: hosted
139-
version: "2.0.9"
140-
kernel:
141-
dependency: transitive
142-
description:
143-
name: kernel
144-
url: "https://pub.dartlang.org"
145-
source: hosted
146-
version: "0.3.4"
147-
logging:
148-
dependency: transitive
149-
description:
150-
name: logging
151-
url: "https://pub.dartlang.org"
152-
source: hosted
153-
version: "0.11.3+2"
15470
matcher:
15571
dependency: transitive
15672
description:
@@ -165,123 +81,25 @@ packages:
16581
url: "https://pub.dartlang.org"
16682
source: hosted
16783
version: "1.1.6"
168-
mime:
169-
dependency: transitive
170-
description:
171-
name: mime
172-
url: "https://pub.dartlang.org"
173-
source: hosted
174-
version: "0.9.6+2"
175-
multi_server_socket:
176-
dependency: transitive
177-
description:
178-
name: multi_server_socket
179-
url: "https://pub.dartlang.org"
180-
source: hosted
181-
version: "1.0.2"
182-
node_preamble:
183-
dependency: transitive
184-
description:
185-
name: node_preamble
186-
url: "https://pub.dartlang.org"
187-
source: hosted
188-
version: "1.4.4"
189-
package_config:
190-
dependency: transitive
191-
description:
192-
name: package_config
193-
url: "https://pub.dartlang.org"
194-
source: hosted
195-
version: "1.0.5"
196-
package_resolver:
197-
dependency: transitive
198-
description:
199-
name: package_resolver
200-
url: "https://pub.dartlang.org"
201-
source: hosted
202-
version: "1.0.4"
20384
path:
20485
dependency: transitive
20586
description:
20687
name: path
20788
url: "https://pub.dartlang.org"
20889
source: hosted
20990
version: "1.6.2"
210-
plugin:
211-
dependency: transitive
212-
description:
213-
name: plugin
214-
url: "https://pub.dartlang.org"
215-
source: hosted
216-
version: "0.2.0+3"
217-
pool:
218-
dependency: transitive
219-
description:
220-
name: pool
221-
url: "https://pub.dartlang.org"
222-
source: hosted
223-
version: "1.3.6"
224-
pub_semver:
225-
dependency: transitive
226-
description:
227-
name: pub_semver
228-
url: "https://pub.dartlang.org"
229-
source: hosted
230-
version: "1.4.2"
23191
quiver:
23292
dependency: transitive
23393
description:
23494
name: quiver
23595
url: "https://pub.dartlang.org"
23696
source: hosted
237-
version: "2.0.0+1"
238-
shelf:
239-
dependency: transitive
240-
description:
241-
name: shelf
242-
url: "https://pub.dartlang.org"
243-
source: hosted
244-
version: "0.7.3+3"
245-
shelf_packages_handler:
246-
dependency: transitive
247-
description:
248-
name: shelf_packages_handler
249-
url: "https://pub.dartlang.org"
250-
source: hosted
251-
version: "1.0.4"
252-
shelf_static:
253-
dependency: transitive
254-
description:
255-
name: shelf_static
256-
url: "https://pub.dartlang.org"
257-
source: hosted
258-
version: "0.2.8"
259-
shelf_web_socket:
260-
dependency: transitive
261-
description:
262-
name: shelf_web_socket
263-
url: "https://pub.dartlang.org"
264-
source: hosted
265-
version: "0.2.2+4"
97+
version: "2.0.1"
26698
sky_engine:
26799
dependency: transitive
268100
description: flutter
269101
source: sdk
270102
version: "0.0.99"
271-
source_map_stack_trace:
272-
dependency: transitive
273-
description:
274-
name: source_map_stack_trace
275-
url: "https://pub.dartlang.org"
276-
source: hosted
277-
version: "1.1.5"
278-
source_maps:
279-
dependency: transitive
280-
description:
281-
name: source_maps
282-
url: "https://pub.dartlang.org"
283-
source: hosted
284-
version: "0.10.7"
285103
source_span:
286104
dependency: transitive
287105
description:
@@ -317,61 +135,26 @@ packages:
317135
url: "https://pub.dartlang.org"
318136
source: hosted
319137
version: "1.0.1"
320-
test:
138+
test_api:
321139
dependency: transitive
322140
description:
323-
name: test
141+
name: test_api
324142
url: "https://pub.dartlang.org"
325143
source: hosted
326-
version: "1.3.0"
144+
version: "0.2.1"
327145
typed_data:
328146
dependency: transitive
329147
description:
330148
name: typed_data
331149
url: "https://pub.dartlang.org"
332150
source: hosted
333151
version: "1.1.6"
334-
utf:
335-
dependency: transitive
336-
description:
337-
name: utf
338-
url: "https://pub.dartlang.org"
339-
source: hosted
340-
version: "0.9.0+5"
341152
vector_math:
342153
dependency: transitive
343154
description:
344155
name: vector_math
345156
url: "https://pub.dartlang.org"
346157
source: hosted
347158
version: "2.0.8"
348-
vm_service_client:
349-
dependency: transitive
350-
description:
351-
name: vm_service_client
352-
url: "https://pub.dartlang.org"
353-
source: hosted
354-
version: "0.2.6"
355-
watcher:
356-
dependency: transitive
357-
description:
358-
name: watcher
359-
url: "https://pub.dartlang.org"
360-
source: hosted
361-
version: "0.9.7+10"
362-
web_socket_channel:
363-
dependency: transitive
364-
description:
365-
name: web_socket_channel
366-
url: "https://pub.dartlang.org"
367-
source: hosted
368-
version: "1.0.9"
369-
yaml:
370-
dependency: transitive
371-
description:
372-
name: yaml
373-
url: "https://pub.dartlang.org"
374-
source: hosted
375-
version: "2.1.15"
376159
sdks:
377-
dart: ">=2.0.0-dev.68.0 <3.0.0"
160+
dart: ">=2.0.0 <3.0.0"

0 commit comments

Comments
 (0)