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

DON-998: set PI just before processing the payment instead of at the #1151

Merged
merged 39 commits into from
Jan 8, 2025

Conversation

dorota-joanna
Copy link
Contributor

@dorota-joanna dorota-joanna commented Dec 27, 2024

time of creating the donation

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 60.60606% with 13 lines in your changes missing coverage. Please review.

Project coverage is 74.28%. Comparing base (9aac3bd) to head (410d03d).
Report is 40 commits behind head on develop.

Files with missing lines Patch % Lines
...pplication/Commands/TakeRegularGivingDonations.php 0.00% 9 Missing ⚠️
src/Domain/DonationService.php 33.33% 2 Missing ⚠️
src/Application/Commands/SetupTestMandate.php 0.00% 1 Missing ⚠️
src/Domain/DoctrineDonationRepository.php 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1151      +/-   ##
===========================================
- Coverage    74.79%   74.28%   -0.52%     
===========================================
  Files          128      128              
  Lines         5531     5588      +57     
===========================================
+ Hits          4137     4151      +14     
- Misses        1394     1437      +43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@NoelLH NoelLH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the main direction of the change look right; flagged a few issues inline

src/Application/Commands/TakeRegularGivingDonations.php Outdated Show resolved Hide resolved
/**
* We only set Payment Intent on the day of the payment due to stripe limitations, see
*/
public function findDonationsToSetPaymentIntent(\DateTimeImmutable $atDateTime, int $limit): array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have no test coverage – would be a good fit for an integration test?

src/Domain/DoctrineDonationRepository.php Outdated Show resolved Hide resolved
@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch 2 times, most recently from 6557795 to eac45cd Compare January 2, 2025 17:47
NoelLH and others added 9 commits January 3, 2025 09:01
* create test mandate and optionally pass when creating test donation
* stack all em persisits right before flush
* assert donations not empty and match by uuid
* add return type to set payment intent method
* adding var_dump made it all actually pass
* inline amounts
* use charity's salesforceID from parent
* remove 'missing salesforceId' exeptions, it will never be null
@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch from 563c2ed to 913327a Compare January 3, 2025 09:17
src/Domain/DonorAccount.php Outdated Show resolved Hide resolved
@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch from 95d34c4 to 06be75c Compare January 3, 2025 11:15
@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch from 72b9593 to ea92c8a Compare January 3, 2025 11:57
@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch from fad099c to da7ac4f Compare January 3, 2025 16:22
src/Domain/DonationService.php Outdated Show resolved Hide resolved
bdsl
bdsl previously approved these changes Jan 8, 2025
Copy link
Contributor

@bdsl bdsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dorota-joanna dorota-joanna force-pushed the DON-998-2nd-3rd-donation-PI-rework branch from 8e6bbb1 to 410d03d Compare January 8, 2025 11:38
@dorota-joanna dorota-joanna merged commit 064f96d into develop Jan 8, 2025
1 of 4 checks passed
@dorota-joanna dorota-joanna deleted the DON-998-2nd-3rd-donation-PI-rework branch January 8, 2025 11:42
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.

3 participants