+package Business::OnlinePayment::PPIPayMover::CreditCardRequest;\r
+\r
+use strict;\r
+use vars qw(@ISA);\r
+use Business::OnlinePayment::PPIPayMover::TransactionRequest;\r
+use Business::OnlinePayment::PPIPayMover::CreditCardResponse;\r
+use Business::OnlinePayment::PPIPayMover::AdditionalField;\r
+use Business::OnlinePayment::PPIPayMover::constants;\r
+use Business::OnlinePayment::PPIPayMover::CountryCodes;\r
+use Business::OnlinePayment::PPIPayMover::URLEncoder;\r
+\r
+@ISA = qw(Business::OnlinePayment::PPIPayMover::TransactionRequest);\r
+1;\r
+\r
+#default constructor\r
+sub new {\r
+ my $class = shift;\r
+ my $self = $class->SUPER::new();\r
+\r
+# Misc identification fields\r
+ $self->{strCartridgeType} = ""; # v1.5\r
+ $self->{strEcommerceIndicator} = ""; # v1.5\r
+\r
+# credit card fields.\r
+ \r
+ $self->{strCreditCardNumber} = "";\r
+ $self->{strCreditCardVerificationNumber} = ""; # v1.5\r
+ $self->{strAVSCode} = ""; # v1.5\r
+ $self->{strExpireMonth} = "";\r
+ $self->{strExpireYear} = "";\r
+ $self->{strChargeType} = "";\r
+ $self->{strChargeTotal} = "";\r
+ $self->{dChargeTotal} = -1.0;\r
+ $self->{strCardBrand} = "";\r
+ $self->{strCurrency} = "";\r
+ $self->{strOrderId} = "";\r
+ $self->{strBankApprovalCode} = ""; # Required if chargetype is FORCE_AUTH or FORCE_SALE\r
+ $self->{strDuplicateCheck} = ""; #v1.7.1\r
+ $self->{strReferenceId} = ""; # Required if chargetype is CAPTURE, QUERY_CREDIT, QUERY_PAYMENT or ADJUSTMENT\r
+ $self->{strOrderDescription} = "";\r
+ $self->{strOrderUserId} = "";\r
+ $self->{strTaxAmount} = "";\r
+ $self->{dTaxAmount} = -1.0;\r
+ $self->{strShippingCharge} = "";\r
+ $self->{dShippingCharge} = -1.0;\r
+ \r
+# Billing info fields ...\r
+ \r
+ $self->{strBillFirstName} = "";\r
+ $self->{strBillLastName} = "";\r
+ $self->{strBillMiddleName} = "";\r
+ $self->{strBillCustomerTitle} = "";\r
+ $self->{strBillCompany} = "";\r
+ $self->{strBillAddressOne} = "";\r
+ $self->{strBillAddressTwo} = "";\r
+ $self->{strBillCity} = "";\r
+ $self->{strBillStateOrProvince} = "";\r
+ $self->{strBillPostalCode} = "";\r
+ $self->{strBillCountryCode} = "";\r
+ $self->{strBillEmail} = "";\r
+ $self->{strBillPhone} = "";\r
+ $self->{strBillFax} = "";\r
+ $self->{strBillNote} = "";\r
+ \r
+# Shipping info fields default values.\r
+ \r
+ $self->{strShipFirstName} = "";\r
+ $self->{strShipLastName} = "";\r
+ $self->{strShipMiddleName} = "";\r
+ $self->{strShipCustomerTitle} = "";\r
+ $self->{strShipCompany} = "";\r
+ $self->{strShipAddressOne} = "";\r
+ $self->{strShipAddressTwo} = "";\r
+ $self->{strShipCity} = "";\r
+ $self->{strShipStateOrProvince} = "";\r
+ $self->{strShipPostalCode} = "";\r
+ $self->{strShipCountryCode} = "";\r
+ $self->{strShipEmail} = "";\r
+ $self->{strShipPhone} = "";\r
+ $self->{strShipFax} = "";\r
+ $self->{strShipNote} = "";\r
+ \r
+# Authentication fields\r
+ $self->{strAuthenticationTransactionId} = "";\r
+ $self->{strAuthenticationPayload} = "";\r
+ $self->{boolSuccessOnAuthenticationInconclusive} = "";\r
+\r
+\r
+# Others\r
+ $self->{strBuyerCode} = "";\r
+ $self->{strCAVV} = "";\r
+ $self->{strCustomerIPAddress} = "";\r
+ $self->{strPurchaseOrderNumber} = "";\r
+ $self->{dStateTax} = -1.0;\r
+ $self->{strTrack1} = "";\r
+ $self->{strTrack2} = "";\r
+ $self->{strXID} = "";\r
+ $self->{boolTaxExempt} = "";\r
+ $self->{strInvoiceNumber} = "";\r
+ \r
+# Industry Fields\r
+ $self->{strIndustry} = "";\r
+ $self->{strFolioNumber} = "";\r
+ \r
+ $self->{boolChargeTotalIncludesRestaurant} = "";\r
+ $self->{boolChargeTotalIncludesGiftshop} = "";\r
+ $self->{boolChargeTotalIncludesMinibar} = "";\r
+ $self->{boolChargeTotalIncludesPhone} = "";\r
+ $self->{boolChargeTotalIncludesLaundry} = "";\r
+ $self->{boolChargeTotalIncludesOther} = "";\r
+ \r
+ $self->{dServiceRate} = -1.0;\r
+ $self->{strServiceRate} = "";\r
+ $self->{intServiceEndDay} = "";\r
+ $self->{intServiceEndMonth} = "";\r
+ $self->{intServiceEndYear} = "";\r
+ $self->{intServiceStartDay} = "";\r
+ $self->{intServiceStartMonth} = "";\r
+ $self->{intServiceStartYear} = "";\r
+ $self->{boolServiceNoShow} = "";\r
+ \r
+ return $self;\r
+}\r
+\r
+\r
+\r
+#**\r
+# * Set the value of the cartridge type.\r
+# * <p>\r
+# */\r
+sub SetCartridgeType {\r
+ my $self = shift;\r
+ my $cartType = shift; # take one string arguement to get cartridgeType\r
+ if (!defined($cartType)) {\r
+ $self->{strError} = "Cartridge type is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($cartType eq ""){\r
+ $self->{strError} = "Invalid cartridge type.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCartridgeType} = $cartType;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the value of the Ecommerce Indicator number.\r
+# * <p>\r
+# */\r
+sub SetEcommerceIndicator {\r
+ my $self = shift;\r
+ my $ecommerceIndicator = shift; # take one string arguement to get EcommerceIndicator\r
+ if (!defined($ecommerceIndicator)) {\r
+ $self->{strError} = "Ecommerce indicator is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($ecommerceIndicator eq ""){\r
+ $self->{strError} = "Invalid ecommerce indicator.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strEcommerceIndicator} = $ecommerceIndicator;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+\r
+\r
+#**\r
+# * Set the value of the credit card number.\r
+# * <p>\r
+# * @param creditCardNumber must be numeric characters\r
+# * @exception TransactionProtocolException thrown if creditCardNumber is non-numeric or the empty String.\r
+# */\r
+sub SetCreditCardNumber {\r
+ my $self = shift;\r
+ my $ccNo = shift; # take one string arguement to get creditcard number\r
+ if (!defined($ccNo)) {\r
+ $self->{strError} = "Credit card number is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($ccNo eq ""){\r
+ $self->{strError} = "Invalid credit card number.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($ccNo =~ /\D/) {\r
+ $self->{strError} = "Non-numeric credit card number.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ( ( length $ccNo < 13 ) || ( length $ccNo > 19 ) ) {\r
+ $self->{strError} = "Invalid credit card number length.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCreditCardNumber} = $ccNo;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the value of the credit card verification number.\r
+# * <p>\r
+# * @param creditCardVerificationNumber must be numeric characters\r
+# */\r
+sub SetCreditCardVerificationNumber {\r
+ my $self = shift;\r
+ my $ccVerNo = shift; # take one string arguement to get creditCardVerification number\r
+ if (!defined($ccVerNo)) {\r
+ $self->{strError} = "Credit card verification number is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($ccVerNo eq ""){\r
+ $self->{strError} = "Invalid credit card verification number.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($ccVerNo =~ /\D/) {\r
+ $self->{strError} = "Non-numeric credit card verification number.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCreditCardVerificationNumber} = $ccVerNo;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the value of the credit card expiration month.\r
+# * <p>\r
+# * @param expireMonth Must be an integer in ASCII characters in the range "1" to "12, inclusive.\r
+# * @exception TransactionProtocolException thrown if expireMonth is not >= 1 and <= 12.\r
+# */\r
+sub SetExpireMonth\r
+{\r
+ my $self = shift;\r
+ my $expireMonth = shift; #take one string arguement\r
+ if (!defined($expireMonth)) {\r
+ $self->{strError} = "Expire month is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($expireMonth eq ""){\r
+ $self->{strError} = "Invalid expire month.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($expireMonth =~ /\D/) {\r
+ $self->{strError} = "Invalid credit expire month (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ my $iExpireMonth = 1 * $expireMonth;\r
+ if ($iExpireMonth < 1 || $iExpireMonth > 12) {\r
+ $self->{strError} .= "Invalid expire month (not 1 through 12).";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strExpireMonth} = $expireMonth;\r
+ \r
+ return 1;\r
+}\r
+\r
+\r
+#**\r
+# * Set the value of the credit card expiration year.\r
+# * <p>\r
+# * @param expireYear Must be a four-digit integer in ASCII characters. E.g. "2001".\r
+# * @exception TransactionProtocolException thrown if expireYear is not a four digit year.\r
+#\r
+sub SetExpireYear\r
+{\r
+ my $self = shift;\r
+ my $expireYear = shift; # take a string arguement\r
+ if (!defined($expireYear)) {\r
+ $self->{strError} = "Expire year is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if (length($expireYear) != 4) {\r
+ $self->{strError} = "Invalid expire year, must be 4 numeric characters.";\r
+ return CCR_ERROR;\r
+ }\r
+ if($expireYear =~ /\D/){\r
+ $self->{strError} = "Invalid credit expire year (non-numeric).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $self->{strExpireYear} = $expireYear;\r
+ return CCR_NO_ERROR;\r
+}\r
+#**\r
+# * Set the charge type.\r
+# * <p>\r
+# * @param chargeType Must be one of the following constants: SALE, AUTH, CAPTURE, FORCE_AUTH,\r
+# * FORCE_SALE, VOID, QUERY_CREDIT, QUERY_PAYMENT, ADJUSTMENT or CREDIT.\r
+# * @exception TransactionProtocolException thrown if chargeType is not a valid charge type\r
+# * defined by this class.\r
+# */\r
+sub SetChargeType\r
+{\r
+ my $self = shift;\r
+ my $chargeType = shift; # take one string arguement\r
+ \r
+ if (!defined($chargeType)) {\r
+ $self->{strError} = "Charge type is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($chargeType eq "") {\r
+ $self->{strError} = "Invalid charge type";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if (!($chargeType eq SALE || $chargeType eq AUTH || \r
+ $chargeType eq CAPTURE || $chargeType eq VOID ||\r
+ $chargeType eq FORCE_AUTH || $chargeType eq FORCE_SALE ||\r
+ $chargeType eq QUERY_PAYMENT || $chargeType eq QUERY_CREDIT ||\r
+ $chargeType eq CLOSE_ORDER || $chargeType eq CANCEL_ORDER ||\r
+ $chargeType eq VOID_AUTH || $chargeType eq VOID_CAPTURE ||\r
+ $chargeType eq VOID_CREDIT || $chargeType eq CREATE_ORDER ||\r
+ $chargeType eq CREDIT || $chargeType eq ADJUSTMENT)) {\r
+ $self->{strError} = "Invalid charge type.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strChargeType} = $chargeType;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the transaction amount using a floating point value. Other amounts, such\r
+# * as tax amount or shipping charges, do not affect the charge total\r
+# * <p>\r
+# * @param chargeTotal Must be a positive floating-point number.\r
+# * E.g. Use <i>12.34</i> to represent $12.34.\r
+# * @exception TransactionProtocolException thrown if chargeTotal less than zero\r
+# */\r
+sub SetChargeTotal\r
+{\r
+ my $self = shift;\r
+ my $chargeTotal = shift; # take either one string or float arguement\r
+ \r
+ if (!defined($chargeTotal)) {\r
+ $self->{strError} = "Charge total is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ( $chargeTotal !~ /^(\d+\.?\d*|\.\d+)$/ ) {\r
+ $self->{strError} = "Non-numeric charge.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ my $dChargeTotal = $chargeTotal * 1.0;\r
+ if ($dChargeTotal < 0){\r
+ $self->{strError} = "Charge total cannot be negative.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $self->{dChargeTotal} = $dChargeTotal;\r
+ $self->{strChargeTotal} = "".$chargeTotal;\r
+ \r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+\r
+\r
+#**\r
+# * Set the transaction credit card brand.\r
+# * <p>\r
+# * @param cardBrand Must be one of the following constants:\r
+# * VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, NOVA, AMEX, DINERS, EUROCARD,\r
+# * CARD_BRAND_1, CARD_BRAND_2, CARD_BRAND_3, CARD_BRAND_4, CARD_BRAND_5, or CARD_BRAND_6.\r
+# * @exception TransactionProtocolException thrown if cardBrand not one of the card brand constants\r
+# * defined by this class.\r
+# */\r
+sub SetCardBrand\r
+{\r
+ my $self = shift;\r
+ my $CardBrand = shift; # take a string arguement\r
+ \r
+ if (!defined($CardBrand) || $CardBrand eq ""){\r
+ $self->{strError} = "Blank or undefined card type.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($CardBrand ne VISA &&\r
+ $CardBrand ne MASTERCARD &&\r
+ $CardBrand ne AMERICAN_EXPRESS &&\r
+ $CardBrand ne DISCOVER &&\r
+ $CardBrand ne NOVA &&\r
+ $CardBrand ne AMEX &&\r
+ $CardBrand ne DINERS &&\r
+ $CardBrand ne EUROCARD &&\r
+ $CardBrand ne CARD_BRAND_1 &&\r
+ $CardBrand ne CARD_BRAND_2 &&\r
+ $CardBrand ne CARD_BRAND_3 &&\r
+ $CardBrand ne CARD_BRAND_4 &&\r
+ $CardBrand ne CARD_BRAND_5 &&\r
+ $CardBrand ne CARD_BRAND_6) {\r
+ $self->{strError} = "Invalid card brand:$CardBrand.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCardBrand} = $CardBrand;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the order ID.\r
+# */\r
+sub SetOrderId\r
+{\r
+ my $self = shift;\r
+ my $OrderId = shift; # take a string arguement\r
+ if (!defined($OrderId)) {\r
+ $self->{strError} = "Order id is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strOrderId} = $OrderId;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the capture reference ID (used in tracking captures / deposits).\r
+# * This field is required if chargeType is CAPTURE.\r
+# */\r
+sub SetCaptureReferenceId\r
+{\r
+ my $self = shift;\r
+ my $CaptureReferenceId = shift; #take a string arguement\r
+ if (!defined($CaptureReferenceId)){\r
+ $self->{strError} = "Capture reference id is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strReferenceId} = $CaptureReferenceId;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#\r
+# Set Reference Id\r
+# This should be used instead of SetCaptureReferenceId\r
+# Added in v1.6\r
+#\r
+sub SetReferenceId\r
+{\r
+ my $self = shift;\r
+ my $ReferenceId = shift; #take a string arguement\r
+ if (!defined($ReferenceId)){\r
+ $self->{strError} = "Reference id is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strReferenceId} = $ReferenceId;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set a comment describing the order.\r
+# */\r
+sub SetOrderDescription\r
+{\r
+ my $self = shift;\r
+ my $OrderDescription = shift; #take a string arguement\r
+ if (!defined($OrderDescription)) {\r
+ $self->{strError} = "Order description is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strOrderDescription} = $OrderDescription;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#/**\r
+# * Set the order's user id. The order user id is an identifier\r
+# * for a merchant's customer. It is not required, but may provide\r
+# * increased searching functionality in the merchant support center.\r
+# */\r
+sub SetOrderUserId\r
+{\r
+ my $self = shift;\r
+ my $OrderUserId = shift; # take a string arguement\r
+ if (!defined($OrderUserId)) {\r
+ $self->{strError} = "Order user ID is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strOrderUserId} = $OrderUserId;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the bank approval code (used in force sale and force auth).\r
+# * This field is required if chargeType is FORCE_AUTH or FORCE_SALE.\r
+# */\r
+sub SetBankApprovalCode\r
+{\r
+ my $self = shift;\r
+ my $BankApprovalCode = shift; #take a string arguement\r
+ if (!defined($BankApprovalCode)){\r
+ $self->{strError} = "Bank Approval Code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBankApprovalCode} = $BankApprovalCode;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the duplicate check.\r
+# * Possible values are CHECK, OVERRIDE, NO_CHECK\r
+# */\r
+sub SetDuplicateCheck\r
+{\r
+ my $self = shift;\r
+ my $DuplicateCheck = shift; #take a string arguement\r
+ if (!defined($DuplicateCheck)){\r
+ $self->{strError} = "Duplicate Check is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strDuplicateCheck} = $DuplicateCheck;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the tax amount using a floating point value.\r
+# * The tax amount is the amount of the chargeTotal that is tax.\r
+# * <p>\r
+# * @param taxAmount Must be a positive floating-point number.\r
+# * E.g. Use <i>11.55</i> to represent $11.55.\r
+# * @exception TransactionProtocolException thrown if taxAmount less than zero\r
+# */\r
+sub SetTaxAmount\r
+{\r
+ my $self = shift;\r
+ my $TaxAmount = shift; # take a string or an integer arguement\r
+ \r
+ if (!defined($TaxAmount)) {\r
+ $self->{strError} = "Tax amount is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ( $TaxAmount !~ /^(\d+\.?\d*|\.\d+)$/ ) {\r
+ $self->{strError} = "Non-numeric tax amount.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ my $dTaxAmount = $TaxAmount * 1.0;\r
+ if ($dTaxAmount < 0) {\r
+ $self->{strError} = "Tax amount cannot be negative.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $self->{dTaxAmount} = $dTaxAmount;\r
+ $self->{strTaxAmount} = "".$TaxAmount;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the shipping charge using a floating point value.\r
+# * The shipping charge is the amount of the chargeTotal that is shipping charges.\r
+# * <p>\r
+# * @param shippingCharge Must be a positive floating-point number.\r
+# * E.g. Use <i>11.55</i> to represent $11.55.\r
+# * @exception TransactionProtocolException thrown if shippingCharge less than zero\r
+# */\r
+sub SetShippingCharge\r
+{\r
+ my $self = shift;\r
+ my $ShippingCharge = shift; # take a string or an integer arguement\r
+ \r
+ if (!defined($ShippingCharge)) {\r
+ $self->{strError} = "Shipping charge is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ( $ShippingCharge !~ /^(\d+\.?\d*|\.\d+)$/ ) {\r
+ $self->{strError} = "Non-numeric shipping charge.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ my $dShippingCharge = $ShippingCharge * 1.0;\r
+ if ($dShippingCharge < 0.00) {\r
+ $self->{strError} = "Shipping charge cannot be negative.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $self->{dShippingCharge} = $dShippingCharge;\r
+ $self->{strShippingCharge} = "".$ShippingCharge;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the first name of the customer being billed.\r
+# */\r
+sub SetBillFirstName\r
+{\r
+ my $self = shift;\r
+ my $BillFirstName = shift; # take a string arguement\r
+ if (!defined($BillFirstName)) {\r
+ $self->{strError} = "Bill first name is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillFirstName} = $BillFirstName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the last name of the customer being billed.\r
+# */\r
+sub SetBillLastName\r
+{\r
+ my $self = shift;\r
+ my $BillLastName = shift; # take a string arguement\r
+ if (!defined($BillLastName)) {\r
+ $self->{strError} = "Bill last name is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillLastName} = $BillLastName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the middle name of the customer being billed.\r
+#\r
+sub SetBillMiddleName\r
+{\r
+ my $self = shift;\r
+ my $BillMiddleName = shift; # take a string arguement\r
+ if (!defined($BillMiddleName)) {\r
+ $self->{strError} = "Bill middle name is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillMiddleName} = $BillMiddleName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the title of the customer being billed, such as "Mr." or "Sales Manager".\r
+#/\r
+sub SetBillCustomerTitle\r
+{\r
+ my $self = shift;\r
+ my $BillCustomerTitle = shift; # take a string arguement\r
+ if (!defined($BillCustomerTitle)) {\r
+ $self->{strError} = "Bill customer title is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillCustomerTitle} = $BillCustomerTitle;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the name of the company of the customer being billed.\r
+# */\r
+sub SetBillCompany\r
+{\r
+ my $self = shift;\r
+ my $BillCompany = shift; # take a string arguement\r
+ if (!defined($BillCompany)) {\r
+ $self->{strError} = "Bill company is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillCompany} = $BillCompany;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the first part of the address of the customer being billed,\r
+# * such as "1455 Cedar Springs Drive".\r
+# */\r
+sub SetBillAddressOne\r
+{\r
+ my $self = shift;\r
+ my $BillAddressOne = shift; # take a string arguement\r
+ if (!defined($BillAddressOne)) {\r
+ $self->{strError} = "Bill address one is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillAddressOne} = $BillAddressOne;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#*\r
+# * Set the second part of the address of the customer being billed,\r
+# * such as "Suite 100".\r
+# */\r
+sub SetBillAddressTwo\r
+{\r
+ my $self = shift;\r
+ my $BillAddressTwo = shift; # take a string arguement\r
+ if (!defined($BillAddressTwo)) {\r
+ $self->{strError} = "Bill address two is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillAddressTwo} = $BillAddressTwo;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the city of the customer being billed.\r
+# */\r
+sub SetBillCity\r
+{\r
+ my $self = shift;\r
+ my $BillCity = shift; # take a string arguement\r
+ if (!defined($BillCity)) {\r
+ $self->{strError} = "Bill city is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillCity} = $BillCity;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the state or province of the customer being billed.\r
+# */\r
+sub SetBillStateOrProvince\r
+{\r
+ my $self = shift;\r
+ my $BillStateOrProvince = shift; # take a string arguement\r
+ if (!defined($BillStateOrProvince)) {\r
+ $self->{strError} = "Bill state or province is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillStateOrProvince} = $BillStateOrProvince;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the postal code (or zip code) of the customer being billed.\r
+# */\r
+sub SetBillPostalCode\r
+{\r
+ my $self = shift;\r
+ my $BillPostalCode = shift; # take a string arguement\r
+ if (!defined($BillPostalCode)) {\r
+ $self->{strError} = "Bill postal code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillPostalCode} = $BillPostalCode;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * @param billCountryCode The alphabetic country code of the billing address.\r
+# * Must be a valid country code from ISO-3166. E.g. "CA" or "US".\r
+# * <p>\r
+# * @see com.paygateway.CountryCodes\r
+# * @exception TransactionProtocolException thrown if an invalid country code is passed in\r
+# */\r
+sub SetBillCountryCode\r
+{\r
+ my $self = shift;\r
+ my $BillCountryCode = shift; # take a string arguement (either country code or country name)\r
+ \r
+ if (!defined($BillCountryCode)) {\r
+ $self->{strError} = "Country code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ my $CountryCode = getCCodeFromCName($BillCountryCode);\r
+ if (isValidCountryCode($BillCountryCode)) {\r
+ $self->{strBillCountryCode} = $BillCountryCode;\r
+ return CCR_NO_ERROR;\r
+ }\r
+ elsif (defined($CountryCode)) {\r
+ $self->{strBillCountryCode} = $CountryCode;\r
+ return CCR_NO_ERROR;\r
+ }\r
+ else {\r
+ $self->{strError} = "Invalid country code for billing address.";\r
+ return CCR_ERROR;\r
+ }\r
+}\r
+\r
+\r
+#**\r
+# * Set the email address of the customer being billed.\r
+# */\r
+sub SetBillEmail\r
+{\r
+ my $self = shift;\r
+ my $BillEmail = shift;\r
+ if (!defined($BillEmail)) {\r
+ $self->{strError} = "Bill email is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($BillEmail !~ /.+@.+\..+/ ) {\r
+ $self->{strError} = "Invalid bill email format.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillEmail} = $BillEmail;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+#* Set the phone number\r
+#*/\r
+sub SetBillPhone\r
+{\r
+ my $self = shift;\r
+ my $BillPhone = shift; # take a string arguement\r
+ if (!defined($BillPhone)) {\r
+ $self->{strError} = "Bill phone is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillPhone} = $BillPhone;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the facsimile number of the customer being billed.\r
+# */\r
+sub SetBillFax\r
+{\r
+ my $self = shift;\r
+ my $BillFax = shift;\r
+ if (!defined($BillFax)) {\r
+ $self->{strError} = "Bill fax is undefined";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillFax} = $BillFax;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the billing note. This a comment about the billing information.\r
+# */\r
+sub SetBillNote\r
+{\r
+ my $self = shift;\r
+ my $BillNote = shift; #take a string arguement\r
+ if (!defined($BillNote)) {\r
+ $self->{strError} = "Bill note is undefined";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBillNote} = $BillNote;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the first name for the shipping information.\r
+# */\r
+sub SetShipFirstName\r
+{\r
+ my $self = shift;\r
+ my $ShipFirstName = shift; # take a string arguement\r
+ if (!defined($ShipFirstName)) {\r
+ $self->{strError} = "Ship first name is undefined";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipFirstName} = $ShipFirstName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the last name for the shipping information.\r
+# */\r
+sub SetShipLastName\r
+{\r
+ my $self = shift;\r
+ my $ShipLastName = shift; # take a string arguement\r
+ if (!defined($ShipLastName)) {\r
+ $self->{strError} = "Ship last is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipLastName} = $ShipLastName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the middle name for the shipping information.\r
+# */\r
+sub SetShipMiddleName\r
+{\r
+ my $self = shift;\r
+ my $ShipMiddleName = shift; # take a string arguement\r
+ \r
+ if (!defined($ShipMiddleName)) {\r
+ $self->{strError} = "Ship middle name is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipMiddleName} = $ShipMiddleName;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the customer title of the customer being jstrShipped to.\r
+# */\r
+sub SetShipCustomerTitle\r
+{\r
+ my $self = shift;\r
+ my $ShipCustomerTitle = shift; # take a string arguement\r
+ if (!defined($ShipCustomerTitle)) {\r
+ $self->{strError} = "Ship customer title is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipCustomerTitle} = $ShipCustomerTitle;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the company for the shipping information.\r
+# */\r
+sub SetShipCompany\r
+{\r
+ my $self = shift;\r
+ my $ShipCompany = shift; # take a string arguement\r
+ if (!defined($ShipCompany)) {\r
+ $self->{strError} = "Ship company is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipCompany} = $ShipCompany;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the first part of the shipping address, such as\r
+# * "485 Bridestone Way".\r
+# */\r
+sub SetShipAddressOne\r
+{\r
+ my $self = shift;\r
+ my $ShipAddressOne = shift; # take a string arguement\r
+ if (!defined($ShipAddressOne)) {\r
+ $self->{strError} = "Ship address is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipAddressOne} = $ShipAddressOne;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the second part of the shipping address, such as\r
+# * "Suite 234".\r
+\r
+sub SetShipAddressTwo\r
+{\r
+ my $self = shift;\r
+ my $ShipAddressTwo = shift; # take a string arguement\r
+ if (!defined($ShipAddressTwo)) {\r
+ $self->{strError} = "Ship address two is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipAddressTwo} = $ShipAddressTwo;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the city for the shipping address.\r
+# */\r
+sub SetShipCity\r
+{\r
+ my $self = shift;\r
+ my $ShipCity = shift; # take a string arguement\r
+ if (!defined($ShipCity)) {\r
+ $self->{strError} = "Ship city is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipCity} = $ShipCity;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the state or provicnce for the shipping address.\r
+# */\r
+sub SetShipStateOrProvince\r
+{\r
+ my $self = shift;\r
+ my $ShipStateOrProvince = shift; # take a string arguement\r
+ if (!defined($ShipStateOrProvince)) {\r
+ $self->{strError} = "Ship state or province is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipStateOrProvince} = $ShipStateOrProvince;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the postal code (or zip code) for the shipping address.\r
+# */\r
+sub SetShipPostalCode\r
+{\r
+ my $self = shift;\r
+ my $ShipPostalCode = shift; # take a string arguement\r
+ if (!defined($ShipPostalCode)) {\r
+ $self->{strError} = "Ship postal code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipPostalCode} = $ShipPostalCode;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#**\r
+# * Set the shipping country code.\r
+# * @param shipCountryCode The alphabetic country code of the billing address.\r
+# * Must be a valid country code from ISO-3166. E.g. "CA" or "US".\r
+# * <p>\r
+# * @see com.paygateway.CountryCodes\r
+# * @exception TransactionProtocolException thrown if an invalid country code is passed in\r
+# */\r
+sub SetShipCountryCode\r
+{\r
+ my $self = shift;\r
+ my $ShipCountryCode = shift; # take a string arguement (either country code or country name)\r
+ \r
+ if (!defined($ShipCountryCode)) {\r
+ $self->{strError} = "Ship country code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ my $CountryCode = getCCodeFromCName($ShipCountryCode) ;\r
+ if (isValidCountryCode($ShipCountryCode)) {\r
+ $self->{strShipCountryCode} = $ShipCountryCode;\r
+ return CCR_NO_ERROR;\r
+ }\r
+ elsif (defined($CountryCode)) {\r
+ $self->{strShipCountryCode} = $CountryCode;\r
+ return CCR_NO_ERROR;\r
+ }\r
+ else {\r
+ $self->{strError} = "Invalid country code for shipping address";\r
+ return CCR_ERROR;\r
+ }\r
+}\r
+\r
+\r
+#**\r
+# * Set the email address of the customer being shipped to.\r
+# */\r
+sub SetShipEmail\r
+{\r
+ my $self = shift;\r
+ my $ShipEmail = shift; # take a string arguement\r
+ if (!defined($ShipEmail)) {\r
+ $self->{strError} = "Ship email is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipEmail} = $ShipEmail;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the phone number of the customer being shipped to.\r
+# */\r
+sub SetShipPhone\r
+{\r
+ my $self = shift;\r
+ my $ShipPhone = shift; # take a string arguement\r
+ if (!defined($ShipPhone)) {\r
+ $self->{strError} = "Ship phone is undefined";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipPhone} = $ShipPhone;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the facsimile number of the customer being shipped to.\r
+# */\r
+sub SetShipFax\r
+{\r
+ my $self = shift;\r
+ my $ShipFax = shift; # take a string arguement\r
+ if (!defined($ShipFax)) {\r
+ $self->{strError} = "Ship fax is undefined";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipFax} = $ShipFax;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set a note (comment) for the shipping information.\r
+# */\r
+sub SetShipNote\r
+{\r
+ my $self = shift;\r
+ my $ShipNote = shift;\r
+ if (!defined($ShipNote)) {\r
+ $self->{strError} = "Ship note is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strShipNote} = $ShipNote;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#/**\r
+# * Sets the currency\r
+# */\r
+sub SetCurrency\r
+{\r
+ my $self = shift;\r
+ my $Currency = shift; # take a string arguement\r
+ if (!defined($Currency)) {\r
+ $self->{strError} = "Currency is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCurrency} = $Currency;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the buyer code\r
+# */\r
+sub SetBuyerCode\r
+{\r
+ my $self = shift;\r
+ my $buyerCode = shift; # take a string arguement\r
+ if (!defined($buyerCode)) {\r
+ $self->{strError} = "Buyer code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strBuyerCode} = $buyerCode;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the CAVV (for VBV transactions)\r
+# */\r
+sub SetCAVV\r
+{\r
+ my $self = shift;\r
+ my $cavv = shift; # take a string arguement\r
+ if (!defined($cavv)) {\r
+ $self->{strError} = "CAVV is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCAVV} = $cavv;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Customer IP Address\r
+# */\r
+sub SetCustomerIPAddress\r
+{\r
+ my $self = shift;\r
+ my $ip = shift; # take a string arguement\r
+ if (!defined($ip)) {\r
+ $self->{strError} = "Customer IP address is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strCustomerIPAddress} = $ip;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Order Customer ID\r
+# */\r
+sub SetOrderCustomerId\r
+{\r
+ my $self = shift;\r
+ my $orderCustomerID = shift; # take a string arguement\r
+ if (!defined($orderCustomerID)) {\r
+ $self->{strError} = "Order customer ID is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strOrderCustomerID} = $orderCustomerID;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the purchase order number\r
+# */\r
+sub SetPurchaseOrderNumber\r
+{\r
+ my $self = shift;\r
+ my $purchaseOrderNumber = shift; # take a string arguement\r
+ if (!defined($purchaseOrderNumber)) {\r
+ $self->{strError} = "Purchase order number is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strPurchaseOrderNumber} = $purchaseOrderNumber;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the state tax\r
+# */\r
+sub SetStateTax\r
+{\r
+ my $self = shift;\r
+ my $stateTax = shift; # take a string arguement\r
+ if (!defined($stateTax)) {\r
+ $self->{strError} = "State tax is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+\r
+ if ( $stateTax !~ /^(\d+\.?\d*|\.\d+)$/ ) {\r
+ $self->{strError} = "Non-numeric state tax amount.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $stateTax = $stateTax * 1.0;\r
+ if ($stateTax < 0) {\r
+ $self->{strError} = "State tax cannot be negative.";\r
+ return CCR_ERROR;\r
+ }\r
+\r
+ $self->{dStateTax} = $stateTax;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the track 1 data\r
+# */\r
+sub SetTrack1\r
+{\r
+ my $self = shift;\r
+ my $track1 = shift; # take a string arguement\r
+ if (!defined($track1)) {\r
+ $self->{strError} = "Track 1 is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strTrack1} = $track1;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the track 2 data\r
+# */\r
+sub SetTrack2\r
+{\r
+ my $self = shift;\r
+ my $track2 = shift; # take a string arguement\r
+ if (!defined($track2)) {\r
+ $self->{strError} = "Track 2 is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strTrack2} = $track2;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the transaction condition code\r
+# */\r
+sub SetTransactionConditionCode\r
+{\r
+ my $self = shift;\r
+ my $tcc = shift; # take a string arguement\r
+ if (!defined($tcc)) {\r
+ $self->{strError} = "Transaction condition code is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strTransactionConditionCode} = $tcc;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the xid\r
+# */\r
+sub SetXID\r
+{\r
+ my $self = shift;\r
+ my $xid = shift; # take a string arguement\r
+ if (!defined($xid)) {\r
+ $self->{strError} = "XID is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strXID} = $xid;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets tax exempt flag\r
+# */\r
+sub SetTaxExempt\r
+{\r
+ my $self = shift;\r
+ my $taxExempt = shift; # take a string arguement\r
+ if (!defined($taxExempt)) {\r
+ $self->{strError} = "Tax exempt flag is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolTaxExempt} = $taxExempt;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets invoice number\r
+# */\r
+sub SetInvoiceNumber\r
+{\r
+ my $self = shift;\r
+ my $invoiceNumber = shift; # take a string arguement\r
+ if (!defined($invoiceNumber)) {\r
+ $self->{strError} = "Invoice number is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strInvoiceNumber} = $invoiceNumber;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Authentication Transaction ID\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub SetAuthenticationTransactionId\r
+{\r
+ my $self = shift;\r
+ my $authenticationTransactionId = shift; # take a string arguement\r
+ if (!defined($authenticationTransactionId)) {\r
+ $self->{strError} = "Authentication Transaction ID is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strAuthenticationTransactionId} = $authenticationTransactionId;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Authentication Payload\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub SetAuthenticationPayload\r
+{\r
+ my $self = shift;\r
+ my $authenticationPayload = shift; # take a string arguement\r
+ if (!defined($authenticationPayload)) {\r
+ $self->{strError} = "Authentication Payload is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strAuthenticationPayload} = $authenticationPayload;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Success On Authentication Inconclusive\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub SetDoTransactionOnAuthenticationInconclusive\r
+{\r
+ my $self = shift;\r
+ my $successOnAuthenticationInconclusive = shift; # take a string arguement\r
+ if (!defined($successOnAuthenticationInconclusive)) {\r
+ $self->{strError} = "Success on authentication inconclusive is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolSuccessOnAuthenticationInconclusive} = $successOnAuthenticationInconclusive;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the Industry type.\r
+# * <p>\r
+# * @param industry Must be one of the following constants: DIRECT_MARKETING, RETAIL, LODGING, RESTAURANT.\r
+# * @exception TransactionProtocolException thrown if industry is not a valid charge type\r
+# * defined by this class.\r
+# */\r
+sub SetIndustry\r
+{\r
+ my $self = shift;\r
+ my $industry = shift; # take one string arguement\r
+ \r
+ if (!defined($industry)) {\r
+ $self->{strError} = "Industry is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($industry eq "") {\r
+ $self->{strError} = "Invalid industry";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if (!($industry eq DIRECT_MARKETING ||\r
+ $industry eq RETAIL || \r
+ $industry eq LODGING ||\r
+ $industry eq RESTAURANT )) {\r
+ $self->{strError} = "Invalid industry.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strIndustry} = $industry;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#/**\r
+# * Sets folio number\r
+# */\r
+sub SetFolioNumber\r
+{\r
+ my $self = shift;\r
+ my $folioNumber = shift; # take a string arguement\r
+ if (!defined($folioNumber)) {\r
+ $self->{strError} = "Folio number is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{strFolioNumber} = $folioNumber;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+\r
+#**\r
+# * Set the service rate using a floating point value.\r
+# * <p>\r
+# * @param ServiceRate Must be a positive floating-point number.\r
+# * E.g. Use <i>11.55</i> to represent $11.55.\r
+# * @exception TransactionProtocolException thrown if ServiceRate less than zero\r
+# */\r
+sub SetServiceRate\r
+{\r
+ my $self = shift;\r
+ my $ServiceRate = shift; # take a string or an integer arguement\r
+ \r
+ if (!defined($ServiceRate)) {\r
+ $self->{strError} = "Service rate is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ( $ServiceRate !~ /^(\d+\.?\d*|\.\d+)$/ ) {\r
+ $self->{strError} = "Non-numeric Service Rate.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ my $dServiceRate = $ServiceRate * 1.0;\r
+ if ($dServiceRate < 0) {\r
+ $self->{strError} = "Service rate cannot be negative.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $self->{dServiceRate} = $dServiceRate;\r
+ $self->{strServiceRate} = "".$ServiceRate;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+#**\r
+# * Set the service end day\r
+# */ \r
+sub SetServiceEndDay\r
+{\r
+ my $self = shift;\r
+ my $serviceEndDay = shift; #take one string arguement\r
+ if (!defined($serviceEndDay)) {\r
+ $self->{strError} = "Service end day is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceEndDay eq ""){\r
+ $self->{strError} = "Invalid service end day.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceEndDay =~ /\D/) {\r
+ $self->{strError} = "Invalid service end day (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceEndDay = 1 * $serviceEndDay;\r
+ if ($serviceEndDay < 1 || $serviceEndDay > 31) {\r
+ $self->{strError} .= "Invalid service end day (not 1 through 31).";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceEndDay} = $serviceEndDay;\r
+ \r
+ return 1;\r
+} \r
+\r
+ \r
+#**\r
+# * Set the service end month\r
+# */ \r
+sub SetServiceEndMonth\r
+{\r
+ my $self = shift;\r
+ my $serviceEndMonth = shift; #take one string arguement\r
+ if (!defined($serviceEndMonth)) {\r
+ $self->{strError} = "Service end month is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceEndMonth eq ""){\r
+ $self->{strError} = "Invalid service end month.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceEndMonth =~ /\D/) {\r
+ $self->{strError} = "Invalid service end month (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceEndMonth = 1 * $serviceEndMonth;\r
+ if ($serviceEndMonth < 1 || $serviceEndMonth > 12) {\r
+ $self->{strError} .= "Invalid service end month (not 1 through 12).";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceEndMonth} = $serviceEndMonth;\r
+ \r
+ return 1;\r
+} \r
+ \r
+#**\r
+# * Set the service end year\r
+# */ \r
+sub SetServiceEndYear\r
+{\r
+ my $self = shift;\r
+ my $serviceEndYear = shift; #take one string arguement\r
+ if (!defined($serviceEndYear)) {\r
+ $self->{strError} = "Service end year is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceEndYear eq ""){\r
+ $self->{strError} = "Invalid service end year.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceEndYear =~ /\D/) {\r
+ $self->{strError} = "Invalid service end year (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceEndYear = 1 * $serviceEndYear;\r
+ if ($serviceEndYear < 2005 || $serviceEndYear > 9999) {\r
+ $self->{strError} .= "Invalid service end year.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceEndYear} = $serviceEndYear;\r
+ \r
+ return 1;\r
+} \r
+\r
+\r
+#**\r
+# * Set the service start day\r
+# */ \r
+sub SetServiceStartDay\r
+{\r
+ my $self = shift;\r
+ my $serviceStartDay = shift; #take one string arguement\r
+ if (!defined($serviceStartDay)) {\r
+ $self->{strError} = "Service start day is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceStartDay eq ""){\r
+ $self->{strError} = "Invalid service start day.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceStartDay =~ /\D/) {\r
+ $self->{strError} = "Invalid service start day (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceStartDay = 1 * $serviceStartDay;\r
+ if ($serviceStartDay < 1 || $serviceStartDay > 31) {\r
+ $self->{strError} .= "Invalid service start day (not 1 through 31).";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceStartDay} = $serviceStartDay;\r
+ \r
+ return 1;\r
+} \r
+\r
+ \r
+#**\r
+# * Set the service start month\r
+# */ \r
+sub SetServiceStartMonth\r
+{\r
+ my $self = shift;\r
+ my $serviceStartMonth = shift; #take one string arguement\r
+ if (!defined($serviceStartMonth)) {\r
+ $self->{strError} = "Service start month is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceStartMonth eq ""){\r
+ $self->{strError} = "Invalid service start month.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceStartMonth =~ /\D/) {\r
+ $self->{strError} = "Invalid service start month (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceStartMonth = 1 * $serviceStartMonth;\r
+ if ($serviceStartMonth < 1 || $serviceStartMonth > 12) {\r
+ $self->{strError} .= "Invalid service start month (not 1 through 12).";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceStartMonth} = $serviceStartMonth;\r
+ \r
+ return 1;\r
+} \r
+ \r
+#**\r
+# * Set the service start year\r
+# */ \r
+sub SetServiceStartYear\r
+{\r
+ my $self = shift;\r
+ my $serviceStartYear = shift; #take one string arguement\r
+ if (!defined($serviceStartYear)) {\r
+ $self->{strError} = "Service start year is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ if ($serviceStartYear eq ""){\r
+ $self->{strError} = "Invalid service start year.";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ if ($serviceStartYear =~ /\D/) {\r
+ $self->{strError} = "Invalid service start year (non-digit).";\r
+ return CCR_ERROR;\r
+ }\r
+ \r
+ $serviceStartYear = 1 * $serviceStartYear;\r
+ if ($serviceStartYear < 2005 || $serviceStartYear > 9999) {\r
+ $self->{strError} .= "Invalid service start year.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{intServiceStartYear} = $serviceStartYear;\r
+ \r
+ return 1;\r
+} \r
+\r
+\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Restaurant flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesRestaurant\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesRestaurant = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesRestaurant)) {\r
+ $self->{strError} = "Charge Total Includes Restaurant is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesRestaurant} = $isChargeTotalIncludesRestaurant;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Giftshop flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesGiftshop\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesGiftshop = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesGiftshop)) {\r
+ $self->{strError} = "Charge Total Includes Giftshop is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesGiftshop} = $isChargeTotalIncludesGiftshop;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Minibar flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesMinibar\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesMinibar = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesMinibar)) {\r
+ $self->{strError} = "Charge Total Includes Minibar is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesMinibar} = $isChargeTotalIncludesMinibar;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Phone flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesPhone\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesPhone = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesPhone)) {\r
+ $self->{strError} = "Charge Total Includes Phone is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesPhone} = $isChargeTotalIncludesPhone;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Laundry flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesLaundry\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesLaundry = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesLaundry)) {\r
+ $self->{strError} = "Charge Total Includes Laundry is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesLaundry} = $isChargeTotalIncludesLaundry;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Charge Total Includes Other flag\r
+# * \r
+# */\r
+sub SetChargeTotalIncludesOther\r
+{\r
+ my $self = shift;\r
+ my $isChargeTotalIncludesOther = shift; # take a string arguement\r
+ if (!defined($isChargeTotalIncludesOther)) {\r
+ $self->{strError} = "Charge Total Includes Other is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolChargeTotalIncludesOther} = $isChargeTotalIncludesOther;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+#/**\r
+# * Sets the Service No Show flag\r
+# * \r
+# */\r
+sub SetServiceNoShow\r
+{\r
+ my $self = shift;\r
+ my $isServiceNoShow = shift; # take a string arguement\r
+ if (!defined($isServiceNoShow)) {\r
+ $self->{strError} = "Service No Show is undefined.";\r
+ return CCR_ERROR;\r
+ }\r
+ $self->{boolServiceNoShow} = $isServiceNoShow;\r
+ return CCR_NO_ERROR;\r
+}\r
+\r
+\r
+\r
+#/////////////////////////////////////////////////////////////////////////////////////////////////////\r
+#// Get Methods.\r
+#\r
+\r
+#/**\r
+# * Get the cartridge type.\r
+# * @returns the type of cartridge being used\r
+# */\r
+sub GetCartridgeType\r
+{\r
+ my $self = shift;\r
+ $self->{strCartridgeType};\r
+}\r
+\r
+#/**\r
+# * Get the Ecommerce Indicator\r
+# * @returns the Ecommerce Indicator\r
+# */\r
+sub GetEcommerceIndicator\r
+{\r
+ my $self = shift;\r
+ $self->{strEcommerceIndicator};\r
+}\r
+\r
+#/**\r
+# * Get the value of the credit card number.\r
+# * @see #setCreditCardNumber(JString)\r
+# * @return the value of the credit card number or an empty String if the credit card number was not set\r
+# */\r
+sub GetCreditCardNumber\r
+{\r
+ my $self = shift;\r
+ $self->{strCreditCardNumber};\r
+}\r
+\r
+#/**\r
+# * Get the value of the credit card number.\r
+# * @return the value of the credit card verification number or an empty String if the credit card number was not set\r
+# */\r
+sub GetCreditCardVerificationNumber\r
+{\r
+ my $self = shift;\r
+ $self->{strCreditCardVerificationNumber};\r
+}\r
+\r
+#**\r
+# * Get the value of the credit card's expire year.\r
+# * @see #setExpireYear(JString)\r
+# * @return the String passed to setExpireYear or an empty String if the expire year was not set\r
+# */\r
+sub GetExpireYear\r
+{\r
+ my $self = shift;\r
+ $self->{strExpireYear};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the credit card's expire month.\r
+# * @see #setExpireMonth(String)\r
+# * @return the String passed to setExpireMonth or an empty String if the expire month was not set\r
+# */\r
+sub GetExpireMonth\r
+{\r
+ my $self = shift;\r
+ $self->{strExpireMonth};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the charge type. The possible values are defined\r
+# * by the constants of this class documented in setChargeType(String)\r
+# * The chage type indicates what action to take with this credit card\r
+# * transaction.\r
+# * @see #setChargeType(String)\r
+# * @return the String passed to setChargeType or an empty String if the charge type was not set\r
+#\r
+sub GetChargeType()\r
+{\r
+ my $self = shift;\r
+ $self->{strChargeType};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the charge total. The charge total is the amount that\r
+# * will be used for this credit card transaction.\r
+# * @see #setChargeTotal(double)\r
+# * @see #setChargeTotal(String)\r
+# * @return the value of the charge total or -1 if the charge total was not set\r
+#\r
+sub GetChargeTotal\r
+{\r
+ my $self = shift;\r
+ $self->{dChargeTotal};\r
+}\r
+\r
+sub GetChargeTotalStr\r
+{\r
+ my $self = shift;\r
+ $self->{strChargeTotal};\r
+}\r
+\r
+#**\r
+# * Get the value of the card brand. The card brand identifies the type\r
+# * of card being used. The card brand must be one of the constants defined\r
+# * by this class and documented in setCardBrand(JString)\r
+# * @see #setCardBrand(JString)\r
+# * @return the value of the card brand or an empty String if the card brand was not set\r
+#/\r
+sub GetCardBrand\r
+{\r
+ my $self = shift;\r
+ $self->{strCardBrand};\r
+}\r
+\r
+#**\r
+# * Get the value of the order id. The order id must be a unique identifier\r
+# * for a paticular order.\r
+# * @see #setOrderId(JString)\r
+# * @return the value of the order id or an empty String if the order id was not set\r
+# */\r
+sub GetOrderId\r
+{\r
+ my $self = shift;\r
+ $self->{strOrderId};\r
+}\r
+\r
+\r
+\r
+#**\r
+# * Get the value of the capture reference id. The capture reference id is the\r
+# * value returned from an "AUTH" credit card transaction that must be presented\r
+# * when to the "CAPTURE" for that order.\r
+# * @see #setCaptureReferenceId(JString)\r
+# * @return the value of the capture reference id or an empty String if the capture reference id was not set\r
+#\r
+sub GetCaptureReferenceId\r
+{\r
+ my $self = shift;\r
+ $self->{strReferenceId};\r
+}\r
+\r
+#\r
+# Get Reference Id\r
+# This should be used instead of GetCaptureReferenceId\r
+# Added in v1.6\r
+#\r
+sub GetReferenceId\r
+{\r
+ my $self = shift;\r
+ $self->{strReferenceId};\r
+}\r
+\r
+#/**\r
+# * Get the value of the order description. The order description is a comment\r
+# * that describes the order.\r
+# * @see #setOrderDescription(JString)\r
+# * @return the value of the order description or an empty String if the order description was not set\r
+#/\r
+sub GetOrderDescription\r
+{\r
+ my $self = shift;\r
+ $self->{strOrderDescription};\r
+}\r
+\r
+#**\r
+# * Get the value of the order user id. The order user id is a unique identifier\r
+# * for a merchant's customer.\r
+# * @see #setOrderUserId(String)\r
+# * @return the value of the order user id of an empty String if order user id was not set\r
+#\r
+sub GetOrderUserId\r
+{\r
+ my $self = shift;\r
+ $self->{strOrderUserId};\r
+}\r
+\r
+#**\r
+# * Get the value of the duplicate check. \r
+# * Possible values are: CHECK; OVERRIDE; NO_CHECK.\r
+# * @see #setDuplicateCheck(String)\r
+# * @return the value of the duplicate check or an empty String if the dc was not set\r
+#\r
+sub GetDuplicateCheck\r
+{\r
+ my $self = shift;\r
+ $self->{strDuplicateCheck};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the bank approval code. The bank approval code is the\r
+# * value required for a "FORCE_AUTH" or "FORCE_SALE" credit card transaction.\r
+# * It is obtained offline via a phone call to the merchant's bank 'voice auth' \r
+# * phone number. The card holder is not present in this type of transaction.\r
+# * @see #setBankApprovalCode(String)\r
+# * @return the value of the bank approval code or an empty String if the bac was not set\r
+#\r
+sub GetBankApprovalCode\r
+{\r
+ my $self = shift;\r
+ $self->{strBankApprovalCode};\r
+}\r
+\r
+\r
+#**\r
+# * The tax amount is the amount of the the charge total that is tax.\r
+# * @see #setTaxAmount\r
+# * @see #setChargeTotal\r
+# * @return value of the tax amount of -1 if the tax amount has not been set.\r
+#\r
+sub GetTaxAmount\r
+{\r
+ my $self = shift;\r
+ $self->{dTaxAmount};\r
+}\r
+\r
+sub GetTaxAmountStr\r
+{\r
+ my $self = shift;\r
+ $self->{strTaxAmount};\r
+}\r
+\r
+\r
+#**\r
+# * The shipping charge is the amount of the charge total that is shipping charges.\r
+# * @see #setShippingCharge\r
+# * @see #setChargeTotal\r
+# * @return value of the shipping charge or -1 if the shipping charge has not been set\r
+# */\r
+sub GetShippingCharge\r
+{\r
+ my $self = shift;\r
+ $self->{dShippingCharge};\r
+}\r
+\r
+sub GetShippingChargeStr\r
+{\r
+ my $self = shift;\r
+ $self->{strShippingCharge};\r
+}\r
+\r
+\r
+#/**\r
+# * Get the value of the first name of the customer being billed.\r
+# * @see #setBillFirstName(JString)\r
+# * @return the billing first name or an empty String if the billing first name was not set\r
+# */\r
+sub GetBillFirstName\r
+{\r
+ my $self = shift;\r
+ $self->{strBillFirstName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the last name of the customer being billed.\r
+# * @see #setBillLastName(String)\r
+# * return the billing last name or an empty String if the billing last name was not set\r
+# */\r
+sub GetBillLastName\r
+{\r
+ my $self = shift;\r
+ $self->{strBillLastName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the middle name of the customer being billed.\r
+# * @see #setBillMiddleName(JString)\r
+# * @return the billing middle name or an empty String if the billing middle name was not set\r
+# */\r
+sub GetBillMiddleName\r
+{\r
+ my $self = shift;\r
+ $self->{strBillMiddleName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the title of the customer being billed.\r
+# * @see #setBillCustomerTitle(JString)\r
+# * @return the billing customer title or an empty String if billing customer title was not set\r
+# */\r
+sub GetBillCustomerTitle\r
+{\r
+ my $self = shift;\r
+ $self->{strBillCustomerTitle};\r
+}\r
+\r
+#**\r
+# * Get the value of the company name of the customer being billed.\r
+# * @see #setBillCompany(JString)\r
+# * @return the billing company name or an empty String if the billing company name was not set\r
+#\r
+sub GetBillCompany\r
+{\r
+ my $self = shift;\r
+ $self->{strBillCompany};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the first part of the billing address.\r
+# * @see #setBillAddressOne(JString)\r
+# * @return the first part of the billing address or an empty String if the billing address part one was not set\r
+# */\r
+sub GetBillAddressOne\r
+{\r
+ my $self = shift;\r
+ $self->{strBillAddressOne};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the second part of the billing address.\r
+# * @see #setBillAddressTwo(JString)\r
+# * @return the second part of the billing address or an empty String if the billing address part two was not set\r
+# */\r
+sub GetBillAddressTwo\r
+{\r
+ my $self = shift;\r
+ $self->{strBillAddressTwo};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the city for the billing address.\r
+# * @see #setBillCity(JString)\r
+# * @return the billing address city or an empty String if the billing city was not set\r
+# */\r
+sub GetBillCity\r
+{\r
+ my $self = shift;\r
+ $self->{strBillCity};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the state or province for the billing address.\r
+# * @see #setBillStateOrProvince(String)\r
+# * @return the billing address state or province or an empty String if billing state or province was not set\r
+# */\r
+sub GetBillStateOrProvince\r
+{\r
+ my $self = shift;\r
+ $self->{strBillStateOrProvince};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the postal code for the billing address.\r
+# * @see #setBillPostalCode(String)\r
+# * @return the billing address postal code or an empty String if billing postal code was not set\r
+#*/\r
+sub GetBillPostalCode\r
+{\r
+ my $self = shift;\r
+ $self->{strBillPostalCode};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the country for the billing address.\r
+# * @see #setBillCountryCode(JString)\r
+# * @return the billing country or an empty String if the billing country was not set\r
+#\r
+sub GetBillCountryCode\r
+{\r
+ my $self = shift;\r
+ $self->{strBillCountryCode};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the email address of the customer being billed.\r
+# * @see #setBillEmail(JString)\r
+# * @return the billing email address or an empty String if the billing email was not set\r
+#\r
+sub GetBillEmail\r
+{\r
+ my $self = shift;\r
+ $self->{strBillEmail};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the phone number of the customer being billed.\r
+# * @see #setBillPhone(JString)\r
+# * @return the billing phone number or an empty String if the billing phone number was not set\r
+# */\r
+sub GetBillPhone\r
+{\r
+ my $self = shift;\r
+ $self->{strBillPhone};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the fax number of the customer being billed.\r
+# * @see #setBillFax(JString)\r
+# * @return the billing fax number or an empty String if the billing fax number was not set\r
+# */\r
+sub GetBillFax\r
+{\r
+ my $self = shift;\r
+ $self->{strBillFax};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the billing note. The billing note is an extra\r
+# * comment to the billing information.\r
+# * @see #setBillNote(JString)\r
+# * @return the billing note or an empty String if the billing not was not set\r
+#\r
+sub GetBillNote\r
+{\r
+ my $self = shift;\r
+ $self->{strBillNote};\r
+}\r
+\r
+#**\r
+# * Get the value of the first name of the customer being shipped to.\r
+# * @see #setShipFirstName(JString)\r
+# * @return the shipping first name or an empty String if the shipping first name was not set\r
+#\r
+sub GetShipFirstName\r
+{\r
+ my $self = shift;\r
+ $self->{strShipFirstName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the last name of the customer being shipped to.\r
+# * @see #setShipLastName(JString)\r
+# * @return the shipping last name or an empty String if the shipping last name was not set\r
+# */\r
+sub GetShipLastName\r
+{\r
+ my $self = shift;\r
+ $self->{strShipLastName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the middle name of the customer being shipped to.\r
+# * @see #setShipMiddleName(JString)\r
+# * @return the shipping middle name or an empty String if the shipping middle name was not set\r
+# */\r
+sub GetShipMiddleName\r
+{\r
+ my $self = shift;\r
+ $self->{strShipMiddleName};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the title of the customer being shipped to.\r
+# * @see #setShipCustomerTitle(String)\r
+# * @return the shipping customer title or an empty String if the shipping customer title was not set\r
+#\r
+sub GetShipCustomerTitle\r
+{\r
+ my $self = shift;\r
+ $self->{strShipCustomerTitle};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the company name of the customer being shipped to.\r
+# * @see #setShipCompany(JString)\r
+# * @return the shipping company name or an empty String if the shipping company name was not set\r
+# */\r
+sub GetShipCompany\r
+{\r
+ my $self = shift;\r
+ $self->{strShipCompany};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the first part of the shipping address.\r
+# * @see #setShipAddressOne(JString)\r
+# * @return the first part of the shipping address or an empty String if the shipping address part one was not set\r
+# */\r
+sub GetShipAddressOne\r
+{\r
+ my $self = shift;\r
+ $self->{strShipAddressOne};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the second part of the shipping address.\r
+# * @see #setShipAddressTwo(JString)\r
+# * @return the second part of the shipping address or an empty String if the shipping address part two was not set\r
+#\r
+sub GetShipAddressTwo\r
+{\r
+ my $self = shift;\r
+ $self->{strShipAddressTwo};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the city for the shipping address.\r
+# * @see #setShipCity(JString)\r
+# * @return the shipping address city or an empty String if the shipping city was not set\r
+#\r
+sub GetShipCity\r
+{\r
+ my $self = shift;\r
+ $self->{strShipCity};\r
+}\r
+\r
+#**\r
+# * Get the value of the state or province for the shipping address.\r
+# * @see #setShipStateOrProvince(JString)\r
+# * @return the shipping address state or province or an empty String if the shipping state or provice was not set\r
+# */\r
+sub GetShipStateOrProvince\r
+{\r
+ my $self = shift;\r
+ $self->{strShipStateOrProvince};\r
+}\r
+\r
+\r
+#*\r
+# * Get the value of the postal code for the shipping address.\r
+# * @see #setShipPostalCode(JString)\r
+# * @return the shipping address postal code or an empty String if the shipping postal code was not set\r
+# */\r
+sub GetShipPostalCode\r
+{\r
+ my $self = shift;\r
+ $self->{strShipPostalCode};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the country for the shipping address.\r
+# * @see #setShipCountryCode(JString)\r
+# * @return the shipping country or an empty String if the shipping country was not set\r
+# */\r
+sub GetShipCountryCode\r
+{\r
+ my $self = shift;\r
+ $self->{strShipCountryCode};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the email address of the customer being shipped to.\r
+# * @see #setShipEmail(JString)\r
+# * @return the shipping email address or an empty String if the shipping customer email address was not set\r
+# */\r
+sub GetShipEmail\r
+{\r
+ my $self = shift;\r
+ $self->{strShipEmail};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the phone number of the customer being shipped to.\r
+# * @see #setShipPhone(JString)\r
+# * @return the shipping phone number or an empty String if the shipping customer phone number was not set\r
+# */\r
+sub GetShipPhone\r
+{\r
+ my $self = shift;\r
+ $self->{strShipPhone};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the fax number of the customer being shipped to.\r
+# * @see #setShipFax(JString)\r
+# * @return the shipping fax number or an empty JString if the shipping customer fax number was not set\r
+# */\r
+sub GetShipFax\r
+{\r
+ my $self = shift;\r
+ $self->{strShipFax};\r
+}\r
+\r
+\r
+#**\r
+# * Get the value of the shipping note. The shipping note is an extra\r
+# * comment to the shipping information.\r
+# * @see #setShipNote(JString)\r
+# * @return the shipping note or an empty String if the shipping note was not set\r
+# */\r
+sub GetShipNote\r
+{\r
+ my $self = shift;\r
+ $self->{strShipNote};\r
+}\r
+\r
+\r
+#**\r
+# * Method to get a CreditCardResponse object.\r
+# */\r
+sub GetTransResponseObject\r
+{\r
+ my $self = shift;\r
+ my $InString = shift;\r
+ return new Business::OnlinePayment::PPIPayMover::CreditCardResponse($InString);\r
+}\r
+\r
+\r
+#/**\r
+# * Get the value of the currency. The currency that\r
+# * will be used for this transaction. If the merchant\r
+# * does not have an account configured to process this currency, the\r
+# * Transaction Server will return an error.\r
+# * @see #setCurrency(String) \r
+# * @return the currency or "" if the currency was not set\r
+# */\r
+sub GetCurrency\r
+{\r
+ my $self = shift;\r
+ $self->{strCurrency};\r
+}\r
+\r
+\r
+#/**\r
+# * Gets the buyer code\r
+# */\r
+sub GetBuyerCode\r
+{\r
+ my $self = shift;\r
+ $self->{strBuyerCode};\r
+}\r
+\r
+#/**\r
+# * Gets the CAVV (for VBV transactions)\r
+# */\r
+sub GetCAVV\r
+{\r
+ my $self = shift;\r
+ $self->{strCAVV};\r
+}\r
+\r
+#/**\r
+# * Gets the Customer IP Address\r
+# */\r
+sub GetCustomerIPAddress\r
+{\r
+ my $self = shift;\r
+ $self->{strCustomerIPAddress};\r
+}\r
+\r
+#/**\r
+# * Gets the Order Customer ID\r
+# */\r
+sub GetOrderCustomerId\r
+{\r
+ my $self = shift;\r
+ $self->{strOrderCustomerID};\r
+}\r
+\r
+#/**\r
+# * Gets the purchase order number\r
+# */\r
+sub GetPurchaseOrderNumber\r
+{\r
+ my $self = shift;\r
+ $self->{strPurchaseOrderNumber};\r
+}\r
+\r
+#/**\r
+# * Gets the state tax\r
+# */\r
+sub GetStateTax\r
+{\r
+ my $self = shift;\r
+ $self->{dStateTax};\r
+}\r
+\r
+#/**\r
+# * Gets the track 1 data\r
+# */\r
+sub GetTrack1\r
+{\r
+ my $self = shift;\r
+ $self->{strTrack1};\r
+}\r
+\r
+#/**\r
+# * Gets the track 2 data\r
+# */\r
+sub GetTrack2\r
+{\r
+ my $self = shift;\r
+ $self->{strTrack2};\r
+}\r
+\r
+#/**\r
+# * Gets the transaction condition code\r
+# */\r
+sub GetTransactionConditionCode\r
+{\r
+ my $self = shift;\r
+ $self->{strTransactionConditionCode};\r
+}\r
+\r
+#/**\r
+# * Gets the xid\r
+# */\r
+sub GetXID\r
+{\r
+ my $self = shift;\r
+ $self->{strXID};\r
+}\r
+\r
+#/**\r
+# * Gets tax exempt flag\r
+# */\r
+sub GetTaxExempt\r
+{\r
+ my $self = shift;\r
+ $self->{boolTaxExempt};\r
+}\r
+\r
+#/**\r
+# * Gets invoice number\r
+# */\r
+sub GetInvoiceNumber\r
+{\r
+ my $self = shift;\r
+ $self->{strInvoiceNumber};\r
+}\r
+\r
+#/**\r
+# * Gets the Authentication Transaction ID\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub GetAuthenticationTransactionId\r
+{\r
+ my $self = shift;\r
+ $self->{strAuthenticationTransactionId};\r
+}\r
+\r
+#/**\r
+# * Gets the Authentication Payload\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub GetAuthenticationPayload\r
+{\r
+ my $self = shift;\r
+ $self->{strAuthenticationPayload};\r
+}\r
+\r
+#/**\r
+# * Gets the Success On Authentication Inconclusive\r
+# * \r
+# * Used in Payer Authentication transaction type\r
+# */\r
+sub GetDoTransactionOnAuthenticationInconclusive\r
+{\r
+ my $self = shift;\r
+ $self->{boolSuccessOnAuthenticationInconclusive};\r
+}\r
+\r
+\r
+#/**\r
+# * Gets the industry\r
+# */\r
+sub GetIndustry\r
+{\r
+ my $self = shift;\r
+ $self->{strIndustry};\r
+}\r
+\r
+#/**\r
+# * Gets the folio number\r
+# */\r
+sub GetFolioNumber\r
+{\r
+ my $self = shift;\r
+ $self->{strFolioNumber};\r
+}\r
+\r
+#/**\r
+# * Gets the service rate\r
+# */\r
+sub GetServiceRate\r
+{\r
+ my $self = shift;\r
+ $self->{dServiceRate};\r
+}\r
+\r
+#/**\r
+# * Gets the service rate as a String\r
+# */\r
+sub GetServiceRateStr\r
+{\r
+ my $self = shift;\r
+ $self->{strServiceRate};\r
+}\r
+\r
+#/**\r
+# * Gets the service start year\r
+# */\r
+sub GetServiceStartYear\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceStartYear};\r
+}\r
+\r
+#/**\r
+# * Gets the service start month\r
+# */\r
+sub GetServiceStartMonth\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceStartMonth};\r
+}\r
+\r
+#/**\r
+# * Gets the service start day\r
+# */\r
+sub GetServiceStartDay\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceStartDay};\r
+}\r
+\r
+#/**\r
+# * Gets the service end year\r
+# */\r
+sub GetServiceEndYear\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceEndYear};\r
+}\r
+\r
+#/**\r
+# * Gets the service end month\r
+# */\r
+sub GetServiceEndMonth\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceEndMonth};\r
+}\r
+\r
+#/**\r
+# * Gets the service end day\r
+# */\r
+sub GetServiceEndDay\r
+{\r
+ my $self = shift;\r
+ $self->{intServiceEndDay};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Restaurant flag\r
+# */\r
+sub GetChargeTotalIncludesRestaurant\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesRestaurant};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Giftshop flag\r
+# */\r
+sub GetChargeTotalIncludesGiftshop\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesGiftshop};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Minibar flag\r
+# */\r
+sub GetChargeTotalIncludesMinibar\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesMinibar};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Laundry flag\r
+# */\r
+sub GetChargeTotalIncludesLaundry\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesLaundry};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Phone flag\r
+# */\r
+sub GetChargeTotalIncludesPhone\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesPhone};\r
+}\r
+\r
+#/**\r
+# * Gets the Charge Total Includes Other flag\r
+# */\r
+sub GetChargeTotalIncludesOther\r
+{\r
+ my $self = shift;\r
+ $self->{boolChargeTotalIncludesOther};\r
+}\r
+\r
+#/**\r
+# * Gets the Service No Show flag\r
+# */\r
+sub GetServiceNoShow\r
+{\r
+ my $self = shift;\r
+ $self->{boolServiceNoShow};\r
+}\r
+\r
+\r
+\r
+#**\r
+# * Method to create the post string.\r
+# */\r
+sub WriteRequest\r
+{\r
+ my $self = shift;\r
+ my $class =ref($self);\r
+ my $PostString = shift; # a pointer to string as arguement\r
+ my $temp = "";\r
+ $self->SUPER::WriteRequest($PostString);\r
+ \r
+# Cartridge Type\r
+ $temp = Encode( $self->{strCartridgeType} );\r
+ $$PostString .= "cartridge_type=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Ecommerce Indicator\r
+ $temp = Encode( $self->{strEcommerceIndicator} );\r
+ $$PostString .= "ecommerce_indicator=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# fixed value for transaction_type\r
+ $$PostString .= "transaction_type=CREDIT_CARD";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# creditCardNumber\r
+ $temp = Encode( $self->{strCreditCardNumber} );\r
+ $$PostString .= "credit_card_number=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# creditCardVerificationNumber\r
+ $temp = Encode( $self->{strCreditCardVerificationNumber} );\r
+ $$PostString .= "credit_card_verification_number=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# expireMonth\r
+ $temp = Encode( $self->{strExpireMonth} );\r
+ $$PostString .= "expire_month=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# expireYear\r
+ $temp = Encode( $self->{strExpireYear} );\r
+ $$PostString .= "expire_year=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# chargeType\r
+ $temp = Encode( $self->{strChargeType} );\r
+ $$PostString .= "charge_type=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# chargeTotal\r
+ $$PostString .= "charge_total=";\r
+ $$PostString .= Encode( $self->{dChargeTotal} );\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# cardBrand\r
+# $$PostString .= "card_brand=";\r
+# $$PostString .= Encode( $self->{strCardBrand} );\r
+# $$PostString .= $self->{strParamSeparator};\r
+ \r
+# orderId\r
+ $temp = Encode( $self->{strOrderId} );\r
+ $$PostString .= "order_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# captureReferenceId\r
+ $temp = Encode( $self->{strReferenceId} );\r
+ $$PostString .= "reference_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# orderDescription\r
+ $temp = Encode( $self->{strOrderDescription} );\r
+ $$PostString .= "order_description=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# orderUserId\r
+ $temp = Encode( $self->{strOrderUserId} );\r
+ $$PostString .= "order_user_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# BankApprovalCode\r
+ $temp = Encode( $self->{strBankApprovalCode} );\r
+ $$PostString .= "bank_approval_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# DuplicateCheck\r
+ $temp = Encode( $self->{strDuplicateCheck} );\r
+ $$PostString .= "duplicate_check=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# taxAmount\r
+ $$PostString .= "tax_amount=";\r
+ $$PostString .= Encode( $self->{dTaxAmount} );\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shippingCharge\r
+ $$PostString .= "shipping_charge=";\r
+ $$PostString .= Encode( $self->{dShippingCharge} );\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billFirstName\r
+ $temp = Encode( $self->{strBillFirstName} );\r
+ $$PostString .= "bill_first_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billMiddleName\r
+ $temp = Encode( $self->{strBillMiddleName} );\r
+ $$PostString .= "bill_middle_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billLastName\r
+ $temp = Encode( $self->{strBillLastName} );\r
+ $$PostString .= "bill_last_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billCustomerTitle\r
+ $temp = Encode( $self->{strBillCustomerTitle} );\r
+ $$PostString .= "bill_customer_title=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billCompany\r
+ $temp = Encode( $self->{strBillCompany} );\r
+ $$PostString .= "bill_company=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billAddressOne\r
+ $temp = Encode( $self->{strBillAddressOne} );\r
+ $$PostString .= "bill_address_one=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billAddressTwo\r
+ $temp = Encode( $self->{strBillAddressTwo} );\r
+ $$PostString .= "bill_address_two=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billCity\r
+ $temp = Encode( $self->{strBillCity} );\r
+ $$PostString .= "bill_city=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billStateOrProvince\r
+ $temp = Encode( $self->{strBillStateOrProvince} );\r
+ $$PostString .= "bill_state_or_province=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billPostalCode\r
+ $temp = Encode( $self->{strBillPostalCode} );\r
+ $$PostString .= "bill_postal_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billCountryCode\r
+ $temp = Encode( $self->{strBillCountryCode} );\r
+ $$PostString .= "bill_country_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billEmail\r
+ $temp = Encode( $self->{strBillEmail} );\r
+ $$PostString .= "bill_email=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billPhone\r
+ $temp = Encode( $self->{strBillPhone} );\r
+ $$PostString .= "bill_phone=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billFax\r
+ $temp = Encode( $self->{strBillFax} );\r
+ $$PostString .= "bill_fax=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# billNote\r
+ $temp = Encode( $self->{strBillNote} );\r
+ $$PostString .= "bill_note=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipFirstName\r
+ $temp = Encode( $self->{strShipFirstName} );\r
+ $$PostString .= "ship_first_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipMiddleName\r
+ $temp = Encode( $self->{strShipMiddleName} );\r
+ $$PostString .= "ship_middle_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipLastName\r
+ $temp = Encode( $self->{strShipLastName} );\r
+ $$PostString .= "ship_last_name=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipCustomerTitle\r
+ $temp = Encode( $self->{strShipCustomerTitle} );\r
+ $$PostString .= "ship_customer_title=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipCompany\r
+ $temp = Encode( $self->{strShipCompany} );\r
+ $$PostString .= "ship_company=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipAddressOne\r
+ $temp = Encode( $self->{strShipAddressOne} );\r
+ $$PostString .= "ship_address_one=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipAddressTwo\r
+ $temp = Encode( $self->{strShipAddressTwo} );\r
+ $$PostString .= "ship_address_two=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipCity\r
+ $temp = Encode( $self->{strShipCity} );\r
+ $$PostString .= "ship_city=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipStateOrProvince\r
+ $temp = Encode( $self->{strShipStateOrProvince} );\r
+ $$PostString .= "ship_state_or_province=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipPostalCode\r
+ $temp = Encode( $self->{strShipPostalCode} );\r
+ $$PostString .= "ship_postal_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipCountryCode\r
+ $temp = Encode( $self->{strShipCountryCode} );\r
+ $$PostString .= "ship_country_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipEmail\r
+ $temp = Encode( $self->{strShipEmail} );\r
+ $$PostString .= "ship_email=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipPhone\r
+ $temp = Encode( $self->{strShipPhone} );\r
+ $$PostString .= "ship_phone=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipFax\r
+ $temp = Encode( $self->{strShipFax} );\r
+ $$PostString .= "ship_fax=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# shipNote\r
+ $temp = Encode( $self->{strShipNote} );\r
+ $$PostString .= "ship_note=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# Currency \r
+# $temp = Encode( $self->{strCurrency} );\r
+# $$PostString .= "currency=$temp";\r
+# $$PostString .= $self->{strParamSeparator};\r
+\r
+# Buyer Code\r
+ $temp = Encode( $self->{strBuyerCode} );\r
+ $$PostString .= "buyer_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# CAVV\r
+ $temp = Encode( $self->{strCAVV} );\r
+ $$PostString .= "cavv=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Customer IP Address\r
+ $temp = Encode( $self->{strCustomerIPAddress} );\r
+ $$PostString .= "customer_ip_address=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Order Customer ID\r
+ $temp = Encode( $self->{strOrderCustomerID} );\r
+ $$PostString .= "order_customer_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Purchase Order Number\r
+ $temp = Encode( $self->{strPurchaseOrderNumber} );\r
+ $$PostString .= "purchase_order_number=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# State Tax\r
+ $temp = Encode( $self->{dStateTax} );\r
+ if( $temp == -1 ) {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "state_tax=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Track 1\r
+ $temp = Encode( $self->{strTrack1} );\r
+ $$PostString .= "track1=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Track 2\r
+ $temp = Encode( $self->{strTrack2} );\r
+ $$PostString .= "track2=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Transaction condition code\r
+ $temp = Encode( $self->{strTransactionConditionCode} );\r
+ $$PostString .= "transaction_condition_code=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# XID\r
+ $temp = Encode( $self->{strXID} );\r
+ $$PostString .= "x_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# Invoice number\r
+ $temp = Encode( $self->{strInvoiceNumber} );\r
+ $$PostString .= "invoice_number=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+\r
+# Tax Exempt\r
+ $temp = $self->{boolTaxExempt};\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(! $temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "tax_exempt=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Authentication Transaction ID\r
+ $temp = Encode( $self->{strAuthenticationTransactionId} );\r
+ $$PostString .= "authentication_transaction_id=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+\r
+# Authentication Payload\r
+ $temp = Encode( $self->{strAuthenticationPayload} );\r
+ $$PostString .= "authentication_payload=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+\r
+# Success On Authentication Inconclusive\r
+ $temp = $self->{boolSuccessOnAuthenticationInconclusive};\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "success_on_authentication_inconclusive=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Industry\r
+ $temp = Encode( $self->{strIndustry} );\r
+ $$PostString .= "industry=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Folio number\r
+ $temp = Encode( $self->{strFolioNumber} );\r
+ $$PostString .= "folio_number=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service Rate\r
+ $temp = Encode( $self->{dServiceRate} );\r
+ if( $temp == -1 ) {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "service_rate=$temp";\r
+ $$PostString .= $self->{strParamSeparator};\r
+ \r
+# Service Start Day\r
+ $temp = Encode( $self->{intServiceStartDay} );\r
+ $$PostString .= "service_start_day=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service Start Month\r
+ $temp = Encode( $self->{intServiceStartMonth} );\r
+ $$PostString .= "service_start_month=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service Start Year\r
+ $temp = Encode( $self->{intServiceStartYear} );\r
+ $$PostString .= "service_start_year=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service End Day\r
+ $temp = Encode( $self->{intServiceEndDay} );\r
+ $$PostString .= "service_end_day=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service End Month\r
+ $temp = Encode( $self->{intServiceEndMonth} );\r
+ $$PostString .= "service_end_month=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service End Year\r
+ $temp = Encode( $self->{intServiceEndYear} );\r
+ $$PostString .= "service_end_year=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Charge Total Includes Restaurant\r
+ $temp = Encode( $self->{boolChargeTotalIncludesRestaurant} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_restaurant=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Charge Total Includes Giftshop\r
+ $temp = Encode( $self->{boolChargeTotalIncludesGiftshop} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_giftshop=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Charge Total Includes Minibar\r
+ $temp = Encode( $self->{boolChargeTotalIncludesMinibar} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_minibar=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Charge Total Includes Phone\r
+ $temp = Encode( $self->{boolChargeTotalIncludesPhone} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_phone=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+\r
+# Charge Total Includes Laundry\r
+ $temp = Encode( $self->{boolChargeTotalIncludesLaundry} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_laundry=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Charge Total Includes Other\r
+ $temp = Encode( $self->{boolChargeTotalIncludesOther} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "charge_total_incl_other=$temp";\r
+ $$PostString .= $self->{strParamSeparator}; \r
+ \r
+# Service No Show\r
+ $temp = Encode( $self->{boolServiceNoShow} );\r
+ if ( $temp eq "" ) {\r
+ #not set. leave it.\r
+ } elsif ( $temp ) {\r
+ $temp = "true";\r
+ } elsif(!$temp) {\r
+ $temp = "false";\r
+ } else {\r
+ $temp = "";\r
+ }\r
+ $$PostString .= "service_no_show=$temp";\r
+ \r
+# No parameter separator on last line.\r
+\r
+}\r
+\r
+sub GetErrorString\r
+{\r
+ my $self = shift;\r
+ return $self->{strError};\r
+}\r
+\r
+\r