อ้างอิง Viewports

อ้างอิง Viewports

Viewports คือตำแหน่งเฉพาะใน Stripe Dashboard ที่ UI ของแอปสามารถแสดงได้ แต่ละ viewport มีข้อมูลบริบทที่พร้อมใช้งานสำหรับ component ของคุณ

Viewports ที่มี

Customer Views

Viewportคำอธิบายข้อมูลบริบท
stripe.dashboard.customer.detailหน้ารายละเอียดลูกค้าcustomer object
stripe.dashboard.customer.detail.tabTab ในหน้าลูกค้าcustomer object

Payment Views

Viewportคำอธิบายข้อมูลบริบท
stripe.dashboard.payment.detailหน้ารายละเอียดการชำระเงินpaymentIntent object
stripe.dashboard.invoice.detailหน้ารายละเอียดใบแจ้งหนี้invoice object

ตัวอย่างการ implement

import { useExtensionContext } from "@stripe/ui-extension-sdk/context";
import { Box, Heading, Button } from "@stripe/ui-extension-sdk/ui";
const CustomerBrevoView = () => {
const { environment } = useExtensionContext();
const customer = environment.objectContext;
return (
<Box>
<Heading>Brevo Sync Status</Heading>
<Box>Customer ID: {customer.id}</Box>
<Button onPress={() => syncToBrevo(customer.id)}>
Sync to Brevo
</Button>
</Box>
);
};
export default CustomerBrevoView;

ขั้นตอนถัดไป

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

ผู้ช่วย AI

สวัสดี! ถามฉันเกี่ยวกับเอกสารได้เลย

เริ่มต้นฟรีกับ Brevo