@solidgate/vue-sdk 1.25.0 → 1.26.0
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 +4 -1
- package/dist/Payment.vue.d.ts +12 -0
- package/dist/constants/index.d.ts +2 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +22 -3
- package/dist/interfaces/PaymentProps.d.ts +2 -0
- package/dist/utils/getPayButtonParams.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -77,14 +77,16 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
|
|
|
77
77
|
```vue
|
|
78
78
|
<template>
|
|
79
79
|
<Payment
|
|
80
|
-
:
|
|
80
|
+
:merchant-data="merchantData"
|
|
81
81
|
:google-pay-container-ref="googleButton"
|
|
82
82
|
:apple-pay-container-ref="appleButton"
|
|
83
83
|
:paypal-container-ref="paypalButton"
|
|
84
|
+
:mbway-container-ref="mbwayButton"
|
|
84
85
|
/>
|
|
85
86
|
<div ref="googleButton" />
|
|
86
87
|
<div ref="appleButton" />
|
|
87
88
|
<div ref="paypalButton" />
|
|
89
|
+
<div ref="mbwayButton" />
|
|
88
90
|
</template>
|
|
89
91
|
|
|
90
92
|
<script lang="ts" setup>
|
|
@@ -95,6 +97,7 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
|
|
|
95
97
|
const googleButton = ref<HTMLDivElement>()
|
|
96
98
|
const appleButton = ref<HTMLDivElement>()
|
|
97
99
|
const paypalButton = ref<HTMLDivElement>()
|
|
100
|
+
const mbwayButton = ref<HTMLDivElement>()
|
|
98
101
|
|
|
99
102
|
const merchantData: InitConfig['merchantData'] = {
|
|
100
103
|
merchant: '<<--YOUR MERCHANT ID-->>',
|
package/dist/Payment.vue.d.ts
CHANGED
|
@@ -75,12 +75,18 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
75
75
|
theme?: "dark" | "light" | undefined;
|
|
76
76
|
height?: number | undefined;
|
|
77
77
|
} | undefined, "containerId"> | undefined;
|
|
78
|
+
mbwayButtonParams?: Omit<{
|
|
79
|
+
containerId?: string | undefined;
|
|
80
|
+
enabled?: boolean | undefined;
|
|
81
|
+
height?: number | undefined;
|
|
82
|
+
} | undefined, "containerId"> | undefined;
|
|
78
83
|
googlePayContainerRef?: HTMLDivElement | undefined;
|
|
79
84
|
applePayContainerRef?: HTMLDivElement | undefined;
|
|
80
85
|
paypalContainerRef?: HTMLDivElement | undefined;
|
|
81
86
|
pixContainerRef?: HTMLDivElement | undefined;
|
|
82
87
|
bizumContainerRef?: HTMLDivElement | undefined;
|
|
83
88
|
blikContainerRef?: HTMLDivElement | undefined;
|
|
89
|
+
mbwayContainerRef?: HTMLDivElement | undefined;
|
|
84
90
|
onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
|
|
85
91
|
onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
|
|
86
92
|
onMounted?: ((e: MountedMessage) => void) | undefined;
|
|
@@ -198,12 +204,18 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
198
204
|
theme?: "dark" | "light" | undefined;
|
|
199
205
|
height?: number | undefined;
|
|
200
206
|
} | undefined, "containerId"> | undefined;
|
|
207
|
+
mbwayButtonParams?: Omit<{
|
|
208
|
+
containerId?: string | undefined;
|
|
209
|
+
enabled?: boolean | undefined;
|
|
210
|
+
height?: number | undefined;
|
|
211
|
+
} | undefined, "containerId"> | undefined;
|
|
201
212
|
googlePayContainerRef?: HTMLDivElement | undefined;
|
|
202
213
|
applePayContainerRef?: HTMLDivElement | undefined;
|
|
203
214
|
paypalContainerRef?: HTMLDivElement | undefined;
|
|
204
215
|
pixContainerRef?: HTMLDivElement | undefined;
|
|
205
216
|
bizumContainerRef?: HTMLDivElement | undefined;
|
|
206
217
|
blikContainerRef?: HTMLDivElement | undefined;
|
|
218
|
+
mbwayContainerRef?: HTMLDivElement | undefined;
|
|
207
219
|
onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
|
|
208
220
|
onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
|
|
209
221
|
onMounted?: ((e: MountedMessage) => void) | undefined;
|
|
@@ -5,4 +5,5 @@ declare const PAYPAL_BUTTON_CONTAINER_ID: string;
|
|
|
5
5
|
declare const PIX_BUTTON_CONTAINER_ID: string;
|
|
6
6
|
declare const BIZUM_BUTTON_CONTAINER_ID: string;
|
|
7
7
|
declare const BLIK_BUTTON_CONTAINER_ID: string;
|
|
8
|
-
|
|
8
|
+
declare const MBWAY_BUTTON_CONTAINER_ID: string;
|
|
9
|
+
export { IFRAME_CONTAINER_ID, GOOGLE_PAY_BUTTON_CONTAINER_ID, APPLE_PAY_BUTTON_CONTAINER_ID, PAYPAL_BUTTON_CONTAINER_ID, PIX_BUTTON_CONTAINER_ID, BIZUM_BUTTON_CONTAINER_ID, BLIK_BUTTON_CONTAINER_ID, MBWAY_BUTTON_CONTAINER_ID };
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.payment-form-container[data-v-
|
|
1
|
+
.payment-form-container[data-v-757b2e2e] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
|
package/dist/index.es.js
CHANGED
|
@@ -6,6 +6,7 @@ const PAYPAL_BUTTON_CONTAINER_ID = `paypal-button-container_#${Math.random() * 1
|
|
|
6
6
|
const PIX_BUTTON_CONTAINER_ID = `pix-button-container_#${Math.random() * 1e4}`;
|
|
7
7
|
const BIZUM_BUTTON_CONTAINER_ID = `bizum-button-container_#${Math.random() * 1e4}`;
|
|
8
8
|
const BLIK_BUTTON_CONTAINER_ID = `blik-button-container_#${Math.random() * 1e4}`;
|
|
9
|
+
const MBWAY_BUTTON_CONTAINER_ID = `mbway-button-container_#${Math.random() * 1e4}`;
|
|
9
10
|
var MessageType;
|
|
10
11
|
(function(MessageType2) {
|
|
11
12
|
MessageType2["Mounted"] = "mounted";
|
|
@@ -87,6 +88,7 @@ var PayableEntity;
|
|
|
87
88
|
PayableEntity2["Pix"] = "pix";
|
|
88
89
|
PayableEntity2["Bizum"] = "bizum";
|
|
89
90
|
PayableEntity2["Blik"] = "blik";
|
|
91
|
+
PayableEntity2["Mbway"] = "mbway";
|
|
90
92
|
})(PayableEntity || (PayableEntity = {}));
|
|
91
93
|
var PayableEntity$1 = PayableEntity;
|
|
92
94
|
var InteractionType;
|
|
@@ -240,6 +242,10 @@ const payButtonIds = {
|
|
|
240
242
|
blikButtonParams: {
|
|
241
243
|
title: "Blik",
|
|
242
244
|
id: BLIK_BUTTON_CONTAINER_ID
|
|
245
|
+
},
|
|
246
|
+
mbwayButtonParams: {
|
|
247
|
+
title: "MBWay",
|
|
248
|
+
id: MBWAY_BUTTON_CONTAINER_ID
|
|
243
249
|
}
|
|
244
250
|
};
|
|
245
251
|
function getPayButtonParams(config, key, container) {
|
|
@@ -274,7 +280,8 @@ const initPaymentForm = async (props) => {
|
|
|
274
280
|
paypalContainerRef,
|
|
275
281
|
pixContainerRef,
|
|
276
282
|
bizumContainerRef,
|
|
277
|
-
blikContainerRef
|
|
283
|
+
blikContainerRef,
|
|
284
|
+
mbwayContainerRef
|
|
278
285
|
} = props;
|
|
279
286
|
if (!merchantData) {
|
|
280
287
|
throw new Error("Attribute 'merchantData' is required");
|
|
@@ -340,6 +347,14 @@ const initPaymentForm = async (props) => {
|
|
|
340
347
|
if (blikButtonParams) {
|
|
341
348
|
initConfig.blikButtonParams = blikButtonParams;
|
|
342
349
|
}
|
|
350
|
+
const mbwayButtonParams = getPayButtonParams(
|
|
351
|
+
props,
|
|
352
|
+
"mbwayButtonParams",
|
|
353
|
+
mbwayContainerRef
|
|
354
|
+
);
|
|
355
|
+
if (mbwayButtonParams) {
|
|
356
|
+
initConfig.mbwayButtonParams = mbwayButtonParams;
|
|
357
|
+
}
|
|
343
358
|
return clientSdk.init(initConfig);
|
|
344
359
|
};
|
|
345
360
|
const onSubscribe = (sdkInstanceValue, callbacks) => {
|
|
@@ -415,12 +430,14 @@ const _sfc_main$1 = defineComponent({
|
|
|
415
430
|
pixButtonParams: {},
|
|
416
431
|
bizumButtonParams: {},
|
|
417
432
|
blikButtonParams: {},
|
|
433
|
+
mbwayButtonParams: {},
|
|
418
434
|
googlePayContainerRef: {},
|
|
419
435
|
applePayContainerRef: {},
|
|
420
436
|
paypalContainerRef: {},
|
|
421
437
|
pixContainerRef: {},
|
|
422
438
|
bizumContainerRef: {},
|
|
423
439
|
blikContainerRef: {},
|
|
440
|
+
mbwayContainerRef: {},
|
|
424
441
|
onReadyPaymentInstance: {},
|
|
425
442
|
onPaymentDetails: { type: Function, default: () => {
|
|
426
443
|
} },
|
|
@@ -464,12 +481,14 @@ const _sfc_main$1 = defineComponent({
|
|
|
464
481
|
pixButtonParams: props.pixButtonParams,
|
|
465
482
|
bizumButtonParams: props.bizumButtonParams,
|
|
466
483
|
blikButtonParams: props.blikButtonParams,
|
|
484
|
+
mbwayButtonParams: props.mbwayButtonParams,
|
|
467
485
|
googlePayContainerRef: props.googlePayContainerRef,
|
|
468
486
|
applePayContainerRef: props.applePayContainerRef,
|
|
469
487
|
paypalContainerRef: props.paypalContainerRef,
|
|
470
488
|
pixContainerRef: props.pixContainerRef,
|
|
471
489
|
bizumContainerRef: props.bizumContainerRef,
|
|
472
|
-
blikContainerRef: props.blikContainerRef
|
|
490
|
+
blikContainerRef: props.blikContainerRef,
|
|
491
|
+
mbwayContainerRef: props.mbwayContainerRef
|
|
473
492
|
};
|
|
474
493
|
const callbacks = {
|
|
475
494
|
onMounted: (e) => props.onMounted && props.onMounted(e),
|
|
@@ -514,7 +533,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
514
533
|
};
|
|
515
534
|
}
|
|
516
535
|
});
|
|
517
|
-
var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
536
|
+
var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-757b2e2e"]]);
|
|
518
537
|
const initResignForm = async (config) => {
|
|
519
538
|
if (!config.resignRequest) {
|
|
520
539
|
throw new Error("Attribute 'resignRequest' is required");
|
|
@@ -11,12 +11,14 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
|
|
|
11
11
|
pixButtonParams?: Omit<InitConfig['pixButtonParams'], 'containerId'>;
|
|
12
12
|
bizumButtonParams?: Omit<InitConfig['bizumButtonParams'], 'containerId'>;
|
|
13
13
|
blikButtonParams?: Omit<InitConfig['blikButtonParams'], 'containerId'>;
|
|
14
|
+
mbwayButtonParams?: Omit<InitConfig['mbwayButtonParams'], 'containerId'>;
|
|
14
15
|
googlePayContainerRef?: HTMLDivElement;
|
|
15
16
|
applePayContainerRef?: HTMLDivElement;
|
|
16
17
|
paypalContainerRef?: HTMLDivElement;
|
|
17
18
|
pixContainerRef?: HTMLDivElement;
|
|
18
19
|
bizumContainerRef?: HTMLDivElement;
|
|
19
20
|
blikContainerRef?: HTMLDivElement;
|
|
21
|
+
mbwayContainerRef?: HTMLDivElement;
|
|
20
22
|
onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
|
|
21
23
|
}
|
|
22
24
|
export default PaymentProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InitConfig } from '@solidgate/client-sdk-loader';
|
|
2
|
-
declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams' | 'blikButtonParams'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
|
|
2
|
+
declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams' | 'blikButtonParams' | 'mbwayButtonParams'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
|
|
3
3
|
export default getPayButtonParams;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidgate/vue-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"repository": "https://github.com/solidgate-tech/vue-sdk",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.2.25"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@solidgate/client-sdk-loader": "^1.
|
|
31
|
+
"@solidgate/client-sdk-loader": "^1.26.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/types": "^7.24.5",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"vue": "^3.2.25",
|
|
52
52
|
"vue-tsc": "^1.5.1"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|