npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quickpos

v1.0.0

Published

QuickPos, farklı ödeme sağlayıcılarını destekleyen güçlü bir ödeme entegrasyon modülüdür. Şu anda PayTR sağlayıcısını desteklemektedir ve gelecekte birçok yeni sağlayıcı ile özellik eklemeyi planlamaktadır. Yol haritamıza göz atarak gelecek özellikleri ke

Downloads

14

Readme

💳 QuickPos 🚀

QuickPos, farklı ödeme sağlayıcılarını destekleyen güçlü bir ödeme entegrasyon modülüdür. Şu anda PayTR sağlayıcısını desteklemektedir ve gelecekte birçok yeni sağlayıcı ile özellik eklemeyi planlamaktadır. Yol haritamıza göz atarak gelecek özellikleri keşfedebilirsiniz.


✨ Özellikler

  • 🔌 Çoklu Ödeme Sağlayıcı Desteği: Birden fazla ödeme sağlayıcı ile uyumlu.
  • 🛡️ Güvenli Ödeme İşlemleri: Güvenli ve sorunsuz ödeme işlemleri.
  • 🔄 Kolay Entegrasyon: Hızlı ve basit entegrasyon.
  • 📊 Detaylı Ödeme Raporları: Gelişmiş raporlama özellikleri.
  • 💼 İşletmeler için Özelleştirilebilir Çözümler: Özel ihtiyaçlara yönelik çözümler.

📦 Kurulum

npm install quickpos

🛠️ Kullanım

1. Sunucu Kurulumu

const express = require('express');
const bodyParser = require('body-parser');
const QuickPos = require('quickpos');

const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

const quickPos = new QuickPos({
  providers: {
    paytr: {
      merchantId: 'xXxxXxX',
      merchantKey: 'xXxxXxX',
      merchantSalt: 'xXxxXxX',
      mode: 'test',
    }
  },
});

// QuickPos middleware'ini ekleyin
app.use(quickPos.middleware());

// Ödeme oluşturma formu
app.get('/', (req, res) => {
    res.send(`
        <form action="/payment/paytr" method="post">
        <input type="text" name="amount" placeholder="Amount" required>
        <select name="currency" required>
            <option value="TL">TL</option>
            <option value="USD">USD</option>
            <option value="EUR">EUR</option>
        </select>
        <input type="text" name="orderId" placeholder="Order ID" required>
        <button type="submit">Pay</button>
        </form>
    `);
});

// Ödeme oluşturma rotası
app.post('/payment/:provider', async (req, res) => {
  const { provider } = req.params;
  
  if (!req.quickPos[provider]) {
    return res.status(400).json({ error: 'Invalid payment provider' });
  }

  try {
    const result = await req.quickPos[provider].createPayment({
      name: 'Test Product',
      amount: req.body.amount,
      currency: req.body.currency,
      callback_link: `https://mylocalhostx.speedsmm.com/payment-callback/${provider}`,
      callback_id: req.body.orderId,
      maxInstallment: 1,
      expiry_date: '2024-12-25 17:00:00',
      email: '[email protected]',
    });

    if (result.status === 'success') {
      res.json({ redirectUrl: result.data.url });
    } else {
      res.status(400).json(result);
    }
  } catch (error) {
    res.status(500).json({ error: error.message });
  }
});

// Callback rotası
app.post('/payment-callback/:provider', quickPos.handleCallback('paytr'), (req, res) => {
  console.log('Payment result:', req.paymentResult);
  
  if (req.paymentResult.status === 'success') {
    res.send('OK');
  } else {
    res.status(400).send('Payment failed');
  }
});

app.listen(80, () => {
  console.log('Server is running on port 80');
});

2. Konfigürasyon

QuickPos örneğini oluştururken ödeme sağlayıcılarını yapılandırın:

const quickPos = new QuickPos({
  providers: {
    paytr: {
      merchantId: 'xXxxXxX',
      merchantKey: 'xXxxXxX',
      merchantSalt: 'xXxxXxX',
      mode: 'test',
    }
  },
});

Desteklenen Ödeme Sağlayıcıları 🏦

  • PayTR

Yol Haritası 🛣️

Gelecek Özellikler

  • 🏦 Yeni ödeme sağlayıcıları: İyzico, Vallet, Shipy
  • 🌐 Çoklu dil desteği
  • 💸 Çoklu para birimi desteği
  • 📝 Gelişmiş dökümantasyon

İlerleme Durumu

  • [x] PayTR entegrasyonu
  • [ ] İyzico entegrasyonu
  • [ ] Vallet entegrasyonu
  • [ ] Shipy entegrasyonu
  • [ ] Shopinext entegrasyonu
  • [ ] Paywant entegrasyonu
  • [ ] Payizone entegrasyonu
  • [ ] Weepay entegrasyonu
  • [ ] Paynet entegrasyonu
  • [ ] Stripe entegrasyonu
  • [ ] PayPal entegrasyonu

Katkıda Bulunma 🤝

Katkılarınızı bekliyoruz! Lütfen katkı yönergelerimizi okuyun.