UNPKG

quickpos

Version:

<div align="center"> <h1>๐Ÿ’ณ QuickPos ๐Ÿš€</h1> <p><strong>A powerful, multi-gateway payment integration module for Node.js</strong></p> <p>Seamlessly integrate with 50+ payment providers worldwide</p>

417 lines (333 loc) โ€ข 12 kB
<div align="center"> <h1>๐Ÿ’ณ QuickPos ๐Ÿš€</h1> <p><strong>A powerful, multi-gateway payment integration module for Node.js</strong></p> <p>Seamlessly integrate with 50+ payment providers worldwide</p> <img src="https://img.shields.io/badge/version-1.3.0-blue.svg" alt="Version"> <img src="https://img.shields.io/badge/npm-quickpos-green.svg" alt="NPM"> <img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="License"> <br> <img src="https://img.shields.io/badge/Node.js-18+-green.svg" alt="Node.js"> <img src="https://img.shields.io/badge/platforms-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg" alt="Platforms"> </div> --- ## ๐Ÿ“‹ Table of Contents - [โœจ Features](#-features) - [๐ŸŒ Supported Payment Providers](#-supported-payment-providers) - [๐Ÿ“ฆ Installation](#-installation) - [๐Ÿš€ Quick Start](#-quick-start) - [๐Ÿ› ๏ธ Usage](#๏ธ-usage) - [๐Ÿ“š API Reference](#-api-reference) - [๐Ÿ›ฃ๏ธ Roadmap](#๏ธ-roadmap) - [๐Ÿค Contributing](#-contributing) - [๐Ÿ“„ License](#-license) --- ## โœจ Features <div align="center"> | Feature | Description | |---------|-------------| | ๐Ÿ”Œ **Multi-Provider Support** | Integrate with 50+ payment gateways worldwide | | ๐Ÿ›ก๏ธ **Secure Transactions** | Enterprise-grade security for all payments | | โšก **Fast Integration** | Get started in minutes with simple setup | | ๐Ÿ“Š **Detailed Reporting** | Comprehensive payment analytics and logs | | ๐ŸŒ **Global Coverage** | Support for traditional and crypto payments | | ๐Ÿ”ง **Customizable** | Tailored solutions for business needs | | ๐Ÿ“ฑ **Callback Handling** | Automatic webhook processing | | ๐Ÿงช **Well Tested** | Extensive test coverage for reliability | </div> --- ## ๐ŸŒ Supported Payment Providers ### ๐Ÿ’ณ Traditional Payment Systems | Provider | Country | Status | |----------|---------|--------| | **Midtrans** | ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia | โœ… Active | | **Tripay** | ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia | โœ… Active | | **Doku** | ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia | โœ… Active | | **PayID19** | ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia | โœ… Active | | **Xendit** | ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ต๐Ÿ‡ญ Indonesia & Philippines | โœ… Active | | **ToyyibPay** | ๐Ÿ‡ฒ๐Ÿ‡พ Malaysia | โœ… Active | | **SenangPay** | ๐Ÿ‡ฒ๐Ÿ‡พ Malaysia | โœ… Active | | **Zarinpal** | ๐Ÿ‡ฎ๐Ÿ‡ท Iran | โœ… Active | | **Paytm** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **Cashfree** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **PayU India** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **PayKun** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **Razorpay** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **Instamojo** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **PhonePe** | ๐Ÿ‡ฎ๐Ÿ‡ณ India | โœ… Active | | **PayU Latam** | ๐Ÿ‡ฒ๐Ÿ‡ฝ ๐Ÿ‡จ๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡ท Latin America | โœ… Active | | **PicPay** | ๐Ÿ‡ง๐Ÿ‡ท Brazil | โœ… Active | | **Cardcom** | ๐Ÿ‡ฎ๐Ÿ‡ฑ Israel | โœ… Active | | **Paycom** | ๐Ÿ‡บ๐Ÿ‡ฟ Uzbekistan | โœ… Active | | **Checkout.com** | ๐ŸŒ Global | โœ… Active | | **2Checkout** | ๐ŸŒ Global | โœ… Active | | **ฤฐyzico** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **PayTR** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **Shopier** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **Papara** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **EsnekPos** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **Paydisini** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **PayNetTR** | ๐Ÿ‡น๐Ÿ‡ท Turkey | โœ… Active | | **PayPal** | ๐ŸŒ Global | โœ… Active | | **Amazon Pay** | ๐ŸŒ Global | โœ… Active | | **Paddle** | ๐ŸŒ Global SaaS | โœ… Active | | **FedaPay** | ๐Ÿ‡ง๐Ÿ‡ฏ Benin | โœ… Active | | **Konnect** | ๐Ÿ‡น๐Ÿ‡ณ Tunisia | โœ… Active | | **PayMaya** | ๐Ÿ‡ต๐Ÿ‡ญ Philippines | โœ… Active | | **PayME** | ๐Ÿ‡ป๐Ÿ‡ณ Vietnam | โœ… Active | | **PrimePayments** | ๐Ÿ‡ฆ๐Ÿ‡ช UAE | โœ… Active | | **YallaPay** | ๐Ÿ‡ฆ๐Ÿ‡ช UAE | โœ… Active | | **NoonPayments** | ๐Ÿ‡ฆ๐Ÿ‡ช UAE | โœ… Active | | **PayTabs** | ๐Ÿ‡ฆ๐Ÿ‡ช ๐Ÿ‡ธ๐Ÿ‡ฆ ๐Ÿ‡ด๐Ÿ‡ฒ ๐Ÿ‡ฏ๐Ÿ‡ด ๐Ÿ‡ช๐Ÿ‡ฌ Middle East | โœ… Active | | **URWay** | ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia | โœ… Active | | **PayOP** | ๐ŸŒ Global | โœ… Active | | **Paymentwall** | ๐ŸŒ Global | โœ… Active | | **Payssion** | ๐ŸŒ Global (300+ methods) | โœ… Active | | **Paysend** | ๐ŸŒ Global | โœ… Active | | **Payoneer** | ๐ŸŒ Global | โœ… Active | | **ShurjoPay** | ๐Ÿ‡ง๐Ÿ‡ฉ Bangladesh | โœ… Active | | **PaySpace** | ๐Ÿ‡ฟ๐Ÿ‡ฆ South Africa | โœ… Active | | **Payriff** | ๐Ÿ‡ฆ๐Ÿ‡ฟ Azerbaijan | โœ… Active | | **Epoint** | ๐Ÿ‡ฆ๐Ÿ‡ฟ Azerbaijan | โœ… Active | | **ePay** | ๐Ÿ‡ง๐Ÿ‡ฌ Bulgaria | โœ… Active | | **PayNet** | ๐Ÿ‡ฒ๐Ÿ‡ฉ Moldova | โœ… Active | | **PortWallet** | ๐ŸŒ Global | โœ… Active | | **Omise** | ๐Ÿ‡น๐Ÿ‡ญ Thailand | โœ… Active | | **YouCanPay** | ๐Ÿ‡ฒ๐Ÿ‡ฆ Morocco | โœ… Active | | **YooKassa** | ๐Ÿ‡ท๐Ÿ‡บ Russia | โœ… Active | | **FreeKassa** | ๐Ÿ‡ท๐Ÿ‡บ Russia | โœ… Active | | **Unitpay** | ๐Ÿ‡ท๐Ÿ‡บ Russia | โœ… Active | ### โ‚ฟ Cryptocurrency Payment Systems | Provider | Features | Status | |----------|----------|--------| | **Plisio** | BTC, ETH, USDT +20 cryptos | โœ… Active | | **CoinPayments** | 2000+ cryptocurrencies | โœ… Active | | **Cryptomus** | Multi-crypto support | โœ… Active | | **Payeer** | Crypto & fiat | โœ… Active | | **Anypay** | Crypto solutions | โœ… Active | | **NowPayments** | 150+ cryptos | โœ… Active | | **Heleket** | Crypto gateway | โœ… Active | | **BitPay** | BTC & crypto | โœ… Active | | **CoinGate** | 70+ cryptos | โœ… Active | | **Volet** | Crypto & fiat gateway | โœ… Active | | **Coinbase Commerce** | Crypto gateway | โœ… Active | | **Perfect Money** | E-currency | โœ… Active | --- ## ๐Ÿ“ฆ Installation ```bash npm install quickpos ``` **Requirements:** - Node.js 18+ - npm or yarn --- ## ๐Ÿš€ Quick Start ```javascript const QuickPos = require('quickpos'); const quickPos = new QuickPos({ providers: { paytr: { merchantId: 'your-merchant-id', merchantKey: 'your-merchant-key', merchantSalt: 'your-merchant-salt', mode: 'test', // or 'live' } }, }); // Create a payment const payment = await quickPos.paytr.createPayment({ name: 'Premium Plan', amount: 29.99, currency: 'USD', callback_link: 'https://yourapp.com/callback', callback_id: 'order-123', }); console.log('Payment URL:', payment.data.url); ``` --- ## ๐Ÿ› ๏ธ Usage ### Basic Setup ```javascript const express = require('express'); const QuickPos = require('quickpos'); const app = express(); app.use(express.json()); const quickPos = new QuickPos({ providers: { // Configure your providers here paypal: { /* config */ }, stripe: { /* config */ }, }, }); // Add middleware app.use(quickPos.middleware()); // Create payment endpoint app.post('/create-payment', async (req, res) => { try { const result = await quickPos.paypal.createPayment({ amount: req.body.amount, currency: req.body.currency, name: req.body.productName, }); res.json(result); } catch (error) { res.status(500).json({ error: error.message }); } }); // Handle callbacks app.post('/payment-callback/:provider', quickPos.handleCallback(), (req, res) => { console.log('Payment result:', req.paymentResult); res.send('OK'); }); app.listen(3000, () => console.log('Server running on port 3000')); ``` ### Advanced Configuration ```javascript const quickPos = new QuickPos({ providers: { paytr: { merchantId: process.env.PAYTR_MERCHANT_ID, merchantKey: process.env.PAYTR_MERCHANT_KEY, merchantSalt: process.env.PAYTR_MERCHANT_SALT, mode: process.env.NODE_ENV === 'production' ? 'live' : 'test', }, cryptomus: { apiKey: process.env.CRYPTOMUS_API_KEY, merchantId: process.env.CRYPTOMUS_MERCHANT_ID, }, }, options: { timeout: 30000, retryAttempts: 3, }, }); ``` --- ## ๐Ÿ“š API Reference ### QuickPos Class #### Constructor ```javascript new QuickPos(config) ``` **Parameters:** - `config.providers` (Object): Provider configurations - `config.options` (Object, optional): Global options #### Methods ##### `createPayment(provider, data)` Creates a new payment with specified provider. **Parameters:** - `provider` (string): Provider name - `data` (Object): Payment data **Returns:** Promise<PaymentResult> ##### `handleCallback(provider)` Middleware for handling payment callbacks. **Parameters:** - `provider` (string): Provider name **Returns:** Express middleware function --- ## ๐Ÿ›ฃ๏ธ Roadmap ### ๐ŸŽฏ Upcoming Features - [ ] ๐Ÿฆ **New Payment Providers**: Stripe, Square, Adyen - [ ] ๐ŸŒ **Multi-Language Support**: i18n integration - [ ] ๐Ÿ’ธ **Multi-Currency Support**: Automatic conversion - [ ] ๐Ÿ“ฑ **Mobile SDK**: React Native & Flutter support - [ ] ๐Ÿ” **Advanced Analytics**: Real-time dashboards - [ ] ๐Ÿค– **AI-Powered Routing**: Smart provider selection - [ ] ๐Ÿ“ **Enhanced Documentation**: Interactive API docs ### โœ… Completed Integrations <div align="center"> | Provider | Status | Date | |----------|--------|------| | PayTR | โœ… | v1.0.0 | | Shopier | โœ… | v1.0.1 | | Cryptomus | โœ… | v1.0.2 | | Payeer | โœ… | v1.0.3 | | Papara | โœ… | v1.0.4 | | ฤฐyzico | โœ… | v1.0.5 | | Anypay | โœ… | v1.1.0 | | EsnekPos | โœ… | v1.1.1 | | PayMaya | โœ… | v1.1.2 | | FedaPay | โœ… | v1.1.3 | | Heleket | โœ… | v1.1.4 | | Paydisini | โœ… | v1.1.5 | | PayPal | โœ… | v1.2.0 | | Paymentwall | โœ… | v1.2.1 | | Konnect | โœ… | v1.2.2 | | PayME | โœ… | v1.2.3 | | PrimePayments | โœ… | v1.2.4 | | YallaPay | โœ… | v1.2.5 | | NowPayments | โœ… | v1.2.6 | | NoonPayments | โœ… | v1.2.7 | | PayOP | โœ… | v1.2.8 | | Midtrans | โœ… | v1.2.9 | | Plisio | โœ… | v1.3.0 | | Tripay | โœ… | v1.3.0 | | And 30+ more... | โœ… | Ongoing | </div> --- ## ๐Ÿค Contributing We welcome contributions! Here's how you can help: ### Ways to Contribute - ๐Ÿ› **Report Bugs**: Open issues for bugs you find - ๐Ÿ’ก **Suggest Features**: Share your ideas for new features - ๐Ÿ”ง **Code Contributions**: Submit pull requests - ๐Ÿ“– **Documentation**: Help improve docs - ๐Ÿงช **Testing**: Add test cases ### Development Setup ```bash # Fork and clone the repository git clone https://github.com/your-username/QuickPos.git cd QuickPos # Install dependencies npm install # Run tests npm test # Start development npm run dev ``` ### Guidelines - Follow the existing code style - Add tests for new features - Update documentation - Use conventional commits --- ## ๐Ÿ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. --- <div align="center"> **Built with โค๏ธ by [QuickPanel.NET](https://quickpanel.net)** *Empowering businesses with seamless payment solutions worldwide* [โญ Star us on GitHub](https://github.com/codedByCan/QuickPos) โ€ข [๐Ÿ› Report Issues](https://github.com/codedByCan/QuickPos/issues) โ€ข [๐Ÿ“ง Contact](mailto:support@quickpanel.net) </div> --- ## ๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe Dokรผmantasyon ### ร–zellikler - ๐Ÿ”Œ **ร‡oklu SaฤŸlayฤฑcฤฑ DesteฤŸi**: 50+ รถdeme aฤŸ geรงidi - ๐Ÿ›ก๏ธ **Gรผvenli ฤฐลŸlemler**: Kurumsal dรผzey gรผvenlik - โšก **Hฤฑzlฤฑ Entegrasyon**: Dakikalar iรงinde baลŸlayฤฑn - ๐Ÿ“Š **Detaylฤฑ Raporlama**: Kapsamlฤฑ analizler ### Kurulum ```bash npm install quickpos ``` ### Hฤฑzlฤฑ BaลŸlangฤฑรง ```javascript const QuickPos = require('quickpos'); const quickPos = new QuickPos({ providers: { paytr: { merchantId: 'merchant-id', merchantKey: 'merchant-key', merchantSalt: 'merchant-salt', mode: 'test', } }, }); const odeme = await quickPos.paytr.createPayment({ name: 'Premium Paket', amount: 29.99, currency: 'TRY', callback_link: 'https://uygulamaniz.com/callback', callback_id: 'siparis-123', }); ``` Daha fazla detay iรงin yukarฤฑdaki ฤฐngilizce dokรผmantasyonu inceleyin.