@solidgate/vue-sdk 1.24.0 → 1.25.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
@@ -2,7 +2,7 @@
2
2
 
3
3
  This repository is a Vue 3 wrapper for the Solidgate Client Software Development Kit (SDK).
4
4
 
5
- It supports rendering payment forms and resign forms, including custom container elements for <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/paypal-button/" target="_blank">PayPal</a> buttons.
5
+ It supports rendering payment forms and resign forms, including custom container elements for <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 alternative payment method (<a href="https://docs.solidgate.com/payments/integrate/payment-form/apm-buttons/" target="_blank">APM</a>) buttons.
6
6
 
7
7
  Check our
8
8
  * <a href="https://docs.solidgate.com/" target="_blank">Payment guide</a> to understand business value better
@@ -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>, or <a href="https://docs.solidgate.com/payments/integrate/payment-form/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>, 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.
76
76
 
77
77
  ```vue
78
78
  <template>
@@ -88,19 +88,19 @@ To render <a href="https://docs.solidgate.com/payments/integrate/payment-form/go
88
88
  </template>
89
89
 
90
90
  <script lang="ts" setup>
91
- import { ref, defineAsyncComponent } from 'vue'
92
- import { InitConfig } from '@solidgate/vue-sdk'
93
- const Payment = defineAsyncComponent(() => import('@solidgate/vue-sdk'))
94
-
95
- const googleButton = ref<HTMLDivElement>()
96
- const appleButton = ref<HTMLDivElement>()
97
- const paypalButton = ref<HTMLDivElement>()
98
-
99
- const merchantData: InitConfig['merchantData'] = {
100
- merchant: '<<--YOUR MERCHANT ID-->>',
101
- signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
102
- paymentIntent: '<<--YOUR PAYMENT INTENT-->>'
103
- }
91
+ import { ref, defineAsyncComponent } from 'vue'
92
+ import { InitConfig } from '@solidgate/vue-sdk'
93
+ const Payment = defineAsyncComponent(() => import('@solidgate/vue-sdk'))
94
+
95
+ const googleButton = ref<HTMLDivElement>()
96
+ const appleButton = ref<HTMLDivElement>()
97
+ const paypalButton = ref<HTMLDivElement>()
98
+
99
+ const merchantData: InitConfig['merchantData'] = {
100
+ merchant: '<<--YOUR MERCHANT ID-->>',
101
+ signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
102
+ paymentIntent: '<<--YOUR PAYMENT INTENT-->>'
103
+ }
104
104
  </script>
105
105
  ```
106
106
 
@@ -114,13 +114,13 @@ Render a <a href="https://docs.solidgate.com/payments/integrate/payment-form/res
114
114
  </template>
115
115
 
116
116
  <script lang="ts" setup>
117
- import { Resign, ResignRequest } from '@solidgate/vue-sdk'
117
+ import { Resign, ResignRequest } from '@solidgate/vue-sdk'
118
118
 
119
- const resignRequest: ResignRequest = {
120
- merchant: '<<--YOUR MERCHANT ID-->>',
121
- signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
122
- resignIntent: '<<--YOUR RESIGN INTENT-->>'
123
- }
119
+ const resignRequest: ResignRequest = {
120
+ merchant: '<<--YOUR MERCHANT ID-->>',
121
+ signature: '<<--YOUR SIGNATURE OF THE REQUEST-->>',
122
+ resignIntent: '<<--YOUR RESIGN INTENT-->>'
123
+ }
124
124
  </script>
125
125
  ```
126
126
 
@@ -69,11 +69,18 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
69
69
  enabled?: boolean | undefined;
70
70
  height?: number | undefined;
71
71
  } | undefined, "containerId"> | undefined;
72
+ blikButtonParams?: Omit<{
73
+ containerId?: string | undefined;
74
+ enabled?: boolean | undefined;
75
+ theme?: "dark" | "light" | undefined;
76
+ height?: number | undefined;
77
+ } | undefined, "containerId"> | undefined;
72
78
  googlePayContainerRef?: HTMLDivElement | undefined;
73
79
  applePayContainerRef?: HTMLDivElement | undefined;
74
80
  paypalContainerRef?: HTMLDivElement | undefined;
75
81
  pixContainerRef?: HTMLDivElement | undefined;
76
82
  bizumContainerRef?: HTMLDivElement | undefined;
83
+ blikContainerRef?: HTMLDivElement | undefined;
77
84
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
78
85
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
79
86
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -185,11 +192,18 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
185
192
  enabled?: boolean | undefined;
186
193
  height?: number | undefined;
187
194
  } | undefined, "containerId"> | undefined;
195
+ blikButtonParams?: Omit<{
196
+ containerId?: string | undefined;
197
+ enabled?: boolean | undefined;
198
+ theme?: "dark" | "light" | undefined;
199
+ height?: number | undefined;
200
+ } | undefined, "containerId"> | undefined;
188
201
  googlePayContainerRef?: HTMLDivElement | undefined;
189
202
  applePayContainerRef?: HTMLDivElement | undefined;
190
203
  paypalContainerRef?: HTMLDivElement | undefined;
191
204
  pixContainerRef?: HTMLDivElement | undefined;
192
205
  bizumContainerRef?: HTMLDivElement | undefined;
206
+ blikContainerRef?: HTMLDivElement | undefined;
193
207
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
194
208
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
195
209
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -4,4 +4,5 @@ declare const APPLE_PAY_BUTTON_CONTAINER_ID: string;
4
4
  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
- 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 };
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 };
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .payment-form-container[data-v-728c7d1e] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
1
+ .payment-form-container[data-v-447888d8] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
package/dist/index.es.js CHANGED
@@ -5,6 +5,7 @@ const APPLE_PAY_BUTTON_CONTAINER_ID = `apple-pay-button-container_#${Math.random
5
5
  const PAYPAL_BUTTON_CONTAINER_ID = `paypal-button-container_#${Math.random() * 1e4}`;
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
+ const BLIK_BUTTON_CONTAINER_ID = `blik-button-container_#${Math.random() * 1e4}`;
8
9
  var MessageType;
