cybersource-api
Version:
Module for connect with CyberSource by soap methods.
31 lines (28 loc) • 934 B
JavaScript
const soap = require("soap");
module.exports = class Configuration {
constructor(password,merchantID,enviroment,language,version,currency) {
this.password = password;
this.merchantID = merchantID;
this.enviroment = enviroment;
this.language = language;
this.version = version;
this.currency = currency;
if(enviroment == "production"){
this.url = `https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_${version}.wsdl`
}else if(enviroment == "development"){
this.url = `https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_${version}.wsdl`
}
this.options = {
hasNonce: true
}
}
getWsSecurity(){
return new soap.WSSecurity(this.merchantID, this.password, this.options)
}
getMerchantID(){
return this.merchantID;
}
getCurrency(){
return this.currency;
}
}