Skip to content

iberatkaya/async-iyzico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsyncIyzico

Iyzico is a useful service to make payments, but its Node.js implementation does not include TypeScript types and Promises. This causes the Callback Hell problem in JavaScript. While I was using Iyzico in a Node.js server written with TypeScript, I added TypeScript types and promisified Iyzico's callback functions. I hope it helps!

Usage

Clone it and add it to your project and import AsyncIyzico.

git clone https://github.com/iberatkaya/async-iyzico.git
import { AsyncIyzico } from "./iyzipay.ts";

//Create the AsyncIyzico instance with the API information.
let asyncIyizco = new AsyncIyzico(iyzicoAPIKeyInfo);
//Make a payment with a Payment Form.
let res = await asyncIyizco.iyzipayPaymentForm(params);
//Check the result status.
if (res.status === "success") return res;
else throw "Error";

Authors

👤 Ibrahim Berat Kaya

🤝 Contributing

Contributions are welcome!
Feel free to check issues page.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published