-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Furkan YILMAZ
committed
Oct 18, 2019
1 parent
4b52faf
commit 278f5cb
Showing
3 changed files
with
63 additions
and
0 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,17 @@ | ||
'use strict'; | ||
|
||
var BaseRequest = require('./BaseRequest'), | ||
util = require('util'), | ||
|
||
function CreateRefundoBalanceInitRequest(request) { | ||
BaseRequest.call(this, { | ||
locale: request['locale'], | ||
conversationId: request['conversationId'], | ||
paymentId: request['paymentId'], | ||
callbackUrl: request["callbackUrl"], | ||
}); | ||
} | ||
|
||
util.inherits(CreateRefundoBalanceInitRequest, BaseRequest); | ||
|
||
module.exports = CreateRefundoBalanceInitRequest; |
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,18 @@ | ||
'use strict'; | ||
|
||
var IyzipayResource = require('../IyzipayResource'); | ||
|
||
function RefundToBalance() { | ||
this._config = arguments[0]; | ||
this._api = { | ||
create: { | ||
path: '/payment/refund-to-balance/init', | ||
method: 'POST', | ||
requestModel: 'CreateRefundToBalanceInitRequest' | ||
} | ||
}; | ||
} | ||
|
||
RefundToBalance.prototype = new IyzipayResource(); | ||
|
||
module.exports = RefundToBalance; |
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,28 @@ | ||
var should = require("should"), | ||
assert = require("assert"), | ||
Iyzipay = require("../lib/Iyzipay"), | ||
options = require("./data/options"); | ||
|
||
describe("Iyzipay refund to Balance API Test", function() { | ||
var iyzipay; | ||
|
||
before(function(done) { | ||
iyzipay = new Iyzipay(options); | ||
done(); | ||
}); | ||
|
||
describe("refund to Balance", function() { | ||
it("refund to Balance init api test", function(done) { | ||
var request = { | ||
locale: Iyzipay.LOCALE.TR, | ||
conversationId: '123456789', | ||
paymentId: 700000102, | ||
callbackUrl: 'https://merchantwebsite.com', | ||
}; | ||
iyzipay.refundToBalance.create(request, function(err, result) { | ||
console.log(err, result); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |