AVAILABILITY

SOURCE

and add these 6 new columns into your transactions table as type
varchar(256). The CorrelationID is the one you need in any dispute with
them. The payerstatus and addressstatus results may be useful in the
order fulfillment process.
Add to F<etc/profiles.order>, something like:
__NAME__ paypal
__COMMON_ORDER_PROFILE__
email=required
email=email
&fatal = yes
&setcheck = end_profile 1

AUTHORS

SEE ALSO

Name

MV_BAD_LOCK — work around a problem in systems with broken locking mechanism

SYNOPSIS

{ 0 | 1 }

DESCRIPTION

The variable allows systems with broken locking mechanism to still work
properly.
If the variable is set, it makes sure the PIDFile lock is
not destroyed when the lock file is read.
interchange -stop will then work properly.

AUTHORS

SEE ALSO

Name

MV_DEFAULT_MATCHLIMIT — specifies the number of search results per page

SYNOPSIS

number

DESCRIPTION

The MV_DEFAULT_MATCHLIMIT variable specifies the default for the number of search results
displayed on one page. You can override this value for a specific search with the mv_matchlimit
search parameter. The default value for MV_DEFAULT_MATCHLIMIT is 50.

AUTHORS

SEE ALSO

Name

MV_DOLLAR_ZERO — control visual display of Interchange processes in the process list

SYNOPSIS

{ 0 | 1 | string }

DESCRIPTION

Define what to do with the Perl's $0 variable which contains the system's name of the running process. That process name will appear in commands like ps or top.

Setting the variable to a false value (0 or undefined) leaves the string unchanged. Setting it to 1 displays the process in the form of interchange --> (CATROOT). Setting it to a string displays that same string.

This is a workaround for a bug in stock Perl that used to ship with FreeBSD. The bug sometimes
caused a segmentation fault when Interchange daemon was starting.

VARIABLE TYPE

Global variable

EXAMPLES

Example:
Setting MV_DOLLAR_ZERO to "1"

Set the following in interchange.cfg:

Variable MV_DOLLAR_ZERO 1

NOTES

Note that this variable is set globally once when the Interchange daemon starts.
It is pointless to change the variable afterwards in runtime.

VARIABLE TYPE

EXAMPLES

NOTES

Note that this only works for Interchange's built-in e-mail sending
routines. If you use other methods to send e-mail, for example by directly
running sendmail or talking to an SMTP server
you'll have to add implement support yourself.

Be aware that this setting can mask certain programming errors. For
example, trying to send an e-mail without a
To: address would normally result
in an error. With email interception, however, a valid
To: address would be used, and seemingly work as
expected. Before switching off the interception, the only
way to know whether you did everything right is to check the
X-Intercepted-To:
header and verify its correctness. Probably even easier, you should
just monitor error log files as the original e-mail destination is
reported there as well.

AUTHORS

SEE ALSO

Name

MV_GETPPID_BROKEN — fix getppid() which is broken on Linux systems with thread-enabled Perl

SYNOPSIS

{ 0 | 1 }

DESCRIPTION

The variable enables a fix for the broken getppid() function on Linux systems with thread-enabled Perl installations. Interchange then uses syscall64() instead of the getppid() call.

VARIABLE TYPE

Global variable

EXAMPLES

Example:
Enabling MV_GETPPID_BROKEN

Add the following to interchange.cfg:

Variable MV_GETPPID_BROKEN 1

NOTES

Starting with Interchange 5.0, this directive is present in the default Debian GNU/etc/interchange/features.cfg file to let Interchange run on Debian systems later than 3.0 (which do have threaded Perl installation).

Running Interchange in production on thread-enabled Perl machines is discouraged (for the time being).

NOTES

AVAILABILITY

SOURCE

=item regkey
PRI will supply you with both a test regkey and production regkey. Enter \
both of these numbers into the the variables above. You do not \
need your production regkey to test.
=item refid
The PRI interface allows (requires) a field called REFID. This field is \
stored along with the transaction on the PRI server and allows your \
to do quick searches for transactions if this number has meaning. \
There are three possible values for the PRI_REFID_MODE variable. \
1,2 or any other character or null.
1. A "1" in the pri_refid_mode instructs interchange to read the current
order number in $Variable->{MV_ORDER_COUNTER_FILE} or "etc/order.number",
increment it by one and use that. Do not use this mode if you have a \
busy catalog. PRI might reject orders as duplicates if two people \
try to checkout at the same time.
2. A "2" in the pri_refid_mode instructs interchange to use the users
session_id as the value. This is the recommended mode.

AUTHORS

SEE ALSO

Name

SYNOPSIS

DESCRIPTION

This variable contains relative, system-wide path of the current page being served, without the suffix.
The variable is not set in the configuration files, but is
manipulated by the Interchange daemon while it is runnning.

found in ln 172 (or nearby):
[if scratchd mstatus eq success]
[tmp name="charge_succeed"][scratch order_id][/tmp]
[else]
[tmp name="charge_succeed"][charge route="[var MV_PAYMENT_MODE]" amount="[scratch \
\
\
tmp_remaining]" order_id="[value mv_transaction_id]"][/tmp]
[/else]
[/if]
and change [var MV_PAYMENT_MODE] above to [value mv_payment_route] if you \
\
\
want to use Paypal or similar in conjunction with this
Also add this line just after '&final = yes' near the end of the credit_card \
\
section of etc/profiles.order:
&set=mv_payment_route hsbc if you change [var MV_PAYMENT_MODE] as above
If run from some sort of terminal this will also make refunds or send funds to a specified
credit card.

