0.0.28 • Published 12 months ago
@getmeru/pay-button v0.0.28
Description
This package is intended to be used by our partners to allow payments in websites using Meru
Installation
If you are using a package manager
$ yarn add @getmeru/pay-button
or
$ npm install @getmeru/pay-button --save
Or you can add it as a dependency in your html file
<script src="https://cdn.jsdelivr.net/npm/@getmeru/pay-button"></script>
Usage
import Payment from "@getmeru/pay-button";
const meruPaymentButton = new Payment({
merchantId: "YOUR_MERCHANT_ID",
amount: 20.0,
onPaymentSuccess: () => {},
});
meruPaymentButton.render("meru-button-container");
and just add this in the place where you want to render the button
<div id="meru-button-container"></div>