import * as React from 'react'; const fixedTwo = (num: any) => (num?.toFixed(2) || "0.00"); export interface DetailsProps { childComp?: React.ReactNode; updateState: (arg: number) => void; paymentData: { [key: string]: any }; } export interface DetailsState { } const Details: React.FC = (props) => { const { childComp } = props; const { amountBean, clientCode, payerEmail, payerMobNumber, payerName } = props.paymentData; return (
Checkout

Review & Pay

{/* Card holding all payment related information */}

{payerName}

Client Code

{clientCode}

Email ID

{payerEmail}

Phone

{payerMobNumber}

{amountBean && Object.keys(amountBean).length ?

Bill Amount

{fixedTwo(amountBean.actualAmount) + " " + amountBean.amountType}

MDR

{fixedTwo(amountBean.endPointChargse) + " " + amountBean.amountType}

Applicable tax

{fixedTwo(amountBean.gst) + " " + amountBean.amountType}

Convenience Fee

{fixedTwo(amountBean.convCharge) + " " + amountBean.amountType}

: null} {amountBean && Object.keys(amountBean).length ?

Total Amount

{amountBean ? (fixedTwo(+amountBean.paidAmount) + " " + amountBean.amountType) : "-"}

: null}
{/* Back to all payment modes */}
props.updateState(1)}> arrow left Change Mode of Payment
{childComp}
); }; export default Details;