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>
30 lines (25 loc) • 829 B
JavaScript
const PayKunClient = require('../lib/paykun');
const client = new PayKunClient({
merchantId: 'YOUR_MERCHANT_ID',
accessToken: 'YOUR_ACCESS_TOKEN',
encryptionKey: 'YOUR_ENCRYPTION_KEY',
sandbox: true
});
async function example() {
try {
const payment = await client.createPayment({
amount: 1000,
orderId: 'TEST-001',
currency: 'INR',
callback_link: 'https://yoursite.com/callback',
name: 'Rajesh Kumar',
email: 'rajesh@example.com',
phone: '9876543210'
});
console.log('Payment URL:', payment.data.url);
console.log('Transaction ID:', payment.data.transactionId);
} catch (error) {
console.error('Error:', error.message);
}
}
example();