yoonic / atlas

E-Commerce Backend API in Hapi.js and RethinkDB
MIT License
373 stars 104 forks source link

Payment Gateways (Questions) #2

Closed kalicki closed 8 years ago

kalicki commented 8 years ago

Oi! Vou falar em Português (BR). Primeiramente, parabéns! Ótimo projeto, acredito que pode evoluir para uma API-as-a-Service baseado na "nuvem" :)

Desculpar expor essa dúvida aqui, mas tentei achar seu email para enviar e discutir esse projeto, mas não achei :/

Existe pré integração com algum gateway de pagamento? Gostaria de saber de entender a integração com meios de pagamentos, seria viável criar componentes para cada tipo de pagamento?

*Te pergunto isso pois não explorei. Obrigado!

andrecrt commented 8 years ago

Hi @kalicki,

First of all, thank you for your support... looking forward for your feedback!

I'll answer in English so that it may be of use for people facing the same issue/question in the future, hope you don't mind :)

First of all, you can reach me via email andre [at] yoonic.net. Perhaps I'll add it to the README along with my Twitter handle @andreftavares.

Next, your question was regarding Payment Gateways and if Storefront/Atlas had any existing integration and the answer is... yes :) Switch Payments which is an awesome startup that, with a single integration, allows you to accept not only card payments, but also dozens of local payments (e.g. Boleto in Brazil) and even PayPal! (disclaimer: I'm a co-founder :p)

In regards to integrating other gateways, I think it should be fairly simple and you can use Switch's integration as a guideline. I'll post bellow links to Github with all the places you would need to put your code... you'll see that there are very few in both Storefront and Atlas.

Storefront

  1. When creating a new Checkout, query Gateway for available payment methods
  2. When finishing a Checkout and creating respective Order, create charge using data provided by the customer

Atlas

In Atlas you just need to create an API endpoint for the events webhook that will be notified during the payment lifecycle and act accordingly (e.g. confirm a charge, change order status when payment is successful, etc)

Easy as pie! :) Hope it helps!

kalicki commented 8 years ago

Hey, amazing....

I talked to the support/commercial Switch Payments, but they replied that they are not supported by Brazil currently, only next year... :(

andrecrt commented 8 years ago

Oh, that's unfortunate :(

In the meantime, if you make any other integration that think would be useful for someone else, I would be very happy to merge any pull request :)

And again... all feedback is welcome!

kalicki commented 8 years ago

Yeah ;(

If it works with PayPal. It's a "breakthrough", but it's not PayPal Plus (checkout transparent)? Is the express checkout, right?

OFF: For transactional emails www.sparkpost.com 👍 100.000 free