Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status REFUND on notification call #21

Open
paulhuisman opened this issue Jul 23, 2015 · 5 comments
Open

Status REFUND on notification call #21

paulhuisman opened this issue Jul 23, 2015 · 5 comments

Comments

@paulhuisman
Copy link

Hi there,

I'm getting the following output on a notification call:

I, [2015-07-23T11:11:29.347394 #11345] INFO -- : Started POST "/adyen/notify" for xx.xx.xx.xx at 2015-07-23 11:11:29 +0200
I, [2015-07-23T11:11:29.348954 #11345] INFO -- : Processing by Spree::AdyenNotificationsController#notify as HTML
I, [2015-07-23T11:11:29.349071 #11345] INFO -- : Parameters: {"pspReference"=>"14143712321496", "eventDate"=>"2015-07-23T09:11:28.71Z", "merchantAccountCode"=>"myCustomer", "reason"=>"", "originalReference"=>"", "value"=>"21", "eventCode"=>"AUTHORISATION", "merchantReference"=>"R069063981", "operations"=>"REFUND", "success"=>"true", "paymentMethod"=>"ideal", "currency"=>"EUR", "live"=>"true"}

As you can see i'm getting a REFUND on the operations variable. The notification is not coming through and does not update the order. Also my payment_state remains on 'balance due'.

Can you help us out?

@paulhuisman
Copy link
Author

BTW: i have Auto-capture ON in my settings.

@paulo-surfdome
Copy link

Hi @paulhuisman , operations field is the available operations after the current event. Event is "AUTHORISATION" and you have now available the operations "REFUND". More details here: https://docs.adyen.com/display/TD/Notification+fields

I believe this means the auto-capture is working. Otherwise the operations will be "CANCEL,CAPTURE,REFUND".

Not sure why you see 'balance due' though.

@paulhuisman
Copy link
Author

Hi @paulo-surfdome ,

Thanks for your swift response and clear answer.

I have another question about the notifications_controller: isn't the system supposed to complete the order even if the user does not click "back to webshop to complete order" on the payment portal?

Right now it does send HTTP_POST to my adyen/notify url, however the order does not get updated to completed (if payment is valid) in the system.

Cheers,
Paul

@paulo-surfdome
Copy link

I am not sure, I do not think the current code does that, but @huoxito can probably help.

We have changed the handle! in the notification model slightly so it does something like

     if success? && capture_available?
        payment.pend
      elsif success?
        payment.complete
      else
        payment.failure
      end

around here https://github.com/spree-contrib/spree-adyen/blob/master/app/models/adyen_notification.rb#L83

@huoxito
Copy link
Contributor

huoxito commented Jul 23, 2015

hey all, from what I can remember the user needs to come back from adyen payment portal in order to complete the checkout on spree side (I know that probably doesn't help much sorry)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants