我想知道如何实现与PayPal相同的电子邮件结构。
看起来像这样(在Google的收件箱中):
但我在这里找不到正确的类型:https://developers.google.com/gmail/markup/reference/
知道如何实现类似PayPal的标记吗?
答案 0 :(得分:0)
使用schema.org/Invoice和schema.org/PayAction,我能够获得您从PayPal发布的电子邮件结构。它还产生了一个" View Bill"按钮,仅显示在收件箱而非Gmail中。看看我下面的示例脚本。 email markup tester似乎喜欢它,没有发现错误。尝试使用此Gmail Schema Tester或Apps Script与您的Gmail帐户一起发送。
<script type="application/ld+json">
[
{
"@context": "http://schema.org",
"@type": "Invoice",
"description": "January 2015 Acme Bill",
"url": "https://www.americanexpress.com",
"accountId": "xxxx-xxxx-xxxx-1234",
"potentialaction": {
"url": "https://example.com",
"@type": "PayAction"
},
"paymentDue": "2020-01-30",
"minimumPaymentDue": {
"@type": "PriceSpecification",
"price": "$15.00"
},
"totalPaymentDue": {
"@type": "PriceSpecification",
"price": "$200.00"
},
"paymentStatus": "payment due",
"provider": {
"@type": "Organization",
"name": "Acme Bank"
}
}
]
</script>
&#13;
你应该得到这个: