The cl-creditcard Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-creditcard Reference Manual

This is the cl-creditcard Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:11:26 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

= CL-Creditcard =
CL-CreditCard is a common lisp library providing a common interface to charge creditcards.

== CL-Authorize-NET ==
CL-Authorize-net is a common lisp library for payment processing via Authorize.net.  It implements the CL-Creditcard interface.

''CL-Authorize-net is production ready and is in use.''

=== Example ===

(require :cl-authorize-net)
(defvar *auth-net* (make-instance 'cl-authorize-net:authorize-processor 
				  :login "YOUR LOGIN" 
				  :trankey "YOUR TRANKEY" 
				  :test-mode :full))
(cl-authorize-net:sale *auth-data*
		       (make-instance 'cl-authorize-net:authorize-data
				      :account "4222222222222" :expdate "06/11"
				      :first-name "Test")
		       5)
=== Objects === * authorize-processor * authorize-data - holds information relevant to making credit-card charges * echeck-data - holds information relevant to making ACH / echeck charges === Methods === All operations are based around a authorize-processor instance. * (authorize processor data amount) Do a pre-authorization without capture returning a transaction identifier that can later be used with preauth-capture. Not valid with echeck-data. * (preauth-capture processor transaction-id &key amount) Capture a charge that was previously authorized with authorize. Some processors allow capturing a different amount than was originally authorized. Not valid with echeck-data. * (sale processor data amount) Do a one time charge on a credit card for an amount using the given processor. Other provided keys are up to the processor to interpret or ignore. Returns the transaction's unique identifier if successful. * (void processor transaction-id) Void a previous transaction. == CL-Monetra == CL-Monetra is a common lisp library for payment processing via CL-Monetra. It implements the CL-Creditcard interface ''CAUTION: This processor was in development and then abandoned. See code in the monetra-dev branch if you want to use monetra''

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-creditcard

Author

<programmers@acceleration.net>

License

MIT

Description

Generic interace library for talking with credit card processors.

Version

0.1

Dependency

iterate

Source

cl-creditcard.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-creditcard/src

Parent

