@spot-flow/checkout-inline-js 0.1.46-dev.2 → 0.1.47-dev.1

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
@@ -1,78 +1,78 @@
1
-
2
- # Spotflow Checkout Inline
3
-
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
-
6
- For React components and usage, [React NPM Package](https://www.npmjs.com/package/@spot-flow/react-spotflow-checkout)
7
-
8
- For Vue.js components and usage, [Vue NPM Package](https://www.npmjs.com/package/@spot-flow/vue-spotflow-checkout)
9
-
10
- For Angular components and usage, [Angular NPM Package](https://www.npmjs.com/package/@spot-flow/ng-spotflow-checkout)
11
-
12
- ## Demo
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">
15
-
16
- ## Installation
17
-
18
- ```sh
19
- npm install @spot-flow/checkout-inline-js
20
- ```
21
-
22
- ## Usage
23
-
24
- ```javascript
25
- import { CheckoutForm } from "@spot-flow/checkout-inline-js";
26
-
27
- const { CheckoutForm } = SpotflowCheckout;
28
- const checkout = new CheckoutForm();
29
- checkout.setup({
30
- email: "oluXXXXXX@gmail.com",
31
- encryptionKey: "g4ryXXXXXXXXXXXX=",
32
- merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
33
- amount: 5,
34
- metadata: {
35
- productName: "",
36
- title: ""
37
- },
38
- amount: 20,
39
- currency: "USD",
40
- localCurrency: "NGN"
41
-
42
- });
43
- ```
44
-
45
- Alternatively, you can include it directly in your HTML via a CDN:
46
-
47
- ```sh
48
- <script src="https://v2.inline-checkout.spotflow.one/dist/checkout-inline.js"></script>
49
- ```
50
-
51
- ```sh
52
- <button onclick="openCheckout()">
53
- Make Payment
54
- </button>
55
- ```
56
-
57
- ```javascript
58
- <script>
59
-
60
- const openCheckout = () => {
61
- const { CheckoutForm } = SpotflowCheckout;
62
- const checkout = new CheckoutForm();
63
- checkout.setup({
64
- email: "oluXXXXXX@gmail.com",
65
- encryptionKey: "g4ryXXXXXXXXXXXX=",
66
- merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
67
- metadata: {
68
- productName: "",
69
- title: ""
70
- },
71
- amount: 20,
72
- currency: "USD",
73
- localCurrency: "NGN"
74
- });
75
- };
76
-
77
- </script>
78
- ```
1
+
2
+ # Spotflow Checkout Inline
3
+
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
+
6
+ For React components and usage, [React NPM Package](https://www.npmjs.com/package/@spot-flow/react-spotflow-checkout)
7
+
8
+ For Vue.js components and usage, [Vue NPM Package](https://www.npmjs.com/package/@spot-flow/vue-spotflow-checkout)
9
+
10
+ For Angular components and usage, [Angular NPM Package](https://www.npmjs.com/package/@spot-flow/ng-spotflow-checkout)
11
+
12
+ ## Demo
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">
15
+
16
+ ## Installation
17
+
18
+ ```sh
19
+ npm install @spot-flow/checkout-inline-js
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ```javascript
25
+ import { CheckoutForm } from "@spot-flow/checkout-inline-js";
26
+
27
+ const { CheckoutForm } = SpotflowCheckout;
28
+ const checkout = new CheckoutForm();
29
+ checkout.setup({
30
+ email: "oluXXXXXX@gmail.com",
31
+ encryptionKey: "g4ryXXXXXXXXXXXX=",
32
+ merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
33
+ amount: 5,
34
+ metadata: {
35
+ productName: "",
36
+ title: ""
37
+ },
38
+ amount: 20,
39
+ currency: "USD",
40
+ localCurrency: "NGN"
41
+
42
+ });
43
+ ```
44
+
45
+ Alternatively, you can include it directly in your HTML via a CDN:
46
+
47
+ ```sh
48
+ <script src="https://v2.inline-checkout.spotflow.one/dist/checkout-inline.js"></script>
49
+ ```
50
+
51
+ ```sh
52
+ <button onclick="openCheckout()">
53
+ Make Payment
54
+ </button>
55
+ ```
56
+
57
+ ```javascript
58
+ <script>
59
+
60
+ const openCheckout = () => {
61
+ const { CheckoutForm } = SpotflowCheckout;
62
+ const checkout = new CheckoutForm();
63
+ checkout.setup({
64
+ email: "oluXXXXXX@gmail.com",
65
+ encryptionKey: "g4ryXXXXXXXXXXXX=",
66
+ merchantKey: "sk_test_d96889XXXXXXX684adXXXXX5b69",
67
+ metadata: {
68
+ productName: "",
69
+ title: ""
70
+ },
71
+ amount: 20,
72
+ currency: "USD",
73
+ localCurrency: "NGN"
74
+ });
75
+ };
76
+
77
+ </script>
78
+ ```
package/dist/api.d.ts CHANGED
@@ -26,3 +26,7 @@ export declare const retryPayment: (token: string, payload: RetryPaymentPayload,
26
26
  headers: Headers;
27
27
  }>;
28
28
  export declare function getTaxQuotes(token: string, amount: number, currency: string, rdtCode?: string, url?: string): Promise<TaxQuoteResponse>;
29
+ export declare const chargePayment: (token: string, reference: string, rdtCode?: string, url?: string) => Promise<{
30
+ headers: Headers;
31
+ data: PaymentResponseData;
32
+ }>;