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

make payment price sync on order delete DOT-263 #2978

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

marcelwk
Copy link
Contributor

@marcelwk marcelwk commented Jan 22, 2023

Description of changes

Fix of #2887

Added decorator to make price sync function also when order is deleted, and not only when new order is created.
Otherwise the price shown in UI and price sent to Stripe diverge after order is deleted

Code Checklist

  • I have added tests
  • I have provided documentation

@marcelwk marcelwk linked an issue Jan 22, 2023 that may be closed by this pull request
@marcelwk
Copy link
Contributor Author

Have not been able to set up the dev-env to test the fix. I would be grateful if someone could test it, and optionally create a test for the order-removal case.

@marcelwk
Copy link
Contributor Author

@henrikskog, ping because you're the issue author

@codecov
Copy link

codecov bot commented Jan 22, 2023

Codecov Report

Merging #2978 (3e40858) into main (2a8aea3) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2978      +/-   ##
==========================================
+ Coverage   78.60%   78.66%   +0.06%     
==========================================
  Files         338      338              
  Lines       14939    14940       +1     
==========================================
+ Hits        11743    11753      +10     
+ Misses       3196     3187       -9     
Files Coverage Δ
apps/webshop/signals.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@henrikskog henrikskog changed the title make payment price sync on order delete make payment price sync on order delete DOT-263 Sep 28, 2023
@linear
Copy link

linear bot commented Sep 28, 2023

DOT-263 Billed for wrong items in webshop

Is the webshop being used? If so this should probably be looked into.

From github issue (#2887):
Describe the bug
People are being billed for items not chosen when buying items. One of ways in which the bug can occur: selecting an item, then unselecting it. If you then go to buy something else, you will also be billed for the item you selected then unselected.

There has been multiple bug reports for this. This is the latest one:

“Heisann! Det kan virke som problemet med overbetaling om man fjerner en artikkel fra webshop-handlekurven fortsatt ikke er borte 😅 Er en som fjernet en sløyfe når vedkommende skulle kjøpe ølglass og ble alikevell fakturert for sløyfen i stripe, men registrert for kun ølglassene 🙈”

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

  • Users should only be billed for the items that are in their cart when pressing buy!!

Screenshots
If applicable, add screenshots to help explain your problem.

@henrikskog
Copy link
Contributor

Sorry for reviewing so late, but thank you so much for the PR! I ran it locally and as far as I can tell it now syncs correctly.

@henrikskog henrikskog force-pushed the 2887-billed-for-wrong-items-in-webshop branch from 4b4cc8b to 3e40858 Compare October 2, 2023 11:13
@henrikskog henrikskog marked this pull request as ready for review October 2, 2023 11:13
@henrikskog henrikskog self-requested a review October 2, 2023 11:13
@henrikskog henrikskog merged commit 8cb0f25 into main Oct 2, 2023
10 checks passed
@henrikskog henrikskog deleted the 2887-billed-for-wrong-items-in-webshop branch October 2, 2023 11:19
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

Successfully merging this pull request may close these issues.

Billed for wrong items in webshop
2 participants