cl-creditcard (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-creditcard.asd

Location

cl-creditcard.asd

Systems

cl-creditcard (system)

Packages

cl-creditcard.system


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-creditcard/src/packages.lisp

Parent

src (module)

Location

src/packages.lisp

Packages

cl-creditcard


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-creditcard/src/credit-card-api.lisp

Dependency

packages.lisp (file)

Parent

src (module)

Location

src/credit-card-api.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cl-creditcard/src/util.lisp

Dependency

credit-card-api.lisp (file)

Parent

src (module)

Location

src/util.lisp

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 cl-creditcard.system

Source

cl-creditcard.asd

Use List

Previous: , Up: Packages   [Contents][Index]

5.2 cl-creditcard

Library for charging credit cards.

Source

packages.lisp (file)

Nickname

clcc

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Generic functions

Generic Function: account OBJECT
Generic Function: (setf account) NEW-VALUE OBJECT
Package

cl-creditcard

Methods
Method: account (CC-DATA cc-data)
Method: (setf account) NEW-VALUE (CC-DATA cc-data)

The card number.

Source

credit-card-api.lisp (file)

Generic Function: address OBJECT
Generic Function: (setf address) NEW-VALUE OBJECT
Package

cl-creditcard

Methods
Method: address (CC-DATA cc-data)
Method: (setf address) NEW-VALUE (CC-DATA cc-data)

Street address for AVS. Typically only numbers need to
be passed in this fields. Letters and other characters are ignored.

Source

credit-card-api.lisp (file)

Generic Function: authorize PROCESSOR CC-DATA AMOUNT &key &allow-other-keys

Do a pre-authorization without capture returning a
transaction identifier that can later be used with preauth-capture.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: ccv OBJECT
Generic Function: (setf ccv) NEW-VALUE OBJECT
Package

cl-creditcard

Methods
Method: ccv (CC-DATA cc-data)
Method: (setf ccv) NEW-VALUE (CC-DATA cc-data)

Card [Code] Verification value. Usually 3-4 digits on back of card.

Source

credit-card-api.lisp (file)

Generic Function: enough-data-p CC-DATA &key REQUIRE-AVS REQUIRE-CCV ERROR-P

Check that a cc-data like structure has enough data to
complete a transaction.
Can optionally require that AVS verification, Card Verfication data be present. Can optionally signal an error if data isn’t present.

Some merchant accounts will incur extra fees if AVS isn’t used.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: expdate OBJECT
Generic Function: (setf expdate) NEW-VALUE OBJECT
Package

cl-creditcard

Methods
Method: expdate (CC-DATA cc-data)
Method: (setf expdate) NEW-VALUE (CC-DATA cc-data)

The card expiration date

Source

credit-card-api.lisp (file)

Generic Function: luhn-check-p CARD-NUMBER

Check the credit-card number is valid looking based on
the luhn algorithm: http://en.wikipedia.org/wiki/Luhn_algorithm

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: preauth-capture PROCESSOR TRANSACTION-ID &key AMOUNT &allow-other-keys

Capture a charge that was previously authorized with authorize.
Some processors allow capturing a different amount than was originally authorized.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: sale PROCESSOR CC-DATA AMOUNT &key &allow-other-keys

Do a one time charge on a credit card for an amount using
the given processor. Other provided keys are up to the processor to interpret or ignore.

Returns the transaction’s unique identifier if successful.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: void PROCESSOR TRANSACTION-ID &key &allow-other-keys

Void a previous transaction.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: zip OBJECT
Generic Function: (setf zip) NEW-VALUE OBJECT
Package

cl-creditcard

Methods
Method: zip (CC-DATA cc-data)
Method: (setf zip) NEW-VALUE (CC-DATA cc-data)

Zipcode for AVS verfication.

Source

credit-card-api.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Conditions

Condition: deny-exception ()

Error signalled when the CC is denied and error signalling is requested.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Direct superclasses

cc-error (condition)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Classes

Class: cc-data ()

Class to hold data that normally goes with a credit card charge.
We interact with this class only through the accessors and never actually check
the type, so you can feed it any data structure that responds to these set of accessors.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • zip (method)
  • zip (method)
  • address (method)
  • address (method)
  • ccv (method)
  • ccv (method)
  • expdate (method)
  • expdate (method)
  • account (method)
  • account (method)
Direct slots
Slot: account

The card number.

Initargs

:account

Readers

account (generic function)

Writers

(setf account) (generic function)

Slot: expdate

The card expiration date

Initargs

:expdate

Readers

expdate (generic function)

Writers

(setf expdate) (generic function)

Slot: ccv

Card [Code] Verification value. Usually 3-4 digits on back of card.

Initargs

:ccv

Readers

ccv (generic function)

Writers

(setf ccv) (generic function)

Slot: address

Street address for AVS. Typically only numbers need to
be passed in this fields. Letters and other characters are ignored.

Initargs

:address

Readers

address (generic function)

Writers

(setf address) (generic function)

Slot: zip

Zipcode for AVS verfication.

Initargs

:zip

Readers

zip (generic function)

Writers

(setf zip) (generic function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: read-keyword-from-string STR

Safely read a string into the keyword package.

Package

cl-creditcard

Source

util.lisp (file)

Function: replace-all STRING PART REPLACEMENT &key TEST

Returns a new string in which all the occurences of the part
is replaced with replacement. [FROM http://cl-cookbook.sourceforge.net/strings.html#manip]

Package

cl-creditcard

Source

util.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Generic functions

Generic Function: credit PROCESSOR CC-DATA &key TRANSACTION-ID AMOUNT &allow-other-keys

Credit a charge, if transaction-id is present this is a credit against a precviouly charged authorization

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Generic Function: user-message CONDITION
Generic Function: (setf user-message) NEW-VALUE CONDITION
Package

cl-creditcard

Methods
Method: user-message (CONDITION cc-error)
Method: (setf user-message) NEW-VALUE (CONDITION cc-error)
Source

credit-card-api.lisp (file)

Generic Function: verbiage CONDITION
Generic Function: (setf verbiage) NEW-VALUE CONDITION
Package

cl-creditcard

Methods
Method: verbiage (CONDITION cc-error)
Method: (setf verbiage) NEW-VALUE (CONDITION cc-error)
Source

credit-card-api.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Conditions

Condition: cc-error ()

Requested errors when processing the credit will inherit
from here. user-message, when supplied, should be a safe string to display to clients informing them of the error.

Package

cl-creditcard

Source

credit-card-api.lisp (file)

Direct superclasses

simple-error (condition)

Direct subclasses

deny-exception (condition)

Direct methods
Direct slots
Slot: user-message
Initargs

:user-message

Initform

(quote nil)

Readers

user-message (generic function)

Writers

(setf user-message) (generic function)

Slot: verbiage

human-interpretable response code
(meant for system display to clerk)

Initargs

:verbiage

Readers

verbiage (generic function)

Writers

(setf verbiage) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-creditcard.asd: The cl-creditcard<dot>asd file
cl-creditcard/src: The cl-creditcard/src module
cl-creditcard/src/credit-card-api.lisp: The cl-creditcard/src/credit-card-api<dot>lisp file
cl-creditcard/src/packages.lisp: The cl-creditcard/src/packages<dot>lisp file
cl-creditcard/src/util.lisp: The cl-creditcard/src/util<dot>lisp file

F
File, Lisp, cl-creditcard.asd: The cl-creditcard<dot>asd file
File, Lisp, cl-creditcard/src/credit-card-api.lisp: The cl-creditcard/src/credit-card-api<dot>lisp file
File, Lisp, cl-creditcard/src/packages.lisp: The cl-creditcard/src/packages<dot>lisp file
File, Lisp, cl-creditcard/src/util.lisp: The cl-creditcard/src/util<dot>lisp file

L
Lisp File, cl-creditcard.asd: The cl-creditcard<dot>asd file
Lisp File, cl-creditcard/src/credit-card-api.lisp: The cl-creditcard/src/credit-card-api<dot>lisp file
Lisp File, cl-creditcard/src/packages.lisp: The cl-creditcard/src/packages<dot>lisp file
Lisp File, cl-creditcard/src/util.lisp: The cl-creditcard/src/util<dot>lisp file

M
Module, cl-creditcard/src: The cl-creditcard/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   E   F   G   L   M   P   R   S   U   V   Z  
Index Entry  Section

(
(setf account): Exported generic functions
(setf account): Exported generic functions
(setf address): Exported generic functions
(setf address): Exported generic functions
(setf ccv): Exported generic functions
(setf ccv): Exported generic functions
(setf expdate): Exported generic functions
(setf expdate): Exported generic functions
(setf user-message): Internal generic functions
(setf user-message): Internal generic functions
(setf verbiage): Internal generic functions
(setf verbiage): Internal generic functions
(setf zip): Exported generic functions
(setf zip): Exported generic functions

A
account: Exported generic functions
account: Exported generic functions
address: Exported generic functions
address: Exported generic functions
authorize: Exported generic functions

C
ccv: Exported generic functions
ccv: Exported generic functions
credit: Internal generic functions

E
enough-data-p: Exported generic functions
expdate: Exported generic functions
expdate: Exported generic functions

F
Function, read-keyword-from-string: Internal functions
Function, replace-all: Internal functions

G
Generic Function, (setf account): Exported generic functions
Generic Function, (setf address): Exported generic functions
Generic Function, (setf ccv): Exported generic functions
Generic Function, (setf expdate): Exported generic functions
Generic Function, (setf user-message): Internal generic functions
Generic Function, (setf verbiage): Internal generic functions
Generic Function, (setf zip): Exported generic functions
Generic Function, account: Exported generic functions
Generic Function, address: Exported generic functions
Generic Function, authorize: Exported generic functions
Generic Function, ccv: Exported generic functions
Generic Function, credit: Internal generic functions
Generic Function, enough-data-p: Exported generic functions
Generic Function, expdate: Exported generic functions
Generic Function, luhn-check-p: Exported generic functions
Generic Function, preauth-capture: Exported generic functions
Generic Function, sale: Exported generic functions
Generic Function, user-message: Internal generic functions
Generic Function, verbiage: Internal generic functions
Generic Function, void: Exported generic functions
Generic Function, zip: Exported generic functions

L
luhn-check-p: Exported generic functions

M
Method, (setf account): Exported generic functions
Method, (setf address): Exported generic functions
Method, (setf ccv): Exported generic functions
Method, (setf expdate): Exported generic functions
Method, (setf user-message): Internal generic functions
Method, (setf verbiage): Internal generic functions
Method, (setf zip): Exported generic functions
Method, account: Exported generic functions
Method, address: Exported generic functions
Method, ccv: Exported generic functions
Method, expdate: Exported generic functions
Method, user-message: Internal generic functions
Method, verbiage: Internal generic functions
Method, zip: Exported generic functions

P
preauth-capture: Exported generic functions

R
read-keyword-from-string: Internal functions
replace-all: Internal functions

S
sale: Exported generic functions

U
user-message: Internal generic functions
user-message: Internal generic functions

V
verbiage: Internal generic functions
verbiage: Internal generic functions
void: Exported generic functions

Z
zip: Exported generic functions
zip: Exported generic functions

Jump to:   (  
A   C   E   F   G   L   M   P   R   S   U   V   Z  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   A   C   E   S   U   V   Z  
Index Entry  Section

A
account: Exported classes
address: Exported classes

C
ccv: Exported classes

E
expdate: Exported classes

S
Slot, account: Exported classes
Slot, address: Exported classes
Slot, ccv: Exported classes
Slot, expdate: Exported classes
Slot, user-message: Internal conditions
Slot, verbiage: Internal conditions
Slot, zip: Exported classes

U
user-message: Internal conditions

V
verbiage: Internal conditions

Z
zip: Exported classes

Jump to:   A   C   E   S   U   V   Z  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   P   S  
Index Entry  Section

C
cc-data: Exported classes
cc-error: Internal conditions
cl-creditcard: The cl-creditcard system
cl-creditcard: The cl-creditcard package
cl-creditcard.system: The cl-creditcard<dot>system package
Class, cc-data: Exported classes
Condition, cc-error: Internal conditions
Condition, deny-exception: Exported conditions

D
deny-exception: Exported conditions

P
Package, cl-creditcard: The cl-creditcard package
Package, cl-creditcard.system: The cl-creditcard<dot>system package

S
System, cl-creditcard: The cl-creditcard system

Jump to:   C   D   P   S