-
Notifications
You must be signed in to change notification settings - Fork 2
Issue #129: Updated payment method display in the profile registrations list, added a method column to the Payment model, updated save payment code for registration and membership features.
#131
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
Open
lilliputten
wants to merge
4
commits into
main
Choose a base branch
from
129-bug-profile-page-payment-method
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
be343b7
Issue #129: Updated demo/test data fixtures.
lilliputten 3d505e3
Issue #129: Updated payment method display in the profile registratio…
lilliputten 04ebead
Issue #129: Used helper (`get_method_name`) to retrieve payment metho…
lilliputten e7f7280
Issue #129: Fixed asset scripts root entrypoint bug.
lilliputten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| # @changed 2024.03.28, 15:18 | ||
| # @changed 2024.04.06, 19:55 | ||
|
|
||
| - model: dds_registration.event | ||
| pk: 1 | ||
| fields: | ||
| id: 1 | ||
| code: 'first' | ||
| title: 'The first event' | ||
| description: 'First event description' | ||
| description: 'The first event description' | ||
| success_email: 'dmia@yandex.ru' | ||
| public: 1 | ||
| registration_open: '2024-03-25' | ||
| registration_close: '2024-04-20' | ||
| registration_open: '2024-04-06' | ||
| registration_close: '2024-04-25' | ||
| max_participants: 5 | ||
| payment_deadline_days: 30 | ||
| payment_details: '' | ||
| refund_last_day: '2024-04-30' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| # @changed 2024.03.28, 15:18 | ||
| # @changed 2024.04.06, 19:59 | ||
|
|
||
| - model: dds_registration.registrationoption | ||
| pk: 1 | ||
| fields: | ||
| id: 1 | ||
| item: 'Registration' | ||
| price: 100 | ||
| currency: 'USD' | ||
| currency: 'CHF' | ||
| event_id: 1 | ||
|
|
||
| - model: dds_registration.registrationoption | ||
| pk: 2 | ||
| fields: | ||
| id: 2 | ||
| item: 'T-Shirt' | ||
| price: 10 | ||
| price: 19 | ||
| currency: 'USD' | ||
| event_id: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # @changed 2024.04.06, 20:05 | ||
|
|
||
| - model: dds_registration.payment | ||
| pk: 1 | ||
| fields: | ||
| id: 1 | ||
| created: '2024-04-06' | ||
| updated: '2024-04-06' | ||
| status: 'CREATED' | ||
| data: '{"user": {"id": 2, "name": "John Lennon", "address": "251 Menlove Avenue, Liverpool, Merseyside L25 7SA, UK"}, "extra": "", "kind": "event", "method": "STRIPE", "event": {"id": 1, "title": "The first event"}, "registration": {"id": 1}, "option": {"id": 1, "item": "Registration"}, "price": 100.0, "currency": "CHF"}' |
8 changes: 4 additions & 4 deletions
8
...istration/fixtures/test-registration.yaml → ...ixtures/test-registration-1-submited.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| # @changed 2024.03.28, 21:07 | ||
| # @changed 2024.04.06, 20:01 | ||
|
|
||
| - model: dds_registration.registration | ||
| pk: 1 | ||
| fields: | ||
| id: 1 | ||
| status: 'SUBMITTED' | ||
| created_at: '2024-03-28 20:00:00.000000' | ||
| updated_at: '2024-03-28 20:00:00.000000' | ||
| created_at: '2024-04-06 19:59:46.154852' | ||
| updated_at: '2024-04-06 19:59:46.167242' | ||
| event_id: 1 | ||
| invoice_id: null | ||
| payment_id: 1 | ||
| user_id: 2 | ||
| option_id: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ def membership_application(request: HttpRequest): | |
| form = MembershipForm(request.POST) | ||
|
|
||
| if form.is_valid(): | ||
| payment_method = form.cleaned_data["payment_method"] | ||
| payment = Payment( | ||
| status="CREATED", | ||
| data={ | ||
|
|
@@ -41,7 +42,7 @@ def membership_application(request: HttpRequest): | |
| "membership": { | ||
| "type": form.cleaned_data["membership_type"], | ||
| }, | ||
| "method": form.cleaned_data["payment_method"], | ||
| "method": payment_method, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the idea behind this change? You create a variable to only use it once. I suggest reverting this change. |
||
| "price": MEMBERSHIP_DATA[form.cleaned_data["membership_type"]]["price"], | ||
| "currency": MEMBERSHIP_DATA[form.cleaned_data["membership_type"]]["currency"], | ||
| }, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,5 +45,3 @@ | |
| </div> | ||
| {% endfor %} | ||
| </fieldset> | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,19 @@ | ||
| /** | ||
| * @desc Main js entry point module (scripts) | ||
| * @module src/assets/scripts.ts | ||
| * @changed 2024.04.04, 16:06 | ||
| * @changed 2024.04.06, 22:00 | ||
| */ | ||
|
|
||
| /* NOTE: These modules are unused. Used only | ||
| * `src/assets/stripe-init/stripe_payment_intents_support.ts`, via requirejs, | ||
| * without exposing to global scope. | ||
| /* // NOTE: These modules are unused. Used only | ||
| * // `src/assets/stripe-init/stripe_payment_intents_support.ts`, via requirejs, | ||
| * // without exposing to global scope. | ||
| * | ||
| * import { billing_event_stripe_payment_proceed } from './stripe-init/billing_event_stripe_payment_proceed'; | ||
| * import { billing_membership_stripe_payment_proceed } from './stripe-init/billing_membership_stripe_payment_proceed'; | ||
| * | ||
| * // Expose functions to global scope... | ||
| * window.billing_event_stripe_payment_proceed = billing_event_stripe_payment_proceed; | ||
| * window.billing_membership_stripe_payment_proceed = billing_membership_stripe_payment_proceed; | ||
| * import { startStripeElementsForm } from './stripe-init/stripe_payment_intents_support'; | ||
| * | ||
| * console.log('[scripts] Main client code entry point', { | ||
| * billing_event_stripe_payment_proceed, | ||
| * billing_membership_stripe_payment_proceed, | ||
| * startStripeElementsForm, | ||
| * }); | ||
| */ | ||
|
|
||
| // Empty root module | ||
| export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No JSON anything is needed, all of that is done automatically. You are making this much more complicated than it needs to be. Please see #133 for a clean way to fix this issue.