Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions content/messages/CA/generic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "GENERIC",
"messageType": "GENERIC",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedMonthlyPayment": "${CREDIT_OFFERS_DS.formattedMonthlyPayment}",
"total_payments": "${CREDIT_OFFERS_DS.total_payments}",
"minAmount": "${CREDIT_OFFERS_DS.minAmount}",
"maxAmount": "${CREDIT_OFFERS_DS.maxAmount}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}",
"formattedTotalCost": "${CREDIT_OFFERS_DS.formattedTotalCost}"
}
},
"headline": [
["Buy now, pay later.", ["default", "xsmall"]],
["Buy now and pay later.", ["xsmall.2"]]
],
"subHeadline": [],
"disclaimer": [["<span aria-hidden='true'>Learn more</span><span class='sr-only'> Learn more</span>", ["default"]]]
}
28 changes: 28 additions & 0 deletions content/messages/CA/generic_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "GENERIC",
"messageType": "GENERIC",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedMonthlyPayment": "${CREDIT_OFFERS_DS.formattedMonthlyPayment}",
"total_payments": "${CREDIT_OFFERS_DS.total_payments}",
"minAmount": "${CREDIT_OFFERS_DS.minAmount}",
"maxAmount": "${CREDIT_OFFERS_DS.maxAmount}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}",
"formattedTotalCost": "${CREDIT_OFFERS_DS.formattedTotalCost}"
}
},
"headline": [
["Achetez maintenant, payez plus tard.", ["default", "xsmall"]],
["Achetez maintenant et payez plus tard.", ["xsmall.2"]]
],
"subHeadline": [],
"disclaimer": [
["<span aria-hidden='true'>En savoir plus</span><span class='sr-only'> En savoir plus</span>", ["default"]]
]
}
26 changes: 26 additions & 0 deletions content/messages/CA/short_term_nq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "PAY_LATER_SHORT_TERM",
"messageType": "PLST_NQ",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}"
}
},
"headline": [
["Buy now, pay later.", ["default", "xsmall"]],
["Buy now and pay later.", ["xsmall.2"]],
[
"Pay in 4 interest-free payments on purchases of {formattedMinAmount}-{formattedMaxAmount}.",
["medium", "large", "xlarge"]
]
],
"subHeadline": [],
"disclaimer": [["<span aria-hidden='true'>Learn more</span><span class='sr-only'> Learn more</span>", ["default"]]]
}
28 changes: 28 additions & 0 deletions content/messages/CA/short_term_nq_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "PAY_LATER_SHORT_TERM",
"messageType": "PLST_NQ",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}"
}
},
"headline": [
["Achetez maintenant, payez plus tard.", ["default", "xsmall"]],
["Achetez maintenant et payez plus tard.", ["xsmall.2"]],
[
"Payer en 4 versements sans intérêt pour les achats de {formattedMinAmount} à {formattedMaxAmount}.",
["medium", "large", "xlarge"]
]
],
"subHeadline": [],
"disclaimer": [
["<span aria-hidden='true'>En savoir plus</span><span class='sr-only'> En savoir plus</span>", ["default"]]
]
}
26 changes: 26 additions & 0 deletions content/messages/CA/short_term_q.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "PAY_LATER_SHORT_TERM",
"messageType": "PLST_SQ",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}"
}
},
"headline": [
["Buy now, pay later.", ["default", "xsmall"]],
[["Buy now and pay later."], ["xsmall.2"]],
[
["Pay in 4 interest-free payments of {formattedPeriodicPayment}", [".", "weak"]],
["medium", "large", "xlarge"]
]
],
"subHeadline": [],
"disclaimer": [["<span aria-hidden='true'>Learn more</span><span class='sr-only'> Learn more</span>", ["default"]]]
}
28 changes: 28 additions & 0 deletions content/messages/CA/short_term_q_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"meta": {
"id": "",
"offerCountry": "CA",
"offerType": "PAY_LATER_SHORT_TERM",
"messageType": "PLST_SQ",
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
"lander": "",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}"
}
},
"headline": [
["Achetez maintenant, payez plus tard.", ["default", "xsmall"]],
[["Achetez maintenant et payez plus tard."], ["xsmall.2"]],
[
["Payer en 4 versements sans intérêt de {formattedPeriodicPayment}", [".", "weak"]],
["medium", "large", "xlarge"]
]
],
"subHeadline": [],
"disclaimer": [
["<span aria-hidden='true'>En savoir plus</span><span class='sr-only'> En savoir plus</span>", ["default"]]
]
}
41 changes: 41 additions & 0 deletions content/modals/CA/short_term.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV5Design": "true",
"v5.1": "true",
"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% first payment.",
"Use autopay for the rest of your payments. It's easy!"
],
"disclosure": [
"Pay in 4 is available to approved consumers for purchases of {formattedMinAmount} to {formattedMaxAmount} (CAD) for certain transaction types. Availability depends on the merchant. You must be age of majority in the province or territory where you live to apply. Any transactions in other currencies will be converted to Canadian dollars subject to applicable currency conversion charges. You may repay the amount you owe in full at any time, without any fees or charges."
]
}
}
41 changes: 41 additions & 0 deletions content/modals/CA/short_term_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV5Design": "true",
"v5.1": "true",
"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": "Payer en 4 versements sans intérêt",
"subheadline": "Aucun impact sur la cote de crédit et aucuns frais de retard. Disponible pour les achats de {formattedMinAmount} à {formattedMaxAmount}.",
"qualifyingSubheadline": "Divisez le montant de {formattedTotalCost} en {total_payments} versements sans intérêt, sans incidence sur votre cote de crédit et sans frais de retard.",
"donutTimestamps": ["Aujourd'hui", "2 semaines", "4 semaines", "6 semaines"],
"instructions": [
"Choisissez PayPal à la caisse pour payer plus tard avec <strong>le Paiement en 4</strong>.",
"Terminez votre achat avec un premier paiement de 25 %.",
"Utilisez le paiement préapprouvé pour le reste de vos paiements. C'est facile !"
],
"disclosure": [
"Paiement en 4 est offert aux consommateurs approuvés pour les achats de {formattedMinAmount} à {formattedMaxAmount} (CAD) pour certains types de transactions. La disponibilité dépend du marchand. Vous devez avoir atteint l’âge de la majorité dans la province ou le territoire où vous résidez pour présenter une demande. Toutes les transactions dans d’autres devises seront converties en dollars canadiens, sous réserve des frais de conversion de devise applicables. Vous pouvez rembourser la totalité du montant que vous devez en tout temps, sans frais."
]
}
}
49 changes: 49 additions & 0 deletions content/modals/CA/short_term_xo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV5Design": "true",

