@pisell/private-materials 6.3.65 → 6.3.67
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- 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/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +42 -23
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +7 -8
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.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/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/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/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- 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/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.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/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/tip.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/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/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/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.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/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/index.js +54 -5
- package/es/components/pay/toC/PaymentList/index.less +58 -1
- package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +7 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +21 -0
- package/es/components/pay/toC/PaymentList/utils.js +165 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/index.js +2 -1
- package/es/components/pay/toC/locales.d.ts +6 -0
- package/es/components/pay/toC/locales.js +9 -3
- 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/pisellSelectCustomerModal/RightPanel/List/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/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/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/systemSettings/registry/components/SectionList.js +5 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plus/productSelect/index.js +5 -1
- 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/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
- package/es/pro/Login2.0/steps/CodeInput.js +37 -7
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- 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/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +20 -3
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.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/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/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/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- 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/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.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/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/tip.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/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/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/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.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/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/index.js +36 -5
- package/lib/components/pay/toC/PaymentList/index.less +58 -1
- package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +5 -1
- package/lib/components/pay/toC/PaymentList/utils.d.ts +21 -0
- package/lib/components/pay/toC/PaymentList/utils.js +134 -6
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/index.js +2 -1
- package/lib/components/pay/toC/locales.d.ts +6 -0
- package/lib/components/pay/toC/locales.js +9 -3
- 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/pisellSelectCustomerModal/RightPanel/List/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/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/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/systemSettings/registry/components/SectionList.js +4 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/productSelect/index.js +4 -1
- 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/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
- package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ export interface PaymentListProps {
|
|
|
12
12
|
renderTitle?: () => React.ReactNode;
|
|
13
13
|
}
|
|
14
14
|
export interface PaymentListRef {
|
|
15
|
-
init: (props: any) => {};
|
|
15
|
+
init: (props: any, amount?: number) => {};
|
|
16
16
|
calculateSurcharge: (amount: number) => any;
|
|
17
17
|
}
|
|
18
18
|
declare const _default: React.ForwardRefExoticComponent<PaymentListProps & React.RefAttributes<unknown>>;
|
|
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import React, { useState, useMemo, useImperativeHandle, forwardRef } from 'react';
|
|
12
12
|
import { filterPaymentList, getPaymentList } from "./serve";
|
|
13
|
-
import { PisellCheckboxGroup, PisellRow, PisellTooltip, Iconfont, PisellEmpty } from '@pisell/materials';
|
|
13
|
+
import { PisellCheckboxGroup, PisellRow, PisellTooltip, Iconfont, PisellEmpty, Image } from '@pisell/materials';
|
|
14
14
|
import { calculateSurcharge } from "./utils";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
@@ -154,14 +154,14 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
154
154
|
* @Author: zhiwei.Wang
|
|
155
155
|
* @Date: 2024-08-16 10:53
|
|
156
156
|
*/
|
|
157
|
-
var init = function init(list) {
|
|
157
|
+
var init = function init(list, amount) {
|
|
158
158
|
var _context$appHelper2;
|
|
159
159
|
// 打开loading
|
|
160
160
|
setLoading(true);
|
|
161
161
|
var platform = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.constants) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.platform) || 'h5';
|
|
162
162
|
|
|
163
163
|
// 过滤数据
|
|
164
|
-
var _filterPaymentList = filterPaymentList(list, platform, isApp),
|
|
164
|
+
var _filterPaymentList = filterPaymentList(list, platform, isApp, amount),
|
|
165
165
|
paymentList = _filterPaymentList.paymentList,
|
|
166
166
|
walletPass = _filterPaymentList.walletPass;
|
|
167
167
|
|
|
@@ -262,6 +262,43 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
262
262
|
}));
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
+
/**
|
|
266
|
+
* @description: 渲染信用卡手续费弹窗
|
|
267
|
+
* @param {any} _item
|
|
268
|
+
* @return {*}
|
|
269
|
+
*/
|
|
270
|
+
var renderCreditCardToast = function renderCreditCardToast(_item) {
|
|
271
|
+
var _item$surcharge_confi;
|
|
272
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
273
|
+
className: "surcharge-modal-wrap surcharge-modal-wrap-credit-card"
|
|
274
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
275
|
+
className: "surcharge-modal-lists"
|
|
276
|
+
}, _item === null || _item === void 0 || (_item$surcharge_confi = _item.surcharge_config_result) === null || _item$surcharge_confi === void 0 ? void 0 : _item$surcharge_confi.map(function (d) {
|
|
277
|
+
var _d$icons, _d$lists;
|
|
278
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
279
|
+
key: d.name,
|
|
280
|
+
className: "surcharge-modal-list-item"
|
|
281
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: "surcharge-modal-list-item-header"
|
|
283
|
+
}, d === null || d === void 0 || (_d$icons = d.icons) === null || _d$icons === void 0 ? void 0 : _d$icons.map(function (icon) {
|
|
284
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
285
|
+
src: icon,
|
|
286
|
+
className: "header-icon",
|
|
287
|
+
isPreview: false
|
|
288
|
+
});
|
|
289
|
+
}), /*#__PURE__*/React.createElement("span", null, d.name)), /*#__PURE__*/React.createElement("div", {
|
|
290
|
+
className: "surcharge-modal-list-item-content"
|
|
291
|
+
}, d === null || d === void 0 || (_d$lists = d.lists) === null || _d$lists === void 0 ? void 0 : _d$lists.map(function (item) {
|
|
292
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
293
|
+
key: item.name,
|
|
294
|
+
className: "content-item"
|
|
295
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText(item.area_text)), /*#__PURE__*/React.createElement("span", {
|
|
296
|
+
className: "item-fee"
|
|
297
|
+
}, item.surcharge_fee), /*#__PURE__*/React.createElement("span", null, item.surcharge_text));
|
|
298
|
+
})));
|
|
299
|
+
})));
|
|
300
|
+
};
|
|
301
|
+
|
|
265
302
|
/**
|
|
266
303
|
* @title: 列表
|
|
267
304
|
* @description:
|
|
@@ -293,9 +330,12 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
293
330
|
onChange: paymentTypeChange,
|
|
294
331
|
optionClassName: 'payment-item',
|
|
295
332
|
renderOption: function renderOption(d, active) {
|
|
296
|
-
var _d$params, _d$params2;
|
|
333
|
+
var _d$params, _d$surcharge_config_r, _d$params2;
|
|
297
334
|
// 是否展示手续费icon
|
|
298
335
|
var showIcon = d.surcharge && d.service !== 'pisell.other.cashmanual' && d.service !== 'pisell.custom_payment' || (d === null || d === void 0 || (_d$params = d.params) === null || _d$params === void 0 ? void 0 : _d$params.description) && (d.service === 'pisell.other.cashmanual' || d.service === 'pisell.custom_payment');
|
|
336
|
+
|
|
337
|
+
// 是否显示单独的信用卡手续费弹窗
|
|
338
|
+
var showCreditCardToast = (d === null || d === void 0 ? void 0 : d.service) === 'mw.credit_card' && (d === null || d === void 0 || (_d$surcharge_config_r = d.surcharge_config_result) === null || _d$surcharge_config_r === void 0 ? void 0 : _d$surcharge_config_r.length) > 0;
|
|
299
339
|
return /*#__PURE__*/React.createElement(PisellRow, {
|
|
300
340
|
platform: "h5",
|
|
301
341
|
key: d.service,
|
|
@@ -316,9 +356,18 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
316
356
|
}, d.title, ' '), /*#__PURE__*/React.createElement("div", {
|
|
317
357
|
className: ""
|
|
318
358
|
}, (d !== null && d !== void 0 && (_d$params2 = d.params) !== null && _d$params2 !== void 0 && _d$params2.description || d.surcharge) && d.service !== 'pisell.offline_payment' ? /*#__PURE__*/React.createElement(PisellTooltip, {
|
|
319
|
-
title: renderToast(d),
|
|
359
|
+
title: showCreditCardToast ? renderCreditCardToast(d) : renderToast(d),
|
|
320
360
|
onClick: function onClick(e) {
|
|
321
361
|
e.stopPropagation();
|
|
362
|
+
},
|
|
363
|
+
overlayClassName: showCreditCardToast ? 'surcharge-tooltip-overlay-wrap' : '',
|
|
364
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
365
|
+
if (showCreditCardToast) {
|
|
366
|
+
var _triggerNode$closest;
|
|
367
|
+
var modalContainer = triggerNode === null || triggerNode === void 0 || (_triggerNode$closest = triggerNode.closest) === null || _triggerNode$closest === void 0 ? void 0 : _triggerNode$closest.call(triggerNode, '.toc-pay-modal-content .pisell-lowcode-modal');
|
|
368
|
+
return modalContainer || document.body;
|
|
369
|
+
}
|
|
370
|
+
return document.body;
|
|
322
371
|
}
|
|
323
372
|
}, /*#__PURE__*/React.createElement("span", {
|
|
324
373
|
className: classNames('surcharge-wrap', {
|
|
@@ -109,4 +109,61 @@
|
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.surcharge-tooltip-overlay-wrap{
|
|
115
|
+
max-width: 92% !important;
|
|
116
|
+
width: 92%;
|
|
117
|
+
left: 4% !important;
|
|
118
|
+
.pisell-lowcode-tooltip-inner{
|
|
119
|
+
background: #F2F4F7 !important;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.surcharge-modal-wrap-credit-card {
|
|
124
|
+
.surcharge-modal-lists {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: 16px;
|
|
128
|
+
.surcharge-modal-list-item {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 8px;
|
|
132
|
+
.surcharge-modal-list-item-header {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 12px;
|
|
136
|
+
color: #101828;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
line-height: 20px;
|
|
140
|
+
.header-icon{
|
|
141
|
+
width: 58px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.surcharge-modal-list-item-content {
|
|
145
|
+
display: flex;
|
|
146
|
+
gap: 12px;
|
|
147
|
+
.content-item {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
flex: 1;
|
|
151
|
+
padding: 8px 12px;
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
box-shadow: 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
154
|
+
background: white;
|
|
155
|
+
color: #475467;
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
font-weight: 400;
|
|
158
|
+
line-height: 18px;
|
|
159
|
+
.item-fee {
|
|
160
|
+
color: black;
|
|
161
|
+
font-size: 24px;
|
|
162
|
+
font-weight: 700;
|
|
163
|
+
line-height: 32px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
20
20
|
* @Author: zhiwei.Wang
|
|
21
21
|
* @Date: 2024-08-16 10:57
|
|
22
22
|
*/
|
|
23
|
-
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
|
|
23
|
+
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean, amount?: number) => {
|
|
24
24
|
message: string;
|
|
25
25
|
status: string;
|
|
26
26
|
paymentList: any[];
|
|
@@ -17,6 +17,7 @@ import { request } from "../../../../utils";
|
|
|
17
17
|
import { paymentKeys } from "./status";
|
|
18
18
|
import { isWx, isIOS } from '@pisell/utils';
|
|
19
19
|
import { paymentTypes, isCustomPayment } from "./status";
|
|
20
|
+
import { formatCreditCardSurchargeList } from "./utils";
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* @title: 获取支付列表
|
|
@@ -72,6 +73,7 @@ var sortArr = ['mw.google', 'mw.apple', 'mw.credit_card', 'stripe', 'pisell.bank
|
|
|
72
73
|
export var filterPaymentList = function filterPaymentList(list) {
|
|
73
74
|
var platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'h5';
|
|
74
75
|
var isApp = arguments.length > 2 ? arguments[2] : undefined;
|
|
76
|
+
var amount = arguments.length > 3 ? arguments[3] : undefined;
|
|
75
77
|
var paymentList = _toConsumableArray(list);
|
|
76
78
|
var _paymentKeys = _toConsumableArray(paymentKeys);
|
|
77
79
|
|
|
@@ -146,6 +148,11 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
146
148
|
if (isCustomPayment(d.service)) {
|
|
147
149
|
service = service + '|' + d.params.custom_payment_id;
|
|
148
150
|
}
|
|
151
|
+
|
|
152
|
+
// visa/master手续费特殊处理
|
|
153
|
+
if (service === 'mw.credit_card') {
|
|
154
|
+
d.surcharge_config_result = formatCreditCardSurchargeList(d, amount);
|
|
155
|
+
}
|
|
149
156
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
150
157
|
service: service,
|
|
151
158
|
title: d.name,
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: visa/master手续费是否一致
|
|
3
|
+
* @param {any} creditCardConfig
|
|
4
|
+
* @return {*}
|
|
5
|
+
*/
|
|
6
|
+
export declare const isCreditCardSurchargeSame: (creditCardConfig: any[]) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 格式化visa/master手续费
|
|
9
|
+
* @param {any} item 支付列表项
|
|
10
|
+
* @param {number} amount 订单金额
|
|
11
|
+
* @param {boolean} isSame 手续费是否一致
|
|
12
|
+
* @return {*}
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatCreditCardSurcharge: (item: any, amount: number, isSame: boolean) => any;
|
|
15
|
+
/**
|
|
16
|
+
* @description: 格式化visa/master手续费列表
|
|
17
|
+
* @param {any} item
|
|
18
|
+
* @param {number} amount
|
|
19
|
+
* @return {*}
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatCreditCardSurchargeList: (item: any, amount: number) => any;
|
|
1
22
|
/**
|
|
2
23
|
* @title: 计算支付列表的手续费
|
|
3
24
|
* @description:
|
|
@@ -1,9 +1,160 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
import visaIcon from "./payment/visa.png";
|
|
14
|
+
import creditCardIcon from "./payment/credit_card.png";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description: visa/master手续费是否一致
|
|
18
|
+
* @param {any} creditCardConfig
|
|
19
|
+
* @return {*}
|
|
20
|
+
*/
|
|
21
|
+
export var isCreditCardSurchargeSame = function isCreditCardSurchargeSame(creditCardConfig) {
|
|
22
|
+
try {
|
|
23
|
+
// 将配置项转换为map key为credit_card_type_area value为config对象
|
|
24
|
+
var configMap = {};
|
|
25
|
+
creditCardConfig.forEach(function (config) {
|
|
26
|
+
var key = "".concat((config === null || config === void 0 ? void 0 : config.credit_card_type) || '-', "_").concat((config === null || config === void 0 ? void 0 : config.area) || '-');
|
|
27
|
+
configMap[key] = config;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// 获取配置项
|
|
31
|
+
var visaDomestic = configMap['visa_domestic'];
|
|
32
|
+
var visaWorld = configMap['visa_world'];
|
|
33
|
+
var masterDomestic = configMap['master_domestic'];
|
|
34
|
+
var masterWorld = configMap['master_world'];
|
|
35
|
+
var formatFee = function formatFee(config) {
|
|
36
|
+
var _ref, _config$percent, _config$amount;
|
|
37
|
+
if (!config) return null;
|
|
38
|
+
|
|
39
|
+
// 后端字段不统一, 做下兼容
|
|
40
|
+
var percent = parseFloat((_ref = (_config$percent = config.percent) !== null && _config$percent !== void 0 ? _config$percent : config.percentage) !== null && _ref !== void 0 ? _ref : '0');
|
|
41
|
+
var amount = parseFloat((_config$amount = config.amount) !== null && _config$amount !== void 0 ? _config$amount : '0');
|
|
42
|
+
return {
|
|
43
|
+
percentStr: percent,
|
|
44
|
+
amountStr: amount
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
var visaDomesticFee = formatFee(visaDomestic);
|
|
48
|
+
var visaWorldFee = formatFee(visaWorld);
|
|
49
|
+
var masterDomesticFee = formatFee(masterDomestic);
|
|
50
|
+
var masterWorldFee = formatFee(masterWorld);
|
|
51
|
+
|
|
52
|
+
// 判断手续费是否一致的辅助函数
|
|
53
|
+
var isFeeSame = function isFeeSame(fee1, fee2) {
|
|
54
|
+
if (!fee1 || !fee2) return false;
|
|
55
|
+
|
|
56
|
+
// 判断百分比和固定金额是否一致
|
|
57
|
+
return fee1.percentStr === fee2.percentStr && fee1.amountStr === fee2.amountStr;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// 判断国内和国际手续费是否一致
|
|
61
|
+
var isDomesticSame = isFeeSame(visaDomesticFee, masterDomesticFee);
|
|
62
|
+
var isWorldSame = isFeeSame(visaWorldFee, masterWorldFee);
|
|
63
|
+
var isAllSame = isDomesticSame && isWorldSame;
|
|
64
|
+
return isAllSame;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @description: 计算手续费 百分比 * amount + 固定金额
|
|
72
|
+
* @param {any} config
|
|
73
|
+
* @param {number} amount
|
|
74
|
+
* @return {*}
|
|
75
|
+
*/
|
|
76
|
+
var totalFee = function totalFee(config, amount) {
|
|
77
|
+
var _config$percent2;
|
|
78
|
+
// 后端字段不统一?, 做下兼容
|
|
79
|
+
var percentageFee = parseFloat((_config$percent2 = config.percent) !== null && _config$percent2 !== void 0 ? _config$percent2 : config.percentage) * Number(amount);
|
|
80
|
+
var totalFee = percentageFee + parseFloat(config.amount);
|
|
81
|
+
return totalFee;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @description: 格式化visa/master手续费
|
|
86
|
+
* @param {any} item 支付列表项
|
|
87
|
+
* @param {number} amount 订单金额
|
|
88
|
+
* @param {boolean} isSame 手续费是否一致
|
|
89
|
+
* @return {*}
|
|
90
|
+
*/
|
|
91
|
+
export var formatCreditCardSurcharge = function formatCreditCardSurcharge(item, amount, isSame) {
|
|
92
|
+
try {
|
|
93
|
+
var surcharge_config = item.surcharge_config,
|
|
94
|
+
currency_symbol = item.currency_symbol;
|
|
95
|
+
|
|
96
|
+
// 格式化手续费列表
|
|
97
|
+
var formatSurchargeList = function formatSurchargeList(list) {
|
|
98
|
+
return list === null || list === void 0 ? void 0 : list.map(function (config) {
|
|
99
|
+
var _ref2, _config$percent3;
|
|
100
|
+
// 后端字段不统一, 做下兼容
|
|
101
|
+
var percentageFee = parseFloat((_ref2 = (_config$percent3 = config === null || config === void 0 ? void 0 : config.percent) !== null && _config$percent3 !== void 0 ? _config$percent3 : config === null || config === void 0 ? void 0 : config.percentage) !== null && _ref2 !== void 0 ? _ref2 : 0);
|
|
102
|
+
var percent = (percentageFee * 100).toFixed(2);
|
|
103
|
+
var amountFee = parseFloat(config === null || config === void 0 ? void 0 : config.amount).toFixed(2);
|
|
104
|
+
var _totalFee = totalFee(config, amount).toFixed(2);
|
|
105
|
+
var areaText = (config === null || config === void 0 ? void 0 : config.area) === 'world' ? 'tocPay.text.rest-of-world' : 'tocPay.text.domestic';
|
|
106
|
+
return _objectSpread(_objectSpread({}, config), {}, {
|
|
107
|
+
area_text: areaText,
|
|
108
|
+
surcharge_text: "".concat(percent, "% + ").concat(currency_symbol).concat(amountFee),
|
|
109
|
+
surcharge_fee: "".concat(currency_symbol).concat(_totalFee)
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
if (isSame) {
|
|
114
|
+
// 手续费一致 返回visa和master的其中一条手续费列表
|
|
115
|
+
var visaResult = surcharge_config.filter(function (config) {
|
|
116
|
+
return config.credit_card_type === 'visa';
|
|
117
|
+
});
|
|
118
|
+
return [{
|
|
119
|
+
icons: [visaIcon, creditCardIcon],
|
|
120
|
+
name: 'Visa / Mastercard',
|
|
121
|
+
lists: formatSurchargeList(visaResult)
|
|
122
|
+
}];
|
|
123
|
+
} else {
|
|
124
|
+
// 手续费不一致 分别返回visa和master的手续费列表
|
|
125
|
+
var _visaResult = surcharge_config.filter(function (config) {
|
|
126
|
+
return config.credit_card_type === 'visa';
|
|
127
|
+
});
|
|
128
|
+
var masterResult = surcharge_config.filter(function (config) {
|
|
129
|
+
return config.credit_card_type === 'master';
|
|
130
|
+
});
|
|
131
|
+
return [{
|
|
132
|
+
icons: [visaIcon],
|
|
133
|
+
name: 'Visa',
|
|
134
|
+
lists: formatSurchargeList(_visaResult)
|
|
135
|
+
}, {
|
|
136
|
+
icons: [creditCardIcon],
|
|
137
|
+
name: 'Mastercard',
|
|
138
|
+
lists: formatSurchargeList(masterResult)
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
console.error(error);
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @description: 格式化visa/master手续费列表
|
|
149
|
+
* @param {any} item
|
|
150
|
+
* @param {number} amount
|
|
151
|
+
* @return {*}
|
|
152
|
+
*/
|
|
153
|
+
export var formatCreditCardSurchargeList = function formatCreditCardSurchargeList(item, amount) {
|
|
154
|
+
var isSame = isCreditCardSurchargeSame((item === null || item === void 0 ? void 0 : item.surcharge_config) || []);
|
|
155
|
+
return formatCreditCardSurcharge(item || {}, amount, isSame);
|
|
156
|
+
};
|
|
157
|
+
|
|
7
158
|
/**
|
|
8
159
|
* @title: 计算支付列表的手续费
|
|
9
160
|
* @description:
|
|
@@ -27,11 +178,7 @@ export var calculateSurcharge = function calculateSurcharge(paymentList, amount)
|
|
|
27
178
|
|
|
28
179
|
// 分别计算出每一项的手续费 百分比 * amount + 固定金额
|
|
29
180
|
var fees = surcharge_config.map(function (config) {
|
|
30
|
-
|
|
31
|
-
// 后端字段不统一?, 做下兼容
|
|
32
|
-
var percentageFee = parseFloat((_config$percent = config.percent) !== null && _config$percent !== void 0 ? _config$percent : config.percentage) * Number(amount);
|
|
33
|
-
var totalFee = percentageFee + parseFloat(config.amount);
|
|
34
|
-
return totalFee;
|
|
181
|
+
return totalFee(config, amount);
|
|
35
182
|
});
|
|
36
183
|
|
|
37
184
|
// 取出最小值和最大值
|
|
@@ -48,6 +195,19 @@ export var calculateSurcharge = function calculateSurcharge(paymentList, amount)
|
|
|
48
195
|
// 不一致展示区间
|
|
49
196
|
payment.surcharge = "".concat(surcharge_text).concat(currency_symbol).concat(minFee.toFixed(2), " ~ ").concat(currency_symbol).concat(maxFee.toFixed(2));
|
|
50
197
|
}
|
|
198
|
+
|
|
199
|
+
// visa/master手续费特殊处理
|
|
200
|
+
if (payment.service === 'mw.credit_card') {
|
|
201
|
+
// 找出最小百分比和最大百分比
|
|
202
|
+
var percentList = surcharge_config.map(function (config) {
|
|
203
|
+
var _ref3, _config$percent4;
|
|
204
|
+
return parseFloat((_ref3 = (_config$percent4 = config.percent) !== null && _config$percent4 !== void 0 ? _config$percent4 : config.percentage) !== null && _ref3 !== void 0 ? _ref3 : '0') * 100;
|
|
205
|
+
});
|
|
206
|
+
var minPercent = Math.min.apply(Math, _toConsumableArray(percentList));
|
|
207
|
+
var maxPercent = Math.max.apply(Math, _toConsumableArray(percentList));
|
|
208
|
+
payment.surcharge = "".concat(surcharge_text).concat(minPercent, "% ~ ").concat(maxPercent, "%");
|
|
209
|
+
payment.surcharge_config_result = formatCreditCardSurchargeList(payment, amount);
|
|
210
|
+
}
|
|
51
211
|
return payment;
|
|
52
212
|
});
|
|
53
213
|
};
|
|
@@ -314,7 +314,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
314
314
|
|
|
315
315
|
// 初始化支付列表
|
|
316
316
|
_context3.next = 11;
|
|
317
|
-
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list);
|
|
317
|
+
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list, remain_amount || 0);
|
|
318
318
|
case 11:
|
|
319
319
|
// 解除loading
|
|
320
320
|
setTimeout(function () {
|
|
@@ -894,6 +894,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
894
894
|
open: open,
|
|
895
895
|
cancelVisible: false,
|
|
896
896
|
okText: okText,
|
|
897
|
+
wrapClassName: 'toc-pay-modal-content',
|
|
897
898
|
bodyStyle: {
|
|
898
899
|
padding: 24
|
|
899
900
|
},
|
|
@@ -98,6 +98,8 @@ declare const _default: {
|
|
|
98
98
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
99
99
|
'tocPay.text.paymentFailed': string;
|
|
100
100
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
101
|
+
'tocPay.text.domestic': string;
|
|
102
|
+
'tocPay.text.rest-of-world': string;
|
|
101
103
|
};
|
|
102
104
|
'zh-CN': {
|
|
103
105
|
'tocPay.text.checkout': string;
|
|
@@ -197,6 +199,8 @@ declare const _default: {
|
|
|
197
199
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
198
200
|
'tocPay.text.paymentFailed': string;
|
|
199
201
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
202
|
+
'tocPay.text.domestic': string;
|
|
203
|
+
'tocPay.text.rest-of-world': string;
|
|
200
204
|
};
|
|
201
205
|
'zh-HK': {
|
|
202
206
|
'tocPay.text.checkout': string;
|
|
@@ -296,6 +300,8 @@ declare const _default: {
|
|
|
296
300
|
'tocPay.text.paymentCompletedAndViewOrder': string;
|
|
297
301
|
'tocPay.text.paymentFailed': string;
|
|
298
302
|
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': string;
|
|
303
|
+
'tocPay.text.domestic': string;
|
|
304
|
+
'tocPay.text.rest-of-world': string;
|
|
299
305
|
};
|
|
300
306
|
};
|
|
301
307
|
export default _default;
|
|
@@ -117,7 +117,9 @@ export default {
|
|
|
117
117
|
'tocPay.text.returnAndSelectOtherPaymentMethod': 'Go Back / Choose Another Payment',
|
|
118
118
|
'tocPay.text.paymentCompletedAndViewOrder': 'Payment Completed / View Order',
|
|
119
119
|
'tocPay.text.paymentFailed': 'Not paid yet, please check if the payment is successful',
|
|
120
|
-
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': 'We are verifying your payment. Please check your order status later.'
|
|
120
|
+
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': 'We are verifying your payment. Please check your order status later.',
|
|
121
|
+
'tocPay.text.domestic': 'Domestic',
|
|
122
|
+
'tocPay.text.rest-of-world': 'Rest of world'
|
|
121
123
|
},
|
|
122
124
|
'zh-CN': {
|
|
123
125
|
'tocPay.text.checkout': '结账',
|
|
@@ -236,7 +238,9 @@ export default {
|
|
|
236
238
|
'tocPay.text.returnAndSelectOtherPaymentMethod': '返回 / 选择其他支付方式',
|
|
237
239
|
'tocPay.text.paymentCompletedAndViewOrder': '支付完成 / 查看订单',
|
|
238
240
|
'tocPay.text.paymentFailed': "未支付完成,请检查是否支付成功",
|
|
239
|
-
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': '我们正在确认您的支付状态,请稍后查看订单状态。'
|
|
241
|
+
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': '我们正在确认您的支付状态,请稍后查看订单状态。',
|
|
242
|
+
'tocPay.text.domestic': '本国',
|
|
243
|
+
'tocPay.text.rest-of-world': '国外'
|
|
240
244
|
},
|
|
241
245
|
'zh-HK': {
|
|
242
246
|
'tocPay.text.checkout': '結帳',
|
|
@@ -355,6 +359,8 @@ export default {
|
|
|
355
359
|
'tocPay.text.returnAndSelectOtherPaymentMethod': '返回 / 選擇其他支付方式',
|
|
356
360
|
'tocPay.text.paymentCompletedAndViewOrder': '支付完成 / 查看訂單',
|
|
357
361
|
'tocPay.text.paymentFailed': "未支付完成,请检查是否支付成功",
|
|
358
|
-
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': '我們正在確認您的支付狀態,請稍後查看訂單狀態。'
|
|
362
|
+
'tocPay.text.weAreVerifyingYourPaymentPleaseCheckYourOrderStatusLater': '我們正在確認您的支付狀態,請稍後查看訂單狀態。',
|
|
363
|
+
'tocPay.text.domestic': '本國',
|
|
364
|
+
'tocPay.text.rest-of-world': '國外'
|
|
359
365
|
}
|
|
360
366
|
};
|