Permalink
Browse files

Egit wants to commit but files aren't changed.

  • Loading branch information...
ghidinelli committed Feb 17, 2013
1 parent aad1c7f commit cd71513b7008466afaa967311ae95a9c84f844b2
View
36 LICENSE
@@ -1,18 +1,18 @@
$Id$
Built on @TIMESTAMP@
Copyright 2007+ by Brian Ghidinelli (http://www.ghidinelli.com)
Mark Mazelin (http://www.mkville.com)
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
$Id$
Built on @TIMESTAMP@
Copyright 2007+ by Brian Ghidinelli (http://www.ghidinelli.com)
Mark Mazelin (http://www.mkville.com)
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
View
@@ -1,131 +1,131 @@
<!---
$Id$
Copyright 2007 Brian Ghidinelli (http://www.ghidinelli.com/)
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->
<cfcomponent name="core" output="false" displayname="CFPAYMENT Core" hint="The core API for CFPAYMENT">
<!---
NOTES:
* This is the main object that will be invoked
* Create the object and init() it with a configuration object
USAGE:
requires a configuration object that looks like:
.path (REQUIRED, to gateway cfc, could be "itransact.itransact_cc" or "bogus.gateway")
.id (a unique id you give your gateways. If only ever have one, use 1)
.mid (merchant account number)
.username
.password
...
(these are arbitrary keys passed to the gateway on init so if not using l/p, pass here)
--->
<!--- pseudo-constructor --->
<cfset variables.instance = structNew() />
<cfset variables.instance.VERSION = "@VERSION@" />
<cffunction name="init" output="false" access="public" returntype="any" hint="Initialize the core API and return a reference to it">
<cfargument name="config" type="struct" required="true" />
<cfset variables.instance.config = arguments.config />
<!--- the core service expects a structure of configuration information to be passed to it
telling it what gateway to use and so forth --->
<cftry>
<!--- instantiate gateway and initialize it with the passed configuration --->
<cfset variables.instance.gateway = createObject("component", "gateway.#lCase(variables.instance.config.path)#").init(config = variables.instance.config, service = this) />
<cfcatch type="template">
<!--- these are errors in the gateway itself, need to bubble them up for debugging --->
<cfrethrow />
</cfcatch>
<cfcatch type="application">
<cfthrow message="Invalid Gateway Specified" type="cfpayment.InvalidGateway" />
</cfcatch>
<cfcatch type="any">
<cfrethrow />
</cfcatch>
</cftry>
<!---
$Id$
Copyright 2007 Brian Ghidinelli (http://www.ghidinelli.com/)
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->
<cfcomponent name="core" output="false" displayname="CFPAYMENT Core" hint="The core API for CFPAYMENT">
<!---
NOTES:
* This is the main object that will be invoked
* Create the object and init() it with a configuration object
USAGE:
requires a configuration object that looks like:
.path (REQUIRED, to gateway cfc, could be "itransact.itransact_cc" or "bogus.gateway")
.id (a unique id you give your gateways. If only ever have one, use 1)
.mid (merchant account number)
.username
.password
...
(these are arbitrary keys passed to the gateway on init so if not using l/p, pass here)
--->
<!--- pseudo-constructor --->
<cfset variables.instance = structNew() />
<cfset variables.instance.VERSION = "@VERSION@" />
<cffunction name="init" output="false" access="public" returntype="any" hint="Initialize the core API and return a reference to it">
<cfargument name="config" type="struct" required="true" />
<cfset variables.instance.config = arguments.config />
<!--- the core service expects a structure of configuration information to be passed to it
telling it what gateway to use and so forth --->
<cftry>
<!--- instantiate gateway and initialize it with the passed configuration --->
<cfset variables.instance.gateway = createObject("component", "gateway.#lCase(variables.instance.config.path)#").init(config = variables.instance.config, service = this) />
<cfcatch type="template">
<!--- these are errors in the gateway itself, need to bubble them up for debugging --->
<cfrethrow />
</cfcatch>
<cfcatch type="application">
<cfthrow message="Invalid Gateway Specified" type="cfpayment.InvalidGateway" />
</cfcatch>
<cfcatch type="any">
<cfrethrow />
</cfcatch>
</cftry>
<cfreturn this />
</cffunction>
<!--- PUBLIC METHODS --->
<cffunction name="getGateway" access="public" output="false" returntype="any" hint="return the gateway or throw an error">
<cfreturn variables.instance.gateway />
</cffunction>
<!--- getters and setters --->
<cffunction name="getVersion" access="public" output="false" returntype="string">
<cfif isNumeric(variables.instance.version)>
<cfreturn variables.instance.version />
<cfelse>
<cfreturn "SVN" />
</cffunction>
<!--- PUBLIC METHODS --->
<cffunction name="getGateway" access="public" output="false" returntype="any" hint="return the gateway or throw an error">
<cfreturn variables.instance.gateway />
</cffunction>
<!--- getters and setters --->
<cffunction name="getVersion" access="public" output="false" returntype="string">
<cfif isNumeric(variables.instance.version)>
<cfreturn variables.instance.version />
<cfelse>
<cfreturn "SVN" />
</cfif>
</cffunction>
<cffunction name="createCreditCard" output="false" access="public" returntype="any" hint="return a credit card object for population">
<cfreturn createObject("component", "model.creditcard").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createEFT" output="false" access="public" returntype="any" hint="create an electronic funds transfer (EFT) object for population">
<cfreturn createObject("component", "model.eft").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createToken" output="false" access="public" returntype="any" hint="create a remote storage token for population">
<cfreturn createObject("component", "model.token").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createMoney" output="false" access="public" returntype="any" hint="Create a money component for amount and currency conversion and formatting">
<cfreturn createObject("component", "model.money").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="getAccountType" output="false" access="public" returntype="any">
<cfargument name="Account" type="any" required="true" />
<cfreturn lcase(listLast(getMetaData(arguments.account).fullname, ".")) />
</cffunction>
<!--- statuses to determine success and failure --->
</cffunction>
<cffunction name="createCreditCard" output="false" access="public" returntype="any" hint="return a credit card object for population">
<cfreturn createObject("component", "model.creditcard").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createEFT" output="false" access="public" returntype="any" hint="create an electronic funds transfer (EFT) object for population">
<cfreturn createObject("component", "model.eft").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createToken" output="false" access="public" returntype="any" hint="create a remote storage token for population">
<cfreturn createObject("component", "model.token").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="createMoney" output="false" access="public" returntype="any" hint="Create a money component for amount and currency conversion and formatting">
<cfreturn createObject("component", "model.money").init(argumentCollection = arguments) />
</cffunction>
<cffunction name="getAccountType" output="false" access="public" returntype="any">
<cfargument name="Account" type="any" required="true" />
<cfreturn lcase(listLast(getMetaData(arguments.account).fullname, ".")) />
</cffunction>
<!--- statuses to determine success and failure --->
<cffunction name="getStatusUnprocessed" output="false" access="public" returntype="any" hint="This status is used to denote the transaction wasn't performed">
<cfreturn -1 />
</cffunction>
</cffunction>
<cffunction name="getStatusSuccessful" output="false" access="public" returntype="any" hint="This status indicates success">
<cfreturn 0 />
</cffunction>
</cffunction>
<cffunction name="getStatusPending" output="false" access="public" returntype="any" hint="This status indicates when we have sent a request to the gateway and are awaiting response (Transaction API or delayed settlement like ACH)">
<cfreturn 1 />
</cffunction>
</cffunction>
<cffunction name="getStatusDeclined" output="false" access="public" returntype="any" hint="This status indicates a declined transaction">
<cfreturn 2 />
</cffunction>
</cffunction>
<cffunction name="getStatusFailure" output="false" access="public" returntype="any" hint="This status indicates something went wrong like the gateway threw an error but we believe the transaction was not processed">
<cfreturn 3 />
</cffunction>
</cffunction>
<cffunction name="getStatusTimeout" output="false" access="public" returntype="any" hint="This status indicates the remote server doesn't answer meaning we don't know if transaction was processed">
<cfreturn 4 />
</cffunction>
</cffunction>
<cffunction name="getStatusUnknown" output="false" access="public" returntype="any" hint="This status indicates an exception we don't know how to handle (yet)">
<cfreturn 99 />
</cffunction>
</cffunction>
<cffunction name="getStatusErrors" output="false" access="public" returntype="any" hint="This defines which statuses are errors">
<cfreturn "3,4,99" />
</cffunction>
</cffunction>
</cfcomponent>
@@ -1,52 +1,52 @@
ANT Build Tool
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1.In order to use ANT Tool you have to install Apache ANT Tool in your system.
2.Download ANT Tool from "http://www.devlib.org/apache/ant/binaries/apache-ant-1.7.0-bin.zip".
3.Unzip the file and paste it any where you want (For example C:\Ant ).
4. Set the ANT_HOME and JAVA_HOME environment variables and add them to your PATH.
Bouncy Castle Crypto APIs
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Download "bcprov-jdk14-136.jar" "from http://ftp.cica.es/mirrors/maven2/bouncycastle/bcprov-jdk14/136/"
2. Put the jar file "bcprov-jdk14-136.jar" in "<coldfusion intalled directory>\runtime\jre\lib\ext" directory.
[ Note: If the jar file is put to any other directory, the Java and JVM Class path needs to be set in the Coldfusion Administrator. The path
needs to be the full physical path containing the jar file name. ]
Project Setup.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Put the java file to any desired directory of your project folder. [For example "<project root>\java"].
2. Put the component cfc file to any desired directory of your project folder. [For example "<project root>\cfc"].
3. Put the "build.xml" file to any desired path.
4. Next you need to edit the "build.xml" file with few paths.
There are mainly 4 properties whose path needs to be set.
<property name="src" location="path to source java file"/>
<property name="dist" location="destination path for jar file"/>
<property name="classes" location="destination path for class file"/>
<property name="bcjar" location="path for the bcprov-jdk14-136.jar file"/>
The location attribute of property "src" needs to be path where the java file is kept. For example "<project root>\java".
The location attribute of property "dist" needs to be the destination path where the jar file will be extracted. For example "<project root>\build\jar".
The location attribute of property "classes" needs to be the destination path where the class file will be extracted. For example "<project root>\build\classes".
The location attribute of property "bcjar" needs to be path where the bcprov-jdk14-136.jar file is kept. For example "<project root>\bouncycastlejar".
5.Now, in order to run the "build.xml" file go to the directory where "build.xml" file is present using command line and then type "ant" in the command line .
And pressing enter would create the required jar and class files in the specified directories.
6. Set the Java and JVM Class path for the generated jar file in Coldfusion Administrator.
7. Restart Coldfusion Administrator.
8. Now the cfc methods can be used.
ANT Build Tool
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1.In order to use ANT Tool you have to install Apache ANT Tool in your system.
2.Download ANT Tool from "http://www.devlib.org/apache/ant/binaries/apache-ant-1.7.0-bin.zip".
3.Unzip the file and paste it any where you want (For example C:\Ant ).
4. Set the ANT_HOME and JAVA_HOME environment variables and add them to your PATH.
Bouncy Castle Crypto APIs
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Download "bcprov-jdk14-136.jar" "from http://ftp.cica.es/mirrors/maven2/bouncycastle/bcprov-jdk14/136/"
2. Put the jar file "bcprov-jdk14-136.jar" in "<coldfusion intalled directory>\runtime\jre\lib\ext" directory.
[ Note: If the jar file is put to any other directory, the Java and JVM Class path needs to be set in the Coldfusion Administrator. The path
needs to be the full physical path containing the jar file name. ]
Project Setup.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Put the java file to any desired directory of your project folder. [For example "<project root>\java"].
2. Put the component cfc file to any desired directory of your project folder. [For example "<project root>\cfc"].
3. Put the "build.xml" file to any desired path.
4. Next you need to edit the "build.xml" file with few paths.
There are mainly 4 properties whose path needs to be set.
<property name="src" location="path to source java file"/>
<property name="dist" location="destination path for jar file"/>
<property name="classes" location="destination path for class file"/>
<property name="bcjar" location="path for the bcprov-jdk14-136.jar file"/>
The location attribute of property "src" needs to be path where the java file is kept. For example "<project root>\java".
The location attribute of property "dist" needs to be the destination path where the jar file will be extracted. For example "<project root>\build\jar".
The location attribute of property "classes" needs to be the destination path where the class file will be extracted. For example "<project root>\build\classes".
The location attribute of property "bcjar" needs to be path where the bcprov-jdk14-136.jar file is kept. For example "<project root>\bouncycastlejar".
5.Now, in order to run the "build.xml" file go to the directory where "build.xml" file is present using command line and then type "ant" in the command line .
And pressing enter would create the required jar and class files in the specified directories.
6. Set the Java and JVM Class path for the generated jar file in Coldfusion Administrator.
7. Restart Coldfusion Administrator.
8. Now the cfc methods can be used.
Oops, something went wrong.

0 comments on commit cd71513

Please sign in to comment.