diff --git a/td/telegram/Payments.cpp b/td/telegram/Payments.cpp index 358caa059..22ebb11e3 100644 --- a/td/telegram/Payments.cpp +++ b/td/telegram/Payments.cpp @@ -158,12 +158,16 @@ static tl_object_ptr convert_payment_provider( auto r_need_postal_code = get_json_object_bool_field(value.get_object(), "need_zip", false); auto r_need_cardholder_name = get_json_object_bool_field(value.get_object(), "need_cardholder_name", false); auto r_publishable_key = get_json_object_string_field(value.get_object(), "publishable_key", false); + // TODO support "gpay_parameters":{"gateway":"stripe","stripe:publishableKey":"...","stripe:version":"..."} - if (value.get_object().size() != 4 || r_need_country.is_error() || r_need_postal_code.is_error() || - r_need_cardholder_name.is_error() || r_publishable_key.is_error()) { - LOG(WARNING) << "Unsupported JSON data \"" << native_parameters->data_ << '"'; + if (r_need_country.is_error() || r_need_postal_code.is_error() || r_need_cardholder_name.is_error() || + r_publishable_key.is_error()) { + LOG(ERROR) << "Unsupported JSON data \"" << native_parameters->data_ << '"'; return nullptr; } + if (value.get_object().size() != 5) { + LOG(ERROR) << "Unsupported JSON data \"" << native_parameters->data_ << '"'; + } return make_tl_object(r_publishable_key.move_as_ok(), r_need_country.move_as_ok(), r_need_postal_code.move_as_ok(),