2024-10-23 08:56:47 +02:00
import { _ _ , sprintf } from '@wordpress/i18n' ;
2024-11-05 18:32:33 +01:00
import { Button } from '@wordpress/components' ;
2024-10-31 14:44:45 +01:00
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader' ;
2024-10-23 15:24:52 +02:00
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons' ;
import Separator from '../../ReusableComponents/Separator' ;
2024-11-12 19:23:30 +04:00
import WelcomeDocs from '../../ReusableComponents/WelcomeDocs/WelcomeDocs' ;
2024-11-12 18:06:49 +04:00
2024-11-05 18:32:33 +01:00
import AdvancedOptionsForm from './Components/AdvancedOptionsForm' ;
2024-11-05 19:10:30 +01:00
import AccordionSection from '../../ReusableComponents/AccordionSection' ;
2024-10-23 08:56:47 +02:00
2024-10-31 09:47:06 +02:00
const StepWelcome = ( { setStep , currentStep , setCompleted } ) => {
2024-10-23 08:56:47 +02:00
return (
< div className = "ppcp-r-page-welcome" >
< OnboardingHeader
title = { _ _ (
'Welcome to PayPal Payments' ,
'woocommerce-paypal-payments'
) }
description = { _ _ (
2024-11-12 15:01:29 +01:00
'Your all-in-one integration for PayPal checkout solutions that enable buyers to pay via PayPal, Pay Later, all major credit/debit cards, Apple Pay, Google Pay, and more.' ,
2024-10-23 08:56:47 +02:00
'woocommerce-paypal-payments'
) }
/ >
< div className = "ppcp-r-inner-container" >
< WelcomeFeatures / >
2024-11-05 18:42:32 +01:00
< PaymentMethodIcons icons = "all" / >
< p className = "ppcp-r-button__description" >
{ _ _ (
` Click the button below to be guided through connecting your existing PayPal account or creating a new one.You will be able to choose the payment options that are right for your store. ` ,
'woocommerce-paypal-payments'
) }
< / p >
2024-10-23 08:56:47 +02:00
< Button
className = "ppcp-r-button-activate-paypal"
variant = "primary"
2024-10-24 06:35:48 +02:00
onClick = { ( ) => setStep ( currentStep + 1 ) }
2024-10-23 08:56:47 +02:00
>
{ _ _ (
'Activate PayPal Payments' ,
'woocommerce-paypal-payments'
) }
< / B u t t o n >
< / d i v >
2024-11-05 18:42:32 +01:00
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
2024-11-12 19:23:30 +04:00
< WelcomeDocs
2024-11-14 11:52:00 +01:00
useAcdc = { true }
isFastlane = { true }
isPayLater = { true }
storeCountry = { 'us' }
storeCurrency = { 'usd' }
/ >
2024-11-05 19:10:30 +01:00
< Separator text = { _ _ ( 'or' , 'woocommerce-paypal-payments' ) } / >
< AccordionSection
title = { _ _ (
'See advanced options' ,
'woocommerce-paypal-payments'
) }
2024-11-07 13:09:58 +01:00
className = "onboarding-advanced-options"
2024-11-05 19:10:30 +01:00
initiallyOpen = { false }
>
< AdvancedOptionsForm setCompleted = { setCompleted } / >
< / A c c o r d i o n S e c t i o n >
2024-10-23 08:56:47 +02:00
< / d i v >
) ;
} ;
const WelcomeFeatures = ( ) => {
return (
< div className = "ppcp-r-welcome-features" >
< div className = "ppcp-r-welcome-features__col" >
< span > { _ _ ( 'Deposits' , 'woocommerce-paypal-payments' ) } < / s p a n >
< p > { _ _ ( 'Instant' , 'woocommerce-paypal-payments' ) } < / p >
< / d i v >
< div className = "ppcp-r-welcome-features__col" >
< span >
{ _ _ ( 'Payment Capture' , 'woocommerce-paypal-payments' ) }
< / s p a n >
< p >
{ _ _ (
'Authorize only or Capture' ,
'woocommerce-paypal-payments'
) }
< / p >
< / d i v >
< div className = "ppcp-r-welcome-features__col" >
< span >
{ _ _ (
'Recurring payments' ,
'woocommerce-paypal-payments'
) }
< / s p a n >
< p > { _ _ ( 'Supported' , 'woocommerce-paypal-payments' ) } < / p >
< / d i v >
< / d i v >
) ;
} ;
export default StepWelcome ;