spree-contrib / better_spree_paypal_express

A better Spree PayPal Express Extension.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
110 stars 269 forks source link

Paypal payments uncancelable after Spree refactor #68

Open dpritchett opened 10 years ago

dpritchett commented 10 years ago

Stacktrace: https://gist.github.com/dpritchett/c43a76bdc30acfa0e0cd

Spree refactor: https://github.com/spree/spree/commit/0caedaaf1aa1e8bc129dc5acd90dbd9c5303004b#commitcomment-5219536

It looks like Gateway is delegating :credit to Paypal and that's blowing up. Not sure exactly how delegate_belongs_to works, but it wasn't throwing errors before that was changed to a plain delegate.

radar commented 10 years ago

Possibly because that gateway does not respond to credit, because nobody's asked for it before now :)

DangerDawson commented 10 years ago

We have just encountered this issue as well when cancelling an order.

What should the behaviour be?

paultyng commented 10 years ago

Should it just be a call in to refund_transaction in the SDK? I'll see about taking a look at this next week possibly.

radar commented 10 years ago

@paultyng That looks like a bingo. A PR for that would be very welcome. I am currently more snowed under than the eastern seaboard of America rimshot

ayqazi commented 10 years ago

If the fix could kindly be back-ported to the 2-0-stable branch, my team and I would be most grateful.

radar commented 10 years ago

@paultyng Did you submit a PR for this?

paultyng commented 10 years ago

Sorry, never worked it out, we just decided to manually do it via PayPal UI and are working on switching providers as well.