@solidgate/vue-sdk 1.21.0 → 1.23.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
@@ -142,4 +142,10 @@ Vue3 + Typescript + Vite
142
142
  1. `cd vue-sdk`
143
143
  2. `npm run build`
144
144
  3. `cd dist`
145
- 4. solid-payment.es.js is a js bundle
145
+ 4. solid-payment.es.js is a js bundle
146
+
147
+ ---
148
+
149
+ Looking for help? <a href="https://support.solidgate.com/support/tickets/new" target="_blank">Contact us</a> <br>
150
+ Want to contribute? <a href="https://github.com/solidgate-tech/vue-sdk/pulls" target="_blank">Submit a pull request</a>
151
+
@@ -59,9 +59,21 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
59
59
  label?: "paypal" | "checkout" | "buynow" | "pay" | "installment" | undefined;
60
60
  height?: number | undefined;
61
61
  } | undefined, "containerId"> | undefined;
62
+ pixButtonParams?: Omit<{
63
+ containerId?: string | undefined;
64
+ enabled?: boolean | undefined;
65
+ height?: number | undefined;
66
+ } | undefined, "containerId"> | undefined;
67
+ bizumButtonParams?: Omit<{
68
+ containerId?: string | undefined;
69
+ enabled?: boolean | undefined;
70
+ height?: number | undefined;
71
+ } | undefined, "containerId"> | undefined;
62
72
  googlePayContainerRef?: HTMLDivElement | undefined;
63
73
  applePayContainerRef?: HTMLDivElement | undefined;
64
74
  paypalContainerRef?: HTMLDivElement | undefined;
75
+ pixContainerRef?: HTMLDivElement | undefined;
76
+ bizumContainerRef?: HTMLDivElement | undefined;
65
77
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
66
78
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
67
79
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -163,9 +175,21 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
163
175
  label?: "paypal" | "checkout" | "buynow" | "pay" | "installment" | undefined;
164
176
  height?: number | undefined;
165
177
  } | undefined, "containerId"> | undefined;
178
+ pixButtonParams?: Omit<{
179
+ containerId?: string | undefined;
180
+ enabled?: boolean | undefined;
181
+ height?: number | undefined;
182
+ } | undefined, "containerId"> | undefined;
183
+ bizumButtonParams?: Omit<{
184
+ containerId?: string | undefined;
185
+ enabled?: boolean | undefined;
186
+ height?: number | undefined;
187
+ } | undefined, "containerId"> | undefined;
166
188
  googlePayContainerRef?: HTMLDivElement | undefined;
167
189
  applePayContainerRef?: HTMLDivElement | undefined;
168
190
  paypalContainerRef?: HTMLDivElement | undefined;
191
+ pixContainerRef?: HTMLDivElement | undefined;
192
+ bizumContainerRef?: HTMLDivElement | undefined;
169
193
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
170
194
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
171
195
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -2,4 +2,6 @@ declare const IFRAME_CONTAINER_ID: string;
2
2
  declare const GOOGLE_PAY_BUTTON_CONTAINER_ID: string;
3
3
  declare const APPLE_PAY_BUTTON_CONTAINER_ID: string;
4
4
  declare const PAYPAL_BUTTON_CONTAINER_ID: string;
5
- export { IFRAME_CONTAINER_ID, GOOGLE_PAY_BUTTON_CONTAINER_ID, APPLE_PAY_BUTTON_CONTAINER_ID, PAYPAL_BUTTON_CONTAINER_ID };
5
+ declare const PIX_BUTTON_CONTAINER_ID: string;
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 };
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .payment-form-container[data-v-66bd61ca] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
1
+ .payment-form-container[data-v-728c7d1e] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
package/dist/index.es.js CHANGED
@@ -3,6 +3,8 @@ import './index.css';const IFRAME_CONTAINER_ID = `solid-payment-form-container_#
3
3
  const GOOGLE_PAY_BUTTON_CONTAINER_ID = `google-pay-button-container_#${Math.random() * 1e4}`;
4
4
  const APPLE_PAY_BUTTON_CONTAINER_ID = `apple-pay-button-container_#${Math.random() * 1e4}`;
5
5
  const PAYPAL_BUTTON_CONTAINER_ID = `paypal-button-container_#${Math.random() * 1e4}`;
6
+ const PIX_BUTTON_CONTAINER_ID = `pix-button-container_#${Math.random() * 1e4}`;
7
+ const BIZUM_BUTTON_CONTAINER_ID = `bizum-button-container_#${Math.random() * 1e4}`;
6
8
  var MessageType;
7
9
  (function(MessageType2) {
8
10
  MessageType2["Mounted"] = "mounted";
@@ -82,6 +84,7 @@ var PayableEntity;
82
84
  PayableEntity2["Resign"] = "resign";
83
85
  PayableEntity2["Paypal"] = "paypal";
84
86
  PayableEntity2["Pix"] = "pix";
87
+ PayableEntity2["Bizum"] = "bizum";
85
88
  })(PayableEntity || (PayableEntity = {}));
86
89
  var PayableEntity$1 = PayableEntity;
