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

Pass locale into PaymentNotificationEmailDonorJob in PaymentMailer#resend_donor_receipt #1620

Merged
merged 3 commits into from
Aug 26, 2023

Conversation

wwahammy
Copy link
Member

Closes #1139

@github-actions github-actions bot added the mailer Code related to mail label Aug 10, 2023
@wwahammy
Copy link
Member Author

@BenSturmfels this should handle the locale issue.

@wwahammy
Copy link
Member Author

@BenSturmfels please try again

@BenSturmfels
Copy link
Contributor

Hi @wwahammy. It doesn't seem to be working for me sorry - the donation seems to process successfully, but no connection is made to the local mail server - nothing in the logs. Are you receiving the campaign donation confirmation emails in your testing?

I've again tested the forgot password workflow, and emails are going out fine there, so it's not an issue with the mail infrastructure.

Here's the logs for when you enter a credit card number and hit "Submit" on the campaign payment form:

Web server:

Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.191036 #3155561]  INFO -- : source=rack-timeout id=bd64ca59-30ff-41f9-8703-9af792f06683 timeout=15000ms state=ready
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.191460 #3155561]  INFO -- : [bd64ca59-30ff-41f9-8703-9af792f06683] Started POST "/cards" for 118.210.67.95 at 2023-08-17 12:50:28 +0000
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.192606 #3155561]  INFO -- : [bd64ca59-30ff-41f9-8703-9af792f06683] Processing by CardsController#create as */*
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.192714 #3155561]  INFO -- : [bd64ca59-30ff-41f9-8703-9af792f06683]   Parameters: {"card"=>{"holder_id"=>28, "holder_type"=>"Supporter", "name"=>"Visa *4242", "stripe_card_token"=>"[FILTERED]", "stripe_card_id"=>"card_1Ng5ehJrneyZc8xUMRpJsnsY"}}
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.788857 #3155561]  INFO -- : [bd64ca59-30ff-41f9-8703-9af792f06683]   Rendered cards/create.json.jbuilder (Duration: 0.2ms | Allocations: 57)
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.789329 #3155561]  INFO -- : [bd64ca59-30ff-41f9-8703-9af792f06683] Completed 200 OK in 597ms (Views: 1.1ms | ActiveRecord: 17.8ms | Allocations: 7963)
Aug 17 12:50:28 donationtest bash[3155561]: I, [2023-08-17T12:50:28.790081 #3155561]  INFO -- : source=rack-timeout id=bd64ca59-30ff-41f9-8703-9af792f06683 timeout=15000ms service=599ms state=completed
Aug 17 12:50:29 donationtest bash[3155561]: I, [2023-08-17T12:50:29.018948 #3155561]  INFO -- : source=rack-timeout id=1528d71a-9956-4d2c-bb77-f1e14f26be4a timeout=15000ms state=ready
Aug 17 12:50:29 donationtest bash[3155561]: I, [2023-08-17T12:50:29.019571 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] Started POST "/nonprofits/1/donations" for 118.210.67.95 at 2023-08-17 12:50:29 +0000
Aug 17 12:50:29 donationtest bash[3155561]: I, [2023-08-17T12:50:29.020800 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] Processing by Nonprofits::DonationsController#create as */*
Aug 17 12:50:29 donationtest bash[3155561]: I, [2023-08-17T12:50:29.020900 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a]   Parameters: {"amount"=>1000, "nonprofit_id"=>"1", "campaign_id"=>5, "supporter_id"=>28, "token"=>"[FILTERED]", "donation"=>{"amount"=>1000, "nonprofit_id"=>"1", "supporter_id"=>28, "campaign_id"=>5}}
Aug 17 12:50:29 donationtest bash[3155561]: I, [2023-08-17T12:50:29.965611 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] [ActiveJob] Enqueued Wisper::ActiveJobBroadcaster::Wrapper (Job ID: 18ab73c5-d695-4ed8-a997-4ed1512901c3) to GoodJob(default) with arguments: "ObjectEventListener", "donation_created", [{"id"=>"objevt_un6h3W1M8SsUn4adhDiuFV", "object"=>"object_event", "type"=>"donation.created", "data"=>{"object"=>{"id"=>"don_voZxNg9zMdobGCvRAZJyCp", "object"=>"donation", "designation"=>nil, "type"=>"trx_assignment", "amount"=>{"cents"=>1000, "currency"=>"usd"}, "nonprofit"=>{"id"=>1, "object"=>"nonprofit", "name"=>"Software Freedom Conservancy"}, "supporter"=>{"id"=>28, "object"=>"supporter", "name"=>nil, "organization"=>nil, "phone"=>nil, "anonymous"=>false, "deleted"=>false, "nonprofit"=>1, "merged_into"=>nil, "supporter_addresses"=>[28]}, "transaction"=>{"id"=>"trx_Wa3rEnFMr4oMVzAa7a6tjr", "object"=>"transaction", "amount"=>{"cents"=>1000, "currency"=>"usd"}, "created"=>1692276629, "nonprofit"=>1, "supporter"=>28, "subtransaction"=>{"id"=>"stripetrx_Pte8Z8kR9tEnCwOCVkK7cM", "object"=>"stripe_transaction", "type"=>"subtransaction"}, "payments"=>[{"id"=>"stripechrg_COZfVl0WFQBmdu8OalqQ9f", "object"=>"stripe_transaction_charge", "type"=>"payment"}], "transaction_assignments"=>[{"id"=>"don_voZxNg9zMdobGCvRAZJyCp", "object"=>"donation", "type"=>"trx_assignment"}]}}}}]
Aug 17 12:50:30 donationtest bash[3155561]: I, [2023-08-17T12:50:30.006997 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] [ActiveJob] Enqueued Wisper::ActiveJobBroadcaster::Wrapper (Job ID: 7278e57e-ef78-4822-b0fb-eed5081684f2) to GoodJob(default) with arguments: "CreditCardPaymentListener", "donation_create", [#<GlobalID:0x000056211df19b38 @uri=#<URI::GID gid://commitchange/Donation/15>>, nil]
Aug 17 12:50:30 donationtest bash[3155561]: I, [2023-08-17T12:50:30.019717 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] [ActiveJob] Enqueued Wisper::ActiveJobBroadcaster::Wrapper (Job ID: 33f867e1-5d2e-4527-baa9-46c7f6704d78) to GoodJob(default) with arguments: "SepaPaymentListener", "donation_create", [#<GlobalID:0x000056211defacd8 @uri=#<URI::GID gid://commitchange/Donation/15>>, nil]
Aug 17 12:50:30 donationtest bash[3155561]: I, [2023-08-17T12:50:30.021392 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a]   Rendered nonprofits/donations/create.json.jbuilder (Duration: 0.2ms | Allocations: 38)
Aug 17 12:50:30 donationtest bash[3155561]: I, [2023-08-17T12:50:30.022055 #3155561]  INFO -- : [1528d71a-9956-4d2c-bb77-f1e14f26be4a] Completed 200 OK in 1001ms (Views: 1.3ms | ActiveRecord: 90.2ms | Allocations: 52528)
Aug 17 12:50:30 donationtest bash[3155561]: I, [2023-08-17T12:50:30.022853 #3155561]  INFO -- : source=rack-timeout id=1528d71a-9956-4d2c-bb77-f1e14f26be4a timeout=15000ms service=1004ms state=completed

GoodJob:

[GoodJob] Notifier received payload: {"queue_name":"default","scheduled_at":"2023-08-17T12:50:29.957Z"}
[GoodJob] [3155573] [GoodJob::Scheduler(queues=* max_threads=5)-thread-2] Executed GoodJob 18ab73c5-d695-4ed8-a997-4ed1512901c3
[GoodJob] Notifier received payload: {"queue_name":"default","scheduled_at":"2023-08-17T12:50:29.993Z"}
[GoodJob] Notifier received payload: {"queue_name":"default","scheduled_at":"2023-08-17T12:50:30.010Z"}
[GoodJob] [3155573] [GoodJob::Scheduler(queues=* max_threads=5)-thread-4] Executed GoodJob 7278e57e-ef78-4822-b0fb-eed5081684f2
[GoodJob] [3155573] [GoodJob::Scheduler(queues=* max_threads=5)-thread-2] Executed GoodJob 33f867e1-5d2e-4527-baa9-46c7f6704d78

@wwahammy
Copy link
Member Author

@BenSturmfels that second one is a different issue which I'm investigating.

@wwahammy wwahammy merged commit 50027ee into main Aug 26, 2023
25 of 26 checks passed
@wwahammy wwahammy deleted the fix-for-1139 branch August 26, 2023 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mailer Code related to mail
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] PaymentNotificationEmailDonorJob fails due to missing locale
2 participants