mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
rename PaymentModal to AbstractPaymentModal
This commit is contained in:
parent
4f3a47ae04
commit
b5ab9fbc79
@ -28,7 +28,7 @@ export interface GatewayFormProps {
|
||||
formId: string,
|
||||
}
|
||||
|
||||
interface PaymentModalProps {
|
||||
interface AbstractPaymentModalProps {
|
||||
isOpen: boolean,
|
||||
toggleModal: () => void,
|
||||
afterSuccess: (result: any) => void,
|
||||
@ -50,7 +50,7 @@ const cgvFile = CustomAssetAPI.get(CustomAssetName.CgvFile);
|
||||
/**
|
||||
* This component is an abstract modal that must be extended by each payment gateway to include its payment form.
|
||||
*/
|
||||
export const PaymentModal: React.FC<PaymentModalProps> = ({ isOpen, toggleModal, afterSuccess, cartItems, currentUser, schedule, customer, logoFooter, GatewayForm, formId, className, formClassName }) => {
|
||||
export const AbstractPaymentModal: React.FC<AbstractPaymentModalProps> = ({ isOpen, toggleModal, afterSuccess, cartItems, currentUser, schedule, customer, logoFooter, GatewayForm, formId, className, formClassName }) => {
|
||||
// customer's wallet
|
||||
const [wallet, setWallet] = useState(null);
|
||||
// server-computed price with all details
|
@ -9,7 +9,7 @@ import { User } from '../../models/user';
|
||||
import payzenLogo from '../../../../images/payzen-secure.png';
|
||||
import mastercardLogo from '../../../../images/mastercard.png';
|
||||
import visaLogo from '../../../../images/visa.png';
|
||||
import { GatewayFormProps, PaymentModal } from '../payment/payment-modal';
|
||||
import { GatewayFormProps, AbstractPaymentModal } from '../payment/abstract-payment-modal';
|
||||
|
||||
declare var Application: IApplication;
|
||||
|
||||
@ -57,7 +57,7 @@ const PayZenModal: React.FC<PayZenModalProps> = ({ isOpen, toggleModal, afterSuc
|
||||
}
|
||||
|
||||
return (
|
||||
<PaymentModal isOpen={isOpen}
|
||||
<AbstractPaymentModal isOpen={isOpen}
|
||||
toggleModal={toggleModal}
|
||||
logoFooter={logoFooter()}
|
||||
formId="payzen-form"
|
||||
|
@ -12,7 +12,7 @@ import { User } from '../../models/user';
|
||||
import stripeLogo from '../../../../images/powered_by_stripe.png';
|
||||
import mastercardLogo from '../../../../images/mastercard.png';
|
||||
import visaLogo from '../../../../images/visa.png';
|
||||
import { GatewayFormProps, PaymentModal } from '../payment/payment-modal';
|
||||
import { GatewayFormProps, AbstractPaymentModal } from '../payment/abstract-payment-modal';
|
||||
|
||||
declare var Application: IApplication;
|
||||
|
||||
@ -67,7 +67,7 @@ const StripeModal: React.FC<StripeModalProps> = ({ isOpen, toggleModal, afterSuc
|
||||
}
|
||||
|
||||
return (
|
||||
<PaymentModal className="stripe-modal"
|
||||
<AbstractPaymentModal className="stripe-modal"
|
||||
isOpen={isOpen}
|
||||
toggleModal={toggleModal}
|
||||
logoFooter={logoFooter()}
|
||||
|
Loading…
x
Reference in New Issue
Block a user