@payfurl/client 4.9.10 → 4.10.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/CHANGELOG.md +109 -0
- package/README.md +183 -42
- package/dist/sdk/{CloseIcon-DhsqodgI.js → CloseIcon-B65NDIbM.js} +2 -2
- package/dist/sdk/{DefaultThreeDsProvider-qhlEMnGb.js → DefaultThreeDsProvider-CzqbXEws.js} +1 -1
- package/dist/sdk/{MetricsGlobalThreeDsProvider-BOEA6G5r.js → MetricsGlobalThreeDsProvider-B-EQQsEV.js} +18 -18
- package/dist/sdk/{PayWayAppleButton-ziK0EEr8.js → PayWayAppleButton-C-XfcgNS.js} +1 -1
- package/dist/sdk/{alerts-2ShoA1hc.js → alerts-BvNnAm_q.js} +1 -1
- package/dist/sdk/{cxpay-B2_DeDZt.js → cxpay-VbaQA3_P.js} +1 -1
- package/dist/sdk/{default-2G4dbyeg.js → default-Diji0SXY.js} +1 -1
- package/dist/sdk/{ecentric-kLMDhKl_.js → ecentric-BlNDCZo_.js} +18 -17
- package/dist/sdk/{epna-p_tBGPK3.js → epna-CxmJ_mqR.js} +1 -1
- package/dist/sdk/{flashbanc-ChTsnYMc.js → flashbanc-BAxvqtBB.js} +1 -1
- package/dist/sdk/{forter-BKH-4F0d.js → forter-R2alfHeE.js} +8 -8
- package/dist/sdk/{gpayments-Sa7Ek9FT.js → gpayments-B5KWQV4S.js} +13 -13
- package/dist/sdk/{metrics_global-CxURr43F.js → metrics_global-HMMDzPlb.js} +1 -1
- package/dist/sdk/{nmi-Bq5IGnP2.js → nmi-Ch7qQ6Av.js} +1 -1
- package/dist/sdk/{nuvei-BDdU_s1G.js → nuvei-DRmlfpTL.js} +4 -4
- package/dist/sdk/{payabli-4-XnuYBw.js → payabli-CiBJ1-vC.js} +1 -1
- package/dist/sdk/payfurl.d.ts +439 -0
- package/dist/sdk/payfurl.es.js +1524 -1527
- package/dist/sdk/payfurl.umd.js +8 -8
- package/dist/sdk/{payglocal-9n0hrZAf.js → payglocal-uAPlijwL.js} +38 -37
- package/dist/sdk/{payway_rest-vCmhadiN.js → payway_rest-CjgIP42z.js} +1 -1
- package/dist/sdk/redact-Bn_hfytX.js +46 -0
- package/dist/sdk/{skybank-BIJrZVJd.js → skybank-D7uRF17E.js} +1 -1
- package/dist/sdk/{strings-ahZ6LOKg.js → strings-BthDdeA6.js} +18 -14
- package/dist/sdk/style.css +1 -1
- package/package.json +9 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
What changed in each version of the payFURL Client SDK. The `@payfurl/client` npm package and the
|
|
4
|
+
script on `assets.payfurl.com` share version numbers, so this covers both. The changelog starts with
|
|
5
|
+
version 4.9.3.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 4.10.0 (2026-11-04)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- TypeScript types. The package now includes type definitions for every method, option and handler,
|
|
14
|
+
so your editor suggests them and the TypeScript compiler checks your calls. Import the types by
|
|
15
|
+
name, for example `import payfurl, { type DropInOptionsType, type SuccessResponseType } from "@payfurl/client"`.
|
|
16
|
+
- `setCurrency()` changes the currency of the card, Google Pay, Apple Pay and saved payment method
|
|
17
|
+
components already on the page, as `setAmount()` does for the amount. Add PayPal, PayTo and Checkout
|
|
18
|
+
components again for a new currency.
|
|
19
|
+
- `@payfurl/react-plugin` and `@payfurl/vue-plugin` 1.4.0 use these types for their props and events,
|
|
20
|
+
and their own type definitions now load.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Google Pay errors now reach your failure handler. Closing the Google Pay sheet is still not a
|
|
25
|
+
failure.
|
|
26
|
+
- The close button of the Ecentric 3-D Secure challenge now closes it.
|
|
27
|
+
- `@payfurl/react-plugin` 1.4.0: `PayfurlDropin` no longer fails when it mounts, and no longer rebuilds
|
|
28
|
+
the drop-in, losing what the shopper typed, each time its parent re-renders. A new `amount` or
|
|
29
|
+
`successMessage` updates the drop-in in place.
|
|
30
|
+
|
|
31
|
+
## 4.9.10 (2026-10-29)
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Forter fraud screening for Google Pay and Apple Pay payments, on accounts that use Forter.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- When you add several components at once, each now uses its own options and provider. A component
|
|
40
|
+
added while another was still loading used to take the first one's.
|
|
41
|
+
- The loading spinner no longer reappears after a failed Forter 3-D Secure challenge.
|
|
42
|
+
|
|
43
|
+
## 4.9.9 (2026-10-25)
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- PayID through Azupay now appears in the Drop In UI. A Drop In with PayID as its only payment method
|
|
48
|
+
never finished loading.
|
|
49
|
+
|
|
50
|
+
## 4.9.8 (2026-10-22)
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- Forter fraud screening for `tokeniseWith3Ds`, `tokeniseCard`, `addThreeDsWithToken` and
|
|
55
|
+
`addSavedPaymentMethods`, on accounts that use Forter. A payment that Forter declines stops when your
|
|
56
|
+
account is set to stop declined payments.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- PayPal payments on accounts that use Forter no longer fail at the fraud check.
|
|
61
|
+
- A card that skips 3-D Secure through network token authentication still gets the fraud check.
|
|
62
|
+
- A payment no longer waits forever when the fraud check or a Forter 3-D Secure result never answers:
|
|
63
|
+
your failure handler is called instead.
|
|
64
|
+
|
|
65
|
+
## 4.9.7 (2026-10-21)
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- A Forter 3-D Secure challenge no longer fails when Forter's script loads after the challenge starts.
|
|
70
|
+
|
|
71
|
+
## 4.9.6 (2026-10-19)
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- Google Pay for CyberSource and NAB Gateway.
|
|
76
|
+
- The `billingDetailsRequired` Google Pay option, for `addGooglePay` and the Drop In's
|
|
77
|
+
`googlePayOptions`: `true` asks the shopper for their email address and full billing address.
|
|
78
|
+
CyberSource and NAB Gateway need it unless you pass the customer's name, email and billing address
|
|
79
|
+
yourself.
|
|
80
|
+
|
|
81
|
+
## 4.9.5 (2026-10-13)
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
|
|
85
|
+
- Internal improvements. Nothing changes in how you use the SDK.
|
|
86
|
+
|
|
87
|
+
## 4.9.4 (2026-10-12)
|
|
88
|
+
|
|
89
|
+
### Security
|
|
90
|
+
|
|
91
|
+
- 3-D Secure on a saved card token (`addThreeDsWithToken`) no longer brings the card's details into the
|
|
92
|
+
browser: it runs on the card your gateway stores.
|
|
93
|
+
|
|
94
|
+
### Fixed
|
|
95
|
+
|
|
96
|
+
- Nuvei 3-D Secure stops after it reports a failure, instead of opening the challenge as well.
|
|
97
|
+
|
|
98
|
+
## 4.9.3 (2026-10-08)
|
|
99
|
+
|
|
100
|
+
### Added
|
|
101
|
+
|
|
102
|
+
- The Apple Pay button now appears in Chrome, Firefox and Edge, where Apple lets shoppers pay with
|
|
103
|
+
their iPhone. It used to appear in Safari only.
|
|
104
|
+
- Forter as a 3-D Secure provider on its own, without Forter fraud screening.
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
|
|
108
|
+
- A Forter 3-D Secure challenge whose result is anything but a success now fails the payment.
|
|
109
|
+
- Forter's scripts use your account's Forter site ID.
|
package/README.md
CHANGED
|
@@ -1,65 +1,206 @@
|
|
|
1
|
-
#
|
|
1
|
+
# payFURL Client SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Collect payment details in the browser and turn them into a payFURL payment token that your server
|
|
4
|
+
charges through the [payFURL API](https://docs.payfurl.com/guides). Cards, PayPal, Google Pay, Apple
|
|
5
|
+
Pay, PayTo, Click to Pay and more, through one integration.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The payment token is added as a hidden input to the form. For PayPal or Buy Now Pay Later payments, the payment details are converted to a transactionId, which is also added as a hidden input to the form.
|
|
8
|
-
Payment detail collection is triggered when the form is submitted.
|
|
7
|
+
Card details are typed into fields that payFURL hosts in an iframe, so card numbers never reach your
|
|
8
|
+
page's code.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
[Documentation](https://docs.payfurl.com/client_sdk/overview) ·
|
|
11
|
+
[API reference](https://docs.payfurl.com/client_sdk/reference) ·
|
|
12
|
+
[Changelog](https://docs.payfurl.com/client_sdk/changelog) ·
|
|
13
|
+
[Support](https://docs.payfurl.com/support)
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## Install
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
```bash
|
|
18
|
+
npm install @payfurl/client
|
|
19
|
+
```
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
To load the SDK from a `<script>` tag instead, see
|
|
22
|
+
[Get started](https://docs.payfurl.com/client_sdk/get_started).
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
import payfurl from '@payfurl/client';
|
|
22
|
-
```
|
|
24
|
+
## Quick start
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Add a container inside your payment form:
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
```html
|
|
29
|
+
<form method="POST" action="/pay">
|
|
30
|
+
<div id="payment"></div>
|
|
31
|
+
<button type="submit">Pay</button>
|
|
32
|
+
</form>
|
|
33
|
+
```
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const pf = payfurl.init(
|
|
31
|
-
"sandbox", // environment name
|
|
32
|
-
"<public-key>", // your public key
|
|
33
|
-
true // enable debug mode
|
|
34
|
-
);
|
|
35
|
-
```
|
|
35
|
+
Then add the Drop In UI, which shows every payment method your account has for the amount and
|
|
36
|
+
currency:
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
```javascript
|
|
39
|
+
import payfurl from "@payfurl/client";
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
payfurl
|
|
42
|
+
.init("sandbox", "<your public key>")
|
|
43
|
+
.addDropIn("payment", 20, "AUD");
|
|
44
|
+
```
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
When the shopper submits the form, the SDK collects the payment details, adds the result to the form
|
|
47
|
+
as a hidden input, and submits it to your server: `token` for a card, `transactionId` for PayPal and
|
|
48
|
+
other payment types that complete the payment themselves. To keep the shopper on the page, handle the
|
|
49
|
+
result yourself:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
payfurl
|
|
53
|
+
.onSuccess((message) => {
|
|
54
|
+
// message.token for a card, message.transactionId for PayPal and other payment types
|
|
55
|
+
// that complete the payment themselves
|
|
56
|
+
})
|
|
57
|
+
.onFailure((message) => console.error(message.error));
|
|
58
|
+
```
|
|
44
59
|
|
|
45
|
-
|
|
60
|
+
Your public key is on **Account Info** in the payFURL dashboard. Use `"production"` and a production
|
|
61
|
+
key to go live.
|
|
46
62
|
|
|
47
|
-
|
|
48
|
-
npm install
|
|
49
|
-
```
|
|
63
|
+
## Payment methods
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
| Method | Adds |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `addDropIn` | Every payment method on your account, in one component |
|
|
68
|
+
| `addCard` | A card form |
|
|
69
|
+
| `addPaypal` | PayPal buttons |
|
|
70
|
+
| `addGooglePay` | A Google Pay button |
|
|
71
|
+
| `addApplePay` | An Apple Pay button |
|
|
72
|
+
| `addPayTo` | A PayTo agreement form |
|
|
73
|
+
| `addCheckout` | A third-party checkout, such as Afterpay or Affirm |
|
|
74
|
+
| `addSavedPaymentMethods` | A customer's saved cards |
|
|
52
75
|
|
|
53
|
-
|
|
76
|
+
Each has its own page in the [documentation](https://docs.payfurl.com/client_sdk/overview), with its
|
|
77
|
+
options.
|
|
54
78
|
|
|
55
|
-
|
|
56
|
-
|
|
79
|
+
## TypeScript
|
|
80
|
+
|
|
81
|
+
The package includes its type definitions. Every option type can be imported by name:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import payfurl, { type DropInOptionsType, type SuccessResponseType } from "@payfurl/client";
|
|
85
|
+
|
|
86
|
+
const options: DropInOptionsType = { allowedPaymentTypes: ["card", "googlepay"] };
|
|
87
|
+
payfurl.init("sandbox", "<your public key>")
|
|
88
|
+
.addDropIn("payment", 20, "AUD", options)
|
|
89
|
+
.onSuccess((message: SuccessResponseType) => console.log(message.token));
|
|
57
90
|
```
|
|
58
91
|
|
|
59
|
-
|
|
92
|
+
## React and Vue
|
|
93
|
+
|
|
94
|
+
[`@payfurl/react-plugin`](https://www.npmjs.com/package/@payfurl/react-plugin) and
|
|
95
|
+
[`@payfurl/vue-plugin`](https://www.npmjs.com/package/@payfurl/vue-plugin) wrap the Drop In UI in a
|
|
96
|
+
component: see [React](https://docs.payfurl.com/client_sdk/frameworks/react) and
|
|
97
|
+
[Vue](https://docs.payfurl.com/client_sdk/frameworks/vue).
|
|
98
|
+
|
|
99
|
+
## Changelog
|
|
100
|
+
|
|
101
|
+
What changed in each version of the payFURL Client SDK. The `@payfurl/client` npm package and the
|
|
102
|
+
script on `assets.payfurl.com` share version numbers, so this covers both. The changelog starts with
|
|
103
|
+
version 4.9.3.
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### 4.10.0 (2026-11-04)
|
|
107
|
+
|
|
108
|
+
#### Added
|
|
109
|
+
|
|
110
|
+
- TypeScript types. The package now includes type definitions for every method, option and handler,
|
|
111
|
+
so your editor suggests them and the TypeScript compiler checks your calls. Import the types by
|
|
112
|
+
name, for example `import payfurl, { type DropInOptionsType, type SuccessResponseType } from "@payfurl/client"`.
|
|
113
|
+
- `setCurrency()` changes the currency of the card, Google Pay, Apple Pay and saved payment method
|
|
114
|
+
components already on the page, as `setAmount()` does for the amount. Add PayPal, PayTo and Checkout
|
|
115
|
+
components again for a new currency.
|
|
116
|
+
- `@payfurl/react-plugin` and `@payfurl/vue-plugin` 1.4.0 use these types for their props and events,
|
|
117
|
+
and their own type definitions now load.
|
|
118
|
+
|
|
119
|
+
#### Fixed
|
|
120
|
+
|
|
121
|
+
- Google Pay errors now reach your failure handler. Closing the Google Pay sheet is still not a
|
|
122
|
+
failure.
|
|
123
|
+
- The close button of the Ecentric 3-D Secure challenge now closes it.
|
|
124
|
+
- `@payfurl/react-plugin` 1.4.0: `PayfurlDropin` no longer fails when it mounts, and no longer rebuilds
|
|
125
|
+
the drop-in, losing what the shopper typed, each time its parent re-renders. A new `amount` or
|
|
126
|
+
`successMessage` updates the drop-in in place.
|
|
127
|
+
|
|
128
|
+
### 4.9.10 (2026-10-29)
|
|
129
|
+
|
|
130
|
+
#### Added
|
|
131
|
+
|
|
132
|
+
- Forter fraud screening for Google Pay and Apple Pay payments, on accounts that use Forter.
|
|
133
|
+
|
|
134
|
+
#### Fixed
|
|
135
|
+
|
|
136
|
+
- When you add several components at once, each now uses its own options and provider. A component
|
|
137
|
+
added while another was still loading used to take the first one's.
|
|
138
|
+
- The loading spinner no longer reappears after a failed Forter 3-D Secure challenge.
|
|
139
|
+
|
|
140
|
+
### 4.9.9 (2026-10-25)
|
|
141
|
+
|
|
142
|
+
#### Fixed
|
|
143
|
+
|
|
144
|
+
- PayID through Azupay now appears in the Drop In UI. A Drop In with PayID as its only payment method
|
|
145
|
+
never finished loading.
|
|
146
|
+
|
|
147
|
+
### 4.9.8 (2026-10-22)
|
|
148
|
+
|
|
149
|
+
#### Added
|
|
150
|
+
|
|
151
|
+
- Forter fraud screening for `tokeniseWith3Ds`, `tokeniseCard`, `addThreeDsWithToken` and
|
|
152
|
+
`addSavedPaymentMethods`, on accounts that use Forter. A payment that Forter declines stops when your
|
|
153
|
+
account is set to stop declined payments.
|
|
154
|
+
|
|
155
|
+
#### Fixed
|
|
156
|
+
|
|
157
|
+
- PayPal payments on accounts that use Forter no longer fail at the fraud check.
|
|
158
|
+
- A card that skips 3-D Secure through network token authentication still gets the fraud check.
|
|
159
|
+
- A payment no longer waits forever when the fraud check or a Forter 3-D Secure result never answers:
|
|
160
|
+
your failure handler is called instead.
|
|
161
|
+
|
|
162
|
+
### 4.9.7 (2026-10-21)
|
|
163
|
+
|
|
164
|
+
#### Fixed
|
|
165
|
+
|
|
166
|
+
- A Forter 3-D Secure challenge no longer fails when Forter's script loads after the challenge starts.
|
|
167
|
+
|
|
168
|
+
### 4.9.6 (2026-10-19)
|
|
169
|
+
|
|
170
|
+
#### Added
|
|
171
|
+
|
|
172
|
+
- Google Pay for CyberSource and NAB Gateway.
|
|
173
|
+
- The `billingDetailsRequired` Google Pay option, for `addGooglePay` and the Drop In's
|
|
174
|
+
`googlePayOptions`: `true` asks the shopper for their email address and full billing address.
|
|
175
|
+
CyberSource and NAB Gateway need it unless you pass the customer's name, email and billing address
|
|
176
|
+
yourself.
|
|
177
|
+
|
|
178
|
+
### 4.9.5 (2026-10-13)
|
|
179
|
+
|
|
180
|
+
#### Changed
|
|
181
|
+
|
|
182
|
+
- Internal improvements. Nothing changes in how you use the SDK.
|
|
183
|
+
|
|
184
|
+
### 4.9.4 (2026-10-12)
|
|
185
|
+
|
|
186
|
+
#### Security
|
|
187
|
+
|
|
188
|
+
- 3-D Secure on a saved card token (`addThreeDsWithToken`) no longer brings the card's details into the
|
|
189
|
+
browser: it runs on the card your gateway stores.
|
|
190
|
+
|
|
191
|
+
#### Fixed
|
|
192
|
+
|
|
193
|
+
- Nuvei 3-D Secure stops after it reports a failure, instead of opening the challenge as well.
|
|
194
|
+
|
|
195
|
+
### 4.9.3 (2026-10-08)
|
|
196
|
+
|
|
197
|
+
#### Added
|
|
60
198
|
|
|
61
|
-
|
|
199
|
+
- The Apple Pay button now appears in Chrome, Firefox and Edge, where Apple lets shoppers pay with
|
|
200
|
+
their iPhone. It used to appear in Safari only.
|
|
201
|
+
- Forter as a 3-D Secure provider on its own, without Forter fraud screening.
|
|
62
202
|
|
|
63
|
-
|
|
203
|
+
#### Fixed
|
|
64
204
|
|
|
65
|
-
|
|
205
|
+
- A Forter 3-D Secure challenge whose result is anything but a success now fails the payment.
|
|
206
|
+
- Forter's scripts use your account's Forter site ID.
|
|
@@ -3418,7 +3418,7 @@ var as = (e, t) => {
|
|
|
3418
3418
|
},
|
|
3419
3419
|
setup(e) {
|
|
3420
3420
|
let t = e;
|
|
3421
|
-
return
|
|
3421
|
+
return (n, r) => t.useLocal ? (Ki(), Zi("div", cs, [...r[1] ||= [
|
|
3422
3422
|
X("div", null, null, -1),
|
|
3423
3423
|
X("div", null, null, -1),
|
|
3424
3424
|
X("div", null, null, -1),
|
|
@@ -3446,7 +3446,7 @@ var as = (e, t) => {
|
|
|
3446
3446
|
X("div")
|
|
3447
3447
|
], -1)]));
|
|
3448
3448
|
}
|
|
3449
|
-
}), [["__scopeId", "data-v-
|
|
3449
|
+
}), [["__scopeId", "data-v-2b4dad6b"]]), us = "compact", ds = "payfurl-init", fs = "init-card-form", ps = "checkout-ready", ms = "submit-card-form", hs = "tokenise-card-form", gs = "request-card", _s = "card-details", vs = "secure-orchestrator-ready", ys = "secure-orchestrator-submit", bs = "secure-orchestrator-submit-secondary-3ds", xs = "secure-orchestrator-tokenise", Ss = "secure-orchestrator-failure", Cs = "secure-orchestrator-update-state", ws = "secure-orchestrator-click-to-pay-card", Ts = "secure-orchestrator-click-to-pay-new-card", Es = "secure-orchestrator-show-challenge", Ds = "secure-orchestrator-hide-challenge", Os = "iframe-has-changed", ks = "show-spinner", As = "hide-spinner", js = "set-amount", Ms = "set-currency", Ns = "set-billing-address", Ps = "set-customer-info", Fs = "set-order-info", Is = "tokenise-card-success", Ls = "tokenise-card-failure", Rs = "click2pay-cards", zs = "click2pay-remember-me", Bs = "click2pay-show-learn-more", Vs = "show-card-form", Hs = "start-loading-card-form", Us = "stop-loading-card-form", Ws = "pause-loading-card-form", Gs = "unpause-loading-card-form", Ks = "click2pay-change-user", qs = "click2pay-stop-using", Js = "click2pay-update-available-card-brands", Ys = "card-form-error", Xs = "card-form-info-message", Zs = "card-form-validation-error", Qs = "card-form-validation-status-change", $s = "Payment Details Collected", ec = "3D Secure required", tc = "3D Secure failed", nc = "Unable to process payment details", $ = null;
|
|
3450
3450
|
function rc() {
|
|
3451
3451
|
window.self === window.top ? ($ || ac(), $ && ($.style.display = "none")) : window.parent.postMessage({ status: As }, "*");
|
|
3452
3452
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, Et as t, It as n, Lt as r, O as i, Ot as a, Tt as o, Z as s, _t as c, ct as l, dt as u, h as d, n as f, t as p, vt as m, wt as h, xt as g } from "./CloseIcon-
|
|
1
|
+
import { A as e, Et as t, It as n, Lt as r, O as i, Ot as a, Tt as o, Z as s, _t as c, ct as l, dt as u, h as d, n as f, t as p, vt as m, wt as h, xt as g } from "./CloseIcon-B65NDIbM.js";
|
|
2
2
|
// src/sdk/3ds/ThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/ s(/* @__PURE__ */ o({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as m } from "./
|
|
3
|
-
import { t as h } from "./alerts-
|
|
4
|
-
import { t as g } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
|
|
2
|
+
import { Dt as t, Et as n, Ft as r, It as i, Ot as a, Tt as o, Z as s, dt as c, mt as l, n as u, t as d, vt as f, wt as p, xt as m } from "./CloseIcon-B65NDIbM.js";
|
|
3
|
+
import { t as h } from "./alerts-BvNnAm_q.js";
|
|
4
|
+
import { t as g } from "./screen-aNRlfrZR.js";
|
|
5
5
|
// src/sdk/3ds/MetricsGlobalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/
|
|
6
|
+
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ s(/* @__PURE__ */ o({
|
|
7
7
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
8
|
emits: ["close", "submit"],
|
|
9
|
-
setup(
|
|
10
|
-
let s = o,
|
|
11
|
-
function
|
|
12
|
-
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (
|
|
9
|
+
setup(e, { emit: o }) {
|
|
10
|
+
let s = o, c = i(!1);
|
|
11
|
+
function u(e) {
|
|
12
|
+
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (c.value = e.data.message === "3DS_CHALLENGE_SHOW");
|
|
13
13
|
}
|
|
14
|
-
return
|
|
15
|
-
window.addEventListener("message",
|
|
16
|
-
}),
|
|
17
|
-
window.removeEventListener("message",
|
|
18
|
-
}), (e, t) =>
|
|
14
|
+
return n(() => {
|
|
15
|
+
window.addEventListener("message", u);
|
|
16
|
+
}), t(() => {
|
|
17
|
+
window.removeEventListener("message", u);
|
|
18
|
+
}), (e, t) => r((a(), m("div", _, [f("div", v, [f("div", y, [p(d, {
|
|
19
19
|
onClick: t[0] ||= (e) => s("close"),
|
|
20
20
|
id: "3ds-challenge-close"
|
|
21
|
-
}), t[1] ||=
|
|
21
|
+
}), t[1] ||= f("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[l, c.value]]);
|
|
22
22
|
}
|
|
23
|
-
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } =
|
|
23
|
+
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } = u(), C = 5, w = class extends e {
|
|
24
24
|
gateway;
|
|
25
25
|
threeDS;
|
|
26
26
|
numAttempts = 0;
|
|
@@ -75,7 +75,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
75
75
|
browserJavascriptEnabled: !0,
|
|
76
76
|
browserJavaEnabled: !1,
|
|
77
77
|
browserLanguage: window.navigator.language,
|
|
78
|
-
browserColorDepth: String(
|
|
78
|
+
browserColorDepth: String(g()),
|
|
79
79
|
browserScreenHeight: String(screen.height),
|
|
80
80
|
browserScreenWidth: String(screen.width),
|
|
81
81
|
browserTimeZone: String(Math.round((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60)),
|
|
@@ -103,7 +103,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
initChallenge() {
|
|
106
|
-
let { destroy: e } =
|
|
106
|
+
let { destroy: e } = c({
|
|
107
107
|
el: document.body,
|
|
108
108
|
component: b,
|
|
109
109
|
on: { close: () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as e, It as t, Ot as n, Tt as r, Z as i, bt as a, dt as o, gt as s, vt as c, xt as l } from "./CloseIcon-
|
|
1
|
+
import { Bt as e, It as t, Ot as n, Tt as r, Z as i, bt as a, dt as o, gt as s, vt as c, xt as l } from "./CloseIcon-B65NDIbM.js";
|
|
2
2
|
// src/sdk/components/Error.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var u = { class: "message" }, d = /*#__PURE__*/ i(/* @__PURE__ */ r({
|
|
4
4
|
__name: "Error",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as p } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
|
|
2
|
+
import { Et as t, It as n, Lt as r, Ot as i, Tt as a, Z as o, _t as s, ct as c, dt as l, t as u, vt as d, wt as f, xt as p } from "./CloseIcon-B65NDIbM.js";
|
|
3
3
|
// src/sdk/3ds/ecentric.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/
|
|
4
|
+
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/ o(/* @__PURE__ */ a({
|
|
5
5
|
__name: "ecentric",
|
|
6
6
|
props: {
|
|
7
7
|
threeDSServerTransID: {},
|
|
@@ -9,27 +9,28 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
9
9
|
formAction: {},
|
|
10
10
|
authenticationValue: {}
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
t[
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
emits: ["close", "submit"],
|
|
13
|
+
setup(e, { emit: a }) {
|
|
14
|
+
let o = e, l = a, y = s(() => c(o.formAction) ? o.formAction : ""), b = n(null), x = o.authenticationValue;
|
|
15
|
+
return t(() => {
|
|
16
|
+
y.value && b.value?.submit();
|
|
17
|
+
}), (e, t) => (i(), p("div", m, [d("div", h, [d("div", g, [
|
|
18
|
+
f(u, { onClick: t[0] ||= (e) => l("close") }),
|
|
19
|
+
t[1] ||= d("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
|
|
20
|
+
d("form", {
|
|
21
|
+
action: y.value,
|
|
21
22
|
target: "ThreeDsChallengeIFrame",
|
|
22
23
|
method: "post",
|
|
23
24
|
ref_key: "form",
|
|
24
|
-
ref:
|
|
25
|
-
}, [
|
|
25
|
+
ref: b
|
|
26
|
+
}, [d("input", {
|
|
26
27
|
type: "hidden",
|
|
27
28
|
name: "PaReq",
|
|
28
|
-
value:
|
|
29
|
+
value: r(x)
|
|
29
30
|
}, null, 8, v)], 8, _)
|
|
30
31
|
])])]));
|
|
31
32
|
}
|
|
32
|
-
}), [["__scopeId", "data-v-
|
|
33
|
+
}), [["__scopeId", "data-v-bdfafa40"]]), b = class extends e {
|
|
33
34
|
paResPayload = "";
|
|
34
35
|
getType() {
|
|
35
36
|
return "Ecentric";
|
|
@@ -45,7 +46,7 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
45
46
|
}
|
|
46
47
|
doChallenge(e, t, n) {
|
|
47
48
|
this.log(`[${this.getType()}][doChallenge]`), this.setChallengeFrameVisible(!0);
|
|
48
|
-
let { destroy: r } =
|
|
49
|
+
let { destroy: r } = l({
|
|
49
50
|
el: document.body,
|
|
50
51
|
component: y,
|
|
51
52
|
props: {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { n
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./managedOrders-ojoMZ0Ab.js";
|
|
3
|
+
import { n as i } from "./CloseIcon-B65NDIbM.js";
|
|
4
4
|
// src/sdk/3ds/ForterThreeDsProvider.ts
|
|
5
|
-
var { hideSpinner: a } =
|
|
5
|
+
var { hideSpinner: a } = i(), o = class extends e {
|
|
6
6
|
getType() {
|
|
7
7
|
return "Forter";
|
|
8
8
|
}
|
|
9
|
-
onDoAuthSuccess = (e,
|
|
10
|
-
let o = JSON.parse(
|
|
9
|
+
onDoAuthSuccess = (e, i) => {
|
|
10
|
+
let o = JSON.parse(i);
|
|
11
11
|
this.log(`[${this.getType()}][onDoAuthSuccess]`, o);
|
|
12
12
|
let s = this.options.clientParameters?.SiteId || "", c = o.managedOrderToken;
|
|
13
|
-
!c || !
|
|
14
|
-
this.setChallengeFrameVisible(!0), a(),
|
|
13
|
+
!c || !r.test(s) ? this.onError(e, "3DS could not be started") : t(s).then(() => {
|
|
14
|
+
this.setChallengeFrameVisible(!0), a(), n(c, this.container, (e) => {
|
|
15
15
|
this.setChallengeFrameVisible(!1), e ? (this.log(`[${this.getType()}]: manageOrder failed`, e), this.onError(400, "3DS failed")) : this.onPostAuth();
|
|
16
16
|
});
|
|
17
17
|
}, (e) => {
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as u } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
|
|
2
|
+
import { Ot as t, Tt as n, Z as r, _t as i, ct as a, dt as o, n as s, vt as c, xt as l, zt as u } from "./CloseIcon-B65NDIbM.js";
|
|
3
3
|
// src/sdk/3ds/GPayments.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/
|
|
4
|
+
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
5
5
|
__name: "GPayments",
|
|
6
6
|
props: {
|
|
7
7
|
url: {},
|
|
8
8
|
width: {},
|
|
9
9
|
height: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
let n =
|
|
11
|
+
setup(e) {
|
|
12
|
+
let n = e, r = i(() => a(n.url) ? n.url : "");
|
|
13
13
|
function o() {
|
|
14
14
|
return {
|
|
15
15
|
width: `${n.width || 650}px`,
|
|
16
16
|
height: `${n.height || 400}px`
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
return (
|
|
19
|
+
return (e, n) => (t(), l("div", d, [c("div", f, [c("div", {
|
|
20
20
|
class: "container",
|
|
21
|
-
style:
|
|
21
|
+
style: u([o(), {
|
|
22
22
|
padding: "0",
|
|
23
23
|
margin: "0"
|
|
24
24
|
}])
|
|
25
|
-
}, [
|
|
26
|
-
src:
|
|
27
|
-
style:
|
|
25
|
+
}, [c("iframe", {
|
|
26
|
+
src: r.value,
|
|
27
|
+
style: u(o())
|
|
28
28
|
}, null, 12, p)], 4)])]));
|
|
29
29
|
}
|
|
30
|
-
}), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } =
|
|
30
|
+
}), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } = s(), g = class extends e {
|
|
31
31
|
getType() {
|
|
32
32
|
return "GPayments";
|
|
33
33
|
}
|
|
34
34
|
doChallenge(e) {
|
|
35
35
|
this.log(`[${this.getType()}][doChallenge]`), h(), this.setChallengeFrameVisible(!0);
|
|
36
|
-
let { destroy: t } =
|
|
36
|
+
let { destroy: t } = o({
|
|
37
37
|
el: document.body,
|
|
38
38
|
component: m,
|
|
39
39
|
props: {
|
|
@@ -69,7 +69,7 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
|
|
|
69
69
|
this.log(`[${this.getType()}][onInitAuthSuccess]`, n), n.threeDSAuthURL ? (this.threeDSRequestorTransID = n.threeDSRequestorTransID, this.threeDSServerTransID = n.threeDSServerTransID, this.threeDSMonitorURL = n.threeDSMonitorURL, this.threeDSAuthURL = n.threeDSAuthURL, n.threeDsServerCallbackUrl ? this.initFrame(n.threeDsServerCallbackUrl) : this.onAuth(!1, "")) : this.onError(e, "No AuthUrl specified");
|
|
70
70
|
};
|
|
71
71
|
initFrame(e) {
|
|
72
|
-
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !
|
|
72
|
+
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !a(e)) return;
|
|
73
73
|
let t = document.createElement("iframe");
|
|
74
74
|
t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
|
|
75
75
|
}
|