-
Notifications
You must be signed in to change notification settings - Fork 12
Add new refund transaction endpoint #100
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
Merged
Noah-Silvera
merged 4 commits into
SuperGoodSoft:master
from
nvandoorn:add-new-refund-transaction-endpoint
Sep 8, 2021
Merged
Add new refund transaction endpoint #100
Noah-Silvera
merged 4 commits into
SuperGoodSoft:master
from
nvandoorn:add-new-refund-transaction-endpoint
Sep 8, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jarednorman
approved these changes
Aug 24, 2021
adammathys
approved these changes
Aug 24, 2021
Noah-Silvera
reviewed
Sep 1, 2021
.merge(order_address_params(spree_order.tax_address)) | ||
.merge( | ||
{ | ||
transaction_id: TransactionIdGenerator.refund_transaction_id(taxjar_order.transaction_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These pushes rebased to use the new TransactionIdGenerator
in the refund request.
Fixed broken specs. |
jarednorman
approved these changes
Sep 2, 2021
alexblackie
approved these changes
Sep 3, 2021
de1ff72
to
ad02904
Compare
A refund transaction should simply invert the values of an existing taxjar transaction and post. We are creating a new set of parameters as we want to deprecate but not break the existing refund_params behavior. Co-authored-by: Nick Van Doorn <[email protected]>
We need to post the address associated with the order for a refund transaction. We have assumed the refund should reflect the most up to date address, so we pull it from the spree order and not the taxjar transaction. Co-authored-by: Nick Van Doorn <[email protected]>
As we continue to add reporting to `solidus_taxjar` we need a method to create refund transactions. Refund transactions look like the original transaction but have all the payment amounts negated. We use the TaxJar order instead of the Spree order because the Spree order may have updated since the order was submitted to TaxJar. Co-authored-by: Jared Norman <[email protected]> Co-authored-by: Adam Mueller <[email protected]> Co-authored-by: Senem Soy <[email protected]> Co-authored-by: Kendra Chateau <[email protected]> Co-authored-by: Alex Blackie <[email protected]> Co-authored-by: Noah Silvera <[email protected]>
Just a rebase because the base branch got merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR?
Support submitting refund transactions to TaxJar.
How do you manually test these changes? (if applicable)
create_refund_transaction_for
(this extension will call this method in the future, but not yet)Merge Checklist