spree-contrib / spree_paypal_express

allowing use of paypal express in spree, using (a modified version of) active merchant
BSD 3-Clause "New" or "Revised" License
113 stars 141 forks source link

Dummy property 'CHECKOUT FROM CART' in configuration #127

Closed skatkov closed 11 years ago

skatkov commented 11 years ago

Screen Shot 2013-02-17 at 4 42 34 PaypalExpress configuration contains boolean property named 'CHECKOUT FROM CART' that seems as not working. I didn't found any code that is able to do 'that this property is aimed for' and spec's also reflect my opinion:

# spec/controllers/checkout_controller_spec.rb
 context "paypal_checkout from cart" do
     pending 'feature not implemented'
end

Maybe removing this property would be good idea if feature is not implemented?

JDutil commented 11 years ago

The property does work for allowing users to checkout from the cart. There currently is not any deface override to add a checkout w/paypal button to the cart page though.

skatkov commented 11 years ago

Can you share more info? Where can i find code that does this, so i can add Deface myself? Maybe you have issue for this with more information?

JDutil commented 11 years ago

You will need to add a link to the paypal payment url with the appropriate payment method id. It'll end up looking something like this:

<%= link_to t(:paypal), paypal_payment_order_checkout_url(@order, :payment_method_id => @order.available_payment_methods.detect{ |method| method.type == 'Spree::BillingIntegration::PaypalExpress' }.id), :class => 'paypal-cart' %>
skatkov commented 11 years ago

Thanks for additional info.

I would expect it to go directly to paypal after clicking 'checkout with paypal'. But in my case it moves only to 'payment' page.

This sounds correct to you?

JDutil commented 11 years ago

No it should take you directly to paypal.