lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.109.0

- old
+ new

@@ -10,12 +10,12 @@ self.live_confined_url = 'https://confined.payex.com/' self.test_confined_url = 'https://test-confined.payex.com/' self.money_format = :cents - self.supported_countries = ['DK', 'FI', 'NO', 'SE'] - self.supported_cardtypes = [:visa, :master, :american_express, :discover] + self.supported_countries = %w[DK FI NO SE] + self.supported_cardtypes = %i[visa master american_express discover] self.homepage_url = 'http://payex.com/' self.display_name = 'Payex' self.default_currency = 'EUR' TRANSACTION_STATUS = { @@ -191,13 +191,13 @@ view: 'CREDITCARD', agreementRef: options[:agreement_ref], # this is used to attach a stored agreement to a transaction as part of the store card cancelUrl: nil, clientLanguage: nil } - hash_fields = [:accountNumber, :purchaseOperation, :price, :priceArgList, :currency, :vat, :orderID, - :productNumber, :description, :clientIPAddress, :clientIdentifier, :additionalValues, - :externalID, :returnUrl, :view, :agreementRef, :cancelUrl, :clientLanguage] + hash_fields = %i[accountNumber purchaseOperation price priceArgList currency vat orderID + productNumber description clientIPAddress clientIdentifier additionalValues + externalID returnUrl view agreementRef cancelUrl clientLanguage] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:initialize] request = build_xml_request(soap_action, properties) commit(soap_action, request) end @@ -211,12 +211,12 @@ cardNumberExpireMonth: format(payment_method.month, :two_digits), cardNumberExpireYear: format(payment_method.year, :two_digits), cardHolderName: payment_method.name, cardNumberCVC: payment_method.verification_value } - hash_fields = [:accountNumber, :orderRef, :transactionType, :cardNumber, :cardNumberExpireMonth, - :cardNumberExpireYear, :cardNumberCVC, :cardHolderName] + hash_fields = %i[accountNumber orderRef transactionType cardNumber cardNumberExpireMonth + cardNumberExpireYear cardNumberCVC cardHolderName] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:purchasecc] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -231,11 +231,11 @@ description: options[:description] || options[:order_id], orderId: options[:order_id], purchaseOperation: is_auth ? 'AUTHORIZATION' : 'SALE', currency: (options[:currency] || default_currency), } - hash_fields = [:accountNumber, :agreementRef, :price, :productNumber, :description, :orderId, :purchaseOperation, :currency] + hash_fields = %i[accountNumber agreementRef price productNumber description orderId purchaseOperation currency] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:autopay] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -248,11 +248,11 @@ amount: amount, orderId: options[:order_id] || '', vatAmount: options[:vat_amount] || 0, additionalValues: '' } - hash_fields = [:accountNumber, :transactionNumber, :amount, :orderId, :vatAmount, :additionalValues] + hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:capture] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -265,11 +265,11 @@ amount: amount, orderId: options[:order_id], vatAmount: options[:vat_amount] || 0, additionalValues: '' } - hash_fields = [:accountNumber, :transactionNumber, :amount, :orderId, :vatAmount, :additionalValues] + hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:credit] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -278,11 +278,11 @@ def send_cancel(transaction_number) properties = { accountNumber: @options[:account], transactionNumber: transaction_number, } - hash_fields = [:accountNumber, :transactionNumber] + hash_fields = %i[accountNumber transactionNumber] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:cancel] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -297,11 +297,11 @@ maxAmount: options[:max_amount] || 100000, # default to 1,000 notifyUrl: '', startDate: options[:startDate] || '', stopDate: options[:stopDate] || '' } - hash_fields = [:accountNumber, :merchantRef, :description, :purchaseOperation, :maxAmount, :notifyUrl, :startDate, :stopDate] + hash_fields = %i[accountNumber merchantRef description purchaseOperation maxAmount notifyUrl startDate stopDate] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:create_agreement] request = build_xml_request(soap_action, properties) commit(soap_action, request) @@ -310,10 +310,10 @@ def send_delete_agreement(authorization) properties = { accountNumber: @options[:account], agreementRef: authorization, } - hash_fields = [:accountNumber, :agreementRef] + hash_fields = %i[accountNumber agreementRef] add_request_hash(properties, hash_fields) soap_action = SOAP_ACTIONS[:delete_agreement] request = build_xml_request(soap_action, properties) commit(soap_action, request)