@spot-flow/checkout-inline-js 0.1.16 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,36 +3,52 @@
3
3
 
4
4
  This project is an inline library that enables users to make payments seamlessly. It integrates smoothly into your application, providing a streamlined checkout experience.
5
5
 
6
- For React components and usage, [link](https://github.com/Spotflow-One/react-spotflow-checkout)
6
+ For React components and usage, [React NPM Package](https://www.npmjs.com/package/@spot-flow/react-spotflow-checkout)
7
7
 
8
- For Vue.js components and usage, [link](https://github.com/Spotflow-One/vue-spotflow-checkout)
9
-
10
- For Angular components and usage, [link](https://github.com/Spotflow-One/angular-spotflow-checkout)
8
+ For Vue.js components and usage, [Vue NPM Package](https://www.npmjs.com/package/@spot-flow/vue-spotflow-checkout)
11
9
 
10
+ For Angular components and usage, [Angular NPM Package](https://www.npmjs.com/package/@spot-flow/ng-spotflow-checkout)
12
11
 
13
12
  ## Demo
14
- <img width="808" alt="Screenshot 2024-07-26 at 16 05 52" src="https://github.com/user-attachments/assets/4dbb0b2e-2142-4f04-994a-5c352de7d30e">
15
13
 
14
+ <img width="808" alt="Screenshot 2024-07-26 at 16 05 52" src="https://github.com/user-attachments/assets/4dbb0b2e-2142-4f04-994a-5c352de7d30e">
16
15
 
17
16
  ## Installation
17
+
18
18
  ```sh
19
19
  npm install @spot-flow/checkout-inline-js
20
20
  ```
21
21
 
22
22
  ## Usage
23
- ```sh
23
+
24
+ ```javascript
24
25
  import { CheckoutForm } from "@spot-flow/checkout-inline-js";
25
26
 
26
- const checkout = new CheckoutForm(
27
- merchantKey = "<sk_test_f998479c0eedhXXXXXXXXXXXXXXXX>"// This is your Merchant Key generated for your Merchant on Spotflow
28
- email = "email",
29
- amount = 1000,
30
- );
31
- checkout.setup();
27
+ const { CheckoutForm } = SpotflowCheckout
28
+ const checkout = new CheckoutForm({}
29
+ // merchantKey = "sk_test_d968XXXXXXXXXX69",
30
+ // encryption = "g4ryTjP3VAGwl8Bk9r0foFtgoY64Ba4gZQ701OAAbB4=",
31
+ // email = "oldsdkdk@youmain.com",
32
+ // amount = 10,
33
+ // plandId = "3c902af2-XXXXj-XXXX-XXX88d4"
34
+
35
+ );
36
+ // N
37
+ checkout.setup({
38
+ email: "oludkhsdksn@gmail.com",
39
+ encryptionKey: "g4ryXXXXXXXXXXXX=",
40
+ merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
41
+ planId: "3c902af2-3333-333-xxxxxxx,
42
+ amount: 5,
43
+ onSuccess: (value) => {
44
+ console.log("Fully Success", { value })
45
+ }
46
+ });
32
47
  ```
33
48
 
34
49
  Alternatively, you can include it directly in your HTML via a CDN:
35
- ```sh
50
+
51
+ ```sh
36
52
  <script src="https://dr4h9151gox1m.cloudfront.net/dist/checkout-inline.js"></script>
37
53
  ```
38
54
 
@@ -41,50 +57,32 @@ Alternatively, you can include it directly in your HTML via a CDN:
41
57
  Make Payment
42
58
  </button>
43
59
  ```
44
- ```sh
60
+
61
+ ```javascript
45
62
  <script>
63
+
46
64
  const openCheckout = () => {
47
- const { CheckoutForm } = SpotflowCheckout
48
- const checkout = new CheckoutForm(
49
- merchantKey = "<sk_test_f998479c0eedhXXXXXXXXXXXXXXXX>"// This is your Merchant Key generated for your Merchant on Spotflow
50
- email = "temi@mailinator.com",
51
- amount = 1000,
52
- );
53
- checkout.setup();
65
+ const { CheckoutForm } = SpotflowCheckout
66
+ const checkout = new CheckoutForm({}
67
+ // merchantKey = "sk_test_d968XXXXXXXXXX69",
68
+ // encryption = "g4ryTjP373849849494949OAAbB4=",
69
+ // email = "oldsdkdk@youmain.com",
70
+ // amount = 10,
71
+ // plandId = "3c902af2-XXXXj-XXXX-XXX88d4"
72
+
73
+ );
74
+ // N
75
+ checkout.setup({
76
+ email: "oludkhsdksn@gmail.com",
77
+ encryptionKey: "g4ryXXXXXXXXXXXX=",
78
+ merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
79
+ planId: "3c902af2-3333-333-xxxxxxx,
80
+ amount: 5,
81
+ onSuccess: (value) => {
82
+ console.log("Fully Success", { value })
83
+ }
84
+ });
54
85
  };
86
+
55
87
  </script>
56
88
  ```
57
-
58
-
59
- ## Contributing
60
-
61
- We welcome contributions! Follow the steps below to get started:
62
-
63
- ### Getting Started
64
-
65
- 1. **Clone the repository:**
66
-
67
- ```sh
68
- git clone https://github.com/Spotflow-One/spotflow-checkout.git
69
- cd your-repo
70
- ```
71
-
72
- 2. **Install dependencies:**
73
-
74
- ```sh
75
- npm install
76
- ```
77
-
78
- ### Example Usage
79
-
80
- You can see an example of how to use the library in `index.html`. Open this file in your browser to see it in action.
81
-
82
- ### Building the Project
83
-
84
- To build the project, run:
85
-
86
- ```sh
87
- npm run build
88
- ```
89
-
90
- This will compile the source files and generate the output in the `dist` directory.