# ngx-theteller

> This library is meant to add payment integration for [theTeller](https://theteller.net/) by PaySwitch

Latest version **0.0.6** (published 2022-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-theteller
pnpm add ngx-theteller
yarn add ngx-theteller
bun add ngx-theteller
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2022-04-12 |
| First published | 2022-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 54.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Julius Asante |
| Maintainers | nana_vekta |
| Keywords | angular, theteller, momo, momo-integration, payment-integration, payswitch |

## Links

- npm: https://www.npmjs.com/package/ngx-theteller
- Repository: https://github.com/nanaVekta/ngx-payswitch
- Homepage: https://github.com/nanaVekta/ngx-payswitch#readme
- Issues: https://github.com/nanaVekta/ngx-payswitch/issues
- npm.io page: https://npm.io/package/ngx-theteller

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 0.0.6 (latest) — 2022-04-12
- 0.0.5 — 2022-04-12
- 0.0.4 — 2022-04-12
- 0.0.3 — 2022-04-12
- 0.0.2 — 2022-04-12
- 0.0.1 — 2022-04-12

## README

# NgxTheteller

This library is meant to add payment integration for [theTeller](https://theteller.net/) by PaySwitch

## Installation

1. Run `npm i ngx-theteller` to install. 
2. Add the `NgxThetellerModule` to your AppModule imports
```
...
import { NgxThetellerModule } from 'ngx-theteller';

import { AppComponent } from './app.component';

@NgModule({
  ...
  imports: [
    NgxThetellerModule
  ],
  ...
})
export class AppModule { }
```
3. Add the js script to your `angular.json`
```
"scripts": [
  ...
  "node_modules/ngx-theteller/assets/js/payswitchProd.js"
  ...
  ]
```

## Usage

Add the `ngx-theteller` component to your page
```
<ngx-theteller
 [apikey]="'Your API Key'"
 [transaction_id]="'123456789098'"
 [amount]="1"
 [currency]="GHS"
 [customer_email]="'test@email.com'"
 [return_url]="'https://returnurl.com'"
 [custom_class]="'payment-button'"
 [description]="'Payment for vans sneaker'"
></ngx-theteller>
```
## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| apikey | string | true | Your merchant API key provided when you create an account with [theTeller](https://theteller.net/) |
| transaction_id | string | true | A 12-digit unique transaction reference provided by you |
| amount | number | true | Amount to charge |
| customer_email | string | true | Customer's Email |
| currency | string | true | Currency to charge customer in. Defaults to GHS |
| return_url | string | true | URL to redirect to when transaction is completed |
| button_text | string | false | Text to show on payment button. Defaults to Pay Now | 
| description | string | true | Text to be displayed as a short transaction narration |
| payment_method | string | true | Choose between card or mobile money payment. e.g card, momo, both. Defaults to both |
| custom_class | string | false | A custom class to style payment button |

## Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

Two projects exist in this repository

 - The ngx-theteller package: ./projects/ngx-theteller
 - The demo: ./projects/testing

## Demo
- Run `ng build ngx-theteller`
- Run `ng serve`

### Thanks to [Julius Asante](https://juliusasante.com)

---
_Source: https://npm.io/package/ngx-theteller · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
