Name

MV_ORDER_COUNTER_FILE —

SYNOPSIS

DESCRIPTION

VARIABLE TYPE

Catalog variable

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

MV_ORDER_COUNTER_FILE is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Payment/PRI.pm
Line 124 (context shows lines 114-128)


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

Source: lib/Vend/Payment/PRI.pm
Line 365 (context shows lines 355-369 in PRI():316)

  $transtype = $type_map{$transtype};
}

if ( ! $amount ) {
  $amount = Vend::Interpolate::total_cost();
  $amount = Vend::Util::round_to_frac_digits($amount,$precision);
}

# figure out what refid should be
if ( $opt->{refid_mode} == 1 ) {
  my $cfn = $Variable->{MV_ORDER_COUNTER_FILE} || 'etc/order.number';
  $new_order_number = $Tag->file($cfn);
  $new_order_number =~ s/.*\n([A-Za-z0-9]+).*$/$1/s;
  ++$new_order_number;
  $refid = $new_order_number;

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!