Repository navigation
MAE-1373: Add a test that pay-later instalments are selected for charging - #40
Conversation
…ging Membership payment plan instalments are pay later (invoices). Cover that the instalment charge selection picks up a due pay-later contribution and dispatches it, alongside the existing Pending and Partially paid cases.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces additional test coverage to verify that due membership payment plan instalments, specifically those categorized as 'pay-later' (invoices), are properly included in the charging process. By updating the test fixture helper, the changes ensure that the system correctly handles these contributions without impacting existing test scenarios. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a new unit test testSelectsPayLaterContributions to InstalmentChargeServiceTest.php to verify that pay-later contributions are correctly selected and charged. It also updates the createTestFixtures helper method to support the is_pay_later option, defaulting to FALSE. There are no review comments, and I have no feedback to provide.
Overview
Membership payment plan instalments are pay later (invoices). This adds a test that the instalment charge job picks up a due pay-later contribution and dispatches it to the processor, like any other due instalment. Part of PAYPLAN-4 (MAE-1373), which is test coverage only.
Before
The selection query already ignores
is_pay_later, and a Stripe membership plan's pay-later instalments were charged and completed when tested locally. But none of the tests inInstalmentChargeServiceTestused a pay-later contribution.The Stripe side, with screenshots of the charged instalments, is compucorp/uk.co.compucorp.stripe#325.
After
InstalmentChargeServiceTest::testSelectsPayLaterContributions: a due Pending pay-later contribution is charged and is in the dispatched batch. The fixture helper takes a newis_pay_lateroption (defaultFALSE, so the existing tests are unchanged).Spec check (PAYPLAN-4 A, selection)
receive_date <= now)payment_token_id)failedand the job only charges instalments whose attempt ispending. No test covers it. To be raised as its own ticket (details in compucorp/uk.co.compucorp.stripe#325)Comments
Targets the new
MAE-1355-workstreambranch, cut frommasterfor the MAE-1355 epic.