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

Add link to payment processor dashboard #10048

Merged
merged 21 commits into from
May 22, 2024
Merged

Add link to payment processor dashboard #10048

merged 21 commits into from
May 22, 2024

Conversation

hdiniz
Copy link
Contributor

@hdiniz hdiniz commented Apr 17, 2024

Related opencollective/opencollective#7345

Provides a link to the payment processor dashboard (Stripe) if available.

@hdiniz hdiniz self-assigned this Apr 17, 2024
@hdiniz hdiniz marked this pull request as ready for review May 13, 2024 10:31
server/paymentProviders/stripe/webhook.ts Outdated Show resolved Hide resolved
server/paymentProviders/stripe/webhook.ts Outdated Show resolved Hide resolved
server/paymentProviders/stripe/webhook.ts Outdated Show resolved Hide resolved
@hdiniz hdiniz force-pushed the contributions-drawer branch 2 times, most recently from 70ebfd2 to 0be0eef Compare May 20, 2024 12:31
Comment on lines +6 to +12
await queryInterface.sequelize.query(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS "orders_isPendingContribution" ON "Orders" (((data #>> '{isPendingContribution}')::text)) where ((data #>> '{isPendingContribution}'::text[]) = 'true'::text);
`);

await queryInterface.sequelize.query(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS "orders_isManualContribution" ON "Orders" (((data #>> '{isManualContribution}')::text)) where ((data #>> '{isManualContribution}'::text[]) = 'true'::text);
`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we need those casts since the double >> already casts to text. Also, I think the second cast is wrong, it is not an array of texts.

If you need an example of how to index data fields:
https://github.com/opencollective/opencollective-api/pull/10037/files#diff-3af06b8af92da31930b6a5d8634d7dcca72dfe3d1703564986697d827cc82d78R8-R12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will double check the indexes with the example you provided. The ::text[] cast refers to the argument of #>>, but its probably unnecessary, I just copied the database format after creating the index manually.

@@ -280,6 +286,8 @@ export const paymentIntentProcessing = async (event: Stripe.Event) => {
},
{ transaction },
);

sendEmailNotifications(order);
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The processing webhook was not sending a notification or creating an activity for the processing status.

@hdiniz hdiniz merged commit bbe2f5c into main May 22, 2024
19 checks passed
@hdiniz hdiniz deleted the contributions-drawer branch May 22, 2024 19:22
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.

None yet

3 participants