Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

idpay-tools

Gamer-Bashi12MIT1.0.5

یک پکیج بسیار عالی برای استفاده از درگاه آیدی پی

idpay, آیدیپی, درگاه, پرداخت, آیدی پی

readme

idpay-tools

یک پکیج بسیار عالی برای استفاده از درگاه آیدی پی

shields shields

ویژگی ها:

  • ساختن پیمنت
  • وریفای کردن بعد از پرداخت
  • چک کردن پیمنت

🛠️ مراحل نصب:

1. نصب

npm install idpay-tools

نمونه کد:

const { idpay } = require("idpay-tools");

const a = new idpay("xxxxxxxx-0000-0000-x000-xxxxxxxxxxxx", true)
async function test() {

    const b = await a.createTransaction({
        'order_id': '101',
        'amount': 10000,
        'name': 'طاها اصلانی',
        'phone': '09382198592',
        'mail': 'my@site.com',
        'desc': 'توضیحات پرداخت کننده',
        'callback': 'https://example.com/callback',
    })

    console.log(b)
    id = b.id;

    const c = await a.verifyPayment({
        'id': id,
        'order_id': '101'
    })
    console.log(c)

    const d = await a.transactionStatus({
        'id': id,
        'order_id': '101'
    });
    console.log(d)
}

test()

صفحه npmjs :

NPMJS