For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

Linkpoint

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

Synopsis

&charge = linkpoint

or

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

Prerequisites

  • LPERL module, supplied by Linkpoint.
  • curl

Description

The Vend::Payment::Linkpoint module implements the linkpoint() 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 Linkpoint with a few configuration file changes.

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

Require  module  Vend::Payment::Linkpoint

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 "linkpoint".  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  linkpoint

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=linkpoint id=YourLinkpointID]

or

Route  linkpoint  id  YourLinkpointID

or

Variable  MV_PAYMENT_ID  YourLinkpointID

Settings

Name Description
id The store number assigned to your merchant account.
host Your LinkPoint Secure Payment Gateway (LSPG) hostname.  This is usually secure.linkpt.net (live) or staging.linkpt.net (testing).
keyfile The name of the file that holds your merchant security certificate.  This file should contain both the RSA private key and the certificate, otherwise you get an error like "Unable to open/parse client certificate file."
transaction

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

Interchange Linkpoint
auth preauth
sale sale

The default is "sale".

check_sub

The name of a Sub or GlobalSub to be called after the result hash has been received from Linkpoint.  A reference to the modifiable result hash is passed into the subroutine, and it should return true (in the Perl truth sense) if its checks were successful, or false if not.

This can come in handy since Linkpoint has no option to decline a charge when AVS data comes back negative.

If you want to fail based on a bad AVS check, make sure you're only doing an auth, and not a sale, otherwise your customers would get charged on orders that fail the AVS check, and never get logged in your system.

Add the parameters like this:

Route  linkpoint  check_sub  avs_check

This is a matching sample subroutine you could put in interchange.cfg:

GlobalSub <<EOR
sub avs_check {
    my $result = shift;
    my ($addr, $zip) = split('',$result->{r_avs});

    return 1 if ($addr eq 'Y' || $zip eq 'Y');
    return 1 if ($addr eq 'X' && $zip eq 'X');

    $result->{MStatus} = 'failure';
    $result->{MErrMsg} = $result->{r_error} = "The billing address you entered does not match the cardholder's billing address";

    return 0;
}
EOR

That would work equally well as a Sub in catalog.cfg.  It will succeed if either the "address" or "zip" is "Y", or if both are unknown.  If it fails, then it sets the error message in the result hash.

Of course you can use this subroutine to do any other post-processing need.

Troubleshooting

If nothing works:

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

    Require module Vend::Payment::Linkpoint

  • Make sure lpperl (version 3.0.012+) is installed and working.  You can test to see whether your Perl thinks they are like this:

    perl -Mlpperl -le 'print "It works"'

    If it shows "It works" and returns to the prompt you should be OK (presuming, of course, that they are in working order otherwise).


  • Make sure curl is installed and working.  Lpperl uses curl to contact Linkpoint.

  • Check the local and global error log files.

  • Make sure you set your payment parameters properly.

  • Try an order, 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::Linkpoint;  This module changes its package name to Vend::Payment and places things there.

Authors

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