Giter VIP home page Giter VIP logo

iyzipay-node's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iyzipay-node's Issues

Methods return errors as result

For instance this error object, called method like:

iyzipay.threedsPayment.create(payload, function(err, result) {
        console.log(result);
        callback(err || result.errorMessage, result);
    });

Why you return errors for in 'result'? Because when I log to the console, if there is an error, the error is always printed via result object not err.

{ 
status: 'failure',
 errorCode: '5002',
 errorMessage: 'paymentId is a mandatory parameter',
 locale: 'en',
 systemTime: 1538076694328,
...
}

Nuxt ile iyzipay kullanımı

Nuxt ile proje geliştiriyorum. İyzico entegrasyonu ile ödeme almak için sandbox'ta denemek istedim ve projeme npm install iyzipay ile dahil ettim. Sonrasında sitenizdeki örnek koda API ve Güvenlik Anahtarı'mı girdikten sonra program bana aşağıdaki hatayı verdi;

Module not found: Error: Can't resolve 'fs' in '/Users/muratcansenturk/$projemin_adi/node_modules/iyzipay/lib'

npm install --save fs ile fs modülünü yükledim ve package.json dosyamda da görünüyor fakat bu hata devam etmekte.

Uri cannot be empty

/node_modules/iyzipay/lib/Iyzipay.js:41
    if (typeof config['uri'] === 'undefined' || config['uri'] === '') throw new TypeError('uri cannot be empty');
                                                                          ^
TypeError: uri cannot be empty
        at Iyzipay._validateIyzipayOptions (/Users/emrealparslan/Projects/x/node_modules/iyzipay/lib/Iyzipay.js:41:77)

iyzipay-node: 2.0.28
node: 8.7.0

I get this error while I'm trying to initialize iyzipay module.

All I do is:
var iyzipay = new Iyzipay({ apiKey: 'sandbox-xxx', secretKey: 'sandbox-xxx', uri: 'https://sandbox-api.iyzipay.com' })

Should I downgrade the iyzipay-node lib?

Payment failure notification during the subscription period or end of trial

How do the Iyzico Subscription Module notify Merchant on Payment failure during the subscription period or end of trial date?
I use a callback url in subscription checkout form initialize function, but that callback url is to check the form submission status.... but how to check the above scenario?

Typescript types

npm install @types/iyzipay komutu ile yükleyebileceğimiz bir type definition paketi oluşturulacak mı acaba?

Subscription Checkout Form retreive problem

I was going through the Documentation of Iyzico Subscription Api...

Here in Page 22 after we call the Checkout Form Request Api via subscriptionCheckoutForm.initialize

It says:-

Once the customer submitted the checkout form, she/he will be redirected to CallBackUrl. At the same time, a post request containing the token will be sent to this URL. You should send another request to check whether the subscription is successfully started or not.

But I do not see any method to perform this operation in the Subscription Sample Code

Can you please help?

Serverless denemeleri

Merhaba, örnek kodu localde denedim "done();" kısmını çıkartınca çalışıyor ancak amacım bunu lambda üzerinde çalıştırmak. Orada bir handler fonksiyon kullanmak gerekiyor ve bunu başaramadım.

exports.handler = async (event) => { await iyzipay.payment.create(request, function (err, result) { return err ? err : result; }); };

Sonuç null dönüyor.

iyzipay.payment.create(request) sırasında errorcode: 1000, "Geçersiz imza" hatası

Kayıt yaparken kullanıcı bilgilerini MongoDB'deki cluster'a yolluyorum. Ödeme yaparken oradan çekiyorum.

`
const AES_SECRET = process.env.AES_SECRET

var iyzipay = new Iyzipay({
   apiKey: "sandbox-chDOk1zC17bEQ9TyFPh9AS9vzaaTTn3r",
   secretKey: "buraya hesbımın secret key'i girili",
   uri: 'https://sandbox-api.iyzipay.com'
});

router.post('/add-donation', async (req, res) => {
let { 
    donationAmount, 
    donationReceiver,
    email, 
} = req.body;

if(!donationAmount || !email || !donationReceiver){
    return res.status(422).send("Please fill the information fully.")
}

email = CryptoJS.AES.decrypt(email, AES_SECRET).toString(CryptoJS.enc.Utf8);
const filter = { email };
let user = await User.findOne(filter);
//console.log(user.IPAddress)

//console.log(user)
var request = {
    locale: Iyzipay.LOCALE.TR,
    conversationId: `İsim-Soyisim: ${user.fullname}, Kurum: ${donationReceiver}, Email: ${email}`,
    price: donationAmount,
    paidPrice: donationAmount,
    currency: Iyzipay.CURRENCY.TRY,
    installment: '1',
    paymentCard: {
        cardUserKey: user.cardUserKey,
        cardToken: user.cardToken,
    },
    buyer: {
        id: user._id,
        name: user.fullname.split(" ")[0],
        surname: user.fullname.split(" ")[1],
        gsmNumber: user.mobilePhoneNumber,
        email,
        identityNumber: user.identityNumber,
        registrationAddress: user.address,
        ip: user.IPAddress,
        city: "Istanbul",
        country: "Turkey",
    },
    shippingAddress: {
        contactName: user.fullname,
        city: "Istanbul",
        country: "Turkey",
        address: user.address,
    },
    billingAddress: {
        contactName: user.fullname,
        city: "Istanbul",
        country: "Turkey",
        address: user.address,
    },
    basketItems: [
        {
            id: 'Dernek1',
            name: 'Dernek1Bagis',
            category1: 'Donation',
            itemType: Iyzipay.BASKET_ITEM_TYPE.VIRTUAL,
            price: donationAmount
        }
    ]
};

iyzipay.payment.create(request, async function (err, result) {
    if(err){
        console.warn(err)
        return res.status(400).send(err.status)

    }else{
        console.log(result);
        if(result.status == "success"){
            await User.findOneAndUpdate(filter, {
                amountDonatedTotal: user.amountDonatedTotal + donationAmount
            })
        }
        return res.status(200).send(result.status)
    }
});

`
mongs
terminal

