.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Vend::Payment::PRI 3pm" .TH Vend::Payment::PRI 3pm "2016-08-31" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Vend::Payment::PRI \- Interchange PRI Support .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& &charge=PRI \& \& or \& \& [charge mode=PRI param1=value1 param2=value2] .Ve .SH "PREREQUISITES" .IX Header "PREREQUISITES" .Vb 1 \& Net::SSLeay \& \& or \& \& LWP::UserAgent and Crypt::SSLeay .Ve .PP Only one of these need be present and working. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Vend::Payment::PRI module implements the \s-1\fIPRI\s0()\fR routine for using Payment Resources International payment services with Interchange. It is compatible on a call level with the other Interchange payment modules. .PP To enable this module, place this directive in \f(CW\*(C`interchange.cfg\*(C'\fR: .PP .Vb 1 \& Require module Vend::Payment::PRI .Ve .PP This \fImust\fR be in interchange.cfg or a file included from it. .PP \&\s-1NOTE:\s0 Make sure CreditCardAuto is off (default in Interchange demos). .PP The mode can be named anything, but the \f(CW\*(C`gateway\*(C'\fR parameter must be set to \f(CW\*(C`PRI\*(C'\fR. To make it the default payment gateway for all credit card transactions in a specific catalog, you can set in \f(CW\*(C`catalog.cfg\*(C'\fR: .PP .Vb 1 \& Variable MV_PAYMENT_MODE PRI .Ve .PP 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 \f(CW\*(C`id\*(C'\fR parameter would be specified by: .PP .Vb 1 \& [charge mode=PRI id=YourPRIID] .Ve .PP or .PP .Vb 1 \& Route PRI id YourPRIID .Ve .PP or with only \s-1PRI\s0 as a payment provider .PP .Vb 1 \& Variable MV_PAYMENT_ID YourPRIID .Ve .PP A fully valid catalog.cfg entry to work with the standard demo would be: .PP .Vb 7 \& 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_\|_" .Ve .PP A fully valid variable.txt entry to work with the \s-1PRI\s0 module would be: .PP .Vb 7 \& 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 .Ve .PP The active settings are: .IP "id" 4 .IX Item "id" \&\s-1PRI\s0 will supply you with both a test id and production id. Enter both of these numbers into the the variables above. You do not need your production id to test. .IP "regkey" 4 .IX Item "regkey" \&\s-1PRI\s0 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. .IP "refid" 4 .IX Item "refid" The \s-1PRI\s0 interface allows (requires) a field called \s-1REFID. \s0 This field is stored along with the transaction on the \s-1PRI\s0 server and allows your to do quick searches for transactions if this number has meaning. There are three possible values for the \s-1PRI_REFID_MODE\s0 variable. 1,2 or any other character or null. .Sp .Vb 3 \& 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. .Ve .IP "transaction" 4 .IX Item "transaction" At this time the \s-1PRI\s0 payment module only processes transactions of type \s-1SALE.\s0 .IP "test" 4 .IX Item "test" Testing with \s-1PRI\s0 is straight forward. At this time (2004\-05\-15), \s-1PRI\s0 uses the same server for both development and production. The only difference is the account used. Some accounts are flagged as \s-1TEST\s0 accounts and others are live. When you first sign up with \s-1PRI\s0 they will supply you a test account and test Registration Key to use. Enter those numbers in the \s-1PRI_ID, PRI_REGKEY \s0(production) and \s-1PRI_TEST_ID, PRI_TEST_REGKEY \s0(test) variables. Set the \s-1PRI_TEST_MODE\s0 to a value of 1,2 or 3 then do your testing. Once everything is working correctly, simply set \s-1PRI_TEST_MODE\s0 to 0 and restart interchange. Your now live. .Sp Testing has 3 modes. (1,2,3) (live mode is 0) You set the mode with the \s-1PRI_TEST_MODE\s0 variable in variable.txt or directly in your catalog.cfg file. The modes are as follows. .Sp 1) Use \s-1PRI_TEST_ID\s0 and \s-1PRI_TEST_REGKEY\s0 values. Send information to \s-1PRI\s0 and receive result from \s-1PRI. \s0 To generate errors in this mode, simply enter invalid data and \s-1PRI\s0 should reject it with an error. .Sp 2) Generate a declined order internally. Does not send data to \s-1PRI. \s0 This mode is convenient if you want to do some testing and do not want to send any data to \s-1PRI. \s0 It's also a good way to track down errors. .Sp 3) Generate a successful sale internally. Does not send data to \s-1PRI.\s0 This mode is convenient if you want to see if everything works before sending test data to \s-1PRI.\s0 .Sp A good way to test this module is to set \s-1PRI_TEST_MODE\s0 to 3, then 2, then 1, then 0 and make sure your catalog handles all situations correctly. .IP "generate_error" 4 .IX Item "generate_error" To generate errors in test mode (while using your test \s-1ID\s0 and regkey) simply enter transactions with bad data and see what happens. \s-1PRI\s0 will supply you with a list of test credit card numbers and amounts that they are good for. .IP "submit_url" 4 .IX Item "submit_url" \&\s-1PRI\s0 uses different URLs depending on what type of transaction you are requesting, Sale, Recurring, Void etc.. The default \s-1URL\s0 for single sale transactions is .Sp .Vb 1 \& https://webservices.primerchants.com/billing/TransactionCentral/processCC.asp? .Ve .Sp At this time, this is the only \s-1URL\s0 supported by this \s-1PRI\s0 module .SS "Troubleshooting" .IX Subsection "Troubleshooting" If nothing works: .IP "\(bu" 4 Make sure you \*(L"Require\*(R"d the module in interchange.cfg: .Sp .Vb 1 \& Require module Vend::Payment::PRI .Ve .IP "\(bu" 4 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: .Sp .Vb 1 \& perl \-MNet::SSLeay \-e \*(Aqprint "It works\en"\*(Aq .Ve .Sp or .Sp .Vb 1 \& perl \-MLWP::UserAgent \-MCrypt::SSLeay \-e \*(Aqprint "It works\en"\*(Aq .Ve .Sp If either one prints \*(L"It works.\*(R" and returns to the prompt you should be \s-1OK \&\s0(presuming they are in working order otherwise). .IP "\(bu" 4 Check the error logs, both catalog and global. .IP "\(bu" 4 Make sure you set your account \s-1ID\s0 properly. .IP "\(bu" 4 Try an order, then put this code in a page: .Sp .Vb 8 \& \& [calc] \& my $string = $Tag\->uneval( { ref => $Session\->{payment_result} }); \& $string =~ s/{/{\en/; \& $string =~ s/,/,\en/g; \& return $string; \& [/calc] \& .Ve .Sp That should show what happened. .IP "\(bu" 4 If all else fails, consultants are available to help with integration for a fee. See http://www.icdevgroup.org/ .SH "BUGS" .IX Header "BUGS" There is actually nothing *in* Vend::Payment::PRI. It changes packages to Vend::Payment and places things there. .SH "AUTHORS" .IX Header "AUTHORS" Originally developed by New York Connect Net (http://nyct.net) Michael Bacarella .PP Modified for GetCareer.com by Slipstream.com by Troy Davis .PP LWP/Crypt::SSLeay interface code by Matthew Schick, . .PP Interchange implementation by Mike Heins. .PP \&\s-1PRI\s0 modification by Marty Tennison .SH "VERSION HISTORY" .IX Header "VERSION HISTORY" 05\-24\-2004 \- Version 1.0 .PP 09\-06\-2004 \-.Version 1.1 Added testing mode support. Changed default refid to mode 2. Fixed bug where \s-1PRI\s0.pm would not recognize a successful transaction with a mix of digits and letters. Now checks for \*(L"Declined\*(R", or to determine declined transaction, all others succeed. Cleaned up some code.