{"action":"closed","issue":{"url":"https://api.github.com/repos/omise/spree-omise/issues/2","labels_url":"https://api.github.com/repos/omise/spree-omise/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/omise/spree-omise/issues/2/comments","events_url":"https://api.github.com/repos/omise/spree-omise/issues/2/events","html_url":"https://github.com/omise/spree-omise/issues/2","id":96275538,"number":2,"title":"undefined method `source'","user":{"login":"frizbee","id":645636,"avatar_url":"https://avatars.githubusercontent.com/u/645636?v=3","gravatar_id":"","url":"https://api.github.com/users/frizbee","html_url":"https://github.com/frizbee","followers_url":"https://api.github.com/users/frizbee/followers","following_url":"https://api.github.com/users/frizbee/following{/other_user}","gists_url":"https://api.github.com/users/frizbee/gists{/gist_id}","starred_url":"https://api.github.com/users/frizbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frizbee/subscriptions","organizations_url":"https://api.github.com/users/frizbee/orgs","repos_url":"https://api.github.com/users/frizbee/repos","events_url":"https://api.github.com/users/frizbee/events{/privacy}","received_events_url":"https://api.github.com/users/frizbee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-21T09:51:28Z","updated_at":"2015-07-22T10:27:04Z","closed_at":"2015-07-22T10:27:04Z","body":"## production.log\r\nNoMethodError (undefined method `source' for #<Spree::CreditCard:0x007f35538e19c8>):\r\napp/models/spree/gateway/omise.rb:70:in `update_source!'\r\napp/models/spree/gateway/omise.rb:60:in `create_profile'\r\n\r\n## development env\r\n    def update_source!(payment)\r\n      payment.source  = CC_MAPPING[payment.source.cc_type] if CC_MAPPING.include?(payment.source.cc_type)\r\n      payment\r\n    end\r\n\r\napp/models/spree/gateway/omise.rb:70:in 'update_source!'\r\napp/models/spree/gateway/omise.rb:60:in `create_profile'\r\n\r\n## Parameters:\r\n{\"utf8\"=>\"✓\",\r\n \"_method\"=>\"patch\",\r\n \"authenticity_token\"=>\"VYchU5Btwp9T0bdDeedqSZVao8CczwPDNUQ6cNJ8x6rvDVng8twEZCACggJvxguP49aVksZmTaoh6o8/2PbZ2w==\",\r\n \"order\"=>{\"state_lock_version\"=>\"3\",\r\n \"payments_attributes\"=>[{\"payment_method_id\"=>\"5\"}],\r\n \"coupon_code\"=>\"\"},\r\n \"use_existing_card\"=>\"no\",\r\n \"payment_source\"=>{\"5\"=>{\"name\"=>\"First name Last name\",\r\n \"cc_type\"=>\"visa\",\r\n \"gateway_payment_profile_id\"=>\"tokn_test_50rf6oyichkel7bvs0s\",\r\n \"last_digits\"=>\"7856\",\r\n \"month\"=>\"8\",\r\n \"year\"=>\"2015\"}},\r\n \"state\"=>\"payment\"}"}}