@adyen/react-native
Version:
Wraps Adyen Checkout Drop-In and Components for iOS and Android for convenient use with React Native
51 lines (48 loc) • 2.53 kB
JavaScript
import { Platform } from 'react-native';
export const UNKNOWN_PAYMENT_METHOD_ERROR = 'Unknown payment method or native module. \n\n' + 'Make sure your paymentMethods response contains: ';
export const UNSUPPORTED_PAYMENT_METHOD_ERROR = 'Unsupported payment method: ';
export const LINKING_ERROR = `The package '@adyen/react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
export const MISSING_CONTEXT_ERROR = 'useAdyenCheckout must be used within an AdyenCheckout';
/** Collection of events that components can trigger. */
export let Event = /*#__PURE__*/function (Event) {
Event["onSubmit"] = "didSubmitCallback";
Event["onAdditionalDetails"] = "didProvideCallback";
Event["onComplete"] = "didCompleteCallback";
Event["onError"] = "didFailCallback";
Event["onAddressUpdate"] = "didUpdateAddressCallback";
Event["onAddressConfirm"] = "didConfirmAddressCallback";
Event["onDisableStoredPaymentMethod"] = "didDisableStoredPaymentMethod";
return Event;
}({});
/** Collection of errors components can throw. */
export let ErrorCode = /*#__PURE__*/function (ErrorCode) {
ErrorCode["canceled"] = "canceledByShopper";
ErrorCode["notSupported"] = "notSupported";
ErrorCode["noClientKey"] = "noClientKey";
ErrorCode["noPayment"] = "noPayment";
ErrorCode["invalidPaymentMethods"] = "invalidPaymentMethods";
ErrorCode["invalidAction"] = "invalidAction";
ErrorCode["notSupportedAction"] = "notSupportedAction";
ErrorCode["noPaymentMethod"] = "noPaymentMethod";
return ErrorCode;
}({});
/** Collection of available result codes that represent payments current state, as well as any actions you should take. */
export let ResultCode = /*#__PURE__*/function (ResultCode) {
ResultCode["authenticationFinished"] = "AuthenticationFinished";
ResultCode["authenticationNotRequired"] = "AuthenticationNotRequired";
ResultCode["authorised"] = "Authorised";
ResultCode["cancelled"] = "Cancelled";
ResultCode["challengeShopper"] = "ChallengeShopper";
ResultCode["error"] = "Error";
ResultCode["identifyShopper"] = "IdentifyShopper";
ResultCode["pending"] = "Pending";
ResultCode["presentToShopper"] = "PresentToShopper";
ResultCode["received"] = "Received";
ResultCode["redirectShopper"] = "RedirectShopper";
ResultCode["refused"] = "Refused";
return ResultCode;
}({});
//# sourceMappingURL=constants.js.map