Skip to content

Commit f5988d8

Browse files
v1.0.1
1 parent db70124 commit f5988d8

File tree

4 files changed

+46
-12
lines changed

4 files changed

+46
-12
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
- test publication
44

5+
## 0.2.0
6+
7+
- examples added
8+
9+
## 0.2.1
10+
11+
- examples added
12+
513
## 1.0.0
614

7-
- Initial version
15+
- Initial version
16+
17+
## 1.0.1
18+
19+
- more examples added

README.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ The library needs to be configured with a *merchant Id* & *API key*. You can get
3737

3838
```javascript
3939

40-
const WeBirrClient = require('webirr');
40+
const webirr = require('webirr');
4141

4242
async function main()
4343
{
44-
const apikey = 'YOUR_API_KEY';
44+
const apiKey = 'YOUR_API_KEY';
4545
const merchantId = 'YOUR_MERCHANT_ID';
4646

47-
var api = new WeBirrClient(apiKey, true);
47+
var api = new webirr.WeBirrClient(apiKey, true);
4848

4949
let bill = {
5050
amount: '270.90',
@@ -98,14 +98,14 @@ main();
9898

9999
```javascript
100100

101-
const WeBirrClient = require('webirr');
101+
const webirr = require('webirr');
102102

103103
async function main()
104104
{
105-
const apikey = 'YOUR_API_KEY';
105+
const apiKey = 'YOUR_API_KEY';
106106
const merchantId = 'YOUR_MERCHANT_ID';
107107

108-
var api = new WeBirrClient(apiKey, true);
108+
var api = new webirr.WeBirrClient(apiKey, true);
109109

110110
var paymentCode = 'PAYMENT_CODE_YOU_SAVED_AFTER_CREATING_A_NEW_BILL' // suchas as '141 263 782';
111111

@@ -133,19 +133,41 @@ async function main()
133133
main();
134134

135135
```
136+
*Sample object returned from getPaymentStatus()*
137+
138+
```javascript
139+
{
140+
error: null,
141+
res: {
142+
status: 2,
143+
data: {
144+
id: 111112347,
145+
paymentReference: '8G3303GHJN',
146+
confirmed: true,
147+
confirmedTime: '2021-07-03 10:25:35',
148+
bankID: 'cbe_birr',
149+
time: '2021-07-03 10:25:33',
150+
amount: '4.60',
151+
wbcCode: '624 549 955'
152+
}
153+
},
154+
errorCode: null
155+
}
156+
157+
```
136158

137159
### Deleting an existing Bill from WeBirr Servers (if it is not paid)
138160

139161
```javascript
140162

141-
const WeBirrClient = require('webirr');
163+
const webirr = require('webirr');
142164

143165
async function main()
144166
{
145-
const apikey = 'YOUR_API_KEY';
167+
const apiKey = 'YOUR_API_KEY';
146168
const merchantId = 'YOUR_MERCHANT_ID';
147169

148-
var api = new WeBirrClient(apiKey, true);
170+
var api = new webirr.WeBirrClient(apiKey, true);
149171

150172
var paymentCode = 'PAYMENT_CODE_YOU_SAVED_AFTER_CREATING_A_NEW_BILL' // suchas as '141 263 782';
151173

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webirr",
3-
"version": "0.1.0",
3+
"version": "1.0.1",
44
"description": "Official JavaScript Client Library for WeBirr APIs",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)