@virgodev/iap 1.0.4 → 1.0.5
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/components/StripePopup.vue +1 -8
- package/package.json +1 -1
- package/stores/iap.ts +12 -0
|
@@ -58,14 +58,7 @@ onMounted(() => {});
|
|
|
58
58
|
|
|
59
59
|
function closeDialog(v: boolean): void {
|
|
60
60
|
if (v === false) {
|
|
61
|
-
|
|
62
|
-
iap.stripe.callback(undefined);
|
|
63
|
-
}
|
|
64
|
-
iap.stripe.callback = undefined;
|
|
65
|
-
iap.stripe.result = undefined;
|
|
66
|
-
iap.stripe.cart = undefined;
|
|
67
|
-
iap.stripe.status = undefined;
|
|
68
|
-
iap.stripe.error = undefined;
|
|
61
|
+
iap.stripe.reset();
|
|
69
62
|
visible.value = false;
|
|
70
63
|
}
|
|
71
64
|
}
|
package/package.json
CHANGED
package/stores/iap.ts
CHANGED
|
@@ -286,6 +286,17 @@ export const useIapStore = defineStore("iap", () => {
|
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
+
function reset() {
|
|
290
|
+
if (stripeCallback.value) {
|
|
291
|
+
stripeCallback.value(undefined);
|
|
292
|
+
}
|
|
293
|
+
stripeCallback.value = undefined;
|
|
294
|
+
stripeResult.value = undefined;
|
|
295
|
+
stripeCart.value = undefined;
|
|
296
|
+
stripeStatus.value = undefined;
|
|
297
|
+
stripeError.value = undefined;
|
|
298
|
+
}
|
|
299
|
+
|
|
289
300
|
return {
|
|
290
301
|
products,
|
|
291
302
|
platform,
|
|
@@ -307,6 +318,7 @@ export const useIapStore = defineStore("iap", () => {
|
|
|
307
318
|
result: stripeResult,
|
|
308
319
|
callback: stripeCallback,
|
|
309
320
|
error: stripeError,
|
|
321
|
+
reset,
|
|
310
322
|
},
|
|
311
323
|
};
|
|
312
324
|
});
|