"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",
"subheadline": "No impact on credit score and no late fees. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}.",
"qualifyingSubheadline": "Split {formattedTotalCost} into {total_payments} interest-free payments with no impact on credit score and no late fees.",
"donutTimestamps": ["Today", "2 weeks", "4 weeks", "6 weeks"],
"instructions": {
"instructionsHeadline": "How Pay in 4 works",
"instructionsSubHeadline": [
"Choose PayPal at checkout to pay later with <strong>Pay in 4</strong><span aria-hidden='true'>.</span>",
"Complete your purchase with a 25% first payment.",
"Use autopay for the rest of your payments. It's easy!"
]
},
"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 approved consumers for purchases of {formattedMinAmount} to {formattedMaxAmount} (CAD) for certain transaction types. Availability depends on the merchant. You must be age of majority in the province or territory where you live to apply. Any transactions in other currencies will be converted to Canadian dollars subject to applicable currency conversion charges. You may repay the amount you owe in full at any time, without any fees or charges."
]
}
}
49 changes: 49 additions & 0 deletions content/modals/CA/short_term_xo_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"meta": {
"product": "PAY_LATER_SHORT_TERM",
"periodicPayment": "{formattedPeriodicPayment}",
"minAmount": "{minAmount}",
"maxAmount": "{maxAmount}",
"qualifying": "{qualifying_offer}",
"amount": "{transaction_amount}",
"apr": "{apr}",
"useV5Design": "true",
"v5.1": "true",
"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": "Payer en 4",
"subheadline": "Aucun impact sur la cote de crédit et aucuns frais de retard. Disponible pour les achats de {formattedMinAmount} à {formattedMaxAmount}.",
"qualifyingSubheadline": "Divisez le montant de {formattedTotalCost} en {total_payments} versements sans intérêt, sans incidence sur votre cote de crédit et sans frais de retard.",
"donutTimestamps": ["Exigible aujourd'hui", "2 semaines", "4 semaines", "6 semaines"],
"instructions": {
"instructionsHeadline": "Comment fonctionne le Paiement en 4?",
"instructionsSubHeadline": [
"Choisissez PayPal à la caisse pour payer plus tard avec <strong>le Paiement en 4</strong>. ",
"Terminez votre achat avec un premier paiement de 25 %.",
"Utilisez le paiement préapprouvé pour le reste de vos paiements. C'est facile!"
]
},
"cta": {
"buttonTextEligible": "Continuer avec le Paiement en 4",
"buttonTextIneligible": "Retour à la caisse",
"link": "https://www.paypal.com/link/to/short-term-application"
},
"disclosure": [
"Paiement en 4 est offert aux consommateurs approuvés pour les achats de {formattedMinAmount} à {formattedMaxAmount} (CAD) pour certains types de transactions. La disponibilité dépend du marchand. Vous devez avoir atteint l’âge de la majorité dans la province ou le territoire où vous résidez pour présenter une demande. Toutes les transactions dans d’autres devises seront converties en dollars canadiens, sous réserve des frais de conversion de devise applicables. Vous pouvez rembourser la totalité du montant que vous devez en tout temps, sans frais."
]
}
}
8 changes: 8 additions & 0 deletions demo/helpers/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,12 @@ const accounts = [
// 'DEV0000ITPLNA',
// 'DEV00000ITPLQ',
// 'DEV0000ITPLNQ'

// CA
// 'DEV000ENCAPLQ',
// 'DEV00ENCAPLNQ',
// 'DEV00ENCAPLNA',
// 'DEV000FRCAPLQ',
// 'DEV00FRCAPLNQ',
// 'DEV00FRCAPLNA',
];
4 changes: 4 additions & 0 deletions src/components/message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
amount: window.xprops.amount ?? null,
currency: window.xprops.currency ?? null,
buyerCountry: window.xprops.buyerCountry ?? null,
language: window.xprops.language ?? null,
ignoreCache: window.xprops.ignoreCache ?? null,
style: window.xprops.style,
offer: window.xprops.offer ?? null,
Expand Down Expand Up @@ -115,6 +116,7 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
amount,
currency,
buyerCountry,
language,
ignoreCache,
offer,
payerId,
Expand All @@ -137,6 +139,7 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
amount,
currency,
buyerCountry,
language,
ignoreCache,
style,
offer,
Expand All @@ -159,6 +162,7 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
amount,
currency,
buyer_country: buyerCountry,
language,
ignore_cache: ignoreCache,
style,
credit_type: offer,
Expand Down
Loading