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

Payment methods: API for payment gateway callbacks required authorization #18

Open
tatarincev opened this issue Oct 5, 2017 · 1 comment

Comments

@tatarincev
Copy link
Contributor

tatarincev commented Oct 5, 2017

https://github.com/VirtoCommerce/vc-module-KlarnaCheckout-Euro/blob/a638008aa371e91b82d366489a2598f83ad67389/Klarna.PaymentGatewayModule.Web/Managers/KlarnaCheckoutEuroPaymentMethod.cs#L329 the code is telling Klarna to return the results to http://www.our-store.com/admin/api/paymentcallback?sid=123&orderId=xxx&klarna_order_id=yyy path, which is this

public IHttpActionResult PostProcessPayment(webModel.PaymentCallbackParameters callback)
method, which needs authentication (Is on Admin) and obviously Klarna is not authenticated to access it. They get {"message":"Authorization has been denied for this request."}, 401 Unauthorized error.
What is the solution for this?

Other problem related to this method:
For instance, public IHttpActionResult PostProcessPayment(webModel.PaymentCallbackParameters callback) always receives callback as null.

@tatarincev tatarincev added this to the Operations milestone Oct 5, 2017
@tatarincev
Copy link
Contributor Author

tatarincev commented Oct 5, 2017

I've to propose a few probable solutions of this problem:

  1. Remove authorization check for this API method. (This is a much correct solution from my point of view. Just need to check all the security risks before that doing)
  2. Include authorization key in callback link.
  3. Define API for these types of callbacks in Clarna module.

@t13ka t13ka removed this from the Operations milestone Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants