lib/mundipagg/gateway.rb in better-mundipagg-0.1.1 vs lib/mundipagg/gateway.rb in better-mundipagg-0.1.2

- old
+ new

@@ -19,18 +19,19 @@ result = client.send(method, payload) response = object.class::Response.new(result.body) params = { body: result.body } + options = {} if response.success? message = "Ok" else message = response.error.message - params.merge! error_code: response.error.code + options = { error_code: response.error.code } end - ActiveMerchant::Billing::Response.new response.success?, message, params + ActiveMerchant::Billing::Response.new response.success?, message, params, options end def apply_merchant_key(body) payload = body.to_a payload.insert(-2, [ :merchant_key, options[:merchant_key] ])