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 270 forks source link

3-0-stable NotImplementedError (You must implement cancel method for this payment method.) #171

Open simontseng opened 9 years ago

simontseng commented 9 years ago

looks like spree is required some thing to be implemented now

NotImplementedError (You must implement cancel method for this payment method.):
vendor/bundle/ruby/2.2.0/gems/spree_core-3.0.1/app/models/spree/payment_method.rb:69:in `cancel'
vendor/bundle/ruby/2.2.0/gems/spree_core-3.0.1/app/models/spree/payment/processing.rb:72:in `cancel!'
vendor/bundle/ruby/2.2.0/gems/spree_core-3.0.1/app/models/spree/order.rb:631:in `block in after_cancel'
vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `each'
...

any suggestion about this

simontseng commented 9 years ago

Does anyone here have the same issues? I would expect this affects everybody. Would love to see some discussion here and I don't mind to put in a PR just need someone point me in the right direction.

anybody?

leokra commented 9 years ago

I get the same exception when trying to "Cancel" an already paid order in the backend (spree-2-4). And in "app/models/spree/gateway/pay_pal_express.rb" is no cancel-method implemented.

I'm not sure why not. Wouldn't it make sense to call the already existing refund-method, if the payment is successfully executed and an order cancelled?

simontseng commented 9 years ago

+1 for fix

On Aug 5, 2015, at 6:50 PM, leokra notifications@github.com wrote:

I get the same exception when trying to "Cancel" an already paid order in the backend (spree-2-4). And in "app/models/spree/gateway/pay_pal_express.rb" is no cancel-method implemented.

I'm not sure why not. Wouldn't it make sense to call the already existing refund-method, if the payment is successfully executed and an order cancelled?

— Reply to this email directly or view it on GitHub https://github.com/spree-contrib/better_spree_paypal_express/issues/171#issuecomment-127954132.

SudeepSidhu commented 8 years ago

https://github.com/spree-contrib/better_spree_paypal_express/pull/180 created for this