UNPKG

nativescript-payments

Version:
59 lines 2.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var failure_common_1 = require("./failure.common"); var Failure = (function (_super) { __extends(Failure, _super); function Failure(errorCode) { var _this = _super.call(this, errorCode) || this; switch (errorCode) { case 0: _this._type = failure_common_1.FailureTypes.UNSPECIFIED; _this._description = 'Indicates that an unknown or unexpected error occurred.'; break; case 1: _this._type = failure_common_1.FailureTypes.PRODUCT_ALREADY_OWNED; _this._description = 'Indicates that the client is not allowed to perform the attempted action.'; break; case 2: _this._type = failure_common_1.FailureTypes.USER_CANCELLED; _this._description = 'Indicates that the user cancelled a payment request.'; break; case 3: _this._type = failure_common_1.FailureTypes.DEVELOPER_USAGE; _this._description = 'Indicates that one of the payment parameters was not recognized by the Apple App Store.'; break; case 4: _this._type = failure_common_1.FailureTypes.BILLING_AVAILABILITY; _this._description = 'Indicates that the user is not allowed to authorize payments.'; break; case 5: _this._type = failure_common_1.FailureTypes.PRODUCT_UNAVAILABLE; _this._description = 'Indicates that the requested product is not available in the store.'; break; case 6: _this._type = failure_common_1.FailureTypes.BILLING_AVAILABILITY; _this._description = 'Indicates that the user has not allowed access to Cloud service information.'; break; case 7: _this._type = failure_common_1.FailureTypes.NETWORK_AVAILABILITY; _this._description = 'Indicates that the device could not connect to the network.'; break; case 8: _this._type = failure_common_1.FailureTypes.BILLING_AVAILABILITY; _this._description = 'Indicates that the user has revoked permission to use this cloud service.'; break; case 999: _this._type = failure_common_1.FailureTypes.PRODUCT_NOT_OWNED; _this._description = 'Indicates attempt to finalize invalid, provisional, or restored order.'; break; default: _this._type = failure_common_1.FailureTypes.UNSPECIFIED; _this._description = 'Not a known native error code.'; break; } return _this; } return Failure; }(failure_common_1.BaseFailure)); exports.Failure = Failure; //# sourceMappingURL=failure.ios.js.map