Yardımcı olabilirseniz çok sevinirim. Teşekkürler.

Update Subscription Card in MERN stack app

Hi, I'm trying to update card via subscriptionCard.update I successfully recieve checkoutFormContent and render it like attached image below. It has no text in button i think that is an error.

I try to test it with one of test credit cards by iyzico as seen in image.

image

But i get following error in console
image

image

Also i receive no response on the callbackUrl i provided.

Update request dependency

NPM warnings when iyzipay is installed for a project:

npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.

Most of these issues below are addressed in latest version of request (as of July 2019).

Price Formatting

Even if user does not provide non-float price value, it will be automatically converted to float if it is possible

Test failed

Screenshot_12

İyzipay ve mocha'yı kurdum fakat hala hata alıyorum.

Angular Kullanımı

Merhaba,

Angular için kullanabileceğimiz bir kütüphane var mıdır?

Saygılarımla.

Ionic 3 fs.readdirSync is not a function

I want to integrate the iyzipay service in my Ionic 3 app, when I run the app and initialize the iyzipay object using the following code:

let iyzipay = new Iyzipay({ apiKey: 'sandbox-...', secretKey: 'sandbox-...', uri: 'https://sandbox-api.iyzipay.com' });
I get the following error message:

ERROR TypeError: fs.readdirSync is not a function
at Iyzipay._initResources (Iyzipay.js:31)
at new Iyzipay (Iyzipay.js:25)

please help me to solve this problem,
I guess the problem is that the 'fs' library is for node.js as a server, but ionic apps run in browsers as clients, so what should I do to make the iyzipay-node runs in my Ionic app?

AWS de path hatası

digital ocean da sorunsuz çalışan kod aws lambda da hata veriyor.

Sanırım _initResources function ı path yapısı farklı olduğu için resources a ulaşamıyor.

{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: ENOENT: no such file or directory, scandir '/var/task/resources'","reason":{"errorType":"Error","errorMessage":"ENOENT: no such file or directory, scandir '/var/task/resources'","code":"ENOENT","errno":-2,"syscall":"scandir","path":"/var/task/resources","stack":["Error: ENOENT: no such file or directory, scandir '/var/task/resources'"," at Object.readdirSync (fs.js:1047:3)"," at W._initResources (/var/task/lambda.js:51:7731)"," at new W (/var/task/lambda.js:51:7637)"," at xh (/var/task/lambda.js💯16777)"," at Ia.handle_request (/var/task/lambda.js:28:3673)"," at s (/var/task/lambda.js:28:5676)"," at s (/var/task/lambda.js:28:5643)"," at s (/var/task/lambda.js:28:5643)"," at s (/var/task/lambda.js:28:5643)"," at s (/var/task/lambda.js:28:5643)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, scandir '/var/task/resources'"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:400:28)"," at processPromiseRejections (internal/process/promises.js:245:33)"," at processTicksAndRejections (internal/process/task_queues.js:96:32)"]}

DeprecationWarning

(node:37) [DEP0106] DeprecationWarning: crypto.createCipher is deprecated.

Update needed to fix severe vulnerabilities in request dependency

#When I npm audit my project, I can see that this library has an old version of request as a dependency and it contains many high importance vulnerabilities. Can any of iyzico devs please update the dependencies and release a new version soon? This is fairly unaccceptable for a payment processing system that we have to rely our business on.

serverless-bundle cannot figure iyzico

I am using iyzico with serverless-bundle and nothing seems to work. I think webpack is not bundling it. I am getting this error.

error while getting callsite source context: ENOENT: no such file or directory, open '/var/task/src/client/webpack:/iyzipay/lib/Iyzipay.js' DEBUG error while getting callsite source context: ENOENT: no such file or directory, open '/var/task/src/client/webpack:/iyzipay/lib/Iyzipay.js

