Code Monkey home page Code Monkey logo

besepa-ruby's People

Contributors

ceritium avatar danilat avatar dgilperez avatar mayoral avatar molpe avatar oinak avatar ro-fdm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

besepa-ruby's Issues

¿Qué hago mal?

No se guarda el cliente (DEVELOPMENT)

def create

@hotel = @hotel.update(hotel_params)

  @hotel.user = current_user
  @hotel.publish = false
  @customer = Besepa::Customer.create(@hotel.account.name)
  iban = @hotel.account.iban
  bic = @hotel.account.bic
  bank_name = @hotel.account.bank
  mandate_options = {
    scheme: "CORE", #o b2b
    signature_type: 'checkbox', # o sms. Si es SMS, añadir el teléfono en phone_number o se lo pedimos
    type: "RECURRENT",
    redirect_after_signature: "https://waitinglist.es/hoteles?mandato=firmado"
  }
ba = @customer.add_bank_account(iban, bic, bank_name, mandate_options)
@hotel.ba_url = ba.url
  respond_to do |format|
    if @hotel.save(validate: false)
# resto...

initializers/besepa.rb:


Besepa.configure do |config|
  config.api_key = 'mi API key' 
  config.endpoint = 'https://sandbox.besepa.com)'
end

Validation errors

Hi!

Is there any way to get information about validation errors from the API? Right now, I'm just receiving a 422 error when trying to add a debit to a customer, with no further explanation:

Besepa::Customer.find(id).add_debit("XXXXXXX", "XXXXXX", "My description", 10000, "2014-05-10", nil, nil)
# => Besepa::Errors::InvalidResourceError: (Status 422) invalid_resource (El recurso no se puedo guardar porque falló alguna de las validaciones)

Both customer and bank_account exist.

Thanks!

default_endpoint in README does not correspond to the actual code

The README says

By default, this gem points to Besepa's sandbox (https://sandbox.besepa.com). If you want to point to Besepa's production environment, use https://api.besepa.com as endpoint.

but according to
https://github.com/besepa/besepa-ruby/blob/master/lib/besepa/utils/config.rb#L12

DEFAULT_ENDPOINT = 'http://app.besepa.com'

So either the README or config.rb should be updated 😉

Also note that the code says app.besepa.com and the readme says api.besepa.com - I don't know which one is the right one or if it doesn't matter 😃

CHANGELOG

It's a nice thing to have :-) Could you consider adding one?

Test de las funciones nuevas

alguien han subido funcionalidad nueva sin tests, estaría bien revisar la cobertura de test en general y mejorarla

Código sin tests:

puede que falte asimismo un release de los últimos cambios

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.