We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently when a payment is refunded on Komoju the payment status does not change on Spree:
https://github.com/komoju/spree_komoju/blob/1f820e074dba4fb0deeda54439f7d078f588452d/app/controllers/spree/komoju_controller.rb#L9
After doing some research I believe in order to fix this issue we need to add the following code to komoju_controller.rb
komoju_controller.rb
when "payment.refunded" refund = params[:data][:refunds].last order_number = extract_payment_number(params[:data][:external_order_num]) payment = Spree::Payment.find_by_number!(order_number) reason = Spree::RefundReason.find_or_create_by!(name: refund[:description] || "Refund") payment.refunds.create!(amount: payment.amount, reason: reason, transaction_id: refund[:id] ) end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently when a payment is refunded on Komoju the payment status
does not change on Spree:
https://github.com/komoju/spree_komoju/blob/1f820e074dba4fb0deeda54439f7d078f588452d/app/controllers/spree/komoju_controller.rb#L9
After doing some research I believe in order to fix this issue we need to add
the following code to
komoju_controller.rb
The text was updated successfully, but these errors were encountered: