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

fast-shipynet

v1.1.1

Published

Shipnet sanal pos için bir nodejs modülü fix error

Downloads

19

Readme

FIX ERROR

1. Hakkında

2018 yılından bu yana ödeme hizmetleri konusunda bir çok alanda hizmet veren Shipy, gelişmiş ödeme çözümleri ve geniş ödeme yelpazesi ile müşterilerinin çoğu alanda ihtiyaçlarını tam anlamıyla karşılıyor. Shipy için geliştirilen bu kütüphane ile Shipy sanal pos API'lerini çok kolay bir şekilde kullanabilirsiniz.

  • Kredi (Taksit seçenekleri) veya banka kartı ile ödeme.
  • Havale veya eft ile ödeme.
  • Mobil ödemeler.

2. Kurulum

Node.js 8.0.0 veya daha üstü gerekir.

npm install shipynet
yarn add shipynet
pnpm add shipynet

2.1. Zorunlu Paketler (Otomatik Kurulum)

  • axios api post get işlemleri için kullanılır (npm install axios)
  • crypto callback işleminde bir hash oluşturmak için kullanıyoruz (npm install crypto)

3. Örnekler

Önceklikle shipynet kurun:

npm install fast-shipynet

3.1. shipynet İçeri Aktarma ve Ayarları Yapmak

const Shipynet = require('fast-shipynet');
const shipy = new Shipynet('API_KEY');

3.2. Kredi veya Banka Kartı ile Ödeme Yapmak

async function main() {
    let paymentID = 'cart-'+Math.random().toString(36).substring(7);

    shipy.cart({
        usrIp: '192.168.1.1', //Kullanıcının ip adresi
        usrName: 'John Doe', //Kullanıcının adı/soyadı/kullanıcıadı
        usrAddress: 'Turkey/Ankara', //Kullanıcının adresi
        usrPhone: '+905xxxxxxxxx', //Kullanıcının telefon numarası
        usrEmail: '[email protected]', //Kullanıcının e-posta adresi
        amount: 5, //Ödenecek tutar
        returnID: paymentID, //Ödeme sonrası callback tarafında geri dönülecek ödeme ID'si
        currency: 'TRY', //Ödeme para birimi
        pageLang: 'TR', //Ödeme sayfası dili
        mailLang: 'TR', //Ödeme sonrası e-posta dili
        installment: 0, //Taksit sayısı
    });

    //İpucu -> PaymetID'yi veritabanınıza kaydederek ödeme sonrası callback tarafında kullanabilirsiniz.

    let response = await shipy.run();
    console.log(response);
    //response.link -> Ödeme sayfasına yönlendirme linki
};

main();

3.3. Havale veya EFT ile Ödeme Yapmak

async function main() {
    let paymentID = 'eft-'+Math.random().toString(36).substring(7);

    shipy.eft({
        usrIp: '192.168.1.1', //Kullanıcının ip adresi
        usrName: 'John Doe', //Kullanıcının adı/soyadı/kullanıcıadı
        usrAddress: 'Turkey/Ankara', //Kullanıcının adresi
        usrPhone: '+905xxxxxxxxx', //Kullanıcının telefon numarası
        usrEmail: '[email protected]', //Kullanıcının e-posta adresi
        amount: 5, //Ödenecek tutar
        returnID: paymentID, //Ödeme sonrası callback tarafında geri dönülecek ödeme ID'si
        currency: 'TRY', //Ödeme para birimi
        pageLang: 'TR', //Ödeme sayfası dili
        mailLang: 'TR', //Ödeme sonrası e-posta dili
        installment: 0, //Taksit sayısı
    });

    //İpucu -> PaymetID'yi veritabanınıza kaydederek ödeme sonrası callback tarafında kullanabilirsiniz.

    let response = await shipy.run();
    console.log(response);
    //response.link -> Ödeme sayfasına yönlendirme linki
};

main();

3.4. Mobil Ödemeler

async function main() {
    let paymentID = 'mobile-'+Math.random().toString(36).substring(7);

    shipy.mobile({
        usrIp: '192.168.1.1', //Kullanıcının ip adresi
        usrName: 'John Doe', //Kullanıcının adı/soyadı/kullanıcıadı
        usrAddress: 'Turkey/Ankara', //Kullanıcının adresi
        usrPhone: '+905xxxxxxxxx', //Kullanıcının telefon numarası
        usrEmail: '[email protected]', //Kullanıcının e-posta adresi
        amount: 5, //Ödenecek tutar
        returnID: paymentID, //Ödeme sonrası callback tarafında geri dönülecek ödeme ID'si
    });

    //İpucu -> PaymetID'yi veritabanınıza kaydederek ödeme sonrası callback tarafında kullanabilirsiniz.

    let response = await shipy.run();
    console.log(response);
    //response.link -> Ödeme sayfasına yönlendirme linki
};

main();

4. Callback

app.post('/callback', (req, res) => {
    req.body.ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
    let callback = shipy.callback(req.body);

    if(callback.status == 'success') {
        //Ödeme başarılı
    } else {
        //Ödeme başarısız
    };

    //callback.message -> Hata mesajı
});

5. Linkler

6. Yardım ve Öneriler

Herhangi bir yerde problem yaşamanız halinde bize ulaşınız. Bize ulaşmak için issues sayfasını kullanabilirsiniz.