@solidgate/vue-sdk 1.25.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 CHANGED
@@ -72,19 +72,23 @@ 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>, or <a href="https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons/#paypal-button" target="_blank">PayPal</a> buttons in separate containers, define payment as an asynchronous component and pass references to the container elements.
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>
79
79
  <Payment
80
- :merchan-data="merchantData"
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"
85
+ :pix-qr-container-ref="pixQrButton"
84
86
  />
85
87
  <div ref="googleButton" />
86
88
  <div ref="appleButton" />
87
89
  <div ref="paypalButton" />
90
+ <div ref="mbwayButton" />
91
+ <div ref="pixQrButton" />
88
92
  </template>
89
93
 
90
94
  <script lang="ts" setup>
@@ -95,6 +99,8 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
95
99
  const googleButton = ref<HTMLDivElement>()
96
100
  const appleButton = ref<HTMLDivElement>()
97
101
  const paypalButton = ref<HTMLDivElement>()
102
+ const mbwayButton = ref<HTMLDivElement>()
103
+ const pixQrButton = ref<HTMLDivElement>()
98
104
 
99
105
  const merchantData: InitConfig['merchantData'] = {
100
106
  merchant: '<<--YOUR MERCHANT ID-->>',
@@ -75,12 +75,24 @@ 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;
83
+ pixQrButtonParams?: Omit<{
84
+ containerId?: string | undefined;
85
+ enabled?: boolean | undefined;
86
+ height?: number | undefined;
87
+ } | undefined, "containerId"> | undefined;
78
88
  googlePayContainerRef?: HTMLDivElement | undefined;
79
89
  applePayContainerRef?: HTMLDivElement | undefined;
80
90
  paypalContainerRef?: HTMLDivElement | undefined;
81
91
  pixContainerRef?: HTMLDivElement | undefined;
82
92
  bizumContainerRef?: HTMLDivElement | undefined;
83
93
  blikContainerRef?: HTMLDivElement | undefined;
94
+ mbwayContainerRef?: HTMLDivElement | undefined;
95
+ pixQrContainerRef?: HTMLDivElement | undefined;
84
96
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
85
97
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
86
98
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -198,12 +210,24 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
198
210
  theme?: "dark" | "light" | undefined;
199
211
  height?: number | undefined;
200
212
  } | undefined, "containerId"> | undefined;
213
+ mbwayButtonParams?: Omit<{
214
+ containerId?: string | undefined;
215
+ enabled?: boolean | undefined;
216
+ height?: number | undefined;
217
+ } | undefined, "containerId"> | undefined;
218
+ pixQrButtonParams?: Omit<{
219
+ containerId?: string | undefined;
220
+ enabled?: boolean | undefined;
221
+ height?: number | undefined;
222
+ } | undefined, "containerId"> | undefined;
201
223
  googlePayContainerRef?: HTMLDivElement | undefined;
202
224
  applePayContainerRef?: HTMLDivElement | undefined;
203
225
  paypalContainerRef?: HTMLDivElement | undefined;
204
226
  pixContainerRef?: HTMLDivElement | undefined;
205
227
  bizumContainerRef?: HTMLDivElement | undefined;
206
228
  blikContainerRef?: HTMLDivElement | undefined;
229
+ mbwayContainerRef?: HTMLDivElement | undefined;
230
+ pixQrContainerRef?: HTMLDivElement | undefined;
207
231
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
208
232
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
209
233
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -5,4 +5,6 @@ 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
- 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 };
8
+ declare const MBWAY_BUTTON_CONTAINER_ID: string;
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-447888d8] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
1
+ .payment-form-container[data-v-d55f0b28] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
package/dist/index.es.js CHANGED
@@ -6,6 +6,8 @@ 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}`;
10
+ const PIX_QR_BUTTON_CONTAINER_ID = `pix-qr-button-container_#${Math.random() * 1e4}`;
9
11
  var MessageType;
10
12
  (function(MessageType2) {
11
13
  MessageType2["Mounted"] = "mounted";
@@ -85,8 +87,10 @@ var PayableEntity;
85
87
  PayableEntity2["Resign"] = "resign";
86
88
  PayableEntity2["Paypal"] = "paypal";
87
89
  PayableEntity2["Pix"] = "pix";
90
+ PayableEntity2["PixQr"] = "pix-qr";
88
91
  PayableEntity2["Bizum"] = "bizum";
89
92
  PayableEntity2["Blik"] = "blik";
93
+ PayableEntity2["Mbway"] = "mbway";
90
94
  })(PayableEntity || (PayableEntity = {}));
91
95
  var PayableEntity$1 = PayableEntity;
92
96
  var InteractionType;
