mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-71113 js: Fix all jsdoc warnings
This commit is contained in:
parent
4c826a2d4c
commit
e5454f31ab
641 changed files with 496 additions and 789 deletions
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../src/events.js"],"names":["proceed"],"mappings":"+IAwBe,CACXA,OAAO,CAAE,qCADE,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 * Contain the events the payment modal can fire.\n *\n * @module core_payment/events\n * @package core_payment\n * @copyright 2020 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nexport default {\n proceed: 'core_payment-modal_gateways:proceed',\n};\n"],"file":"events.min.js"}
|
||||
{"version":3,"sources":["../src/events.js"],"names":["proceed"],"mappings":"+IAuBe,CACXA,OAAO,CAAE,qCADE,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 * Contain the events the payment modal can fire.\n *\n * @module core_payment/events\n * @copyright 2020 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nexport default {\n proceed: 'core_payment-modal_gateways:proceed',\n};\n"],"file":"events.min.js"}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../src/modal_gateways.js"],"names":["registered","SELECTORS","PROCEED_BUTTON","CANCEL_BUTTON","ModalGateways","root","getModal","on","CustomEvents","events","activate","e","data","proceedEvent","$","Event","PaymentEvents","proceed","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","cancelEvent","ModalEvents","cancel","Modal","TYPE","ModalRegistry","register"],"mappings":"gRAwBA,OACA,OACA,OACA,OACA,OACA,O,igEAEIA,CAAAA,CAAU,G,CACRC,CAAS,CAAG,CACdC,cAAc,CAAE,2BADF,CAEdC,aAAa,CAAE,0BAFD,C,CAKGC,C,+BAOjB,WAAYC,CAAZ,CAAkB,8BACRA,CADQ,CAEjB,C,0EAOwB,YAErB,2DAEA,KAAKC,QAAL,GAAgBC,EAAhB,CAAmBC,UAAaC,MAAb,CAAoBC,QAAvC,CAAiDT,CAAS,CAACC,cAA3D,CAA2E,SAACS,CAAD,CAAIC,CAAJ,CAAa,CACpF,GAAIC,CAAAA,CAAY,CAAGC,UAAEC,KAAF,CAAQC,UAAcC,OAAtB,CAAnB,CACA,CAAI,CAACC,OAAL,GAAeC,OAAf,CAAuBN,CAAvB,CAAqC,CAArC,EAEA,GAAI,CAACA,CAAY,CAACO,kBAAb,EAAL,CAAwC,CACpC,CAAI,CAACC,IAAL,GACAT,CAAI,CAACU,aAAL,CAAmBC,cAAnB,EACH,CACJ,CARD,EAUA,KAAKjB,QAAL,GAAgBC,EAAhB,CAAmBC,UAAaC,MAAb,CAAoBC,QAAvC,CAAiDT,CAAS,CAACE,aAA3D,CAA0E,SAACQ,CAAD,CAAIC,CAAJ,CAAa,CACnF,GAAIY,CAAAA,CAAW,CAAGV,UAAEC,KAAF,CAAQU,UAAYC,MAApB,CAAlB,CACA,CAAI,CAACR,OAAL,GAAeC,OAAf,CAAuBK,CAAvB,CAAoC,CAApC,EAEA,GAAI,CAACA,CAAW,CAACJ,kBAAZ,EAAL,CAAuC,CACnC,CAAI,CAACC,IAAL,GACAT,CAAI,CAACU,aAAL,CAAmBC,cAAnB,EACH,CACJ,CARD,CASH,C,cAvCsCI,S,cA0C3CvB,CAAa,CAACwB,IAAd,CAAqB,6BAArB,CAIA,GAAI,CAAC5B,CAAL,CAAiB,CACb6B,UAAcC,QAAd,CAAuB1B,CAAa,CAACwB,IAArC,CAA2CxB,CAA3C,CAA0D,6BAA1D,EACAJ,CAAU,GACb,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 * Contain the logic for the gateways modal: A modal with proceed and cancel buttons.\n *\n * @module core_payment/modal_gateways\n * @package core_payment\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 $ from 'jquery';\nimport CustomEvents from 'core/custom_interaction_events';\nimport Modal from 'core/modal';\nimport ModalEvents from 'core/modal_events';\nimport PaymentEvents from 'core_payment/events';\nimport ModalRegistry from 'core/modal_registry';\n\nlet registered = false;\nconst SELECTORS = {\n PROCEED_BUTTON: '[data-action=\"proceed\"]',\n CANCEL_BUTTON: '[data-action=\"cancel\"]',\n};\n\nexport default class ModalGateways extends Modal {\n\n /**\n * Constructor for the Modal.\n *\n * @param {object} root The root jQuery element for the modal\n */\n constructor(root) {\n super(root);\n }\n\n /**\n * Set up all of the event handling for the modal.\n *\n * @method registerEventListeners\n */\n registerEventListeners() {\n // Apply parent event listeners.\n super.registerEventListeners();\n\n this.getModal().on(CustomEvents.events.activate, SELECTORS.PROCEED_BUTTON, (e, data) => {\n var proceedEvent = $.Event(PaymentEvents.proceed);\n this.getRoot().trigger(proceedEvent, this);\n\n if (!proceedEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n });\n\n this.getModal().on(CustomEvents.events.activate, SELECTORS.CANCEL_BUTTON, (e, data) => {\n var cancelEvent = $.Event(ModalEvents.cancel);\n this.getRoot().trigger(cancelEvent, this);\n\n if (!cancelEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n });\n }\n}\n\nModalGateways.TYPE = 'core_payment-modal_gateways';\n\n// Automatically register with the modal registry the first time this module is imported so that you can create modals\n// of this type using the modal factory.\nif (!registered) {\n ModalRegistry.register(ModalGateways.TYPE, ModalGateways, 'core_payment/modal_gateways');\n registered = true;\n}\n"],"file":"modal_gateways.min.js"}
|
||||
{"version":3,"sources":["../src/modal_gateways.js"],"names":["registered","SELECTORS","PROCEED_BUTTON","CANCEL_BUTTON","ModalGateways","root","getModal","on","CustomEvents","events","activate","e","data","proceedEvent","$","Event","PaymentEvents","proceed","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","cancelEvent","ModalEvents","cancel","Modal","TYPE","ModalRegistry","register"],"mappings":"gRAuBA,OACA,OACA,OACA,OACA,OACA,O,igEAEIA,CAAAA,CAAU,G,CACRC,CAAS,CAAG,CACdC,cAAc,CAAE,2BADF,CAEdC,aAAa,CAAE,0BAFD,C,CAKGC,C,+BAOjB,WAAYC,CAAZ,CAAkB,8BACRA,CADQ,CAEjB,C,0EAOwB,YAErB,2DAEA,KAAKC,QAAL,GAAgBC,EAAhB,CAAmBC,UAAaC,MAAb,CAAoBC,QAAvC,CAAiDT,CAAS,CAACC,cAA3D,CAA2E,SAACS,CAAD,CAAIC,CAAJ,CAAa,CACpF,GAAIC,CAAAA,CAAY,CAAGC,UAAEC,KAAF,CAAQC,UAAcC,OAAtB,CAAnB,CACA,CAAI,CAACC,OAAL,GAAeC,OAAf,CAAuBN,CAAvB,CAAqC,CAArC,EAEA,GAAI,CAACA,CAAY,CAACO,kBAAb,EAAL,CAAwC,CACpC,CAAI,CAACC,IAAL,GACAT,CAAI,CAACU,aAAL,CAAmBC,cAAnB,EACH,CACJ,CARD,EAUA,KAAKjB,QAAL,GAAgBC,EAAhB,CAAmBC,UAAaC,MAAb,CAAoBC,QAAvC,CAAiDT,CAAS,CAACE,aAA3D,CAA0E,SAACQ,CAAD,CAAIC,CAAJ,CAAa,CACnF,GAAIY,CAAAA,CAAW,CAAGV,UAAEC,KAAF,CAAQU,UAAYC,MAApB,CAAlB,CACA,CAAI,CAACR,OAAL,GAAeC,OAAf,CAAuBK,CAAvB,CAAoC,CAApC,EAEA,GAAI,CAACA,CAAW,CAACJ,kBAAZ,EAAL,CAAuC,CACnC,CAAI,CAACC,IAAL,GACAT,CAAI,CAACU,aAAL,CAAmBC,cAAnB,EACH,CACJ,CARD,CASH,C,cAvCsCI,S,cA0C3CvB,CAAa,CAACwB,IAAd,CAAqB,6BAArB,CAIA,GAAI,CAAC5B,CAAL,CAAiB,CACb6B,UAAcC,QAAd,CAAuB1B,CAAa,CAACwB,IAArC,CAA2CxB,CAA3C,CAA0D,6BAA1D,EACAJ,CAAU,GACb,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 * Contain the logic for the gateways modal: A modal with proceed and cancel buttons.\n *\n * @module core_payment/modal_gateways\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 $ from 'jquery';\nimport CustomEvents from 'core/custom_interaction_events';\nimport Modal from 'core/modal';\nimport ModalEvents from 'core/modal_events';\nimport PaymentEvents from 'core_payment/events';\nimport ModalRegistry from 'core/modal_registry';\n\nlet registered = false;\nconst SELECTORS = {\n PROCEED_BUTTON: '[data-action=\"proceed\"]',\n CANCEL_BUTTON: '[data-action=\"cancel\"]',\n};\n\nexport default class ModalGateways extends Modal {\n\n /**\n * Constructor for the Modal.\n *\n * @param {object} root The root jQuery element for the modal\n */\n constructor(root) {\n super(root);\n }\n\n /**\n * Set up all of the event handling for the modal.\n *\n * @method registerEventListeners\n */\n registerEventListeners() {\n // Apply parent event listeners.\n super.registerEventListeners();\n\n this.getModal().on(CustomEvents.events.activate, SELECTORS.PROCEED_BUTTON, (e, data) => {\n var proceedEvent = $.Event(PaymentEvents.proceed);\n this.getRoot().trigger(proceedEvent, this);\n\n if (!proceedEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n });\n\n this.getModal().on(CustomEvents.events.activate, SELECTORS.CANCEL_BUTTON, (e, data) => {\n var cancelEvent = $.Event(ModalEvents.cancel);\n this.getRoot().trigger(cancelEvent, this);\n\n if (!cancelEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n });\n }\n}\n\nModalGateways.TYPE = 'core_payment-modal_gateways';\n\n// Automatically register with the modal registry the first time this module is imported so that you can create modals\n// of this type using the modal factory.\nif (!registered) {\n ModalRegistry.register(ModalGateways.TYPE, ModalGateways, 'core_payment/modal_gateways');\n registered = true;\n}\n"],"file":"modal_gateways.min.js"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../src/selectors.js"],"names":["elements","gateways","regions","gatewaysContainer","costContainer","values","gateway"],"mappings":"kJAwBe,CACXA,QAAQ,CAAE,CACNC,QAAQ,CAAE,4DADJ,CADC,CAIXC,OAAO,CAAE,CACLC,iBAAiB,CAAE,sCADd,CAELC,aAAa,CAAE,2CAFV,CAJE,CAQXC,MAAM,CAAE,CACJC,OAAO,CAAE,oEADL,CARG,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 * Define all of the selectors we will be using on the payment interface.\n *\n * @module core_payment/selectors\n * @package core_payment\n * @copyright 2019 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nexport default {\n elements: {\n gateways: '[data-region=\"gateways-container\"] input[type=\"radio\"]',\n },\n regions: {\n gatewaysContainer: '[data-region=\"gateways-container\"]',\n costContainer: '[data-region=\"fee-breakdown-container\"]',\n },\n values: {\n gateway: '[data-region=\"gateways-container\"] input[type=\"radio\"]:checked',\n },\n};\n"],"file":"selectors.min.js"}
|
||||
{"version":3,"sources":["../src/selectors.js"],"names":["elements","gateways","regions","gatewaysContainer","costContainer","values","gateway"],"mappings":"kJAuBe,CACXA,QAAQ,CAAE,CACNC,QAAQ,CAAE,4DADJ,CADC,CAIXC,OAAO,CAAE,CACLC,iBAAiB,CAAE,sCADd,CAELC,aAAa,CAAE,2CAFV,CAJE,CAQXC,MAAM,CAAE,CACJC,OAAO,CAAE,oEADL,CARG,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 * Define all of the selectors we will be using on the payment interface.\n *\n * @module core_payment/selectors\n * @copyright 2019 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nexport default {\n elements: {\n gateways: '[data-region=\"gateways-container\"] input[type=\"radio\"]',\n },\n regions: {\n gatewaysContainer: '[data-region=\"gateways-container\"]',\n costContainer: '[data-region=\"fee-breakdown-container\"]',\n },\n values: {\n gateway: '[data-region=\"gateways-container\"] input[type=\"radio\"]:checked',\n },\n};\n"],"file":"selectors.min.js"}
|
|
@ -17,7 +17,6 @@
|
|||
* Contain the events the payment modal can fire.
|
||||
*
|
||||
* @module core_payment/events
|
||||
* @package core_payment
|
||||
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* Contain the logic for the gateways modal.
|
||||
*
|
||||
* @module core_payment/gateways_modal
|
||||
* @package core_payment
|
||||
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* Contain the logic for the gateways modal: A modal with proceed and cancel buttons.
|
||||
*
|
||||
* @module core_payment/modal_gateways
|
||||
* @package core_payment
|
||||
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* Define all of the selectors we will be using on the payment interface.
|
||||
*
|
||||
* @module core_payment/selectors
|
||||
* @package core_payment
|
||||
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../src/repository.js"],"names":["getConfigForJs","component","paymentArea","itemId","Ajax","call","methodname","args","paymentarea","itemid","markTransactionComplete","orderId","orderid"],"mappings":"wLAwBA,uDAUO,GAAMA,CAAAA,CAAc,CAAG,SAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAoC,CAU9D,MAAOC,WAAKC,IAAL,CAAU,CATD,CACZC,UAAU,CAAE,gCADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,MAAM,CAAEN,CAHN,CAFM,CASC,CAAV,EAAqB,CAArB,CACV,CAXM,C,mBAsBA,GAAMO,CAAAA,CAAuB,CAAG,SAACT,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAiCQ,CAAjC,CAA6C,CAWhF,MAAOP,WAAKC,IAAL,CAAU,CAVD,CACZC,UAAU,CAAE,0CADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,MAAM,CAAEN,CAHN,CAIFS,OAAO,CAAED,CAJP,CAFM,CAUC,CAAV,EAAqB,CAArB,CACV,CAZM,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 paygw_paypal/repository\n * @package paygw_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 itemId belongs to\n * @param {string} paymentArea The area of the component that the itemId belongs to\n * @param {number} itemId An internal identifier that is used by the component\n * @returns {Promise<{clientid: string, brandname: string, cost: number, currency: string}>}\n */\nexport const getConfigForJs = (component, paymentArea, itemId) => {\n const request = {\n methodname: 'paygw_paypal_get_config_for_js',\n args: {\n component,\n paymentarea: paymentArea,\n itemid: itemId,\n },\n };\n\n return Ajax.call([request])[0];\n};\n\n/**\n * Call server to validate and capture payment for order.\n *\n * @param {string} component Name of the component that the itemId belongs to\n * @param {string} paymentArea The area of the component that the itemId belongs to\n * @param {number} itemId An internal identifier that is used by the component\n * @param {string} orderId The order id coming back from PayPal\n * @returns {*}\n */\nexport const markTransactionComplete = (component, paymentArea, itemId, orderId) => {\n const request = {\n methodname: 'paygw_paypal_create_transaction_complete',\n args: {\n component,\n paymentarea: paymentArea,\n itemid: itemId,\n orderid: orderId,\n },\n };\n\n return Ajax.call([request])[0];\n};\n"],"file":"repository.min.js"}
|
||||
{"version":3,"sources":["../src/repository.js"],"names":["getConfigForJs","component","paymentArea","itemId","Ajax","call","methodname","args","paymentarea","itemid","markTransactionComplete","orderId","orderid"],"mappings":"wLAuBA,uDAUO,GAAMA,CAAAA,CAAc,CAAG,SAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAoC,CAU9D,MAAOC,WAAKC,IAAL,CAAU,CATD,CACZC,UAAU,CAAE,gCADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,MAAM,CAAEN,CAHN,CAFM,CASC,CAAV,EAAqB,CAArB,CACV,CAXM,C,mBAsBA,GAAMO,CAAAA,CAAuB,CAAG,SAACT,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAiCQ,CAAjC,CAA6C,CAWhF,MAAOP,WAAKC,IAAL,CAAU,CAVD,CACZC,UAAU,CAAE,0CADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,MAAM,CAAEN,CAHN,CAIFS,OAAO,CAAED,CAJP,CAFM,CAUC,CAAV,EAAqB,CAArB,CACV,CAZM,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 paygw_paypal/repository\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 itemId belongs to\n * @param {string} paymentArea The area of the component that the itemId belongs to\n * @param {number} itemId An internal identifier that is used by the component\n * @returns {Promise<{clientid: string, brandname: string, cost: number, currency: string}>}\n */\nexport const getConfigForJs = (component, paymentArea, itemId) => {\n const request = {\n methodname: 'paygw_paypal_get_config_for_js',\n args: {\n component,\n paymentarea: paymentArea,\n itemid: itemId,\n },\n };\n\n return Ajax.call([request])[0];\n};\n\n/**\n * Call server to validate and capture payment for order.\n *\n * @param {string} component Name of the component that the itemId belongs to\n * @param {string} paymentArea The area of the component that the itemId belongs to\n * @param {number} itemId An internal identifier that is used by the component\n * @param {string} orderId The order id coming back from PayPal\n * @returns {*}\n */\nexport const markTransactionComplete = (component, paymentArea, itemId, orderId) => {\n const request = {\n methodname: 'paygw_paypal_create_transaction_complete',\n args: {\n component,\n paymentarea: paymentArea,\n itemid: itemId,\n orderid: orderId,\n },\n };\n\n return Ajax.call([request])[0];\n};\n"],"file":"repository.min.js"}
|
|
@ -17,7 +17,6 @@
|
|||
* PayPal repository module to encapsulate all of the AJAX requests that can be sent for PayPal.
|
||||
*
|
||||
* @module paygw_paypal/repository
|
||||
* @package paygw_paypal
|
||||
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue