lib/clearsale/order.rb in clearsale-0.1.0 vs lib/clearsale/order.rb in clearsale-0.1.1

- old
+ new

@@ -50,11 +50,11 @@ def self.build_user_data(builder, user, billing_address) builder.tag!('ID', user.id) builder.tag!('Type', 1) # Pessoa FĂ­sica builder.tag!('LegalDocument1', user.cpf.gsub(/[\.\-]*/, '').strip) builder.tag!('Name', user.full_name) - builder.tag!('BirthDate', user.birthdate.to_time.strftime("%Y-%m-%dT%H:%M:%S")) + builder.tag!('BirthDate', user.birthdate.to_time.strftime("%Y-%m-%dT%H:%M:%S")) if user.birthdate.present? builder.tag!('Email', user.email) builder.tag!('Genre', user.gender.downcase) build_address(builder, billing_address) builder.tag!('Phones') do |b| build_phone(b, user) @@ -97,10 +97,10 @@ b.tag!('QtyInstallments', order.installments) b.tag!('CardNumber', payment.card_number) b.tag!('CardBin', payment.card_number[0..5]) - b.tag!('CardType', CARD_TYPE_MAP.fetch(payment.acquirer, 4)) # Failover is 'outros' + b.tag!('CardType', CARD_TYPE_MAP.fetch(payment.acquirer.to_sym, 4)) # Failover is 'outros' b.tag!('CardExpirationDate', payment.card_expiration) b.tag!('Name', payment.customer_name) b.tag!('LegalDocument', user.cpf.gsub(/[\.\-]*/, '').strip) build_address(b, order.billing_address)