---
# System prepended metadata

title: Untitled

---

## 2 - Falha ao cobrar usuário SYS2

**customer_code**: `1100026535`


**Checkout:** 
```
{
  "title": "An internal error has occurred, please contact us.",
  "status": 500,
  "detail": "Failed to charge customer '1100026535' for the purchase of order '7beaf3880bd7471ab64ab5a01b553c29' in PaymentService caused by : {\"error\":{\"error_class\":\"NoMethodError\",\"message\":\"undefined method `[]' for nil:NilClass\",\"status\":500,\"details\":[\"/var/www/zenon/app/models/charge_method/creator.rb:77:in `block in build_payment_method'\",\"/var/www/zenon/app/models/charge_method/creator.rb:76:in `tap'\",\"/var/www/zenon/app/models/charge_method/creator.rb:76:in `build_payment_method'\",\"/var/www/zenon/app/models/charge_method/creator.rb:51:in `set_default_params'\",\"/var/www/zenon/app/models/charge_method/creator.rb:44:in `tap'\",\"/var/www/zenon/app/models/charge_method/creator.rb:44:in `build'\",\"/var/www/zenon/app/models/charge/creator.rb:64:in `build_charge_method'\",\"/var/www/zenon/app/models/charge/creator.rb:46:in `set_default_params'\",\"/var/www/zenon/app/models/charge/creator.rb:40:in `tap'\",\"/var/www/zenon/app/models/charge/creator.rb:40:in `build'\",\"/var/www/zenon/app/services/charge/creator_service.rb:21:in `block (2 levels) in create'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'\",\"/var/www/zenon/app/services/charge/creator_service.rb:20:in `block in create'\",\"/var/www/zenon/app/services/charge/creator_service.rb:87:in `logged'\",\"/var/www/zenon/app/services/charge/creator_service.rb:19:in `create'\",\"/var/www/zenon/app/controllers/api/charges_controller.rb:109:in `create_charge'\",\"/var/www/zenon/app/controllers/api/charges_controller.rb:19:in `create'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/abstract_controller/base.rb:198:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/rendering.rb:10:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:117:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/sentry-raven-2.7.2/lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:441:in `instance_exec'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:441:in `block in make_lambda'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:312:in `block in halting'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:497:in `block in around'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/abstract_controller/callbacks.rb:19:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/rescue.rb:29:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:164:in `block in instrument'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:164:in `instrument'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/abstract_controller/base.rb:137:in `process'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.6/lib/action_view/rendering.rb:30:in `process'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal.rb:196:in `dispatch'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_controller/metal.rb:237:in `block in action'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:43:in `serve'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:43:in `block in serve'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `each'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `serve'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:817:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/flipper-0.7.5/lib/flipper/middleware/memoizer.rb:40:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/lib/middlewares/response_logger.rb:8:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-request_id_store-0.0.1/lib/rack/middleware/request_id_store.rb:15:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/flash.rb:260:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/query_cache.rb:36:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:88:in `__run_callbacks__'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in `call_app'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `block in call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:in `tagged'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `tagged'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/lib/middlewares/app_tagged_logger.rb:17:in `call_app'\",\"/var/www/zenon/lib/middlewares/app_tagged_logger.rb:8:in `block in call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:in `tagged'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `tagged'\",\"/var/www/zenon/lib/middlewares/app_tagged_logger.rb:8:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/sentry-raven-2.7.2/lib/raven/integrations/rack.rb:51:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.17.0.325/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-worker-killer-0.4.4/lib/unicorn/worker_killer.rb:52:in `process_client'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `load'\",\"/var/www/zenon/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'\"],\"retryable\":false}}"
}
```