Common Lisp Package: CL-MONERIS

README:

FUNCTION

Public

CORRECTION (&KEY ORDER-ID TXN-ID (CRYPT-TYPE 7))

Generate a transaction to void a same-day purchase. No purchase will appear on the customer's credit card. Description of input parameters: order-id (string, 50 chars max, alphanumeric) Merchant defined unique transaction identifier - must reference a previously processed purchase transaction order-id. txn-id (string, 255 chars max, alphanumeric) This must be the value returned as the Txn_number in the response to the original purchase. crypt-type (string, 1 char, alphanumeric) E-Commerce Indicator: 1 - Mail Order/Telephone Order - Single 2 - Mail Order/Telephone Order - Recurring 3 - Mail Order Telephone Order - Instalment 4 - Mail Order Telephone Order - Unknown Classification 5 - Authenticated E-commerce Transaction (VBV) 6 - Non Authenticated Ecommerce Transaction (VBV) 7 - SSL enabled merchant 8 - Non Secure Transaction (Web or Email Based) 9 - SET Non Authenticated transaction

PROCESS (MERCHANT-TOKEN TRANSACTION)

Send a 'purchase', 'correction', or 'refund' transaction for processing to Moneris merchant account specified by merchant-token. If the Moneris mpg server returns an HTTP status code other than 200, raises a moneris-post-error If transaction is declined, raises a moneris-transaction-error If transaction is successfuly processed, returns (as multiple values): txn-id - transaction ID code - numeric response code code-description - response code description message - message returned in response response-xml - parsed XML of response response-string - raw XML response string

PURCHASE (&KEY ORDER-ID CUST-ID AMOUNT PAN EXPDATE (CRYPT-TYPE 7))

Generate a purchase transaction for processing. Description of input parameters: order-id (string, 50 chars max, alphanumeric) Merchant defined unique transaction identifier - must be uniquely generated by caller for every Purchase. amount (string, 9 chars max, decimal) Amount of the transaction. This must contain 3 digits with two penny values. The minimum value passed can be 0.01 and the maximum 9999999.99 pan (string, 20 chars max, numeric) Credit Card Number - no spaces or dashes. Most credit card numbers today are 16 digits in length but some 13 digits are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and/or potential support of private label card ranges. expdate (string, 4 chars, numeric) Expiry Date - format YYMM no spaces or slashes. PLEASE NOTE THAT THIS IS REVERSED FROM THE DATE DISPLAYED ON THE PHYSICAL CARD WHICH IS MMYY cust-id (string, 50 chars max, alphanumeric) This is an optional field that can be sent as part of a Purchase or PreAuth request. It is searchable in the Moneris Merchant Resource Centre. It is commonly used for policy number, membership number, student ID or invoice number.

REFUND (&KEY ORDER-ID TXN-ID AMOUNT (CRYPT-TYPE 7))

Generate a transaction to refund a purchase. order-id (string, 50 chars max, alphanumeric) Merchant defined unique transaction identifier. For Independent Refund attempts, must be uniquely generated by caller. For refunds of previous purchases, must reference a previously processed purchase transaction order-id. txn-id (string, 255 chars max, alphanumeric) Used when performing follow on transactions - this must be the value returned as the Txn_number in the response to the original purchase. amount (string, 9 chars max, decimal) Amount of the transaction. This must contain 3 digits with two penny values. The minimum value passed can be 0.01 and the maximum 9999999.99 crypt-type (string, 1 char, alphanumeric) E-Commerce Indicator: 1 - Mail Order/Telephone Order - Single 2 - Mail Order/Telephone Order - Recurring 3 - Mail Order Telephone Order - Instalment 4 - Mail Order Telephone Order - Unknown Classification 5 - Authenticated E-commerce Transaction (VBV) 6 - Non Authenticated Ecommerce Transaction (VBV) 7 - SSL enabled merchant 8 - Non Secure Transaction (Web or Email Based) 9 - SET Non Authenticated transaction

Private

Undocumented

IS-ERROR-CODE? (CODE)

LISPIFY-RESPONSE (S-XML-RESPONSE)

RESPONSE-CODE-DESCRIPTION (CODE)

GENERIC-FUNCTION

Public

Undocumented

CODE (CONDITION)

SETFCODE (NEW-VALUE CONDITION)

CODE-DESCRIPTION (CONDITION)

SETFCODE-DESCRIPTION (NEW-VALUE CONDITION)

HTTP-BODY (CONDITION)

SETFHTTP-BODY (NEW-VALUE CONDITION)

HTTP-CODE (CONDITION)

SETFHTTP-CODE (NEW-VALUE CONDITION)

HTTP-HEADERS (CONDITION)

SETFHTTP-HEADERS (NEW-VALUE CONDITION)

MESSAGE (CONDITION)

SETFMESSAGE (NEW-VALUE CONDITION)

PARSED-XML (CONDITION)

SETFPARSED-XML (NEW-VALUE CONDITION)

RAW-XML (CONDITION)

SETFRAW-XML (NEW-VALUE CONDITION)

REASON-PHRASE (CONDITION)

SETFREASON-PHRASE (NEW-VALUE CONDITION)

SLOT-ACCESSOR

Private

API-TOKEN (OBJECT)

Your api token issued during Moneris store creation.

MONERIS-URI (OBJECT)

Full URI of the Moneris Server e.g. https://moneris.com/mpg

STORE-ID (OBJECT)

Your store-id issued during Moneris store creation.

VARIABLE

Private

Undocumented

*RESPONSE-CODES*

CLASS

Public

MERCHANT-TOKEN

Merchant-token objects specify your unique Moneris store information.

CONDITION

Public

MONERIS-ERROR

Superclass of network errors or transaction-declined conditions. Handle this when you don't care why your transaction failed to process.

MONERIS-POST-ERROR

Condition raised due to network error

MONERIS-TRANSACTION-ERROR

Condition raised when transaction is declined