0.10.0 • Published 10 months ago

pos-node v0.10.0

Weekly downloads
-
License
Apache License 2....
Repository
github
Last release
10 months ago

Pos Node

MIT License

npm

The POS NODE is a lightweight and easy-to-use Nodejs library that provides payment operations using the Iyzico, NestPay (and I hope more) infrastructure. It is designed to simplify transactions between 3rd party payment infrastructure and your project. With pos-node, developers can quickly perform payment operations.

This library offers a simple and intuitive API, making it accessible for developers of all skill levels. It aims to provide a seamless integration into existing Node.js projects.

Important Node This project is still UNDER DEVELOPMENT. It is not recommended to use production environments!!. for contributing please see the section below.

Features

Iyzico

  • Payment and Payment with 3D
  • Store the payment informations
  • Store payment informations during payment
  • Delete payment informations
  • List stored payment informations.

Nestpay

  • Payment and Payment with 3D

Usage/Examples

import {
    PaymentFactory,
    Provider
} from "pos-node";


const paymentProvider = PaymentFactory.createPaymentMethod(Provider.Iyzico);
paymentProvider.setOptions({
	apiKey: "YOUR_API_KEY";
	secretKey: "YOUR_SECRET_KEY";
});

const response = await provider.purchase({
		locale: "tr", //localization @DEFAULT "en"
		conversationId: "123456", //uniqueId response request will contain.
		price: "12.5", //price before cuts
		paidPrice: params.price, //final price that user will pay
		installment: 1, //number of installment @DEFAULT 1
		paymentChannel: PaymentChannel.MOBILE, //@see PaymentChannel
		paymentGroup: PaymentGroup.PRODUCT, //@see PaymentGroup
		paymentCard: {
			cardHolderName: "Joe Brown",
			cardNumber: "1234 1234 1234 1234",
			expireYear: "25",
			expireMonth: "06",
			cvc: "123",
		}, 
		buyer: {
			id: "1", //buyer user id
			name: "Joe,
			surname: "Brown",
			identityNumber: "12345678900",
			email: "joe.brown@example.com",
			registrationDate: "2013-04-21 15:12:09",
			lastLoginDate: "2015-10-05 12:43:35",
			registrationAddress: "neighbourhood, Street, No:1",
			city: "City",
			country: "Country",
			ip: "192.168.1.1",
		},
		shippingAddress: {
			address: "neighbourhood, Street, No:1",
			contactName: "Joe Brown",
			city: "City",
			country: "Country",
		},
		billingAddress: {
			address: "neighbourhood, Street, No:1",
			contactName: "Joe Brown",
			city: "City",
			country: "Country",
		},
		basketItems: [
			{
				id: "123", //assetId
				price: "12.5", //asset price
				name: "product name", //product name
				category1: "Category", 
				itemType: BasketItemType.VIRTUAL, // @see BasketItemType 
				subMerchantKey: "sub_123", //sub merchant key if any
				subMerchantPrice: "5.2", //sub merchant share
			},
		],
		currency: "TRY", @DEFAULT "TRY"
	})

    if(response.status === "success"){
        /Payment process completed successfully
    }

Contributing

Contributions are always welcome!

Please adhere to this project's code of conduct.

How to Contribute

Contributions to this project are welcome! If you would like to contribute, please follow these steps:

Fork the repository on GitHub.

Create a new branch from the main branch to work on your changes.

Make your desired changes and additions to the codebase.

Write unit tests to ensure the correctness of your changes.

Commit your changes and push them to your forked repository.

Submit a pull request to the original repository, describing your changes in detail.

Wait for the maintainers to review your pull request and address any feedback.

If you have any question feel free to contact via canberk8@gmail.com. Thank you for your contributions!

0.10.0

10 months ago

0.8.9

1 year ago

0.8.5

1 year ago

0.8.4

1 year ago

0.8.7

1 year ago

0.8.6

1 year ago

0.9.0

1 year ago

0.9.2

1 year ago

0.9.1

1 year ago

0.9.7

1 year ago

0.9.4

1 year ago

0.9.3

1 year ago

0.9.6

1 year ago

0.9.5

1 year ago

0.8.12

1 year ago

0.8.11

1 year ago

0.8.14

1 year ago

0.8.13

1 year ago

0.8.10

1 year ago

0.8.16

1 year ago

0.8.15

1 year ago

0.8.1

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.4

1 year ago

0.7.3

1 year ago

0.7.0

1 year ago

0.7.6

1 year ago

0.7.5

1 year ago

0.7.8

1 year ago

0.7.7

1 year ago

0.6.3

1 year ago

0.8.0

1 year ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago