For more information... RTFM!
NAVIGATION
RECENTLY VIEWED
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0
Powered by Interchange version 5.7.0

TCLink

Interchange's support for the TrustCommerce Link to an external page Payment Services Provider.

Synopsis

&charge = trustcommerce

or

[charge route="trustcommerce" param1="value1" param2="value2"]

Prerequisites

Net::TCLink

http://www.trustcommerce.com/tclink.html Link to an external page and CPAN Link to an external page

both have this module, which actually does the bulk of the work.  All that Vend::Payment::TCLink does is to massage the payment data between Interchange and the Net::TCLink module.

Description

The Vend::Payment::TCLink module implements the trustcommerce() subroutine for use with Interchange.  It is compatible on a call level with the other Interchange payment modules.  In theory (and even usually in practise) you could switch from another payment module to TCLink with a few configuration file changes.

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

Require  module  Vend::Payment::TCLink

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

Make sure CreditCardAuto is off, which is the default in the Standard ecommerce demo.

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

Variable  MV_PAYMENT_MODE  trustcommerce

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 after the mode, then finally a default global payment Variable.  For example, the id parameter would be specified by:

[charge route=trustcommerce id=YourTrustCommerceID]

or

Route  trustcommerce  id  YourTrustCommerceID

or

Variable  MV_PAYMENT_ID  YourTrustCommerceID

Settings

Name Description
id Your TrustCommerce customer ID, as supplied by TrustCommerce when you sign up.  The variable is MV_PAYMENT_ID.
secret Your TrustCommerce customer password, as supplied by TrustCommerce when you sign up.  The variable is MV_PAYMENT_SECRET.
transaction

The type of transaction to be run.  Valid values are:

Interchange TrustCommerce
auth preauth
return credit
sale sale
settle postauth

The variable is TRUSTCOMMERCE_ACTION.

avs Whether AVS (Address Verification System) is enabled.  Valid values are "y" for enabled and "n" for disabled.  The variable is TRUSTCOMMERCE_AVS.
remap This remaps the form variable names to the ones needed by TrustCommerce.
test

Set this to "TRUE" if you want to operate in test mode.  This sets the TrustCommerce "demo" query parameter to "TRUE".

Examples:

Route  trustcommerce  test  TRUE

or

Variable  TRUSTCOMMERCE_TEST  TRUE

or

[charge mode=trustcommerce test=TRUE]

Troubleshooting

Try the instructions above, then enable test mode.  A test order should complete.

Disable test mode, then test in various TrustCommerce error modes by using credit card number "4222 2222 2222 2222".

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

If nothing works:

  • Make sure you Required the module in interchange.cfg:

    Require module Vend::Payment::TCLink

  • Make sure either Net::SSLeay, or Crypt::SSLeay and LWP::UserAgent are installed and working.  You can test to see whether your Perl thinks they are:

    perl -MNet::SSLeay -le 'print "Available"'

    or

    perl -MLWP::UserAgent -MCrypt::SSLeay -le 'print "Available"'

    If either of the above prints "Available", and returns to the shell prompt, then you should be OK (presuming they are in working order otherwise).


  • Check the local and global error log files.

  • Make sure you set your payment parameters properly, including the account "id" and "secret".
  • Try an order, and then put this code in a page:

    <pre>
    [calcn]
        my $string = $Tag->uneval({ ref => $Session->{payment_result} });

        $string =~ s/{/{\n/;
        $string =~ s/,/,\n/g;

        return $string;
    [/calcn]
    </pre>

    That should show what happened.


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

Notes

There is actually nothing in Vend::Payment::TCLink;  This module changes its package name to Vend::Payment and places things there.

Authors

Credits

Category:  Interchange payment modules
Last modified by: Kevin Walsh
Modification date: Tuesday 19 September 2006 at 11:05 AM (EDT)
SPONSORS
Home  |  Legal nonsense  |  Privacy policy  |  Contact us