You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Marupay SDK is a npm library that provides an easy-to-use interface for integrating with the multiple payment systems.
5
+
The Marupay SDK is a npm library that provides an easy-to-use interface for integrating with the multiple payment systems.
6
6
7
7
## This SDK offers
8
+
8
9
- Edahab API
9
10
- Waafi API
10
11
11
-
12
12
## Installation
13
13
14
14
To use the Marupay SDK in your project, you can install it using npm:
@@ -22,10 +22,10 @@ npm install marupay
22
22
To get started, import the necessary modules and configure the SDK with your credentials. The following example demonstrates how to set up the SDK for both eDahab and Waafi:
accountNumber: "+2526512312341", // must start with `+` followed by country code
85
+
amount: 1000,
86
+
currency: Currency.SLSH,
87
+
description: "Test credit",
88
+
});
89
+
90
+
res.send(paymentInfo);
91
+
} catch (e) {
92
+
console.log(e);
93
+
res.status(500).send("Internal Server Error");
94
+
}
95
95
});
96
96
97
97
app.listen(port, () => {
98
-
console.log(`Server is listening at http://localhost:${port}`);
98
+
console.log(`Server is listening at http://localhost:${port}`);
99
99
});
100
100
```
101
+
101
102
### Responses
102
103
103
104
The `credit` and `purchase` methods both returns a `PaymentInfo` object. It'll return these details:
@@ -110,14 +111,16 @@ The `credit` and `purchase` methods both returns a `PaymentInfo` object. It'll r
110
111
111
112
-**`raw`:** This will return unfiltered response details from the vendor.
112
113
113
-
114
114
### Examples
115
115
116
116
The provided examples demonstrate how to use the Marupay SDK for both purchase and credit transactions with eDahab and Waafi payment handlers. Customize the route handlers according to your application's needs.
117
117
118
118
### Contributing
119
+
119
120
If you encounter any issues or have suggestions for improvements, feel free to contribute by opening [issues]('https://github.com/iamshabell/marupay/issues') or submitting [pull requests]('https://github.com/iamshabell/marupay/pulls') on the GitHub repository.
120
121
122
+
Check here for full guide on how to contribute: https://docs.marupay.dev/contributing
123
+
121
124
### License
122
125
123
126
This SDK is released under the MIT License. Feel free to use, modify, and distribute it as needed for your projects.
0 commit comments