From 7ad7d5878b7f63280b520c69bb7e94bbf12755d1 Mon Sep 17 00:00:00 2001 From: ChijiokeFLW Date: Wed, 10 Jul 2024 17:21:15 +0100 Subject: [PATCH 1/2] Updated README.md file to show the proper library usage --- README.md | 51 ++++++----------------- dist/flutterwave-angular-v3/README.md | 51 ++++++----------------- projects/flutterwave-angular-v3/README.md | 51 ++++++----------------- 3 files changed, 36 insertions(+), 117 deletions(-) diff --git a/README.md b/README.md index e63ac46..8769bf0 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,11 @@ Available features include: 1. [Requirements](#requirements) 2. [Installation](#installation) -3. [Initialization](#Initialization) -4. [Usage](#usage) -5. [Support](#support) -6. [Contribution Guidelines](#contribution-guidelines) -7. [License](#license) -8. [Changelog](#) +3. [Usage](#usage) +4. [Support](#support) +5. [Contribution Guidelines](#contribution-guidelines) +6. [License](#license) +7. [Changelog](#) ## Requirements @@ -43,39 +42,9 @@ Install the SDK ```bash $ npm install flutterwave-angular-v3 # or -$ yarn add flutterwave-angular-v3 - +$ yarn add flutterwave-angular-v3 ``` -## Initialization - -Import FlutterwaveModule to the app root module - -```typescript -import { FlutterwaveModule } from "flutterwave-angular-v3" - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - FlutterwaveModule - ], - providers: [], - bootstrap: [AppComponent] -}) -``` - -> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. -Kindly include the following line in tsconfig.app.json under `compilerOptions` : - -``` -paths": { "@angular/*": [ "node_modules/@angular/*" ] } -``` - -Then restart server and try again - ## Usage Add Flutterwave to your project as a component or directly in your code: @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes. import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` `, @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https:// import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. -Kindly include the following line in tsconfig.app.json under `compilerOptions` : - -``` -paths": { "@angular/*": [ "node_modules/@angular/*" ] } -``` - -Then restart server and try again - ## Usage Add Flutterwave to your project as a component or directly in your code: @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes. import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` `, @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https:// import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. -Kindly include the following line in tsconfig.app.json under `compilerOptions` : - -``` -paths": { "@angular/*": [ "node_modules/@angular/*" ] } -``` - -Then restart server and try again - ## Usage Add Flutterwave to your project as a component or directly in your code: @@ -95,11 +64,12 @@ Pass in payment parameters individually as component attributes. import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` `, @@ -341,11 +313,12 @@ Pass the payment plan ID into your payload to make [recurring payments](https:// import { Component, OnInit } from "@angular/core"; import { FlutterwaveService, - InlinePaymentOptions, + MakePaymentComponent, PaymentSuccessResponse, } from "flutterwave-angular-v3"; @Component({ selector: "app-root", + imports: [MakePaymentComponent], template: ` Date: Fri, 12 Jul 2024 17:42:53 +0100 Subject: [PATCH 2/2] Restored initialization section to README.md file --- README.md | 40 +++++++++++++++++--- dist/flutterwave-angular-v3/README.md | 46 ++++++++++++++++++----- package-lock.json | 4 +- projects/flutterwave-angular-v3/README.md | 46 ++++++++++++++++++----- 4 files changed, 111 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1dcac67..fb64250 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,12 @@ Available features include: 1. [Requirements](#requirements) 2. [Installation](#installation) -3. [Usage](#usage) -4. [Support](#support) -5. [Contribution Guidelines](#contribution-guidelines) -6. [License](#license) -7. [Changelog](#) +3. [Initialization](#Initialization) +4. [Usage](#usage) +5. [Support](#support) +6. [Contribution Guidelines](#contribution-guidelines) +7. [License](#license) +8. [Changelog](#) ## Requirements @@ -43,6 +44,35 @@ $ npm install flutterwave-angular-v3 $ yarn add flutterwave-angular-v3 ``` +## Initialization + +Import FlutterwaveModule to the app root module + +```typescript +import { FlutterwaveModule } from "flutterwave-angular-v3" + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + FlutterwaveModule + ], + providers: [], + bootstrap: [AppComponent] +}) +``` + +> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. +Kindly include the following line in tsconfig.app.json under `compilerOptions` : + +``` +paths": { "@angular/*": [ "node_modules/@angular/*" ] } +``` + +Then restart server and try again + ## Usage Add Flutterwave to your project as a component or directly in your code: diff --git a/dist/flutterwave-angular-v3/README.md b/dist/flutterwave-angular-v3/README.md index 8769bf0..fb64250 100644 --- a/dist/flutterwave-angular-v3/README.md +++ b/dist/flutterwave-angular-v3/README.md @@ -3,8 +3,6 @@

# Flutterwave Angular Library - -![Node.js Package](https://github.com/Flutterwave/Flutterwave-Angular-v3/workflows/Node.js%20Package/badge.svg) ![npm](https://img.shields.io/npm/v/flutterwave-angular-v3) ![npm](https://img.shields.io/npm/dt/flutterwave-angular-v3) ![NPM](https://img.shields.io/npm/l/flutterwave-angular-v3) @@ -15,7 +13,7 @@ The Angular SDK helps you create seamless payment experiences in your Angular mo Available features include: -- Collections: Card, Account, Mobile money, Bank Transfers, USSD, Barter, NQR. +- Collections: Card, Account, Mobile Money, Bank Transfers, USSD, Barter, NQR. - Recurring payments: Tokenization and Subscriptions. - Split payments @@ -23,17 +21,18 @@ Available features include: 1. [Requirements](#requirements) 2. [Installation](#installation) -3. [Usage](#usage) -4. [Support](#support) -5. [Contribution Guidelines](#contribution-guidelines) -6. [License](#license) -7. [Changelog](#) +3. [Initialization](#Initialization) +4. [Usage](#usage) +5. [Support](#support) +6. [Contribution Guidelines](#contribution-guidelines) +7. [License](#license) +8. [Changelog](#) ## Requirements 1. Flutterwave version 3 API keys 2. Node version >= 14.15.0 and npm >= 6.14.8 -3. Angular version >= 18 +3. Angular version >= 18. ## Installation @@ -45,6 +44,35 @@ $ npm install flutterwave-angular-v3 $ yarn add flutterwave-angular-v3 ``` +## Initialization + +Import FlutterwaveModule to the app root module + +```typescript +import { FlutterwaveModule } from "flutterwave-angular-v3" + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + FlutterwaveModule + ], + providers: [], + bootstrap: [AppComponent] +}) +``` + +> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. +Kindly include the following line in tsconfig.app.json under `compilerOptions` : + +``` +paths": { "@angular/*": [ "node_modules/@angular/*" ] } +``` + +Then restart server and try again + ## Usage Add Flutterwave to your project as a component or directly in your code: diff --git a/package-lock.json b/package-lock.json index 163d351..d6bf836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flutterwave-angular-v3", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "flutterwave-angular-v3", - "version": "1.3.1", + "version": "1.3.2", "license": "MIT", "dependencies": { "@angular/animations": "^18.0.0", diff --git a/projects/flutterwave-angular-v3/README.md b/projects/flutterwave-angular-v3/README.md index 8769bf0..fb64250 100644 --- a/projects/flutterwave-angular-v3/README.md +++ b/projects/flutterwave-angular-v3/README.md @@ -3,8 +3,6 @@

# Flutterwave Angular Library - -![Node.js Package](https://github.com/Flutterwave/Flutterwave-Angular-v3/workflows/Node.js%20Package/badge.svg) ![npm](https://img.shields.io/npm/v/flutterwave-angular-v3) ![npm](https://img.shields.io/npm/dt/flutterwave-angular-v3) ![NPM](https://img.shields.io/npm/l/flutterwave-angular-v3) @@ -15,7 +13,7 @@ The Angular SDK helps you create seamless payment experiences in your Angular mo Available features include: -- Collections: Card, Account, Mobile money, Bank Transfers, USSD, Barter, NQR. +- Collections: Card, Account, Mobile Money, Bank Transfers, USSD, Barter, NQR. - Recurring payments: Tokenization and Subscriptions. - Split payments @@ -23,17 +21,18 @@ Available features include: 1. [Requirements](#requirements) 2. [Installation](#installation) -3. [Usage](#usage) -4. [Support](#support) -5. [Contribution Guidelines](#contribution-guidelines) -6. [License](#license) -7. [Changelog](#) +3. [Initialization](#Initialization) +4. [Usage](#usage) +5. [Support](#support) +6. [Contribution Guidelines](#contribution-guidelines) +7. [License](#license) +8. [Changelog](#) ## Requirements 1. Flutterwave version 3 API keys 2. Node version >= 14.15.0 and npm >= 6.14.8 -3. Angular version >= 18 +3. Angular version >= 18. ## Installation @@ -45,6 +44,35 @@ $ npm install flutterwave-angular-v3 $ yarn add flutterwave-angular-v3 ``` +## Initialization + +Import FlutterwaveModule to the app root module + +```typescript +import { FlutterwaveModule } from "flutterwave-angular-v3" + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + FlutterwaveModule + ], + providers: [], + bootstrap: [AppComponent] +}) +``` + +> NB: If you experience compilation errors in your app after importing the Flutterwave module, component or service. +Kindly include the following line in tsconfig.app.json under `compilerOptions` : + +``` +paths": { "@angular/*": [ "node_modules/@angular/*" ] } +``` + +Then restart server and try again + ## Usage Add Flutterwave to your project as a component or directly in your code: