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

Using order secret to pay the order #24

Open
vojtasvoboda opened this issue Feb 3, 2022 · 2 comments
Open

Using order secret to pay the order #24

vojtasvoboda opened this issue Feb 3, 2022 · 2 comments
Assignees
Labels

Comments

@vojtasvoboda
Copy link

vojtasvoboda commented Feb 3, 2022

Please correct me if I'm wrong, but when I complete the order, for example on the demo.shopaholic.dev page, it redirects me to the URL:

https://demo.shopaholic.dev/order/05132d454b20a4287d3c6bc3cffcf343

And when I take that secret key and call:

https://demo.shopaholic.dev/shopaholic/omnipay/paypal/success/05132d454b20a4287d3c6bc3cffcf343

It will mark the order as paid with no need to go to the payment gate.

(It is not working on demo.shopaholic.dev because there is no Shopaholic Omnipay plugin, but it works on e-shops with the plugin installed).

@kharanenka
Copy link
Contributor

Hi! Roadmap of purchase is:

  1. PayPal plugin sends request to API and adds "success callback URL" to request object.
  2. Customer pays for the order in PayPal interface.
  3. PayPal API sends request to site with using "success callback URL".
  4. "success callback URL" contains payment token only. We should add logic to change order state, if PayPal api sends request to "success callback URL".

We could protect this "success callback URL", if PayPal api passed additional data in request.
Perhaps now there is an opportunity to change the logic of plugin. I haven't researched PayPal API changes

@kharanenka kharanenka self-assigned this Feb 4, 2022
@vojtasvoboda
Copy link
Author

From my point of view, there should be some additional backend checks on the success callback URL. Because nowadays you can just open the success URL in the browser and the order is marked as paid without any payment.

If you know of some production e-shop with this plugin, I would be glad to try it.

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

No branches or pull requests

2 participants