1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/payments/core/native_error_strings.h"
namespace payments {
namespace errors {
const char kCannotAbortWithoutInit[] =
"Attempted abort without initialization.";
const char kCannotAbortWithoutShow[] = "Attempted abort without show.";
const char kCannotCallCanMakePaymentWithoutInit[] =
"Attempted canMakePayment without initialization.";
const char kCannotCallHasEnrolledInstrumentWithoutInit[] =
"Attempted hasEnrolledInstrument without initialization.";
const char kCannotCompleteWithoutInit[] =
"Attempted complete without initialization.";
const char kCannotCompleteWithoutShow[] = "Attempted complete without show.";
const char kCannotResolveServiceWorkerScope[] =
"Cannot resolve the \"serviceworker\".\"scope\" $1 in web app manifest $2.";
const char kCannotResolveServiceWorkerUrl[] =
"Cannot resolve the \"serviceworker\".\"src\" $1 in web app manifest $2.";
const char kCannotRetryWithoutInit[] =
"Attempted retry without initialization.";
const char kCannotRetryWithoutShow[] = "Attempted retry without show.";
const char kCrossOriginPaymentMethodManifestNotAllowed[] =
"Cross-origin payment method manifest \"$1\" not allowed for the payment "
"method \"$2\".";
const char kCrossOriginServiceWorkerScopeNotAllowed[] =
"Cross-origin \"serviceworker\".\"scope\" $1 not allowed in web app "
"manifest $2.";
const char kCrossOriginServiceWorkerUrlNotAllowed[] =
"Cross-origin \"serviceworker\".\"src\" $1 not allowed in web app manifest "
"$2.";
const char kCrossOriginWebAppManifestNotAllowed[] =
"Cross-origin default application $1 not allowed in payment method "
"manifest $2.";
const char kDetailedInvalidSslCertificateMessageFormat[] =
"SSL certificate is not valid. Security level: $.";
const char kHttpStatusCodeNotAllowed[] =
"HTTP status code $1 \"$2\" not allowed for payment method manifest "
"\"$3\".";
const char kInstallingMultipleDefaultAppsNotSupported[] =
"Installing multiple payment handlers from a single payment method "
"manifest is not supported.";
const char kInvalidInitiatorFrame[] =
"Cannot initialize PaymentRequest in an invalid frame.";
const char kInvalidManifestUrl[] =
"\"$1\" is not a valid payment manifest URL with HTTPS scheme (or HTTP "
"scheme for localhost).";
const char kInvalidServiceWorkerScope[] =
"\"serviceworker\".\"scope\" must be a non-empty UTF8 string.";
const char kInvalidServiceWorkerUrl[] =
"\"serviceworker\".\"src\" must be a non-empty UTF8 string.";
const char kInvalidSslCertificate[] = "SSL certificate is not valid.";
const char kInvalidWebAppIcon[] =
"Failed to download or decode a non-empty icon for payment app with \"$1\" "
"manifest.";
const char kMultiplePaymentMethodsNotSupportedFormat[] =
"The payment methods $ are not supported.";
const char kNoResponseToPaymentEvent[] =
"Payment handler did not respond to \"paymentrequest\" event.";
const char kNotInitialized[] = "Not initialized.";
const char kNotShown[] = "Not shown.";
const char kPaymentManifestCrossSiteRedirectNotAllowed[] =
"Cross-site redirect from \"$1\" to \"$2\" not allowed for payment "
"manifests.";
const char kPaymentManifestDownloadFailed[] =
"Unable to download payment manifest \"$1\".";
const char kPaymentManifestDownloadFailedWithNetworkError[] =
"Unable to download payment manifest \"$1\". $2 ($3)";
const char kPaymentManifestDownloadFailedWithHttpStatusCode[] =
"Unable to download payment manifest \"$1\". HTTP $2 $3.";
const char kPaymentManifestCSPDenied[] =
"Content Security Policy denied the download of payment manifest \"$1\".";
const char kPaymentDetailsNotObject[] =
"Payment app returned invalid response. \"details\" field is not a "
"dictionary.";
const char kPaymentDetailsStringifyError[] =
"Payment app returned invalid response. Unable to JSON-serialize "
"\"details\".";
const char kPaymentEventBrowserError[] =
"Browser encountered an error when firing the \"paymentrequest\" event in "
"the payment handler.";
const char kPaymentEventInternalError[] =
"Payment handler encountered an internal error when handling the "
"\"paymentrequest\" event.";
const char kPaymentEventRejected[] =
"Payment handler rejected the promise passed into "
"PaymentRequestEvent.respondWith(). This is how payment handlers close "
"their own window programmatically.";
const char kReachedMaximumNumberOfRedirects[] =
"Unable to download the payment manifest because reached the maximum "
"number of redirects.";
const char kPaymentEventServiceWorkerError[] =
"Payment handler failed to provide a response because either the "
"\"paymentrequest\" event took too long or the service worker stopped for "
"some reason or was killed before the request finished.";
const char kPaymentEventTimeout[] =
"The \"paymentrequest\" event timed out after 5 minutes.";
const char kPaymentHandlerInsecureNavigation[] =
"The payment handler navigated to a page with insecure context, invalid "
"certificate state, or malicious content.";
const char kPaymentHandlerInstallFailed[] =
"Failed to install the payment handler.";
const char kPaymentHandlerActivityDied[] =
"The payment handler is closed because the Android activity is destroyed.";
const char kPaymentHandlerFailToLoadMainFrame[] =
"The payment handler fails to load the page.";
const char kSinglePaymentMethodNotSupportedFormat[] =
"The payment method $ is not supported.";
const char kCanMakePaymentEventRejected[] =
"Payment handler rejected the promise passed into "
"CanMakePaymentEvent.respondWith().";
const char kCanMakePaymentEventTimeout[] =
"The \"canmakepayment\" event timed out.";
const char kCanMakePaymentEventNoResponse[] =
"Payment handler did not respond to \"canmakepayment\" event.";
const char kCanMakePaymentEventBooleanConversionError[] =
"Unable to convert the value of \"canmakepayment\" response to a boolean.";
const char kCanMakePaymentEventBrowserError[] =
"Browser encountered an error when firing the \"canmakepayment\" event in "
"the payment handler.";
const char kCanMakePaymentEventInternalError[] =
"Payment handler encountered an error (e.g., threw a JavaScript exception) "
"while responding to \"canmakepayment\" event.";
const char kCanMakePaymentEventNoUrlBasedPaymentMethods[] =
"Browser did not fire \"canmakepayment\" event because the payment handler "
"does not support any URL-based payment methods.";
const char kCanMakePaymentEventNotInstalled[] =
"Browser did not fire \"canmakepayment\" event because the payment handler "
"is not yet installed. It will be installed on demand when the user "
"selects it.";
const char kCanMakePaymentEventNoExplicitlyVerifiedMethods[] =
"Browser did not fire \"canmakepayment\" event because the payment handler "
"does not support any explicitly verified payment methods.";
const char kGenericPaymentMethodNotSupportedMessage[] =
"Payment method not supported.";
const char kNoLinkHeader[] =
"No \"Link: rel=payment-method-manifest\" HTTP header found at \"$1\".";
const char kNoContentAndNoLinkHeader[] =
"No content and no \"Link: rel=payment-method-manifest\" HTTP header found "
"at \"$1\".";
const char kNoContentInPaymentManifest[] =
"No content found in payment manifest \"$1\".";
const char kUnableToInvokeAndroidPaymentApps[] =
"Unable to invoke Android apps.";
const char kUserClosedPaymentApp[] = "User closed the payment app.";
const char kMoreThanOneService[] =
"Found more than one IS_READY_TO_PAY service, but at most one service is "
"supported.";
const char kCredentialIdsRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"credentialIds\" array of non-empty arrays.";
const char kTimeoutTooLong[] =
"The \"secure-payment-confirmation\" method requires at most 1 hour "
"\"timeout\" field.";
const char kChallengeRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"challenge\" field.";
const char kInstrumentRequired[] =
"The \"secure-payment-confirmation\" method requires a "
"\"instrument\" field.";
const char kInstrumentDisplayNameRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"instrument.displayName\" field.";
const char kValidInstrumentIconRequired[] =
"The \"secure-payment-confirmation\" method requires a valid URL in the "
"\"instrument.icon\" field.";
const char kInvalidIcon[] =
"The \"instrument.icon\" either could not be downloaded or decoded.";
const char kRpIdRequired[] =
"The \"secure-payment-confirmation\" method requires a valid domain in the "
"\"rpId\" field.";
const char kPayeeOriginOrPayeeNameRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"payeeOrigin\" or \"payeeName\" field.";
const char kPayeeOriginMustBeHttps[] =
"The \"secure-payment-confirmation\" method requires that the "
"\"payeeOrigin\" field must be https.";
const char kNetworkNameRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"networkInfo.name\" field.";
const char kValidNetworkIconRequired[] =
"The \"secure-payment-confirmation\" method requires a valid URL in the "
"\"networkInfo.icon\" field.";
const char kIssuerNameRequired[] =
"The \"secure-payment-confirmation\" method requires a non-empty "
"\"issuerInfo.name\" field.";
const char kValidIssuerIconRequired[] =
"The \"secure-payment-confirmation\" method requires a valid URL in the "
"\"issuerInfo.icon\" field.";
} // namespace errors
} // namespace payments
|