Skip to content

Commit

Permalink
Version 2.0.1
Browse files Browse the repository at this point in the history
Fixed a bug with notify_url not being sent to vismapay API at refund create
  • Loading branch information
matiasturunen2 committed Jan 27, 2022
1 parent 8946d26 commit 3bde906
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/vismapay.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ class Vismapay {
if(refund.email)
bodyJson.email = refund.email;

if(refund.notify_url)
bodyJson.notify_url = refund.notify_url;

if(refund.amount)
bodyJson.amount = encodeURIComponent(refund.amount)
else
Expand Down Expand Up @@ -352,3 +355,4 @@ class Vismapay {
module.exports = exports = new Vismapay();
exports.default = exports;
exports.class = Vismapay;
exports.VismapayError = VismapayError;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "visma-pay",
"version": "2.0.0",
"version": "2.0.1",
"description": "Visma Pay library",
"main": "lib/vismapay.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests/vismapay.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ test('get refund', () => {
return expect(vismapay.getRefund(123)).resolves.toHaveProperty('result', 0);
});

test('get refund', () => {
test('create refund', () => {
const response = {
result: 0
};
Expand Down

0 comments on commit 3bde906

Please sign in to comment.