@payfurl/client 3.1.3 → 4.0.5
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/dist/sdk/favicon.ico +0 -0
- package/dist/sdk/icons/Addi.svg +4 -0
- package/dist/sdk/icons/Affirm.svg +3 -0
- package/dist/sdk/icons/Afterpay.svg +26 -0
- package/dist/sdk/icons/Alma.svg +4 -0
- package/dist/sdk/icons/Aplazame.svg +4 -0
- package/dist/sdk/icons/Aplazo.svg +4 -0
- package/dist/sdk/icons/Atome.svg +17 -0
- package/dist/sdk/icons/Billease.svg +4 -0
- package/dist/sdk/icons/Bkash.svg +15 -0
- package/dist/sdk/icons/Cashew.svg +4 -0
- package/dist/sdk/icons/Cashpresso.svg +4 -0
- package/dist/sdk/icons/Clearpay.svg +40 -0
- package/dist/sdk/icons/Cleo.svg +4 -0
- package/dist/sdk/icons/Dana.svg +4 -0
- package/dist/sdk/icons/Easypaisa.svg +23 -0
- package/dist/sdk/icons/Eraty.svg +4 -0
- package/dist/sdk/icons/Finvero.svg +4 -0
- package/dist/sdk/icons/Fupay.svg +44 -0
- package/dist/sdk/icons/Gcasg.svg +4 -0
- package/dist/sdk/icons/Grabpay.svg +74 -0
- package/dist/sdk/icons/Humm.svg +41 -0
- package/dist/sdk/icons/Kakaopay.svg +4 -0
- package/dist/sdk/icons/Klarna.svg +25 -0
- package/dist/sdk/icons/Kueskipay.svg +105 -0
- package/dist/sdk/icons/Lara.svg +4 -0
- package/dist/sdk/icons/Latitudepay.svg +4 -0
- package/dist/sdk/icons/Laybuy.svg +4 -0
- package/dist/sdk/icons/Limepay.svg +4 -0
- package/dist/sdk/icons/Pace.svg +4 -0
- package/dist/sdk/icons/Pagaleve.svg +4 -0
- package/dist/sdk/icons/Paribas.svg +81 -0
- package/dist/sdk/icons/Paybright.svg +20 -0
- package/dist/sdk/icons/Payflex.svg +4 -0
- package/dist/sdk/icons/Payjustnow.svg +4 -0
- package/dist/sdk/icons/Payright.svg +4 -0
- package/dist/sdk/icons/Paytm.svg +24 -0
- package/dist/sdk/icons/Paywithfour.svg +4 -0
- package/dist/sdk/icons/Postpay.svg +4 -0
- package/dist/sdk/icons/Ratepay.svg +5 -0
- package/dist/sdk/icons/Riverty.svg +4 -0
- package/dist/sdk/icons/Scalapay.svg +5 -0
- package/dist/sdk/icons/Sezzle.svg +78 -0
- package/dist/sdk/icons/Shopback.svg +6 -0
- package/dist/sdk/icons/Smartpay.svg +44 -0
- package/dist/sdk/icons/Sofinco.svg +17 -0
- package/dist/sdk/icons/Splitit.svg +40 -0
- package/dist/sdk/icons/Tabby.svg +22 -0
- package/dist/sdk/icons/Tamara.svg +26 -0
- package/dist/sdk/icons/Tendopay.svg +65 -0
- package/dist/sdk/icons/Touchngo.svg +157 -0
- package/dist/sdk/icons/Triplea.svg +4 -0
- package/dist/sdk/icons/Truemoney.svg +4 -0
- package/dist/sdk/icons/Twisto.svg +12 -0
- package/dist/sdk/icons/Uplift.svg +4 -0
- package/dist/sdk/icons/Valu.svg +4 -0
- package/dist/sdk/icons/Zest.svg +4 -0
- package/dist/sdk/icons/Zip.svg +9 -0
- package/dist/sdk/icons/Zoodpay.svg +4 -0
- package/dist/sdk/payfurl.es.js +5737 -6094
- package/dist/sdk/payfurl.umd.js +8 -1
- package/dist/sdk/style.css +1 -1
- package/package.json +15 -15
- package/dist/sdk/sdk/components/render.d.ts +0 -7
- package/dist/sdk/sdk/config.d.ts +0 -8
- package/dist/sdk/sdk/config.development.d.ts +0 -7
- package/dist/sdk/sdk/config.local.d.ts +0 -7
- package/dist/sdk/sdk/config.production.d.ts +0 -7
- package/dist/sdk/sdk/config.sandbox.d.ts +0 -7
- package/dist/sdk/sdk/formInvoker.d.ts +0 -10
- package/dist/sdk/sdk/httpInvoker.d.ts +0 -7
- package/dist/sdk/sdk/interfaces/Invoker.interface.d.ts +0 -4
- package/dist/sdk/sdk/interfaces/Payfurl.interface.d.ts +0 -17
- package/dist/sdk/sdk/interfaces/processors/CardProcessor.interface.d.ts +0 -8
- package/dist/sdk/sdk/interfaces/processors/PayToProcessor.interface.d.ts +0 -4
- package/dist/sdk/sdk/interfaces/processors/PaypalProcessor.interface.d.ts +0 -4
- package/dist/sdk/sdk/interfaces/processors/ThreeDsProcessor.interface.d.ts +0 -8
- package/dist/sdk/sdk/main.d.ts +0 -46
- package/dist/sdk/sdk/processors/cardProcessor.d.ts +0 -44
- package/dist/sdk/sdk/processors/payToProcessor.d.ts +0 -36
- package/dist/sdk/sdk/processors/paypalProcessor.d.ts +0 -27
- package/dist/sdk/sdk/processors/threeDsProcessor.d.ts +0 -39
- package/dist/sdk/sdk/types/Callback.type.d.ts +0 -6
- package/dist/sdk/sdk/types/CardIFrameOptions.type.d.ts +0 -10
- package/dist/sdk/sdk/types/CardOptions.type.d.ts +0 -5
- package/dist/sdk/sdk/types/Config.type.d.ts +0 -6
- package/dist/sdk/sdk/types/DropInOptions.type.d.ts +0 -10
- package/dist/sdk/sdk/types/Logger.type.d.ts +0 -1
- package/dist/sdk/sdk/types/PayToFormData.type.d.ts +0 -5
- package/dist/sdk/sdk/types/PayToOptions.type.d.ts +0 -4
- package/dist/sdk/sdk/types/PaymentOptionsCall.type.d.ts +0 -3
- package/dist/sdk/sdk/types/PaypalApprove.type.d.ts +0 -21
- package/dist/sdk/sdk/types/PaypalOptions.type.d.ts +0 -9
- package/dist/sdk/sdk/types/PaypalOrder.type.d.ts +0 -55
- package/dist/sdk/sdk/types/ThreeDSData.type.d.ts +0 -12
- package/dist/sdk/sdk/utils/alerts.d.ts +0 -2
- package/dist/sdk/sdk/utils/error.d.ts +0 -5
- package/dist/sdk/sdk/utils/loading.d.ts +0 -5
- package/dist/sdk/sdk/utils/spinner.d.ts +0 -2
- package/dist/sdk/utils/currency.d.ts +0 -6
- package/dist/sdk/utils/screen.d.ts +0 -1
- package/dist/sdk/utils/strings.d.ts +0 -1
- package/dist/sdk/utils/validate.d.ts +0 -13
package/dist/sdk/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.message[data-v-
|
|
1
|
+
.message[data-v-ae4be0f9]{color:var(--color-error);background:transparent;font-size:20px;font-weight:700;margin-bottom:20px}svg#paypal[data-v-2b840669]{--size: 30px;width:var(--size);height:var(--size)}svg[data-v-6a1e8b23]{--size: 30px;width:var(--size);height:var(--size)}svg#payto-icon[data-v-0b2d8aa0]{--size: 30px;width:var(--size);height:var(--size)}.payfurl-sdk-combined-container input[type=radio][data-v-e86a2bc9]{height:auto;min-width:auto}.payfurl-sdk-combined-container[data-v-e86a2bc9]{width:fit-content;display:flex;flex-direction:column;padding:15px;border:var(--border);border-radius:5px}.payfurl-sdk-combined-tab[data-v-e86a2bc9]{width:auto;height:52px;padding:0 10px;display:flex;align-items:center;justify-items:center;cursor:pointer;background-color:#fff;color:var(--color-text);border-top:1px solid var(--border-color)}.payfurl-sdk-combined-tab[data-v-e86a2bc9]:first-child{border-top:0}.payfurl-sdk-combined-tab .combined-tab-title[data-v-e86a2bc9]{width:fit-content;height:fit-content;display:flex;flex-direction:column;margin-right:50px}.payfurl-sdk-combined-tab .combined-tab-title .combined-tab-name[data-v-e86a2bc9]{font-weight:700}.payfurl-sdk-combined-tab .combined-tab-title .combined-tab-description[data-v-e86a2bc9]{color:var(--color-text-light);font-size:.8em}.payfurl-sdk-combined-tab>svg[data-v-e86a2bc9],.payfurl-sdk-combined-tab>img[data-v-e86a2bc9]{margin-left:auto}.payfurl-sdk-combined-tab>input[type=radio][data-v-e86a2bc9]{margin-right:20px}.payfurl-sdk-container-component[data-v-e86a2bc9]{min-height:50px;padding:0 45px}.payfurl-sdk-combined-container[data-v-e86a2bc9]{margin-bottom:20px}.message[data-v-265528b7]{color:var(--color-success);background:transparent;font-size:20px;font-weight:700;margin-bottom:20px}svg[data-v-d7e8386b]{fill:#000;stroke:transparent;width:20px;height:20px}iframe[data-v-a9bea9f2]{width:250px;height:400px;border:none;overflow:hidden}.mask[data-v-a9bea9f2]{align-items:normal;display:flex;justify-content:center;position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;background-color:#000c;transition:opacity .3s ease}.wrapper[data-v-a9bea9f2]{max-height:calc(100vh - 20px);margin:50px auto auto}.container[data-v-a9bea9f2]{position:relative;width:300px;background:white;display:flex;justify-content:center;align-items:center}svg[data-v-a9bea9f2]{cursor:pointer;position:absolute;right:5px;top:5px}img.payfurl-spinner{--spinner-size: 50px;position:absolute;left:calc(50% - var(--spinner-size) / 2);top:calc(50% - var(--spinner-size) / 2);width:var(--spinner-size);height:var(--spinner-size);z-index:9999}iframe[data-v-072ab770]{border:none;overflow:hidden;width:100%;height:240px}button[data-v-072ab770]{appearance:none;background-color:#1a82b7;border:1px solid rgba(27,31,35,.15);border-radius:6px;box-shadow:#1b1f231a 0 1px;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px;position:relative;text-align:center;text-decoration:none;user-select:none;-webkit-user-select:none;touch-action:manipulation;vertical-align:middle;white-space:nowrap}div#payfurl-payto-form[data-v-d646d395]{padding-bottom:20px}.small[data-v-d646d395]{font-size:.8em}div#payfurl-payto-agreement[data-v-f06289bf]{padding-bottom:20px}.message[data-v-f06289bf]{color:var(--color-text);background:transparent;font-size:20px;font-weight:700;margin-bottom:20px}.modal-mask[data-v-990ba291]{--color-hr: #ddd;align-items:normal;display:flex;justify-content:center;position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;background-color:#000c;transition:opacity .3s ease}.modal-mask .modal-wrapper[data-v-990ba291]{max-height:calc(100vh - 20px);margin:30px auto auto}.modal-mask .modal-wrapper .modal-content[data-v-990ba291]{position:relative;background-color:#fff;display:flex;flex-direction:column;min-width:450px;max-height:calc(100vh - 60px)}.modal-mask .modal-wrapper .modal-content .modal-header[data-v-990ba291],.modal-mask .modal-wrapper .modal-content .modal-footer[data-v-990ba291]{border:none;padding:25px 35px}.modal-mask .modal-wrapper .modal-content .modal-header[data-v-990ba291]{border-bottom:1px solid var(--color-hr)}.modal-mask .modal-wrapper .modal-content .modal-footer[data-v-990ba291]{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--color-hr)}.modal-mask .modal-wrapper .modal-content .modal-body[data-v-990ba291]{flex:1;overflow-y:auto;padding:0;position:relative}.modal-mask .modal-wrapper .modal-content .main-title[data-v-990ba291]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:20px;color:#000;padding-right:35px}.modal-mask .modal-wrapper .modal-content .close-icon[data-v-990ba291]{position:absolute;top:29px;right:27px;cursor:pointer}.modal-mask .modal-wrapper.small[data-v-990ba291]{margin:20% auto auto}.modal-mask .modal-wrapper.small .modal-content .modal-header[data-v-990ba291],.modal-mask .modal-wrapper.small .modal-content .modal-footer[data-v-990ba291]{border:none;padding:15px}.modal-mask .modal-wrapper.small .modal-content .modal-body[data-v-990ba291]{padding:15px 25px 25px}.modal-mask .modal-wrapper.small .modal-content .close-icon[data-v-990ba291]{top:19px}@media (max-height: 460px){.modal-mask .modal-wrapper[data-v-990ba291]{max-height:none;margin:auto}.modal-mask .modal-wrapper .modal-content[data-v-990ba291]{position:relative;background-color:#fff;overflow-y:auto;display:block}.modal-mask .modal-wrapper .modal-content .modal-header[data-v-990ba291],.modal-mask .modal-wrapper .modal-content .modal-footer[data-v-990ba291]{height:90px}.modal-mask .modal-wrapper .modal-content .modal-header[data-v-990ba291]{position:fixed;width:465px;background-color:#fff;z-index:9998}.modal-mask .modal-wrapper .modal-content .modal-body[data-v-990ba291]{max-height:none;margin-top:90px;overflow-y:visible}}iframe[data-v-f7c70025]{width:100%;height:100%;border:0;overflow:hidden}.payfurl-form{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--color-text);font-size:1em;font-weight:400;line-height:1.5;background-color:var(--background-color);box-sizing:border-box}.payfurl-form *,.payfurl-form *:before,.payfurl-form *:after{box-sizing:inherit}.payfurl-form *:focus{outline:none}.payfurl-form label{font-size:.8em;font-weight:700}.payfurl-form input{-webkit-appearance:none}.payfurl-form input,.payfurl-form select{max-width:100%;width:100%;border:var(--border);border-radius:4px;box-shadow:inset 0 .0625em .125em #0a0a0a0d;background-color:#fff;color:var(--color-input-text);align-items:center;font-size:1rem;height:2.5em;line-height:1.5;padding:calc(.5em - 1px) calc(.75em - 1px);position:relative;margin:0}.payfurl-form input:hover,.payfurl-form select:hover{border-color:var(--border-hover)}.payfurl-form ::placeholder{color:#3b3b3b4d}.payfurl-form ::-webkit-input-placeholder{color:#3b3b3b4d}.payfurl-form ::-moz-placeholder{color:#3b3b3b4d}.payfurl-form :-ms-input-placeholder{color:#3b3b3b4d}.payfurl-form :-moz-placeholder{color:#3b3b3b4d}.payfurl-form .error{font-size:.75em;color:var(--color-error)}.payfurl-form .success{font-size:.75em;color:var(--color-success)}.payfurl-form .group{display:flex;justify-content:flex-start}.payfurl-form .group>div:first-child{margin-right:10px}.payfurl-form .container-form{position:relative;width:200px}.payfurl-form .container-form .text-big{font-size:1.25em}.payfurl-form .container-form .text-normal{font-size:1em}body,body.common{--background-color: white;--color-text: #4a4a4a;--color-text-light: #777777;--color-input-text: #4a4a4a;--border: 1px solid #dbdbdb;--border-color: #dbdbdb;--border-hover: 1px solid #363636;--color-error: red;--color-success: #48b608}body.dark{--background-color: black;--color-text: white;--color-input-text: #4a4a4a;--border: 1px solid #b4e1ee;--border-hover: 1px solid #363636;--color-error: red;--color-success: #48b608}div.payfurl-bnpl-form[data-v-75271483]{padding-bottom:20px;position:relative}button[data-v-75271483]{width:100%;height:40px;border:0;border-radius:4px;background-color:#459ad8;color:#fff;text-align:center;font-family:Avenir,Helvetica,Arial,sans-serif;font-size:1.1em;font-weight:400;cursor:pointer}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfurl/client",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.5",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/sdk"
|
|
7
7
|
],
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"server": "python3 -m http.server 3001"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"dayjs": "^1.11.
|
|
26
|
-
"vue": "^3.2.
|
|
25
|
+
"dayjs": "^1.11.7",
|
|
26
|
+
"vue": "^3.2.47"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/types": "^7.
|
|
30
|
-
"@rollup/plugin-typescript": "^
|
|
31
|
-
"@types/node": "^
|
|
32
|
-
"@vitejs/plugin-vue": "^
|
|
33
|
-
"@vue/eslint-config-prettier": "^7.
|
|
34
|
-
"@vue/eslint-config-typescript": "^
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"eslint-plugin-vue": "^
|
|
37
|
-
"prettier": "^2.
|
|
38
|
-
"typescript": "^4.5
|
|
39
|
-
"vite": "^
|
|
40
|
-
"vue-tsc": "^
|
|
29
|
+
"@babel/types": "^7.21.2",
|
|
30
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
31
|
+
"@types/node": "^18.14.2",
|
|
32
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
33
|
+
"@vue/eslint-config-prettier": "^7.1.0",
|
|
34
|
+
"@vue/eslint-config-typescript": "^11.0.2",
|
|
35
|
+
"eslint": "^8.35.0",
|
|
36
|
+
"eslint-plugin-vue": "^9.9.0",
|
|
37
|
+
"prettier": "^2.8.4",
|
|
38
|
+
"typescript": "^4.9.5",
|
|
39
|
+
"vite": "^4.1.4",
|
|
40
|
+
"vue-tsc": "^1.2.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/dist/sdk/sdk/config.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InvokerInterface } from "./interfaces/Invoker.interface";
|
|
2
|
-
import { HTTPRequestCallbackFunc } from "./types/Callback.type";
|
|
3
|
-
export declare class FormInvoker implements InvokerInterface {
|
|
4
|
-
private iframeId;
|
|
5
|
-
private containerId;
|
|
6
|
-
private iframe;
|
|
7
|
-
private container;
|
|
8
|
-
private createIFrame;
|
|
9
|
-
invoke(url: string, httpMethod: string, data: any, successHandler?: HTTPRequestCallbackFunc, failureHandler?: HTTPRequestCallbackFunc): void;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InvokerInterface } from "./interfaces/Invoker.interface";
|
|
2
|
-
import { HTTPRequestCallbackFunc } from "./types/Callback.type";
|
|
3
|
-
export declare class HttpInvoker implements InvokerInterface {
|
|
4
|
-
private readonly publicKey;
|
|
5
|
-
constructor(publicKey: string);
|
|
6
|
-
invoke(url: string, httpMethod: string, data: any, successHandler?: HTTPRequestCallbackFunc, failureHandler?: HTTPRequestCallbackFunc): void;
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Environment } from "../config";
|
|
2
|
-
import type { CardOptionsType } from "../types/CardOptions.type";
|
|
3
|
-
import type { DropInOptionsType } from "../types/DropInOptions.type";
|
|
4
|
-
import { PaypalOptionsType } from "../types/PaypalOptions.type";
|
|
5
|
-
import { PayToOptionsType } from "../types/PayToOptions.type";
|
|
6
|
-
export interface PayfurlInterface {
|
|
7
|
-
init(environment: Environment, publicKey: string, debug: boolean): PayfurlInterface;
|
|
8
|
-
addDropIn(dropinParentId: string, amount: number, currency: string, options?: DropInOptionsType): PayfurlInterface;
|
|
9
|
-
addCard(iframeParentId: string, providerId: string, options?: CardOptionsType): PayfurlInterface;
|
|
10
|
-
addCardLeastCost(iframeParentId: string, amount: number, currency: string, options?: CardOptionsType): PayfurlInterface;
|
|
11
|
-
addThreeDsWithFullParameters(parentId: string, cardNumber: string, cardExpiry: string, cardHolderName: string, email: string, amount: number, currency: string): PayfurlInterface;
|
|
12
|
-
addPaypal(parentId: string, amount: number, currency: string, providerId: string, options: PaypalOptionsType): PayfurlInterface;
|
|
13
|
-
addPayTo(parentId: string, amount: number, providerId: string, options: PayToOptionsType): PayfurlInterface;
|
|
14
|
-
setAmount(amount: number): PayfurlInterface;
|
|
15
|
-
onSuccess(f: (message: object) => void): void;
|
|
16
|
-
onFailure(f: (message: object) => void): void;
|
|
17
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CardOptionsType } from "../../types/CardOptions.type";
|
|
2
|
-
import { ThreeDsProcessorInterface } from "./ThreeDsProcessor.interface";
|
|
3
|
-
export interface CardProcessorInterface {
|
|
4
|
-
addCard(container: HTMLElement, form: HTMLFormElement | null, providerId: string, amount: number, currency: string, options?: CardOptionsType): void;
|
|
5
|
-
tokenise(threeDSServerTransID: string | null): void;
|
|
6
|
-
addThreeDsProcessor(threeDsProcessor: ThreeDsProcessorInterface): void;
|
|
7
|
-
setAmount(amount: number): void;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ThreeDSDataType } from "../../types/ThreeDSData.type";
|
|
2
|
-
export interface ThreeDsProcessorInterface {
|
|
3
|
-
addThreeDs(container: HTMLElement, threeDSData?: Partial<ThreeDSDataType>): void;
|
|
4
|
-
addThreeDsWithFullParameters(container: HTMLElement, cardNumber: string, cardExpiry: string, cardHolderName: string, email: string, amount: number, currency: string): void;
|
|
5
|
-
threeDsPostAuth(threeDSServerTransID: string): void;
|
|
6
|
-
requestThreeDs(container: HTMLElement | null, iframe: HTMLIFrameElement | null, validateCard: boolean, callback: (data: any) => void, threeDSData?: Partial<ThreeDSDataType>): void;
|
|
7
|
-
setAmount(amount: number): void;
|
|
8
|
-
}
|
package/dist/sdk/sdk/main.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Environment } from "./config";
|
|
2
|
-
import type { CardOptionsType } from "./types/CardOptions.type";
|
|
3
|
-
import { PayfurlInterface } from "./interfaces/payfurl.interface";
|
|
4
|
-
import type { DropInOptionsType } from "./types/DropInOptions.type";
|
|
5
|
-
import { PaypalOptionsType } from "./types/PaypalOptions.type";
|
|
6
|
-
import { PayToOptionsType } from "./types/PayToOptions.type";
|
|
7
|
-
declare global {
|
|
8
|
-
interface Window {
|
|
9
|
-
paypal: any;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
declare class Payfurl implements PayfurlInterface {
|
|
13
|
-
private container;
|
|
14
|
-
private form;
|
|
15
|
-
private environment;
|
|
16
|
-
private debug;
|
|
17
|
-
private config;
|
|
18
|
-
private publicKey;
|
|
19
|
-
private httpInvoker;
|
|
20
|
-
private threeDsProcessor;
|
|
21
|
-
private paypalProcessor;
|
|
22
|
-
private cardProcessor;
|
|
23
|
-
private payToProcessor;
|
|
24
|
-
private userOnSuccess;
|
|
25
|
-
private userOnFailure;
|
|
26
|
-
init(environment: Environment, publicKey: string, debug: boolean): this;
|
|
27
|
-
private loadCss;
|
|
28
|
-
private log;
|
|
29
|
-
private _initForm;
|
|
30
|
-
private _setToken;
|
|
31
|
-
private _submitForm;
|
|
32
|
-
addCard(iframeParentId: string, providerId: string, options?: CardOptionsType): this;
|
|
33
|
-
addCardLeastCost(iframeParentId: string, amount: number, currency: string, options?: CardOptionsType): this;
|
|
34
|
-
private _addDropIn;
|
|
35
|
-
addDropIn(dropinParentId: string, amount: number, currency: string, options?: DropInOptionsType): this;
|
|
36
|
-
addPaypal(parentId: string, amount: number, currency: string, providerId: string, options: PaypalOptionsType): this;
|
|
37
|
-
addPayTo(parentId: string, amount: number, providerId: string, options: PayToOptionsType): this;
|
|
38
|
-
addThreeDsWithFullParameters(parentId: string, cardNumber: string, cardExpiry: string, cardHolderName: string, email: string, amount: number, currency: string): this;
|
|
39
|
-
private getPaymentOptions;
|
|
40
|
-
setAmount(amount: number): this;
|
|
41
|
-
onSuccess(f: (message: object) => void): void;
|
|
42
|
-
onFailure(f: (message: object) => void): void;
|
|
43
|
-
private showErrorMessage;
|
|
44
|
-
}
|
|
45
|
-
declare const _default: Payfurl;
|
|
46
|
-
export default _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { CardProcessorInterface } from "../interfaces/processors/CardProcessor.interface";
|
|
2
|
-
import { LoggerType } from "../types/Logger.type";
|
|
3
|
-
import { FailureCallbackFunc, SuccessCallbackFunc } from "../types/Callback.type";
|
|
4
|
-
import { PaymentOptionsCall } from "../types/PaymentOptionsCall.type";
|
|
5
|
-
import { CardOptionsType } from "../types/CardOptions.type";
|
|
6
|
-
import { Environment } from "../config";
|
|
7
|
-
import { ThreeDsProcessorInterface } from "../interfaces/processors/ThreeDsProcessor.interface";
|
|
8
|
-
declare type CardProcessorConfigType = {
|
|
9
|
-
debug: boolean;
|
|
10
|
-
environment: Environment;
|
|
11
|
-
publicKey: string;
|
|
12
|
-
url: string;
|
|
13
|
-
apiUrl: string;
|
|
14
|
-
getPaymentOptions: PaymentOptionsCall;
|
|
15
|
-
onSuccess: SuccessCallbackFunc | null;
|
|
16
|
-
onFailure: FailureCallbackFunc | null;
|
|
17
|
-
};
|
|
18
|
-
export declare class CardProcessor implements CardProcessorInterface {
|
|
19
|
-
private container;
|
|
20
|
-
private threeDsContainer;
|
|
21
|
-
private iframe;
|
|
22
|
-
private form;
|
|
23
|
-
private readonly log;
|
|
24
|
-
private readonly debug;
|
|
25
|
-
private readonly environment;
|
|
26
|
-
private readonly apiUrl;
|
|
27
|
-
private readonly url;
|
|
28
|
-
private readonly publicKey;
|
|
29
|
-
private readonly getPaymentOptions;
|
|
30
|
-
private email;
|
|
31
|
-
private threeDSEnabled;
|
|
32
|
-
private threeDsProcessor;
|
|
33
|
-
private readonly failureCallback;
|
|
34
|
-
private readonly successCallback;
|
|
35
|
-
private httpInvoker;
|
|
36
|
-
constructor(log: LoggerType, config: CardProcessorConfigType);
|
|
37
|
-
addThreeDsProcessor(threeDsProcessor: ThreeDsProcessorInterface): void;
|
|
38
|
-
addCard(container: HTMLElement, form: HTMLFormElement | null, providerId: string, amount: number, currency: string, options?: CardOptionsType): this;
|
|
39
|
-
private messageHandler;
|
|
40
|
-
private onSubmit;
|
|
41
|
-
tokenise(threeDSServerTransID: string | null): void;
|
|
42
|
-
setAmount(amount: number): void;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { PaymentOptionsCall } from "../types/PaymentOptionsCall.type";
|
|
2
|
-
import { FailureCallbackFunc, SuccessCallbackFunc } from "../types/Callback.type";
|
|
3
|
-
import { PayToProcessorInterface } from "../interfaces/processors/PayToProcessor.interface";
|
|
4
|
-
import { LoggerType } from "../types/Logger.type";
|
|
5
|
-
import { PayToOptionsType } from "../types/PayToOptions.type";
|
|
6
|
-
declare type PayToProcessorConfigType = {
|
|
7
|
-
debug: boolean;
|
|
8
|
-
publicKey: string;
|
|
9
|
-
apiUrl: string;
|
|
10
|
-
getPaymentOptions: PaymentOptionsCall;
|
|
11
|
-
onSuccess: SuccessCallbackFunc | null;
|
|
12
|
-
onFailure: FailureCallbackFunc | null;
|
|
13
|
-
};
|
|
14
|
-
export declare class PayToProcessor implements PayToProcessorInterface {
|
|
15
|
-
private container;
|
|
16
|
-
private readonly debug;
|
|
17
|
-
private readonly log;
|
|
18
|
-
private readonly apiUrl;
|
|
19
|
-
private readonly getPaymentOptions;
|
|
20
|
-
private options;
|
|
21
|
-
private providerId;
|
|
22
|
-
private tokenId;
|
|
23
|
-
private checkAgreementHandler;
|
|
24
|
-
private readonly failureCallback;
|
|
25
|
-
private readonly successCallback;
|
|
26
|
-
private httpInvoker;
|
|
27
|
-
constructor(log: LoggerType, config: PayToProcessorConfigType);
|
|
28
|
-
addPayTo(container: HTMLElement, amount: number, providerId: string, options: PayToOptionsType): void;
|
|
29
|
-
private tokenise;
|
|
30
|
-
private successPayToHandler;
|
|
31
|
-
private failurePayToHandler;
|
|
32
|
-
private failurePayToAgreementHandler;
|
|
33
|
-
private successPayToAgreementHandler;
|
|
34
|
-
private checkAgreement;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PaypalProcessorInterface } from "../interfaces/processors/PaypalProcessor.interface";
|
|
2
|
-
import { PaypalOptionsType } from "../types/PaypalOptions.type";
|
|
3
|
-
import { FailureCallbackFunc, SuccessCallbackFunc } from "../types/Callback.type";
|
|
4
|
-
import { LoggerType } from "../types/Logger.type";
|
|
5
|
-
import { PaymentOptionsCall } from "../types/PaymentOptionsCall.type";
|
|
6
|
-
declare type PaypalProcessorConfigType = {
|
|
7
|
-
debug: boolean;
|
|
8
|
-
publicKey: string;
|
|
9
|
-
apiUrl: string;
|
|
10
|
-
getPaymentOptions: PaymentOptionsCall;
|
|
11
|
-
onSuccess: SuccessCallbackFunc | null;
|
|
12
|
-
onFailure: FailureCallbackFunc | null;
|
|
13
|
-
};
|
|
14
|
-
export declare class PaypalProcessor implements PaypalProcessorInterface {
|
|
15
|
-
private container;
|
|
16
|
-
private readonly log;
|
|
17
|
-
private readonly apiUrl;
|
|
18
|
-
private form;
|
|
19
|
-
private readonly getPaymentOptions;
|
|
20
|
-
private readonly failureCallback;
|
|
21
|
-
private readonly successCallback;
|
|
22
|
-
private httpInvoker;
|
|
23
|
-
private paypalData;
|
|
24
|
-
constructor(log: LoggerType, config: PaypalProcessorConfigType);
|
|
25
|
-
addPaypal(container: HTMLElement, form: HTMLFormElement | null, amount: number, currency: string, providerId: string, options: PaypalOptionsType): void;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ThreeDsProcessorInterface } from "../interfaces/processors/ThreeDsProcessor.interface";
|
|
2
|
-
import { ThreeDSDataType } from "../types/ThreeDSData.type";
|
|
3
|
-
import { FailureCallbackFunc, SuccessCallbackFunc } from "../types/Callback.type";
|
|
4
|
-
import { LoggerType } from "../types/Logger.type";
|
|
5
|
-
import { TokeniseCall } from "../types/PaymentOptionsCall.type";
|
|
6
|
-
declare type ThreeDsProcessorConfigType = {
|
|
7
|
-
debug: boolean;
|
|
8
|
-
publicKey: string;
|
|
9
|
-
apiUrl: string;
|
|
10
|
-
tokenise: TokeniseCall;
|
|
11
|
-
onSuccess: SuccessCallbackFunc | null;
|
|
12
|
-
onFailure: FailureCallbackFunc | null;
|
|
13
|
-
};
|
|
14
|
-
export declare class ThreeDsProcessor implements ThreeDsProcessorInterface {
|
|
15
|
-
private container;
|
|
16
|
-
private iframe;
|
|
17
|
-
private readonly log;
|
|
18
|
-
private readonly apiUrl;
|
|
19
|
-
private readonly tokenise;
|
|
20
|
-
private readonly failureCallback;
|
|
21
|
-
private readonly successCallback;
|
|
22
|
-
private threeDSData;
|
|
23
|
-
private threeDSDestroy;
|
|
24
|
-
private threeDSCompleteHandler;
|
|
25
|
-
private httpInvoker;
|
|
26
|
-
private formInvoker;
|
|
27
|
-
constructor(log: LoggerType, config: ThreeDsProcessorConfigType);
|
|
28
|
-
private messageHandler;
|
|
29
|
-
addThreeDsWithFullParameters(container: HTMLElement, cardNumber: string, cardExpiry: string, cardHolderName: string, email: string, amount: number, currency: string): void;
|
|
30
|
-
addThreeDs(container: HTMLElement, threeDSData?: Partial<ThreeDSDataType>): void;
|
|
31
|
-
requestThreeDs(container: HTMLElement | null, iframe: HTMLIFrameElement | null, validateCard: boolean, callback: (data: any) => void, threeDSData?: Partial<ThreeDSDataType>): void;
|
|
32
|
-
threeDsPostAuth(threeDSServerTransID: string): void;
|
|
33
|
-
private threeDsPreauth;
|
|
34
|
-
private threeDsMethodInvoke;
|
|
35
|
-
private threeDsAuth;
|
|
36
|
-
private threeDsChallenge;
|
|
37
|
-
setAmount(amount: number): void;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type DropInOptionsType = {
|
|
2
|
-
paypalButtonStyle: string;
|
|
3
|
-
paypalEnablePayIn4: string;
|
|
4
|
-
cardProviderId: string;
|
|
5
|
-
paypalProviderId: string;
|
|
6
|
-
payToProviderId: string;
|
|
7
|
-
threeDSEmail: string;
|
|
8
|
-
payToMaximumAmount: number;
|
|
9
|
-
payToDescription: string;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type LoggerType = (message?: any, ...optionalParams: any[]) => void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare type PaymentOptionsCallbackType = (hasCardProviders: boolean, required3dsProvider: string, paypalProviderId: string, payToProviderId: string) => void;
|
|
2
|
-
export declare type PaymentOptionsCall = (amount: number, currency: string, overridePaypalProviderId: string, overridePayToProviderId: string, callback: PaymentOptionsCallbackType) => void;
|
|
3
|
-
export declare type TokeniseCall = (threeDSServerTransID: string | null) => void;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare type PaypalApproveType = {
|
|
2
|
-
data: {
|
|
3
|
-
orderID: string;
|
|
4
|
-
payerID: string;
|
|
5
|
-
paymentID: string | null;
|
|
6
|
-
billingToken: string | null;
|
|
7
|
-
facilitatorAccessToken: string;
|
|
8
|
-
paymentSource: string;
|
|
9
|
-
};
|
|
10
|
-
actions: {
|
|
11
|
-
order: {
|
|
12
|
-
authorize: any;
|
|
13
|
-
capture: any;
|
|
14
|
-
get: any;
|
|
15
|
-
patch: any;
|
|
16
|
-
};
|
|
17
|
-
payment: any;
|
|
18
|
-
redirect: any;
|
|
19
|
-
restart: any;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export declare type PaypalOrderType = {
|
|
2
|
-
resolved: boolean;
|
|
3
|
-
rejected: boolean;
|
|
4
|
-
errorHandled: boolean;
|
|
5
|
-
value: {
|
|
6
|
-
id: string;
|
|
7
|
-
intent: string;
|
|
8
|
-
status: string;
|
|
9
|
-
purchase_units: [
|
|
10
|
-
{
|
|
11
|
-
reference_id: string;
|
|
12
|
-
amount: {
|
|
13
|
-
currency_code: string;
|
|
14
|
-
value: string;
|
|
15
|
-
};
|
|
16
|
-
payee: {
|
|
17
|
-
email_address: string;
|
|
18
|
-
merchant_id: string;
|
|
19
|
-
};
|
|
20
|
-
soft_descriptor: string;
|
|
21
|
-
shipping: {
|
|
22
|
-
name: {
|
|
23
|
-
full_name: string;
|
|
24
|
-
};
|
|
25
|
-
address: {
|
|
26
|
-
address_line_1: string;
|
|
27
|
-
admin_area_2: string;
|
|
28
|
-
admin_area_1: string;
|
|
29
|
-
postal_code: string;
|
|
30
|
-
country_code: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
payer: {
|
|
36
|
-
name: {
|
|
37
|
-
given_name: string;
|
|
38
|
-
surname: string;
|
|
39
|
-
};
|
|
40
|
-
email_address: string;
|
|
41
|
-
payer_id: string;
|
|
42
|
-
address: {
|
|
43
|
-
country_code: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
create_time: string;
|
|
47
|
-
links: {
|
|
48
|
-
href: string;
|
|
49
|
-
rel: string;
|
|
50
|
-
method: string;
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
handlers: any[];
|
|
54
|
-
dispatching: boolean;
|
|
55
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare type ThreeDSDataType = {
|
|
2
|
-
email: string;
|
|
3
|
-
amount: number;
|
|
4
|
-
currency: string;
|
|
5
|
-
providerId: string;
|
|
6
|
-
cardNumber: string;
|
|
7
|
-
cardExpiry: string;
|
|
8
|
-
cardHolderName: string;
|
|
9
|
-
expiryDate: string;
|
|
10
|
-
threeDSServerTransID: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function getEmptyThreeDSData(): ThreeDSDataType;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const currencyMap: {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
|
-
export declare function checkCurrency(currency: string): boolean;
|
|
5
|
-
export declare function getCurrencyCode(currency: string): string;
|
|
6
|
-
export declare function getCurrencyExponent(currency: string): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getScreenColorDepth(): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function capitalizeFirstLetter(str: string): string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FailureCallbackFunc } from "../sdk/types/Callback.type";
|
|
2
|
-
export declare function checkCard(card: string): boolean;
|
|
3
|
-
export declare function luhnCheck(card: string): boolean;
|
|
4
|
-
export declare function checkExpiry(expiry: string): boolean;
|
|
5
|
-
export declare function get10DigitsPhone(phone: string): string;
|
|
6
|
-
export declare function checkPhone(phone: string): boolean;
|
|
7
|
-
export declare function checkEmail(email: string): boolean;
|
|
8
|
-
export declare function checkCcv(ccv: string): boolean;
|
|
9
|
-
export declare function checkEmpty(value: any): boolean;
|
|
10
|
-
export declare function checkAmount(amount: any): boolean;
|
|
11
|
-
export declare type ValidatorFunc = (value: any) => boolean;
|
|
12
|
-
export declare function validateInput(value: any, validator: ValidatorFunc, errorText: string, failureCallback: FailureCallbackFunc | null): void;
|
|
13
|
-
export declare function checkABN(abn: string): boolean;
|