Skip to content

Commit

Permalink
Update payment request status to payment failed
Browse files Browse the repository at this point in the history
on Adyen non successful response for the first payment intent,
then the payment request requested email is sent to customer
  • Loading branch information
ancorcruz committed Sep 12, 2024
1 parent e966ba8 commit f90e423
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/services/payment_requests/payments/adyen_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def create
return result unless res

adyen_success, _adyen_error = handle_adyen_response(res)
return result unless adyen_success
unless adyen_success
update_payable_payment_status(payment_status: :failed, deliver_webhook: false)
return result
end

payment = Payment.new(
payable: payable,
Expand Down

0 comments on commit f90e423

Please sign in to comment.