npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bank3d-payment-angular

v0.0.1

Published

<p align="center"> <img title="Bank3D" height="200" src="https://www.bank3d.ng/asset/img/bank3D.png" width="50%"/> </p>

Downloads

2

Readme

Bank3dPaymentAngular

Table of Contents

About

Bank3D Angular library makes it possible to receive money from customers through the following routes.

Card Transfer Bank Account USSD

Getting Started

This page will help you get started with Bank3D. This comprehensive guides and documentation help you start working with Bank3D Angular library as quickly as possible, as well as support if you get stuck.

Prerequisites

Node version >= 6.9.x and npm >= 3.x.x
Angular version  >= 4
Bank3D  Merchant keys

Installing

Install the SDK

$ npm install Bank3d-Payment-Angular
# or
$ yarn  add  Bank3d-Payment-Angular

Usage

Import Bank3dPaymentAngularModule to the app root module

import { Bank3dPaymentAngularModule } from 'Bank3d-Payment-Angular';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    Bank3dPaymentAngularModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})

Use as Modal Component, Method 1 : Pass in payment parameters individually as component attributes

import {Component, OnInit} from '@angular/core';
import { Bank3dPaymentService } from 'Bank3d-Payment-Angular';
@Component({
  selector: 'app-root',
  template: ` <bank3d-payment-angular
                [reference]= "reference"
                [merchantKey]="merchantKey"
                currencyCode="NGN"
                [amount]="amount"
                email="[email protected]"
                phone="0801234567889"
                mode="test"
                text="Make Payments"
                color="#2F4CB0"
                className="card highlight-card card-small"
                (callback)="paymentCallback($event)"
                (onClose)="closedPaymentModal()" >
            </bank3d-payment-angular>`
})

export class AppComponent{
  //use your PUBLIC_KEY here
  merchantKey = "your-merchant-key";
  reference = "REF-" + Math.random().toString(16).slice(2)
  amount = "5000"
 constructor(private bank3d: Bank3dPaymentService) {}

  makePaymentCallback(response ): void {
    console.log("Pay", response);
  }
  closedPaymentModal(): void {
    console.log('payment is closed');
  }

}

Use as Embeded Component, Method 1 : Pass in payment parameters individually as component attributes, the main difference between the inline and embeded is the container parameter passed as prop to the component

import {Component, OnInit} from '@angular/core';
import { Bank3dPaymentService } from 'Bank3d-Payment-Angular';
@Component({
  selector: 'app-root',
  template: ` <bank3d-payment-angular
                [reference]= "reference"
                [merchantKey]="merchantKey"
                currencyCode="NGN"
                [amount]="amount"
                email="[email protected]"
                phone="0801234567889"
                mode="test"
                container="bank3DEmbeddedContainer"
                text="Make Payments"
                color="#2F4CB0"
                className="card highlight-card card-small"
                (callback)="paymentCallback($event)"
                (onClose)="closedPaymentModal()" >
            </bank3d-payment-angular>
            <div id="bank3DEmbeddedContainer"> </div>
            `
})

export class AppComponent{
  //use your PUBLIC_KEY here
  merchantKey = "your-merchant-key";
  reference = "REF-" + Math.random().toString(16).slice(2)
  amount = "5000"
 constructor(private bank3d: Bank3dPaymentService) {}

  makePaymentCallback(response ): void {
    console.log("Pay", response);
  }
  closedPaymentModal(): void {
    console.log('payment is closed');
  }

}
Payment option parameters and descriptions:

| Parameter  | Always Required ? | Description |
| ------------- | ------------- | ------------- |
| marchantKey  | True  | Your merchant key from Bank3D. Use test key for test mode and live key for live mode. |
| reference  | True  | Your unique transaction reference. |
| amount  | True  | Amount to charge the customer. |
| currencyCode  | False  | currency to charge in. Defaults to NGN|
| email  | False  |Customer email address. |
| phone  | False  | Phone number of customer.  |
| colour  | False  | You get to choose a theme color for the payment modal that reflects your brand.|
| callback (function)  | False  | This is the function that runs after payment is completed  |
| close (function)  | False  | This is the function that runs after payment modal is closed  |

Bank3D Docs