@@ -240,6 +244,14 @@ const payButtonIds = {
240
244
  blikButtonParams: {
241
245
  title: "Blik",
242
246
  id: BLIK_BUTTON_CONTAINER_ID
247
+ },
248
+ mbwayButtonParams: {
249
+ title: "MBWay",
250
+ id: MBWAY_BUTTON_CONTAINER_ID
251
+ },
252
+ pixQrButtonParams: {
253
+ title: "Pix QR",
254
+ id: PIX_QR_BUTTON_CONTAINER_ID
243
255
  }
244
256
  };
245
257
  function getPayButtonParams(config, key, container) {
@@ -274,7 +286,9 @@ const initPaymentForm = async (props) => {
274
286
  paypalContainerRef,
275
287
  pixContainerRef,
276
288
  bizumContainerRef,
277
- blikContainerRef
289
+ blikContainerRef,
290
+ mbwayContainerRef,
291
+ pixQrContainerRef
278
292
  } = props;
279
293
  if (!merchantData) {
280
294
  throw new Error("Attribute 'merchantData' is required");
@@ -340,6 +354,22 @@ const initPaymentForm = async (props) => {
340
354
  if (blikButtonParams) {
341
355
  initConfig.blikButtonParams = blikButtonParams;
342
356
  }
357
+ const mbwayButtonParams = getPayButtonParams(
358
+ props,
359
+ "mbwayButtonParams",
360
+ mbwayContainerRef
361
+ );
362
+ if (mbwayButtonParams) {
363
+ initConfig.mbwayButtonParams = mbwayButtonParams;
364
+ }
365
+ const pixQrButtonParams = getPayButtonParams(
366
+ props,
367
+ "pixQrButtonParams",
368
+ pixQrContainerRef
369
+ );
370
+ if (pixQrButtonParams) {
371
+ initConfig.pixQrButtonParams = pixQrButtonParams;
372
+ }
343
373
  return clientSdk.init(initConfig);
344
374
  };
345
375
  const onSubscribe = (sdkInstanceValue, callbacks) => {
@@ -415,12 +445,16 @@ const _sfc_main$1 = defineComponent({
415
445
  pixButtonParams: {},
416
446
  bizumButtonParams: {},
417
447
  blikButtonParams: {},
448
+ mbwayButtonParams: {},
449
+ pixQrButtonParams: {},
418
450
  googlePayContainerRef: {},
419
451
  applePayContainerRef: {},
420
452
  paypalContainerRef: {},
421
453
  pixContainerRef: {},
422
454
  bizumContainerRef: {},
423
455
  blikContainerRef: {},
456
+ mbwayContainerRef: {},
457
+ pixQrContainerRef: {},
424
458
  onReadyPaymentInstance: {},
425
459
  onPaymentDetails: { type: Function, default: () => {
426
460
  } },
@@ -464,12 +498,16 @@ const _sfc_main$1 = defineComponent({
464
498
  pixButtonParams: props.pixButtonParams,
465
499
  bizumButtonParams: props.bizumButtonParams,
466
500
  blikButtonParams: props.blikButtonParams,
501
+ mbwayButtonParams: props.mbwayButtonParams,
502
+ pixQrButtonParams: props.pixQrButtonParams,
467
503
  googlePayContainerRef: props.googlePayContainerRef,
468
504
  applePayContainerRef: props.applePayContainerRef,
469
505
  paypalContainerRef: props.paypalContainerRef,
470
506
  pixContainerRef: props.pixContainerRef,
471
507
  bizumContainerRef: props.bizumContainerRef,
472
- blikContainerRef: props.blikContainerRef
508
+ blikContainerRef: props.blikContainerRef,
509
+ mbwayContainerRef: props.mbwayContainerRef,
510
+ pixQrContainerRef: props.pixQrContainerRef
473
511
  };
474
512
  const callbacks = {
475
513
  onMounted: (e) => props.onMounted && props.onMounted(e),
@@ -514,7 +552,7 @@ const _sfc_main$1 = defineComponent({
514
552
  };
515
553
  }
516
554
  });
517
- var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-447888d8"]]);
555
+ var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d55f0b28"]]);
518
556
  const initResignForm = async (config) => {
519
557
  if (!config.resignRequest) {
520
558
  throw new Error("Attribute 'resignRequest' is required");
@@ -11,12 +11,16 @@ 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'>;
15
+ pixQrButtonParams?: Omit<InitConfig['pixQrButtonParams'], 'containerId'>;
14
16
  googlePayContainerRef?: HTMLDivElement;
15
17
  applePayContainerRef?: HTMLDivElement;
16
18
  paypalContainerRef?: HTMLDivElement;
17
19
  pixContainerRef?: HTMLDivElement;
18
20
  bizumContainerRef?: HTMLDivElement;
19
21
  blikContainerRef?: HTMLDivElement;
22
+ mbwayContainerRef?: HTMLDivElement;
23
+ pixQrContainerRef?: HTMLDivElement;
20
24
  onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
21
25
  }
22
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'>(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.25.0",
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.25.0"
31
+ "@solidgate/client-sdk-loader": "^1.27.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/types": "^7.24.5",