8. When running a card through 3DSecure, the route is run twice: firstly \
to Sagepay who check whether or
not the card is part of 3DSecure - if it is they send the customer to the bank's authentication page
and upon returning from that the route must be run a second time to send \
the authentication results to
Sagepay. The second run is initiated from the 'ord/tdsreturn' page, not \
from etc/log_transaction as it normally
would be. To handle this change to the normal system flow you need to alter \
log_transaction to make the
call to the payment module conditional,ie, wrap the following code around \
the "[charge route...]" call
found in ln 172 (or nearby):
[if scratchd mstatus eq success]
[tmp name="charge_succeed"][scratch order_id][/tmp]
[else]
[tmp name="charge_succeed"][charge route="[var MV_PAYMENT_MODE]" amount="[scratch \
tmp_remaining]" order_id="[value mv_transaction_id]"][/tmp]
[/else]
[/if]
If the first call to Sagepay returns a request to send the customer to \
the 3DSecure server, then IC will
write a payment route error to the error log prior to sending the customer \
there. This error stops the

[elsif variable MV_PAYMENT_MODE]
to
[elsif value mv_order_profile =~ /worldpay/] add an OR if required
eg [elsif value mv_order_profile =~ /googlecheckout|worldpay/]
Then in the [calc] block immediately below insert this line:
undef $Session->{payment_result}{MStatus};
Within the same section change the following two instances of
[var MV_PAYMENT_MODE] to [value mv_payment_route]
10. Create a callback page in /pages called wpcallback.html or any name you prefer, set this page in
the Worldpay admin panel, the module also supports dynamic callback pages \
where different catalogs can
have different callback pages, if using this the callpage URL must be set \
in the route in catalog.cfg as

In etc/log_transction, immediately after the
[elsif variable MV_PAYMENT_MODE]
[calc]
insert this line:
undef $Session->{payment_result}{MStatus};
and leave
[elsif variable MV_PAYMENT_MODE]
as set (contrary to previous revisions of this document) but within the \
same section change the following
two instances of [var MV_PAYMENT_MODE] to [value mv_payment_route]. In \
particular, the setting inside the
[charge route="..] line will specify which payment processor is used for \
each particular case, and you
need to further modify this line so that it ends up like this:
[tmp name="charge_succeed"][charge route="[value mv_payment_route]" pprequest="dorequest" \
amount="[scratch tmp_remaining]" order_id="[value mv_transaction_id]"][/tmp]
If the value of 'mv_payment_route' is set to 'paypalexpress', then this \
is the one that is run. It is only

NOTES

AVAILABILITY

SOURCE

&set=psp Paypal
&set=mv_payment_route paypalexpress
&final = yes
&setcheck = payment_method paypalexpress
__END__
or, if you want to use Paypal as a 'Buy now' button without taking any \
customer details, then omit the
__COMMON_ORDER_PROFILE__ and the two 'email=...' lines above.
Within the 'credit_card' section of etc/profiles.order leave "MV_PAYMENT_MODE" as set,
and add
&set=psp __MV_PAYMENT_PSP__
&set=mv_payment_route authorizenet
(or your preferred gateway instead of authorizenet) as the last entries in the section.
NB: if you are taking offline payments then do not set mv_payment_route \
here, but instead set in the body
of the 'Buy now' button "mv_payment_route=offlinepayment

AUTHORS

SEE ALSO

Name

SYNOPSIS

DESCRIPTION

This variable contains relative, system-wide path of the previous page served,
without the suffix.
The variable is not set in the configuration files, but is
manipulated by the Interchange daemon while it is runnning.

AUTHORS

SEE ALSO

Name

SYNOPSIS

DESCRIPTION

This variable specifies the default DSN to be used in
SQL database connections.

VARIABLE TYPE

Catalog variable

EXAMPLES

Example: Setting SQLDSN for Postgres

Variable SQLDSN dbi:Pg:database=MYDBNAME

Example: Setting SQLDSN for MySQL

Variable SQLDSN dbi:mysql:database=MYDBNAME

NOTES

No magic is happening here, mind you. Your "template", the demo catalog,
or some piece of code must — at some point — refer to the
SQLDSN variable explicitly. Interchange does not somehow do this by itself.

AVAILABILITY

SOURCE

To aggregate by 1, use .999999.
=item cache_table
Set to the name of a table (default ups_cache) which can cache the
calls so repeated calls for the same values will not require repeated
calls to UPS.
Table needs to be set up with:
Database ups_cache ship/ups_cache.txt __SQLDSN__
Database ups_cache AUTO_SEQUENCE ups_cache_seq
Database ups_cache DEFAULT_TYPE varchar(12)
Database ups_cache INDEX weight origin zip shipmode country

$table and $column or $opt->{meta}
or last METALOOK;
## We get a metarecord directly, though why it would be here
## and not in options I don't know
if($opt->{meta} and ref($opt->{meta}) eq 'HASH') {
$record = $opt->{meta};
last METALOOK;
}
$mtab = $opt->{meta_table} || $::Variable->{UI_META_TABLE} || 'mv_metadata'
or last METALOOK;
my $meta = Vend::Data::database_exists_ref($mtab)
or do {
::logError("non-existent meta table: %s", $mtab);

value in absence of ZIP. No default -- will return 0 and error if
no zip.
=item default_country
The country code to use if none supplied -- for defaulting shipping to some
value in absence of country. Default US.
=item aggregate
If 1, aggregates by a call to weight=150 (or $Variable->{UPS_QUERY_MODULO}).
Multiplies that times number necessary, then runs a call for the
remainder. In other words:
[ups-query weight=400 mode=GNDCOM aggregate=1]

AUTHORS

SEE ALSO

Name

VISIT_TIMEOUT — time after which user request is treated as new visit

SYNOPSIS

{ seconds }

DESCRIPTION

This variable specifies the minimal time required between
two user requests, for the next request to be treated as the beginning
of a new user visit (and not as part of the current series of requests).