-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support PL2GO and the PL Hub in the universal modal (#922)
* support pl2go and pl hub * add to func tests * update test config files
- Loading branch information
Showing
11 changed files
with
424 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"meta": { | ||
"product": "PAY_LATER_LONG_TERM", | ||
"offerCountry": "US", | ||
"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 Monthly", | ||
"subheadline": "Get more time to pay, with no down payment or late fees.", | ||
"calculator": { | ||
"title": "How much is your purchase?", | ||
"inputLabel": "Purchase amount", | ||
"inputPlaceholder": "Enter amount", | ||
"genericError": "Something went wrong. Please try again later." | ||
}, | ||
"genericDisclaimer": "Terms may vary based on purchase amount.", | ||
"instructions": [ | ||
"Apply for Pay Monthly. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}.", | ||
"Shop almost anywhere after receiving a single-use virtual card number.", | ||
"Pay back what you spend in monthly installments. $0 due today." | ||
], | ||
"disclosure": [ | ||
"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 AK, CO, HI, MA, NE, NV, NY, or TX. 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): CT Small Loan Licensee. RI Loan Broker Licensee. VT Loan Solicitation Licensee. VT 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." | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"meta": { | ||
"product": "PAY_LATER_SHORT_TERM", | ||
"periodicPayment": "{formattedPeriodicPayment}", | ||
"minAmount": "{minAmount}", | ||
"maxAmount": "{maxAmount}", | ||
"qualifying": "{qualifying_offer}", | ||
"amount": "{transaction_amount}", | ||
"apr": "{apr}", | ||
"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": [ | ||
"Apply for Pay in 4. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. ", | ||
"Shop almost anywhere after receiving a single-use virtual card number.", | ||
"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 <span aria-hidden='true'>{formattedMinAmount}-{formattedMaxAmount}</span><span class='sr-only'>{formattedMinAmount} to {formattedMaxAmount}</span>. Pay in 4 is not currently available to residents of Missouri, Nevada, New Mexico, or North Dakota. 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." | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"meta": { | ||
"product": "PAY_LATER_LONG_TERM", | ||
"offerCountry": "US", | ||
"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 Monthly", | ||
"subheadline": "Get more time to pay, with no down payment or late fees.", | ||
"calculator": { | ||
"title": "How much is your purchase?", | ||
"inputLabel": "Purchase amount", | ||
"inputPlaceholder": "Enter amount", | ||
"genericError": "Something went wrong. Please try again later." | ||
}, | ||
"genericDisclaimer": "Terms may vary based on purchase amount.", | ||
"instructions": [ | ||
"Choose PayPal at checkout to pay later with <strong>Pay Monthly</strong>.", | ||
"Get a decision in seconds and complete your purchase.", | ||
"Use autopay for your payments. It's easy!" | ||
], | ||
"disclosure": [ | ||
"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 AK, CO, HI, MA, NE, NV, NY, or TX. 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): CT Small Loan Licensee. RI Loan Broker Licensee. VT Loan Solicitation Licensee. VT 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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"meta": { | ||
"product": "PAY_LATER_SHORT_TERM", | ||
"periodicPayment": "{formattedPeriodicPayment}", | ||
"minAmount": "{minAmount}", | ||
"maxAmount": "{maxAmount}", | ||
"qualifying": "{qualifying_offer}", | ||
"amount": "{transaction_amount}", | ||
"apr": "{apr}", | ||
"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": [ | ||
"Choose PayPal at checkout to pay later with <strong>Pay in 4</strong>. ", | ||
"Complete your purchase with a 25% down payment.", | ||
"Use autopay for the rest of your payments. It's easy!" | ||
], | ||
"disclosure": [ | ||
"Pay in 4 is available to consumers upon approval for purchases of <span aria-hidden='true'>{formattedMinAmount}-{formattedMaxAmount}</span><span class='sr-only'>{formattedMinAmount} to {formattedMaxAmount}</span>. Pay in 4 is not currently available to residents of Missouri, Nevada, New Mexico, or North Dakota. 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." | ||
], | ||
"linkToProductList": "See other ways to pay later" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const DEV_US_LONG_TERM_PL2GO = { | ||
testFileName: 'longTermPL2GO', | ||
country: 'US', | ||
description: 'US merchant showing long term Pay Later to Go content', | ||
minAmount: 199, | ||
maxAmount: 20000, | ||
amounts: [ | ||
{ | ||
value: '199.00', | ||
modalContent: { | ||
offerHeadline: '$33.17/mo. for 6 months', | ||
updatedOfferHeadline: '$83.33/mo. for 6 months', | ||
offerFieldValues: ['0%', '$0.00', '$199.00'], | ||
aprDisclaimer: 'Terms may vary based on purchase amount.' | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export const DEV_US_SHORT_TERM_PL2GO = { | ||
testFileName: 'shortTermPL2GO', | ||
country: 'US', | ||
description: 'US merchant showing short term Pay Later to Go content', | ||
minAmount: 30, | ||
maxAmount: 1500, | ||
amounts: [ | ||
{ | ||
value: '30.00', | ||
message: 'Qualifying Pay in 4', | ||
expectedValue: 'Pay in 4 interest-free payments of $7.50', | ||
modalContent: { | ||
subheadline: 'Split your purchase of $30.00 into 4 with no impact on credit score and no late fees.', | ||
periodicPayment: '$7.50' | ||
} | ||
}, | ||
{ | ||
value: '1500.01', | ||
message: 'Non-qualifying Pay in 4', | ||
expectedValue: 'Pay in 4 interest-free payments on qualifying purchases', | ||
modalContent: { | ||
subheadline: 'No impact on credit score and no late fees. Available for purchases of $30 to $1,500.', | ||
periodicPayment: '' | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export { DEV_US_LONG_TERM } from './DEV_US_LONG_TERM'; | ||
export { DEV_US_LONG_TERM_CHECKOUT } from './DEV_US_LONG_TERM_CHECKOUT'; | ||
export { DEV_US_LONG_TERM_PL2GO } from './DEV_US_LONG_TERM_PL2GO'; | ||
export { DEV_US_MULTI } from './DEV_US_MULTI'; | ||
export { DEV_US_NO_INTEREST } from './DEV_US_NO_INTEREST'; | ||
export { DEV_US_SHORT_TERM } from './DEV_US_SHORT_TERM'; | ||
export { DEV_US_SHORT_TERM_PL2GO } from './DEV_US_SHORT_TERM_PL2GO'; |
Oops, something went wrong.