Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Fast Vallet

🎈 Images 🎈

imageimage

🌱 Example Create Link Vallet 🌱

constvallet=require('fast-vallet');constdata={referer: 'localhost',// Referer Domain example.comhash: 'xxxx',// Api Hash AnahtarıuserName: 'xxxx',// Apı Userpassword: 'xxxxxxxxxxx',// Api KeyshopCode: 'xxx',// Api Mağaza KoduproductName: 'productName',productData: 'productData',productType: 'DIJITAL_URUN',productsTotalPrice: 21,orderPrice: 20.00,currency: 'TRY',orderId: '20',locale: 'locale',conversationId: 'DIJITAL_URUN',buyerName: 'buyerName',buyerSurName: 'buyerSurName',buyerGsmNo: 'buyerGsmNo',buyerMail: 'buyerEmail@gmail.com',buyerIp: '124.432.423',buyerAdress: 'buyerAdress',BuyerCountry: 'BuyerCountry',BuyerCity: 'BuyerCity',buyerDistrict: 'buyerDistrict',callbackOkUrl: 'http://localhost/callbackOkUrl',callbackFailUrl: 'http://localhost/callbackFailUrl',};vallet.createPaymentLink(data,(err,res)=>{console.log(err,res);});

🎏 Example Express Fast-Vallet 🎏

constexpress=require('express');constapp=express();constvallet=require('fast-vallet');app.get('/createPaymentLink',(req,res)=>{constdata={referer: 'localhost',// Referer Domain example.comhash: 'xxxx',// Api Hash AnahtarıuserName: 'xxxx',// Apı Userpassword: 'xxxxxxxxxxx',// Api KeyshopCode: 'xxx',// Api Mağaza KoduproductName: 'productName',productData: 'productData',productType: 'DIJITAL_URUN',productsTotalPrice: 21,orderPrice: 20.00,currency: 'TRY',orderId: '20',locale: 'locale',conversationId: 'DIJITAL_URUN',buyerName: 'buyerName',buyerSurName: 'buyerSurName',buyerGsmNo: 'buyerGsmNo',buyerMail: 'buyerEmail@gmail.com',buyerIp: '124.432.423',buyerAdress: 'buyerAdress',BuyerCountry: 'BuyerCountry',BuyerCity: 'BuyerCity',buyerDistrict: 'buyerDistrict',callbackOkUrl: 'http://localhost/callbackOkUrl',callbackFailUrl: 'http://localhost/callbackFailUrl',};vallet.createPaymentLink(data,(response)=>{//console.log(response);if(response.status==='error')returnres.send(response.message);res.redirect(response.url);});});app.get('/callbackOkUrl',(req,res)=>{res.send('Ödeme Başarılı');});app.get('/callbackFailUrl',(req,res)=>{res.send('Ödeme Başarısız');});app.get('/callback',async(req,res)=>{letdata={status: req.body.status,paymentStatus: req.body.paymentStatus,hash: req.body.hash,paymentAmount: req.body.paymentAmount,paymentType: req.body.paymentType,conversationId: req.body.conversationId,orderId: req.body.orderId,};if(data.status!=='success')returnres.send('Ödeme Başarısız');// Veritabanı işlemlerires.send('ok');});app.listen(80,()=>{console.log('Server Started');});

🌘 Example Response Fast-Vallet 🌘

{status: 'success',data: {status: 'success',errorMessage: '',payment_page_url: 'https://www.vallet.com.tr/payment-center/en/copay/XXXXXXXXX',payment_page_url_domestic_card: 'https://www.vallet.com.tr/payment-center/en/copay/XXXXXXXXX/kredi-karti',payment_page_url_bank_transfer_card: 'https://www.vallet.com.tr/payment-center/en/copay/XXXXXXXXX/banka-havale',payment_page_url_international_card: 'https://www.vallet.com.tr/payment-center/en/copay/XXXXXXXXX/kredi-karti-dunya',ValletOrderNumber: '111111111',ValletOrderId: '1111111113',conversationId: 'DIJITAL_URUN'},url: 'https://www.vallet.com.tr/payment-center/en/copay/XXXXXXXXX'}

📨 CallBack Vallet 📨

{status: 'success',paymentStatus: 'paymentOk',hash: 'xxxxxxxx',paymentCurrency: 'TRY',paymentAmount: '10.35',paymentType: 'KART',paymentTime: '2023-08-18 01:57:53.000',conversationId: 'xxxxxx',orderId: 'xxx',shopCode: 'xxx',orderPrice: '10.35',productsTotalPrice: '10.0',valletOrderNumber: 'xxxx',valletOrderId: 'xxxx',productType: 'DIJITAL_URUN',callbackOkUrl: 'https://localhost.com/callbackOkUrl',callbackFailUrl: 'https://localhost.com/callbackFailUrl',callback_url: 'https://localhost.com/dashboard/payment/vallet'}

🛠️ Installation 🛠️

⛳Tech Stack ⛳

🗄️ Server: Node, Axios, form-data, crypto, buffer


🎯 License 🎯

About

Vallet Sanal Pos Link Oluşturma NodeJs

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages