@sunbay/checkout-sdk-js 0.0.9 → 0.1.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/README.md +4 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +13 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -829,10 +829,13 @@ var CheckoutElement = class _CheckoutElement {
|
|
|
829
829
|
let query = `?checkoutId=${encodeURIComponent(this.checkoutId)}`;
|
|
830
830
|
query += `&elementId=${encodeURIComponent(this.elementId)}`;
|
|
831
831
|
if (this.type === "address") {
|
|
832
|
-
const mode = this.options
|
|
832
|
+
const { mode, style } = this.options ?? {};
|
|
833
833
|
if (mode) {
|
|
834
834
|
query += `&mode=${encodeURIComponent(mode)}`;
|
|
835
835
|
}
|
|
836
|
+
if (style === "simple" || style === "full") {
|
|
837
|
+
query += `&style=${style}`;
|
|
838
|
+
}
|
|
836
839
|
}
|
|
837
840
|
if (this.colorScheme) {
|
|
838
841
|
query += `&colorScheme=${encodeURIComponent(this.colorScheme)}`;
|
|
@@ -1154,7 +1157,7 @@ var CheckoutInstance = class {
|
|
|
1154
1157
|
/**
|
|
1155
1158
|
* Query the payment status (returns TxnStatus as-is, no transformation).
|
|
1156
1159
|
*
|
|
1157
|
-
* @returns txnStatus (may
|
|
1160
|
+
* @returns txnStatus (may be absent when the session is expired), sessionStatus and txnId.
|
|
1158
1161
|
* @throws rejects INSTANCE_DESTROYED when destroyed.
|
|
1159
1162
|
*/
|
|
1160
1163
|
async getPaymentStatus() {
|
|
@@ -1444,7 +1447,7 @@ if (typeof window !== "undefined") {
|
|
|
1444
1447
|
const w = window;
|
|
1445
1448
|
w.SunbayCheckout = { ...w.SunbayCheckout ?? {}, createCheckout };
|
|
1446
1449
|
}
|
|
1447
|
-
var version = true ? "0.0
|
|
1450
|
+
var version = true ? "0.1.0" : "0.0.0";
|
|
1448
1451
|
export {
|
|
1449
1452
|
CheckoutElement,
|
|
1450
1453
|
CheckoutInstance,
|