README

Setup:

  • clone repo

  • bundle install

  • you need a valid certificate for tbk, place it in the root folder and edit the cert_path and key_path in config/initializers/transbank_oneclick.rb

Register a new payment method in tbkoneclick’s sandbox environment:

  • rails c

  • initialize inscription: response = Transbank::Oneclick.init_inscription({email: “your@email.com”, username: “yourusername”, response_url: ‘your website’}) the response contains a token

  • open html form test-form.html in your browser, enter the token and submit follow instructions on website and submit. tbk test-card details can be found here: www.transbank.cl/public/documentacion/webpay/01_Referencia_API_SOAP_Webpay_General.pdf

  • finish inscription to get tbk_username

    inscription = Transbank::Oneclick.finish_inscription(token) card should be registered, inscription.tbk_user string is required for payments

rake doc:app.