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-05 18:42:32 +01:00
import BadgeBox , {
BADGE _BOX _TITLE _BIG ,
} from '../../ReusableComponents/BadgeBox' ;
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-05 18:42:32 +01:00
'Your all-in-one integration for PayPal checkout solutions that enable buyers<br/> 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" / >
< WelcomeDocs / >
2024-11-05 19:10:30 +01:00
< Separator text = { _ _ ( 'or' , 'woocommerce-paypal-payments' ) } / >
< AccordionSection
title = { _ _ (
'See advanced options' ,
'woocommerce-paypal-payments'
) }
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 >
) ;
} ;
2024-11-05 13:49:38 +04:00
const WelcomeDocs = ( ) => {
2024-11-05 18:42:32 +01:00
const pricesBasedDescription = sprintf (
// translators: %s: Link to PayPal REST application guide
_ _ (
'<sup>1</sup>Prices based on domestic transactions as of October 25th, 2024. <a target="_blank" href="%s">Click here</a> for full pricing details.' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
) ;
2024-10-23 08:56:47 +02:00
2024-11-05 13:49:38 +04:00
return (
< div className = "ppcp-r-welcome-docs" >
2024-11-06 18:30:01 +04:00
< h2 className = "ppcp-r-welcome-docs__title" > { _ _ ( ` Want to know more about PayPal Payments? ` , 'woocommerce-paypal-payments' ) } < / h 2 >
2024-11-05 13:49:38 +04:00
< div className = "ppcp-r-welcome-docs__wrapper" >
< div className = "ppcp-r-welcome-docs__col" >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'PayPal Checkout' , 'woocommerce-paypal-payments' ) }
titleType = { BADGE _BOX _TITLE _BIG }
textBadge = { _ _ ( 'from 3.49% + $0.49 USD<sup>1</sup>' , 'woocommerce-paypal-payments' ) }
description = { _ _ (
2024-11-05 13:49:38 +04:00
'Our all-in-one checkout solution lets you offer PayPal, Venmo, Pay Later options, and more to help maximise conversion' ,
'woocommerce-paypal-payments'
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
2024-11-05 19:21:01 +04:00
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Included in PayPal Checkout' , 'woocommerce-paypal-payments' ) }
titleType = { BADGE _BOX _TITLE _BIG } / >
2024-11-05 13:49:38 +04:00
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Pay with PayPal' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-button-paypal.svg' ] }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Our brand recognition helps give customers the confidence to buy. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Pay Later' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-payment-method-paypal-small.svg' ] }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Offer installment payment options and get paid upfront - at no extra cost to you. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Venmo' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-button-venmo.svg' ] }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Automatically offer Venmo checkout to millions of active users. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Crypto' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-payment-method-crypto.svg' ] }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Let customers checkout with Crypto while you get paid in cash. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< / d i v >
< div className = "ppcp-r-welcome-docs__col" >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Optional payment methods' , 'woocommerce-paypal-payments' ) }
titleType = { BADGE _BOX _TITLE _BIG }
description = { _ _ ( 'with additional application' , 'woocommerce-paypal-payments' ) }
2024-11-05 13:49:38 +04:00
/ >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Custom Card Fields' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-button-visa.svg' , 'icon-button-mastercard.svg' , 'icon-button-amex.svg' , 'icon-button-discover.svg' ] }
textBadge = { _ _ ( 'from 2.59% + $0.49 USD<sup>1</sup>' , 'woocommerce-paypal-payments' ) }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Style the credit card fields to match your own style. Includes advanced processing with risk management, 3D Secure, fraud protection options, and chargeback protection. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Digital Wallets' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-button-apple-pay.svg' , 'icon-button-google-pay.svg' ] }
textBadge = { _ _ ( 'from 2.59% + $0.49 USD<sup>1</sup>' , 'woocommerce-paypal-payments' ) }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Accept Apple Pay on eligible devices and Google Pay through mobile and web. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( 'Alternative Payment Methods' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-button-sepa.svg' , 'icon-button-ideal.svg' , 'icon-button-blik.svg' , 'icon-button-bancontact.svg' ] }
textBadge = { _ _ ( 'from 3.49% + $0.49 USD<sup>1</sup>' , 'woocommerce-paypal-payments' ) }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Seamless payments for customers across the globe using their preferred payment methods. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< Separator className = "ppcp-r-page-welcome-mode-separator" / >
< BadgeBox
2024-11-06 18:30:01 +04:00
title = { _ _ ( '' , 'woocommerce-paypal-payments' ) }
imageBadge = { [ 'icon-payment-method-fastlane-small.svg' ] }
textBadge = { _ _ ( 'from 2.59% + $0.49 USD<sup>1</sup>' , 'woocommerce-paypal-payments' ) }
description = { sprintf (
2024-11-05 13:49:38 +04:00
// translators: %s: Link to PayPal REST application guide
_ _ (
'Speed up guest checkout with Fatslane. Link a customer\'s email address to their payment details. <a target="_blank" href="%s">Learn more</a>' ,
'woocommerce-paypal-payments'
) ,
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
2024-11-06 18:30:01 +04:00
) }
2024-11-05 13:49:38 +04:00
/ >
< / d i v >
< / d i v >
2024-11-05 19:21:01 +04:00
< p
className = "ppcp-r-welcome-docs__description"
dangerouslySetInnerHTML = { { _ _html : pricesBasedDescription , } }
> < / p >
2024-11-05 13:49:38 +04:00
< / d i v >
) ;
2024-10-23 08:56:47 +02:00
} ;
export default StepWelcome ;