-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from buckaroo-it/v1.0
v1.0
- Loading branch information
Showing
348 changed files
with
11,731 additions
and
4,256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties" | ||
], | ||
"presets": [ | ||
"@babel/preset-typescript", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "6.9" | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[*] | ||
charset = utf-8 | ||
end_of_line = crlf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = false | ||
max_line_length = 200 | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
ij_continuation_indent_size = 4 | ||
ij_formatter_off_tag = @formatter:off | ||
ij_formatter_on_tag = @formatter:on | ||
ij_formatter_tags_enabled = true | ||
ij_smart_tabs = false | ||
ij_visual_guides = none | ||
ij_wrap_on_typing = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
name: SonarQube PR Analysis | ||
jobs: | ||
sonarqube: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: SonarQube Scan | ||
uses: sonarsource/sonarqube-scan-action@master | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ dist/ | |
*.lock | ||
*.cache | ||
package-lock.json | ||
*.js | ||
*.map | ||
*.d.ts | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dist | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{ | ||
"printWidth": 100, | ||
"bracketSpacing": true, | ||
"printWidth": 120, | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"singleQuote": true, | ||
"bracketSameLine": true, | ||
"trailingComma": "none", | ||
"semi": false | ||
"singleAttributePerLine": true, | ||
"htmlWhitespaceSensitivity": "ignore", | ||
"bracketSameLine": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
--- | ||
|
||
## [Released] | ||
|
||
## [1.0.0] | ||
|
||
- Refactor method calls. | ||
- Batch api calls. | ||
- Response and push validation. | ||
- Add general models. | ||
- Add PayByBank | ||
- Add In3 new | ||
|
||
## [0.9.0] | ||
|
||
- Beta release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
|
||
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/105488705/233078855-473c45d4-34a6-492a-a5af-05752c803f6b.png" width="200px" position="center"> | ||
</p> | ||
|
||
# Node SDK | ||
|
||
[![Latest release](https://badgen.net/github/release/buckaroo-it/BuckarooSDK_Node)](https://github.com/buckaroo-it/BuckarooSDK_Node/releases) | ||
|
||
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/7081446/233298897-30274cc8-86cc-4e6f-8200-759c801af19e.png" width="500px" position="center"> | ||
</p> | ||
|
||
--- | ||
|
||
### Index | ||
|
||
- [About](#about) | ||
- [Requirements](#requirements) | ||
- [Installation](#installation) | ||
- [Example](#example) | ||
- [Contribute](#contribute) | ||
- [Versioning](#versioning) | ||
- [Additional information](#additional-information) | ||
|
||
--- | ||
|
||
### About | ||
|
||
Buckaroo is the the Payment Service Provider for all your online payments with more than 15,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. Buckaroo developed their own Node SDK. The SDK is a modern, open-source Node.js library that makes it easy to integrate your Javascript application with Buckaroo's services. Start accepting payments today with Buckaroo. | ||
Buckaroo is the Payment Service Provider for all your online payments with more than 15,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid | ||
invoices. Buckaroo developed their own Node SDK. The SDK is a modern, open-source Node.js library that makes it easy to integrate your Javascript application with Buckaroo's services. Start accepting | ||
payments today with Buckaroo. | ||
|
||
### Requirements | ||
|
||
To use the Buckaroo API client, the following things are required: | ||
|
||
- A Buckaroo account ([Dutch](https://www.buckaroo.nl/start) or [English](https://www.buckaroo.eu/solutions/request-form)) | ||
- Node.js 6.14.× or greater | ||
- A Buckaroo account ([Dutch](https://www.buckaroo.nl/start) or [English](https://www.buckaroo.eu/solutions/request-form)) | ||
- Node.js 6.14.× or greater | ||
|
||
### Installation | ||
|
||
|
@@ -43,37 +48,54 @@ npm install @buckaroo/buckaroo_sdk | |
Initiate the buckaroo client with your website key and secret key. The keys can be retrieved from your [Buckaroo account](https://plaza.buckaroo.nl/Login). | ||
|
||
```javascript | ||
import { initializeBuckarooClient } from './BuckarooClient' | ||
initializeBuckarooClient({ websiteKey: 'KEY', secretKey: 'SECRET' }) | ||
import Buckaroo from '@buckaroo/buckaroo_sdk'; | ||
|
||
const buckarooClient = Buckaroo.InitializeClient( | ||
{ | ||
secretKey: 'KEY', | ||
websiteKey: 'SECRET', | ||
}, | ||
{ | ||
mode: 'TEST', // OR 'LIVE' | ||
currency: 'EUR', | ||
returnURL: 'RETURN_URL', | ||
pushURL: 'PUSH_URL', | ||
} | ||
) | ||
``` | ||
|
||
Create a payment with all the available payment methods. In this example, we show how to create a credit card payment. Each payment has a slightly different payload. | ||
|
||
```javascript | ||
import creditCard from './PaymentMethods/CreditCard' | ||
|
||
const payment = await creditCard().pay({ | ||
amountDebit: 10, | ||
name: 'Mastercard', | ||
invoice: 'UNIQUE-INVOICE-NO' | ||
}) | ||
const payment = await buckarooClient | ||
.method('mastercard') | ||
.pay({ | ||
amountDebit: 100, | ||
}) | ||
.request(); | ||
``` | ||
|
||
After you create a transaction, you can retrieve several transaction information on demand. | ||
|
||
```javascript | ||
const transactionKey = payment.Key | ||
const transaction = buckarooClient.transaction(payment.getTransactionKey()); | ||
|
||
import { buckarooClient } from './BuckarooClient' | ||
|
||
buckarooClient().status(transactionKey) // Retrieve transaction status | ||
buckarooClient().refundInfo(transactionKey) // Retrieve refund info | ||
buckarooClient().cancelInfo(transactionKey) // Retrieve cancellation info | ||
await transaction.status(); // Retrieve transaction status | ||
await transaction.refundInfo(); // Retrieve refund info | ||
await transaction.cancelInfo(); // Retrieve cancellation info | ||
``` | ||
|
||
Find our full documentation online on [docs.buckaroo.io](https://docs.buckaroo.io/docs/node-sdk). | ||
|
||
### Regarding Usage Outside of Node.js | ||
This library is written in JavaScript, a versatile programming language with broad applicability. While it's technically possible to integrate this library into a website or mobile application, it's strongly advised against doing so. | ||
|
||
In the standard configuration, you make requests to the Buckaroo API using one of our provided libraries, typically from your server (such as a Node.js server). Your secret key is securely stored on this server, inaccessible to external entities. | ||
|
||
However, if you incorporate this library directly into a website or app, your secret key will be exposed to users. This could enable users to take actions on your behalf using that key. | ||
|
||
#### Need more examples? | ||
|
||
More examples can be found in the [examples folder](https://github.com/buckaroo-it/BuckarooSDK_Node/tree/master/example) | ||
|
||
### Contribute | ||
|
@@ -87,14 +109,14 @@ If you want to contribute as well, then please follow our [Contribution Guidelin | |
<img src="https://user-images.githubusercontent.com/7081446/178474134-f4c3976d-653c-4ca1-bcd1-48bf6d489196.png" width="500px" alt=""> | ||
</p> | ||
|
||
- **MAJOR:** Breaking changes that require additional testing/caution | ||
- **MINOR:** Changes that should not have a big impact | ||
- **PATCHES:** Bug and hotfixes only | ||
- **MAJOR:** Breaking changes that require additional testing/caution | ||
- **MINOR:** Changes that should not have a big impact | ||
- **PATCHES:** Bug and hotfixes only | ||
|
||
### Additional information | ||
|
||
- **Support:** https://support.buckaroo.eu/contact | ||
- **Contact:** [[email protected]](mailto:[email protected]) or [+31 (0)30 711 50 50](tel:+310307115050) | ||
- **Support:** https://support.buckaroo.eu/contact | ||
- **Contact:** [[email protected]](mailto:[email protected]) or [+31 (0)30 711 50 50](tel:+310307115050) | ||
|
||
## License | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.