Compare commits

...

2 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
0517b3e430 Merge branch 'develop' into add-mail-invoice-receipt-schema 2024-11-10 14:37:11 +02:00
Ahmed Bouhuolia
4c67d2e321 feat: add invoice mail receipt schema 2024-11-06 14:17:28 +02:00

View File

@@ -0,0 +1,64 @@
export interface InvoicePaymentEmailSchemaProps {
companyName: string;
companyLogoUri: string;
total: string;
currencyCode: string;
dueDate: string;
paymentUrl: string;
invoiceNumber: string;
invoiceDate: string;
}
export function InvoicePaymentEmailSchema({
companyName,
companyLogoUri,
currencyCode,
total,
paymentUrl,
dueDate,
invoiceDate,
invoiceNumber
}: InvoicePaymentEmailSchemaProps) {
return (
<script type="application/ld+json">
{`
{
"@context": "http://schema.org",
"@type": "Invoice",
"description": "Invoice for services rendered",
"paymentStatus": "http://schema.org/PaymentDue",
"totalPaymentDue": {
"@type": "MonetaryAmount",
"currency": "${currencyCode}",
"value": "${total}"
},
"provider": {
"@type": "Organization",
"name": "${companyName}",
"logo": "${companyLogoUri}",
"telephone": "+1234567890"
},
"paymentDueDate": "${dueDate}",
"paymentUrl": "${paymentUrl}",
"referencesOrder": {
"@type": "Order",
"orderNumber": "${invoiceNumber}",
"orderStatus": "http://schema.org/OrderPaymentDue",
"orderDate": "${invoiceDate}"
},
"potentialAction": {
"@type": "ViewAction",
"target": "${paymentUrl}",
"name": "View and Pay Invoice"
}
}
`}
</script>
);
}