Skip to content

Commit

Permalink
samples updated and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabri Onur Tüzün committed Sep 7, 2016
1 parent a259f1a commit 6b78569
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var iyzipay = new Iyzipay({
uri: 'https://sandbox-api.iyzipay.com'
});

var payment = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -125,7 +125,7 @@ var payment = {
]
};

iyzipay.payment.create(payment, function (err, result) {
iyzipay.payment.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand Down
6 changes: 3 additions & 3 deletions lib/requests/RetrieveBkmRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var BaseRequest = require('./BaseRequest'),
util = require('util');

function RetrieveBkmAuthRequest(request) {
function RetrieveBkmRequest(request) {

BaseRequest.call(this, {
locale: request['locale'],
Expand All @@ -12,6 +12,6 @@ function RetrieveBkmAuthRequest(request) {
});
}

util.inherits(RetrieveBkmAuthRequest, BaseRequest);
util.inherits(RetrieveBkmRequest, BaseRequest);

module.exports = RetrieveBkmAuthRequest;
module.exports = RetrieveBkmRequest;
6 changes: 3 additions & 3 deletions lib/requests/RetrievePaymentRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var BaseRequest = require('./BaseRequest'),
util = require('util');

function RetrieveInstallmentInfoRequest(request) {
function RetrievePaymentRequest(request) {

BaseRequest.call(this, {
locale: request['locale'],
Expand All @@ -13,6 +13,6 @@ function RetrieveInstallmentInfoRequest(request) {
});
}

util.inherits(RetrieveInstallmentInfoRequest, BaseRequest);
util.inherits(RetrievePaymentRequest, BaseRequest);

module.exports = RetrieveInstallmentInfoRequest;
module.exports = RetrievePaymentRequest;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iyzipay",
"version": "2.0.14",
"version": "2.0.15",
"description": "iyzipay api node.js client",
"main": "lib/Iyzipay.js",
"scripts": {
Expand Down
28 changes: 14 additions & 14 deletions samples/IyzipaySamples.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Iyzipay API Test', function () {
describe('Bkm', function () {

it('should initialize bkm', function (done) {
var bkmInitRequest = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.bkmInitialize.create(bkmInitRequest, function (err, result) {
iyzipay.bkmInitialize.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand Down Expand Up @@ -229,7 +229,7 @@ describe('Iyzipay API Test', function () {
describe('Checkout Form', function () {

it('should initialize checkout form', function (done) {
var checkoutFormInitRequest = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -296,7 +296,7 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.checkoutFormInitialize.create(checkoutFormInitRequest, function (err, result) {
iyzipay.checkoutFormInitialize.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand Down Expand Up @@ -332,7 +332,7 @@ describe('Iyzipay API Test', function () {
describe('Payment', function () {

it('should create payment', function (done) {
var payment = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -407,14 +407,14 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.payment.create(payment, function (err, result) {
iyzipay.payment.create(request, function (err, result) {
console.log(err, result);
done();
});
});

it('should create marketplace payment', function (done) {
var payment = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -495,14 +495,14 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.payment.create(payment, function (err, result) {
iyzipay.payment.create(request, function (err, result) {
console.log(err, result);
done();
});
});

it('should create payment with registered card', function (done) {
var payment = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -573,7 +573,7 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.payment.create(payment, function (err, result) {
iyzipay.payment.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand All @@ -596,7 +596,7 @@ describe('Iyzipay API Test', function () {
describe('Pecco', function () {

it('should initialize pecco', function (done) {
var peccoInitRequest = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '100000',
Expand Down Expand Up @@ -662,7 +662,7 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.peccoInitialize.create(peccoInitRequest, function (err, result) {
iyzipay.peccoInitialize.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand Down Expand Up @@ -862,7 +862,7 @@ describe('Iyzipay API Test', function () {
describe('Threeds', function () {

it('should initialize threeds', function (done) {
var threedsRequest = {
var request = {
locale: Iyzipay.LOCALE.TR,
conversationId: '123456789',
price: '1',
Expand Down Expand Up @@ -938,7 +938,7 @@ describe('Iyzipay API Test', function () {
]
};

iyzipay.threedsInitialize.create(threedsRequest, function (err, result) {
iyzipay.threedsInitialize.create(request, function (err, result) {
console.log(err, result);
done();
});
Expand Down

0 comments on commit 6b78569

Please sign in to comment.