iyzico / iyzipay-node Goto Github PK
View Code? Open in Web Editor NEWiyzipay api node.js client
License: MIT License
iyzipay api node.js client
License: MIT License
After developments done on the backend side,
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.
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.
But i get following error in console
Also i receive no response on the callbackUrl i provided.
npm install @types/iyzipay
komutu ile yükleyebileceğimiz bir type definition paketi oluşturulacak mı acaba?
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?
https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L232
Birebir sample kullanmama rağmen "geçersiz imza" hatası alıyorum. Keylerimin doğruluğuna eminim.
var iyzipay = new Iyzipay({
apiKey: 'sandbox-key',
secretKey: 'sandbox-key',
uri: 'https://sandbox-api.iyzipay.com'
});
Localhost üzerinde bir Nodejs projesi.
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?
(node:37) [DEP0106] DeprecationWarning: crypto.createCipher is deprecated.
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)
}
});
Yardımcı olabilirseniz çok sevinirim. Teşekkürler.
new Buffer()
usage causes the warning below:
(node:3640) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Hi,
According to api documentation, recurrenceCount parameter can be sent but I can't send it with the module. I guess the reason is not implementing recurrenceCount property in SubscriptionPricingPlan.
Can you fix the bug (if it's a bug) or lead me to another way to send it since it's an important parameter for us?
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,
...
}
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 }); });
#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.
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).
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)"]}
Module not found: Error: Can't resolve 'fs' hatasi aliyorum Iyzipay.js`te. Yardimci olabilir misiniz. Tesekkurler.
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?
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
/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?
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 ?
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
process.cwd() should be replaced with __dirname to prevent file inclusion problems
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.
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?
adds pos order id to payment resource
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.
Diğer clientlarda 3dshtmlcontent client içinde base64 decode varken, node.js clientında bulunmuyor, ekleyebilir miyiz?
Merhaba,
Angular için kullanabileceğimiz bir kütüphane var mıdır?
Saygılarımla.
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.
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?
Even if user does not provide non-float price value, it will be automatically converted to float if it is possible
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.
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.
Complete document for all resources
Whatever I do, I cannot activate the form or system. Can someone e-mail me who can explain the installation and running?
mail: [email protected]
twitter : fufkieps
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.