request gelmiyor

express kullanarak localhost'da kodlamaay başladım, ödeme formu başarıyla oluşturuluyor ve ödeme yapıldıktan sonra callback url başarılı şekilde post requesti kabul ediyor fakat sorun şu ki her hangi request gelmiyor, req.body {} olarak geliyor.

app.post("/success", (req, res, next) => { res.json({ data:req.body }); });

Subscription errors

For any one of the methods defined under the file IyzipaySubscriptionSamples.js, the result is always failure in both sandbox and production API keys.
For the sample request given in the same file:

var createRequest = {
        locale: Iyzipay.LOCALE.EN,
        conversationId: '123456789',
        productReferenceCode: '4ab2cadf-8ec5-4bc7-b21e-11abbc4df707',
        name: 'Calculator-monthly',
        price: 19.99,
        currencyCode: Iyzipay.CURRENCY.TRY,
        paymentInterval: Iyzipay.SUBSCRIPTION_PRICING_PLAN_INTERVAL.MONTHLY,
        paymentIntervalCount: 1,
        trialPeriodDays: 1,
        planPaymentType: Iyzipay.PLAN_PAYMENT_TYPE.RECURRING
    };
    console.log(createRequest);
    iyzipay.subscriptionPricingPlan.create(createRequest, (err, result)=> {
        console.log(err, result);
        response.status(200).send({error:err, result: result});
    });

The response is

    "result": {
        "status": "failure",
        "errorCode": "1",
        "errorMessage": "Sistem hatası",
        "locale": "tr",
        "systemTime": 0
    }

Is the subscription service available for end users? Does it require any additional purchase from Iyzico store?

3dshtmlcontent base64 decode

Diğer clientlarda 3dshtmlcontent client içinde base64 decode varken, node.js clientında bulunmuyor, ekleyebilir miyiz?

Documentation Issues

Hi, I noticed some inconsistencies in the documentation (https://dev.iyzipay.com/tr/odeme-formu/odeme-formu-sonucu). For example, in the documentation it clearly says that possible values for CheckoutFormResult Card Family are: "Bonus", "Axess", "World", "Maximum", "Paraf", "CardFinans", "Advantage". However, when I perform a payment with a test card (5892830000000000) given in documentation, checkout form result contains the value "Bankamatik" for the card family.

I am really disappointed with developer experience iyzipay provides as I heard many times İyzico is a company who takes pride in its technical team. How can we implement robust integrations when we cannot even trust the official documentation?

Thanks

Failure request with nodejs - errorCode: 1000 - Geçersiz imza

The request http/https with nodejs using package request return error:

Iyzipay API Test Checkout Form null { status: 'failure', errorCode: '1000', errorMessage: 'Geçersiz imza', locale: 'tr', systemTime: 1465819429937, conversationId: '4aHtyNOoXkPc\/CwZLMKSwQ==' }

Note:
1 - Executed "npm run-script samples"
2 - Method: iyzipay.checkoutFormInitialize
3 - The same request with CURL (shell/PHP) or POSTMAN execute success.

ReactNative kullanımı

ReactNative bir uygulamada Ödeme Formu metodunu kullanabilir miyiz? Nasıl?
Veya formları kendimiz oluşturup düz API çağırımları mı yapmalıyız?
Mobil uygulamanın backend'i yok, sadece ReactNative kod.

İonic V1 üzerinde iyzipay çalıştırmak?

Merhabalar, iyzipay node js için ionic bir uygulama üzerine nasıl kurarım bu konuda yardımcı olabilir misiniz?
1 aydır ionic V1 ile yaptığım uygulama üzerinde iyzico çalıştırmaya çalışıyorum fakat çalıştıramıyorum, lütfen bu konuda bilgi sahibi birileri yardımcı olabilirse çok ama çok memnun olurum. Site üzerinde Opencart ile gayet sağlıklı çalışıyor ama uygulama da çalıştıramadım.

React JS Kullanımı

Merhabalar , React JS ile iyzico kullanabiliyor muyuz ? alt tarafta laravel kullanıp back endden ödeme yaptırmaya çalıştım ama paymentURL nedeniyle geri back end e döndü. iyzipay-node zaten fs olmadığı için çalışmıyor react js kullanan varmı ödemeler için ?

Subscription status for trial dates

When I have a trial date shall I send the subscriptionInitialStatus as Active or Pending, as per Doc it looks like I can send it as Active and if it has a trialPeriod it wont charge immediately... is that true?

React native yardım

Merhaba,
React native ile geliştirdiğimiz bir mobil uygulamada iyzico kullanmak istiyoruz fakat nasıl yapabileceğimizi bilmiyorum konu hakkında kaynak gösterirmisiniz yada yardım edebilirmisiniz.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.