module Adyen module API class PaymentService < SimpleSOAPClient class << self private def modification_request(method, body = nil) return < %s %s #{body} EOS end def modification_request_with_amount(method) modification_request(method, < %s %s EOS end end # @private CAPTURE_LAYOUT = modification_request_with_amount(:capture) # @private REFUND_LAYOUT = modification_request_with_amount(:refund) # @private CANCEL_LAYOUT = modification_request(:cancel) # @private CANCEL_OR_REFUND_LAYOUT = modification_request(:cancelOrRefund) # @private LAYOUT = < %s %s %s EOS # @private AMOUNT_PARTIAL = < %s %s EOS # @private CARD_PARTIAL = < %s %s %s %s %02d EOS # @private ENABLE_RECURRING_CONTRACTS_PARTIAL = < RECURRING,ONECLICK EOS # @private RECURRING_PAYMENT_BODY_PARTIAL = < RECURRING %s ContAuth EOS # @private ONE_CLICK_PAYMENT_BODY_PARTIAL = < ONECLICK %s %s EOS # @private SHOPPER_PARTIALS = { :reference => ' %s', :email => ' %s', :ip => ' %s', :statement => ' %s', } end end end