├── .browserslistrc ├── .github └── workflows │ └── release.-package.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── babel.config.js ├── build └── rollup.config.js ├── dev ├── serve.js └── serve.vue ├── documentation ├── docs │ ├── .vuepress │ │ ├── config.js │ │ └── public │ │ │ └── images │ │ │ ├── metadata.png │ │ │ └── vue3paystack_logo.png │ ├── README.md │ └── guide │ │ └── README.md ├── package-lock.json └── package.json ├── package-lock.json ├── package.json ├── src ├── entry.esm.js ├── entry.js └── vue3-paystack.vue └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | current node 2 | last 2 versions and > 2% 3 | ie > 10 4 | -------------------------------------------------------------------------------- /.github/workflows/release.-package.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somteacodes/vue3-paystack/f6229c061a36526c8699c2a7ccea3366501b81fc/.github/workflows/release.-package.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Anunobi Somto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue3-Paystack 2 | 3 | vue3-paystack allows you to accept payments in your vue application created with vue 3. 4 | The component is easily customisable. 5 | 6 | ### NPM 7 | ```npm 8 | npm i vue3-paystack 9 | ``` 10 | ## Usage 11 | ```javascript 12 | 24 | 25 | 34 | 35 | ``` 36 | 37 | ## Documentation 38 | A more detailed guide can be found [here](https://vue3paystack.netlify.app/) 39 | 40 | ## Want to say thanks? 41 | If this has been helpful, kindly share the link to other and a star on the github repo would be helpful too 42 | 43 | 44 | ## License 45 | Licensed under MIT License. [Click](https://github.com/somteacodes/vue3-paystack/blob/master/LICENSE.md) for details. -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | const devPresets = ['@vue/babel-preset-app']; 2 | const buildPresets = [ 3 | [ 4 | '@babel/preset-env', 5 | // Config for @babel/preset-env 6 | { 7 | // Example: Always transpile optional chaining/nullish coalescing 8 | // include: [ 9 | // /(optional-chaining|nullish-coalescing)/ 10 | // ], 11 | }, 12 | ], 13 | ]; 14 | module.exports = { 15 | presets: (process.env.NODE_ENV === 'development' ? devPresets : buildPresets), 16 | }; 17 | -------------------------------------------------------------------------------- /build/rollup.config.js: -------------------------------------------------------------------------------- 1 | // rollup.config.js 2 | import fs from 'fs'; 3 | import path from 'path'; 4 | import vue from 'rollup-plugin-vue'; 5 | import alias from '@rollup/plugin-alias'; 6 | import commonjs from '@rollup/plugin-commonjs'; 7 | import resolve from '@rollup/plugin-node-resolve'; 8 | import replace from '@rollup/plugin-replace'; 9 | import babel from '@rollup/plugin-babel'; 10 | import PostCSS from 'rollup-plugin-postcss'; 11 | import { terser } from 'rollup-plugin-terser'; 12 | import minimist from 'minimist'; 13 | 14 | // Get browserslist config and remove ie from es build targets 15 | const esbrowserslist = fs.readFileSync('./.browserslistrc') 16 | .toString() 17 | .split('\n') 18 | .filter((entry) => entry && entry.substring(0, 2) !== 'ie'); 19 | 20 | // Extract babel preset-env config, to combine with esbrowserslist 21 | const babelPresetEnvConfig = require('../babel.config') 22 | .presets.filter((entry) => entry[0] === '@babel/preset-env')[0][1]; 23 | 24 | const argv = minimist(process.argv.slice(2)); 25 | 26 | const projectRoot = path.resolve(__dirname, '..'); 27 | 28 | const baseConfig = { 29 | input: 'src/entry.js', 30 | plugins: { 31 | preVue: [ 32 | alias({ 33 | entries: [ 34 | { 35 | find: '@', 36 | replacement: `${path.resolve(projectRoot, 'src')}`, 37 | }, 38 | ], 39 | }), 40 | ], 41 | replace: { 42 | 'process.env.NODE_ENV': JSON.stringify('production'), 43 | }, 44 | vue: { 45 | }, 46 | postVue: [ 47 | resolve({ 48 | extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'], 49 | }), 50 | // Process only `