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

WellsFargo

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

Availability

Availability

This payment module was removed prior to the release of version 5.5.2, and is therefore not available for use with that or any later Interchange version.

Synopsis

&charge = wellsfargo

or

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

Prerequisites

Net::SSLeay

or

LWP::UserAgent and Crypt::SSLeay

Only one of the above options needs be present and working.

Description

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

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

Require  module  Vend::Payment::WellsFargo

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

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=wellsfargo id=YourWellsFargoID]

or

Route  wellsfargo  id  YourWellsFargoID

or

Variable  MV_PAYMENT_ID  YourWellsFargoID

Settings

Name Description
id Your WellsFargo account ID (ioc_merchant_id), supplied by WellsFargo when you sign up.  The variable is MV_PAYMENT_ID.
secret Your WellsFargo account password, supplied by WellsFargo when you sign up.  The variable is MV_PAYMENT_SECRET.  This may not be needed for actual charges.
username User ID used to log in to the Back Office.  The variable is MV_PAYMENT_USERNAME.  This may not be needed for actual charges.
transaction

Type of transaction to execute, which may be one of the following:

Name Description
authorize Perform authorisation only (the default).
sale Authorise and settle (requires two separate requests).
settle Perform settlement only on previously authorised transaction.
return Make a refund on previously settled transaction.

The variable is MV_PAYMENT_TRANSACTION.

referer The URI of the web page you are posting from.  Required by WellsFargo.  The variable is MV_PAYMENT_REFERER.
accept

Comma-separated return codes for which you consider a credit card acceptable.  Valid codes are:

Code Description
0 Order authorised.
1 Some other failure.  Try again.
2 Card Declined.  Do not accept the order.
3 No response from issuing institution.  Try again.
4 Bad card.  Do not accept the order.  Merchant should call shopper.
5 Error in transfer amount.
6 Credit card expired.
7 Transaction is invalid.
8 Unknown system error.
9 Duplicate request.  This transaction was completed earlier.
>=10 Other error.  Contact you merchant bank representative.

Default is to accept for return code <= 0.  "accept" codes are only valid on "authorize" transactions.  All others are only successful with a return code of 0.  For example:

Variable  MV_PAYMENT_ACCEPT  -1,0,1,3,8,10

timeout_error The error displayed if Wells Fargo is not responding, or is down.  The default is "Credit card processor not responding. Please try again later or call our customer service directly." The variable is MV_PAYMENT_TIMEOUT_ERROR.
custom_query

Key of a scratchpad hash containing additional name/value pairs.  Use for any optional fields you want to pass to the gateway (optional as defined by the Wells Fargo developer docs).  For example, to "close an order" on a settlement, you can pass the IOC_close_flag parameter to the gateway.  So, to utilise this feature, set a scratchpad hash, keyed by param "custom_query.

For mode config:

Route  wellsfargo  custom_query  my_cust_query

Before calling the [charge] tag, set the following:

$Scratch->{my_cust_query} = {
    IOC_close_flag => 'Yes'
};

Keys in custom_query will also supersede any pre-existing parameters, if needed.  Thus, if you wish to collect and pass the actual Card Verification Number from customer cards, with a form field named "cc_verification_number" then you can use the following:

$Scratch->{my_cust_query} = {
    Ecom_payment_card_verification => $Values->{cc_verification_number}
};

Care should be taken not to accidentally overwrite desired pre-existing parameters.

The "custom_query" hash will be deleted from scratch space after each call to the WellsFargo payment module.


Note

Note

Note:  since a "sale" operation is actually two independent requests to the gateway, with each having different queries for the most part, be aware that any defined "custom_query" will be sent in both requests, and override any same-named parameters in both instances.

remap This remaps the form variable names to the ones needed by Wells Fargo.

Troubleshooting

Try the instructions above, then enable test mode in the online account manager.  A test order should complete.

Disable test mode and then test in various WellsFargo error modes by using the credit card number "4222 2222 2222 2222".

Then 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 Required the module in interchange.cfg:

    Require module Vend::Payment::WellsFargo

  • 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.

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

Authors

  • Mark Johnson
  • Based on original code by Mike Heins Email link

Credits

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