Adding payment method

This commit is contained in:
adam.harbas@a-net.ba
2016-01-08 09:36:28 +01:00
parent 2a0e326862
commit 05c8f6ce88
6 changed files with 49 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
class DeliveryDestination < ActiveRecord::Base
class DeliveryDestination < ActiveRecord::Base
has_one :cart
belongs_to :user
@@ -11,4 +11,17 @@ class DeliveryDestination < ActiveRecord::Base
result = DeliveryDestination.create!(attributes)
return result
end
def get_payment_string
case self.payment_method
when 'cash_on_delivery'
'Pouzecem'
when 'paypal'
'Paypal'
when 'pikpay'
'Pikpay'
else
'Nepoznato'
end
end
end