@paystack/checkout-js
Advanced tools
Comparing version 1.0.0 to 1.0.1-dev.1
{ | ||
"name": "@paystack/checkout-js", | ||
"version": "1.0.0", | ||
"version": "1.0.1-dev.1", | ||
"description": "Client-side JS library for billing on Paystack", | ||
@@ -14,3 +14,3 @@ "main": "lib/checkout.js", | ||
"type": "git", | ||
"url": "git+https://github.com/PaystackHQ/checkout-js.git" | ||
"url": "https://github.com/PaystackHQ/checkout-js.git" | ||
}, | ||
@@ -31,10 +31,12 @@ "keywords": [ | ||
"dependencies": { | ||
"axios": "^0.17.1", | ||
"card-validator": "^4.2.0", | ||
"axios": "^0.21.1", | ||
"card-validator": "^6.2.0", | ||
"fingerprintjs2": "^2.0.6", | ||
"form-urlencoded": "^2.0.9", | ||
"is-mobile": "^0.2.2", | ||
"jsencrypt": "^3.0.0-rc.1" | ||
"jsencrypt": "^3.0.0-rc.1", | ||
"qs": "^6.7.0" | ||
}, | ||
"devDependencies": { | ||
"axios-mock-adapter": "^1.15.0", | ||
"axios-mock-adapter": "^1.16.0", | ||
"babel-c": "^0.2.0", | ||
@@ -44,2 +46,3 @@ "babel-cli": "^6.26.0", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-plugin-transform-builtin-extend": "^1.1.2", | ||
"babel-polyfill": "^6.26.0", | ||
@@ -50,15 +53,19 @@ "babel-preset-airbnb": "^2.4.0", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"commitizen": "^4.2.3", | ||
"cross-env": "^5.1.6", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-import": "^2.12.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-react": "^7.9.1", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-react": "^7.12.4", | ||
"fast-async": "^6.3.7", | ||
"http-server": "^0.11.1", | ||
"http-server": "^0.12.3", | ||
"husky": "^4.3.8", | ||
"jest": "^23.6", | ||
"jest-canvas-mock": "^2.0.0-beta.1", | ||
"nodent-runtime": "^3.2.1", | ||
"prettier-eslint": "^8.8.0", | ||
"rimraf": "^2.6.2", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^0.56.1", | ||
@@ -70,4 +77,5 @@ "rollup-plugin-babel": "^3.0.4", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"rollup-plugin-uglify": "^3.0.0" | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-uglify": "^3.0.0", | ||
"semantic-release": "^17.3.8" | ||
}, | ||
@@ -81,10 +89,38 @@ "scripts": { | ||
"build": "npm run build:cjs && npm run build:es && cross-env NODE_ENV=production npm run build:dist", | ||
"build:dev": "npm run build:cjs && npm run build:es && cross-env NODE_ENV=dev npm run build:dist", | ||
"build:staging": "npm run build:cjs && npm run build:es && cross-env NODE_ENV=staging npm run build:dist", | ||
"dev": "npm run build:cjs && npm run build:es && cross-env NODE_ENV=dev npm run build:dist", | ||
"staging": "npm run build:cjs && npm run build:es && cross-env NODE_ENV=staging npm run build:dist", | ||
"prepare": "npm run lint && npm run test && npm run clean && npm run build", | ||
"test": "cross-env NODE_ENV=test jest" | ||
"test": "cross-env NODE_ENV=test jest", | ||
"semantic-release": "semantic-release" | ||
}, | ||
"jest": { | ||
"testURL": "http://localhost/" | ||
"testURL": "http://localhost/", | ||
"setupFiles": [ | ||
"jest-canvas-mock" | ||
] | ||
}, | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/npm", | ||
"@semantic-release/github" | ||
], | ||
"branches": [ | ||
"master", | ||
{ | ||
"name": "dev", | ||
"prerelease": true | ||
} | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true" | ||
} | ||
} | ||
} |
@@ -1,57 +0,61 @@ | ||
# Paystack JS | ||
# Checkout JS | ||
This is the client-side JS library for billing customers with Paystack. It makes it easy to accept payments from a web application and to create custom, secure payment experiences for merchant apps and websites. | ||
This is the client-side JS library for billing customers with Paystack. It makes it easy to create custom, secure payment experiences for merchant apps and websites. Checkout JS handles payment data encryption and transmission, this allows merchants to collect sensitive information such as credit card information without violating compliance. | ||
# Modules | ||
It is used in Checkout, Paystack's proprietary checkout form. | ||
There are two main modules in this repository: | ||
**Paystack JS**: With this library, Paystack merchants can charge customers from their applications using their custom, secure checkout flows. This allows them to collect sensitive information such as credit card information without violating compliance. Paystack JS handles payment data encryption and transmission, and is used in Checkout, Paystack's proprietary checkout form. | ||
[Read Paystack JS Documentation](https://www.notion.so/paystack/Paystack-JS-README-6b5d1a21a1034bc99e670308f10683ec) | ||
# Documentation | ||
**Popup**: As mentioned earlier, Paystack has created a great checkout experience for customers to pay our merchants with [https://checkout.paystack.com](https://checkout.paystack.com/). This library allows anyone load this checkout form in an iFrame from any web application. Configurable with a public key, this is the easiest way for merchants on Paystack to collect payments. | ||
[Read Popup Documentation](https://www.notion.so/paystack/Paystack-JS-README-6b5d1a21a1034bc99e670308f10683ec) | ||
See the [Checkout JS public docs](./PUBLIC_DOCS.md) and [development docs](./DEV_DOCS.md) | ||
# Installation | ||
> Note: The current version of Paystack JS is in the v2 folder. The v1 folder contains the code for Paystack Inline, the first version of Popup, which is no longer in active development. | ||
Clone this repository | ||
git clone git@github.com:PaystackHQ/paystack-js.git | ||
git clone git@github.com:PaystackHQ/checkout-js.git | ||
Navigate to the v2 directory then install dependencies with: | ||
Install dependencies with: | ||
cd v2 && npm install | ||
npm install | ||
# Development | ||
The code for core Paystack JS is in the `v2/src/core` folder, while the code for Popup is in the `v2/src/popup` folder. Testing is done with Jest. To test your changes, run | ||
The source code can be found in the `src/` folder. | ||
# Testing | ||
Testing is done with Jest. To test your changes, run | ||
npm test | ||
## Build | ||
Paystack JS is built with Rollup. To build, run the command | ||
# Build | ||
Checkout JS is built with Rollup. To build, run the command | ||
npm run build | ||
You can also specify an environment to build for: `dev`, `staging`, or `production`. Configuration variables are set in `v2/src/config.js`. | ||
You can also specify an environment to build for: `dev`, `staging`, or `production`. Configuration variables are set in `src/config.js`. | ||
## Visual Testing for Popup | ||
To test Popup visually, run the command | ||
# Deployment | ||
npm run dev:popup | ||
Checkout JS is deployed to three environments: | ||
# Deployment | ||
- Staging: [https://js-studio.paystack.co/v1/checkout.js](https://js-studio.paystack.co/v1/checkout.js) | ||
- Production: [https://js.paystack.co/v1/checkout.js](https://js.paystack.co/v1/checkout.js) | ||
- npm: [@paystack/checkout-js](https://npmjs.com/package/@paystack/checkout-js) | ||
Paystack JS is deployed to three environments: | ||
- Staging: [https://js-studio.paystack.co](https://js-studio.paystack.co) | ||
- Production: [https://checkout-js](https://checkout-js) | ||
- npm: paystack-js | ||
Continuous Integration is set up with Circle CI, and any push to `master` branch will attempt to update the npm module `paystack-js` | ||
# Releases | ||
Automated deployment is done with Deploybot. We generate two build files (`v2/popup.js` and `v2/checkout.js`) for every push to `master` or `dev`. Pushes to the `dev` branch will deploy to the staging environment while `master` deploys to the production environment | ||
Checkout JS is automatically packaged and published to the NPM registry on every push to the `master` and `dev` branches. | ||
The `master` branch is publised under the `latest` tag so it can be installed by running `npm i @paystack/checkout-js@latest` while the `dev` branch is published under the `dev` tag so it can be installed using `npm i @paystack/checkout-js@dev` | ||
All published versions are listed here on NPM https://www.npmjs.com/package/@paystack/checkout-js |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
995752
24926
62
7
37
2
+ Addedfingerprintjs2@^2.0.6
+ Addedqs@^6.7.0
+ Addedaxios@0.21.4(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcard-validator@6.2.0(transitive)
+ Addedcredit-card-type@8.3.0(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedfingerprintjs2@2.1.4(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.6(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedqs@6.13.1(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
- Removedaxios@0.17.1(transitive)
- Removedcard-validator@4.3.0(transitive)
- Removedcredit-card-type@6.3.0(transitive)
- Removedis-buffer@1.1.6(transitive)
Updatedaxios@^0.21.1
Updatedcard-validator@^6.2.0