GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  VEND::PAYMENT::LINKPOINT (3)

.ds Aq ’

NAME

Vend::Payment::Linkpoint - Interchange Linkpoint Support

CONTENTS

SYNOPSIS



    &charge=linkpoint

        or

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



PREREQUISITES



    LPERL



DESCRIPTION

The Vend::Payment::Linkpoint module implements the linkpoint() routine for use with Interchange. It is compatible on a call level with the other Interchange payment modules — in theory (and even usually in practice) you could switch from CyberCash to Linkpoint with a few configuration file changes.

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



    Require module Vend::Payment::Linkpoint



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

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

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 catalog, you can set 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 for the mode, then finally a default global payment variable, For example, the id parameter would be specified by:



    [charge mode=linkpoint id=YourLinkpointID]



or



    Route linkpoint id YourLinkpointID



or



    Variable MV_PAYMENT_ID YourLinkpointID



Required settings are id and keyfile.

The active settings are:
host Your LinkPoint Secure Payment Gateway (LSPG) hostname. Usually secure.linkpt.net (production) or staging.linkpt.net (testing).
keyfile File name of the merchant security certificate. This file should contain the RSA private key and the certificate, otherwise you get an error like Unable to open/parse client certificate file.
id Store number assigned to your merchant account.
transaction The type of transaction to be run. Valid values are:



    Interchange         Linkpoint
    ----------------    -----------------
        auth            preauth
        sale            sale



Default is sale.

check_sub 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 come back negative.

If you want to fail based on a bad AVS check, make sure you’re only doing an auth — <B>not a saleB>, or 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) = @_;
                my $avs = $result->{r_avs};
                my ($addr, $zip) = split m{}, $avs;
                return 1 if $addr eq Y or $zip eq Y;
                return 1 if $addr eq X and $zip eq X;
                $result->{MStatus} = failure;
                $result->{r_error} = $result->{MErrMsg} = "The billing address you entered does not match the cardholders 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, it sets the error message in the result hash.

Of course you can use this sub to do any other post-processing you want as well.

    Troubleshooting

If nothing works:
o Make sure you Required the module in interchange.cfg:



    Require module Vend::Payment::Linkpoint



o Make sure lpperl (v3.0.012+) is installed and working. You can test to see whether your Perl thinks they are:



    perl -Mlpperl -e print "It works.\n"



If it It works. and returns to the prompt you should be OK (presuming they are in working order otherwise).

o Make sure curl is installed and working. Lpperl uses curl to contact Linkpoint.
o Check the error logs, both catalog and global.
o Make sure you set your payment parameters properly.
o Try an order, then put this code in a page:



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



That should show what happened.

BUGS

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

AUTHOR

Stefan Hornburg (Racke) <racke@linuxia.de> Ron Phipps <rphipps@reliant-solutions.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 VEND::PAYMENT::LINKPOINT (3) 2010-03-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.