@solidgate/vue-sdk 1.15.1 → 1.15.2
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 +59 -20
- package/dist/Resign.vue.d.ts +0 -2
- package/dist/index.es.js +2 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,23 +1,58 @@
|
|
|
1
1
|
# Solidgate Vue3 SDK
|
|
2
2
|
|
|
3
|
-
This is a wrapper for Solidgate Client SDK
|
|
3
|
+
This repository is a Vue 3 wrapper for the Solidgate Client Software Development Kit (SDK).
|
|
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.
|
|
6
|
+
|
|
7
|
+
Check our
|
|
8
|
+
* <a href="https://docs.solidgate.com/" target="_blank">Payment guide</a> to understand business value better
|
|
9
|
+
* <a href="https://api-docs.solidgate.com/" target="_blank">API Reference</a> to find more examples of usage
|
|
10
|
+
|
|
11
|
+
## Structure
|
|
12
|
+
|
|
13
|
+
<table style="width: 100%; background: transparent;">
|
|
14
|
+
<colgroup>
|
|
15
|
+
<col style="width: 50%;">
|
|
16
|
+
<col style="width: 50%;">
|
|
17
|
+
</colgroup>
|
|
18
|
+
<tr>
|
|
19
|
+
<th>SDK for Vue3 contains</th>
|
|
20
|
+
<th>Table of contents</th>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr>
|
|
23
|
+
<td>
|
|
24
|
+
<code>lib</code> – main Vue 3 SDK source code<br>
|
|
25
|
+
<code>public</code> – assets for example project<br>
|
|
26
|
+
<code>src</code> – entry point for example integration<br>
|
|
27
|
+
<code>package.json</code> – project metadata and dependency definitions
|
|
28
|
+
</td>
|
|
29
|
+
<td>
|
|
30
|
+
<a href="https://github.com/solidgate-tech/vue-sdk?tab=readme-ov-file#installation">Installation</a><br>
|
|
31
|
+
<a href="https://github.com/solidgate-tech/vue-sdk?tab=readme-ov-file#usage">Usage</a><br>
|
|
32
|
+
<a href="https://github.com/solidgate-tech/vue-sdk?tab=readme-ov-file#development-server">Development server</a><br>
|
|
33
|
+
<a href="https://github.com/solidgate-tech/vue-sdk?tab=readme-ov-file#build">Build</a>
|
|
34
|
+
</td>
|
|
35
|
+
</tr>
|
|
36
|
+
</table>
|
|
37
|
+
|
|
38
|
+
<br>
|
|
4
39
|
|
|
5
40
|
## Installation
|
|
6
41
|
|
|
7
|
-
Run inside
|
|
42
|
+
Run the following command inside your Vue 3 project:
|
|
8
43
|
|
|
9
44
|
```
|
|
10
45
|
npm i @solidgate/vue-sdk
|
|
11
46
|
```
|
|
12
47
|
|
|
48
|
+
<br>
|
|
49
|
+
|
|
13
50
|
## Usage
|
|
14
51
|
|
|
15
52
|
### Payment form
|
|
16
53
|
|
|
17
|
-
Render a payment component in your
|
|
54
|
+
Render a <a href="https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form/" target="_blank">payment form</a> component in your Vue3 project.
|
|
18
55
|
|
|
19
|
-
Component inputs and outputs are described in the docs
|
|
20
|
-
https://docs.solidgate.com/payments/integrate/payment-form/create-your-payment-form/
|
|
21
56
|
|
|
22
57
|
```vue
|
|
23
58
|
<template>
|
|
@@ -35,7 +70,10 @@ const merchantData: InitConfig['merchantData'] = {
|
|
|
35
70
|
</script>
|
|
36
71
|
```
|
|
37
72
|
|
|
38
|
-
|
|
73
|
+
#### Custom containers
|
|
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.
|
|
76
|
+
|
|
39
77
|
```vue
|
|
40
78
|
<template>
|
|
41
79
|
<Payment
|
|
@@ -68,10 +106,7 @@ const merchantData: InitConfig['merchantData'] = {
|
|
|
68
106
|
|
|
69
107
|
### Resign form
|
|
70
108
|
|
|
71
|
-
Render a resign component in your
|
|
72
|
-
|
|
73
|
-
Component inputs and outputs are described in the docs
|
|
74
|
-
https://docs.solidgate.com/payments/integrate/payment-form/resign-payment-form/
|
|
109
|
+
Render a <a href="https://docs.solidgate.com/payments/integrate/payment-form/resign-payment-form/" target="_blank">resign payment form</a> component in your Vue3 project.
|
|
75
110
|
|
|
76
111
|
```vue
|
|
77
112
|
<template>
|
|
@@ -89,18 +124,22 @@ const resignRequest: ResignRequest = {
|
|
|
89
124
|
</script>
|
|
90
125
|
```
|
|
91
126
|
|
|
92
|
-
|
|
127
|
+
<br>
|
|
93
128
|
|
|
94
|
-
|
|
95
|
-
2. npm i
|
|
96
|
-
3. npm run start
|
|
97
|
-
4. Navigate to `http://localhost:3000/`.
|
|
129
|
+
## Development server
|
|
98
130
|
|
|
99
|
-
|
|
131
|
+
Vue3 + Typescript + Vite
|
|
132
|
+
|
|
133
|
+
1. `cd vue-sdk`
|
|
134
|
+
2. `npm i`
|
|
135
|
+
3. `npm run start`
|
|
136
|
+
4. Navigate to http://localhost:3000/
|
|
100
137
|
|
|
101
|
-
|
|
102
|
-
2. npm run build
|
|
103
|
-
3. cd dist
|
|
104
|
-
4. solid-payment.es.js is a js bundle.
|
|
138
|
+
<br>
|
|
105
139
|
|
|
140
|
+
## Build
|
|
106
141
|
|
|
142
|
+
1. `cd vue-sdk`
|
|
143
|
+
2. `npm run build`
|
|
144
|
+
3. `cd dist`
|
|
145
|
+
4. solid-payment.es.js is a js bundle
|
package/dist/Resign.vue.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
resignCvvLabel: string;
|
|
16
16
|
resignCvvPlaceholder: string;
|
|
17
17
|
hideCvvNumbers: boolean;
|
|
18
|
-
cardBrandIconStyle: import("@solidgate/client-sdk-loader/dist/enums/CardBrandIconStyle").default;
|
|
19
18
|
}> | undefined;
|
|
20
19
|
styles?: Record<string, unknown> | undefined;
|
|
21
20
|
onReadyResignInstance?: ((resignInstance: ClientSdkInstance) => void) | undefined;
|
|
@@ -74,7 +73,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
74
73
|
resignCvvLabel: string;
|
|
75
74
|
resignCvvPlaceholder: string;
|
|
76
75
|
hideCvvNumbers: boolean;
|
|
77
|
-
cardBrandIconStyle: import("@solidgate/client-sdk-loader/dist/enums/CardBrandIconStyle").default;
|
|
78
76
|
}> | undefined;
|
|
79
77
|
styles?: Record<string, unknown> | undefined;
|
|
80
78
|
onReadyResignInstance?: ((resignInstance: ClientSdkInstance) => void) | undefined;
|
package/dist/index.es.js
CHANGED
|
@@ -63,7 +63,6 @@ var CardBrand$1 = {};
|
|
|
63
63
|
CardBrand3["Bancontact"] = "bancontact";
|
|
64
64
|
CardBrand3["Interac"] = "interac";
|
|
65
65
|
CardBrand3["Bajaj"] = "bajaj";
|
|
66
|
-
CardBrand3["Paypal"] = "paypal";
|
|
67
66
|
})(CardBrand2 = exports.CardBrand || (exports.CardBrand = {}));
|
|
68
67
|
exports.default = CardBrand2;
|
|
69
68
|
})(CardBrand$1);
|
|
@@ -168,15 +167,6 @@ var FormButtonType$1;
|
|
|
168
167
|
FormButtonType2["Continue"] = "continue";
|
|
169
168
|
})(FormButtonType$1 || (FormButtonType$1 = {}));
|
|
170
169
|
FormButtonType$2.default = FormButtonType$1;
|
|
171
|
-
var CardBrandIconStyle$2 = {};
|
|
172
|
-
Object.defineProperty(CardBrandIconStyle$2, "__esModule", { value: true });
|
|
173
|
-
var CardBrandIconStyle$1;
|
|
174
|
-
(function(CardBrandIconStyle2) {
|
|
175
|
-
CardBrandIconStyle2["MonochromeLight"] = "monochrome-light";
|
|
176
|
-
CardBrandIconStyle2["MonochromeDark"] = "monochrome-dark";
|
|
177
|
-
CardBrandIconStyle2["Colored"] = "colored";
|
|
178
|
-
})(CardBrandIconStyle$1 || (CardBrandIconStyle$1 = {}));
|
|
179
|
-
CardBrandIconStyle$2.default = CardBrandIconStyle$1;
|
|
180
170
|
var SdkLoader$2 = {};
|
|
181
171
|
var __classPrivateFieldGet = commonjsGlobal && commonjsGlobal.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
182
172
|
if (kind === "a" && !f)
|
|
@@ -236,7 +226,7 @@ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || functi
|
|
|
236
226
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
237
227
|
};
|
|
238
228
|
Object.defineProperty(dist, "__esModule", { value: true });
|
|
239
|
-
var FormType = dist.FormType = SdkLoader = dist.SdkLoader = CardBrand = dist.CardBrand = FieldName = dist.FieldName = MessageType = dist.MessageType =
|
|
229
|
+
var FormType = dist.FormType = SdkLoader = dist.SdkLoader = CardBrand = dist.CardBrand = FieldName = dist.FieldName = MessageType = dist.MessageType = SecureBrand = dist.SecureBrand = PayableEntity = dist.PayableEntity = FormButtonType = dist.FormButtonType = InteractionType = dist.InteractionType = AdditionalFieldName = dist.AdditionalFieldName = InteractionTargetType = dist.InteractionTargetType = void 0;
|
|
240
230
|
const MessageType_1 = __importDefault(MessageType$2);
|
|
241
231
|
var MessageType = dist.MessageType = MessageType_1.default;
|
|
242
232
|
const FieldName_1 = __importDefault(FieldName$2);
|
|
@@ -257,8 +247,6 @@ const AdditionalFieldName_1 = __importDefault(AdditionalFieldName$2);
|
|
|
257
247
|
var AdditionalFieldName = dist.AdditionalFieldName = AdditionalFieldName_1.default;
|
|
258
248
|
const FormButtonType_1 = __importDefault(FormButtonType$2);
|
|
259
249
|
var FormButtonType = dist.FormButtonType = FormButtonType_1.default;
|
|
260
|
-
const CardBrandIconStyle_1 = __importDefault(CardBrandIconStyle$2);
|
|
261
|
-
var CardBrandIconStyle = dist.CardBrandIconStyle = CardBrandIconStyle_1.default;
|
|
262
250
|
const SdkLoader_1 = __importDefault(SdkLoader$2);
|
|
263
251
|
var SdkLoader = dist.SdkLoader = SdkLoader_1.default;
|
|
264
252
|
const payButtonIds = {
|
|
@@ -630,4 +618,4 @@ const _sfc_main = defineComponent({
|
|
|
630
618
|
}
|
|
631
619
|
});
|
|
632
620
|
var Resign = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-77b30339"]]);
|
|
633
|
-
export { AdditionalFieldName, CardBrand,
|
|
621
|
+
export { AdditionalFieldName, CardBrand, FieldName, FormButtonType, FormType, InteractionTargetType, InteractionType, MessageType, PayableEntity, Resign, SdkLoader, SecureBrand, Payment as default };
|