Skip to content

Commit 29327c7

Browse files
committed
Merge branch 'develop' into issue/dry-receipt-printing
# Conflicts: # WooCommerce/WooCommerce.xcodeproj/project.pbxproj
2 parents 5803a40 + b0d603e commit 29327c7

File tree

251 files changed

+8042
-2403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+8042
-2403
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
1919
return true
2020
case .shippingLabelsMultiPackage:
2121
return true
22-
case .whatsNewOnWooCommerce:
23-
return buildConfig == .localDeveloper || buildConfig == .alpha
2422
case .pushNotificationsForAllStores:
2523
return buildConfig == .localDeveloper || buildConfig == .alpha
26-
case .quickPayPrototype:
24+
case .quickOrderPrototype:
25+
return buildConfig == .localDeveloper || buildConfig == .alpha
26+
case .orderListFilters:
27+
return buildConfig == .localDeveloper || buildConfig == .alpha
28+
case .filterProductsByCategory:
2729
return buildConfig == .localDeveloper || buildConfig == .alpha
2830
default:
2931
return true

Experiments/Experiments/FeatureFlag.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,19 @@ public enum FeatureFlag: Int {
3838
///
3939
case shippingLabelsMultiPackage
4040

41-
/// Display "What's new on WooCommerce" on App Launch and App Settings
42-
///
43-
case whatsNewOnWooCommerce
44-
4541
/// Push notifications for all stores
4642
///
4743
case pushNotificationsForAllStores
4844

49-
/// Allows to create quick pay orders
45+
/// Allows to create quick order orders
46+
///
47+
case quickOrderPrototype
48+
49+
/// Display the bar for displaying the filters in the Order List
50+
///
51+
case orderListFilters
52+
53+
/// Allows to filter products by a product category, persisting it so the filter can remain after restarting the app
5054
///
51-
case quickPayPrototype
55+
case filterProductsByCategory
5256
}

Gemfile.lock

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ GEM
1616
artifactory (3.0.15)
1717
atomos (0.1.3)
1818
aws-eventstream (1.2.0)
19-
aws-partitions (1.510.0)
20-
aws-sdk-core (3.121.1)
19+
aws-partitions (1.522.0)
20+
aws-sdk-core (3.121.5)
2121
aws-eventstream (~> 1, >= 1.0.2)
22-
aws-partitions (~> 1, >= 1.239.0)
22+
aws-partitions (~> 1, >= 1.520.1)
2323
aws-sigv4 (~> 1.1)
2424
jmespath (~> 1.0)
25-
aws-sdk-kms (1.49.0)
26-
aws-sdk-core (~> 3, >= 3.120.0)
25+
aws-sdk-kms (1.50.0)
26+
aws-sdk-core (~> 3, >= 3.121.2)
2727
aws-sigv4 (~> 1.1)
28-
aws-sdk-s3 (1.103.0)
29-
aws-sdk-core (~> 3, >= 3.120.0)
28+
aws-sdk-s3 (1.104.0)
29+
aws-sdk-core (~> 3, >= 3.121.2)
3030
aws-sdk-kms (~> 1)
3131
aws-sigv4 (~> 1.4)
3232
aws-sigv4 (1.4.0)
@@ -89,7 +89,7 @@ GEM
8989
escape (0.0.4)
9090
ethon (0.14.0)
9191
ffi (>= 1.15.0)
92-
excon (0.86.0)
92+
excon (0.88.0)
9393
faraday (1.8.0)
9494
faraday-em_http (~> 1.0)
9595
faraday-em_synchrony (~> 1.0)
@@ -112,10 +112,10 @@ GEM
112112
faraday-net_http_persistent (1.2.0)
113113
faraday-patron (1.0.0)
114114
faraday-rack (1.0.0)
115-
faraday_middleware (1.1.0)
115+
faraday_middleware (1.2.0)
116116
faraday (~> 1.0)
117117
fastimage (2.2.5)
118-
fastlane (2.195.0)
118+
fastlane (2.197.0)
119119
CFPropertyList (>= 2.3, < 4.0.0)
120120
addressable (>= 2.8, < 3.0.0)
121121
artifactory (~> 3.0)
@@ -165,7 +165,7 @@ GEM
165165
xctest_list (>= 1.2.1)
166166
fastlane-plugin-trainer (0.4.1)
167167
trainer (>= 0.7.0)
168-
fastlane-plugin-wpmreleasetoolkit (1.4.0)
168+
fastlane-plugin-wpmreleasetoolkit (2.1.0)
169169
activesupport (~> 5)
170170
bigdecimal (~> 1.4)
171171
chroma (= 0.2.0)
@@ -176,15 +176,15 @@ GEM
176176
octokit (~> 4.18)
177177
parallel (~> 1.14)
178178
progress_bar (~> 1.3)
179-
rake (~> 12.3)
179+
rake (>= 12.3, < 14.0)
180180
rake-compiler (~> 1.0)
181181
ffi (1.15.4)
182182
fourflusher (2.3.1)
183183
fuzzy_match (2.0.4)
184184
gh_inspector (1.1.3)
185185
git (1.9.1)
186186
rchardet (~> 1.8)
187-
google-apis-androidpublisher_v3 (0.11.0)
187+
google-apis-androidpublisher_v3 (0.13.0)
188188
google-apis-core (>= 0.4, < 2.a)
189189
google-apis-core (0.4.1)
190190
addressable (~> 2.5, >= 2.5.1)
@@ -195,11 +195,11 @@ GEM
195195
retriable (>= 2.0, < 4.a)
196196
rexml
197197
webrick
198-
google-apis-iamcredentials_v1 (0.7.0)
198+
google-apis-iamcredentials_v1 (0.8.0)
199199
google-apis-core (>= 0.4, < 2.a)
200-
google-apis-playcustomapp_v1 (0.5.0)
200+
google-apis-playcustomapp_v1 (0.6.0)
201201
google-apis-core (>= 0.4, < 2.a)
202-
google-apis-storage_v1 (0.8.0)
202+
google-apis-storage_v1 (0.9.0)
203203
google-apis-core (>= 0.4, < 2.a)
204204
google-cloud-core (1.6.0)
205205
google-cloud-env (~> 1.0)
@@ -215,7 +215,7 @@ GEM
215215
google-cloud-core (~> 1.6)
216216
googleauth (>= 0.16.2, < 2.a)
217217
mini_mime (~> 1.0)
218-
googleauth (1.0.0)
218+
googleauth (1.1.0)
219219
faraday (>= 0.17.3, < 2.0)
220220
jwt (>= 1.4, < 3.0)
221221
memoist (~> 0.16)
@@ -229,14 +229,15 @@ GEM
229229
i18n (1.8.10)
230230
concurrent-ruby (~> 1.0)
231231
jmespath (1.4.0)
232-
json (2.5.1)
232+
json (2.6.1)
233233
jsonlint (0.3.0)
234234
oj (~> 3)
235235
optimist (~> 3)
236236
jwt (2.3.0)
237237
memoist (0.16.2)
238238
mini_magick (4.11.0)
239-
mini_mime (1.1.1)
239+
mini_mime (1.1.2)
240+
mini_portile2 (2.6.1)
240241
minitest (5.14.4)
241242
molinillo (0.8.0)
242243
multi_json (1.15.0)
@@ -245,23 +246,26 @@ GEM
245246
nap (1.1.0)
246247
naturally (2.2.1)
247248
netrc (0.11.0)
248-
nokogiri (1.12.2-x86_64-darwin)
249+
nokogiri (1.12.5)
250+
mini_portile2 (~> 2.6.1)
251+
racc (~> 1.4)
252+
nokogiri (1.12.5-x86_64-darwin)
249253
racc (~> 1.4)
250254
octokit (4.21.0)
251255
faraday (>= 0.9)
252256
sawyer (~> 0.8.0, >= 0.5.3)
253-
oj (3.13.0)
257+
oj (3.13.9)
254258
optimist (3.0.1)
255259
options (2.3.2)
256260
optparse (0.1.1)
257261
os (1.1.1)
258-
parallel (1.20.1)
262+
parallel (1.21.0)
259263
plist (3.6.0)
260264
progress_bar (1.3.3)
261265
highline (>= 1.6, < 3)
262266
options (~> 2.3.0)
263267
public_suffix (4.0.6)
264-
racc (1.5.2)
268+
racc (1.6.0)
265269
rake (12.3.3)
266270
rake-compiler (1.1.1)
267271
rake
@@ -342,7 +346,7 @@ DEPENDENCIES
342346
fastlane-plugin-sentry (~> 1.0)
343347
fastlane-plugin-test_center (~> 3.0)
344348
fastlane-plugin-trainer (~> 0.4.1)
345-
fastlane-plugin-wpmreleasetoolkit (~> 1.4)
349+
fastlane-plugin-wpmreleasetoolkit (~> 2.0)
346350
rake (~> 12.3)
347351
rmagick (~> 3.2.0)
348352
xcode-install

