Vend::Payment::ECHO(3) Interchange ECHO Support


Michael Lehmkuhl <[email protected]>.

Ported to Vend::Payment by Dan Browning <[email protected]>. Code reused and inspired by Mike Heins <[email protected]>.


Jim Darden <[email protected]>, Dan Browning <[email protected]>




[charge mode=echo param1=value1 param2=value2]


If you have not done so already, you will need to sign up for an ECHO account. You will be provided an ID and a PIN (also known as 'secret'). You may also sign up for a test account at the following URL:

This subroutine uses the OpenECHO module. Make sure is in your @INC array. It is available for download, see the following URLs:

The module itself has some additional prerequisites:

    LWP::UserAgent and Crypt::SSLeay

Only one of these need be present and working. Net::SSLeay is preferred as some have reported problems using LWP::UserAgent and Crypt::SSLeay.


This module is used to write some of the URLs used by the OpenECHO module. It is recommended that you read the documention for the OpenECHO module itself in addition to this document.


The Vend::Payment::ECHO module implements the echo() routine for use with Interchange. It is compatible on a call level with the other Interchange payment modules.

To enable this module, place this directive in "interchange.cfg":

    Require module Vend::Payment::ECHO

This must be in interchange.cfg or a file included from it.

NOTE: Make sure CreditCardAuto is off (default in Interchange demos).

The mode can be named anything, but the "gateway" parameter must be set to "echo". To make it the default payment gateway for all credit card transactions in a specific catalog, you can set in "catalog.cfg":

    Variable MV_PAYMENT_MODE  echo

It uses several of the standard settings from Interchange payment. Any time we speak of a setting, it is obtained either first from the tag/call options, then from an Interchange order Route named for the mode, then finally a default global payment variable, For example, the "id" parameter would be specified by:

    Route echo id Your_ECHO_ID

or (with only ECHO as a payment provider)

     Variable MV_PAYMENT_ID     Your_ECHO_ID


     Variable ECHO_PAYMENT_ID   Your_ECHO_ID


     [charge mode=echo id=Your_ECHO_ID]

The active settings are:

Your account ID, supplied by ECHO when you sign up. Global parameter is MV_PAYMENT_ID or ECHO_PAYMENT_ID.
Your account password, selected by you or provided by ECHO when you sign up. Global parameter is MV_PAYMENT_SECRET or ECHO_PAYMENT_SECRET.
If planning to do AUTH_ONLY or other with special admin page Variable MV_PAYMENT_REMAP order_id=mv_order_id auth_code=mv_auth_code

    Variable ECHO_PAYMENT_ORDER_TYPE         S
            # S for "self-service" orders
            # F for hosted or ISP orders
    Variable ECHO_PAYMENT_ISP_ECHO_ID        123<4567890
    Variable ECHO_PAYMENT_ISP_PIN            12345608
    Variable ECHO_PAYMENT_MERCHANT_EMAIL     [email protected]
    Variable ECHO_PAYMENT_DEBUG              F
            # C causes ECHO to return a statement of conformity
            # T or TRUE causes ECHO to return additional debug information
            # Any other value turns off ECHO debugging

Example Configuration

This is an example configuration that one would add to catalog.cfg:

    Variable MV_PAYMENT_ID      Your_ECHO_ID
    Variable MV_PAYMENT_SECRET  Your_ECHO_secret
    Variable MV_PAYMENT_MODE    echo


Try a sale with the card number "4111 1111 1111 1111" and a valid expiration date. The sale should be denied, and the reason should be in [data session payment_error].

If nothing works:

  • Make sure you ``Require''d the module in interchange.cfg:

        Require module Vend::Payment::ECHO
  • Make sure the ECHO "" module is available either in your path or in /path_to_interchange/lib.
  • Check the error logs, both catalog and global.
  • Make sure you set your account ID and secret properly.
  • Try an order, then put this code in a page:

            my $string = $Tag->uneval( { ref => $Session->{payment_result} });
            $string =~ s/{/{\n/;
            $string =~ s/,/,\n/g;
            return $string;

    That should show what happened.

  • If all else fails, Interchange consultants are available to help with integration for a fee.


Because this library calls an executable, you should ensure that no untrusted users have write permission on any of the system directories or Interchange software directories.


There is actually nothing *in* Vend::Payment::ECHO. It changes packages to Vend::Payment and places things there.