Comments (1)
The package is published here, but it's still a work in progress:
https://www.npmjs.com/package/@codingwithmanny/iyzipay-js
You can also see how it works currently with NextJS App Router API Router.
Example:
File: ./app/api/test/route.ts
// Imports
import Iyzipay from "@codingwithmanny/iyzipay-js";
// Config
const client = Iyzipay({
apiKey: `${process.env.IYZICO_API_KEY}`,
secretKey: `${process.env.IYZICO_SECRET_KEY}`,
});
// Route
export async function GET(_request: Request) {
const response = await client.payment.checkoutForm.create({
locale: 'tr',
conversationId: '023456789',
price: '1.0',
basketId: 'B67832',
paymentGroup: 'PRODUCT',
buyer: {
id: 'BY789',
name: 'John',
surname: 'Doe',
identityNumber: '74300864791',
email: '[email protected]',
gsmNumber: '+905350000000',
registrationDate: '2013-04-21 15:12:09',
lastLoginDate: '2015-10-05 12:43:35',
registrationAddress: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
city: 'Istanbul',
country: 'Turkey',
zipCode: '34732',
ip: '85.34.78.112'
},
shippingAddress: {
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
zipCode: '34742',
contactName: 'Jane Doe',
city: 'Istanbul',
country: 'Turkey'
},
billingAddress: {
address: 'Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1',
zipCode: '34742',
contactName: 'Jane Doe',
city: 'Istanbul',
country: 'Turkey'
},
basketItems: [
{
id: 'BI101',
price: '0.3',
name: 'Binocular',
category1: 'Collectibles',
category2: 'Accessories',
itemType: 'PHYSICAL'
},
{
id: 'BI102',
price: '0.5',
name: 'Game code',
category1: 'Game',
category2: 'Online Game Items',
itemType: 'VIRTUAL'
},
{
id: 'BI103',
name: 'Usb',
price: '0.2',
category1: 'Electronics',
category2: 'Usb / Cable',
itemType: 'PHYSICAL'
}
],
enabledInstallments: [ 1, 2, 3, 6, 9 ],
callbackUrl: 'https://www.merchant.com/callback',
currency: 'TRY',
paidPrice: '1.2'
});
return new Response(JSON.stringify({ data: response }));
}
from iyzipay-node.
Related Issues (20)
- AWS de path hatası HOT 4
- iyzipay.payment.create(request) sırasında errorcode: 1000, "Geçersiz imza" hatası HOT 1
- Module not found: Error: Can't resolve 'fs' in 'C:\Users\algan\OneDrive\Masaüstü\abc\theProject\React\react\node_modules\iyzipay\lib' HOT 6
- Nextjs "Uncaught TypeError: fs.readdirSync is not a function" hatası. HOT 6
- request gelmiyor
- serverless-bundle cannot figure iyzico HOT 1
- refundToBalance Syntax Hatası HOT 2
- React Native ile WebView üzerinde açılmama sorunu. HOT 1
- Edge runtime desteği: Can't resolve 'fs'
- Iyzipay Next.js Entegrasyonu: Sorunlar ve Çözüm Önerileri
- Depreciation Warnings, and Vulnerabilities HOT 1
- TypeScript? HOT 3
- TypeScript Declaration Dosya Desteği Ekleme Önerisi - PR Review İsteği
- Missing package-lock.json
- Vulnerable Coveralls dependency
- Release step should depends on a tag creation
- Authorization Header içeriğinin oluşturulması
- Subscription Product Create [errorCode: '100001'] HOT 1
- errorMessage: 'Authorization header string gönderilmesi zorunludur' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iyzipay-node.