Hardware/Hardware/CardReader/CardReaderServiceError.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ public enum UnderlyingError: Error {
186186
/// The SDK will attempt to auto-disconnect for you and you should instruct your user to reconnect it.
187187
case readerSessionExpired
188188

189+
/// The underlying request returned an API error.
190+
case processorAPIError
191+
189192
/// Catch-all error case. Indicates there is something wrong with the
190193
/// internal state of the CardReaderService.
191194
case internalServiceError
@@ -305,6 +308,9 @@ updating the application or using a different reader
305308
case .readerSessionExpired:
306309
return NSLocalizedString("The card reader session has expired - please disconnect and reconnect the card reader and then try again",
307310
comment: "Error message when the card reader session has timed out.")
311+
case .processorAPIError:
312+
return NSLocalizedString("The payment can not be processed by the payment processor.",
313+
comment: "Error message when the payment can not be processed (i.e. order amount is below the minimum amount allowed.)")
308314
case .internalServiceError:
309315
return NSLocalizedString("Sorry, this payment couldn’t be processed",
310316
comment: "Error message when the card reader service experiences an unexpected internal service error.")

Hardware/Hardware/CardReader/StripeCardReader/UnderlyingError+Stripe.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ extension UnderlyingError {
7979
self = .requestTimedOut
8080
case ErrorCode.Code.sessionExpired.rawValue:
8181
self = .readerSessionExpired
82+
case ErrorCode.Code.stripeAPIError.rawValue:
83+
self = .processorAPIError
8284
default:
8385
self = .internalServiceError
8486
}

Hardware/HardwareTests/ErrorCodesTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ final class CardReaderServiceErrorTests: XCTestCase {
154154
XCTAssertEqual(.readerSessionExpired, domainError(stripeCode: 9060))
155155
}
156156

157+
func test_stripe_error_api_maps_to_stripeAPI() {
158+
XCTAssertEqual(.processorAPIError, domainError(stripeCode: 9020))
159+
}
160+
157161
func test_stripe_catch_all_error() {
158162
// Any error code not mapped to an specific error will be
159163
// mapped to `internalServiceError`

0 commit comments

Comments
 (0)