-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(dashboard,core-flows,js-sdk,types,link-modules,payment): ability to copy payment link #8630
Conversation
… to copy payment link
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
@@ -103,12 +103,12 @@ export default class PaymentCollection { | |||
payment_providers = new Collection<Rel<PaymentProvider>>(this) | |||
|
|||
@OneToMany(() => PaymentSession, (ps) => ps.payment_collection, { | |||
cascade: [Cascade.PERSIST, "soft-remove"] as any, | |||
cascade: [Cascade.PERSIST] as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately had to remove this from the cascade as its causing an ambiguity in the SQL generated as both payment session and payment have the same column called "payment_collection_id". The MikroORM util does not specify which columns to generate, thereby dumping both columns in the query causing this issue.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
1627328 | Triggered | Generic Password | 52dd2ec | integration-tests/http/tests/user/admin/user.spec.ts | View secret |
1627328 | Triggered | Generic Password | 52dd2ec | integration-tests/http/tests/user/admin/user.spec.ts | View secret |
1627328 | Triggered | Generic Password | 52dd2ec | integration-tests/http/tests/user/admin/user.spec.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Upon capturing the payment, the "Copy payment link" button should disappear. However, it currently requires a full page refresh. Even though the amounts correctly change. To reproduce:
|
@@ -96,45 +100,61 @@ export const OrderSummarySection = ({ order }: OrderSummarySectionProps) => { | |||
return false | |||
}, [reservations]) | |||
|
|||
// TODO: We need a way to link payment collections to a change order to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Could the link have an additional column type
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we can do that
|
||
throwUnlessStatusIsNotPaid({ paymentCollection }) | ||
|
||
removeRemoteLinkStep({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Shouldn't we delete the actual payment collection as well? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed that – that's neat!
what:
Note: Not the happiest with the decision on when to create a payment collection and when not to. The code should programatically create or delete payment collections currently to generate the right collection for the payment delta. Adding a more specific flow to create and manage a payment collection will help reduce this burden from the code path and onto CX/merchant.
Another issue I found is that the payment collection status doesn't get updated when payment is complete as it still gets stuck to "authorized" state
payment.mp4