@mafpay/weblib
TypeScript icon, indicating that this package has built-in type declarations

1.3.22 • Public • Published

MAF Pay provides components are easy utilities to integrate with MAF Pay. MAF Pay component can be use like any standard web components.

To define MAF Pay components call defineCustomElements()

import {defineCustomElements} from "@mafpay/weblib";

defineCustomElements();

Next is to import the basic styles file mafpay.css. This can be done from the bundler, directly, or imports.

<link rel="stylesheet" href="node_modules/@mafpay/weblib/dist/mafpay/mafpay.css">

Now you can start using the components anywhere in the HTML page:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Payment Component Vanilla Sample</title>
  <link rel="stylesheet" href="node_modules/@mafpay/weblib/dist/mafpay/mafpay.css">
</head>
<body>
<div>
  <mafpay-card-holder-name></mafpay-card-holder-name>
  <mafpay-card-number></mafpay-card-number>
  <mafpay-card-expiry></mafpay-card-expiry>
  <mafpay-card-cvc></mafpay-card-cvc>
  <mafpay-card-submit></mafpay-card-submit>
</div>
<script src="index.js"></script>
</body>
</html>

Readme

Keywords

none

Package Sidebar

Install

npm i @mafpay/weblib

Weekly Downloads

559

Version

1.3.22

License

UNLICENSED

Unpacked Size

5.42 MB

Total Files

596

Last publish

Collaborators

  • mafpay