@xpayeg/sdk 2.2.0 → 2.3.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 +7 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.mts +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @xpayeg/sdk
|
|
2
2
|
|
|
3
|
+
## 2.3.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#471](https://github.com/xpayeg/xpay/pull/471) [`e76a6c3`](https://github.com/xpayeg/xpay/commit/e76a6c3e5f73f4dcf1f108b6be0e1a63dce5d1b9) Thanks [@Elmosh](https://github.com/Elmosh)! - Deferred Elements accept `paymentMethodTypes` (e.g. `["card"]`) to restrict which payment methods the element renders. Narrow-only: the list is intersected with the methods enabled for your account, so a type you have not enabled is never rendered, and an empty intersection fails with `loaderror` instead of rendering an empty frame. Fixed for the element's lifetime; pass the same values when your server creates the session so display and acceptance match. One method per element is the pattern for per-method rows in your own selector.
|
|
9
|
+
|
|
3
10
|
## 2.2.0
|
|
4
11
|
### Minor Changes
|
|
5
12
|
|
package/dist/index.d.cts
CHANGED
|
@@ -3611,6 +3611,8 @@ interface ElementsOptionsClientSecret {
|
|
|
3611
3611
|
amount?: never;
|
|
3612
3612
|
/** Currency is only applicable in deferred mode (`mode: "payment"`). */
|
|
3613
3613
|
currency?: never;
|
|
3614
|
+
/** Only applicable in deferred mode. Session-first elements render the session's own payment method types, set when the session is created. */
|
|
3615
|
+
paymentMethodTypes?: never;
|
|
3614
3616
|
/** Appearance overrides for the checkout UI */
|
|
3615
3617
|
appearance?: Appearance;
|
|
3616
3618
|
/** Locale for the payment form — `"en"` (default) or `"ar"` */
|
|
@@ -3643,6 +3645,16 @@ interface ElementsOptionsMode {
|
|
|
3643
3645
|
amount: number;
|
|
3644
3646
|
/** Three-letter currency code (e.g. `"EGP"`). */
|
|
3645
3647
|
currency: string;
|
|
3648
|
+
/**
|
|
3649
|
+
* Restrict which payment method types the element renders (e.g. `["card"]`).
|
|
3650
|
+
* Narrow-only: the list is intersected with the payment methods enabled for
|
|
3651
|
+
* your account, so a type that is not enabled is never rendered. If nothing
|
|
3652
|
+
* survives the intersection the element fails to load with a `loaderror`.
|
|
3653
|
+
* Fixed for the element's lifetime. Omit to render every enabled method.
|
|
3654
|
+
* The same values are passed as `paymentMethodTypes` when your server
|
|
3655
|
+
* creates the session at pay time, so display and acceptance match.
|
|
3656
|
+
*/
|
|
3657
|
+
paymentMethodTypes?: string[];
|
|
3646
3658
|
/** Either use mode or clientSecret when creating an Elements group. */
|
|
3647
3659
|
clientSecret?: never;
|
|
3648
3660
|
/** Appearance overrides for the checkout UI */
|
package/dist/index.d.mts
CHANGED
|
@@ -3611,6 +3611,8 @@ interface ElementsOptionsClientSecret {
|
|
|
3611
3611
|
amount?: never;
|
|
3612
3612
|
/** Currency is only applicable in deferred mode (`mode: "payment"`). */
|
|
3613
3613
|
currency?: never;
|
|
3614
|
+
/** Only applicable in deferred mode. Session-first elements render the session's own payment method types, set when the session is created. */
|
|
3615
|
+
paymentMethodTypes?: never;
|
|
3614
3616
|
/** Appearance overrides for the checkout UI */
|
|
3615
3617
|
appearance?: Appearance;
|
|
3616
3618
|
/** Locale for the payment form — `"en"` (default) or `"ar"` */
|
|
@@ -3643,6 +3645,16 @@ interface ElementsOptionsMode {
|
|
|
3643
3645
|
amount: number;
|
|
3644
3646
|
/** Three-letter currency code (e.g. `"EGP"`). */
|
|
3645
3647
|
currency: string;
|
|
3648
|
+
/**
|
|
3649
|
+
* Restrict which payment method types the element renders (e.g. `["card"]`).
|
|
3650
|
+
* Narrow-only: the list is intersected with the payment methods enabled for
|
|
3651
|
+
* your account, so a type that is not enabled is never rendered. If nothing
|
|
3652
|
+
* survives the intersection the element fails to load with a `loaderror`.
|
|
3653
|
+
* Fixed for the element's lifetime. Omit to render every enabled method.
|
|
3654
|
+
* The same values are passed as `paymentMethodTypes` when your server
|
|
3655
|
+
* creates the session at pay time, so display and acceptance match.
|
|
3656
|
+
*/
|
|
3657
|
+
paymentMethodTypes?: string[];
|
|
3646
3658
|
/** Either use mode or clientSecret when creating an Elements group. */
|
|
3647
3659
|
clientSecret?: never;
|
|
3648
3660
|
/** Appearance overrides for the checkout UI */
|