Skip to content

Commit 84c9efd

Browse files
committed
fix google pay crash when gateway is not configured
1 parent fec83d1 commit 84c9efd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/io/snabble/sdk/googlepay/GooglePayHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class GooglePayHelper(
7171
addProperty("type", "PAYMENT_GATEWAY")
7272
add("parameters", JsonObject().apply {
7373
project.checkout.checkoutProcess?.paymentPreauthInformation?.let {
74-
val gateway = it.get("gateway").asString
75-
val gatewayMerchantId = it.get("gatewayMerchantId").asString
74+
val gateway = it.get("gateway")?.asString
75+
val gatewayMerchantId = it.get("gatewayMerchantId")?.asString
7676
addProperty("gateway", gateway)
7777
addProperty("gatewayMerchantId", gatewayMerchantId)
7878
}

0 commit comments

Comments
 (0)