9
10
  (function(MessageType2) {
10
11
  MessageType2["Mounted"] = "mounted";
@@ -85,6 +86,7 @@ var PayableEntity;
85
86
  PayableEntity2["Paypal"] = "paypal";
86
87
  PayableEntity2["Pix"] = "pix";
87
88
  PayableEntity2["Bizum"] = "bizum";
89
+ PayableEntity2["Blik"] = "blik";
88
90
  })(PayableEntity || (PayableEntity = {}));
89
91
  var PayableEntity$1 = PayableEntity;
90
92
  var InteractionType;
@@ -234,6 +236,10 @@ const payButtonIds = {
234
236
  bizumButtonParams: {
235
237
  title: "Bizum",
236
238
  id: BIZUM_BUTTON_CONTAINER_ID
239
+ },
240
+ blikButtonParams: {
241
+ title: "Blik",
242
+ id: BLIK_BUTTON_CONTAINER_ID
237
243
  }
238
244
  };
239
245
  function getPayButtonParams(config, key, container) {
@@ -267,7 +273,8 @@ const initPaymentForm = async (props) => {
267
273
  applePayContainerRef,
268
274
  paypalContainerRef,
269
275
  pixContainerRef,
270
- bizumContainerRef
276
+ bizumContainerRef,
277
+ blikContainerRef
271
278
  } = props;
272
279
  if (!merchantData) {
273
280
  throw new Error("Attribute 'merchantData' is required");
@@ -325,6 +332,14 @@ const initPaymentForm = async (props) => {
325
332
  if (bizumButtonParams) {
326
333
  initConfig.bizumButtonParams = bizumButtonParams;
327
334
  }
335
+ const blikButtonParams = getPayButtonParams(
336
+ props,
337
+ "blikButtonParams",
338
+ blikContainerRef
339
+ );
340
+ if (blikButtonParams) {
341
+ initConfig.blikButtonParams = blikButtonParams;
342
+ }
328
343
  return clientSdk.init(initConfig);
329
344
  };
330
345
  const onSubscribe = (sdkInstanceValue, callbacks) => {
@@ -399,11 +414,13 @@ const _sfc_main$1 = defineComponent({
399
414
  paypalButtonParams: {},
400
415
  pixButtonParams: {},
401
416
  bizumButtonParams: {},
417
+ blikButtonParams: {},
402
418
  googlePayContainerRef: {},
403
419
  applePayContainerRef: {},
404
420
  paypalContainerRef: {},
405
421
  pixContainerRef: {},
406
422
  bizumContainerRef: {},
423
+ blikContainerRef: {},
407
424
  onReadyPaymentInstance: {},
408
425
  onPaymentDetails: { type: Function, default: () => {
409
426
  } },
@@ -446,11 +463,13 @@ const _sfc_main$1 = defineComponent({
446
463
  paypalButtonParams: props.paypalButtonParams,
447
464
  pixButtonParams: props.pixButtonParams,
448
465
  bizumButtonParams: props.bizumButtonParams,
466
+ blikButtonParams: props.blikButtonParams,
449
467
  googlePayContainerRef: props.googlePayContainerRef,
450
468
  applePayContainerRef: props.applePayContainerRef,
451
469
  paypalContainerRef: props.paypalContainerRef,
452
470
  pixContainerRef: props.pixContainerRef,
453
- bizumContainerRef: props.bizumContainerRef
471
+ bizumContainerRef: props.bizumContainerRef,
472
+ blikContainerRef: props.blikContainerRef
454
473
  };
455
474
  const callbacks = {
456
475
  onMounted: (e) => props.onMounted && props.onMounted(e),
@@ -495,7 +514,7 @@ const _sfc_main$1 = defineComponent({
495
514
  };
496
515
  }
497
516
  });
498
- var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-728c7d1e"]]);
517
+ var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-447888d8"]]);
499
518
  const initResignForm = async (config) => {
500
519
  if (!config.resignRequest) {
501
520
  throw new Error("Attribute 'resignRequest' is required");
@@ -10,11 +10,13 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
10
10
  paypalButtonParams?: Omit<InitConfig['paypalButtonParams'], 'containerId'>;
11
11
  pixButtonParams?: Omit<InitConfig['pixButtonParams'], 'containerId'>;
12
12
  bizumButtonParams?: Omit<InitConfig['bizumButtonParams'], 'containerId'>;
13
+ blikButtonParams?: Omit<InitConfig['blikButtonParams'], 'containerId'>;
13
14
  googlePayContainerRef?: HTMLDivElement;
14
15
  applePayContainerRef?: HTMLDivElement;
15
16
  paypalContainerRef?: HTMLDivElement;
16
17
  pixContainerRef?: HTMLDivElement;
17
18
  bizumContainerRef?: HTMLDivElement;
19
+ blikContainerRef?: HTMLDivElement;
18
20
  onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
19
21
  }
20
22
  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'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
2
+ declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams' | 'blikButtonParams'>(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.24.0",
3
+ "version": "1.25.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.24.0"
31
+ "@solidgate/client-sdk-loader": "^1.25.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/types": "^7.24.5",