1 package Business::OnlinePayment::PPIPayMover::CreditCardRequest;
\r
5 use Business::OnlinePayment::PPIPayMover::TransactionRequest;
\r
6 use Business::OnlinePayment::PPIPayMover::CreditCardResponse;
\r
7 use Business::OnlinePayment::PPIPayMover::AdditionalField;
\r
8 use Business::OnlinePayment::PPIPayMover::constants;
\r
9 use Business::OnlinePayment::PPIPayMover::CountryCodes;
\r
10 use Business::OnlinePayment::PPIPayMover::URLEncoder;
\r
12 @ISA = qw(Business::OnlinePayment::PPIPayMover::TransactionRequest);
\r
15 #default constructor
\r
18 my $self = $class->SUPER::new();
\r
20 # Misc identification fields
\r
21 $self->{strCartridgeType} = ""; # v1.5
\r
22 $self->{strEcommerceIndicator} = ""; # v1.5
\r
24 # credit card fields.
\r
26 $self->{strCreditCardNumber} = "";
\r
27 $self->{strCreditCardVerificationNumber} = ""; # v1.5
\r
28 $self->{strAVSCode} = ""; # v1.5
\r
29 $self->{strExpireMonth} = "";
\r
30 $self->{strExpireYear} = "";
\r
31 $self->{strChargeType} = "";
\r
32 $self->{strChargeTotal} = "";
\r
33 $self->{dChargeTotal} = -1.0;
\r
34 $self->{strCardBrand} = "";
\r
35 $self->{strCurrency} = "";
\r
36 $self->{strOrderId} = "";
\r
37 $self->{strBankApprovalCode} = ""; # Required if chargetype is FORCE_AUTH or FORCE_SALE
\r
38 $self->{strDuplicateCheck} = ""; #v1.7.1
\r
39 $self->{strReferenceId} = ""; # Required if chargetype is CAPTURE, QUERY_CREDIT, QUERY_PAYMENT or ADJUSTMENT
\r
40 $self->{strOrderDescription} = "";
\r
41 $self->{strOrderUserId} = "";
\r
42 $self->{strTaxAmount} = "";
\r
43 $self->{dTaxAmount} = -1.0;
\r
44 $self->{strShippingCharge} = "";
\r
45 $self->{dShippingCharge} = -1.0;
\r
47 # Billing info fields ...
\r
49 $self->{strBillFirstName} = "";
\r
50 $self->{strBillLastName} = "";
\r
51 $self->{strBillMiddleName} = "";
\r
52 $self->{strBillCustomerTitle} = "";
\r
53 $self->{strBillCompany} = "";
\r
54 $self->{strBillAddressOne} = "";
\r
55 $self->{strBillAddressTwo} = "";
\r
56 $self->{strBillCity} = "";
\r
57 $self->{strBillStateOrProvince} = "";
\r
58 $self->{strBillPostalCode} = "";
\r
59 $self->{strBillCountryCode} = "";
\r
60 $self->{strBillEmail} = "";
\r
61 $self->{strBillPhone} = "";
\r
62 $self->{strBillFax} = "";
\r
63 $self->{strBillNote} = "";
\r
65 # Shipping info fields default values.
\r
67 $self->{strShipFirstName} = "";
\r
68 $self->{strShipLastName} = "";
\r
69 $self->{strShipMiddleName} = "";
\r
70 $self->{strShipCustomerTitle} = "";
\r
71 $self->{strShipCompany} = "";
\r
72 $self->{strShipAddressOne} = "";
\r
73 $self->{strShipAddressTwo} = "";
\r
74 $self->{strShipCity} = "";
\r
75 $self->{strShipStateOrProvince} = "";
\r
76 $self->{strShipPostalCode} = "";
\r
77 $self->{strShipCountryCode} = "";
\r
78 $self->{strShipEmail} = "";
\r
79 $self->{strShipPhone} = "";
\r
80 $self->{strShipFax} = "";
\r
81 $self->{strShipNote} = "";
\r
83 # Authentication fields
\r
84 $self->{strAuthenticationTransactionId} = "";
\r
85 $self->{strAuthenticationPayload} = "";
\r
86 $self->{boolSuccessOnAuthenticationInconclusive} = "";
\r
90 $self->{strBuyerCode} = "";
\r
91 $self->{strCAVV} = "";
\r
92 $self->{strCustomerIPAddress} = "";
\r
93 $self->{strPurchaseOrderNumber} = "";
\r
94 $self->{dStateTax} = -1.0;
\r
95 $self->{strTrack1} = "";
\r
96 $self->{strTrack2} = "";
\r
97 $self->{strXID} = "";
\r
98 $self->{boolTaxExempt} = "";
\r
99 $self->{strInvoiceNumber} = "";
\r
102 $self->{strIndustry} = "";
\r
103 $self->{strFolioNumber} = "";
\r
105 $self->{boolChargeTotalIncludesRestaurant} = "";
\r
106 $self->{boolChargeTotalIncludesGiftshop} = "";
\r
107 $self->{boolChargeTotalIncludesMinibar} = "";
\r
108 $self->{boolChargeTotalIncludesPhone} = "";
\r
109 $self->{boolChargeTotalIncludesLaundry} = "";
\r
110 $self->{boolChargeTotalIncludesOther} = "";
\r
112 $self->{dServiceRate} = -1.0;
\r
113 $self->{strServiceRate} = "";
\r
114 $self->{intServiceEndDay} = "";
\r
115 $self->{intServiceEndMonth} = "";
\r
116 $self->{intServiceEndYear} = "";
\r
117 $self->{intServiceStartDay} = "";
\r
118 $self->{intServiceStartMonth} = "";
\r
119 $self->{intServiceStartYear} = "";
\r
120 $self->{boolServiceNoShow} = "";
\r
128 # * Set the value of the cartridge type.
\r
131 sub SetCartridgeType {
\r
133 my $cartType = shift; # take one string arguement to get cartridgeType
\r
134 if (!defined($cartType)) {
\r
135 $self->{strError} = "Cartridge type is undefined.";
\r
138 if ($cartType eq ""){
\r
139 $self->{strError} = "Invalid cartridge type.";
\r
142 $self->{strCartridgeType} = $cartType;
\r
143 return CCR_NO_ERROR;
\r
148 # * Set the value of the Ecommerce Indicator number.
\r
151 sub SetEcommerceIndicator {
\r
153 my $ecommerceIndicator = shift; # take one string arguement to get EcommerceIndicator
\r
154 if (!defined($ecommerceIndicator)) {
\r
155 $self->{strError} = "Ecommerce indicator is undefined.";
\r
158 if ($ecommerceIndicator eq ""){
\r
159 $self->{strError} = "Invalid ecommerce indicator.";
\r
162 $self->{strEcommerceIndicator} = $ecommerceIndicator;
\r
163 return CCR_NO_ERROR;
\r
170 # * Set the value of the credit card number.
\r
172 # * @param creditCardNumber must be numeric characters
\r
173 # * @exception TransactionProtocolException thrown if creditCardNumber is non-numeric or the empty String.
\r
175 sub SetCreditCardNumber {
\r
177 my $ccNo = shift; # take one string arguement to get creditcard number
\r
178 if (!defined($ccNo)) {
\r
179 $self->{strError} = "Credit card number is undefined.";
\r
183 $self->{strError} = "Invalid credit card number.";
\r
186 if ($ccNo =~ /\D/) {
\r
187 $self->{strError} = "Non-numeric credit card number.";
\r
190 if ( ( length $ccNo < 13 ) || ( length $ccNo > 19 ) ) {
\r
191 $self->{strError} = "Invalid credit card number length.";
\r
194 $self->{strCreditCardNumber} = $ccNo;
\r
195 return CCR_NO_ERROR;
\r
199 # * Set the value of the credit card verification number.
\r
201 # * @param creditCardVerificationNumber must be numeric characters
\r
203 sub SetCreditCardVerificationNumber {
\r
205 my $ccVerNo = shift; # take one string arguement to get creditCardVerification number
\r
206 if (!defined($ccVerNo)) {
\r
207 $self->{strError} = "Credit card verification number is undefined.";
\r
210 if ($ccVerNo eq ""){
\r
211 $self->{strError} = "Invalid credit card verification number.";
\r
214 if ($ccVerNo =~ /\D/) {
\r
215 $self->{strError} = "Non-numeric credit card verification number.";
\r
218 $self->{strCreditCardVerificationNumber} = $ccVerNo;
\r
219 return CCR_NO_ERROR;
\r
224 # * Set the value of the credit card expiration month.
\r
226 # * @param expireMonth Must be an integer in ASCII characters in the range "1" to "12, inclusive.
\r
227 # * @exception TransactionProtocolException thrown if expireMonth is not >= 1 and <= 12.
\r
232 my $expireMonth = shift; #take one string arguement
\r
233 if (!defined($expireMonth)) {
\r
234 $self->{strError} = "Expire month is undefined.";
\r
237 if ($expireMonth eq ""){
\r
238 $self->{strError} = "Invalid expire month.";
\r
242 if ($expireMonth =~ /\D/) {
\r
243 $self->{strError} = "Invalid credit expire month (non-digit).";
\r
247 my $iExpireMonth = 1 * $expireMonth;
\r
248 if ($iExpireMonth < 1 || $iExpireMonth > 12) {
\r
249 $self->{strError} .= "Invalid expire month (not 1 through 12).";
\r
252 $self->{strExpireMonth} = $expireMonth;
\r
259 # * Set the value of the credit card expiration year.
\r
261 # * @param expireYear Must be a four-digit integer in ASCII characters. E.g. "2001".
\r
262 # * @exception TransactionProtocolException thrown if expireYear is not a four digit year.
\r
267 my $expireYear = shift; # take a string arguement
\r
268 if (!defined($expireYear)) {
\r
269 $self->{strError} = "Expire year is undefined.";
\r
272 if (length($expireYear) != 4) {
\r
273 $self->{strError} = "Invalid expire year, must be 4 numeric characters.";
\r
276 if($expireYear =~ /\D/){
\r
277 $self->{strError} = "Invalid credit expire year (non-numeric).";
\r
281 $self->{strExpireYear} = $expireYear;
\r
282 return CCR_NO_ERROR;
\r
285 # * Set the charge type.
\r
287 # * @param chargeType Must be one of the following constants: SALE, AUTH, CAPTURE, FORCE_AUTH,
\r
288 # * FORCE_SALE, VOID, QUERY_CREDIT, QUERY_PAYMENT, ADJUSTMENT or CREDIT.
\r
289 # * @exception TransactionProtocolException thrown if chargeType is not a valid charge type
\r
290 # * defined by this class.
\r
295 my $chargeType = shift; # take one string arguement
\r
297 if (!defined($chargeType)) {
\r
298 $self->{strError} = "Charge type is undefined.";
\r
301 if ($chargeType eq "") {
\r
302 $self->{strError} = "Invalid charge type";
\r
306 if (!($chargeType eq SALE || $chargeType eq AUTH ||
\r
307 $chargeType eq CAPTURE || $chargeType eq VOID ||
\r
308 $chargeType eq FORCE_AUTH || $chargeType eq FORCE_SALE ||
\r
309 $chargeType eq QUERY_PAYMENT || $chargeType eq QUERY_CREDIT ||
\r
310 $chargeType eq CLOSE_ORDER || $chargeType eq CANCEL_ORDER ||
\r
311 $chargeType eq VOID_AUTH || $chargeType eq VOID_CAPTURE ||
\r
312 $chargeType eq VOID_CREDIT || $chargeType eq CREATE_ORDER ||
\r
313 $chargeType eq CREDIT || $chargeType eq ADJUSTMENT)) {
\r
314 $self->{strError} = "Invalid charge type.";
\r
317 $self->{strChargeType} = $chargeType;
\r
318 return CCR_NO_ERROR;
\r
323 # * Set the transaction amount using a floating point value. Other amounts, such
\r
324 # * as tax amount or shipping charges, do not affect the charge total
\r
326 # * @param chargeTotal Must be a positive floating-point number.
\r
327 # * E.g. Use <i>12.34</i> to represent $12.34.
\r
328 # * @exception TransactionProtocolException thrown if chargeTotal less than zero
\r
333 my $chargeTotal = shift; # take either one string or float arguement
\r
335 if (!defined($chargeTotal)) {
\r
336 $self->{strError} = "Charge total is undefined.";
\r
340 if ( $chargeTotal !~ /^(\d+\.?\d*|\.\d+)$/ ) {
\r
341 $self->{strError} = "Non-numeric charge.";
\r
345 my $dChargeTotal = $chargeTotal * 1.0;
\r
346 if ($dChargeTotal < 0){
\r
347 $self->{strError} = "Charge total cannot be negative.";
\r
351 $self->{dChargeTotal} = $dChargeTotal;
\r
352 $self->{strChargeTotal} = "".$chargeTotal;
\r
354 return CCR_NO_ERROR;
\r
361 # * Set the transaction credit card brand.
\r
363 # * @param cardBrand Must be one of the following constants:
\r
364 # * VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, NOVA, AMEX, DINERS, EUROCARD,
\r
365 # * CARD_BRAND_1, CARD_BRAND_2, CARD_BRAND_3, CARD_BRAND_4, CARD_BRAND_5, or CARD_BRAND_6.
\r
366 # * @exception TransactionProtocolException thrown if cardBrand not one of the card brand constants
\r
367 # * defined by this class.
\r
372 my $CardBrand = shift; # take a string arguement
\r
374 if (!defined($CardBrand) || $CardBrand eq ""){
\r
375 $self->{strError} = "Blank or undefined card type.";
\r
379 if ($CardBrand ne VISA &&
\r
380 $CardBrand ne MASTERCARD &&
\r
381 $CardBrand ne AMERICAN_EXPRESS &&
\r
382 $CardBrand ne DISCOVER &&
\r
383 $CardBrand ne NOVA &&
\r
384 $CardBrand ne AMEX &&
\r
385 $CardBrand ne DINERS &&
\r
386 $CardBrand ne EUROCARD &&
\r
387 $CardBrand ne CARD_BRAND_1 &&
\r
388 $CardBrand ne CARD_BRAND_2 &&
\r
389 $CardBrand ne CARD_BRAND_3 &&
\r
390 $CardBrand ne CARD_BRAND_4 &&
\r
391 $CardBrand ne CARD_BRAND_5 &&
\r
392 $CardBrand ne CARD_BRAND_6) {
\r
393 $self->{strError} = "Invalid card brand:$CardBrand.";
\r
396 $self->{strCardBrand} = $CardBrand;
\r
397 return CCR_NO_ERROR;
\r
401 # * Set the order ID.
\r
406 my $OrderId = shift; # take a string arguement
\r
407 if (!defined($OrderId)) {
\r
408 $self->{strError} = "Order id is undefined.";
\r
411 $self->{strOrderId} = $OrderId;
\r
412 return CCR_NO_ERROR;
\r
416 # * Set the capture reference ID (used in tracking captures / deposits).
\r
417 # * This field is required if chargeType is CAPTURE.
\r
419 sub SetCaptureReferenceId
\r
422 my $CaptureReferenceId = shift; #take a string arguement
\r
423 if (!defined($CaptureReferenceId)){
\r
424 $self->{strError} = "Capture reference id is undefined.";
\r
427 $self->{strReferenceId} = $CaptureReferenceId;
\r
428 return CCR_NO_ERROR;
\r
433 # This should be used instead of SetCaptureReferenceId
\r
439 my $ReferenceId = shift; #take a string arguement
\r
440 if (!defined($ReferenceId)){
\r
441 $self->{strError} = "Reference id is undefined.";
\r
444 $self->{strReferenceId} = $ReferenceId;
\r
445 return CCR_NO_ERROR;
\r
449 # * Set a comment describing the order.
\r
451 sub SetOrderDescription
\r
454 my $OrderDescription = shift; #take a string arguement
\r
455 if (!defined($OrderDescription)) {
\r
456 $self->{strError} = "Order description is undefined.";
\r
459 $self->{strOrderDescription} = $OrderDescription;
\r
460 return CCR_NO_ERROR;
\r
465 # * Set the order's user id. The order user id is an identifier
\r
466 # * for a merchant's customer. It is not required, but may provide
\r
467 # * increased searching functionality in the merchant support center.
\r
472 my $OrderUserId = shift; # take a string arguement
\r
473 if (!defined($OrderUserId)) {
\r
474 $self->{strError} = "Order user ID is undefined.";
\r
477 $self->{strOrderUserId} = $OrderUserId;
\r
478 return CCR_NO_ERROR;
\r
482 # * Set the bank approval code (used in force sale and force auth).
\r
483 # * This field is required if chargeType is FORCE_AUTH or FORCE_SALE.
\r
485 sub SetBankApprovalCode
\r
488 my $BankApprovalCode = shift; #take a string arguement
\r
489 if (!defined($BankApprovalCode)){
\r
490 $self->{strError} = "Bank Approval Code is undefined.";
\r
493 $self->{strBankApprovalCode} = $BankApprovalCode;
\r
494 return CCR_NO_ERROR;
\r
498 # * Set the duplicate check.
\r
499 # * Possible values are CHECK, OVERRIDE, NO_CHECK
\r
501 sub SetDuplicateCheck
\r
504 my $DuplicateCheck = shift; #take a string arguement
\r
505 if (!defined($DuplicateCheck)){
\r
506 $self->{strError} = "Duplicate Check is undefined.";
\r
509 $self->{strDuplicateCheck} = $DuplicateCheck;
\r
510 return CCR_NO_ERROR;
\r
515 # * Set the tax amount using a floating point value.
\r
516 # * The tax amount is the amount of the chargeTotal that is tax.
\r
518 # * @param taxAmount Must be a positive floating-point number.
\r
519 # * E.g. Use <i>11.55</i> to represent $11.55.
\r
520 # * @exception TransactionProtocolException thrown if taxAmount less than zero
\r
525 my $TaxAmount = shift; # take a string or an integer arguement
\r
527 if (!defined($TaxAmount)) {
\r
528 $self->{strError} = "Tax amount is undefined.";
\r
531 if ( $TaxAmount !~ /^(\d+\.?\d*|\.\d+)$/ ) {
\r
532 $self->{strError} = "Non-numeric tax amount.";
\r
536 my $dTaxAmount = $TaxAmount * 1.0;
\r
537 if ($dTaxAmount < 0) {
\r
538 $self->{strError} = "Tax amount cannot be negative.";
\r
542 $self->{dTaxAmount} = $dTaxAmount;
\r
543 $self->{strTaxAmount} = "".$TaxAmount;
\r
544 return CCR_NO_ERROR;
\r
549 # * Set the shipping charge using a floating point value.
\r
550 # * The shipping charge is the amount of the chargeTotal that is shipping charges.
\r
552 # * @param shippingCharge Must be a positive floating-point number.
\r
553 # * E.g. Use <i>11.55</i> to represent $11.55.
\r
554 # * @exception TransactionProtocolException thrown if shippingCharge less than zero
\r
556 sub SetShippingCharge
\r
559 my $ShippingCharge = shift; # take a string or an integer arguement
\r
561 if (!defined($ShippingCharge)) {
\r
562 $self->{strError} = "Shipping charge is undefined.";
\r
565 if ( $ShippingCharge !~ /^(\d+\.?\d*|\.\d+)$/ ) {
\r
566 $self->{strError} = "Non-numeric shipping charge.";
\r
570 my $dShippingCharge = $ShippingCharge * 1.0;
\r
571 if ($dShippingCharge < 0.00) {
\r
572 $self->{strError} = "Shipping charge cannot be negative.";
\r
576 $self->{dShippingCharge} = $dShippingCharge;
\r
577 $self->{strShippingCharge} = "".$ShippingCharge;
\r
578 return CCR_NO_ERROR;
\r
583 # * Set the first name of the customer being billed.
\r
585 sub SetBillFirstName
\r
588 my $BillFirstName = shift; # take a string arguement
\r
589 if (!defined($BillFirstName)) {
\r
590 $self->{strError} = "Bill first name is undefined.";
\r
593 $self->{strBillFirstName} = $BillFirstName;
\r
594 return CCR_NO_ERROR;
\r
599 # * Set the last name of the customer being billed.
\r
601 sub SetBillLastName
\r
604 my $BillLastName = shift; # take a string arguement
\r
605 if (!defined($BillLastName)) {
\r
606 $self->{strError} = "Bill last name is undefined.";
\r
609 $self->{strBillLastName} = $BillLastName;
\r
610 return CCR_NO_ERROR;
\r
615 # * Set the middle name of the customer being billed.
\r
617 sub SetBillMiddleName
\r
620 my $BillMiddleName = shift; # take a string arguement
\r
621 if (!defined($BillMiddleName)) {
\r
622 $self->{strError} = "Bill middle name is undefined.";
\r
625 $self->{strBillMiddleName} = $BillMiddleName;
\r
626 return CCR_NO_ERROR;
\r
631 # * Set the title of the customer being billed, such as "Mr." or "Sales Manager".
\r
633 sub SetBillCustomerTitle
\r
636 my $BillCustomerTitle = shift; # take a string arguement
\r
637 if (!defined($BillCustomerTitle)) {
\r
638 $self->{strError} = "Bill customer title is undefined.";
\r
641 $self->{strBillCustomerTitle} = $BillCustomerTitle;
\r
642 return CCR_NO_ERROR;
\r
647 # * Set the name of the company of the customer being billed.
\r
652 my $BillCompany = shift; # take a string arguement
\r
653 if (!defined($BillCompany)) {
\r
654 $self->{strError} = "Bill company is undefined.";
\r
657 $self->{strBillCompany} = $BillCompany;
\r
658 return CCR_NO_ERROR;
\r
663 # * Set the first part of the address of the customer being billed,
\r
664 # * such as "1455 Cedar Springs Drive".
\r
666 sub SetBillAddressOne
\r
669 my $BillAddressOne = shift; # take a string arguement
\r
670 if (!defined($BillAddressOne)) {
\r
671 $self->{strError} = "Bill address one is undefined.";
\r
674 $self->{strBillAddressOne} = $BillAddressOne;
\r
675 return CCR_NO_ERROR;
\r
680 # * Set the second part of the address of the customer being billed,
\r
681 # * such as "Suite 100".
\r
683 sub SetBillAddressTwo
\r
686 my $BillAddressTwo = shift; # take a string arguement
\r
687 if (!defined($BillAddressTwo)) {
\r
688 $self->{strError} = "Bill address two is undefined.";
\r
691 $self->{strBillAddressTwo} = $BillAddressTwo;
\r
692 return CCR_NO_ERROR;
\r
697 # * Set the city of the customer being billed.
\r
702 my $BillCity = shift; # take a string arguement
\r
703 if (!defined($BillCity)) {
\r
704 $self->{strError} = "Bill city is undefined.";
\r
707 $self->{strBillCity} = $BillCity;
\r
708 return CCR_NO_ERROR;
\r
713 # * Set the state or province of the customer being billed.
\r
715 sub SetBillStateOrProvince
\r
718 my $BillStateOrProvince = shift; # take a string arguement
\r
719 if (!defined($BillStateOrProvince)) {
\r
720 $self->{strError} = "Bill state or province is undefined.";
\r
723 $self->{strBillStateOrProvince} = $BillStateOrProvince;
\r
724 return CCR_NO_ERROR;
\r
729 # * Set the postal code (or zip code) of the customer being billed.
\r
731 sub SetBillPostalCode
\r
734 my $BillPostalCode = shift; # take a string arguement
\r
735 if (!defined($BillPostalCode)) {
\r
736 $self->{strError} = "Bill postal code is undefined.";
\r
739 $self->{strBillPostalCode} = $BillPostalCode;
\r
740 return CCR_NO_ERROR;
\r
745 # * @param billCountryCode The alphabetic country code of the billing address.
\r
746 # * Must be a valid country code from ISO-3166. E.g. "CA" or "US".
\r
748 # * @see com.paygateway.CountryCodes
\r
749 # * @exception TransactionProtocolException thrown if an invalid country code is passed in
\r
751 sub SetBillCountryCode
\r
754 my $BillCountryCode = shift; # take a string arguement (either country code or country name)
\r
756 if (!defined($BillCountryCode)) {
\r
757 $self->{strError} = "Country code is undefined.";
\r
760 my $CountryCode = getCCodeFromCName($BillCountryCode);
\r
761 if (isValidCountryCode($BillCountryCode)) {
\r
762 $self->{strBillCountryCode} = $BillCountryCode;
\r
763 return CCR_NO_ERROR;
\r
765 elsif (defined($CountryCode)) {
\r
766 $self->{strBillCountryCode} = $CountryCode;
\r
767 return CCR_NO_ERROR;
\r
770 $self->{strError} = "Invalid country code for billing address.";
\r
777 # * Set the email address of the customer being billed.
\r
782 my $BillEmail = shift;
\r
783 if (!defined($BillEmail)) {
\r
784 $self->{strError} = "Bill email is undefined.";
\r
787 if ($BillEmail !~ /.+@.+\..+/ ) {
\r
788 $self->{strError} = "Invalid bill email format.";
\r
791 $self->{strBillEmail} = $BillEmail;
\r
792 return CCR_NO_ERROR;
\r
797 #* Set the phone number
\r
802 my $BillPhone = shift; # take a string arguement
\r
803 if (!defined($BillPhone)) {
\r
804 $self->{strError} = "Bill phone is undefined.";
\r
807 $self->{strBillPhone} = $BillPhone;
\r
808 return CCR_NO_ERROR;
\r
813 # * Set the facsimile number of the customer being billed.
\r
818 my $BillFax = shift;
\r
819 if (!defined($BillFax)) {
\r
820 $self->{strError} = "Bill fax is undefined";
\r
823 $self->{strBillFax} = $BillFax;
\r
824 return CCR_NO_ERROR;
\r
829 # * Set the billing note. This a comment about the billing information.
\r
834 my $BillNote = shift; #take a string arguement
\r
835 if (!defined($BillNote)) {
\r
836 $self->{strError} = "Bill note is undefined";
\r
839 $self->{strBillNote} = $BillNote;
\r
840 return CCR_NO_ERROR;
\r
845 # * Set the first name for the shipping information.
\r
847 sub SetShipFirstName
\r
850 my $ShipFirstName = shift; # take a string arguement
\r
851 if (!defined($ShipFirstName)) {
\r
852 $self->{strError} = "Ship first name is undefined";
\r
855 $self->{strShipFirstName} = $ShipFirstName;
\r
856 return CCR_NO_ERROR;
\r
861 # * Set the last name for the shipping information.
\r
863 sub SetShipLastName
\r
866 my $ShipLastName = shift; # take a string arguement
\r
867 if (!defined($ShipLastName)) {
\r
868 $self->{strError} = "Ship last is undefined.";
\r
871 $self->{strShipLastName} = $ShipLastName;
\r
872 return CCR_NO_ERROR;
\r
877 # * Set the middle name for the shipping information.
\r
879 sub SetShipMiddleName
\r
882 my $ShipMiddleName = shift; # take a string arguement
\r
884 if (!defined($ShipMiddleName)) {
\r
885 $self->{strError} = "Ship middle name is undefined.";
\r
888 $self->{strShipMiddleName} = $ShipMiddleName;
\r
889 return CCR_NO_ERROR;
\r
894 # * Set the customer title of the customer being jstrShipped to.
\r
896 sub SetShipCustomerTitle
\r
899 my $ShipCustomerTitle = shift; # take a string arguement
\r
900 if (!defined($ShipCustomerTitle)) {
\r
901 $self->{strError} = "Ship customer title is undefined.";
\r
904 $self->{strShipCustomerTitle} = $ShipCustomerTitle;
\r
905 return CCR_NO_ERROR;
\r
910 # * Set the company for the shipping information.
\r
915 my $ShipCompany = shift; # take a string arguement
\r
916 if (!defined($ShipCompany)) {
\r
917 $self->{strError} = "Ship company is undefined.";
\r
920 $self->{strShipCompany} = $ShipCompany;
\r
921 return CCR_NO_ERROR;
\r
926 # * Set the first part of the shipping address, such as
\r
927 # * "485 Bridestone Way".
\r
929 sub SetShipAddressOne
\r
932 my $ShipAddressOne = shift; # take a string arguement
\r
933 if (!defined($ShipAddressOne)) {
\r
934 $self->{strError} = "Ship address is undefined.";
\r
937 $self->{strShipAddressOne} = $ShipAddressOne;
\r
938 return CCR_NO_ERROR;
\r
943 # * Set the second part of the shipping address, such as
\r
946 sub SetShipAddressTwo
\r
949 my $ShipAddressTwo = shift; # take a string arguement
\r
950 if (!defined($ShipAddressTwo)) {
\r
951 $self->{strError} = "Ship address two is undefined.";
\r
954 $self->{strShipAddressTwo} = $ShipAddressTwo;
\r
955 return CCR_NO_ERROR;
\r
960 # * Set the city for the shipping address.
\r
965 my $ShipCity = shift; # take a string arguement
\r
966 if (!defined($ShipCity)) {
\r
967 $self->{strError} = "Ship city is undefined.";
\r
970 $self->{strShipCity} = $ShipCity;
\r
971 return CCR_NO_ERROR;
\r
976 # * Set the state or provicnce for the shipping address.
\r
978 sub SetShipStateOrProvince
\r
981 my $ShipStateOrProvince = shift; # take a string arguement
\r
982 if (!defined($ShipStateOrProvince)) {
\r
983 $self->{strError} = "Ship state or province is undefined.";
\r
986 $self->{strShipStateOrProvince} = $ShipStateOrProvince;
\r
987 return CCR_NO_ERROR;
\r
992 # * Set the postal code (or zip code) for the shipping address.
\r
994 sub SetShipPostalCode
\r
997 my $ShipPostalCode = shift; # take a string arguement
\r
998 if (!defined($ShipPostalCode)) {
\r
999 $self->{strError} = "Ship postal code is undefined.";
\r
1002 $self->{strShipPostalCode} = $ShipPostalCode;
\r
1003 return CCR_NO_ERROR;
\r
1007 # * Set the shipping country code.
\r
1008 # * @param shipCountryCode The alphabetic country code of the billing address.
\r
1009 # * Must be a valid country code from ISO-3166. E.g. "CA" or "US".
\r
1011 # * @see com.paygateway.CountryCodes
\r
1012 # * @exception TransactionProtocolException thrown if an invalid country code is passed in
\r
1014 sub SetShipCountryCode
\r
1017 my $ShipCountryCode = shift; # take a string arguement (either country code or country name)
\r
1019 if (!defined($ShipCountryCode)) {
\r
1020 $self->{strError} = "Ship country code is undefined.";
\r
1023 my $CountryCode = getCCodeFromCName($ShipCountryCode) ;
\r
1024 if (isValidCountryCode($ShipCountryCode)) {
\r
1025 $self->{strShipCountryCode} = $ShipCountryCode;
\r
1026 return CCR_NO_ERROR;
\r
1028 elsif (defined($CountryCode)) {
\r
1029 $self->{strShipCountryCode} = $CountryCode;
\r
1030 return CCR_NO_ERROR;
\r
1033 $self->{strError} = "Invalid country code for shipping address";
\r
1040 # * Set the email address of the customer being shipped to.
\r
1045 my $ShipEmail = shift; # take a string arguement
\r
1046 if (!defined($ShipEmail)) {
\r
1047 $self->{strError} = "Ship email is undefined.";
\r
1050 $self->{strShipEmail} = $ShipEmail;
\r
1051 return CCR_NO_ERROR;
\r
1056 # * Set the phone number of the customer being shipped to.
\r
1061 my $ShipPhone = shift; # take a string arguement
\r
1062 if (!defined($ShipPhone)) {
\r
1063 $self->{strError} = "Ship phone is undefined";
\r
1066 $self->{strShipPhone} = $ShipPhone;
\r
1067 return CCR_NO_ERROR;
\r
1072 # * Set the facsimile number of the customer being shipped to.
\r
1077 my $ShipFax = shift; # take a string arguement
\r
1078 if (!defined($ShipFax)) {
\r
1079 $self->{strError} = "Ship fax is undefined";
\r
1082 $self->{strShipFax} = $ShipFax;
\r
1083 return CCR_NO_ERROR;
\r
1088 # * Set a note (comment) for the shipping information.
\r
1093 my $ShipNote = shift;
\r
1094 if (!defined($ShipNote)) {
\r
1095 $self->{strError} = "Ship note is undefined.";
\r
1098 $self->{strShipNote} = $ShipNote;
\r
1099 return CCR_NO_ERROR;
\r
1104 # * Sets the currency
\r
1109 my $Currency = shift; # take a string arguement
\r
1110 if (!defined($Currency)) {
\r
1111 $self->{strError} = "Currency is undefined.";
\r
1114 $self->{strCurrency} = $Currency;
\r
1115 return CCR_NO_ERROR;
\r
1119 # * Sets the buyer code
\r
1124 my $buyerCode = shift; # take a string arguement
\r
1125 if (!defined($buyerCode)) {
\r
1126 $self->{strError} = "Buyer code is undefined.";
\r
1129 $self->{strBuyerCode} = $buyerCode;
\r
1130 return CCR_NO_ERROR;
\r
1134 # * Sets the CAVV (for VBV transactions)
\r
1139 my $cavv = shift; # take a string arguement
\r
1140 if (!defined($cavv)) {
\r
1141 $self->{strError} = "CAVV is undefined.";
\r
1144 $self->{strCAVV} = $cavv;
\r
1145 return CCR_NO_ERROR;
\r
1149 # * Sets the Customer IP Address
\r
1151 sub SetCustomerIPAddress
\r
1154 my $ip = shift; # take a string arguement
\r
1155 if (!defined($ip)) {
\r
1156 $self->{strError} = "Customer IP address is undefined.";
\r
1159 $self->{strCustomerIPAddress} = $ip;
\r
1160 return CCR_NO_ERROR;
\r
1164 # * Sets the Order Customer ID
\r
1166 sub SetOrderCustomerId
\r
1169 my $orderCustomerID = shift; # take a string arguement
\r
1170 if (!defined($orderCustomerID)) {
\r
1171 $self->{strError} = "Order customer ID is undefined.";
\r
1174 $self->{strOrderCustomerID} = $orderCustomerID;
\r
1175 return CCR_NO_ERROR;
\r
1179 # * Sets the purchase order number
\r
1181 sub SetPurchaseOrderNumber
\r
1184 my $purchaseOrderNumber = shift; # take a string arguement
\r
1185 if (!defined($purchaseOrderNumber)) {
\r
1186 $self->{strError} = "Purchase order number is undefined.";
\r
1189 $self->{strPurchaseOrderNumber} = $purchaseOrderNumber;
\r
1190 return CCR_NO_ERROR;
\r
1194 # * Sets the state tax
\r
1199 my $stateTax = shift; # take a string arguement
\r
1200 if (!defined($stateTax)) {
\r
1201 $self->{strError} = "State tax is undefined.";
\r
1205 if ( $stateTax !~ /^(\d+\.?\d*|\.\d+)$/ ) {
\r
1206 $self->{strError} = "Non-numeric state tax amount.";
\r
1210 $stateTax = $stateTax * 1.0;
\r
1211 if ($stateTax < 0) {
\r
1212 $self->{strError} = "State tax cannot be negative.";
\r
1216 $self->{dStateTax} = $stateTax;
\r
1217 return CCR_NO_ERROR;
\r
1221 # * Sets the track 1 data
\r
1226 my $track1 = shift; # take a string arguement
\r
1227 if (!defined($track1)) {
\r
1228 $self->{strError} = "Track 1 is undefined.";
\r
1231 $self->{strTrack1} = $track1;
\r
1232 return CCR_NO_ERROR;
\r
1236 # * Sets the track 2 data
\r
1241 my $track2 = shift; # take a string arguement
\r
1242 if (!defined($track2)) {
\r
1243 $self->{strError} = "Track 2 is undefined.";
\r
1246 $self->{strTrack2} = $track2;
\r
1247 return CCR_NO_ERROR;
\r
1251 # * Sets the transaction condition code
\r
1253 sub SetTransactionConditionCode
\r
1256 my $tcc = shift; # take a string arguement
\r
1257 if (!defined($tcc)) {
\r
1258 $self->{strError} = "Transaction condition code is undefined.";
\r
1261 $self->{strTransactionConditionCode} = $tcc;
\r
1262 return CCR_NO_ERROR;
\r
1271 my $xid = shift; # take a string arguement
\r
1272 if (!defined($xid)) {
\r
1273 $self->{strError} = "XID is undefined.";
\r
1276 $self->{strXID} = $xid;
\r
1277 return CCR_NO_ERROR;
\r
1281 # * Sets tax exempt flag
\r
1286 my $taxExempt = shift; # take a string arguement
\r
1287 if (!defined($taxExempt)) {
\r
1288 $self->{strError} = "Tax exempt flag is undefined.";
\r
1291 $self->{boolTaxExempt} = $taxExempt;
\r
1292 return CCR_NO_ERROR;
\r
1296 # * Sets invoice number
\r
1298 sub SetInvoiceNumber
\r
1301 my $invoiceNumber = shift; # take a string arguement
\r
1302 if (!defined($invoiceNumber)) {
\r
1303 $self->{strError} = "Invoice number is undefined.";
\r
1306 $self->{strInvoiceNumber} = $invoiceNumber;
\r
1307 return CCR_NO_ERROR;
\r
1311 # * Sets the Authentication Transaction ID
\r
1313 # * Used in Payer Authentication transaction type
\r
1315 sub SetAuthenticationTransactionId
\r
1318 my $authenticationTransactionId = shift; # take a string arguement
\r
1319 if (!defined($authenticationTransactionId)) {
\r
1320 $self->{strError} = "Authentication Transaction ID is undefined.";
\r
1323 $self->{strAuthenticationTransactionId} = $authenticationTransactionId;
\r
1324 return CCR_NO_ERROR;
\r
1328 # * Sets the Authentication Payload
\r
1330 # * Used in Payer Authentication transaction type
\r
1332 sub SetAuthenticationPayload
\r
1335 my $authenticationPayload = shift; # take a string arguement
\r
1336 if (!defined($authenticationPayload)) {
\r
1337 $self->{strError} = "Authentication Payload is undefined.";
\r
1340 $self->{strAuthenticationPayload} = $authenticationPayload;
\r
1341 return CCR_NO_ERROR;
\r
1345 # * Sets the Success On Authentication Inconclusive
\r
1347 # * Used in Payer Authentication transaction type
\r
1349 sub SetDoTransactionOnAuthenticationInconclusive
\r
1352 my $successOnAuthenticationInconclusive = shift; # take a string arguement
\r
1353 if (!defined($successOnAuthenticationInconclusive)) {
\r
1354 $self->{strError} = "Success on authentication inconclusive is undefined.";
\r
1357 $self->{boolSuccessOnAuthenticationInconclusive} = $successOnAuthenticationInconclusive;
\r
1358 return CCR_NO_ERROR;
\r
1363 # * Set the Industry type.
\r
1365 # * @param industry Must be one of the following constants: DIRECT_MARKETING, RETAIL, LODGING, RESTAURANT.
\r
1366 # * @exception TransactionProtocolException thrown if industry is not a valid charge type
\r
1367 # * defined by this class.
\r
1372 my $industry = shift; # take one string arguement
\r
1374 if (!defined($industry)) {
\r
1375 $self->{strError} = "Industry is undefined.";
\r
1378 if ($industry eq "") {
\r
1379 $self->{strError} = "Invalid industry";
\r
1383 if (!($industry eq DIRECT_MARKETING ||
\r
1384 $industry eq RETAIL ||
\r
1385 $industry eq LODGING ||
\r
1386 $industry eq RESTAURANT )) {
\r
1387 $self->{strError} = "Invalid industry.";
\r
1390 $self->{strIndustry} = $industry;
\r
1391 return CCR_NO_ERROR;
\r
1396 # * Sets folio number
\r
1398 sub SetFolioNumber
\r
1401 my $folioNumber = shift; # take a string arguement
\r
1402 if (!defined($folioNumber)) {
\r
1403 $self->{strError} = "Folio number is undefined.";
\r
1406 $self->{strFolioNumber} = $folioNumber;
\r
1407 return CCR_NO_ERROR;
\r
1413 # * Set the service rate using a floating point value.
\r
1415 # * @param ServiceRate Must be a positive floating-point number.
\r
1416 # * E.g. Use <i>11.55</i> to represent $11.55.
\r
1417 # * @exception TransactionProtocolException thrown if ServiceRate less than zero
\r
1419 sub SetServiceRate
\r
1422 my $ServiceRate = shift; # take a string or an integer arguement
\r
1424 if (!defined($ServiceRate)) {
\r
1425 $self->{strError} = "Service rate is undefined.";
\r
1428 if ( $ServiceRate !~ /^(\d+\.?\d*|\.\d+)$/ ) {
\r
1429 $self->{strError} = "Non-numeric Service Rate.";
\r
1433 my $dServiceRate = $ServiceRate * 1.0;
\r
1434 if ($dServiceRate < 0) {
\r
1435 $self->{strError} = "Service rate cannot be negative.";
\r
1439 $self->{dServiceRate} = $dServiceRate;
\r
1440 $self->{strServiceRate} = "".$ServiceRate;
\r
1441 return CCR_NO_ERROR;
\r
1446 # * Set the service end day
\r
1448 sub SetServiceEndDay
\r
1451 my $serviceEndDay = shift; #take one string arguement
\r
1452 if (!defined($serviceEndDay)) {
\r
1453 $self->{strError} = "Service end day is undefined.";
\r
1456 if ($serviceEndDay eq ""){
\r
1457 $self->{strError} = "Invalid service end day.";
\r
1461 if ($serviceEndDay =~ /\D/) {
\r
1462 $self->{strError} = "Invalid service end day (non-digit).";
\r
1466 $serviceEndDay = 1 * $serviceEndDay;
\r
1467 if ($serviceEndDay < 1 || $serviceEndDay > 31) {
\r
1468 $self->{strError} .= "Invalid service end day (not 1 through 31).";
\r
1471 $self->{intServiceEndDay} = $serviceEndDay;
\r
1478 # * Set the service end month
\r
1480 sub SetServiceEndMonth
\r
1483 my $serviceEndMonth = shift; #take one string arguement
\r
1484 if (!defined($serviceEndMonth)) {
\r
1485 $self->{strError} = "Service end month is undefined.";
\r
1488 if ($serviceEndMonth eq ""){
\r
1489 $self->{strError} = "Invalid service end month.";
\r
1493 if ($serviceEndMonth =~ /\D/) {
\r
1494 $self->{strError} = "Invalid service end month (non-digit).";
\r
1498 $serviceEndMonth = 1 * $serviceEndMonth;
\r
1499 if ($serviceEndMonth < 1 || $serviceEndMonth > 12) {
\r
1500 $self->{strError} .= "Invalid service end month (not 1 through 12).";
\r
1503 $self->{intServiceEndMonth} = $serviceEndMonth;
\r
1509 # * Set the service end year
\r
1511 sub SetServiceEndYear
\r
1514 my $serviceEndYear = shift; #take one string arguement
\r
1515 if (!defined($serviceEndYear)) {
\r
1516 $self->{strError} = "Service end year is undefined.";
\r
1519 if ($serviceEndYear eq ""){
\r
1520 $self->{strError} = "Invalid service end year.";
\r
1524 if ($serviceEndYear =~ /\D/) {
\r
1525 $self->{strError} = "Invalid service end year (non-digit).";
\r
1529 $serviceEndYear = 1 * $serviceEndYear;
\r
1530 if ($serviceEndYear < 2005 || $serviceEndYear > 9999) {
\r
1531 $self->{strError} .= "Invalid service end year.";
\r
1534 $self->{intServiceEndYear} = $serviceEndYear;
\r
1541 # * Set the service start day
\r
1543 sub SetServiceStartDay
\r
1546 my $serviceStartDay = shift; #take one string arguement
\r
1547 if (!defined($serviceStartDay)) {
\r
1548 $self->{strError} = "Service start day is undefined.";
\r
1551 if ($serviceStartDay eq ""){
\r
1552 $self->{strError} = "Invalid service start day.";
\r
1556 if ($serviceStartDay =~ /\D/) {
\r
1557 $self->{strError} = "Invalid service start day (non-digit).";
\r
1561 $serviceStartDay = 1 * $serviceStartDay;
\r
1562 if ($serviceStartDay < 1 || $serviceStartDay > 31) {
\r
1563 $self->{strError} .= "Invalid service start day (not 1 through 31).";
\r
1566 $self->{intServiceStartDay} = $serviceStartDay;
\r
1573 # * Set the service start month
\r
1575 sub SetServiceStartMonth
\r
1578 my $serviceStartMonth = shift; #take one string arguement
\r
1579 if (!defined($serviceStartMonth)) {
\r
1580 $self->{strError} = "Service start month is undefined.";
\r
1583 if ($serviceStartMonth eq ""){
\r
1584 $self->{strError} = "Invalid service start month.";
\r
1588 if ($serviceStartMonth =~ /\D/) {
\r
1589 $self->{strError} = "Invalid service start month (non-digit).";
\r
1593 $serviceStartMonth = 1 * $serviceStartMonth;
\r
1594 if ($serviceStartMonth < 1 || $serviceStartMonth > 12) {
\r
1595 $self->{strError} .= "Invalid service start month (not 1 through 12).";
\r
1598 $self->{intServiceStartMonth} = $serviceStartMonth;
\r
1604 # * Set the service start year
\r
1606 sub SetServiceStartYear
\r
1609 my $serviceStartYear = shift; #take one string arguement
\r
1610 if (!defined($serviceStartYear)) {
\r
1611 $self->{strError} = "Service start year is undefined.";
\r
1614 if ($serviceStartYear eq ""){
\r
1615 $self->{strError} = "Invalid service start year.";
\r
1619 if ($serviceStartYear =~ /\D/) {
\r
1620 $self->{strError} = "Invalid service start year (non-digit).";
\r
1624 $serviceStartYear = 1 * $serviceStartYear;
\r
1625 if ($serviceStartYear < 2005 || $serviceStartYear > 9999) {
\r
1626 $self->{strError} .= "Invalid service start year.";
\r
1629 $self->{intServiceStartYear} = $serviceStartYear;
\r
1637 # * Sets the Charge Total Includes Restaurant flag
\r
1640 sub SetChargeTotalIncludesRestaurant
\r
1643 my $isChargeTotalIncludesRestaurant = shift; # take a string arguement
\r
1644 if (!defined($isChargeTotalIncludesRestaurant)) {
\r
1645 $self->{strError} = "Charge Total Includes Restaurant is undefined.";
\r
1648 $self->{boolChargeTotalIncludesRestaurant} = $isChargeTotalIncludesRestaurant;
\r
1649 return CCR_NO_ERROR;
\r
1653 # * Sets the Charge Total Includes Giftshop flag
\r
1656 sub SetChargeTotalIncludesGiftshop
\r
1659 my $isChargeTotalIncludesGiftshop = shift; # take a string arguement
\r
1660 if (!defined($isChargeTotalIncludesGiftshop)) {
\r
1661 $self->{strError} = "Charge Total Includes Giftshop is undefined.";
\r
1664 $self->{boolChargeTotalIncludesGiftshop} = $isChargeTotalIncludesGiftshop;
\r
1665 return CCR_NO_ERROR;
\r
1669 # * Sets the Charge Total Includes Minibar flag
\r
1672 sub SetChargeTotalIncludesMinibar
\r
1675 my $isChargeTotalIncludesMinibar = shift; # take a string arguement
\r
1676 if (!defined($isChargeTotalIncludesMinibar)) {
\r
1677 $self->{strError} = "Charge Total Includes Minibar is undefined.";
\r
1680 $self->{boolChargeTotalIncludesMinibar} = $isChargeTotalIncludesMinibar;
\r
1681 return CCR_NO_ERROR;
\r
1685 # * Sets the Charge Total Includes Phone flag
\r
1688 sub SetChargeTotalIncludesPhone
\r
1691 my $isChargeTotalIncludesPhone = shift; # take a string arguement
\r
1692 if (!defined($isChargeTotalIncludesPhone)) {
\r
1693 $self->{strError} = "Charge Total Includes Phone is undefined.";
\r
1696 $self->{boolChargeTotalIncludesPhone} = $isChargeTotalIncludesPhone;
\r
1697 return CCR_NO_ERROR;
\r
1701 # * Sets the Charge Total Includes Laundry flag
\r
1704 sub SetChargeTotalIncludesLaundry
\r
1707 my $isChargeTotalIncludesLaundry = shift; # take a string arguement
\r
1708 if (!defined($isChargeTotalIncludesLaundry)) {
\r
1709 $self->{strError} = "Charge Total Includes Laundry is undefined.";
\r
1712 $self->{boolChargeTotalIncludesLaundry} = $isChargeTotalIncludesLaundry;
\r
1713 return CCR_NO_ERROR;
\r
1717 # * Sets the Charge Total Includes Other flag
\r
1720 sub SetChargeTotalIncludesOther
\r
1723 my $isChargeTotalIncludesOther = shift; # take a string arguement
\r
1724 if (!defined($isChargeTotalIncludesOther)) {
\r
1725 $self->{strError} = "Charge Total Includes Other is undefined.";
\r
1728 $self->{boolChargeTotalIncludesOther} = $isChargeTotalIncludesOther;
\r
1729 return CCR_NO_ERROR;
\r
1733 # * Sets the Service No Show flag
\r
1736 sub SetServiceNoShow
\r
1739 my $isServiceNoShow = shift; # take a string arguement
\r
1740 if (!defined($isServiceNoShow)) {
\r
1741 $self->{strError} = "Service No Show is undefined.";
\r
1744 $self->{boolServiceNoShow} = $isServiceNoShow;
\r
1745 return CCR_NO_ERROR;
\r
1750 #/////////////////////////////////////////////////////////////////////////////////////////////////////
\r
1755 # * Get the cartridge type.
\r
1756 # * @returns the type of cartridge being used
\r
1758 sub GetCartridgeType
\r
1761 $self->{strCartridgeType};
\r
1765 # * Get the Ecommerce Indicator
\r
1766 # * @returns the Ecommerce Indicator
\r
1768 sub GetEcommerceIndicator
\r
1771 $self->{strEcommerceIndicator};
\r
1775 # * Get the value of the credit card number.
\r
1776 # * @see #setCreditCardNumber(JString)
\r
1777 # * @return the value of the credit card number or an empty String if the credit card number was not set
\r
1779 sub GetCreditCardNumber
\r
1782 $self->{strCreditCardNumber};
\r
1786 # * Get the value of the credit card number.
\r
1787 # * @return the value of the credit card verification number or an empty String if the credit card number was not set
\r
1789 sub GetCreditCardVerificationNumber
\r
1792 $self->{strCreditCardVerificationNumber};
\r
1796 # * Get the value of the credit card's expire year.
\r
1797 # * @see #setExpireYear(JString)
\r
1798 # * @return the String passed to setExpireYear or an empty String if the expire year was not set
\r
1803 $self->{strExpireYear};
\r
1808 # * Get the value of the credit card's expire month.
\r
1809 # * @see #setExpireMonth(String)
\r
1810 # * @return the String passed to setExpireMonth or an empty String if the expire month was not set
\r
1812 sub GetExpireMonth
\r
1815 $self->{strExpireMonth};
\r
1820 # * Get the value of the charge type. The possible values are defined
\r
1821 # * by the constants of this class documented in setChargeType(String)
\r
1822 # * The chage type indicates what action to take with this credit card
\r
1824 # * @see #setChargeType(String)
\r
1825 # * @return the String passed to setChargeType or an empty String if the charge type was not set
\r
1827 sub GetChargeType()
\r
1830 $self->{strChargeType};
\r
1835 # * Get the value of the charge total. The charge total is the amount that
\r
1836 # * will be used for this credit card transaction.
\r
1837 # * @see #setChargeTotal(double)
\r
1838 # * @see #setChargeTotal(String)
\r
1839 # * @return the value of the charge total or -1 if the charge total was not set
\r
1841 sub GetChargeTotal
\r
1844 $self->{dChargeTotal};
\r
1847 sub GetChargeTotalStr
\r
1850 $self->{strChargeTotal};
\r
1854 # * Get the value of the card brand. The card brand identifies the type
\r
1855 # * of card being used. The card brand must be one of the constants defined
\r
1856 # * by this class and documented in setCardBrand(JString)
\r
1857 # * @see #setCardBrand(JString)
\r
1858 # * @return the value of the card brand or an empty String if the card brand was not set
\r
1863 $self->{strCardBrand};
\r
1867 # * Get the value of the order id. The order id must be a unique identifier
\r
1868 # * for a paticular order.
\r
1869 # * @see #setOrderId(JString)
\r
1870 # * @return the value of the order id or an empty String if the order id was not set
\r
1875 $self->{strOrderId};
\r
1881 # * Get the value of the capture reference id. The capture reference id is the
\r
1882 # * value returned from an "AUTH" credit card transaction that must be presented
\r
1883 # * when to the "CAPTURE" for that order.
\r
1884 # * @see #setCaptureReferenceId(JString)
\r
1885 # * @return the value of the capture reference id or an empty String if the capture reference id was not set
\r
1887 sub GetCaptureReferenceId
\r
1890 $self->{strReferenceId};
\r
1894 # Get Reference Id
\r
1895 # This should be used instead of GetCaptureReferenceId
\r
1898 sub GetReferenceId
\r
1901 $self->{strReferenceId};
\r
1905 # * Get the value of the order description. The order description is a comment
\r
1906 # * that describes the order.
\r
1907 # * @see #setOrderDescription(JString)
\r
1908 # * @return the value of the order description or an empty String if the order description was not set
\r
1910 sub GetOrderDescription
\r
1913 $self->{strOrderDescription};
\r
1917 # * Get the value of the order user id. The order user id is a unique identifier
\r
1918 # * for a merchant's customer.
\r
1919 # * @see #setOrderUserId(String)
\r
1920 # * @return the value of the order user id of an empty String if order user id was not set
\r
1922 sub GetOrderUserId
\r
1925 $self->{strOrderUserId};
\r
1929 # * Get the value of the duplicate check.
\r
1930 # * Possible values are: CHECK; OVERRIDE; NO_CHECK.
\r
1931 # * @see #setDuplicateCheck(String)
\r
1932 # * @return the value of the duplicate check or an empty String if the dc was not set
\r
1934 sub GetDuplicateCheck
\r
1937 $self->{strDuplicateCheck};
\r
1942 # * Get the value of the bank approval code. The bank approval code is the
\r
1943 # * value required for a "FORCE_AUTH" or "FORCE_SALE" credit card transaction.
\r
1944 # * It is obtained offline via a phone call to the merchant's bank 'voice auth'
\r
1945 # * phone number. The card holder is not present in this type of transaction.
\r
1946 # * @see #setBankApprovalCode(String)
\r
1947 # * @return the value of the bank approval code or an empty String if the bac was not set
\r
1949 sub GetBankApprovalCode
\r
1952 $self->{strBankApprovalCode};
\r
1957 # * The tax amount is the amount of the the charge total that is tax.
\r
1958 # * @see #setTaxAmount
\r
1959 # * @see #setChargeTotal
\r
1960 # * @return value of the tax amount of -1 if the tax amount has not been set.
\r
1965 $self->{dTaxAmount};
\r
1968 sub GetTaxAmountStr
\r
1971 $self->{strTaxAmount};
\r
1976 # * The shipping charge is the amount of the charge total that is shipping charges.
\r
1977 # * @see #setShippingCharge
\r
1978 # * @see #setChargeTotal
\r
1979 # * @return value of the shipping charge or -1 if the shipping charge has not been set
\r
1981 sub GetShippingCharge
\r
1984 $self->{dShippingCharge};
\r
1987 sub GetShippingChargeStr
\r
1990 $self->{strShippingCharge};
\r
1995 # * Get the value of the first name of the customer being billed.
\r
1996 # * @see #setBillFirstName(JString)
\r
1997 # * @return the billing first name or an empty String if the billing first name was not set
\r
1999 sub GetBillFirstName
\r
2002 $self->{strBillFirstName};
\r
2007 # * Get the value of the last name of the customer being billed.
\r
2008 # * @see #setBillLastName(String)
\r
2009 # * return the billing last name or an empty String if the billing last name was not set
\r
2011 sub GetBillLastName
\r
2014 $self->{strBillLastName};
\r
2019 # * Get the value of the middle name of the customer being billed.
\r
2020 # * @see #setBillMiddleName(JString)
\r
2021 # * @return the billing middle name or an empty String if the billing middle name was not set
\r
2023 sub GetBillMiddleName
\r
2026 $self->{strBillMiddleName};
\r
2031 # * Get the value of the title of the customer being billed.
\r
2032 # * @see #setBillCustomerTitle(JString)
\r
2033 # * @return the billing customer title or an empty String if billing customer title was not set
\r
2035 sub GetBillCustomerTitle
\r
2038 $self->{strBillCustomerTitle};
\r
2042 # * Get the value of the company name of the customer being billed.
\r
2043 # * @see #setBillCompany(JString)
\r
2044 # * @return the billing company name or an empty String if the billing company name was not set
\r
2046 sub GetBillCompany
\r
2049 $self->{strBillCompany};
\r
2054 # * Get the value of the first part of the billing address.
\r
2055 # * @see #setBillAddressOne(JString)
\r
2056 # * @return the first part of the billing address or an empty String if the billing address part one was not set
\r
2058 sub GetBillAddressOne
\r
2061 $self->{strBillAddressOne};
\r
2066 # * Get the value of the second part of the billing address.
\r
2067 # * @see #setBillAddressTwo(JString)
\r
2068 # * @return the second part of the billing address or an empty String if the billing address part two was not set
\r
2070 sub GetBillAddressTwo
\r
2073 $self->{strBillAddressTwo};
\r
2078 # * Get the value of the city for the billing address.
\r
2079 # * @see #setBillCity(JString)
\r
2080 # * @return the billing address city or an empty String if the billing city was not set
\r
2085 $self->{strBillCity};
\r
2090 # * Get the value of the state or province for the billing address.
\r
2091 # * @see #setBillStateOrProvince(String)
\r
2092 # * @return the billing address state or province or an empty String if billing state or province was not set
\r
2094 sub GetBillStateOrProvince
\r
2097 $self->{strBillStateOrProvince};
\r
2102 # * Get the value of the postal code for the billing address.
\r
2103 # * @see #setBillPostalCode(String)
\r
2104 # * @return the billing address postal code or an empty String if billing postal code was not set
\r
2106 sub GetBillPostalCode
\r
2109 $self->{strBillPostalCode};
\r
2114 # * Get the value of the country for the billing address.
\r
2115 # * @see #setBillCountryCode(JString)
\r
2116 # * @return the billing country or an empty String if the billing country was not set
\r
2118 sub GetBillCountryCode
\r
2121 $self->{strBillCountryCode};
\r
2126 # * Get the value of the email address of the customer being billed.
\r
2127 # * @see #setBillEmail(JString)
\r
2128 # * @return the billing email address or an empty String if the billing email was not set
\r
2133 $self->{strBillEmail};
\r
2138 # * Get the value of the phone number of the customer being billed.
\r
2139 # * @see #setBillPhone(JString)
\r
2140 # * @return the billing phone number or an empty String if the billing phone number was not set
\r
2145 $self->{strBillPhone};
\r
2150 # * Get the value of the fax number of the customer being billed.
\r
2151 # * @see #setBillFax(JString)
\r
2152 # * @return the billing fax number or an empty String if the billing fax number was not set
\r
2157 $self->{strBillFax};
\r
2162 # * Get the value of the billing note. The billing note is an extra
\r
2163 # * comment to the billing information.
\r
2164 # * @see #setBillNote(JString)
\r
2165 # * @return the billing note or an empty String if the billing not was not set
\r
2170 $self->{strBillNote};
\r
2174 # * Get the value of the first name of the customer being shipped to.
\r
2175 # * @see #setShipFirstName(JString)
\r
2176 # * @return the shipping first name or an empty String if the shipping first name was not set
\r
2178 sub GetShipFirstName
\r
2181 $self->{strShipFirstName};
\r
2186 # * Get the value of the last name of the customer being shipped to.
\r
2187 # * @see #setShipLastName(JString)
\r
2188 # * @return the shipping last name or an empty String if the shipping last name was not set
\r
2190 sub GetShipLastName
\r
2193 $self->{strShipLastName};
\r
2198 # * Get the value of the middle name of the customer being shipped to.
\r
2199 # * @see #setShipMiddleName(JString)
\r
2200 # * @return the shipping middle name or an empty String if the shipping middle name was not set
\r
2202 sub GetShipMiddleName
\r
2205 $self->{strShipMiddleName};
\r
2210 # * Get the value of the title of the customer being shipped to.
\r
2211 # * @see #setShipCustomerTitle(String)
\r
2212 # * @return the shipping customer title or an empty String if the shipping customer title was not set
\r
2214 sub GetShipCustomerTitle
\r
2217 $self->{strShipCustomerTitle};
\r
2222 # * Get the value of the company name of the customer being shipped to.
\r
2223 # * @see #setShipCompany(JString)
\r
2224 # * @return the shipping company name or an empty String if the shipping company name was not set
\r
2226 sub GetShipCompany
\r
2229 $self->{strShipCompany};
\r
2234 # * Get the value of the first part of the shipping address.
\r
2235 # * @see #setShipAddressOne(JString)
\r
2236 # * @return the first part of the shipping address or an empty String if the shipping address part one was not set
\r
2238 sub GetShipAddressOne
\r
2241 $self->{strShipAddressOne};
\r
2246 # * Get the value of the second part of the shipping address.
\r
2247 # * @see #setShipAddressTwo(JString)
\r
2248 # * @return the second part of the shipping address or an empty String if the shipping address part two was not set
\r
2250 sub GetShipAddressTwo
\r
2253 $self->{strShipAddressTwo};
\r
2258 # * Get the value of the city for the shipping address.
\r
2259 # * @see #setShipCity(JString)
\r
2260 # * @return the shipping address city or an empty String if the shipping city was not set
\r
2265 $self->{strShipCity};
\r
2269 # * Get the value of the state or province for the shipping address.
\r
2270 # * @see #setShipStateOrProvince(JString)
\r
2271 # * @return the shipping address state or province or an empty String if the shipping state or provice was not set
\r
2273 sub GetShipStateOrProvince
\r
2276 $self->{strShipStateOrProvince};
\r
2281 # * Get the value of the postal code for the shipping address.
\r
2282 # * @see #setShipPostalCode(JString)
\r
2283 # * @return the shipping address postal code or an empty String if the shipping postal code was not set
\r
2285 sub GetShipPostalCode
\r
2288 $self->{strShipPostalCode};
\r
2293 # * Get the value of the country for the shipping address.
\r
2294 # * @see #setShipCountryCode(JString)
\r
2295 # * @return the shipping country or an empty String if the shipping country was not set
\r
2297 sub GetShipCountryCode
\r
2300 $self->{strShipCountryCode};
\r
2305 # * Get the value of the email address of the customer being shipped to.
\r
2306 # * @see #setShipEmail(JString)
\r
2307 # * @return the shipping email address or an empty String if the shipping customer email address was not set
\r
2312 $self->{strShipEmail};
\r
2317 # * Get the value of the phone number of the customer being shipped to.
\r
2318 # * @see #setShipPhone(JString)
\r
2319 # * @return the shipping phone number or an empty String if the shipping customer phone number was not set
\r
2324 $self->{strShipPhone};
\r
2329 # * Get the value of the fax number of the customer being shipped to.
\r
2330 # * @see #setShipFax(JString)
\r
2331 # * @return the shipping fax number or an empty JString if the shipping customer fax number was not set
\r
2336 $self->{strShipFax};
\r
2341 # * Get the value of the shipping note. The shipping note is an extra
\r
2342 # * comment to the shipping information.
\r
2343 # * @see #setShipNote(JString)
\r
2344 # * @return the shipping note or an empty String if the shipping note was not set
\r
2349 $self->{strShipNote};
\r
2354 # * Method to get a CreditCardResponse object.
\r
2356 sub GetTransResponseObject
\r
2359 my $InString = shift;
\r
2360 return new Business::OnlinePayment::PPIPayMover::CreditCardResponse($InString);
\r
2365 # * Get the value of the currency. The currency that
\r
2366 # * will be used for this transaction. If the merchant
\r
2367 # * does not have an account configured to process this currency, the
\r
2368 # * Transaction Server will return an error.
\r
2369 # * @see #setCurrency(String)
\r
2370 # * @return the currency or "" if the currency was not set
\r
2375 $self->{strCurrency};
\r
2380 # * Gets the buyer code
\r
2385 $self->{strBuyerCode};
\r
2389 # * Gets the CAVV (for VBV transactions)
\r
2398 # * Gets the Customer IP Address
\r
2400 sub GetCustomerIPAddress
\r
2403 $self->{strCustomerIPAddress};
\r
2407 # * Gets the Order Customer ID
\r
2409 sub GetOrderCustomerId
\r
2412 $self->{strOrderCustomerID};
\r
2416 # * Gets the purchase order number
\r
2418 sub GetPurchaseOrderNumber
\r
2421 $self->{strPurchaseOrderNumber};
\r
2425 # * Gets the state tax
\r
2430 $self->{dStateTax};
\r
2434 # * Gets the track 1 data
\r
2439 $self->{strTrack1};
\r
2443 # * Gets the track 2 data
\r
2448 $self->{strTrack2};
\r
2452 # * Gets the transaction condition code
\r
2454 sub GetTransactionConditionCode
\r
2457 $self->{strTransactionConditionCode};
\r
2470 # * Gets tax exempt flag
\r
2475 $self->{boolTaxExempt};
\r
2479 # * Gets invoice number
\r
2481 sub GetInvoiceNumber
\r
2484 $self->{strInvoiceNumber};
\r
2488 # * Gets the Authentication Transaction ID
\r
2490 # * Used in Payer Authentication transaction type
\r
2492 sub GetAuthenticationTransactionId
\r
2495 $self->{strAuthenticationTransactionId};
\r
2499 # * Gets the Authentication Payload
\r
2501 # * Used in Payer Authentication transaction type
\r
2503 sub GetAuthenticationPayload
\r
2506 $self->{strAuthenticationPayload};
\r
2510 # * Gets the Success On Authentication Inconclusive
\r
2512 # * Used in Payer Authentication transaction type
\r
2514 sub GetDoTransactionOnAuthenticationInconclusive
\r
2517 $self->{boolSuccessOnAuthenticationInconclusive};
\r
2522 # * Gets the industry
\r
2527 $self->{strIndustry};
\r
2531 # * Gets the folio number
\r
2533 sub GetFolioNumber
\r
2536 $self->{strFolioNumber};
\r
2540 # * Gets the service rate
\r
2542 sub GetServiceRate
\r
2545 $self->{dServiceRate};
\r
2549 # * Gets the service rate as a String
\r
2551 sub GetServiceRateStr
\r
2554 $self->{strServiceRate};
\r
2558 # * Gets the service start year
\r
2560 sub GetServiceStartYear
\r
2563 $self->{intServiceStartYear};
\r
2567 # * Gets the service start month
\r
2569 sub GetServiceStartMonth
\r
2572 $self->{intServiceStartMonth};
\r
2576 # * Gets the service start day
\r
2578 sub GetServiceStartDay
\r
2581 $self->{intServiceStartDay};
\r
2585 # * Gets the service end year
\r
2587 sub GetServiceEndYear
\r
2590 $self->{intServiceEndYear};
\r
2594 # * Gets the service end month
\r
2596 sub GetServiceEndMonth
\r
2599 $self->{intServiceEndMonth};
\r
2603 # * Gets the service end day
\r
2605 sub GetServiceEndDay
\r
2608 $self->{intServiceEndDay};
\r
2612 # * Gets the Charge Total Includes Restaurant flag
\r
2614 sub GetChargeTotalIncludesRestaurant
\r
2617 $self->{boolChargeTotalIncludesRestaurant};
\r
2621 # * Gets the Charge Total Includes Giftshop flag
\r
2623 sub GetChargeTotalIncludesGiftshop
\r
2626 $self->{boolChargeTotalIncludesGiftshop};
\r
2630 # * Gets the Charge Total Includes Minibar flag
\r
2632 sub GetChargeTotalIncludesMinibar
\r
2635 $self->{boolChargeTotalIncludesMinibar};
\r
2639 # * Gets the Charge Total Includes Laundry flag
\r
2641 sub GetChargeTotalIncludesLaundry
\r
2644 $self->{boolChargeTotalIncludesLaundry};
\r
2648 # * Gets the Charge Total Includes Phone flag
\r
2650 sub GetChargeTotalIncludesPhone
\r
2653 $self->{boolChargeTotalIncludesPhone};
\r
2657 # * Gets the Charge Total Includes Other flag
\r
2659 sub GetChargeTotalIncludesOther
\r
2662 $self->{boolChargeTotalIncludesOther};
\r
2666 # * Gets the Service No Show flag
\r
2668 sub GetServiceNoShow
\r
2671 $self->{boolServiceNoShow};
\r
2677 # * Method to create the post string.
\r
2682 my $class =ref($self);
\r
2683 my $PostString = shift; # a pointer to string as arguement
\r
2685 $self->SUPER::WriteRequest($PostString);
\r
2688 $temp = Encode( $self->{strCartridgeType} );
\r
2689 $$PostString .= "cartridge_type=$temp";
\r
2690 $$PostString .= $self->{strParamSeparator};
\r
2692 # Ecommerce Indicator
\r
2693 $temp = Encode( $self->{strEcommerceIndicator} );
\r
2694 $$PostString .= "ecommerce_indicator=$temp";
\r
2695 $$PostString .= $self->{strParamSeparator};
\r
2697 # fixed value for transaction_type
\r
2698 $$PostString .= "transaction_type=CREDIT_CARD";
\r
2699 $$PostString .= $self->{strParamSeparator};
\r
2701 # creditCardNumber
\r
2702 $temp = Encode( $self->{strCreditCardNumber} );
\r
2703 $$PostString .= "credit_card_number=$temp";
\r
2704 $$PostString .= $self->{strParamSeparator};
\r
2706 # creditCardVerificationNumber
\r
2707 $temp = Encode( $self->{strCreditCardVerificationNumber} );
\r
2708 $$PostString .= "credit_card_verification_number=$temp";
\r
2709 $$PostString .= $self->{strParamSeparator};
\r
2712 $temp = Encode( $self->{strExpireMonth} );
\r
2713 $$PostString .= "expire_month=$temp";
\r
2714 $$PostString .= $self->{strParamSeparator};
\r
2717 $temp = Encode( $self->{strExpireYear} );
\r
2718 $$PostString .= "expire_year=$temp";
\r
2719 $$PostString .= $self->{strParamSeparator};
\r
2722 $temp = Encode( $self->{strChargeType} );
\r
2723 $$PostString .= "charge_type=$temp";
\r
2724 $$PostString .= $self->{strParamSeparator};
\r
2727 $$PostString .= "charge_total=";
\r
2728 $$PostString .= Encode( $self->{dChargeTotal} );
\r
2729 $$PostString .= $self->{strParamSeparator};
\r
2732 # $$PostString .= "card_brand=";
\r
2733 # $$PostString .= Encode( $self->{strCardBrand} );
\r
2734 # $$PostString .= $self->{strParamSeparator};
\r
2737 $temp = Encode( $self->{strOrderId} );
\r
2738 $$PostString .= "order_id=$temp";
\r
2739 $$PostString .= $self->{strParamSeparator};
\r
2741 # captureReferenceId
\r
2742 $temp = Encode( $self->{strReferenceId} );
\r
2743 $$PostString .= "reference_id=$temp";
\r
2744 $$PostString .= $self->{strParamSeparator};
\r
2746 # orderDescription
\r
2747 $temp = Encode( $self->{strOrderDescription} );
\r
2748 $$PostString .= "order_description=$temp";
\r
2749 $$PostString .= $self->{strParamSeparator};
\r
2752 $temp = Encode( $self->{strOrderUserId} );
\r
2753 $$PostString .= "order_user_id=$temp";
\r
2754 $$PostString .= $self->{strParamSeparator};
\r
2756 # BankApprovalCode
\r
2757 $temp = Encode( $self->{strBankApprovalCode} );
\r
2758 $$PostString .= "bank_approval_code=$temp";
\r
2759 $$PostString .= $self->{strParamSeparator};
\r
2762 $temp = Encode( $self->{strDuplicateCheck} );
\r
2763 $$PostString .= "duplicate_check=$temp";
\r
2764 $$PostString .= $self->{strParamSeparator};
\r
2767 $$PostString .= "tax_amount=";
\r
2768 $$PostString .= Encode( $self->{dTaxAmount} );
\r
2769 $$PostString .= $self->{strParamSeparator};
\r
2772 $$PostString .= "shipping_charge=";
\r
2773 $$PostString .= Encode( $self->{dShippingCharge} );
\r
2774 $$PostString .= $self->{strParamSeparator};
\r
2777 $temp = Encode( $self->{strBillFirstName} );
\r
2778 $$PostString .= "bill_first_name=$temp";
\r
2779 $$PostString .= $self->{strParamSeparator};
\r
2782 $temp = Encode( $self->{strBillMiddleName} );
\r
2783 $$PostString .= "bill_middle_name=$temp";
\r
2784 $$PostString .= $self->{strParamSeparator};
\r
2787 $temp = Encode( $self->{strBillLastName} );
\r
2788 $$PostString .= "bill_last_name=$temp";
\r
2789 $$PostString .= $self->{strParamSeparator};
\r
2791 # billCustomerTitle
\r
2792 $temp = Encode( $self->{strBillCustomerTitle} );
\r
2793 $$PostString .= "bill_customer_title=$temp";
\r
2794 $$PostString .= $self->{strParamSeparator};
\r
2797 $temp = Encode( $self->{strBillCompany} );
\r
2798 $$PostString .= "bill_company=$temp";
\r
2799 $$PostString .= $self->{strParamSeparator};
\r
2802 $temp = Encode( $self->{strBillAddressOne} );
\r
2803 $$PostString .= "bill_address_one=$temp";
\r
2804 $$PostString .= $self->{strParamSeparator};
\r
2807 $temp = Encode( $self->{strBillAddressTwo} );
\r
2808 $$PostString .= "bill_address_two=$temp";
\r
2809 $$PostString .= $self->{strParamSeparator};
\r
2812 $temp = Encode( $self->{strBillCity} );
\r
2813 $$PostString .= "bill_city=$temp";
\r
2814 $$PostString .= $self->{strParamSeparator};
\r
2816 # billStateOrProvince
\r
2817 $temp = Encode( $self->{strBillStateOrProvince} );
\r
2818 $$PostString .= "bill_state_or_province=$temp";
\r
2819 $$PostString .= $self->{strParamSeparator};
\r
2822 $temp = Encode( $self->{strBillPostalCode} );
\r
2823 $$PostString .= "bill_postal_code=$temp";
\r
2824 $$PostString .= $self->{strParamSeparator};
\r
2827 $temp = Encode( $self->{strBillCountryCode} );
\r
2828 $$PostString .= "bill_country_code=$temp";
\r
2829 $$PostString .= $self->{strParamSeparator};
\r
2832 $temp = Encode( $self->{strBillEmail} );
\r
2833 $$PostString .= "bill_email=$temp";
\r
2834 $$PostString .= $self->{strParamSeparator};
\r
2837 $temp = Encode( $self->{strBillPhone} );
\r
2838 $$PostString .= "bill_phone=$temp";
\r
2839 $$PostString .= $self->{strParamSeparator};
\r
2842 $temp = Encode( $self->{strBillFax} );
\r
2843 $$PostString .= "bill_fax=$temp";
\r
2844 $$PostString .= $self->{strParamSeparator};
\r
2847 $temp = Encode( $self->{strBillNote} );
\r
2848 $$PostString .= "bill_note=$temp";
\r
2849 $$PostString .= $self->{strParamSeparator};
\r
2852 $temp = Encode( $self->{strShipFirstName} );
\r
2853 $$PostString .= "ship_first_name=$temp";
\r
2854 $$PostString .= $self->{strParamSeparator};
\r
2857 $temp = Encode( $self->{strShipMiddleName} );
\r
2858 $$PostString .= "ship_middle_name=$temp";
\r
2859 $$PostString .= $self->{strParamSeparator};
\r
2862 $temp = Encode( $self->{strShipLastName} );
\r
2863 $$PostString .= "ship_last_name=$temp";
\r
2864 $$PostString .= $self->{strParamSeparator};
\r
2866 # shipCustomerTitle
\r
2867 $temp = Encode( $self->{strShipCustomerTitle} );
\r
2868 $$PostString .= "ship_customer_title=$temp";
\r
2869 $$PostString .= $self->{strParamSeparator};
\r
2872 $temp = Encode( $self->{strShipCompany} );
\r
2873 $$PostString .= "ship_company=$temp";
\r
2874 $$PostString .= $self->{strParamSeparator};
\r
2877 $temp = Encode( $self->{strShipAddressOne} );
\r
2878 $$PostString .= "ship_address_one=$temp";
\r
2879 $$PostString .= $self->{strParamSeparator};
\r
2882 $temp = Encode( $self->{strShipAddressTwo} );
\r
2883 $$PostString .= "ship_address_two=$temp";
\r
2884 $$PostString .= $self->{strParamSeparator};
\r
2887 $temp = Encode( $self->{strShipCity} );
\r
2888 $$PostString .= "ship_city=$temp";
\r
2889 $$PostString .= $self->{strParamSeparator};
\r
2891 # shipStateOrProvince
\r
2892 $temp = Encode( $self->{strShipStateOrProvince} );
\r
2893 $$PostString .= "ship_state_or_province=$temp";
\r
2894 $$PostString .= $self->{strParamSeparator};
\r
2897 $temp = Encode( $self->{strShipPostalCode} );
\r
2898 $$PostString .= "ship_postal_code=$temp";
\r
2899 $$PostString .= $self->{strParamSeparator};
\r
2902 $temp = Encode( $self->{strShipCountryCode} );
\r
2903 $$PostString .= "ship_country_code=$temp";
\r
2904 $$PostString .= $self->{strParamSeparator};
\r
2907 $temp = Encode( $self->{strShipEmail} );
\r
2908 $$PostString .= "ship_email=$temp";
\r
2909 $$PostString .= $self->{strParamSeparator};
\r
2912 $temp = Encode( $self->{strShipPhone} );
\r
2913 $$PostString .= "ship_phone=$temp";
\r
2914 $$PostString .= $self->{strParamSeparator};
\r
2917 $temp = Encode( $self->{strShipFax} );
\r
2918 $$PostString .= "ship_fax=$temp";
\r
2919 $$PostString .= $self->{strParamSeparator};
\r
2922 $temp = Encode( $self->{strShipNote} );
\r
2923 $$PostString .= "ship_note=$temp";
\r
2924 $$PostString .= $self->{strParamSeparator};
\r
2927 # $temp = Encode( $self->{strCurrency} );
\r
2928 # $$PostString .= "currency=$temp";
\r
2929 # $$PostString .= $self->{strParamSeparator};
\r
2932 $temp = Encode( $self->{strBuyerCode} );
\r
2933 $$PostString .= "buyer_code=$temp";
\r
2934 $$PostString .= $self->{strParamSeparator};
\r
2937 $temp = Encode( $self->{strCAVV} );
\r
2938 $$PostString .= "cavv=$temp";
\r
2939 $$PostString .= $self->{strParamSeparator};
\r
2941 # Customer IP Address
\r
2942 $temp = Encode( $self->{strCustomerIPAddress} );
\r
2943 $$PostString .= "customer_ip_address=$temp";
\r
2944 $$PostString .= $self->{strParamSeparator};
\r
2946 # Order Customer ID
\r
2947 $temp = Encode( $self->{strOrderCustomerID} );
\r
2948 $$PostString .= "order_customer_id=$temp";
\r
2949 $$PostString .= $self->{strParamSeparator};
\r
2951 # Purchase Order Number
\r
2952 $temp = Encode( $self->{strPurchaseOrderNumber} );
\r
2953 $$PostString .= "purchase_order_number=$temp";
\r
2954 $$PostString .= $self->{strParamSeparator};
\r
2957 $temp = Encode( $self->{dStateTax} );
\r
2958 if( $temp == -1 ) {
\r
2961 $$PostString .= "state_tax=$temp";
\r
2962 $$PostString .= $self->{strParamSeparator};
\r
2965 $temp = Encode( $self->{strTrack1} );
\r
2966 $$PostString .= "track1=$temp";
\r
2967 $$PostString .= $self->{strParamSeparator};
\r
2970 $temp = Encode( $self->{strTrack2} );
\r
2971 $$PostString .= "track2=$temp";
\r
2972 $$PostString .= $self->{strParamSeparator};
\r
2974 # Transaction condition code
\r
2975 $temp = Encode( $self->{strTransactionConditionCode} );
\r
2976 $$PostString .= "transaction_condition_code=$temp";
\r
2977 $$PostString .= $self->{strParamSeparator};
\r
2980 $temp = Encode( $self->{strXID} );
\r
2981 $$PostString .= "x_id=$temp";
\r
2982 $$PostString .= $self->{strParamSeparator};
\r
2985 $temp = Encode( $self->{strInvoiceNumber} );
\r
2986 $$PostString .= "invoice_number=$temp";
\r
2987 $$PostString .= $self->{strParamSeparator};
\r
2990 $temp = $self->{boolTaxExempt};
\r
2991 if ( $temp eq "" ) {
\r
2992 #not set. leave it.
\r
2993 } elsif ( $temp ) {
\r
2995 } elsif(! $temp) {
\r
3000 $$PostString .= "tax_exempt=$temp";
\r
3001 $$PostString .= $self->{strParamSeparator};
\r
3003 # Authentication Transaction ID
\r
3004 $temp = Encode( $self->{strAuthenticationTransactionId} );
\r
3005 $$PostString .= "authentication_transaction_id=$temp";
\r
3006 $$PostString .= $self->{strParamSeparator};
\r
3008 # Authentication Payload
\r
3009 $temp = Encode( $self->{strAuthenticationPayload} );
\r
3010 $$PostString .= "authentication_payload=$temp";
\r
3011 $$PostString .= $self->{strParamSeparator};
\r
3013 # Success On Authentication Inconclusive
\r
3014 $temp = $self->{boolSuccessOnAuthenticationInconclusive};
\r
3015 if ( $temp eq "" ) {
\r
3016 #not set. leave it.
\r
3017 } elsif ( $temp ) {
\r
3024 $$PostString .= "success_on_authentication_inconclusive=$temp";
\r
3025 $$PostString .= $self->{strParamSeparator};
\r
3028 $temp = Encode( $self->{strIndustry} );
\r
3029 $$PostString .= "industry=$temp";
\r
3030 $$PostString .= $self->{strParamSeparator};
\r
3033 $temp = Encode( $self->{strFolioNumber} );
\r
3034 $$PostString .= "folio_number=$temp";
\r
3035 $$PostString .= $self->{strParamSeparator};
\r
3038 $temp = Encode( $self->{dServiceRate} );
\r
3039 if( $temp == -1 ) {
\r
3042 $$PostString .= "service_rate=$temp";
\r
3043 $$PostString .= $self->{strParamSeparator};
\r
3045 # Service Start Day
\r
3046 $temp = Encode( $self->{intServiceStartDay} );
\r
3047 $$PostString .= "service_start_day=$temp";
\r
3048 $$PostString .= $self->{strParamSeparator};
\r
3050 # Service Start Month
\r
3051 $temp = Encode( $self->{intServiceStartMonth} );
\r
3052 $$PostString .= "service_start_month=$temp";
\r
3053 $$PostString .= $self->{strParamSeparator};
\r
3055 # Service Start Year
\r
3056 $temp = Encode( $self->{intServiceStartYear} );
\r
3057 $$PostString .= "service_start_year=$temp";
\r
3058 $$PostString .= $self->{strParamSeparator};
\r
3061 $temp = Encode( $self->{intServiceEndDay} );
\r
3062 $$PostString .= "service_end_day=$temp";
\r
3063 $$PostString .= $self->{strParamSeparator};
\r
3065 # Service End Month
\r
3066 $temp = Encode( $self->{intServiceEndMonth} );
\r
3067 $$PostString .= "service_end_month=$temp";
\r
3068 $$PostString .= $self->{strParamSeparator};
\r
3070 # Service End Year
\r
3071 $temp = Encode( $self->{intServiceEndYear} );
\r
3072 $$PostString .= "service_end_year=$temp";
\r
3073 $$PostString .= $self->{strParamSeparator};
\r
3075 # Charge Total Includes Restaurant
\r
3076 $temp = Encode( $self->{boolChargeTotalIncludesRestaurant} );
\r
3077 if ( $temp eq "" ) {
\r
3078 #not set. leave it.
\r
3079 } elsif ( $temp ) {
\r
3086 $$PostString .= "charge_total_incl_restaurant=$temp";
\r
3087 $$PostString .= $self->{strParamSeparator};
\r
3089 # Charge Total Includes Giftshop
\r
3090 $temp = Encode( $self->{boolChargeTotalIncludesGiftshop} );
\r
3091 if ( $temp eq "" ) {
\r
3092 #not set. leave it.
\r
3093 } elsif ( $temp ) {
\r
3100 $$PostString .= "charge_total_incl_giftshop=$temp";
\r
3101 $$PostString .= $self->{strParamSeparator};
\r
3103 # Charge Total Includes Minibar
\r
3104 $temp = Encode( $self->{boolChargeTotalIncludesMinibar} );
\r
3105 if ( $temp eq "" ) {
\r
3106 #not set. leave it.
\r
3107 } elsif ( $temp ) {
\r
3114 $$PostString .= "charge_total_incl_minibar=$temp";
\r
3115 $$PostString .= $self->{strParamSeparator};
\r
3117 # Charge Total Includes Phone
\r
3118 $temp = Encode( $self->{boolChargeTotalIncludesPhone} );
\r
3119 if ( $temp eq "" ) {
\r
3120 #not set. leave it.
\r
3121 } elsif ( $temp ) {
\r
3128 $$PostString .= "charge_total_incl_phone=$temp";
\r
3129 $$PostString .= $self->{strParamSeparator};
\r
3131 # Charge Total Includes Laundry
\r
3132 $temp = Encode( $self->{boolChargeTotalIncludesLaundry} );
\r
3133 if ( $temp eq "" ) {
\r
3134 #not set. leave it.
\r
3135 } elsif ( $temp ) {
\r
3142 $$PostString .= "charge_total_incl_laundry=$temp";
\r
3143 $$PostString .= $self->{strParamSeparator};
\r
3145 # Charge Total Includes Other
\r
3146 $temp = Encode( $self->{boolChargeTotalIncludesOther} );
\r
3147 if ( $temp eq "" ) {
\r
3148 #not set. leave it.
\r
3149 } elsif ( $temp ) {
\r
3156 $$PostString .= "charge_total_incl_other=$temp";
\r
3157 $$PostString .= $self->{strParamSeparator};
\r
3160 $temp = Encode( $self->{boolServiceNoShow} );
\r
3161 if ( $temp eq "" ) {
\r
3162 #not set. leave it.
\r
3163 } elsif ( $temp ) {
\r
3170 $$PostString .= "service_no_show=$temp";
\r
3172 # No parameter separator on last line.
\r
3176 sub GetErrorString
\r
3179 return $self->{strError};
\r