Skip to content

A couple of simple CFCs for processing credit cards using PayPal / PayflowPro.

Notifications You must be signed in to change notification settings

pmcelhaney/payflowpro-api-for-coldfusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

PayFlowPro API for ColdFusion

Simple interface to process credit card transactions via Verisign PayFlowPro. It wraps around the HTTP interface using CFHTTP.

Usage

<!--- Change "TEST" to "LIVE" in live code --->
<cfset gateway = createObject("component", "HTTPPayFlowProGateway").init("TEST")>

<cfset transaction = gateway.createTransaction()>
<cfset transaction.setVendor(vendor)>
<cfset transaction.setUsernameAndPassword(username, password)>
<cfset transaction.setCardNumber(card_number)>
<cfset transaction.setExpirationMonthAndYear(expiration_month, expiration_year)>
<cfset transaction.setAmount(amount_to_charge)>
<cfset transaction.run()>

<cfoutput>
Approved? #transaction.approved()#<br>
Result Code: #transaction.resultCode()#<br>
Response Message: #transaction.responseMessage()#<br>
Auth code: #transaction.authCode()#<br>
PNREF: #transaction.pnRef()#
</cfoutput>

Charge Using Reference Transaction

<cfset transaction = gateway.createTransaction()>
<cfset transaction.setVendor(vendor)>
<cfset transaction.setUsernameAndPassword(username,password)>
<cfset transaction.setReferenceTransaction(pnref)>
<cfset transaction.setAmount(amount_to_charge)>
<cfset transaction.run()>

Credit Using Reference Transaction

<cfset transaction = gateway.createTransaction()>
<cfset transaction.setVendor(vendor)>
<cfset transaction.setUsernameAndPassword(username,password)>
<cfset transaction.setReferenceTransaction(pnref)>
<cfset transaction.setAmount(amount_to_credit)>
<cfset transaction.credit()>

Void Transaction Using Reference Transaction

<cfset transaction = gateway.createTransaction()>
<cfset transaction.setVendor(vendor)>
<cfset transaction.setUsernameAndPassword(username,password)>
<cfset transaction.setReferenceTransaction(pnref)>
<cfset transaction.void()>

About

A couple of simple CFCs for processing credit cards using PayPal / PayflowPro.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published