|
| 1 | +import { FC } from 'react' |
| 2 | + |
| 3 | +import { BaseModal, Button, InputText } from '~/libs/ui' |
| 4 | + |
| 5 | +import styles from './PaymentInfoModal.module.scss' |
| 6 | + |
| 7 | +interface PaymentInfoModalProps { |
| 8 | + hasEmailedSupport: boolean |
| 9 | + selectedPaymentProvider: string |
| 10 | + handlePaymentSelection: () => void |
| 11 | + handleModalClose: () => void |
| 12 | + handleCheckboxChange: () => void |
| 13 | + handleVisitProviderClick: () => void |
| 14 | +} |
| 15 | + |
| 16 | +const PaymentInfoModal: FC<PaymentInfoModalProps> = (props: PaymentInfoModalProps) => ( |
| 17 | + <BaseModal |
| 18 | + buttons={( |
| 19 | + <Button |
| 20 | + primary |
| 21 | + size='lg' |
| 22 | + label='Confirm' |
| 23 | + disabled={!props.hasEmailedSupport} |
| 24 | + onClick={props.handlePaymentSelection} |
| 25 | + /> |
| 26 | + )} |
| 27 | + onClose={props.handleModalClose} |
| 28 | + open |
| 29 | + size='body' |
| 30 | + title={`CONNECT YOUR ${props.selectedPaymentProvider} ACCOUNT`} |
| 31 | + classNames={{ modal: styles.infoModal }} |
| 32 | + > |
| 33 | + <div className={styles.modalContent}> |
| 34 | + <div className={styles.modalContentLeft}> |
| 35 | + <div className={styles.infoSection}> |
| 36 | + <h4> |
| 37 | + DO YOU HAVE YOUR |
| 38 | + {' '} |
| 39 | + {props.selectedPaymentProvider} |
| 40 | + {' '} |
| 41 | + ACCOUNT DETAILS? GREAT! |
| 42 | + </h4> |
| 43 | + <ul className={styles.infoItemsList}> |
| 44 | + <li> |
| 45 | + Email |
| 46 | + {' '} |
| 47 | + <a href='mailto:support@topcoder.com'>support@topcoder.com</a> |
| 48 | + </li> |
| 49 | + <li>Subject Line: Topcoder Payment Provider</li> |
| 50 | + <li>In the email include:</li> |
| 51 | + <ul className={styles.infoItemsList}> |
| 52 | + <li>Topcoder handle (your username when registering)</li> |
| 53 | + { |
| 54 | + props.selectedPaymentProvider === 'Payoneer' && ( |
| 55 | + <> |
| 56 | + <li>Payoneer Customer ID</li> |
| 57 | + <li>Payoneer Email Address</li> |
| 58 | + </> |
| 59 | + ) |
| 60 | + } |
| 61 | + { |
| 62 | + props.selectedPaymentProvider === 'PayPal' && ( |
| 63 | + <> |
| 64 | + <li>PayPal Email Address</li> |
| 65 | + <li> |
| 66 | + Please DO NOT provide a link to your PayPal account. |
| 67 | + We only need your PayPal email address. |
| 68 | + </li> |
| 69 | + </> |
| 70 | + ) |
| 71 | + } |
| 72 | + { |
| 73 | + props.selectedPaymentProvider === 'Western Union' && ( |
| 74 | + <> |
| 75 | + <li> |
| 76 | + Topcoder Email Address (the email address you used to register) |
| 77 | + </li> |
| 78 | + </> |
| 79 | + ) |
| 80 | + } |
| 81 | + </ul> |
| 82 | + </ul> |
| 83 | + </div> |
| 84 | + <div className={styles.checkboxWrap}> |
| 85 | + <InputText |
| 86 | + label=' ' |
| 87 | + checked={props.hasEmailedSupport} |
| 88 | + type='checkbox' |
| 89 | + name='hasEmailedSupport' |
| 90 | + onChange={props.handleCheckboxChange} |
| 91 | + tabIndex={0} |
| 92 | + value={props.hasEmailedSupport} |
| 93 | + /> |
| 94 | + <p> |
| 95 | + Yes, I have emailed my details to |
| 96 | + {' '} |
| 97 | + <a href='mailto:support@topcoder.com'>support@topcoder.com</a> |
| 98 | + </p> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + <div className={styles.modalContentRight}> |
| 102 | + <h4> |
| 103 | + Create |
| 104 | + {' '} |
| 105 | + {props.selectedPaymentProvider} |
| 106 | + {' '} |
| 107 | + Account |
| 108 | + </h4> |
| 109 | + |
| 110 | + <p className={styles.warnText}> |
| 111 | + Important: After you create an account, please email support@topcoder.com |
| 112 | + with the information outlined |
| 113 | + </p> |
| 114 | + |
| 115 | + { |
| 116 | + props.selectedPaymentProvider === 'Payoneer' && ( |
| 117 | + <p> |
| 118 | + You can elect to receive payments through Payoneer either to your Payoneer |
| 119 | + prepaid MasterCard or by using their Global Bank Transfer service. |
| 120 | + The Payoneer Bank Transfer Service offers a local bank transfer option |
| 121 | + (where available) and a wire transfer option. Certain fees may apply. |
| 122 | + </p> |
| 123 | + ) |
| 124 | + } |
| 125 | + |
| 126 | + { |
| 127 | + props.selectedPaymentProvider === 'PayPal' && ( |
| 128 | + <p> |
| 129 | + You can elect to receive payments deposited directly to your PayPal account. |
| 130 | + Certain fees may apply. |
| 131 | + </p> |
| 132 | + ) |
| 133 | + } |
| 134 | + |
| 135 | + { |
| 136 | + props.selectedPaymentProvider === 'Western Union' && ( |
| 137 | + <> |
| 138 | + <p> |
| 139 | + You can elect to be paid via wire transfer through Western Union. |
| 140 | + There is a US $8 charge for each payment processed by Western Union, |
| 141 | + which will be deducted from the amount owed to you. You can elect |
| 142 | + to be paid in either USD or your local currency. However, Western Union |
| 143 | + does not disclose it’s fees to convert to your local currency so we |
| 144 | + recommend you choose to receive USD. You may then be subject to |
| 145 | + conversion fees by your local bank. |
| 146 | + </p> |
| 147 | + <p> |
| 148 | + <strong className='body-main-bold'>Important: </strong> |
| 149 | + Use your Topcoder handle as the Payee ID during registration. |
| 150 | + Use the Preferred Form of Payment as “Fastest,” rather than “Least Cost.” |
| 151 | + “Least Cost” uses ACH as a form of payment, which is not |
| 152 | + supported in all countries. |
| 153 | + </p> |
| 154 | + <p> |
| 155 | + If you elect to be paid by Western Union, your payment request will |
| 156 | + be queued and processed semi-monthly, on the 15th and last business |
| 157 | + day of the month. If the 15th or last day of the month falls on a |
| 158 | + weekend or holiday, Western Union payments will be processed |
| 159 | + the next business day. |
| 160 | + </p> |
| 161 | + <p> |
| 162 | + In order to be included in the semi-monthly payments, |
| 163 | + you need to select which payments you would like to be paid |
| 164 | + for by 10:00 AM EST on the day of the scheduled payment. |
| 165 | + </p> |
| 166 | + </> |
| 167 | + ) |
| 168 | + } |
| 169 | + |
| 170 | + <Button |
| 171 | + primary |
| 172 | + size='lg' |
| 173 | + label={`Visit ${props.selectedPaymentProvider} to create an account`} |
| 174 | + onClick={props.handleVisitProviderClick} |
| 175 | + disabled={props.hasEmailedSupport} |
| 176 | + /> |
| 177 | + </div> |
| 178 | + </div> |
| 179 | + </BaseModal> |
| 180 | +) |
| 181 | + |
| 182 | +export default PaymentInfoModal |
0 commit comments