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

Handle Notifications from PayPal API #2826

Closed
wants to merge 10 commits into from

Conversation

gbirke
Copy link
Member

@gbirke gbirke commented Aug 23, 2023

gbirke and others added 8 commits August 22, 2023 11:55
Replace LegacyPayPalURLGenerator with PayPalAPIURLGenerator by passing a
PayPalAPIURLGeneratorConfig into the PaymentURLFactory

Add PayPal configuration files and reference to them from the main
config file. Change config schema.
We removed the "delay in days" option from the schema, because it will
be replaced by something different for delaying the membership.

Describe .env files and change override files

Improve README

Co-Authored-By: Abban Dunne <abban.dunne@wikimedia.de>
Co-Authored-By: Corinna Hillebrand <corinna.hillebrand@wikimedia.de>
Co-Authored-By: Sperling-0 <tanuja.doriya@wikimedia.de>
The PayPal API configuration is in a YAML file that gets read and
validated by `PayPalURLGeneratorConfigReader`. To avoid parsing and
validating on every request, we cache the output of the class in
`PayPalAPIURLGeneratorConfigLoader`.

We realized that we can reuse the cache for the campaign configuration,
because the "source" files for the configuration are in the same path
(`app/config`), so the cache keys won't collide. Renamed "CampaignCache"
to "ConfigurationCache".

Co-Authored-By: Abban Dunne <abban.dunne@wikimedia.de>
Co-Authored-By: Corinna Hillebrand <corinna.hillebrand@wikimedia.de>
Co-Authored-By: Sperling-0 <tanuja.doriya@wikimedia.de>
Add services to Symfony configuration so its dependency injection
framework can find the commands for creating and listing subscription
plans in the payment bounded context.

Loading the credentials from the `.env` files is done automatically in
`bin/console`, so the credentials will exist when the environ-specific
factory needs them.

https://phabricator.wikimedia.org/T341568

Co-Authored-By: Corinna Hillebrand <corinna.hillebrand@wikimedia.de>
Co-Authored-By: Sperling-0 <tanuja.doriya@wikimedia.de>
Add a command that can validate a PayPal API configuration file. Will be
used during deployment.
This commit implements the authentication interfaces for the bounded
contexts, with persistence. I called the implementation `OldStyleTokens`
to leave the option to have a different implementation that uses only
tokens.

This also removes the reliance on the Doctrine event system for
generating tokens. All the code in the Context Factories in the bounded
contexts can be removed.

I accidentally force-pushed to the bounded context branches, which led
to errors during the rebase of the `payment-with-ppl` branch. I removed
the composer.lock during the rebase and I'm adding it back here. This
commit fixes the broken `payment-with-ppl` branch.

Tickets:
https://phabricator.wikimedia.org/T341795
https://phabricator.wikimedia.org/T344271
Don't use application log file because by the time the factory is
called, it's still a NullLogger.
Recurring payments conducted through the PayPal API will have a
transaction type of `recurring_payment`.

Add a failing test for a recurring donation

This is for https://phabricator.wikimedia.org/T329162

Co-Authored-By: Corinna Hillebrand <corinna.hillebrand@wikimedia.de>
Co-Authored-By: Sperling-0 <tanuja.doriya@wikimedia.de>
This commit implements the authentication interfaces for the bounded
contexts, with persistence. I called the implementation `OldStyleTokens`
to leave the option to have a different implementation that uses only
tokens.

This also removes the reliance on the Doctrine event system for
generating tokens. All the code in the Context Factories in the bounded
contexts can be removed.

I accidentally force-pushed to the bounded context branches, which led
to errors during the rebase of the `payment-with-ppl` branch. I removed
the composer.lock during the rebase and I'm adding it back here. This
commit fixes the broken `payment-with-ppl` branch.

Tickets:
https://phabricator.wikimedia.org/T341795
https://phabricator.wikimedia.org/T344271
@gbirke gbirke force-pushed the ppl-api-fixes branch 2 times, most recently from 6228e58 to cf6022e Compare October 10, 2023 09:56
@gbirke
Copy link
Member Author

gbirke commented Oct 16, 2023

Closing this, because it contains just some TODOs for the next steps and then we realized we need to do all the authentication stuff.

@gbirke gbirke closed this Oct 16, 2023
@gbirke gbirke deleted the paypal-notification-with-ids branch October 16, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant