6. Loading the frontend library
React
Step 1. Install the npm package
npm install payengineStep 2. Load the platform using react useEffect hook
useEffect hookimport { useEffect } from "react";
import { loadPayengine } from "payengine";
const MyComponent = () => {
useEffect(() => {
// Load Payengine on first render only
loadPayengine({
publicKey: config.PAYENGINE_PUBLIC_KEY,
}).then((pe) => {
console.log(pe)
});
}, []);
return (
<>
<pay-engine
type="boarding"
merchant-id="<payengine_merchant_id>"
</pay-engine>
</>
)
}React Native
Vue.js
Step 1. Install the npm package
Step 2. Load the platform using Vue.js lifecycle created hook
created hookAngular
Step 1. Install the npm package
Step 2. Enable `CUSTOM_ELEMENTS_SCHEMA` mode
Step 3. Load the platform using lifecycle ngOnInit hook
ngOnInit hookStep 4. Add the respective HTML components to the Angular Components.
Plain HTML/Javascript
Flutter
Step 1. Configuration
Step 2. Displaying a credit card form
Step 3. Displaying a bank account form for ACH
Step 4 - Using other components.
iOS SDK
Displaying secure form
Capturing card token
Displaying ACH form and capturing token
Lightweight Version (Optimized for Secure Fields)
Previous5a. Securing Embedded UIs Using HMAC (deprecated)Next6a. Preloading PayEngine Web-Component in SPA
Last updated