search for: credit_card

Displaying 8 results from an estimated 8 matches for "credit_card".

2006 Aug 17
2
validates_associated bug?
i seem to be experiencing a bug where rails tells me that my organization object''s associated credit card is invalid (activerecord validation-wise invalid), when i know it to be valid. this happens only if i tell the organization to validate_associated :credit_card. i know the associated credit card is valid, because a) that credit_card object itself throws no validation errors, and b) if i change @credit_card.save to @credit_card.update_attributes(params[:credit_card]) i get a new credit_card record in the database, yet the overall transaction fails later b...
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
...directional association ... class CreditCard < PaymentMethod ... In the controller tier, I have a session object that--on the final step--loads an Account model object based on the current session state, and then calls save! on that model: class PrimaryAccountUser < User attr_reader :credit_card def initialize(service_id) @credit_card = {} #hash for storing credit card attributes end def persist_to_database add_session_data_to_account(PrimaryAccount.new) account.save! @id = account.id return account end private def add_session_data_to_account(account) #...
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
...d this CreditCard class would be on the same form as an ActiveRecord Order class but I have not been able to get an ActiveModel to work as a nested object on a form. something like this.. on the order new form <%= form_for @order do |f| -%> . order stuff here.... <% f.fields_for :credit_card do |cc_fields| %> <%= cc_fields.label :card_number, ''*Number'' %> <%= cc_fields.text_field :card_number, :class => ''text'', :autocomplete => ''off'' %> <% end %> I have not found what magic I nee...
2005 Oct 20
3
Missing id on date_select (0.14.1)
I''m getting markup violation errors on my tests and I noticed that a template with this (a modified 0.13.1 generated scaffold). <label for="credit_card_account">Account</label> <%= text_field ''credit_card'', ''account'' %> <label for="credit_card_expires_on">Expires on</label> <%= date_select ''credit_card'', ''expires_...
2005 Dec 22
2
Documentation for generate controller
I can find the API documentation, but where is the documentation for the standard generators. The wiki has 3rd party generators- but I want to know specifically what generate controller does, and how it differs from generate scaffold, and what other generators there are. Where is this succinctly documented? -- Posted via http://www.ruby-forum.com/.
2006 Jul 31
2
Wizard-like multi-page transaction
Hello Is it possible to create something like wizard with database transactions, so transaction would begin on page one, then on page two, three... etc. there would be some data altered in the database and then on the last page the transaction would be committed or rolled back? thx Zvonko -- Posted via http://www.ruby-forum.com/.
2006 Nov 07
1
reading VERY large binary files
...on_code <- readChar(incon,1) tran$county_code <- readChar(incon,1) tran$state_abbrev <- readChar(incon,2) tran$channel_code <- readChar(incon,1) tran$source_code <- readChar(incon,20) tran$payment_type <- readChar(incon,1) tran$credit_card <- readChar(incon,1) tran$promo_type <- readChar(incon,1) tran$flags <- readChar(incon,1) write.table(data.frame(tran), file="readHH_output", sep=",", row.names=FALSE, col.names=FALSE, append=TRUE) result <- rbind(result,data.frame...
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
...rityError (Insecure: can''t modify array) exception logger.warn("Processing order with payment gateway") gateway = ActiveMerchant::Billing::AuthorizedNetGateway.new({:login => API_LOGIN_ID, :password => TRANSACTION_KEY}) response = gateway.purchase(self.total_price, @credit_card, options) if response.success? logger.warn("Successfully charged credit card with #{self.total_price}: #{response.message}") self.transaction_id = response.authorization self.save else logger.warn("Failed to charge credit card") raise OrderFailedExceptio...