flowrix 1.0.1-beta.77 → 1.0.1-beta.79
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/module.json +1 -1
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +1 -9
- package/dist/runtime/composables/Checkout/useCheckout.js +7 -4
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +1 -9
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +1 -9
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +1 -9
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +1 -9
- package/dist/runtime/stores/Checkout.d.ts +1 -9
- package/dist/runtime/stores/Checkout.js +7 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -168,15 +168,7 @@ export default function (): {
|
|
|
168
168
|
totals?: Record<string, any> | undefined;
|
|
169
169
|
}>;
|
|
170
170
|
AuthStore: import("vue").Ref<any, any>;
|
|
171
|
-
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {
|
|
172
|
-
resetState(): void;
|
|
173
|
-
paymentMethods(formData: any): Promise<any>;
|
|
174
|
-
getConfig(): Promise<void>;
|
|
175
|
-
submitCheckout(): Promise<any>;
|
|
176
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
177
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
178
|
-
saveToCheckoutSession(fieldsData: import("../../stores/Checkout.js").FieldData): Promise<void>;
|
|
179
|
-
}>;
|
|
171
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
180
172
|
countries: any;
|
|
181
173
|
BillingDetailsForm: any;
|
|
182
174
|
DeliveryMethodForm: any;
|
|
@@ -271,14 +271,16 @@ export default function() {
|
|
|
271
271
|
sessiondata.value.fields.eway_cardnumber = cardnumber;
|
|
272
272
|
sessiondata.value.fields.eway_cvn = eway_cvn;
|
|
273
273
|
}
|
|
274
|
-
await checkoutStore.submitCheckout();
|
|
275
|
-
if (
|
|
274
|
+
const chckoutResponse = await checkoutStore.submitCheckout();
|
|
275
|
+
if (chckoutResponse.status == "Success") {
|
|
276
276
|
if (inputData.value.paymentmethod == "web-stripe") {
|
|
277
277
|
const { stripe, elements } = await getStripeElements(
|
|
278
278
|
checkoutStore.publishableKey.key,
|
|
279
279
|
inputData.value.clientsceret
|
|
280
280
|
);
|
|
281
281
|
if (sessiondata.value.calculations.total > 0) {
|
|
282
|
+
console.log("chckoutResponse", sessiondata.value);
|
|
283
|
+
console.log("chckoutResponse", checkoutStore.responseData.booking ? `${window.location.origin}${url_booking}?calendar=${checkoutStore.responseData.calendar}&order_no=${checkoutStore.responseData.order_no}` : `${window.location.origin}${url_success}`);
|
|
282
284
|
const { error: error2 } = await stripe.confirmPayment({
|
|
283
285
|
elements,
|
|
284
286
|
confirmParams: {
|
|
@@ -294,9 +296,10 @@ export default function() {
|
|
|
294
296
|
} else {
|
|
295
297
|
showMessage(error.message);
|
|
296
298
|
}
|
|
297
|
-
} else if (
|
|
298
|
-
var url =
|
|
299
|
+
} else if (chckoutResponse.data.url) {
|
|
300
|
+
var url = chckoutResponse.data.url;
|
|
299
301
|
} else {
|
|
302
|
+
window.location.href = url_success;
|
|
300
303
|
}
|
|
301
304
|
removeLoading();
|
|
302
305
|
} else if (checkoutStore.errorResponseData.status == "Error") {
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {
|
|
3
|
-
resetState(): void;
|
|
4
|
-
paymentMethods(formData: any): Promise<any>;
|
|
5
|
-
getConfig(): Promise<void>;
|
|
6
|
-
submitCheckout(): Promise<any>;
|
|
7
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
-
saveToCheckoutSession(fieldsData: import("../../stores/Checkout.js").FieldData): Promise<void>;
|
|
10
|
-
}>;
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
11
3
|
passwordShow: import("vue").Ref<string, string>;
|
|
12
4
|
password: import("vue").Ref<string, string>;
|
|
13
5
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {
|
|
3
|
-
resetState(): void;
|
|
4
|
-
paymentMethods(formData: any): Promise<any>;
|
|
5
|
-
getConfig(): Promise<void>;
|
|
6
|
-
submitCheckout(): Promise<any>;
|
|
7
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
-
saveToCheckoutSession(fieldsData: import("../../stores/Checkout.js").FieldData): Promise<void>;
|
|
10
|
-
}>;
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
11
3
|
updateShippingAddress: (shippingfield: any) => void;
|
|
12
4
|
sameAsBilling: (sameasbilling: boolean | undefined, inputData: any) => Promise<void>;
|
|
13
5
|
UpdateStripe: (inputData: any) => Promise<void>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {
|
|
3
|
-
resetState(): void;
|
|
4
|
-
paymentMethods(formData: any): Promise<any>;
|
|
5
|
-
getConfig(): Promise<void>;
|
|
6
|
-
submitCheckout(): Promise<any>;
|
|
7
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
-
saveToCheckoutSession(fieldsData: import("../../stores/Checkout.js").FieldData): Promise<void>;
|
|
10
|
-
}>;
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
11
3
|
passwordShow: import("vue").Ref<string, string>;
|
|
12
4
|
password: import("vue").Ref<string, string>;
|
|
13
5
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {
|
|
3
|
-
resetState(): void;
|
|
4
|
-
paymentMethods(formData: any): Promise<any>;
|
|
5
|
-
getConfig(): Promise<void>;
|
|
6
|
-
submitCheckout(): Promise<any>;
|
|
7
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
-
saveToCheckoutSession(fieldsData: import("../../stores/Checkout.js").FieldData): Promise<void>;
|
|
10
|
-
}>;
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
11
3
|
updateDeliveryMethod: (inputData: any) => Promise<void>;
|
|
12
4
|
};
|
|
@@ -76,12 +76,4 @@ export interface CheckoutState {
|
|
|
76
76
|
PaymentErrors: any;
|
|
77
77
|
loading: boolean;
|
|
78
78
|
}
|
|
79
|
-
export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout", CheckoutState, {}, {
|
|
80
|
-
resetState(): void;
|
|
81
|
-
paymentMethods(formData: any): Promise<any>;
|
|
82
|
-
getConfig(): Promise<void>;
|
|
83
|
-
submitCheckout(): Promise<any>;
|
|
84
|
-
confirmPayment(checkoutId: string): Promise<void>;
|
|
85
|
-
CheckUserAccount(email: string): Promise<any>;
|
|
86
|
-
saveToCheckoutSession(fieldsData: FieldData): Promise<void>;
|
|
87
|
-
}>;
|
|
79
|
+
export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout", CheckoutState, {}, {}>;
|
|
@@ -157,7 +157,7 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
157
157
|
invoice: error?.data?.data?.order_no
|
|
158
158
|
};
|
|
159
159
|
this.loading = false;
|
|
160
|
-
return error;
|
|
160
|
+
return error.data;
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
async confirmPayment(checkoutId) {
|
|
@@ -218,5 +218,10 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
-
persist:
|
|
221
|
+
persist: {
|
|
222
|
+
enabled: true,
|
|
223
|
+
// simple shape that works with most versions:
|
|
224
|
+
key: "checkoutSession",
|
|
225
|
+
storage: typeof window !== "undefined" ? localStorage : void 0
|
|
226
|
+
}
|
|
222
227
|
});
|