Skip to content

Commit ef46099

Browse files
committed
Update PaymentGatewayListMapper to parse content without the data envelope
1 parent e472860 commit ef46099

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Networking/Networking/Mapper/PaymentGatewayListMapper.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ struct PaymentGatewayListMapper: Mapper {
1717
decoder.userInfo = [
1818
.siteID: siteID,
1919
]
20-
return try decoder.decode(PaymentGatewayListEnvelope.self, from: response).paymentGateways
20+
do {
21+
return try decoder.decode(PaymentGatewayListEnvelope.self, from: response).paymentGateways
22+
} catch {
23+
return try decoder.decode([PaymentGateway].self, from: response)
24+
}
2125
}
2226
}
2327

0 commit comments

Comments
 (0)