spree-contrib / spree_skrill

Add support for Skrill / MoneyBookers Quick checkout as a payment method.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
18 stars 16 forks source link

Skrill install breaks AuthorizeNet gateway #3

Open patrickmcelwee opened 12 years ago

patrickmcelwee commented 12 years ago

On my 0.70.5 Spree site, Skrill breaks the Authorize.Net gateway when the Skrill gem is installed, including when no Skrill payment method is actually created on the admin back-end. After the customer submits his credit card on the site, having chosen the Authorize.net gateway, Spree first correctly interprets this as a PUT to /checkout/update/payment. Then, however, it tries to GET '/checkout/skrill', which produces an error and the order does not complete correctly. Here is output in my log file that immediately follows the PUT request:

Redirected to https://sewliberated.com/checkout/skrill
Completed 302 Found in 835ms

Started GET "/checkout/skrill" for 67.242.93.206 at 2012-04-20 13:49:46 +0000
  Processing by CheckoutController#edit as HTML
  Parameters: {"state"=>"skrill"} 
Rendered /data/spree/shared/bundle/ruby/1.9.1/gems/spree_core-0.70.5/app/views/shared/_error_messages.html.erb (0.1ms)
Rendered /data/spree/shared/bundle/ruby/1.9.1/bundler/gems/spree_wholesale-d60265d0640f/app/views/checkout/_summary.html.erb (1.0ms)
Rendered /data/spree/shared/bundle/ruby/1.9.1/bundler/gems/spree_skrill-c27f77e4f70c/app/views/checkout/_skrill.html.erb (8.3ms)
Rendered /data/spree/shared/bundle/ruby/1.9.1/gems/spree_core-0.70.5/app/views/checkout/edit.html.erb within layouts/spree_application (13.9ms)
Completed 500 Internal Server Error in 29ms

ActionView::Template::Error (undefined method `redirect_url' for #<Gateway::AuthorizeNet:0xc5085c8>):
    9:
    10: <fieldset id="skrill_payment" data-hook>
    11:   <legend><%= t(:payment_information) %></legend>
    12:   <iframe id="skrill_frame" src="<%= @order.payment_method.redirect_url @order, opts %>"></iframe>
    13: </fieldset>
    14:
    15: <p data-hook="change_payment_method">
schof commented 12 years ago

You're using both Authorize.net and Skrill at the same time? I don't think we ever planned for that use case (although we should probably fix it so that's possible.)

Can you confirm both Authorize.net and Skrill work fine when the other is disabled?

DavidOliver commented 12 years ago

@schof, I've had trouble with using Skrill and PayPal when they're both enabled (0.70.5) - PayPal orders weren't right, so I had to disable the PayPal option.

Why wouldn't payment methods be developed so as to coexist by default? Perhaps there are reasons that I'm not aware of, but it doesn't seem reasonable to me to assume payment methods will always be used in isolation. Thanks.

patrickmcelwee commented 12 years ago

In our case, we are a US store that sells a substantial amount abroad. I was experimenting with adding Skrill as an option only for those with billing addresses outside the US, since credit cards aren't the norm everywhere.

I can confirm that with Authorize.net and PayPal Express enabled, I was able to create a Skrill transaction. With Skrill installed, however, even if I had not created a payment method using Skrill, Authorize.net broke. Skrill was live for a little while on my site, and PayPal payments seemed to continue to go through, but I did not thoroughly test it. For example, I am not sure if, when customers returned to the site, they saw the correct order confirmation page.