You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val query = Storefront.mutation { mutationQuery ->
mutationQuery.checkoutCreate(input) { createPayloadQuery ->
createPayloadQuery.checkout { checkoutQuery ->
checkoutQuery.webUrl()
}.checkoutUserErrors { userErrorQuery ->
userErrorQuery.field().message()
}
}
}
graph.mutateGraph(query).enqueue { result ->
if (result is GraphCallResult.Success) {
val errors = result.response.errors
val userErrors =
result.response.data?.checkoutCreate?.checkoutUserErrors?.map { it.message }
if (errors.isNotEmpty()) {
emit(null, Exception(errors.first().message()))
} else if (userErrors?.isNotEmpty() == true) {
emit(null, Exception(userErrors.first()))
} else {
emit(result.response.data?.checkoutCreate?.checkout?.webUrl, null)
}
} else {
emit(null, Exception((result as GraphCallResult.Failure).error.message))
}
}
}
on result.response.data?.checkoutCreate?.checkoutUserErrors I received this error "Variant the product is not published for this customer."
on the same product/variant on web shopify site the checkout works without any error.
The text was updated successfully, but these errors were encountered:
We are also facing the same issue. However, after some time, this error resolves itself, and we are able to check out the same product through the Mobile Buy SDK. It would be great if someone could help us identify the root cause of this issue and provide a corrective action. Thank you.
my method is that:
fun getCheckoutUrl(graphQlId: String, emit: (String?, Exception?) -> Unit) {
val input = Storefront.CheckoutCreateInput()
.setLineItemsInput(
Input.value(
listOf(
Storefront.CheckoutLineItemInput(1, ID(graphQlId))
)
)
)
on result.response.data?.checkoutCreate?.checkoutUserErrors I received this error "Variant the product is not published for this customer."
on the same product/variant on web shopify site the checkout works without any error.
The text was updated successfully, but these errors were encountered: