@paydock/client-sdk 1.108.1 → 1.108.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 +29 -1
- package/bundles/index.cjs +28425 -7291
- package/bundles/index.cjs.d.ts +71 -5
- package/bundles/index.mjs +28425 -7291
- package/bundles/index.mjs.d.ts +71 -5
- package/bundles/types/api/api-base.d.ts +14 -6
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts +2 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -1
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts +4 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts +3 -3
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -1
- package/bundles/types/components/http-core.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +1 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/shared/http/http-request.d.ts +14 -0
- package/bundles/types/shared/http/http-request.d.ts.map +1 -0
- package/bundles/types/shared/http/index.d.ts +2 -0
- package/bundles/types/shared/http/index.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts +4 -4
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/index.d.ts +1 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +3 -3
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +28425 -7291
- package/bundles/widget.umd.js.d.ts +71 -5
- package/bundles/widget.umd.js.min.d.ts +71 -5
- package/bundles/widget.umd.min.js +61 -2
- package/docs/wallet-buttons-examples.md +28 -1
- package/docs/wallet-buttons.md +1 -0
- package/examples/multi-html-widget/simple.html +2 -1
- package/package.json +21 -17
- package/slate.md +28 -1
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs.map +0 -1
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.min.js.map +0 -1
|
@@ -47,7 +47,7 @@ var button = new WalletButtons(
|
|
|
47
47
|
button.load();
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Flypay
|
|
50
|
+
Flypay and Paypal wallets do not require any meta sent to the wallet, so the following is enough for initialization:
|
|
51
51
|
```javascript
|
|
52
52
|
let button = new paydock.WalletButtons(
|
|
53
53
|
"#widget",
|
|
@@ -95,6 +95,32 @@ var button = new WalletButtons(
|
|
|
95
95
|
button.load();
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
For Flypay v2 wallet, the client_id is required:
|
|
99
|
+
```javascript
|
|
100
|
+
let button = new paydock.WalletButtons(
|
|
101
|
+
"#widget",
|
|
102
|
+
token,
|
|
103
|
+
{
|
|
104
|
+
client_id: "client_id",
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
button.load();
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```javascript
|
|
111
|
+
// ES2015 | TypeScript
|
|
112
|
+
import { WalletButtons } from '@paydock/client-sdk';
|
|
113
|
+
|
|
114
|
+
var button = new WalletButtons(
|
|
115
|
+
'#widget',
|
|
116
|
+
token,
|
|
117
|
+
{
|
|
118
|
+
client_id: "client_id",
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
button.load();
|
|
122
|
+
```
|
|
123
|
+
|
|
98
124
|
### Setting environment
|
|
99
125
|
|
|
100
126
|
Current method can change environment. By default environment = sandbox.
|
|
@@ -395,6 +421,7 @@ _(Required `meta` fields: - . Optional `meta` fields: -)_
|
|
|
395
421
|
{
|
|
396
422
|
access_token: 'TOKEN',
|
|
397
423
|
refresh_token: 'TOKEN',
|
|
424
|
+
client_id: 'CLIENT_ID',
|
|
398
425
|
},
|
|
399
426
|
);
|
|
400
427
|
button.setEnv('sandbox');
|
package/docs/wallet-buttons.md
CHANGED
|
@@ -170,6 +170,7 @@ Interface of data used by the wallet checkout and payment proccess.
|
|
|
170
170
|
| [style.button_type] | <code>object</code> | Used to select ApplePay button type (e.g: 'buy','donate', etc), check possible values at https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_css. Also select button type for GooglePay (check GooglePayStyles) and Afterpay (check AfterpayStyles). Optional for [ApplePay, GooglePay, Afterpay]. N/A for other wallets. |
|
|
171
171
|
| [style.height] | <code>object</code> | Used to select Afterpay button height. Optional for [Afterpay]. N/A for other wallets. |
|
|
172
172
|
| [wallets] | <code>array</code> | By default if this is not sent or empty, we will try to show either Apple Pay or Google Pay buttons. This can be limited sending the following array in this field: ['apple','google]. Optional for [Stripe, ApplePay, GooglePay]. N/A for other wallets. |
|
|
173
|
+
| [client_id] | <code>string</code> | Client ID to be used in the provider system. Required for [Flypay V2]. N/A for [FlyPay, GooglePay, ApplePay, PayPal, Afterpay]. |
|
|
173
174
|
|
|
174
175
|
<a name="IApplePayShippingOption" id="IApplePayShippingOption" href="#IApplePayShippingOption"> </a>
|
|
175
176
|
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
<div id="widget"></div>
|
|
18
18
|
|
|
19
|
-
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
19
|
+
<!-- <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script> -->
|
|
20
|
+
<script src="../../bundles/widget.umd.js" ></script>
|
|
20
21
|
|
|
21
22
|
<script>
|
|
22
23
|
var card = new paydock.Configuration('5c77d21fb8d0ce13df9bce3f');
|
package/package.json
CHANGED
|
@@ -104,10 +104,11 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"name": "@paydock/client-sdk",
|
|
107
|
-
"version": "1.108.
|
|
107
|
+
"version": "1.108.2",
|
|
108
108
|
"scripts": {
|
|
109
109
|
"build:doc": "node docs/html/marked.js",
|
|
110
110
|
"build:js": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
111
|
+
"bundle:js:local": "npm run bundle:js && npm run replace:hosts",
|
|
111
112
|
"bundle:css": "grunt replace:css",
|
|
112
113
|
"bundle:html": "grunt replace:html",
|
|
113
114
|
"bundle:js": "run-s clean:bundles build:js",
|
|
@@ -128,10 +129,14 @@
|
|
|
128
129
|
"test": "run-s test:chromium",
|
|
129
130
|
"tsc:cba": "tsc --project tsconfig.cba.json",
|
|
130
131
|
"tsc:paydock": "tsc --project tsconfig.paydock.json",
|
|
131
|
-
"
|
|
132
|
+
"tidy:ci": "biome ci --no-errors-on-unmatched .",
|
|
133
|
+
"tidy:precommit": "biome ci --no-errors-on-unmatched --changed .",
|
|
134
|
+
"tidy": "biome check --apply --formatter-enabled=true --linter-enabled=true --organize-imports-enabled=true --no-errors-on-unmatched .",
|
|
135
|
+
"typecheck": "tsc --project tsconfig.json --noEmit"
|
|
132
136
|
},
|
|
133
137
|
"dependencies": {
|
|
134
|
-
"@auspayplus/open-payments-checkout": "1.
|
|
138
|
+
"@auspayplus/open-payments-checkout": "1.8.0",
|
|
139
|
+
"@newrelic/browser-agent": "^1.260.1",
|
|
135
140
|
"@stripe/stripe-js": "^1.11.0"
|
|
136
141
|
},
|
|
137
142
|
"devDependencies": {
|
|
@@ -145,6 +150,7 @@
|
|
|
145
150
|
"@babel/preset-env": "^7.24.0",
|
|
146
151
|
"@babel/runtime": "^7.24.0",
|
|
147
152
|
"@babel/runtime-corejs2": "^7.24.0",
|
|
153
|
+
"@biomejs/biome": "^1.7.3",
|
|
148
154
|
"@rollup/plugin-babel": "^6.0.4",
|
|
149
155
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
150
156
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -162,9 +168,10 @@
|
|
|
162
168
|
"babelify": "^10.0.0",
|
|
163
169
|
"base64-js": "^1.2.0",
|
|
164
170
|
"browser-resolve": "^1.11.2",
|
|
165
|
-
"browserify": "^
|
|
171
|
+
"browserify": "^17.0.0",
|
|
166
172
|
"browserify-istanbul": "^2.0.0",
|
|
167
173
|
"buffer": "^5.0.5",
|
|
174
|
+
"dotenv": "^16.4.5",
|
|
168
175
|
"fs": "0.0.2",
|
|
169
176
|
"grunt": "^1.6.1",
|
|
170
177
|
"grunt-cli": "^1.2.0",
|
|
@@ -173,7 +180,7 @@
|
|
|
173
180
|
"grunt-template-render": "0.0.1",
|
|
174
181
|
"highlight.js": "^11.5.1",
|
|
175
182
|
"ieee754": "^1.1.8",
|
|
176
|
-
"include-all": "^0.
|
|
183
|
+
"include-all": "^4.0.3",
|
|
177
184
|
"jasmine-ajax": "^3.3.1",
|
|
178
185
|
"jasmine-core": "^2.5.2",
|
|
179
186
|
"jquery": "^3.2.1",
|
|
@@ -187,33 +194,30 @@
|
|
|
187
194
|
"karma-jasmine-ajax": "^0.1.13",
|
|
188
195
|
"karma-mocha-reporter": "^2.2.2",
|
|
189
196
|
"marked": "^4.0.14",
|
|
190
|
-
"npm-run-
|
|
197
|
+
"npm-run-all2": "^6.2.0",
|
|
191
198
|
"process": "^0.11.9",
|
|
192
199
|
"rimraf": "^5.0.5",
|
|
193
|
-
"rollup": "^4.
|
|
200
|
+
"rollup": "^4.17.2",
|
|
194
201
|
"rollup-plugin-dts": "^6.1.0",
|
|
195
202
|
"tsify": "^3.0.1",
|
|
196
203
|
"tslib": "^2.6.2",
|
|
197
204
|
"tslint": "^5.8.0",
|
|
198
|
-
"typescript": "^4.
|
|
205
|
+
"typescript": "^5.4.5",
|
|
199
206
|
"zod": "^3.22.4"
|
|
200
207
|
},
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"chokidar": {
|
|
204
|
-
"fsevents": {
|
|
205
|
-
"minimist": "^1.2.6"
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
208
|
+
"engines": {
|
|
209
|
+
"node": ">=16.0.0"
|
|
209
210
|
},
|
|
210
211
|
"license": "UNLICENSED",
|
|
211
212
|
"keywords": [
|
|
212
213
|
"client-sdk",
|
|
213
214
|
"es2015",
|
|
215
|
+
"umd",
|
|
216
|
+
"cjs",
|
|
217
|
+
"esm",
|
|
214
218
|
"paydock",
|
|
215
219
|
"sdk",
|
|
216
|
-
"
|
|
220
|
+
"typescript",
|
|
217
221
|
"widget"
|
|
218
222
|
]
|
|
219
223
|
}
|
package/slate.md
CHANGED
|
@@ -1103,7 +1103,7 @@ var button = new WalletButtons(
|
|
|
1103
1103
|
button.load();
|
|
1104
1104
|
```
|
|
1105
1105
|
|
|
1106
|
-
Flypay
|
|
1106
|
+
Flypay and Paypal wallets do not require any meta sent to the wallet, so the following is enough for initialization:
|
|
1107
1107
|
```javascript
|
|
1108
1108
|
let button = new paydock.WalletButtons(
|
|
1109
1109
|
"#widget",
|
|
@@ -1151,6 +1151,32 @@ var button = new WalletButtons(
|
|
|
1151
1151
|
button.load();
|
|
1152
1152
|
```
|
|
1153
1153
|
|
|
1154
|
+
For Flypay v2 wallet, the client_id is required:
|
|
1155
|
+
```javascript
|
|
1156
|
+
let button = new paydock.WalletButtons(
|
|
1157
|
+
"#widget",
|
|
1158
|
+
token,
|
|
1159
|
+
{
|
|
1160
|
+
client_id: "client_id",
|
|
1161
|
+
}
|
|
1162
|
+
);
|
|
1163
|
+
button.load();
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
```javascript
|
|
1167
|
+
// ES2015 | TypeScript
|
|
1168
|
+
import { WalletButtons } from '@paydock/client-sdk';
|
|
1169
|
+
|
|
1170
|
+
var button = new WalletButtons(
|
|
1171
|
+
'#widget',
|
|
1172
|
+
token,
|
|
1173
|
+
{
|
|
1174
|
+
client_id: "client_id",
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
button.load();
|
|
1178
|
+
```
|
|
1179
|
+
|
|
1154
1180
|
### Setting environment
|
|
1155
1181
|
|
|
1156
1182
|
Current method can change environment. By default environment = sandbox.
|
|
@@ -1451,6 +1477,7 @@ _(Required `meta` fields: - . Optional `meta` fields: -)_
|
|
|
1451
1477
|
{
|
|
1452
1478
|
access_token: 'TOKEN',
|
|
1453
1479
|
refresh_token: 'TOKEN',
|
|
1480
|
+
client_id: 'CLIENT_ID',
|
|
1454
1481
|
},
|
|
1455
1482
|
);
|
|
1456
1483
|
button.setEnv('sandbox');
|