Customer Screen In-App Integration
Option 1: Using Your Own Customer Screen
//Initialize your custom Customer Screen by sending its URL to Easypay
const initCustomerScreen = () => {
// Check if the updateCustomerDisplay handler is available
if (window.updateCustomerDisplay) {
const initRequest = {
method: "initCustomerDisplayUrl",
customerDisplayUrl: "https://your-customer-screen-url.com" // Replace with your customer screen URL
};
try {
// Send the new order line request to Easypay's handler
window.updateCustomerDisplay.postMessage(JSON.stringify(initRequest ));
console.log("Initialized custom Customer Screen:", initRequest);
} catch (error) {
console.error("Failed to initialize Customer Screen:", error);
// Optionally, implement retry logic or notify the user
}
} else {
console.error("updateCustomerDisplay handler is not available.");
// Optionally, fallback to WebSocket Integration or notify the user
}
};
// Example usage:
initCustomerScreen();Option 2: Using Easypay's Built-in Customer Screen
Adding a New Order Line
Updating an Existing Order Line
Removing an Order Line
Creating a New Order (Clearing Order Lines)
Updating All Order Lines at Once
Summary of In-App Integration Methods
Functionality
Method
Description
Last updated