
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
angular4-paystack
Advanced tools
This is an angular module that abstracts the complexity of making paystack payments with Angular.
npm install --save angular4-paystack
<script src="https://js.paystack.co/v1/inline.js"></script>
In your app.module.ts
or any preferred module, import the module like so:
import { NgModule } from '@angular/core';
import { Angular4PaystackModule } from 'angular4-paystack';
...
@NgModule({
imports: [
...
Angular4PaystackModule,
]
})
export class AppModule {}
<angular4-paystack
[key]="'pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxx'"
[email]="'ashinzekene@gmail.com'"
[amount]="5000000"
[ref]="'2637458697'"
[class]="'btn btn-primary'"
(close)="paymentCancel()"
(callback)="paymentDone($event)"
>Pay with Paystack</angular4-paystack>
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
amount | number | true | undefined | Amount to withdraw (in kobo for NGN) |
email | string | true | undefined | Email of subscriber/client |
key | string | true | undefined | Your pubic Key from Paystack. Use test key for test mode and live key for live mode |
ref | string | true | undefined | Unique reference |
transaction_charge | number | false | 0 | A flat fee to charge the subaccount for this transaction, in kobo. |
metadata | object | false | {} | custom details |
class | string | false | undefined | A string of classes to add to the component |
style | object | false | undefined | CSS stylings, eg {fontColor: 'red'} |
text | object | false | undefined | Text output of the component |
currency | string | false | "NGN" | Transaction currency |
plan | string | false | "" | If transaction is to create a subscription to a predefined plan, provide plan code here. |
quantity | string | false | "" | Used to apply a multiple to the amount returned by the plan code above. |
subaccount | string | false | "" | The code for the subaccount that owns the payment. |
bearer | string | false | "" | Who bears Paystack charges? account or subaccount |
callback | function | false | undefined | A function called when transaction is successful. Returns a parameter containing unique reference |
onClose | function | false | undefined | A function called when transaction is cancelled |
For more information checkout paystack's documentation
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or anywhere? Spread the word!
Don't forget to follow me on twitter!
Thanks! Ashinze Ekene.
The MIT License (MIT). Please see License File for more information.
FAQs
[](https://github.com/ashinzekene/angular4-paystack/actions/workflows/nodejs.yml)
The npm package angular4-paystack receives a total of 677 weekly downloads. As such, angular4-paystack popularity was classified as not popular.
We found that angular4-paystack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.