class Stall::Atos::FakeGatewayPaymentNotification
Public Instance Methods
params()
click to toggle source
# File lib/stall/atos/fake_gateway_payment_notification.rb, line 6 def params {}.tap do |params| params.merge!(options) end end
Private Instance Methods
data()
click to toggle source
# File lib/stall/atos/fake_gateway_payment_notification.rb, line 23 def data @data ||= Stall::Atos::PaymentParams.serialize( merchantId: gateway.merchant_id, transactionReference: gateway.transaction_id, keyVersion: gateway.key_version, amount: cart.total_price.cents, currencyCode: cart.currency.iso_numeric, transactionDateTime: Time.now.iso8601, captureDay: '0', captureMode: 'AUTHOR_CAPTURE', orderChannel: 'INTERNET', responseCode: '00', acquirerResponseCode: '00', authorisationId: '12345', guaranteeIndicator: 'N', cardCSCResultCode: '4E', panExpiryDate: '210001', paymentMeanBrand: 'VISA', paymentMeanType: 'CARD', customerIpAddress: '127.0.0.1', maskedPan: '4100##########00', holderAuthentRelegation: 'N', holderAuthentStatus: '3D_ERROR', transactionOrigin: 'INTERNET', paymentPattern: 'ONE_SHOT' ) end
options()
click to toggle source
# File lib/stall/atos/fake_gateway_payment_notification.rb, line 14 def options @options ||= { "Data" => data, "Seal" => Stall::Atos::PaymentParams.calculate_seal_for(data), "InterfaceVersion" => "HP_2.0", "Encode" => "" } end