sprangular / sprangular

Spree + Angular.js frontend
MIT License
67 stars 23 forks source link

Support all payment types #39

Open qinghe opened 9 years ago

qinghe commented 9 years ago

file module.coffee if !paymentMethods.gateway alert 'Gateway is not configured in Spree...'

why only check gateway? what if check, COD?

joshnuss commented 9 years ago

Hi @qinghe,

Initial version is only supporting CC (since that is the most common use case), but we are open to supporting other methods (including PayPal, Google Checkout etc..).

PRs welcome!

dapic commented 9 years ago

In China, most online payments are done through the so called "offsite_payments", such as Alipay, Tenpay, Wxpay (WeChat payment)

rposborne commented 9 years ago

We are looking to support Paypal, These clearly should be "extensions" that call in the relevant layout for the given payment gateway, if needed.

I do think some code should be in the parent sprangular, namely methods for selecting gateways (tabs?) and a construct to pass relevant data to the extension if any processing or manipulation is required to support a given gateway request.

rposborne commented 9 years ago

@joshnuss what are you looking at for the timeline of the refactor to single page checkout?

joshnuss commented 9 years ago

@rpo The one page checkout refactoring will be ready early next week.

For PayPal Express, it can be done by adding an tag that links to the paypal extensions checkout process (will direct user to paypal, and then back to store).

Generally express checkout links (like PayPal, Google) would be better in the cart page, and bypass the current checkout, since PayPal can provide address data. (i.e. give user 2 checkout options "Checkout with PayPal", "Checkout with Credit Card").

We will need to add some extension points in the core to make this happen. PR welcome

rposborne commented 9 years ago

Agreed, rightnow I am trying to make use of the existing better_paypal_express gem and trying to figure out a meaningful way to rewrite it's redirects into the JS application to make clean behavior vs straight reimplementation. When I get a good handle I'll see where we can break up the implementation for flexibility and as a extension.

joshnuss commented 9 years ago

Cool.

Think the flow should work like this:

rposborne commented 9 years ago

We are tracking a paypal extension here. https://github.com/feldfix/sprangular_paypal_express/tree/2-4-stable

There are currently some issues but primary communication is present.

joshnuss commented 9 years ago

Groovy :+1: