@spot-flow/checkout-inline-js 0.0.6 → 0.1.14
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 +9 -2
- package/dist/api.d.ts +3 -1
- package/dist/checkout-class.d.ts +14 -17
- package/dist/checkout-inline.es.js +1221 -894
- package/dist/checkout-inline.js +383 -378
- package/dist/decorators/property.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/modules/Card.d.ts +14 -3
- package/dist/modules/Ussd.d.ts +6 -1
- package/dist/types/types.d.ts +27 -1
- package/dist/utils/encryption.d.ts +8 -0
- package/dist/utils/number-format.d.ts +8 -0
- package/dist/views/card/card-detail-form.d.ts +26 -0
- package/dist/views/card/card-otp-validation-form.d.ts +5 -0
- package/dist/views/card/card-pin-form.d.ts +5 -0
- package/dist/views/shared/main-page.d.ts +39 -0
- package/dist/views/shared/page-loader.d.ts +8 -0
- package/dist/views/shared/shared-error-page.d.ts +6 -0
- package/dist/views/ussd/ussd-bank-detail-form.d.ts +9 -0
- package/dist/views/ussd/ussd-view-code.d.ts +5 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -3,13 +3,20 @@
|
|
|
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)
|
|
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)
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## Demo
|
|
7
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">
|
|
8
15
|
|
|
9
16
|
|
|
10
17
|
## Installation
|
|
11
18
|
```sh
|
|
12
|
-
|
|
19
|
+
npm install @spot-flow/checkout-inline-js
|
|
13
20
|
```
|
|
14
21
|
|
|
15
22
|
## Usage
|
|
@@ -80,4 +87,4 @@ To build the project, run:
|
|
|
80
87
|
npm run build
|
|
81
88
|
```
|
|
82
89
|
|
|
83
|
-
This will compile the source files and generate the output in the `dist` directory.
|
|
90
|
+
This will compile the source files and generate the output in the `dist` directory.
|
package/dist/api.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { CardPaymentRequestPayload, PaymentResponseData, AuthorizeCardPaymentRequestPayload, ValidateCardPaymentRequestPayload, PaymentRequestPayload } from './types/types';
|
|
1
|
+
import { CardPaymentRequestPayload, PaymentResponseData, AuthorizeCardPaymentRequestPayload, ValidateCardPaymentRequestPayload, PaymentRequestPayload, GetPaymentRateParams, Rate, GetMerchantPlanDetail } from './types/types';
|
|
2
2
|
|
|
3
3
|
export declare const createCardPayment: (token: string, payload: CardPaymentRequestPayload) => Promise<PaymentResponseData>;
|
|
4
4
|
export declare const authorizeCardPayment: (token: string, payload: AuthorizeCardPaymentRequestPayload) => Promise<PaymentResponseData>;
|
|
5
5
|
export declare const validateCardPayment: (token: string, payload: ValidateCardPaymentRequestPayload) => Promise<PaymentResponseData>;
|
|
6
6
|
export declare const createTransferPayment: (token: string, payload: PaymentRequestPayload) => Promise<PaymentResponseData>;
|
|
7
7
|
export declare const verifyPayment: (token: string, reference: string, signal?: AbortSignal) => Promise<PaymentResponseData>;
|
|
8
|
+
export declare function getRate(token: string, payload: GetPaymentRateParams): Promise<Rate>;
|
|
9
|
+
export declare function getCheckoutConfiguration(secret: string, planId: string): Promise<GetMerchantPlanDetail>;
|
package/dist/checkout-class.d.ts
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { MainPageScreen } from './views/shared/main-page';
|
|
2
|
+
import { SharedErrorScreen } from './views/shared/shared-error-page';
|
|
3
|
+
import { PageLoader } from './views/shared/page-loader';
|
|
4
4
|
|
|
5
5
|
declare class CheckoutForm {
|
|
6
6
|
modalContainer: HTMLDivElement;
|
|
7
7
|
currentPaymentMethod: number;
|
|
8
8
|
currentStep: number;
|
|
9
|
+
mainLayout: HTMLDivElement;
|
|
10
|
+
encryption: string;
|
|
9
11
|
container: HTMLDivElement;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
mainScreen: MainPageScreen;
|
|
13
|
+
mainError: SharedErrorScreen;
|
|
14
|
+
mainLoader: PageLoader;
|
|
15
|
+
private merchantPlanDetail;
|
|
13
16
|
merchantKey: string;
|
|
17
|
+
planId: string;
|
|
14
18
|
email: string;
|
|
15
19
|
amount: number;
|
|
16
20
|
isMobile: boolean;
|
|
17
|
-
constructor(merchantKey: string, email: string, amount: number);
|
|
18
|
-
|
|
19
|
-
displayTabLayout(): void;
|
|
20
|
-
private updatePaymentMethodView;
|
|
21
|
-
renderPaymentMethodContent(): void | "";
|
|
22
|
-
setCurrentPaymentMethod(index: number): void;
|
|
23
|
-
private cleanup;
|
|
24
|
-
closeModal(): void;
|
|
21
|
+
constructor(merchantKey: string, encryption: string, email: string, amount: number, planId: string);
|
|
22
|
+
closeBTN(): void;
|
|
25
23
|
setup(): void;
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
private displayPaymentWarningText;
|
|
24
|
+
private getPlanDetails;
|
|
25
|
+
closeModal(): void;
|
|
29
26
|
}
|
|
30
27
|
export { CheckoutForm };
|