https://github.com/lperezp/ngx-culqi
UNOFFICIAL Culqi payment gateway library made to use with Angular.
https://github.com/lperezp/ngx-culqi
angular culqi ngx-culqi npm typescript
Last synced: about 2 months ago
JSON representation
UNOFFICIAL Culqi payment gateway library made to use with Angular.
- Host: GitHub
- URL: https://github.com/lperezp/ngx-culqi
- Owner: lperezp
- License: mit
- Created: 2019-12-16T04:56:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T06:06:58.000Z (7 months ago)
- Last Synced: 2025-03-16T15:12:07.839Z (2 months ago)
- Topics: angular, culqi, ngx-culqi, npm, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ngx-culqi
- Size: 677 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- trackawesomelist - ngx-culqi (⭐8) - UNOFFICIAL [Culqi](https://culqi.com/) payment gateway library made to use with Angular. You can use the library like this [example (⭐10)](https://github.com/lperezp/culqi-angular). (Recently Updated / [Oct 07, 2024](/content/2024/10/07/README.md))
- fucking-awesome-angular - ngx-culqi - UNOFFICIAL 🌎 [Culqi](culqi.com/) payment gateway library made to use with Angular. You can use the library like this <b><code> 11⭐</code></b> <b><code> 1🍴</code></b> [example](https://github.com/lperezp/culqi-angular)). (Table of contents / Angular)
- awesome-angular - ngx-culqi - UNOFFICIAL [Culqi](https://culqi.com/) payment gateway library made to use with Angular. You can use the library like this [example](https://github.com/lperezp/culqi-angular). (Table of contents / Angular)
README
![]()
ngx-culqiUNOFFICIAL [Culqi](https://culqi.com/) payment gateway library made to use with Angular by [lperezp.dev](https://lperezp.dev/?utm_source=ngx-culqi&utm_medium=readme&utm_campaign=ngx-culqi&utm_id=github)
[](https://github.com/lperezp/culqi-angular/actions/workflows/pages/pages-build-deployment/badge.svg)
[](https://www.codefactor.io/repository/github/lperezp/ngx-culqi)
[](https://github.com/lperezp/ngx-culqi/releases)
[](https://www.npmjs.org/package/ngx-culqi)
[](https://npmjs.org/package/ngx-culqi)
[](https://github.com/lperezp/ngx-culqi/blob/master/LICENSE)
[](https://github.com/prettier/prettier)
[](https://twitter.com/lperezp_pe)## Demo
[Ver Demo](https://lperezp.github.io/culqi-angular/)
## ☀️ License
[MIT](https://github.com/lperezp/ngx-culqi/blob/master/LICENSE)
## 🖥 Environment Support
* Angular `^18.0.0` [](https://www.npmjs.org/package/ngx-culqi)
## 📦 Installation
Adding ngx-culqi to your project is as simple as running one command:
```
npm i ngx-culqi
```## 🔨 Usage
```
import { ICulqiOptions, IOrderCulqiResponse, NgxCulqiService } from 'ngx-culqi';@Component({...})
export class YourComponent {
constructor(private ngxCulqiService: NgxCulqiService) {}paymentCulqi(): void {
const order = {
"amount": 1000,
"currency_code": "",
"description": "",
"order_number": 00001,
"client_details": {
"first_name": "",
"last_name": "",
"email": "",
"phone_number": ""
},
"expiration_date": (Math.floor(Date.now() / 1000) + 86400),
"confirm": false
};this.ngxCulqiService.generateOrder(order).subscribe((response: Partial) => {
const culqiSettings = {
title: order.description,
currency: 'PEN',
amount: order.amount,
order: response.id,
xculqirsaid: environment.xculqirsaid,
rsapublickey: environment.rsapublickey
};const culqiOptions: ICulqiOptions = { style: this.styleCulqi };
this.ngxCulqiService.generateToken(culqiSettings, culqiOptions);
});
}
}
```Inside ``ngOnInit`` add the following script:
```
ngOnInit(): void {
this.ngxCulqiService.loadScriptCulqi(environment.tokenCulqi, environment.apiKeyCulqi);
this.ngxCulqiService.tokenCreated$.subscribe(value => {
if (value) {
this.showToken(value);
this.ngxCulqiService.closeCulqi();
}
});this.ngxCulqiService.orderCreated$.subscribe(value => {
if (value) {
this.showOrder(value);
}
});
}
```***[Check Culqi documentation for more information](https://docs.culqi.com/#/pagos/inicio)***
## 🔗 Links
* [Culqi](https://culqi.com/)
* [Culqi Docs](https://docs.culqi.com/es/documentacion/)## 🤝 Contributing
[](https://github.com/lperezp/ngx-culqi/pulls)
I welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/lperezp/ngx-culqi/blob/master/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/lperezp/ngx-culqi/pulls) or as [GitHub issues](https://github.com/lperezp/ngx-culqi/issues).
## 🎉 Author
- [Luis Eduardo](https://lperezp.dev/?utm_source=ngx-culqi&utm_medium=readme&utm_campaign=ngx-culqi&utm_id=github)
**Love ngx-culqi? Give our repo a star :star: :arrow_up:.**