@wix/himalaya-cli 0.1491.0 → 0.1492.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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +9 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +6 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +9 -3
- package/package.json +2 -2
|
@@ -113,7 +113,7 @@ export interface WixIapPayment {
|
|
|
113
113
|
refundedDate?: string;
|
|
114
114
|
}
|
|
115
115
|
export type WixIapOperation = "startPayment" | "startItemPayment" | "completePayment" | "getPayment";
|
|
116
|
-
export type StartPaymentErrorCode = "NOT_PENDING" | "WRONG_PAYMENT_METHOD" | "NOT_ORDER_BUYER" | "UNSUPPORTED_ORDER" | "PRODUCT_NOT_AVAILABLE" | "ALREADY_OWNED";
|
|
116
|
+
export type StartPaymentErrorCode = "NOT_PENDING" | "WRONG_PAYMENT_METHOD" | "NOT_ORDER_BUYER" | "UNSUPPORTED_ORDER" | "PRODUCT_NOT_AVAILABLE" | "ALREADY_OWNED" | "APP_NOT_CONFIGURED" | "SUBSCRIPTION_NOT_IN_APP" | "ALREADY_SUBSCRIBED";
|
|
117
117
|
export type StartItemPaymentErrorCode = "PRODUCT_NOT_AVAILABLE" | "ALREADY_OWNED" | "ITEM_NOT_AVAILABLE" | "SITE_NOT_ACCEPTING_PAYMENTS" | "UNSUPPORTED_ORDER";
|
|
118
118
|
export type CompletePaymentErrorCode = "INVALID_PURCHASE" | "OWNED_BY_ANOTHER_CUSTOMER" | "PURCHASE_REVOKED" | "NOT_PURCHASED" | "ZERO_PRICE" | "NO_MATCHING_PAYMENT" | "PAYMENT_NOT_PENDING" | "APP_NOT_CONFIGURED";
|
|
119
119
|
export type GetPaymentErrorCode = "NOT_FOUND";
|
|
@@ -1019,7 +1019,7 @@ function wixApiGlobal() {
|
|
|
1019
1019
|
|
|
1020
1020
|
// ../../core/sdk/iap/src/wix-payments-wire.ts
|
|
1021
1021
|
function startPaymentCall(scope, wixTransactionId) {
|
|
1022
|
-
return post(scope, "/payments/start", {
|
|
1022
|
+
return post(scope, "/payments/start", { appleBundleId: scope.binding.bundleId, wixTransactionId });
|
|
1023
1023
|
}
|
|
1024
1024
|
function startItemPaymentCall(scope, item) {
|
|
1025
1025
|
return post(scope, "/payments/start-item", { appId: scope.binding.purchasesAppId, item: { catalogItemId: item.catalogItemId, catalogAppId: item.catalogAppId } });
|
|
@@ -1031,7 +1031,7 @@ function catalogItemOf(raw) {
|
|
|
1031
1031
|
return valid ? { catalogItemId, catalogAppId } : null;
|
|
1032
1032
|
}
|
|
1033
1033
|
function completePaymentCall(scope, signedTransaction) {
|
|
1034
|
-
return post(scope, "/payments/complete", {
|
|
1034
|
+
return post(scope, "/payments/complete", { appleBundleId: scope.binding.bundleId, apple: { signedTransaction } });
|
|
1035
1035
|
}
|
|
1036
1036
|
function paymentCall(scope, paymentId) {
|
|
1037
1037
|
return get2(scope, `/payments/${encodeURIComponent(paymentId)}`);
|
|
@@ -1313,7 +1313,10 @@ var START_PAYMENT_CODES = [
|
|
|
1313
1313
|
"NOT_ORDER_BUYER",
|
|
1314
1314
|
"UNSUPPORTED_ORDER",
|
|
1315
1315
|
"PRODUCT_NOT_AVAILABLE",
|
|
1316
|
-
"ALREADY_OWNED"
|
|
1316
|
+
"ALREADY_OWNED",
|
|
1317
|
+
"APP_NOT_CONFIGURED",
|
|
1318
|
+
"SUBSCRIPTION_NOT_IN_APP",
|
|
1319
|
+
"ALREADY_SUBSCRIBED"
|
|
1317
1320
|
];
|
|
1318
1321
|
var START_ITEM_PAYMENT_CODES = [
|
|
1319
1322
|
"PRODUCT_NOT_AVAILABLE",
|
|
@@ -1922,6 +1925,9 @@ function createWixOrderBackend(deps) {
|
|
|
1922
1925
|
}
|
|
1923
1926
|
async function startRefusal(sale, ref, failure3) {
|
|
1924
1927
|
if (failure3.kind !== "application") return failureStop(failure3);
|
|
1928
|
+
if (failure3.code === "SUBSCRIPTION_NOT_IN_APP" || failure3.code === "ALREADY_SUBSCRIBED") {
|
|
1929
|
+
return stopWith("rejected", "paymentRefused");
|
|
1930
|
+
}
|
|
1925
1931
|
if (failure3.code === "ALREADY_OWNED") return alreadyPaid(sale, ref);
|
|
1926
1932
|
if (failure3.code === "NOT_PENDING" || failure3.code === "NOT_ORDER_BUYER") forget(sale, sale.catalogRef);
|
|
1927
1933
|
return stopWith("rejected", failure3.code === "NOT_PENDING" ? "orderClosed" : "paymentRefused");
|
|
@@ -1028,7 +1028,7 @@ function wixApiGlobal() {
|
|
|
1028
1028
|
|
|
1029
1029
|
// ../../core/sdk/iap/src/wix-payments-wire.ts
|
|
1030
1030
|
function startPaymentCall(scope, wixTransactionId) {
|
|
1031
|
-
return post(scope, "/payments/start", {
|
|
1031
|
+
return post(scope, "/payments/start", { appleBundleId: scope.binding.bundleId, wixTransactionId });
|
|
1032
1032
|
}
|
|
1033
1033
|
function startItemPaymentCall(scope, item) {
|
|
1034
1034
|
return post(scope, "/payments/start-item", { appId: scope.binding.purchasesAppId, item: { catalogItemId: item.catalogItemId, catalogAppId: item.catalogAppId } });
|
|
@@ -1040,7 +1040,7 @@ function catalogItemOf(raw) {
|
|
|
1040
1040
|
return valid ? { catalogItemId, catalogAppId } : null;
|
|
1041
1041
|
}
|
|
1042
1042
|
function completePaymentCall(scope, signedTransaction) {
|
|
1043
|
-
return post(scope, "/payments/complete", {
|
|
1043
|
+
return post(scope, "/payments/complete", { appleBundleId: scope.binding.bundleId, apple: { signedTransaction } });
|
|
1044
1044
|
}
|
|
1045
1045
|
function paymentCall(scope, paymentId) {
|
|
1046
1046
|
return get(scope, `/payments/${encodeURIComponent(paymentId)}`);
|
|
@@ -1322,7 +1322,10 @@ var START_PAYMENT_CODES = [
|
|
|
1322
1322
|
"NOT_ORDER_BUYER",
|
|
1323
1323
|
"UNSUPPORTED_ORDER",
|
|
1324
1324
|
"PRODUCT_NOT_AVAILABLE",
|
|
1325
|
-
"ALREADY_OWNED"
|
|
1325
|
+
"ALREADY_OWNED",
|
|
1326
|
+
"APP_NOT_CONFIGURED",
|
|
1327
|
+
"SUBSCRIPTION_NOT_IN_APP",
|
|
1328
|
+
"ALREADY_SUBSCRIBED"
|
|
1326
1329
|
];
|
|
1327
1330
|
var START_ITEM_PAYMENT_CODES = [
|
|
1328
1331
|
"PRODUCT_NOT_AVAILABLE",
|
|
@@ -1585,7 +1585,7 @@ function wixApiGlobal() {
|
|
|
1585
1585
|
|
|
1586
1586
|
// ../../core/sdk/iap/src/wix-payments-wire.ts
|
|
1587
1587
|
function startPaymentCall(scope, wixTransactionId) {
|
|
1588
|
-
return post(scope, "/payments/start", {
|
|
1588
|
+
return post(scope, "/payments/start", { appleBundleId: scope.binding.bundleId, wixTransactionId });
|
|
1589
1589
|
}
|
|
1590
1590
|
function startItemPaymentCall(scope, item) {
|
|
1591
1591
|
return post(scope, "/payments/start-item", { appId: scope.binding.purchasesAppId, item: { catalogItemId: item.catalogItemId, catalogAppId: item.catalogAppId } });
|
|
@@ -1597,7 +1597,7 @@ function catalogItemOf(raw) {
|
|
|
1597
1597
|
return valid ? { catalogItemId, catalogAppId } : null;
|
|
1598
1598
|
}
|
|
1599
1599
|
function completePaymentCall(scope, signedTransaction) {
|
|
1600
|
-
return post(scope, "/payments/complete", {
|
|
1600
|
+
return post(scope, "/payments/complete", { appleBundleId: scope.binding.bundleId, apple: { signedTransaction } });
|
|
1601
1601
|
}
|
|
1602
1602
|
function paymentCall(scope, paymentId) {
|
|
1603
1603
|
return get2(scope, `/payments/${encodeURIComponent(paymentId)}`);
|
|
@@ -1879,7 +1879,10 @@ var START_PAYMENT_CODES = [
|
|
|
1879
1879
|
"NOT_ORDER_BUYER",
|
|
1880
1880
|
"UNSUPPORTED_ORDER",
|
|
1881
1881
|
"PRODUCT_NOT_AVAILABLE",
|
|
1882
|
-
"ALREADY_OWNED"
|
|
1882
|
+
"ALREADY_OWNED",
|
|
1883
|
+
"APP_NOT_CONFIGURED",
|
|
1884
|
+
"SUBSCRIPTION_NOT_IN_APP",
|
|
1885
|
+
"ALREADY_SUBSCRIBED"
|
|
1883
1886
|
];
|
|
1884
1887
|
var START_ITEM_PAYMENT_CODES = [
|
|
1885
1888
|
"PRODUCT_NOT_AVAILABLE",
|
|
@@ -2482,6 +2485,9 @@ function createWixOrderBackend(deps) {
|
|
|
2482
2485
|
}
|
|
2483
2486
|
async function startRefusal(sale, ref, failure3) {
|
|
2484
2487
|
if (failure3.kind !== "application") return failureStop(failure3);
|
|
2488
|
+
if (failure3.code === "SUBSCRIPTION_NOT_IN_APP" || failure3.code === "ALREADY_SUBSCRIBED") {
|
|
2489
|
+
return stopWith("rejected", "paymentRefused");
|
|
2490
|
+
}
|
|
2485
2491
|
if (failure3.code === "ALREADY_OWNED") return alreadyPaid(sale, ref);
|
|
2486
2492
|
if (failure3.code === "NOT_PENDING" || failure3.code === "NOT_ORDER_BUYER") forget(sale, sale.catalogRef);
|
|
2487
2493
|
return stopWith("rejected", failure3.code === "NOT_PENDING" ? "orderClosed" : "paymentRefused");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1492.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "7aba2d162be36ebf4054e60bba00ab84930e4a00bf727faafad1fe83"
|
|
75
75
|
}
|