Skip to content

Commit fa78d52

Browse files
added files to fix bugs
1 parent 82354af commit fa78d52

36 files changed

+14416
-110
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<p align="center">
2-
<img title="Flutterwave" height="200" src="https://flutterwave.com/images/logo-colored.svg" width="50%"/>
3-
</p>
4-
5-
## Table of Contents
1+
## 📝 Table of Contents
62

73
- [About](#about)
84
- [Getting Started](#getting-started)
@@ -19,24 +15,22 @@ Flutterwave official Angular library to accept payment via card , USSD, QrCode
1915

2016
<a id="getting-started"></a>
2117

22-
## Getting Started
18+
## 🏁 Getting Started
2319

2420
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.
2521
See [references](#references) for links to dashboard and API documentation.
2622

2723

2824
### Prerequisites
2925

30-
31-
3226
```
3327
Node version >= 6.9.x and npm >= 3.x.x
3428
Angular version >= 4
3529
Flutterwave version 3 API keys
3630
3731
```
3832

39-
### Installation
33+
### Installing
4034

4135

4236
Install the SDK
@@ -51,7 +45,7 @@ $ yarn add flutterwave-angular-v3
5145

5246
<a id="usage"></a>
5347

54-
## Usage
48+
## 🔧 Usage
5549

5650
Include the Flutterwave V3 script tag to the index.html file
5751
```html
@@ -87,7 +81,7 @@ Include the Flutterwave V3 script tag to the index.html file
8781
Import FlutterwaveModule to the app root module
8882

8983
```javascript
90-
import FlutterwaveModule from "flutterwave-angular-v3"
84+
import { FlutterwaveModule } from "flutterwave-angular-v3"
9185

9286
@NgModule({
9387
declarations: [
@@ -104,13 +98,15 @@ import FlutterwaveModule from "flutterwave-angular-v3"
10498

10599
Use as component. Method 1
106100

107-
```javascript
108-
//Method 1: Pass in payment parameters individually as component attributes
101+
```html
102+
<!--
103+
Method 1: Pass in payment parameters individually as component attributes
104+
-->
109105

110106
<flutterwave-make-payment
111107
public_key="FLWPUBK_TEST-*************"
112108
tx_ref="25673*******"
113-
amount=90000
109+
amount=9000
114110
currency='NGN'
115111
payment_options="card,ussd"
116112
redirect_url=""
@@ -127,9 +123,11 @@ Use as component. Method 1
127123

128124
Use as component. Method 2
129125

130-
```javascript
126+
```html
131127

132-
//Method 2: Pass in the payment parameters as an object to the component 'data' attribute
128+
<!--
129+
Method 2: Pass in the payment parameters as an object to the component 'data' attribute
130+
-->
133131

134132
<flutterwave-make-payment [data]="{
135133
public_key: 'FLWPUBK_TEST-***********',
@@ -218,13 +216,13 @@ export class AppComponent {
218216
219217
220218
<a id="deployment"></a>
221-
## Deployment
219+
## 🚀 Deployment
222220
223221
- Switch to Live Mode on the Dashboard settings page
224222
- Use the Live Public API key
225223
226224
<a id="build-tools"></a>
227-
## Built Using
225+
## ⛏️ Built Using
228226
229227
- [Angular CLI](https://cli.angular.io/)
230228
- [Typescript](https://www.typescriptlang.org/)

dist/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Include the Flutterwave V3 script tag to the index.html file
8181
Import FlutterwaveModule to the app root module
8282

8383
```javascript
84-
import FlutterwaveModule from "flutterwave-angular-v3"
84+
import { FlutterwaveModule } from "flutterwave-angular-v3"
8585

8686
@NgModule({
8787
declarations: [
-11.4 KB
Binary file not shown.
11.4 KB
Binary file not shown.

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"flutterwave-angular-v3","version":"1.0.4","description":"Flutterwave official Angular library to accept payment via card , USSD, QrCode etc.","author":"Flutterwave","repository":{"type":"git","url":"https://github.com/Flutterwave/Flutterwave-Angular-v3"},"homepage":"https://github.com/Flutterwave/Flutterwave-Angular-v3","keywords":["Flutterwave","Fintech","Angular","Fluterwave"],"license":"MIT","scripts":{"ng":"ng","start":"ng serve --open --port=9879","build":"ng build","test":"ng test","lint":"ng lint","e2e":"ng e2e","packagr":"npx ng-packagr -p ng-package.json","pack":"cd dist && npm pack"},"private":false,"dependencies":{"@angular/animations":">=4.0.0","@angular/common":">=4.0.0","@angular/compiler":">=4.0.0","@angular/core":">=4.0.0","@angular/forms":">=4.0.0","@angular/http":">=4.0.0","@angular/platform-browser":">=4.0.0","@angular/platform-browser-dynamic":">=4.0.0","@angular/router":">=4.0.0","core-js":">=2.4.1","rxjs":">=5.1.0","zone.js":">=0.8.4"},"devDependencies":{"@angular/cli":">=1.1.0","@angular/compiler-cli":">=4.0.0","@angular/language-service":">=4.0.0","@types/jasmine":"2.5.45","@types/node":"~6.0.60","codelyzer":"~3.0.1","jasmine-core":"~2.6.2","jasmine-spec-reporter":"~4.1.0","karma":"~1.7.0","karma-chrome-launcher":"~2.1.1","karma-cli":"~1.0.1","karma-coverage-istanbul-reporter":"^1.2.1","karma-jasmine":"~1.1.0","karma-jasmine-html-reporter":"^0.2.2","ng-packagr":"^1.5.2","protractor":"~5.1.2","ts-node":"~3.0.4","tslint":"~5.3.2","typescript":">=2.3.3"},"main":"bundles/flutterwave-angular-v3.umd.js","module":"flutterwave-angular-v3.es5.js","es2015":"flutterwave-angular-v3.js","typings":"flutterwave-angular-v3.d.ts","metadata":"flutterwave-angular-v3.metadata.json"}
1+
{"name":"flutterwave-angular-v3","version":"1.0.5","description":"Flutterwave official Angular library to accept payment via card , USSD, QrCode etc.","author":"Flutterwave","repository":{"type":"git","url":"https://github.com/Flutterwave/Flutterwave-Angular-v3"},"homepage":"https://github.com/Flutterwave/Flutterwave-Angular-v3","keywords":["Flutterwave","Fintech","Angular","Fluterwave"],"license":"MIT","scripts":{"ng":"ng","start":"ng serve --open --port=9879","build":"ng build","test":"ng test","lint":"ng lint","e2e":"ng e2e","packagr":"npx ng-packagr -p ng-package.json","pack":"cd dist && npm pack"},"private":false,"dependencies":{"@angular/animations":">=4.0.0","@angular/common":">=4.0.0","@angular/compiler":">=4.0.0","@angular/core":">=4.0.0","@angular/forms":">=4.0.0","@angular/http":">=4.0.0","@angular/platform-browser":">=4.0.0","@angular/platform-browser-dynamic":">=4.0.0","@angular/router":">=4.0.0","core-js":">=2.4.1","rxjs":">=5.1.0","zone.js":">=0.8.4"},"devDependencies":{"@angular/cli":">=1.1.0","@angular/compiler-cli":">=4.0.0","@angular/language-service":">=4.0.0","@types/jasmine":"2.5.45","@types/node":"~6.0.60","codelyzer":"~3.0.1","jasmine-core":"~2.6.2","jasmine-spec-reporter":"~4.1.0","karma":"~1.7.0","karma-chrome-launcher":"~2.1.1","karma-cli":"~1.0.1","karma-coverage-istanbul-reporter":"^1.2.1","karma-jasmine":"~1.1.0","karma-jasmine-html-reporter":"^0.2.2","ng-packagr":"^1.5.2","protractor":"~5.1.2","ts-node":"~3.0.4","tslint":"~5.3.2","typescript":">=2.3.3"},"main":"bundles/flutterwave-angular-v3.umd.js","module":"flutterwave-angular-v3.es5.js","es2015":"flutterwave-angular-v3.js","typings":"flutterwave-angular-v3.d.ts","metadata":"flutterwave-angular-v3.metadata.json"}

examples/angular.json

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"newTest": {
7+
"projectType": "application",
8+
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/newTest",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "tsconfig.app.json",
21+
"aot": true,
22+
"assets": [
23+
"src/favicon.ico",
24+
"src/assets"
25+
],
26+
"styles": [
27+
"src/styles.css"
28+
],
29+
"scripts": []
30+
},
31+
"configurations": {
32+
"production": {
33+
"fileReplacements": [
34+
{
35+
"replace": "src/environments/environment.ts",
36+
"with": "src/environments/environment.prod.ts"
37+
}
38+
],
39+
"optimization": true,
40+
"outputHashing": "all",
41+
"sourceMap": false,
42+
"extractCss": true,
43+
"namedChunks": false,
44+
"extractLicenses": true,
45+
"vendorChunk": false,
46+
"buildOptimizer": true,
47+
"budgets": [
48+
{
49+
"type": "initial",
50+
"maximumWarning": "2mb",
51+
"maximumError": "5mb"
52+
},
53+
{
54+
"type": "anyComponentStyle",
55+
"maximumWarning": "6kb",
56+
"maximumError": "10kb"
57+
}
58+
]
59+
}
60+
}
61+
},
62+
"serve": {
63+
"builder": "@angular-devkit/build-angular:dev-server",
64+
"options": {
65+
"browserTarget": "newTest:build"
66+
},
67+
"configurations": {
68+
"production": {
69+
"browserTarget": "newTest:build:production"
70+
}
71+
}
72+
},
73+
"extract-i18n": {
74+
"builder": "@angular-devkit/build-angular:extract-i18n",
75+
"options": {
76+
"browserTarget": "newTest:build"
77+
}
78+
},
79+
"test": {
80+
"builder": "@angular-devkit/build-angular:karma",
81+
"options": {
82+
"main": "src/test.ts",
83+
"polyfills": "src/polyfills.ts",
84+
"tsConfig": "tsconfig.spec.json",
85+
"karmaConfig": "karma.conf.js",
86+
"assets": [
87+
"src/favicon.ico",
88+
"src/assets"
89+
],
90+
"styles": [
91+
"src/styles.css"
92+
],
93+
"scripts": []
94+
}
95+
},
96+
"lint": {
97+
"builder": "@angular-devkit/build-angular:tslint",
98+
"options": {
99+
"tsConfig": [
100+
"tsconfig.app.json",
101+
"tsconfig.spec.json",
102+
"e2e/tsconfig.json"
103+
],
104+
"exclude": [
105+
"**/node_modules/**"
106+
]
107+
}
108+
},
109+
"e2e": {
110+
"builder": "@angular-devkit/build-angular:protractor",
111+
"options": {
112+
"protractorConfig": "e2e/protractor.conf.js",
113+
"devServerTarget": "newTest:serve"
114+
},
115+
"configurations": {
116+
"production": {
117+
"devServerTarget": "newTest:serve:production"
118+
}
119+
}
120+
}
121+
}
122+
}},
123+
"defaultProject": "newTest"
124+
}

examples/e2e/protractor.conf.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// @ts-check
2+
// Protractor configuration file, see link for more information
3+
// https://github.com/angular/protractor/blob/master/lib/config.ts
4+
5+
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
6+
7+
/**
8+
* @type { import("protractor").Config }
9+
*/
10+
exports.config = {
11+
allScriptsTimeout: 11000,
12+
specs: [
13+
'./src/**/*.e2e-spec.ts'
14+
],
15+
capabilities: {
16+
browserName: 'chrome'
17+
},
18+
directConnect: true,
19+
baseUrl: 'http://localhost:4200/',
20+
framework: 'jasmine',
21+
jasmineNodeOpts: {
22+
showColors: true,
23+
defaultTimeoutInterval: 30000,
24+
print: function() {}
25+
},
26+
onPrepare() {
27+
require('ts-node').register({
28+
project: require('path').join(__dirname, './tsconfig.json')
29+
});
30+
jasmine.getEnv().addReporter(new SpecReporter({
31+
spec: {
32+
displayStacktrace: StacktraceOption.PRETTY
33+
}
34+
}));
35+
}
36+
};

examples/e2e/src/app.e2e-spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { AppPage } from './app.po';
2+
import { browser, logging } from 'protractor';
3+
4+
describe('workspace-project App', () => {
5+
let page: AppPage;
6+
7+
beforeEach(() => {
8+
page = new AppPage();
9+
});
10+
11+
it('should display welcome message', () => {
12+
page.navigateTo();
13+
expect(page.getTitleText()).toEqual('newTest app is running!');
14+
});
15+
16+
afterEach(async () => {
17+
// Assert that there are no errors emitted from the browser
18+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19+
expect(logs).not.toContain(jasmine.objectContaining({
20+
level: logging.Level.SEVERE,
21+
} as logging.Entry));
22+
});
23+
});

examples/e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo(): Promise<unknown> {
5+
return browser.get(browser.baseUrl) as Promise<unknown>;
6+
}
7+
8+
getTitleText(): Promise<string> {
9+
return element(by.css('app-root .content span')).getText() as Promise<string>;
10+
}
11+
}

examples/e2e/tsconfig.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
2+
{
3+
"extends": "../tsconfig.base.json",
4+
"compilerOptions": {
5+
"outDir": "../out-tsc/e2e",
6+
"module": "commonjs",
7+
"target": "es2018",
8+
"types": [
9+
"jasmine",
10+
"jasminewd2",
11+
"node"
12+
]
13+
}
14+
}

0 commit comments

Comments
 (0)