1.0.8 • Published 9 years ago

payflex-pay v1.0.8

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

PayFlex client API

payflex-pay is designed to charge credit cards to Is Bankasi,Ziraat Banki and Bank Asya accounts.

Sample project

var handleRequest = function(req,res){
    var payflex = require('payflex-pay');
    
    var status = payflex.getStatus(req,function(err,params){
        console.log(params);
        res.writeHead(200, {"Content-Type":"text/html"});
        if (err)
            res.end("ERROR");
        else
            res.end(JSON.stringify(params));
    });
    
    if (status !== undefined)
        return; //Handle 3d payment from callback above 
    
    //Initiate credit card payment 
	var options = {
		MerchantId:"18811938",
		MerchantPassword:"A18811938",
		SuccessURL:"http://127.0.0.1:881/success",
		FailureURL:"http://127.0.0.1:881/error",
		pan:"4012001037141112",
		ExpiryDate:"2011", //YYMM
		SessionInfo:"123", /cvv number
		PurchaseAmount:"100", //1.00 TRY
		Currency:"949", //949 for TRY
		InstallmentCount:"", //Default is 1
		VerifyEnrollmentRequestId:(new Date()).getTime()+""
	};
    payflex.init(options,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.8

9 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