Skip to content

Commit

Permalink
chore: cut release #1029
Browse files Browse the repository at this point in the history
  • Loading branch information
grablack authored Dec 13, 2023
2 parents 16bf18a + 4bc21eb commit 8261336
Show file tree
Hide file tree
Showing 323 changed files with 954 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ehthumbs.db
Icon?
Thumbs.db

!*/**/icons
!*/**/icons
1 change: 1 addition & 0 deletions content/modals/AU/short_term.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down
1 change: 1 addition & 0 deletions content/modals/ES/short_term_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down
5 changes: 2 additions & 3 deletions content/modals/FR/short_term_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down Expand Up @@ -49,9 +50,7 @@
"<p>Only for private individuals residing in France. French PayPal account required. Pay in 4X is available, subject to acceptance, for purchases between {formattedMinAmount} and {formattedMaxAmount}.</p>"
],

[
"A loan is a binding commitment and must be repaid, check your repayment capacity. "
],
["A loan is a binding commitment and must be repaid, check your repayment capacity. "],
["Terms and Conditions", "https://www.paypal.com/fr/webapps/mpp/ua/pay-in-4x-full"],
[
". Credit offered by PayPal (Europe) S.à r.l. et Cie, S.C.A., 22-24 Boulevard Royal, L-2449, Luxembourg, Trade and Companies Register of Luxembourg B 118 349, which is duly licensed as a Luxembourg credit institution and falls under the oversight of the supervisory authority of Luxembourg, Commission de Surveillance du Secteur Financier. This information is provided by PayPal."
Expand Down
1 change: 1 addition & 0 deletions content/modals/GB/short_term.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down
56 changes: 56 additions & 0 deletions content/modals/GB/short_term_xo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"preapproved": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}",
"total_payments": "${CREDIT_OFFERS_DS.total_payments}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}",
"formattedTotalCost": "${CREDIT_OFFERS_DS.formattedTotalCost}",
"minAmount": "${CREDIT_OFFERS_DS.minAmount}",
"maxAmount": "${CREDIT_OFFERS_DS.maxAmount}",
"apr": "${CREDIT_OFFERS_DS.apr}",
"nominal_rate": "${CREDIT_OFFERS_DS.nominal_rate}"
}
},
"content": {
"headline": "Pay in 3 interest-free payments",
"subheadline": "Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. No sign-up fees or late fees.",
"qualifyingSubheadline": "Split your purchase of {formattedTotalCost} into {total_payments} with no sign-up fees or late fees.",
"donutTimestamps": ["Today", "1 month", "2 months"],
"estimatedInstallments": {
"items": [
{ "total_payment:": "{formattedPeriodicPayment}", "payment_date": "Today" },
{ "total_payment:": "{formattedPeriodicPayment}", "payment_date": "1 month" },
{ "total_payment:": "{formattedPeriodicPayment}", "payment_date": "2 months" }
]
},
"instructions": {
"instructionsHeadline": "How to use Pay in 3",
"instructionsSubHeadline": "Confirm your info and apply, set up autopay, and review your purchase."
},
"preapproval": {
"preapprovalHeadline": "Pre-approved to Pay in 3 on this purchase ",
"preapprovalSubHeadline": "Pay {formattedTotalCost} in {total_payments} interest-free payments.",
"preapprovalDisclaimerHeadline": "What to know about pre-approval",
"preapprovalDisclaimerBody": "Pre-approval may not be valid if you make another Pay in 3 purchase before the session expires."
},
"cta": {
"buttonTextEligible": "Continue with Pay in 3",
"buttonTextIneligible": "Back to Checkout",
"link": "https://www.paypal.com/link/to/short-term-application"
},
"disclosure": "Pay in 3 is a form of credit, so carefully consider whether the purchase is affordable and how you will make the repayments. Be aware of the possible impact of using Pay in 3 and of missing payments, including making other borrowing more difficult or more expensive. Pay in 3 eligibility is subject to status and approval. 18+ UK residents only. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. Terms and conditions apply. PayPal Pay in 3 is a trading name of PayPal (Europe) S.à r.l. et Cie, S.C.A. 22-24 Boulevard Royal L-2449, Luxembourg.",
"learnMoreLink": [["Learn more about Pay in 3", ["https://www.paypal.com/uk/webapps/mpp/paypal-payin3/faq"]]]
}
}
4 changes: 3 additions & 1 deletion content/modals/US/PL2GO/pl2go_short_term.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"Pay back what you spend in 4 payments, every 2 weeks, starting today."
],
"disclosure": [
"Pay in 4 is available to consumers upon approval for purchases of {formattedMinAmount} to {formattedMaxAmount}. Pay in 4 is not currently available to residents of <span aria-hidden='true'>MO, NV, or NM</span><span class='sr-only'>Missouri, Nevada, or New Mexico</span>. Offer availability depends on the merchant and also may not be available for certain recurring, subscription services. When applying, a soft credit check may be needed, but will not affect your credit score. You must be of legal age in your U.S. state of residence to use Pay in 4. Loans to California residents are made or arranged pursuant to a California Financing Law License. PayPal, Inc. is a Georgia Installment Lender Licensee, NMLS #910457. Rhode Island Small Loan Lender Licensee."
"Pay in 4 is available to consumers upon approval for purchases of {formattedMinAmount} to {formattedMaxAmount}. Pay in 4 is currently not available to residents of <span aria-hidden='true'>MO or NV</span><span class='sr-only'>Missouri or Nevada</span>. Offer availability depends on the merchant and also may not be available for certain recurring, subscription services. When applying, a soft credit check may be needed, but will not affect your credit score. You must be 18 years old or older to apply. PayPal, Inc.: Loans to <span aria-hidden='true'>CA</span><span class='sr-only'>California</span> residents are made or arranged pursuant to a <span aria-hidden='true'>CA</span><span class='sr-only'>California</span> Financing Law License. <span aria-hidden='true'>GA</span><span class='sr-only'>Georgia</span> Installment Lender Licensee, NMLS #910457. <span aria-hidden='true'>RI</span><span class='sr-only'>Rhode Island</span> Small Loan Lender Licensee. <span aria-hidden='true'>NM</span><span class='sr-only'>New Mexico</span> residents:",
["Find more disclosures ", "https://www.paypal.com/us/webapps/mpp/campaigns/newmexicodisclosure"],
"related to Pay in 4."
]
}
}
1 change: 1 addition & 0 deletions content/modals/US/PLHub/plhub_long_term.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"meta": {
"product": "PAY_LATER_LONG_TERM",
"offerCountry": "US",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down
1 change: 1 addition & 0 deletions content/modals/US/PLHub/plhub_short_term.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV4Design": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
Expand Down
3 changes: 1 addition & 2 deletions content/modals/US/v2_long_term_xo.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"Pay Monthly is subject to consumer credit approval. Payments may change based on shipping, taxes, updates to your purchase, or missed payments. Offer availability depends on the merchant and may not be available for subscriptions or recurring payments. Pay Monthly is currently not available to residents of <span aria-hidden='true'>AK, CO, HI, MA, NV, NY, or TX</span><span class='sr-only'>Alaska, Colorado, Hawaii, Massachusetts, Nevada, New York, or Texas</span>. You must be of legal age in your U.S. state of residence. Missed payments may have an impact on your credit score. The lender for Pay Monthly is WebBank. PayPal, Inc. (NMLS #910457): <span aria-hidden='true'>CT</span><span class='sr-only'>Connecticut</span> Small Loan Licensee. <span aria-hidden='true'>RI</span><span class='sr-only'>Rhode Island</span> Loan Broker Licensee. <span aria-hidden='true'>VT</span><span class='sr-only'>Vermont</span> Loan Solicitation Licensee. <span aria-hidden='true'>VT</span><span class='sr-only'>Vermont</span> residents:",
["Find more disclosures ", "https://www.paypal.com/us/digital-wallet/ways-to-pay/buy-now-pay-later"],
"by going to PayPal's page on Pay Later."
],
"linkToProductList": "See other ways to pay over time"
]
}
}
60 changes: 60 additions & 0 deletions content/modals/US/v2_short_term_xo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"preapproved": "false",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}",
"total_payments": "${CREDIT_OFFERS_DS.total_payments}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}",
"formattedTotalCost": "${CREDIT_OFFERS_DS.formattedTotalCost}",
"minAmount": "${CREDIT_OFFERS_DS.minAmount}",
"maxAmount": "${CREDIT_OFFERS_DS.maxAmount}",
"apr": "${CREDIT_OFFERS_DS.apr}",
"nominal_rate": "${CREDIT_OFFERS_DS.nominal_rate}"
}
},
"content": {
"headline": "Pay in 4 interest-free payments",
"subheadline": "No impact on credit score and no late fees. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}.",
"qualifyingSubheadline": "Split your purchase of {formattedTotalCost} into {total_payments} with no impact on credit score and no late fees.",
"donutTimestamps": ["Today", "2 weeks", "4 weeks", "6 weeks"],
"instructions": {
"instructionsHeadline": "How to use Pay in 4",
"instructionsSubHeadline": "Confirm your info and apply, set up autopay, and review your purchase."
},
"preapproval": {
"preapprovalHeadline": "You’re pre-approved",
"preapprovalSubHeadline": "Pay {formattedTotalCost} in {total_payments} interest-free payments.",
"preapprovalDisclaimerHeadline": "What to know about pre-approval",
"preapprovalDisclaimerBody": [
"If you no longer meet the criteria used to select you for this offer, or give info we can’t match, pre-approval won’t apply and you may be declined for Pay in 4.",
"This offer starts on {current_date} and ends when you exit checkout, or when the session expires, or if you make another Pay in 4 purchase while this session is active.",
"We didn't use info from a credit bureau to make this offer."
]
},
"cta": {
"buttonTextEligible": "Continue with Pay in 4",
"buttonTextIneligible": "Back to Checkout",
"link": "https://www.paypal.com/link/to/short-term-application"
},
"disclosure": [
"Pay in 4 is available to consumers upon approval for purchases of {formattedMinAmount} to {formattedMaxAmount}. Pay in 4 is currently not available to residents of <span aria-hidden='true'>MO or NV</span><span class='sr-only'>Missouri or Nevada</span>. Offer availability depends on the merchant and also may not be available for certain recurring, subscription services. When applying, a soft credit check may be needed, but will not affect your credit score. You must be 18 years old or older to apply. PayPal, Inc.: Loans to <span aria-hidden='true'>CA</span><span class='sr-only'>California</span> residents are made or arranged pursuant to a <span aria-hidden='true'>CA</span><span class='sr-only'>California</span> Financing Law License. <span aria-hidden='true'>GA</span><span class='sr-only'>Georgia</span> Installment Lender Licensee, NMLS #910457. <span aria-hidden='true'>RI</span><span class='sr-only'>Rhode Island</span> Small Loan Lender Licensee. <span aria-hidden='true'>NM</span><span class='sr-only'>New Mexico</span> residents:",
[
"Find more disclosures ",
"https://www.paypal.com/us/webapps/mpp/campaigns/newmexicodisclosure",
"Find more disclosures, opens new tab"
],
"related to Pay in 4."
]
}
}
26 changes: 22 additions & 4 deletions src/components/modal/v2/parts/BodyContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
useXProps,
useScroll,
useDidUpdateEffect,
useTransitionState
useTransitionState,
isLander
} from '../lib';
import Header from './Header';
import { LongTerm, ShortTerm, NoInterest, ProductList, PayIn1 } from './views';
Expand Down Expand Up @@ -56,8 +57,20 @@ const BodyContent = () => {
const productMeta = useProductMeta(viewName);

const { headline, subheadline, qualifyingSubheadline = '', closeButtonLabel } = content;

const isQualifying = productMeta?.qualifying;

const useV4Design = productMeta?.useV4Design === 'true';

// add v4Design class to root html to update lander specific styles to v4
const documentClassName = document.documentElement.className;
if (useV4Design && isLander) {
document.documentElement.className = `${documentClassName} v4Design`;
}
const isPreapproved = productMeta?.preapproved;
const preapprovalHeadline = content?.preapproval?.preapprovalHeadline;
const preapprovalSubHeadline = content?.preapproval?.preapprovalSubHeadline;

const openProductList = () => setViewName(VIEW_IDS.PRODUCT_LIST);

useDidUpdateEffect(() => {
Expand All @@ -82,14 +95,15 @@ const BodyContent = () => {
// Add views to viewComponents object where the keys are the product name and the values are the view component
const viewComponents = {
[VIEW_IDS.PAYPAL_CREDIT_NO_INTEREST]: <NoInterest content={content} openProductList={openProductList} />,
[VIEW_IDS.PAY_LATER_LONG_TERM]: <LongTerm content={content} openProductList={openProductList} />,
[VIEW_IDS.PAY_LATER_LONG_TERM]: (
<LongTerm content={content} productMeta={productMeta} openProductList={openProductList} />
),
[VIEW_IDS.PAY_LATER_PAY_IN_1]: <PayIn1 content={content} openProductList={openProductList} />,
[VIEW_IDS.PAY_LATER_SHORT_TERM]: (
<ShortTerm content={content} productMeta={productMeta} openProductList={openProductList} />
),
[VIEW_IDS.PRODUCT_LIST]: <ProductList content={content} setViewName={setViewName} />
};

// IMPORTANT: These elements cannot be nested inside of other elements.
// They are using very precise CSS position sticky rules that require this
// specific adjacent DOM structure
Expand All @@ -103,8 +117,12 @@ const BodyContent = () => {
qualifyingSubheadline={qualifyingSubheadline}
closeButtonLabel={closeButtonLabel}
viewName={viewName}
useV4Design={useV4Design}
preapprovalHeadline={preapprovalHeadline}
preapprovalSubHeadline={preapprovalSubHeadline}
isPreapproved={isPreapproved ?? 'false'}
/>
<div className="content__container">
<div className={`content__container ${useV4Design ? 'v4Design' : ''}`}>
<main className="main">
<div className="content__body">{viewComponents[viewName]}</div>
</main>
Expand Down
Loading

0 comments on commit 8261336

Please sign in to comment.