idpay-tools

1.0.5 • Public • Published

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

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i idpay-tools

    Weekly Downloads

    9

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    6.28 kB

    Total Files

    5

    Last publish

    Collaborators

    • psychotaha