New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

monopay

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monopay

A node.js package for making payment transactions with different Iranian IPGs

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76
increased by1.33%
Maintainers
1
Weekly downloads
 
Created
Source

Monopay - مونو‌پِی

monopay

Intended Runtime Environment: Node.js NPM Version License Last Comit

A node.js package for making payment transactions with different Iranian IPGs with one single API. (Previously known as "Polypay")

مونو‌پِی یک پکیج نود جی اس برای انجام تراکنش‌های آنلاین با سرویس های درگاه پرداخت مختلف با یک رابط واحد است.

در صورتی که از پکیج خوشتون اومده، بهش استار بدید تا بیشتر دیده بشه و مشکلاتش زودتر برطرف بشن. 🙏

لطفا قبل از استفاده در پروداکشن،‌ از پایدار بودن درایور مطمئن شوید. - جدول پشتیبانی درایور ها

📖 Documentation

🔌 Installation

For npm users:

npm install monopay

For yarn users:

yarn add monopay

🚀 Usage

⚒ Examples

Getting a payment driver

const driver = getPaymentDriver('zibal', {
  merchantId: 'merchant-id',
  sandbox: true,
});

Requesting for payment

const paymentInfo = await driver.requestPayment({
  amount: 200000, // IRR
  callbackUrl: 'mysite.com/callback',
});

Verifying the payment in callback

app.all('/callback', async (req, res) => {
  const receipt = await driver.verifyPayment(
    {
      amount: 200000, // IRR
      referenceId: 1234,
    },
    { ...req.query, ...req.body }
  );

  res.json({
    referenceId: receipt.referenceId,
    success: true,
    message: 'The payment transaction was successful.',
  });
});

A full example with express can be found here

📜 TODO List

  • Support for all the drivers
  • Add NestJS module integration
  • Examples for Koa, Fastify and NestJS
  • "Re-brand" (Logo and banner)

🤝 Contribution

Please read Contribution and Code Of Conduct.

📝 License

MIT License - Please see License File for more information.

Keywords

FAQs

Package last updated on 16 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc