UNPKG

klarna-on-demand

Version:

SDK for Klarna's on-demand purchase service.

347 lines 13.9 kB
{ "project": { "name": "klarna-on-demand", "description": "SDK for Klarna's on-demand purchase service.", "url": "https://github.com/klarna/klarna-on-demand-js", "version": "1.0.2" }, "files": { "lib/klarna-on-demand.js": { "name": "lib/klarna-on-demand.js", "modules": {}, "classes": { "KlarnaOnDemand": 1, "KlarnaOnDemand.OriginProof": 1 }, "fors": {}, "namespaces": {} } }, "modules": {}, "classes": { "KlarnaOnDemand": { "name": "KlarnaOnDemand", "shortname": "KlarnaOnDemand", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "file": "lib/klarna-on-demand.js", "line": 92, "description": "Manages application-wide settings and allows access to the SDK's views.\n#", "static": 1 }, "KlarnaOnDemand.OriginProof": { "name": "KlarnaOnDemand.OriginProof", "shortname": "KlarnaOnDemand.OriginProof", "classitems": [], "plugins": [], "extensions": [], "plugin_for": [], "extension_for": [], "file": "lib/klarna-on-demand.js", "line": 228, "description": "Generates an origin proof that can be used to verify the details of a purchase.\n #", "is_constructor": 1, "params": [ { "name": "amount", "description": "The purchase's total amount in \"cents\".", "type": "Int" }, { "name": "currency", "description": "The currency used in this purchase (“SEK”, “EUR”, or other ISO 4217 codes).", "type": "String" }, { "name": "userToken", "description": "Token identifying the user making the purchase.", "type": "String" } ] } }, "classitems": [ { "file": "lib/klarna-on-demand.js", "line": 114, "description": "Sets the API key to use in following calls.\n #", "itemtype": "method", "name": "setApiKey", "params": [ { "name": "apiKey", "description": "Merchant’s public API key for this application.", "type": "String" } ], "class": "KlarnaOnDemand" }, { "file": "lib/klarna-on-demand.js", "line": 136, "description": "Presents the registration view in an iframe that covers the entirety of the current document.\n #", "itemtype": "method", "name": "openRegistrationView", "params": [ { "name": "onSuccess", "description": "A callback that will be activated upon successful registration.\nThis callback will be passed the user token received during the registration process.", "type": "Function" }, { "name": "onError", "description": "A callback that will be activated if an error occurs during\nregistration. This callback will be passed an error code related to the error. This\ncode should not be presented to the user and is mainly for debugging purposes.", "type": "Function" }, { "name": "confirmedUserDataId", "description": "ID for pre-confirmed user data that allows the\nregistration view to already know the user's identity without requesting a phone number.", "type": "String", "optional": true, "optdefault": "null" }, { "name": "locale", "description": "The locale in which to present the view, in ISO 639-1 form.", "type": "String", "optional": true, "optdefault": "'en'" } ], "class": "KlarnaOnDemand" }, { "file": "lib/klarna-on-demand.js", "line": 171, "description": "Presents the preferences view in an iframe that covers the entirety of the current document.\n #", "itemtype": "method", "name": "openPreferencesView", "params": [ { "name": "userToken", "description": "The token of the user whose preferences are to be changed.", "type": "String" }, { "name": "onError", "description": "A callback that will be activated if an error occurs while setting\nthe user's preferences. This callback will be passed an error code related to the error.\nThis code should not be presented to the user and is mainly for debugging purposes.", "type": "Function" }, { "name": "locale", "description": "The locale in which to present the view, in ISO 639-1 form.", "type": "String", "optional": true, "optdefault": "'en'" } ], "class": "KlarnaOnDemand" }, { "file": "lib/klarna-on-demand.js", "line": 202, "description": "Closes the currently open view (be it a registration or preference view).", "class": "KlarnaOnDemand" }, { "file": "lib/klarna-on-demand.js", "line": 270, "description": "Returns a textual representation of the origin proof that needs to be sent along with the\npurchase for it to succeed.\n #", "itemtype": "method", "name": "toString", "return": { "description": "A textual representation of the origin proof that needs to be sent along with the\npurchase for it to succeed." }, "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 722, "description": "Secure Hash Algorithm (SHA256)\n http://www.webtoolkit.info/\nOriginal code by Angel Marin, Paul Johnston.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 855, "description": "Secure Hash Algorithm (SHA1)\n http://www.webtoolkit.info/", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 1036, "description": "MD5 (Message-Digest Algorithm)\n http://www.webtoolkit.info/", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 3826, "description": "All code is in an anonymous closure to keep the global namespace clean.", "params": [ { "name": "overflow", "description": "", "type": "Number=" }, { "name": "startdenom", "description": "", "type": "Number=" } ], "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 3892, "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 3957, "params": [ { "name": "prop", "description": "", "type": "String=" } ], "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 3988, "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4368, "description": "Pad string with leading zeros, to use even number of bytes.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4378, "description": "Encode length in DER format (if length <0x80, then one byte, else first byte is 0x80 + length of length :) + n-bytes of length).", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4391, "description": "Encode number in DER encoding (\"02\" + length + number).", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4403, "description": "Converts private & public part of given key to ASN1 Hex String.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4421, "description": "Converts private & public part of given key to PKCS#8 Hex String.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4437, "description": "Converts public part of given key to ASN1 Hex String.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4456, "description": "Output private & public part of the key in PKCS#1 PEM format.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4463, "description": "Output private & public part of the key in PKCS#8 PEM format.", "class": "KlarnaOnDemand.OriginProof" }, { "file": "lib/klarna-on-demand.js", "line": 4470, "description": "Output public part of the key in x509 PKCS#1 PEM format.", "class": "KlarnaOnDemand.OriginProof" } ], "warnings": [ { "message": "replacing incorrect tag: returns with return", "line": " lib/klarna-on-demand.js:270" }, { "message": "Missing item type\nCloses the currently open view (be it a registration or preference view).", "line": " lib/klarna-on-demand.js:202" }, { "message": "Missing item type\nSecure Hash Algorithm (SHA256)\n http://www.webtoolkit.info/\nOriginal code by Angel Marin, Paul Johnston.", "line": " lib/klarna-on-demand.js:722" }, { "message": "Missing item type\nSecure Hash Algorithm (SHA1)\n http://www.webtoolkit.info/", "line": " lib/klarna-on-demand.js:855" }, { "message": "Missing item type\nMD5 (Message-Digest Algorithm)\n http://www.webtoolkit.info/", "line": " lib/klarna-on-demand.js:1036" }, { "message": "Missing item type\nAll code is in an anonymous closure to keep the global namespace clean.", "line": " lib/klarna-on-demand.js:3826" }, { "message": "Missing item type", "line": " lib/klarna-on-demand.js:3892" }, { "message": "Missing item type", "line": " lib/klarna-on-demand.js:3957" }, { "message": "Missing item type", "line": " lib/klarna-on-demand.js:3988" }, { "message": "Missing item type\nPad string with leading zeros, to use even number of bytes.", "line": " lib/klarna-on-demand.js:4368" }, { "message": "Missing item type\nEncode length in DER format (if length <0x80, then one byte, else first byte is 0x80 + length of length :) + n-bytes of length).", "line": " lib/klarna-on-demand.js:4378" }, { "message": "Missing item type\nEncode number in DER encoding (\"02\" + length + number).", "line": " lib/klarna-on-demand.js:4391" }, { "message": "Missing item type\nConverts private & public part of given key to ASN1 Hex String.", "line": " lib/klarna-on-demand.js:4403" }, { "message": "Missing item type\nConverts private & public part of given key to PKCS#8 Hex String.", "line": " lib/klarna-on-demand.js:4421" }, { "message": "Missing item type\nConverts public part of given key to ASN1 Hex String.", "line": " lib/klarna-on-demand.js:4437" }, { "message": "Missing item type\nOutput private & public part of the key in PKCS#1 PEM format.", "line": " lib/klarna-on-demand.js:4456" }, { "message": "Missing item type\nOutput private & public part of the key in PKCS#8 PEM format.", "line": " lib/klarna-on-demand.js:4463" }, { "message": "Missing item type\nOutput public part of the key in x509 PKCS#1 PEM format.", "line": " lib/klarna-on-demand.js:4470" } ] }