@xpayeg/react 1.0.1 → 2.0.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 +22 -0
- package/README.md +3 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @xpayeg/react
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
### Major Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#331](https://github.com/xpayeg/xpay/pull/331) [`bdc6a48`](https://github.com/xpayeg/xpay/commit/bdc6a4865f8c0326a4c0eb3dd20808e1207d682a) Thanks [@Elmosh](https://github.com/Elmosh)! - **Breaking:** `returnUrl` is removed from `confirmPayment()` options. The return destination is always the checkout session's `afterCompletion.redirect.url`, set server-side at session creation.
|
|
9
|
+
|
|
10
|
+
The URL is sent to the bank during authentication, before the browser leaves your page, so a value passed at confirm time could only ever conflict with what the bank already received. Delete `returnUrl` from `confirmPayment()` and set `afterCompletion.redirect.url` on `createSession`. `redirect: "always"` now follows that destination.
|
|
11
|
+
|
|
12
|
+
**Breaking:** `afterCompletion` is now required for `uiMode: "embedded"` and `uiMode: "custom"`, and must be `type: "redirect"`. That URL is where the bank returns when authentication takes over the full page, which happens in in-app browsers where an embedded challenge cannot run. `hosted_confirmation` is rejected for these modes since those integrations run on your own site and there is no XPay page to return to.
|
|
13
|
+
|
|
14
|
+
Also fixed: the 3DS challenge now renders at the size declared to the issuer (previously cropped or oversized), the overlay waits for the issuer's page to paint instead of showing an empty frame, and a challenge that cannot run in an iframe takes over the full tab instead of failing silently.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- [#333](https://github.com/xpayeg/xpay/pull/333) [`3dcea81`](https://github.com/xpayeg/xpay/commit/3dcea81b3e3f67267624105560c38f2615c35d96) Thanks [@Elmosh](https://github.com/Elmosh)! - Documentation: the `redirect: "always"` tables and examples now state that the destination is the checkout session's `afterCompletion.redirect.url`, set server-side at session creation.
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`3dcea81`](https://github.com/xpayeg/xpay/commit/3dcea81b3e3f67267624105560c38f2615c35d96), [`bdc6a48`](https://github.com/xpayeg/xpay/commit/bdc6a4865f8c0326a4c0eb3dd20808e1207d682a)]:
|
|
23
|
+
- @xpayeg/sdk@2.0.0
|
|
24
|
+
|
|
3
25
|
## 1.0.1
|
|
4
26
|
### Patch Changes
|
|
5
27
|
|
package/README.md
CHANGED
|
@@ -708,21 +708,16 @@ await checkout.confirm({
|
|
|
708
708
|
redirect: "always",
|
|
709
709
|
});
|
|
710
710
|
// ^ If successful, the page navigates away. Code below only runs on error.
|
|
711
|
-
|
|
712
|
-
// Override the redirect URL from the client:
|
|
713
|
-
await checkout.confirm({
|
|
714
|
-
customerDetails: { email, name },
|
|
715
|
-
redirect: "always",
|
|
716
|
-
returnUrl: "https://mysite.com/custom-success",
|
|
717
|
-
});
|
|
718
711
|
```
|
|
719
712
|
|
|
720
713
|
| `redirect` | Behavior |
|
|
721
714
|
|---|---|
|
|
722
715
|
| Not set (default) | `"if_required"` — returns result to your code |
|
|
723
|
-
| `"always"` | Redirects to
|
|
716
|
+
| `"always"` | Redirects to the session's `afterCompletion.redirect.url` |
|
|
724
717
|
| `"if_required"` | Returns result to your code — no redirect |
|
|
725
718
|
|
|
719
|
+
Your server sets that URL when it creates the session. XPay navigates there unchanged, appending nothing.
|
|
720
|
+
|
|
726
721
|
---
|
|
727
722
|
|
|
728
723
|
## Appearance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpayeg/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "XPay React components — PaymentElement, CheckoutButton, and hooks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18 || ^19",
|
|
37
37
|
"react-dom": "^18 || ^19",
|
|
38
|
-
"@xpayeg/sdk": "
|
|
38
|
+
"@xpayeg/sdk": "2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"tsdown": "^0.22.0",
|
|
51
51
|
"typescript": "5.9.3",
|
|
52
52
|
"@xpay/tsconfig": "0.0.0",
|
|
53
|
-
"@xpayeg/sdk": "
|
|
53
|
+
"@xpayeg/sdk": "2.0.0"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|