Module: Hps

Extended by:
Configuration
Defined in:
lib/hps.rb,
lib/hps/version.rb,
lib/hps/configuration.rb,
lib/hps/entities/hps_void.rb,
lib/hps/entities/hps_batch.rb,
lib/hps/entities/hps_check.rb,
lib/hps/entities/hps_charge.rb,
lib/hps/entities/hps_refund.rb,
lib/hps/entities/hps_address.rb,
lib/hps/services/hps_service.rb,
lib/hps/entities/hps_reversal.rb,
lib/hps/entities/hps_gift_card.rb,
lib/hps/entities/hps_cardholder.rb,
lib/hps/entities/hps_token_data.rb,
lib/hps/entities/hps_track_data.rb,
lib/hps/entities/hps_credit_card.rb,
lib/hps/entities/hps_transaction.rb,
lib/hps/entities/hps_check_holder.rb,
lib/hps/entities/hps_authorization.rb,
lib/hps/entities/hps_manage_tokens.rb,
lib/hps/services/hps_batch_service.rb,
lib/hps/services/hps_check_service.rb,
lib/hps/entities/hps_account_verify.rb,
lib/hps/entities/hps_check_response.rb,
lib/hps/infrastructure/hps_sec_code.rb,
lib/hps/services/hps_charge_service.rb,
lib/hps/entities/hps_encryption_data.rb,
lib/hps/infrastructure/hps_exception.rb,
lib/hps/infrastructure/hps_sdk_codes.rb,
lib/hps/entities/hps_transaction_type.rb,
lib/hps/infrastructure/card_exception.rb,
lib/hps/infrastructure/hps_check_type.rb,
lib/hps/entities/hps_charge_exceptions.rb,
lib/hps/services/hps_gift_card_service.rb,
lib/hps/entities/hps_direct_market_data.rb,
lib/hps/entities/hps_transaction_header.rb,
lib/hps/infrastructure/hps_account_type.rb,
lib/hps/entities/hps_transaction_details.rb,
lib/hps/infrastructure/hps_check_exception.rb,
lib/hps/infrastructure/hps_data_entry_mode.rb,
lib/hps/entities/hps_check_response_details.rb,
lib/hps/infrastructure/hps_exception_mapper.rb,
lib/hps/infrastructure/hps_input_validation.rb,
lib/hps/infrastructure/hps_track_data_method.rb,
lib/hps/entities/hps_report_transaction_details.rb,
lib/hps/entities/hps_report_transaction_summary.rb,
lib/hps/infrastructure/api_connection_exception.rb,
lib/hps/infrastructure/authentication_exception.rb,
lib/hps/infrastructure/invalid_request_exception.rb,
lib/hps/infrastructure/hps_gateway_response_validation.rb

Defined Under Namespace

Modules: Configuration, HpsTransactionType, ItemChoiceTypePosResponseVer10Transaction, SdkCodes Classes: ApiConnectionException, AuthenticationException, CardException, ExceptionMapper, HpsAccountType, HpsAccountVerify, HpsAddress, HpsAuthorization, HpsBatch, HpsBatchService, HpsCardHolder, HpsCharge, HpsChargeExceptions, HpsChargeService, HpsCheck, HpsCheckException, HpsCheckHolder, HpsCheckResponse, HpsCheckResponseDetails, HpsCheckService, HpsCheckType, HpsCreditCard, HpsDataEntryMode, HpsDirectMarketData, HpsEncryptionData, HpsException, HpsGatewayResponseValidation, HpsGiftCard, HpsGiftCardActivate, HpsGiftCardAddValue, HpsGiftCardAlias, HpsGiftCardBalance, HpsGiftCardDeactivate, HpsGiftCardReplace, HpsGiftCardReversal, HpsGiftCardReward, HpsGiftCardSale, HpsGiftCardService, HpsGiftCardVoid, HpsInputValidation, HpsManageTokens, HpsRefund, HpsReportTransactionDetails, HpsReportTransactionSummary, HpsReversal, HpsSECCode, HpsService, HpsTokenData, HpsTrackData, HpsTrackDataMethod, HpsTransaction, HpsTransactionDetails, HpsTransactionHeader, HpsVoid, InvalidRequestException

Constant Summary collapse

VERSION =
"2.4.0"

Constants included from Configuration

Configuration::VALID_CONFIG_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, options

Class Method Details

.service_name_to_transaction_type(service_name) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/hps/entities/hps_transaction.rb', line 55

def self.service_name_to_transaction_type(service_name)

	if service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAuth
		Hps::HpsTransactionType::AUTHORIZE	

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAddToBatch
		 Hps::HpsTransactionType::CAPTURE

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditSale
		Hps::HpsTransactionType::CHARGE

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReturn
		Hps::HpsTransactionType::REFUND

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReversal
		Hps::HpsTransactionType::REVERSE

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAccountVerify
		Hps::HpsTransactionType::VERIFY

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::ReportActivity
		Hps::HpsTransactionType::LIST

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::ReportTxnDetail
		Hps::HpsTransactionType::GET

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::CreditVoid
		Hps::HpsTransactionType::Void

	elsif service_name == Hps::ItemChoiceTypePosResponseVer10Transaction::BatchClose
		Hps::HpsTransactionType::BATCH_CLOSE

	elsif service_name == "SecurityError"
		Hps::HpsTransactionType::SECURITY_ERROR
	else
		nil				
	end

end

.transaction_type_to_service_name(transaction_type) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/hps/entities/hps_transaction.rb', line 13

def self.transaction_type_to_service_name(transaction_type)

	case transaction_type

	when Hps::HpsTransactionType::AUTHORIZE
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAuth

	when Hps::HpsTransactionType::CAPTURE
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAddToBatch

	when Hps::HpsTransactionType::CHARGE
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditSale

	when Hps::HpsTransactionType::REFUND
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReturn

	when Hps::HpsTransactionType::REVERSE
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditReversal

	when Hps::HpsTransactionType::VERIFY
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditAccountVerify

	when Hps::HpsTransactionType::LIST
		Hps::ItemChoiceTypePosResponseVer10Transaction::ReportActivity

	when Hps::HpsTransactionType::GET
		Hps::ItemChoiceTypePosResponseVer10Transaction::ReportTxnDetail

	when Hps::HpsTransactionType::VOID
		Hps::ItemChoiceTypePosResponseVer10Transaction::CreditVoid

	when Hps::HpsTransactionType::BATCH_CLOSE
		Hps::ItemChoiceTypePosResponseVer10Transaction::BatchClose

	when Hps::HpsTransactionType::SECURITY_ERROR
		"SecurityError"
	else
		""				
	end

end