1.0.10 • Published 10 years ago

garanti-3dpay v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
10 years ago

Garanti 3D-Pay client API

garanti-3dpay is designed to charge credit cards to Garanti bank accounts.

Sample project

var handleRequest = function(req,res){
	var garanti = require('garanti-3dpay');
	
	var status = garanti.getStatus(req,function(err,params){
		console.log(params);
		res.writeHead(200, {"Content-Type":"text/html"});
		if (err)
			res.end("ERROR");
		else
			res.end(params);
	});
	
	if (status !== undefined)
		return; //Handle 3d payment from callback above
	
	//Initiate credit card payment
	garanti.init({
		strTerminalMerchantID : "XXXXXX",
		strTerminalID : "XXXXXXXX",
		strOrderID : "XXXXXX",
		strProvisionPassword:"XXXXXXX",
		strSuccessURL:"http://127.0.0.1:881/success",
		strErrorURL:"http://127.0.0.1:881/error",
		strStoreKey:"XXXXX", // 3D Store Key
		cardnumber:"315432847547022", //Credit Card number
		cardexpiredatemonth:"05", // Card month
		cardexpiredateyear:"18", // Card Year
		strCustomeripaddress:"127.0.0.1", //Customer ip address
		cardcvv2:"139"
	},res);
	
}

//Create a server
var server = require('http').createServer(handleRequest);

//Lets start our server
server.listen(881, function(){
    //Callback triggered when server is successfully listening. Hurray!
    console.log("Server listening on: http://localhost:%s", 881);

});
1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago