@solidgate/vue-sdk 1.26.0 → 1.27.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
|
@@ -72,7 +72,7 @@ const merchantData: InitConfig['merchantData'] = {
|
|
|
72
72
|
|
|
73
73
|
#### Custom containers
|
|
74
74
|
|
|
75
|
-
To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/google-pay-button/" target="_blank">Google Pay</a>, <a href="https://docs.solidgate.com/payments/integrate/payment-form/apple-pay-button/" target="_blank">Apple Pay</a>,
|
|
75
|
+
To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/google-pay-button/" target="_blank">Google Pay</a>, <a href="https://docs.solidgate.com/payments/integrate/payment-form/apple-pay-button/" target="_blank">Apple Pay</a>, <a href="https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons/#paypal-button" target="_blank">PayPal</a>, <a href="https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons/" target="_blank">MB Way</a>, or <a href="https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons/" target="_blank">Pix QR</a> buttons in separate containers, define payment as an asynchronous component and pass references to the container elements.
|
|
76
76
|
|
|
77
77
|
```vue
|
|
78
78
|
<template>
|
|
@@ -82,11 +82,13 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
|
|
|
82
82
|
:apple-pay-container-ref="appleButton"
|
|
83
83
|
:paypal-container-ref="paypalButton"
|
|
84
84
|
:mbway-container-ref="mbwayButton"
|
|
85
|
+
:pix-qr-container-ref="pixQrButton"
|
|
85
86
|
/>
|
|
86
87
|
<div ref="googleButton" />
|
|
87
88
|
<div ref="appleButton" />
|
|
88
89
|
<div ref="paypalButton" />
|
|
89
90
|
<div ref="mbwayButton" />
|
|
91
|
+
<div ref="pixQrButton" />
|
|
90
92
|
</template>
|
|
91
93
|
|
|
92
94
|
<script lang="ts" setup>
|
|
@@ -98,6 +100,7 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
|
|
|
98
100
|
const appleButton = ref<HTMLDivElement>()
|
|
99
101
|
const paypalButton = ref<HTMLDivElement>()
|
|
100
102
|
const mbwayButton = ref<HTMLDivElement>()
|
|
103
|
+
const pixQrButton = ref<HTMLDivElement>()
|
|
101
104
|
|
|
102
105
|
const merchantData: InitConfig['merchantData'] = {
|
|
103
106
|
merchant: '<<--YOUR MERCHANT ID-->>',
|
package/dist/Payment.vue.d.ts
CHANGED
|
@@ -80,6 +80,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
80
80
|
enabled?: boolean | undefined;
|
|
81
81
|
height?: number | undefined;
|
|
82
82
|
} | undefined, "containerId"> | undefined;
|
|
83
|
+
pixQrButtonParams?: Omit<{
|
|
84
|
+
containerId?: string | undefined;
|
|
85
|
+
enabled?: boolean | undefined;
|
|
86
|
+
height?: number | undefined;
|
|
87
|
+
} | undefined, "containerId"> | undefined;
|
|
83
88
|
googlePayContainerRef?: HTMLDivElement | undefined;
|
|
84
89
|
applePayContainerRef?: HTMLDivElement | undefined;
|
|
85
90
|
paypalContainerRef?: HTMLDivElement | undefined;
|
|
@@ -87,6 +92,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
87
92
|
bizumContainerRef?: HTMLDivElement | undefined;
|
|
88
93
|
blikContainerRef?: HTMLDivElement | undefined;
|
|
89
94
|
mbwayContainerRef?: HTMLDivElement | undefined;
|
|
95
|
+
pixQrContainerRef?: HTMLDivElement | undefined;
|
|
90
96
|
onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
|
|
91
97
|
onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
|
|
92
98
|
onMounted?: ((e: MountedMessage) => void) | undefined;
|
|
@@ -209,6 +215,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
209
215
|
enabled?: boolean | undefined;
|
|
210
216
|
height?: number | undefined;
|
|
211
217
|
} | undefined, "containerId"> | undefined;
|
|
218
|
+
pixQrButtonParams?: Omit<{
|
|
219
|
+
containerId?: string | undefined;
|
|
220
|
+
enabled?: boolean | undefined;
|
|
221
|
+
height?: number | undefined;
|
|
222
|
+
} | undefined, "containerId"> | undefined;
|
|
212
223
|
googlePayContainerRef?: HTMLDivElement | undefined;
|
|
213
224
|
applePayContainerRef?: HTMLDivElement | undefined;
|
|
214
225
|
paypalContainerRef?: HTMLDivElement | undefined;
|
|
@@ -216,6 +227,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
216
227
|
bizumContainerRef?: HTMLDivElement | undefined;
|
|
217
228
|
blikContainerRef?: HTMLDivElement | undefined;
|
|
218
229
|
mbwayContainerRef?: HTMLDivElement | undefined;
|
|
230
|
+
pixQrContainerRef?: HTMLDivElement | undefined;
|
|
219
231
|
onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
|
|
220
232
|
onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
|
|
221
233
|
onMounted?: ((e: MountedMessage) => void) | undefined;
|
|
@@ -6,4 +6,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
|
-
|
|
9
|
+
declare const PIX_QR_BUTTON_CONTAINER_ID: string;
|
|
10
|
+
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, PIX_QR_BUTTON_CONTAINER_ID };
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.payment-form-container[data-v-
|
|
1
|
+
.payment-form-container[data-v-d55f0b28] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
|
package/dist/index.es.js
CHANGED
|
@@ -7,6 +7,7 @@ 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
9
|
const MBWAY_BUTTON_CONTAINER_ID = `mbway-button-container_#${Math.random() * 1e4}`;
|
|
10
|
+
const PIX_QR_BUTTON_CONTAINER_ID = `pix-qr-button-container_#${Math.random() * 1e4}`;
|
|
10
11
|
var MessageType;
|
|
11
12
|
(function(MessageType2) {
|
|
12
13
|
MessageType2["Mounted"] = "mounted";
|
|
@@ -86,6 +87,7 @@ var PayableEntity;
|
|
|
86
87
|
PayableEntity2["Resign"] = "resign";
|
|
87
88
|
PayableEntity2["Paypal"] = "paypal";
|
|
88
89
|
PayableEntity2["Pix"] = "pix";
|
|
90
|
+
PayableEntity2["PixQr"] = "pix-qr";
|
|
89
91
|
PayableEntity2["Bizum"] = "bizum";
|
|
90
92
|
PayableEntity2["Blik"] = "blik";
|
|
91
93
|
PayableEntity2["Mbway"] = "mbway";
|
|
@@ -246,6 +248,10 @@ const payButtonIds = {
|
|
|
246
248
|
mbwayButtonParams: {
|
|
247
249
|
title: "MBWay",
|
|
248
250
|
id: MBWAY_BUTTON_CONTAINER_ID
|
|
251
|
+
},
|
|
252
|
+
pixQrButtonParams: {
|
|
253
|
+
title: "Pix QR",
|
|
254
|
+
id: PIX_QR_BUTTON_CONTAINER_ID
|
|
249
255
|
}
|
|
250
256
|
};
|
|
251
257
|
function getPayButtonParams(config, key, container) {
|
|
@@ -281,7 +287,8 @@ const initPaymentForm = async (props) => {
|
|
|
281
287
|
pixContainerRef,
|
|
282
288
|
bizumContainerRef,
|
|
283
289
|
blikContainerRef,
|
|
284
|
-
mbwayContainerRef
|
|
290
|
+
mbwayContainerRef,
|
|
291
|
+
pixQrContainerRef
|
|
285
292
|
} = props;
|
|
286
293
|
if (!merchantData) {
|
|
287
294
|
throw new Error("Attribute 'merchantData' is required");
|
|
@@ -355,6 +362,14 @@ const initPaymentForm = async (props) => {
|
|
|
355
362
|
if (mbwayButtonParams) {
|
|
356
363
|
initConfig.mbwayButtonParams = mbwayButtonParams;
|
|
357
364
|
}
|
|
365
|
+
const pixQrButtonParams = getPayButtonParams(
|
|
366
|
+
props,
|
|
367
|
+
"pixQrButtonParams",
|
|
368
|
+
pixQrContainerRef
|
|
369
|
+
);
|
|
370
|
+
if (pixQrButtonParams) {
|
|
371
|
+
initConfig.pixQrButtonParams = pixQrButtonParams;
|
|
372
|
+
}
|
|
358
373
|
return clientSdk.init(initConfig);
|
|
359
374
|
};
|
|
360
375
|
const onSubscribe = (sdkInstanceValue, callbacks) => {
|
|
@@ -431,6 +446,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
431
446
|
bizumButtonParams: {},
|
|
432
447
|
blikButtonParams: {},
|
|
433
448
|
mbwayButtonParams: {},
|
|
449
|
+
pixQrButtonParams: {},
|
|
434
450
|
googlePayContainerRef: {},
|
|
435
451
|
applePayContainerRef: {},
|
|
436
452
|
paypalContainerRef: {},
|
|
@@ -438,6 +454,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
438
454
|
bizumContainerRef: {},
|
|
439
455
|
blikContainerRef: {},
|
|
440
456
|
mbwayContainerRef: {},
|
|
457
|
+
pixQrContainerRef: {},
|
|
441
458
|
onReadyPaymentInstance: {},
|
|
442
459
|
onPaymentDetails: { type: Function, default: () => {
|
|
443
460
|
} },
|
|
@@ -482,13 +499,15 @@ const _sfc_main$1 = defineComponent({
|
|
|
482
499
|
bizumButtonParams: props.bizumButtonParams,
|
|
483
500
|
blikButtonParams: props.blikButtonParams,
|
|
484
501
|
mbwayButtonParams: props.mbwayButtonParams,
|
|
502
|
+
pixQrButtonParams: props.pixQrButtonParams,
|
|
485
503
|
googlePayContainerRef: props.googlePayContainerRef,
|
|
486
504
|
applePayContainerRef: props.applePayContainerRef,
|
|
487
505
|
paypalContainerRef: props.paypalContainerRef,
|
|
488
506
|
pixContainerRef: props.pixContainerRef,
|
|
489
507
|
bizumContainerRef: props.bizumContainerRef,
|
|
490
508
|
blikContainerRef: props.blikContainerRef,
|
|
491
|
-
mbwayContainerRef: props.mbwayContainerRef
|
|
509
|
+
mbwayContainerRef: props.mbwayContainerRef,
|
|
510
|
+
pixQrContainerRef: props.pixQrContainerRef
|
|
492
511
|
};
|
|
493
512
|
const callbacks = {
|
|
494
513
|
onMounted: (e) => props.onMounted && props.onMounted(e),
|
|
@@ -533,7 +552,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
533
552
|
};
|
|
534
553
|
}
|
|
535
554
|
});
|
|
536
|
-
var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
555
|
+
var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d55f0b28"]]);
|
|
537
556
|
const initResignForm = async (config) => {
|
|
538
557
|
if (!config.resignRequest) {
|
|
539
558
|
throw new Error("Attribute 'resignRequest' is required");
|
|
@@ -12,6 +12,7 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
|
|
|
12
12
|
bizumButtonParams?: Omit<InitConfig['bizumButtonParams'], 'containerId'>;
|
|
13
13
|
blikButtonParams?: Omit<InitConfig['blikButtonParams'], 'containerId'>;
|
|
14
14
|
mbwayButtonParams?: Omit<InitConfig['mbwayButtonParams'], 'containerId'>;
|
|
15
|
+
pixQrButtonParams?: Omit<InitConfig['pixQrButtonParams'], 'containerId'>;
|
|
15
16
|
googlePayContainerRef?: HTMLDivElement;
|
|
16
17
|
applePayContainerRef?: HTMLDivElement;
|
|
17
18
|
paypalContainerRef?: HTMLDivElement;
|
|
@@ -19,6 +20,7 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
|
|
|
19
20
|
bizumContainerRef?: HTMLDivElement;
|
|
20
21
|
blikContainerRef?: HTMLDivElement;
|
|
21
22
|
mbwayContainerRef?: HTMLDivElement;
|
|
23
|
+
pixQrContainerRef?: HTMLDivElement;
|
|
22
24
|
onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
|
|
23
25
|
}
|
|
24
26
|
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' | 'mbwayButtonParams'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
|
|
2
|
+
declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams' | 'blikButtonParams' | 'mbwayButtonParams' | 'pixQrButtonParams'>(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.27.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.27.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
|
+
}
|