@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
|
@@ -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/pay/toC/PaymentMethods/CashManual/index.tsx
|
|
@@ -26,23 +36,71 @@ var import_react = require("react");
|
|
|
26
36
|
var import_serve = require("./serve");
|
|
27
37
|
var import_model = require("../../model");
|
|
28
38
|
var import_payGroup = require("../../payGroup");
|
|
39
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
29
40
|
var import_index = require("./index.less");
|
|
30
41
|
var CashManual = (props, ref) => {
|
|
42
|
+
var _a;
|
|
31
43
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
44
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
45
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
46
|
+
step: "2"
|
|
47
|
+
});
|
|
32
48
|
const init = async ({ payGroup }) => {
|
|
33
|
-
var
|
|
34
|
-
|
|
49
|
+
var _a2, _b;
|
|
50
|
+
paymentLogger.addLog({
|
|
51
|
+
key: "CashManual初始化开始",
|
|
52
|
+
value: ""
|
|
53
|
+
});
|
|
54
|
+
let current = ((_a2 = state.payGroup) == null ? void 0 : _a2.otherPayment) || {};
|
|
35
55
|
const orderId = (payGroup == null ? void 0 : payGroup.order_id) || ((_b = state.payGroup) == null ? void 0 : _b.order_id);
|
|
36
56
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(orderId);
|
|
57
|
+
if (!values) {
|
|
58
|
+
paymentLogger.addLog({
|
|
59
|
+
key: "CashManual获取支付参数失败",
|
|
60
|
+
value: {
|
|
61
|
+
title: `订单${orderId} 未找到存储的支付参数`,
|
|
62
|
+
data: {
|
|
63
|
+
payGroup
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
paymentLogger.sendLogs("CashManual获取支付参数失败");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
paymentLogger.addLog({
|
|
71
|
+
key: "CashManual获取支付参数成功",
|
|
72
|
+
value: ""
|
|
73
|
+
});
|
|
37
74
|
try {
|
|
75
|
+
paymentLogger.addLog({
|
|
76
|
+
key: "CashManual开始支付API调用",
|
|
77
|
+
value: ""
|
|
78
|
+
});
|
|
38
79
|
await (0, import_serve.customPaymentApi)(orderId, {
|
|
39
80
|
params: current.params,
|
|
40
81
|
...values
|
|
41
82
|
});
|
|
83
|
+
paymentLogger.addLog({
|
|
84
|
+
key: "CashManual支付API调用成功",
|
|
85
|
+
value: ""
|
|
86
|
+
});
|
|
87
|
+
paymentLogger.sendLogs("CashManual支付成功");
|
|
42
88
|
state.payCallback({
|
|
43
89
|
key: "success"
|
|
44
90
|
});
|
|
45
91
|
} catch (err) {
|
|
92
|
+
paymentLogger.addLog({
|
|
93
|
+
key: "CashManual支付错误",
|
|
94
|
+
value: {
|
|
95
|
+
title: `订单${orderId} CashManual支付失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
96
|
+
data: {
|
|
97
|
+
payGroup,
|
|
98
|
+
current,
|
|
99
|
+
values
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
paymentLogger.sendLogs("CashManual支付失败", err);
|
|
46
104
|
}
|
|
47
105
|
};
|
|
48
106
|
(0, import_react.useImperativeHandle)(
|
|
@@ -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/pay/toC/PaymentMethods/CustomPayment/index.tsx
|
|
@@ -26,23 +36,71 @@ var import_react = require("react");
|
|
|
26
36
|
var import_serve = require("./serve");
|
|
27
37
|
var import_model = require("../../model");
|
|
28
38
|
var import_payGroup = require("../../payGroup");
|
|
39
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
29
40
|
var import_index = require("./index.less");
|
|
30
41
|
var CustomPayment = (props, ref) => {
|
|
42
|
+
var _a;
|
|
31
43
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
44
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
45
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
46
|
+
step: "2"
|
|
47
|
+
});
|
|
32
48
|
const init = async ({ payGroup }) => {
|
|
33
|
-
var
|
|
34
|
-
|
|
49
|
+
var _a2, _b;
|
|
50
|
+
paymentLogger.addLog({
|
|
51
|
+
key: "CustomPayment初始化开始",
|
|
52
|
+
value: ""
|
|
53
|
+
});
|
|
54
|
+
let current = ((_a2 = state.payGroup) == null ? void 0 : _a2.otherPayment) || {};
|
|
35
55
|
const orderId = (payGroup == null ? void 0 : payGroup.order_id) || ((_b = state.payGroup) == null ? void 0 : _b.order_id);
|
|
36
56
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(orderId);
|
|
57
|
+
if (!values) {
|
|
58
|
+
paymentLogger.addLog({
|
|
59
|
+
key: "CustomPayment获取支付参数失败",
|
|
60
|
+
value: {
|
|
61
|
+
title: `订单${orderId} 未找到存储的支付参数`,
|
|
62
|
+
data: {
|
|
63
|
+
payGroup
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
paymentLogger.sendLogs("CustomPayment获取支付参数失败");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
paymentLogger.addLog({
|
|
71
|
+
key: "CustomPayment获取支付参数成功",
|
|
72
|
+
value: ""
|
|
73
|
+
});
|
|
37
74
|
try {
|
|
75
|
+
paymentLogger.addLog({
|
|
76
|
+
key: "CustomPayment开始支付API调用",
|
|
77
|
+
value: ""
|
|
78
|
+
});
|
|
38
79
|
await (0, import_serve.customPaymentApi)(orderId, {
|
|
39
80
|
params: current.params,
|
|
40
81
|
...values
|
|
41
82
|
});
|
|
83
|
+
paymentLogger.addLog({
|
|
84
|
+
key: "CustomPayment支付API调用成功",
|
|
85
|
+
value: ""
|
|
86
|
+
});
|
|
87
|
+
paymentLogger.sendLogs("CustomPayment支付成功");
|
|
42
88
|
state.payCallback({
|
|
43
89
|
key: "success"
|
|
44
90
|
});
|
|
45
91
|
} catch (err) {
|
|
92
|
+
paymentLogger.addLog({
|
|
93
|
+
key: "CustomPayment支付错误",
|
|
94
|
+
value: {
|
|
95
|
+
title: `订单${orderId} CustomPayment支付失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
96
|
+
data: {
|
|
97
|
+
payGroup,
|
|
98
|
+
current,
|
|
99
|
+
values
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
paymentLogger.sendLogs("CustomPayment支付失败", err);
|
|
46
104
|
}
|
|
47
105
|
};
|
|
48
106
|
(0, import_react.useImperativeHandle)(
|
|
@@ -39,30 +39,89 @@ var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoadi
|
|
|
39
39
|
var import_serve = require("./serve");
|
|
40
40
|
var import_model = require("../../model");
|
|
41
41
|
var import_payGroup = require("../../payGroup");
|
|
42
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var GlobePayAliPayH5 = (props, ref) => {
|
|
45
|
+
var _a;
|
|
44
46
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
45
47
|
const { onChange } = props;
|
|
46
48
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
47
49
|
const [showSuccessBackButton, setShowSuccessBackButton] = (0, import_react.useState)(false);
|
|
50
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
51
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
52
|
+
step: "2"
|
|
53
|
+
});
|
|
48
54
|
const init = async ({ payGroup }) => {
|
|
55
|
+
paymentLogger.addLog({
|
|
56
|
+
key: "GlobePayAliPayH5初始化开始",
|
|
57
|
+
value: ""
|
|
58
|
+
});
|
|
49
59
|
setOpen(true);
|
|
50
60
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
51
61
|
if (!values) {
|
|
62
|
+
paymentLogger.addLog({
|
|
63
|
+
key: "GlobePayAliPayH5获取支付参数失败",
|
|
64
|
+
value: {
|
|
65
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未找到存储的支付参数`,
|
|
66
|
+
data: {
|
|
67
|
+
payGroup
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
paymentLogger.sendLogs("GlobePayAliPayH5获取支付参数失败");
|
|
52
72
|
setOpen(false);
|
|
53
73
|
return;
|
|
54
74
|
}
|
|
75
|
+
paymentLogger.addLog({
|
|
76
|
+
key: "GlobePayAliPayH5获取支付参数成功",
|
|
77
|
+
value: ""
|
|
78
|
+
});
|
|
55
79
|
try {
|
|
80
|
+
paymentLogger.addLog({
|
|
81
|
+
key: "GlobePayAliPayH5开始获取支付链接",
|
|
82
|
+
value: ""
|
|
83
|
+
});
|
|
56
84
|
const data = await (0, import_serve.getAliPayUrl)(payGroup.order_id, values);
|
|
57
85
|
const url = data.url || (data == null ? void 0 : data.pay_url);
|
|
58
86
|
if (url) {
|
|
87
|
+
paymentLogger.addLog({
|
|
88
|
+
key: "GlobePayAliPayH5获取支付链接成功",
|
|
89
|
+
value: ""
|
|
90
|
+
});
|
|
59
91
|
(0, import_payGroup.setPayNumber)(payGroup == null ? void 0 : payGroup.order_id, data == null ? void 0 : data.pay_number);
|
|
92
|
+
paymentLogger.addLog({
|
|
93
|
+
key: "GlobePayAliPayH5准备跳转支付宝",
|
|
94
|
+
value: ""
|
|
95
|
+
});
|
|
60
96
|
setShowSuccessBackButton(true);
|
|
97
|
+
paymentLogger.sendLogs("GlobePayAliPayH5跳转成功");
|
|
61
98
|
window.location.href = url;
|
|
62
99
|
} else {
|
|
100
|
+
paymentLogger.addLog({
|
|
101
|
+
key: "GlobePayAliPayH5未获取到支付链接",
|
|
102
|
+
value: {
|
|
103
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未获取到有效的支付链接`,
|
|
104
|
+
data: {
|
|
105
|
+
payGroup,
|
|
106
|
+
response: data
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
paymentLogger.sendLogs("GlobePayAliPayH5未获取到支付链接");
|
|
63
111
|
setOpen(false);
|
|
64
112
|
}
|
|
65
113
|
} catch (err) {
|
|
114
|
+
paymentLogger.addLog({
|
|
115
|
+
key: "GlobePayAliPayH5处理错误",
|
|
116
|
+
value: {
|
|
117
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} GlobePayAliPayH5处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
118
|
+
data: {
|
|
119
|
+
payGroup,
|
|
120
|
+
values
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
paymentLogger.sendLogs("GlobePayAliPayH5处理失败", err);
|
|
66
125
|
setOpen(false);
|
|
67
126
|
}
|
|
68
127
|
};
|
|
@@ -73,8 +132,13 @@ var GlobePayAliPayH5 = (props, ref) => {
|
|
|
73
132
|
})
|
|
74
133
|
);
|
|
75
134
|
const handleSuccessBack = () => {
|
|
76
|
-
var
|
|
77
|
-
|
|
135
|
+
var _a2;
|
|
136
|
+
paymentLogger.addLog({
|
|
137
|
+
key: "GlobePayAliPayH5用户确认支付成功",
|
|
138
|
+
value: ""
|
|
139
|
+
});
|
|
140
|
+
paymentLogger.sendLogs("GlobePayAliPayH5支付成功");
|
|
141
|
+
(_a2 = state.payCallback) == null ? void 0 : _a2.call(state, {
|
|
78
142
|
key: "success"
|
|
79
143
|
});
|
|
80
144
|
};
|
|
@@ -37,28 +37,89 @@ var import_materials = require("@pisell/materials");
|
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoading"));
|
|
39
39
|
var import_serve = require("./serve");
|
|
40
|
+
var import_model = require("../../model");
|
|
40
41
|
var import_payGroup = require("../../payGroup");
|
|
42
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
41
43
|
var import_index = require("./index.less");
|
|
42
44
|
var GlobePayPaypalH5 = (props, ref) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
43
47
|
const { onChange } = props;
|
|
44
48
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
49
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
50
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
51
|
+
step: "2"
|
|
52
|
+
});
|
|
45
53
|
const init = async ({ payGroup }) => {
|
|
54
|
+
paymentLogger.addLog({
|
|
55
|
+
key: "GlobePayPaypalH5初始化开始",
|
|
56
|
+
value: ""
|
|
57
|
+
});
|
|
46
58
|
setOpen(true);
|
|
47
59
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
48
60
|
if (!values) {
|
|
61
|
+
paymentLogger.addLog({
|
|
62
|
+
key: "GlobePayPaypalH5获取支付参数失败",
|
|
63
|
+
value: {
|
|
64
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未找到存储的支付参数`,
|
|
65
|
+
data: {
|
|
66
|
+
payGroup
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
paymentLogger.sendLogs("GlobePayPaypalH5获取支付参数失败");
|
|
49
71
|
setOpen(false);
|
|
50
72
|
return;
|
|
51
73
|
}
|
|
74
|
+
paymentLogger.addLog({
|
|
75
|
+
key: "GlobePayPaypalH5获取支付参数成功",
|
|
76
|
+
value: ""
|
|
77
|
+
});
|
|
52
78
|
try {
|
|
79
|
+
paymentLogger.addLog({
|
|
80
|
+
key: "GlobePayPaypalH5开始获取支付链接",
|
|
81
|
+
value: ""
|
|
82
|
+
});
|
|
53
83
|
const data = await (0, import_serve.getAliPayUrl)(payGroup.order_id, values);
|
|
54
84
|
const url = data.url || (data == null ? void 0 : data.pay_url);
|
|
55
85
|
if (url) {
|
|
86
|
+
paymentLogger.addLog({
|
|
87
|
+
key: "GlobePayPaypalH5获取支付链接成功",
|
|
88
|
+
value: ""
|
|
89
|
+
});
|
|
56
90
|
(0, import_payGroup.setPayNumber)(payGroup == null ? void 0 : payGroup.order_id, data == null ? void 0 : data.pay_number);
|
|
91
|
+
paymentLogger.addLog({
|
|
92
|
+
key: "GlobePayPaypalH5准备跳转Paypal",
|
|
93
|
+
value: ""
|
|
94
|
+
});
|
|
95
|
+
paymentLogger.sendLogs("GlobePayPaypalH5跳转成功");
|
|
57
96
|
window.location.href = url;
|
|
58
97
|
} else {
|
|
98
|
+
paymentLogger.addLog({
|
|
99
|
+
key: "GlobePayPaypalH5未获取到支付链接",
|
|
100
|
+
value: {
|
|
101
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未获取到有效的支付链接`,
|
|
102
|
+
data: {
|
|
103
|
+
payGroup,
|
|
104
|
+
response: data
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
paymentLogger.sendLogs("GlobePayPaypalH5未获取到支付链接");
|
|
59
109
|
setOpen(false);
|
|
60
110
|
}
|
|
61
111
|
} catch (err) {
|
|
112
|
+
paymentLogger.addLog({
|
|
113
|
+
key: "GlobePayPaypalH5处理错误",
|
|
114
|
+
value: {
|
|
115
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} GlobePayPaypalH5处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
116
|
+
data: {
|
|
117
|
+
payGroup,
|
|
118
|
+
values
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
paymentLogger.sendLogs("GlobePayPaypalH5处理失败", err);
|
|
62
123
|
setOpen(false);
|
|
63
124
|
}
|
|
64
125
|
};
|
|
@@ -35,19 +35,48 @@ module.exports = __toCommonJS(GlobePayQrcode_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_index = require("./index.less");
|
|
39
40
|
var GlobePayQrcode = (props, ref) => {
|
|
41
|
+
var _a;
|
|
40
42
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
41
43
|
const context = (0, import_useEngineContext.default)();
|
|
44
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
45
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
46
|
+
step: "2"
|
|
47
|
+
});
|
|
42
48
|
const init = async ({ payGroup }) => {
|
|
49
|
+
paymentLogger.addLog({
|
|
50
|
+
key: "GlobePayQrcode初始化开始",
|
|
51
|
+
value: ""
|
|
52
|
+
});
|
|
43
53
|
try {
|
|
44
54
|
let _item = payGroup == null ? void 0 : payGroup.otherPayment;
|
|
55
|
+
paymentLogger.addLog({
|
|
56
|
+
key: "GlobePayQrcode获取支付配置",
|
|
57
|
+
value: ""
|
|
58
|
+
});
|
|
59
|
+
paymentLogger.addLog({
|
|
60
|
+
key: "GlobePayQrcode准备回调",
|
|
61
|
+
value: ""
|
|
62
|
+
});
|
|
63
|
+
paymentLogger.sendLogs("GlobePayQrcode处理成功");
|
|
45
64
|
state.payCallback({
|
|
46
65
|
key: _item.service,
|
|
47
66
|
data: payGroup
|
|
48
67
|
});
|
|
49
68
|
return;
|
|
50
69
|
} catch (err) {
|
|
70
|
+
paymentLogger.addLog({
|
|
71
|
+
key: "GlobePayQrcode处理错误",
|
|
72
|
+
value: {
|
|
73
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} GlobePayQrcode处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
74
|
+
data: {
|
|
75
|
+
payGroup
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
paymentLogger.sendLogs("GlobePayQrcode处理失败", err);
|
|
51
80
|
}
|
|
52
81
|
};
|
|
53
82
|
(0, import_react.useImperativeHandle)(
|
|
@@ -37,28 +37,89 @@ var import_materials = require("@pisell/materials");
|
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoading"));
|
|
39
39
|
var import_serve = require("./serve");
|
|
40
|
+
var import_model = require("../../model");
|
|
40
41
|
var import_payGroup = require("../../payGroup");
|
|
42
|
+
var import_usePaymentLogger = __toESM(require("../../../../../hooks/usePaymentLogger"));
|
|
41
43
|
var import_index = require("./index.less");
|
|
42
44
|
var GlobePayWxH5 = (props, ref) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
43
47
|
const { onChange } = props;
|
|
44
48
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
49
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
50
|
+
orderId: ((_a = state.payGroup) == null ? void 0 : _a.order_id) || "unknown",
|
|
51
|
+
step: "2"
|
|
52
|
+
});
|
|
45
53
|
const init = async ({ payGroup }) => {
|
|
54
|
+
paymentLogger.addLog({
|
|
55
|
+
key: "GlobePayWxH5初始化开始",
|
|
56
|
+
value: ""
|
|
57
|
+
});
|
|
46
58
|
setOpen(true);
|
|
47
59
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
48
60
|
if (!values) {
|
|
61
|
+
paymentLogger.addLog({
|
|
62
|
+
key: "GlobePayWxH5获取支付参数失败",
|
|
63
|
+
value: {
|
|
64
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未找到存储的支付参数`,
|
|
65
|
+
data: {
|
|
66
|
+
payGroup
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
paymentLogger.sendLogs("GlobePayWxH5获取支付参数失败");
|
|
49
71
|
setOpen(false);
|
|
50
72
|
return;
|
|
51
73
|
}
|
|
74
|
+
paymentLogger.addLog({
|
|
75
|
+
key: "GlobePayWxH5获取支付参数成功",
|
|
76
|
+
value: ""
|
|
77
|
+
});
|
|
52
78
|
try {
|
|
79
|
+
paymentLogger.addLog({
|
|
80
|
+
key: "GlobePayWxH5开始获取支付链接",
|
|
81
|
+
value: ""
|
|
82
|
+
});
|
|
53
83
|
const data = await (0, import_serve.getAliPayUrl)(payGroup.order_id, values);
|
|
54
84
|
const url = data.url || (data == null ? void 0 : data.pay_url);
|
|
55
85
|
if (url) {
|
|
86
|
+
paymentLogger.addLog({
|
|
87
|
+
key: "GlobePayWxH5获取支付链接成功",
|
|
88
|
+
value: ""
|
|
89
|
+
});
|
|
56
90
|
(0, import_payGroup.setPayNumber)(payGroup == null ? void 0 : payGroup.order_id, data == null ? void 0 : data.pay_number);
|
|
91
|
+
paymentLogger.addLog({
|
|
92
|
+
key: "GlobePayWxH5准备跳转微信",
|
|
93
|
+
value: ""
|
|
94
|
+
});
|
|
95
|
+
paymentLogger.sendLogs("GlobePayWxH5跳转成功");
|
|
57
96
|
window.location.href = url;
|
|
58
97
|
} else {
|
|
98
|
+
paymentLogger.addLog({
|
|
99
|
+
key: "GlobePayWxH5未获取到支付链接",
|
|
100
|
+
value: {
|
|
101
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未获取到有效的支付链接`,
|
|
102
|
+
data: {
|
|
103
|
+
payGroup,
|
|
104
|
+
response: data
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
paymentLogger.sendLogs("GlobePayWxH5未获取到支付链接");
|
|
59
109
|
setOpen(false);
|
|
60
110
|
}
|
|
61
111
|
} catch (err) {
|
|
112
|
+
paymentLogger.addLog({
|
|
113
|
+
key: "GlobePayWxH5处理错误",
|
|
114
|
+
value: {
|
|
115
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} GlobePayWxH5处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
116
|
+
data: {
|
|
117
|
+
payGroup,
|
|
118
|
+
values
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
paymentLogger.sendLogs("GlobePayWxH5处理失败", err);
|
|
62
123
|
setOpen(false);
|
|
63
124
|
}
|
|
64
125
|
};
|
|
@@ -39,27 +39,55 @@ var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoadi
|
|
|
39
39
|
var import_model = require("../../model");
|
|
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_utils2 = require("../../utils");
|
|
43
44
|
var GooglePay = (props, ref) => {
|
|
44
|
-
var _a, _b;
|
|
45
|
+
var _a, _b, _c;
|
|
45
46
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
46
47
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
47
48
|
const context = (0, import_useEngineContext.default)();
|
|
48
49
|
const { config } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
|
|
49
50
|
const { interaction } = (_b = context.appHelper) == null ? void 0 : _b.utils;
|
|
51
|
+
const paymentLogger = (0, import_usePaymentLogger.default)({
|
|
52
|
+
orderId: ((_c = state.payGroup) == null ? void 0 : _c.order_id) || "unknown",
|
|
53
|
+
step: "2"
|
|
54
|
+
});
|
|
50
55
|
const init = async ({ payGroup }) => {
|
|
51
|
-
var _a2, _b2,
|
|
56
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
57
|
+
paymentLogger.addLog({
|
|
58
|
+
key: "GooglePay初始化开始",
|
|
59
|
+
value: ""
|
|
60
|
+
});
|
|
52
61
|
const utils = context.appHelper.utils || {};
|
|
53
62
|
const dvaStore = (_b2 = (_a2 = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a2.call(utils)) == null ? void 0 : _b2.getState();
|
|
54
63
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
55
|
-
if (((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) && ((_f = (_e = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e.isAndroid_ios) == null ? void 0 : _f.call(_e)) === "android") {
|
|
56
|
-
return (0, import_utils2.clientPayment)({ order_id: payGroup.order_id, type: "google_pay", values, interaction });
|
|
57
|
-
}
|
|
58
|
-
setOpen(true);
|
|
59
64
|
if (!values) {
|
|
65
|
+
paymentLogger.addLog({
|
|
66
|
+
key: "GooglePay获取支付参数失败",
|
|
67
|
+
value: {
|
|
68
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} 未找到存储的支付参数`,
|
|
69
|
+
data: {
|
|
70
|
+
payGroup
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
paymentLogger.sendLogs("GooglePay获取支付参数失败");
|
|
60
75
|
setOpen(false);
|
|
61
76
|
return;
|
|
62
77
|
}
|
|
78
|
+
paymentLogger.addLog({
|
|
79
|
+
key: "GooglePay获取支付参数成功",
|
|
80
|
+
value: ""
|
|
81
|
+
});
|
|
82
|
+
if (((_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.isAppEnv) == null ? void 0 : _d.call(_c2)) && ((_f = (_e = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e.isAndroid_ios) == null ? void 0 : _f.call(_e)) === "android") {
|
|
83
|
+
paymentLogger.addLog({
|
|
84
|
+
key: "GooglePay使用Android客户端支付",
|
|
85
|
+
value: ""
|
|
86
|
+
});
|
|
87
|
+
paymentLogger.sendLogs("GooglePay客户端支付");
|
|
88
|
+
return (0, import_utils2.clientPayment)({ order_id: payGroup.order_id, type: "google_pay", values, interaction });
|
|
89
|
+
}
|
|
90
|
+
setOpen(true);
|
|
63
91
|
try {
|
|
64
92
|
const locale = ((_g = dvaStore.core) == null ? void 0 : _g.translateLocale) || "en";
|
|
65
93
|
const shopId = (_j = (_i = (_h = dvaStore.core) == null ? void 0 : _h.core) == null ? void 0 : _i.shop) == null ? void 0 : _j.id;
|
|
@@ -71,8 +99,24 @@ var GooglePay = (props, ref) => {
|
|
|
71
99
|
`/google-pay?order_id=${(_k = state.payGroup) == null ? void 0 : _k.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
|
|
72
100
|
state.history
|
|
73
101
|
)}`;
|
|
102
|
+
paymentLogger.addLog({
|
|
103
|
+
key: "GooglePay准备跳转",
|
|
104
|
+
value: ""
|
|
105
|
+
});
|
|
106
|
+
paymentLogger.sendLogs("GooglePay跳转成功");
|
|
74
107
|
window.location.href = _href;
|
|
75
108
|
} catch (err) {
|
|
109
|
+
paymentLogger.addLog({
|
|
110
|
+
key: "GooglePay处理错误",
|
|
111
|
+
value: {
|
|
112
|
+
title: `订单${payGroup == null ? void 0 : payGroup.order_id} GooglePay处理失败: ${(err == null ? void 0 : err.message) || "未知错误"}`,
|
|
113
|
+
data: {
|
|
114
|
+
payGroup,
|
|
115
|
+
values
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
paymentLogger.sendLogs("GooglePay处理失败", err);
|
|
76
120
|
setOpen(false);
|
|
77
121
|
}
|
|
78
122
|
};
|
|
@@ -171,6 +171,7 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
|
|
|
171
171
|
return defaultReturnParams;
|
|
172
172
|
}
|
|
173
173
|
const displayBox = document.getElementById("threeds-container");
|
|
174
|
+
displayBox.innerHTML = "";
|
|
174
175
|
let iframe = document.createElement("iframe");
|
|
175
176
|
iframe.classList.add("hidden_TDS_From");
|
|
176
177
|
iframe.name = "threeDSMethodIframe";
|
|
@@ -286,6 +287,7 @@ var checkTDSAuth = async (step2, step3, callback) => {
|
|
|
286
287
|
};
|
|
287
288
|
var createChallengeIframe = (challengeData, callback) => {
|
|
288
289
|
const displayBox = document.getElementById("threeds-container");
|
|
290
|
+
displayBox.innerHTML = "";
|
|
289
291
|
let iframe = document.createElement("iframe");
|
|
290
292
|
iframe.classList.add("tdsv2challengeIframe");
|
|
291
293
|
iframe.name = "challengeIframe";
|