Initial commit
This commit is contained in:
+1802
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,182 @@
|
||||
/******/ (function() { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({});
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ !function() {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = function(result, chunkIds, fn, priority) {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var chunkIds = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ !function() {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function() { return module['default']; } :
|
||||
/******/ function() { return module; };
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ !function() {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, definition) {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/global */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.g = (function() {
|
||||
/******/ if (typeof globalThis === 'object') return globalThis;
|
||||
/******/ try {
|
||||
/******/ return this || new Function('return this')();
|
||||
/******/ } catch (e) {
|
||||
/******/ if (typeof window === 'object') return window;
|
||||
/******/ }
|
||||
/******/ })();
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ !function() {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ !function() {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "/js/manifest": 0,
|
||||
/******/ "css/vendor": 0,
|
||||
/******/ "css/app": 0,
|
||||
/******/ "css/landing": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
|
||||
/******/ var chunkIds = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = self["webpackChunkvue_boilerplate"] = self["webpackChunkvue_boilerplate"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ }();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=manifest.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,118 @@
|
||||
(self["webpackChunkvue_boilerplate"] = self["webpackChunkvue_boilerplate"] || []).push([["/js/payment"],{
|
||||
|
||||
/***/ "./resources/src/js/payment.js":
|
||||
/*!*************************************!*\
|
||||
!*** ./resources/src/js/payment.js ***!
|
||||
\*************************************/
|
||||
/***/ (function() {
|
||||
|
||||
paypal.Buttons({
|
||||
// Set your environment
|
||||
env: paypal_env,
|
||||
// Set style of buttons
|
||||
style: {
|
||||
layout: 'horizontal',
|
||||
// horizontal | vertical
|
||||
size: 'large',
|
||||
// medium | large | responsive
|
||||
shape: 'rect',
|
||||
// pill | rect
|
||||
color: 'gold',
|
||||
// gold | blue | silver | black,
|
||||
fundingicons: false,
|
||||
// true | false,
|
||||
tagline: false // true | false,
|
||||
},
|
||||
// onInit is called when the button first renders
|
||||
onInit: function onInit(data, actions) {
|
||||
// Disable the buttons
|
||||
actions.disable();
|
||||
|
||||
// Listen for changes to the checkbox
|
||||
document.querySelector('#amount').addEventListener('keyup', function (event) {
|
||||
var amount = event.target.value;
|
||||
amount = +amount;
|
||||
if (isNaN(amount)) {
|
||||
document.getElementById("amount-err").innerHTML = "Invalid amount format";
|
||||
setTimeout(function () {
|
||||
document.getElementById("amount-err").innerHTML = "";
|
||||
}, 2000);
|
||||
actions.disable();
|
||||
} else if (amount < 5) {
|
||||
document.getElementById("amount-err").innerHTML = "Amount must be greater than 5";
|
||||
setTimeout(function () {
|
||||
document.getElementById("amount-err").innerHTML = "";
|
||||
}, 2000);
|
||||
actions.disable();
|
||||
}
|
||||
if (event.target.value === "") {
|
||||
document.getElementById("amount-err").innerHTML = "Invalid amount format";
|
||||
setTimeout(function () {
|
||||
document.getElementById("amount-err").innerHTML = "";
|
||||
}, 2000);
|
||||
actions.disable();
|
||||
} else {
|
||||
actions.enable();
|
||||
}
|
||||
});
|
||||
},
|
||||
// onClick is called when the button is clicked
|
||||
onClick: function onClick() {
|
||||
var regex = /^\d+(?:\.\d{0,2})$/;
|
||||
var amount = document.getElementById("amount").value;
|
||||
amount = +amount;
|
||||
if (isNaN(amount)) {
|
||||
alert(2);
|
||||
document.getElementById("amount-err").innerHTML = "Invalid amount format";
|
||||
setTimeout(function () {
|
||||
document.getElementById("amount-err").innerHTML = "";
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
// Wait for the PayPal button to be clicked
|
||||
createOrder: function createOrder() {
|
||||
var formData = new FormData();
|
||||
var amount = document.getElementById("amount").value;
|
||||
formData.append('amount', amount);
|
||||
return fetch('/app/paypal/do/order', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
}).then(function (response) {
|
||||
return response.json();
|
||||
}).then(function (resJson) {
|
||||
return resJson.data.id;
|
||||
});
|
||||
},
|
||||
// Wait for the payment to be authorized by the customer
|
||||
onApprove: function onApprove(data, actions) {
|
||||
return fetch('/app/paypal/order/success/' + data.orderID, {
|
||||
method: 'POST'
|
||||
}).then(function (res) {
|
||||
return res.json();
|
||||
}).then(function (res) {
|
||||
|
||||
// window.location.href = '/account/paypal/order/success';
|
||||
});
|
||||
},
|
||||
// Wait for the payment to be authorized by the customer
|
||||
onCancel: function onCancel(data, actions) {
|
||||
return fetch('/app/paypal/order/cancel/' + data.orderID, {
|
||||
method: 'POST'
|
||||
}).then(function (res) {
|
||||
return res.json();
|
||||
}).then(function (res) {
|
||||
|
||||
// window.location.href = '/account/paypal/order/success';
|
||||
});
|
||||
}
|
||||
}).render('#paypalCheckoutContainer');
|
||||
|
||||
/***/ })
|
||||
|
||||
},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
||||
/******/ var __webpack_exports__ = (__webpack_exec__("./resources/src/js/payment.js"));
|
||||
/******/ }
|
||||
]);
|
||||
//# sourceMappingURL=payment.js.map
|
||||
File diff suppressed because one or more lines are too long
+45179
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user