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

Adding command for manually "refunding" the user's enrollment #1451

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

jkachel
Copy link
Contributor

@jkachel jkachel commented Feb 24, 2023

Pre-Flight checklist

  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

Fixes #1426

What's this PR do?

Adds a new management command, refund_fulfilled_order, that will do a "dry refund" of a fulfilled order. That is, this will update the status of the order to "refunded" and will adjust the learner's enrollments, but will not attempt to refund the learner's money via CyberSource.

How should this be manually tested?

  1. Complete a transaction in the system.
  2. Run refund_fulfilled_order using the reference number. Specify each flag separately and check the outcome - if --audit is specified, the enrollment should be converted to an audit one, and if --unenroll is specified, the enrollment should be unenrolled.

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Merging #1451 (4b493d9) into main (acd0936) will increase coverage by 1.63%.
The diff coverage is 0.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1451      +/-   ##
==========================================
+ Coverage   81.31%   82.95%   +1.63%     
==========================================
  Files         164      311     +147     
  Lines        8971    13339    +4368     
  Branches      946      949       +3     
==========================================
+ Hits         7295    11065    +3770     
- Misses       1404     2003     +599     
+ Partials      272      271       -1     
Impacted Files Coverage Δ
...erce/management/commands/refund_fulfilled_order.py 0.00% <0.00%> (ø)
ecommerce/models.py 85.31% <0.00%> (ø)
frontend/public/src/reducers/notifications_test.js 100.00% <0.00%> (ø)
...end/public/src/components/forms/ApplyCouponForm.js 100.00% <0.00%> (ø)
frontend/public/src/components/OrderSummaryCard.js 10.25% <0.00%> (ø)
frontend/public/src/lib/notificationsApi_test.js 100.00% <0.00%> (ø)
.../public/src/components/forms/ChangePasswordForm.js 100.00% <0.00%> (ø)
...ublic/src/components/forms/ChangeEmailForm_test.js 100.00% <0.00%> (ø)
frontend/public/src/lib/queries/users_test.js 100.00% <0.00%> (ø)
frontend/public/src/components/UserMenu_test.js 100.00% <0.00%> (ø)
... and 139 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@annagav annagav self-requested a review February 27, 2023 14:04
@annagav annagav self-assigned this Feb 27, 2023
Copy link
Contributor

@annagav annagav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jkachel jkachel merged commit 6217209 into main Feb 27, 2023
@jkachel jkachel deleted the jkachel/1426-add-command-to-dry-refund-order branch February 27, 2023 20:38
@odlbot odlbot mentioned this pull request Feb 28, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manual process to refund PayPal purchases
3 participants