diff --git a/lib/pagseguro/payment_request.rb b/lib/pagseguro/payment_request.rb
index <HASH>..<HASH> 100644
--- a/lib/pagseguro/payment_request.rb
+++ b/lib/pagseguro/payment_request.rb
@@ -87,12 +87,14 @@ module PagSeguro
     # Adds an extra parameter to payment request. It's useful when you need
     # to send a parameter to api that's not mapped in the gem yet.
     def add_parameter(name, value)
-      @extra_params << {name.to_sym => value}
+      self.extra_params << {name.to_sym => value}
     end
 
     private
+    attr_writer :extra_params
+
     def before_initialize
-      @extra_params = []
+      self.extra_params = []
       self.currency = "BRL"
       self.email    = PagSeguro.email
       self.token    = PagSeguro.token
Changes extra_params assignment to an attribute writer