MDL-69166 core_payment: Add paymentarea to the payment subsystem
[moodle.git] / payment / gateway / paypal / amd / build / repository.min.js.map
CommitLineData
7d10f352 1{"version":3,"sources":["../src/repository.js"],"names":["getConfigForJs","component","paymentArea","componentId","Ajax","call","methodname","args","paymentarea","componentid"],"mappings":"2JAwBA,uDAUO,GAAMA,CAAAA,CAAc,CAAG,SAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAyC,CAUnE,MAAOC,WAAKC,IAAL,CAAU,CATD,CACZC,UAAU,CAAE,6BADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,WAAW,CAAEN,CAHX,CAFM,CASC,CAAV,EAAqB,CAArB,CACV,CAXM,C","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * PayPal repository module to encapsulate all of the AJAX requests that can be sent for PayPal.\n *\n * @module pg_paypal/repository\n * @package pg_paypal\n * @copyright 2020 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport Ajax from 'core/ajax';\n\n/**\n * Return the PayPal JavaScript SDK URL.\n *\n * @param {string} component Name of the component that the componentid belongs to\n * @param {string} paymentArea The area of the component that the componentid belongs to\n * @param {number} componentId An internal identifier that is used by the component\n * @returns {Promise<{clientid: string, brandname: string}>}\n */\nexport const getConfigForJs = (component, paymentArea, componentId) => {\n const request = {\n methodname: 'pg_paypal_get_config_for_js',\n args: {\n component,\n paymentarea: paymentArea,\n componentid: componentId,\n },\n };\n\n return Ajax.call([request])[0];\n};\n"],"file":"repository.min.js"}