@pisell/private-materials 3.4.34 → 3.4.36
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +37 -20
- package/es/components/appointmentBooking/hooks.js +6 -0
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +35 -13
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/payo/config.js +10 -10
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +52 -6
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +58 -8
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +74 -12
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +73 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +93 -11
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +46 -7
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +64 -13
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -8
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +68 -17
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +86 -14
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +89 -15
- package/es/components/pay/toC/index.js +278 -118
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +22 -0
- package/es/hooks/usePaymentLogger.js +78 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +12 -3
- package/lib/components/appointmentBooking/hooks.js +6 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +6 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +43 -11
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.js +9 -9
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +42 -3
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +52 -15
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +66 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +29 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +50 -6
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +72 -10
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +47 -5
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +61 -3
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +63 -3
- package/lib/components/pay/toC/index.js +183 -48
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +22 -0
- package/lib/hooks/usePaymentLogger.js +69 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
|
|
19
29
|
// src/components/eftposPay/linkly/hooks/useTimeQuery.ts
|
|
@@ -24,15 +34,16 @@ __export(useTimeQuery_exports, {
|
|
|
24
34
|
module.exports = __toCommonJS(useTimeQuery_exports);
|
|
25
35
|
var import_react = require("react");
|
|
26
36
|
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
27
38
|
var import_store = require("../../store");
|
|
28
39
|
var import_hooks = require("../../hooks");
|
|
29
40
|
var import_const = require("../../const");
|
|
30
41
|
var import_const2 = require("../const");
|
|
31
|
-
var GlobalTimeout = 1e3 * 60;
|
|
42
|
+
var GlobalTimeout = 1e3 * 60 * 2;
|
|
32
43
|
var RequestTimeout = 1e3 * 5;
|
|
33
44
|
var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
34
45
|
const dispatch = (0, import_store.useDispatch)();
|
|
35
|
-
const { numRef, modeRef, deviceRef } = (0, import_hooks.useStoreRef)();
|
|
46
|
+
const { numRef, modeRef, deviceRef, orderIdRef } = (0, import_hooks.useStoreRef)();
|
|
36
47
|
const fail = (0, import_hooks.useFail)(0);
|
|
37
48
|
const failRef = (0, import_react.useRef)(fail);
|
|
38
49
|
const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
|
|
@@ -80,7 +91,6 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
80
91
|
console.log("Success: 全局超时或不需要处理结果,终止查询");
|
|
81
92
|
return;
|
|
82
93
|
}
|
|
83
|
-
_log("Success" /* Success */, result);
|
|
84
94
|
isQueryFinishedRef.current = true;
|
|
85
95
|
const data = (result == null ? void 0 : result.data) || {};
|
|
86
96
|
if (data.status == 1) {
|
|
@@ -95,8 +105,11 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
95
105
|
}
|
|
96
106
|
if ((data == null ? void 0 : data.status) == 0 && (data == null ? void 0 : data.signature_flag) != 1) {
|
|
97
107
|
console.log("交易状态为0需要继续查询");
|
|
108
|
+
_log("Querying" /* Querying */, result);
|
|
98
109
|
isQueryFinishedRef.current = false;
|
|
99
|
-
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
_resultQuery();
|
|
112
|
+
}, 1500);
|
|
100
113
|
return;
|
|
101
114
|
}
|
|
102
115
|
if (data.status < 0) {
|
|
@@ -132,7 +145,18 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
132
145
|
_log("AbortError" /* AbortError */);
|
|
133
146
|
console.log("Error: 请求被取消,将继续查询");
|
|
134
147
|
isQueryFinishedRef.current = false;
|
|
135
|
-
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
_resultQuery();
|
|
150
|
+
}, 1500);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!(error == null ? void 0 : error.code) || `${error.code}` === import_const.PayStatus.Timeout) {
|
|
154
|
+
_log("NetworkError" /* NetworkError */);
|
|
155
|
+
console.log("Error: 网关类报错,将继续查询");
|
|
156
|
+
isQueryFinishedRef.current = false;
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
_resultQuery();
|
|
159
|
+
}, 1500);
|
|
136
160
|
return;
|
|
137
161
|
}
|
|
138
162
|
_log("Error" /* Error */, error);
|
|
@@ -197,13 +221,21 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
197
221
|
session_id: numRef.current
|
|
198
222
|
};
|
|
199
223
|
const content = [
|
|
200
|
-
{
|
|
224
|
+
{
|
|
225
|
+
key: "description",
|
|
226
|
+
value: JSON.stringify({
|
|
227
|
+
queryId: queryIdRef.current,
|
|
228
|
+
orderId: orderIdRef.current,
|
|
229
|
+
type,
|
|
230
|
+
date: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
|
231
|
+
})
|
|
232
|
+
},
|
|
201
233
|
{ key: "params", value: JSON.stringify(params) }
|
|
202
234
|
];
|
|
203
|
-
if (type === "
|
|
204
|
-
content.push({ key: "response", value: JSON.stringify(res) });
|
|
205
|
-
} else if (type === "Error" /* Error */) {
|
|
235
|
+
if (type === "Error" /* Error */) {
|
|
206
236
|
content.push({ key: "error", value: JSON.stringify(res) });
|
|
237
|
+
} else {
|
|
238
|
+
content.push({ key: "response", value: JSON.stringify(res) });
|
|
207
239
|
}
|
|
208
240
|
(0, import_utils.sendWarningLog)({
|
|
209
241
|
title: `Linkly-${isPay ? "Pay" : "Refund"}-交易结果轮询`,
|
|
@@ -212,8 +244,6 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
212
244
|
};
|
|
213
245
|
const run = () => {
|
|
214
246
|
reset();
|
|
215
|
-
console.log("开始查询linkly结果---->>>>>>>");
|
|
216
|
-
_log("Start" /* Start */);
|
|
217
247
|
globalTimeoutIdRef.current = setTimeout(() => {
|
|
218
248
|
var _a;
|
|
219
249
|
console.log("全局超时,终止所有重试");
|
|
@@ -224,6 +254,8 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
|
224
254
|
startTimeRef.current = Date.now();
|
|
225
255
|
isQueryFinishedRef.current = false;
|
|
226
256
|
queryIdRef.current = (0, import_utils.getUniqueId)();
|
|
257
|
+
console.log("开始查询linkly结果---->>>>>>>");
|
|
258
|
+
_log("Start" /* Start */);
|
|
227
259
|
return _resultQuery();
|
|
228
260
|
};
|
|
229
261
|
return { run, stop: reset };
|
|
@@ -148,15 +148,15 @@ var POS = ({
|
|
|
148
148
|
const resultPromise = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay ? api.pay(
|
|
149
149
|
{
|
|
150
150
|
...(custom == null ? void 0 : custom.platform) ? {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
operator_id: custom.operator_id,
|
|
152
|
+
operator_type: custom.operator_type,
|
|
153
|
+
platform: custom.platform,
|
|
154
|
+
custom_payment_id: custom.custom_payment_id,
|
|
155
|
+
service_charge: {
|
|
156
|
+
amount: payRef.current.surMoney,
|
|
157
|
+
percentage: payRef.current.surPercentRate
|
|
158
158
|
},
|
|
159
|
-
|
|
159
|
+
original_amount: payRef.current.amount
|
|
160
160
|
} : {},
|
|
161
161
|
order_id: orderIdRef.current,
|
|
162
162
|
amount: payRef.current.total,
|
|
@@ -215,7 +215,7 @@ var POS = ({
|
|
|
215
215
|
if (unloadRef.current || !netRef.current) {
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
if (err
|
|
218
|
+
if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
|
|
219
219
|
checkApi();
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -39,24 +39,47 @@ var import_model = require("../../model");
|
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var import_payGroup = require("../../payGroup");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
42
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var import_utils2 = require("../../utils");
|
|
44
45
|
var ApplePay = (props, ref) => {
|
|
45
|
-
var _a;
|
|
46
|
+
var _a, _b;
|
|
46
47
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
47
48
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
48
49
|
const context = (0, import_useEngineContext.default)();
|
|
49
50
|
const { config } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
|
|
51
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
52
|
+
orderId: ((_b = state.payGroup) == null ? void 0 : _b.order_id) || "unknown",
|
|
53
|
+
step: "2"
|
|
54
|
+
});
|
|
50
55
|
const init = async ({ payGroup }) => {
|
|
51
|
-
var _a2,
|
|
56
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
57
|
+
paymentLogger.addLog({
|
|
58
|
+
key: "ApplePay初始化开始",
|
|
59
|
+
value: ""
|
|
60
|
+
});
|
|
52
61
|
setOpen(true);
|
|
53
62
|
const utils = context.appHelper.utils || {};
|
|
54
|
-
const dvaStore = (
|
|
63
|
+
const dvaStore = (_b2 = (_a2 = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a2.call(utils)) == null ? void 0 : _b2.getState();
|
|
55
64
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
56
65
|
if (!values) {
|
|
66
|
+
paymentLogger.addLog({
|
|
67
|
+
key: "ApplePay获取支付参数失败",
|
|
68
|
+
value: {
|
|
69
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未找到存储的支付参数`,
|
|
70
|
+
data: {
|
|
71
|
+
payGroup
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
paymentLogger.sendLogs("ApplePay获取支付参数失败");
|
|
57
76
|
setOpen(false);
|
|
58
77
|
return;
|
|
59
78
|
}
|
|
79
|
+
paymentLogger.addLog({
|
|
80
|
+
key: "ApplePay获取支付参数成功",
|
|
81
|
+
value: ""
|
|
82
|
+
});
|
|
60
83
|
try {
|
|
61
84
|
const locale = ((_c = dvaStore.core) == null ? void 0 : _c.translateLocale) || "en";
|
|
62
85
|
const shopId = (_f = (_e = (_d = dvaStore.core) == null ? void 0 : _d.core) == null ? void 0 : _e.shop) == null ? void 0 : _f.id;
|
|
@@ -68,8 +91,24 @@ var ApplePay = (props, ref) => {
|
|
|
68
91
|
`/apple-pay?order_id=${(_g = state.payGroup) == null ? void 0 : _g.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
|
|
69
92
|
state.history
|
|
70
93
|
)}`;
|
|
94
|
+
paymentLogger.addLog({
|
|
95
|
+
key: "ApplePay准备跳转",
|
|
96
|
+
value: ""
|
|
97
|
+
});
|
|
98
|
+
paymentLogger.sendLogs("ApplePay跳转成功");
|
|
71
99
|
window.location.href = _href;
|
|
72
100
|
} catch (err) {
|
|
101
|
+
paymentLogger.addLog({
|
|
102
|
+
key: "ApplePay处理错误",
|
|
103
|
+
value: {
|
|
104
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} ApplePay处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
105
|
+
data: {
|
|
106
|
+
payGroup,
|
|
107
|
+
values
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
paymentLogger.sendLogs("ApplePay处理失败", err);
|
|
73
112
|
setOpen(false);
|
|
74
113
|
}
|
|
75
114
|
};
|
|
@@ -35,30 +35,67 @@ module.exports = __toCommonJS(BankDeposit_exports);
|
|
|
35
35
|
var import_react = require("react");
|
|
36
36
|
var import_model = require("../../model");
|
|
37
37
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
38
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
38
39
|
var import_utils = require("../../utils");
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
41
|
var BankDeposit = (props, ref) => {
|
|
42
|
+
var _a;
|
|
41
43
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
42
44
|
const context = (0, import_useEngineContext.default)();
|
|
45
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
46
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
47
|
+
step: "2"
|
|
48
|
+
});
|
|
43
49
|
const init = async ({ payGroup }) => {
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
var _a2, _b;
|
|
51
|
+
paymentLogger.addLog({
|
|
52
|
+
key: "BankDeposit初始化开始",
|
|
53
|
+
value: ""
|
|
54
|
+
});
|
|
55
|
+
try {
|
|
56
|
+
const platform = ((_b = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b.platform) || "h5";
|
|
57
|
+
let _item = payGroup == null ? void 0 : payGroup.otherPayment;
|
|
58
|
+
paymentLogger.addLog({
|
|
59
|
+
key: "BankDeposit平台检测",
|
|
60
|
+
value: ""
|
|
61
|
+
});
|
|
62
|
+
if (platform === "pc") {
|
|
63
|
+
paymentLogger.addLog({
|
|
64
|
+
key: "BankDepositPC处理",
|
|
65
|
+
value: ""
|
|
66
|
+
});
|
|
67
|
+
state.payCallback({
|
|
68
|
+
key: _item.service,
|
|
69
|
+
data: {
|
|
70
|
+
order_id: payGroup.order_id,
|
|
71
|
+
payment_method: _item.title
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
paymentLogger.sendLogs("BankDepositPC处理成功");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const _href = `${(0, import_utils.formatFranchiseeRoute)(
|
|
78
|
+
`/pay/manual-transfer?id=${(payGroup == null ? void 0 : payGroup.order_id) || (payGroup == null ? void 0 : payGroup.order_id)}`,
|
|
79
|
+
state.history
|
|
80
|
+
)}`;
|
|
81
|
+
paymentLogger.addLog({
|
|
82
|
+
key: "BankDepositH5准备跳转",
|
|
83
|
+
value: ""
|
|
84
|
+
});
|
|
85
|
+
paymentLogger.sendLogs("BankDepositH5跳转成功");
|
|
86
|
+
state.history.push(_href);
|
|
87
|
+
} catch (err) {
|
|
88
|
+
paymentLogger.addLog({
|
|
89
|
+
key: "BankDeposit处理错误",
|
|
90
|
+
value: {
|
|
91
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} BankDeposit处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
92
|
+
data: {
|
|
93
|
+
payGroup
|
|
94
|
+
}
|
|
53
95
|
}
|
|
54
96
|
});
|
|
55
|
-
|
|
97
|
+
paymentLogger.sendLogs("BankDeposit处理失败", err);
|
|
56
98
|
}
|
|
57
|
-
const _href = `${(0, import_utils.formatFranchiseeRoute)(
|
|
58
|
-
`/pay/manual-transfer?id=${(payGroup == null ? void 0 : payGroup.order_id) || (payGroup == null ? void 0 : payGroup.order_id)}`,
|
|
59
|
-
state.history
|
|
60
|
-
)}`;
|
|
61
|
-
state.history.push(_href);
|
|
62
99
|
};
|
|
63
100
|
(0, import_react.useImperativeHandle)(
|
|
64
101
|
ref,
|