amwal-checkout
v0.0.12
Published
Amwal Checkout Web Component Plugin
Downloads
5
Keywords
Readme
Amwal Checkout
To set up your website to use Amwal checkout follow the following steps:
Sign up with amwal merchant for your country. for KSA, visit https://qa-merchant.sa.amwal.tech to obtain a sandbox key or production key
include the npm package js into your website and instantate
amwal-checkout
web component
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>My Cool Store</title>
<script type="module" src="https://cdn.jsdelivr.net/npm/amwal-checkout@latest/dist/checkout/checkout.esm.js"></script>
</head>
<body>
<amwal-checkout
merchant-id="sandbox-amwal-4e876d00-a50e-482c-a6e1-a1a9df400ce5"
amount="20"
country-code="SA"
lang="en"
dark-mode="off"
address-required="true"/>
<script>
const amwalCheckoutElement = document.querySelector('amwal-checkout');
amwalCheckoutElement.addEventListener('amwalCheckoutSuccess', ev => console.log(ev.detail) )
</script>
</body>
</html>