Skip to content

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
merged 4 commits into from
Sep 8, 2021
Merged

Add new refund transaction endpoint #100

merged 4 commits into from
Sep 8, 2021

Conversation

nvandoorn
Copy link
Contributor

@nvandoorn nvandoorn commented Aug 23, 2021

What is the goal of this PR?

Support submitting refund transactions to TaxJar.

How do you manually test these changes? (if applicable)

  1. Open a console on the dummy app
  2. Manually call create_refund_transaction_for (this extension will call this method in the future, but not yet)

Merge Checklist

@nvandoorn nvandoorn changed the base branch from master to add-new-refund-transaction-endpoint August 23, 2021 23:41
@Noah-Silvera Noah-Silvera changed the base branch from add-new-refund-transaction-endpoint to add-taxjar-show-order-endpoint September 1, 2021 22:53
.merge(order_address_params(spree_order.tax_address))
.merge(
{
transaction_id: TransactionIdGenerator.refund_transaction_id(taxjar_order.transaction_id),
Copy link
Member

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.

@Noah-Silvera
Copy link
Member

Fixed broken specs.

@Noah-Silvera Noah-Silvera force-pushed the add-taxjar-show-order-endpoint branch from de1ff72 to ad02904 Compare September 8, 2021 21:39
Noah-Silvera and others added 4 commits September 8, 2021 14:47
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]>
@Noah-Silvera Noah-Silvera changed the base branch from add-taxjar-show-order-endpoint to master September 8, 2021 21:47
@Noah-Silvera
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement "create_refund" interface to be used for full order refunds
5 participants