2024-11-05 13:30:27 +01:00
import PaymentMethodModal from '../../../ReusableComponents/PaymentMethodModal' ;
import { _ _ } from '@wordpress/i18n' ;
import { Button } from '@wordpress/components' ;
import { useState } from '@wordpress/element' ;
2024-11-26 13:28:03 +01:00
import { RadioControl } from '@wordpress/components' ;
2024-11-05 13:30:27 +01:00
const ModalAcdc = ( { setModalIsVisible } ) => {
const [ threeDSecure , setThreeDSecure ] = useState ( 'no-3d-secure' ) ;
2024-11-26 13:28:03 +01:00
const acdcOptions = [
{
label : _ _ ( 'No 3D Secure' , 'woocommerce-paypal-payments' ) ,
value : 'no-3d-secure' ,
} ,
{
label : _ _ ( 'Only when required' , 'woocommerce-paypal-payments' ) ,
value : 'only-required-3d-secure' ,
} ,
{
label : _ _ (
'Always require 3D Secure' ,
'woocommerce-paypal-payments'
) ,
value : 'always-3d-secure' ,
} ,
] ;
2024-11-05 13:30:27 +01:00
return (
< PaymentMethodModal
setModalIsVisible = { setModalIsVisible }
2024-11-21 11:38:01 +01:00
icon = "payment-method-cards-big"
2024-11-05 13:30:27 +01:00
title = { _ _ (
'Advanced Credit and Debit Card Payments' ,
'woocommerce-paypal-payments'
) }
>
< strong className = "ppcp-r-modal__content-title" >
{ _ _ ( '3D Secure' , 'woocommerce-paypal-payments' ) }
< / s t r o n g >
< p className = "ppcp-r-modal__description" >
{ _ _ (
'Authenticate cardholders through their card issuers to reduce fraud and improve transaction security. Successful 3D Secure authentication can shift liability for fraudulent chargebacks to the card issuer.' ,
'woocommerce-paypal-payments'
) }
< / p >
< div className = "ppcp-r-modal__field-rows ppcp-r-modal__field-rows--acdc" >
2024-11-26 13:28:03 +01:00
< RadioControl
onChange = { setThreeDSecure }
selected = { threeDSecure }
options = { acdcOptions }
2024-11-11 14:02:49 +01:00
/ >
2024-11-21 11:38:01 +01:00
2024-11-05 13:30:27 +01:00
< div className = "ppcp-r-modal__field-row ppcp-r-modal__field-row--save" >
< Button variant = "primary" >
{ _ _ ( 'Save changes' , 'woocommerce-paypal-payments' ) }
< / B u t t o n >
< / d i v >
< / d i v >
< / P a y m e n t M e t h o d M o d a l >
) ;
} ;
export default ModalAcdc ;