87
90
  var InteractionType;
@@ -222,6 +225,14 @@ const payButtonIds = {
222
225
  paypalButtonParams: {
223
226
  title: "PayPal",
224
227
  id: PAYPAL_BUTTON_CONTAINER_ID
228
+ },
229
+ pixButtonParams: {
230
+ title: "Pix",
231
+ id: PIX_BUTTON_CONTAINER_ID
232
+ },
233
+ bizumButtonParams: {
234
+ title: "Bizum",
235
+ id: BIZUM_BUTTON_CONTAINER_ID
225
236
  }
226
237
  };
227
238
  function getPayButtonParams(config, key, container) {
@@ -253,7 +264,9 @@ const initPaymentForm = async (props) => {
253
264
  formParams,
254
265
  googlePayContainerRef,
255
266
  applePayContainerRef,
256
- paypalContainerRef
267
+ paypalContainerRef,
268
+ pixContainerRef,
269
+ bizumContainerRef
257
270
  } = props;
258
271
  if (!merchantData) {
259
272
  throw new Error("Attribute 'merchantData' is required");
@@ -295,6 +308,22 @@ const initPaymentForm = async (props) => {
295
308
  if (paypalButtonParams) {
296
309
  initConfig.paypalButtonParams = paypalButtonParams;
297
310
  }
311
+ const pixButtonParams = getPayButtonParams(
312
+ props,
313
+ "pixButtonParams",
314
+ pixContainerRef
315
+ );
316
+ if (pixButtonParams) {
317
+ initConfig.pixButtonParams = pixButtonParams;
318
+ }
319
+ const bizumButtonParams = getPayButtonParams(
320
+ props,
321
+ "bizumButtonParams",
322
+ bizumContainerRef
323
+ );
324
+ if (bizumButtonParams) {
325
+ initConfig.bizumButtonParams = bizumButtonParams;
326
+ }
298
327
  return clientSdk.init(initConfig);
299
328
  };
300
329
  const onSubscribe = (sdkInstanceValue, callbacks) => {
@@ -367,9 +396,13 @@ const _sfc_main$1 = defineComponent({
367
396
  googlePayButtonParams: {},
368
397
  applePayButtonParams: {},
369
398
  paypalButtonParams: {},
399
+ pixButtonParams: {},
400
+ bizumButtonParams: {},
370
401
  googlePayContainerRef: {},
371
402
  applePayContainerRef: {},
372
403
  paypalContainerRef: {},
404
+ pixContainerRef: {},
405
+ bizumContainerRef: {},
373
406
  onReadyPaymentInstance: {},
374
407
  onPaymentDetails: { type: Function, default: () => {
375
408
  } },
@@ -410,9 +443,13 @@ const _sfc_main$1 = defineComponent({
410
443
  googlePayButtonParams: props.googlePayButtonParams,
411
444
  applePayButtonParams: props.applePayButtonParams,
412
445
  paypalButtonParams: props.paypalButtonParams,
446
+ pixButtonParams: props.pixButtonParams,
447
+ bizumButtonParams: props.bizumButtonParams,
413
448
  googlePayContainerRef: props.googlePayContainerRef,
414
449
  applePayContainerRef: props.applePayContainerRef,
415
- paypalContainerRef: props.paypalContainerRef
450
+ paypalContainerRef: props.paypalContainerRef,
451
+ pixContainerRef: props.pixContainerRef,
452
+ bizumContainerRef: props.bizumContainerRef
416
453
  };
417
454
  const callbacks = {
418
455
  onMounted: (e) => props.onMounted && props.onMounted(e),
@@ -457,7 +494,7 @@ const _sfc_main$1 = defineComponent({
457
494
  };
458
495
  }
459
496
  });
460
- var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-66bd61ca"]]);
497
+ var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-728c7d1e"]]);
461
498
  const initResignForm = async (config) => {
462
499
  if (!config.resignRequest) {
463
500
  throw new Error("Attribute 'resignRequest' is required");
@@ -8,9 +8,13 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
8
8
  googlePayButtonParams?: Omit<InitConfig['googlePayButtonParams'], 'containerId'>;
9
9
  applePayButtonParams?: Omit<InitConfig['applePayButtonParams'], 'containerId'>;
10
10
  paypalButtonParams?: Omit<InitConfig['paypalButtonParams'], 'containerId'>;
11
+ pixButtonParams?: Omit<InitConfig['pixButtonParams'], 'containerId'>;
12
+ bizumButtonParams?: Omit<InitConfig['bizumButtonParams'], 'containerId'>;
11
13
  googlePayContainerRef?: HTMLDivElement;
12
14
  applePayContainerRef?: HTMLDivElement;
13
15
  paypalContainerRef?: HTMLDivElement;
16
+ pixContainerRef?: HTMLDivElement;
17
+ bizumContainerRef?: HTMLDivElement;
14
18
  onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
15
19
  }
16
20
  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'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
2
+ declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams'>(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.21.0",
3
+ "version": "1.23.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.21.0"
31
+ "@solidgate/client-sdk-loader": "^1.23.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/types": "^7.24.5",