{"action":"closed","issue":{"url":"https://api.github.com/repos/besepa/besepa-ruby/issues/43","repository_url":"https://api.github.com/repos/besepa/besepa-ruby","labels_url":"https://api.github.com/repos/besepa/besepa-ruby/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/besepa/besepa-ruby/issues/43/comments","events_url":"https://api.github.com/repos/besepa/besepa-ruby/issues/43/events","html_url":"https://github.com/besepa/besepa-ruby/issues/43","id":336662011,"node_id":"MDU6SXNzdWUzMzY2NjIwMTE=","number":43,"title":"¿Qué hago mal?","user":{"login":"pmaojo","id":411551,"node_id":"MDQ6VXNlcjQxMTU1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/411551?v=4","gravatar_id":"","url":"https://api.github.com/users/pmaojo","html_url":"https://github.com/pmaojo","followers_url":"https://api.github.com/users/pmaojo/followers","following_url":"https://api.github.com/users/pmaojo/following{/other_user}","gists_url":"https://api.github.com/users/pmaojo/gists{/gist_id}","starred_url":"https://api.github.com/users/pmaojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmaojo/subscriptions","organizations_url":"https://api.github.com/users/pmaojo/orgs","repos_url":"https://api.github.com/users/pmaojo/repos","events_url":"https://api.github.com/users/pmaojo/events{/privacy}","received_events_url":"https://api.github.com/users/pmaojo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-28T15:06:43Z","updated_at":"2018-06-28T20:33:08Z","closed_at":"2018-06-28T20:33:08Z","author_association":"NONE","body":"No se guarda el cliente (DEVELOPMENT)\r\n\r\ndef create\r\n\r\n\r\n  ```\r\n  @hotel = @hotel.update(hotel_params)\r\n\r\n    @hotel.user = current_user\r\n    @hotel.publish = false\r\n    @customer = Besepa::Customer.create(@hotel.account.name)\r\n    iban = @hotel.account.iban\r\n    bic = @hotel.account.bic\r\n    bank_name = @hotel.account.bank\r\n    mandate_options = {\r\n      scheme: \"CORE\", #o b2b\r\n      signature_type: 'checkbox', # o sms. Si es SMS, añadir el teléfono en phone_number o se lo pedimos\r\n      type: \"RECURRENT\",\r\n      redirect_after_signature: \"https://waitinglist.es/hoteles?mandato=firmado\"\r\n    }\r\n  ba = @customer.add_bank_account(iban, bic, bank_name, mandate_options)\r\n  @hotel.ba_url = ba.url\r\n    respond_to do |format|\r\n      if @hotel.save(validate: false)\r\n# resto...\r\n```\r\n\r\ninitializers/besepa.rb:\r\n```\r\n\r\nBesepa.configure do |config|\r\n  config.api_key = 'mi API key' \r\n  config.endpoint = 'https://sandbox.besepa.com)'\r\nend\r\n```"}}
{"actor":{"display_login":"pmaojo"}}