&charge=PRI
or
[charge mode=PRI param1=value1 param2=value2]
Net::SSLeay
or
LWP::UserAgent and Crypt::SSLeay
Only one of these need be present and working.
The Vend::Payment::PRI module implements the PRI() routine for using Payment Resources International payment services with Interchange. It is compatible on a call level with the other Interchange payment modules.
To enable this module, place this directive in "interchange.cfg":
Require module Vend::Payment::PRI
This must be in interchange.cfg or a file included from it.
NOTE: Make sure CreditCardAuto is off (default in Interchange demos).
The mode can be named anything, but the "gateway" parameter must be set to "PRI". 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 PRI
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=PRI id=YourPRIID]
or
Route PRI id YourPRIID
or with only PRI as a payment provider
Variable MV_PAYMENT_ID YourPRIID
A fully valid catalog.cfg entry to work with the standard demo would be:
Variable MV_PAYMENT_MODE "__MV_PAYMENT_MODE__"
Route PRI id "__PRI_ID__"
Route PRI regkey "__PRI_REGKEY__"
Route PRI test_id "__PRI_TEST_ID__"
Route PRI test_regkey "__PRI_TEST_REGKEY__"
Route PRI test_mode "__PRI_TEST_MODE__"
Route PRI refid_mode "__PRI_REFID_MODE__"
A fully valid variable.txt entry to work with the PRI module would be:
MV_PAYMENT_MODE PRI Payment
PRI_ID your_pri_id Payment
PRI_REGKEY your_pri_regkey Payment
PRI_TEST_ID your_pri_test_id Payment
PRI_TEST_REGKEY your_pri_test_regkey Payment
PRI_TEST_MODE 1 Payment
PRI_REFID_MODE 1 Payment
The active settings are:
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.
3. Anything other than a 1 or 2 instructs interchange to generate a unique
number from the unix date command and use that. The number format is Day of
year, Hours, Minutes, Seconds. Example for Jan 1, at 1:00:30 is 001130030.
Testing has 3 modes. (1,2,3) (live mode is 0) You set the mode with the PRI_TEST_MODE variable in variable.txt or directly in your catalog.cfg file. The modes are as follows.
1) Use PRI_TEST_ID and PRI_TEST_REGKEY values. Send information to PRI and receive result from PRI. To generate errors in this mode, simply enter invalid data and PRI should reject it with an error.
2) Generate a declined order internally. Does not send data to PRI. This mode is convenient if you want to do some testing and do not want to send any data to PRI. It's also a good way to track down errors.
3) Generate a successful sale internally. Does not send data to PRI. This mode is convenient if you want to see if everything works before sending test data to PRI.
A good way to test this module is to set PRI_TEST_MODE to 3, then 2, then 1, then 0 and make sure your catalog handles all situations correctly.
https://webservices.primerchants.com/billing/TransactionCentral/processCC.asp?
At this time, this is the only URL supported by this PRI module
If nothing works:
Require module Vend::Payment::PRI
perl -MNet::SSLeay -e 'print "It works\n"'
or
perl -MLWP::UserAgent -MCrypt::SSLeay -e 'print "It works\n"'
If either one prints "It works." and returns to the prompt you should be OK (presuming they are in working order otherwise).
<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.
There is actually nothing *in* Vend::Payment::PRI. It changes packages to Vend::Payment and places things there.
Originally developed by New York Connect Net (http://nyct.net) Michael Bacarella <mbac@nyct.net>
Modified for GetCareer.com by Slipstream.com by Troy Davis <troy@slipstream.com>
LWP/Crypt::SSLeay interface code by Matthew Schick, <mschick@brightredproductions.com>.
Interchange implementation by Mike Heins.
PRI modification by Marty Tennison
05-24-2004 - Version 1.0
09-06-2004 -.Version 1.1
Added testing mode support. Changed default refid to mode 2. Fixed bug
where PRI.pm would not recognize a successful transaction with a mix of
digits and letters. Now checks for "Declined", <space> or
<null> to determine declined transaction, all others succeed. Cleaned
up some code.