Skip to content

Addressing PR comments#5

Merged
shahwan42 merged 56 commits intomainfrom
pr-comments-by-julienbourdeau
Mar 17, 2025
Merged

Addressing PR comments#5
shahwan42 merged 56 commits intomainfrom
pr-comments-by-julienbourdeau

Conversation

@shahwan42
Copy link

Roadmap Task

👉 https://getlago.canny.io/feature-requests/p/{{FEATURE_SLUG}}

Context

Include relevant motivation and context.

Description

Describe your changes in detail.

List any dependencies that are required.

feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService
@shahwan42 shahwan42 changed the title Pr comments by julienbourdeau Addressing PR comments Mar 5, 2025
@shahwan42 shahwan42 force-pushed the pr-comments-by-julienbourdeau branch from 51c4572 to af620a4 Compare March 14, 2025 01:05
@shahwan42 shahwan42 marked this pull request as ready for review March 17, 2025 03:15
@shahwan42 shahwan42 force-pushed the pr-comments-by-julienbourdeau branch from fcd32ca to cc97b2d Compare March 17, 2025 03:32
@shahwan42 shahwan42 requested a review from d7my11 March 17, 2025 04:11
@shahwan42 shahwan42 merged commit d8c1981 into main Mar 17, 2025
3 checks passed
@shahwan42 shahwan42 deleted the pr-comments-by-julienbourdeau branch March 17, 2025 04:37
shahwan42 added a commit that referenced this pull request Mar 17, 2025
feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

Addressing PR comments (#5)

* feat: moneyhash provider

feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

* Remove Useless assignment variable

* Add moneyhash_provider tests

* Add MoneyhashCustomer tests

* WIP: CLEANUP FIRST

* Fix: Add moneyhahs payment_type

* Fix: Handle intent.processed webhook type

* Fix auto-payments for new invoices in a subscription

* test HandleIncomingWebhook triggers HandleEventJob

* Test webhook handle_event for processed intent & card_token created

* refactor: split events handling tests

* Test card_token.updated handling

* Test #handle_transaction_event

* Test transaction.purchase.failed

* rename pending > pending_authentication

* fix Rubocop complaint

* Test PaymentProviderCustomers::MoneyhashService#create

* Join address lines when sending to moneyhash

* Fix when moneyhash returns correct class

* Test intent.time_expired event handling

* remove logging

* test pending_authentication event handling

* Remove generate_checkout_url: Not supported by moneyhash

* Add custom_fields during MH customer creation

* Test update_payment_method

- test handle_missing_customer
- test update <- placeholder

* Update custom_fields & minor refactor

* Test MH payment's CreateService

* refactor MH's CreateService

* Revert "Remove generate_checkout_url: Not supported by moneyhash"

This reverts commit ec73267.

* Update checkout_url generation with agreement_id & refactor

* Update agreement_id & Add more custom_fields

* refactor

* Support All invoice types for automatic payments

* Test card_token.deleted event handling & fix probable bug

* Fix successful status

* re-assign invoice if it's not set already

* Mock checkout_url generation

* Fix payment_type for automatic payments

* Test Invoices::PaymentsMoneyhashService

- test update_payment_status
- test generate_payment_url
- remove useless code

* Cleanup

* Lago->MH status mapping

* Refine CreateService & its tests

* Improve payment_status & payable_payment_status handling

* Send more custom_fields with MoneyHash calls

* Refactor moneyhash webhook interface to new architecture

* Fix handle_incoming_webhook_service_spec

* Fix webhook issues due to refactor

* Fix moneyhash webhook controller test

* tokenize card conditionally for invoice payment_url

* Extract all possible billing data from the customer

* refactor custom_fields extraction

* update where to get amount_cents from during payment

* Test payment_requests/moneyhash_service

* Fix tests after refactoring billing_data/custom_fields extraction

* Fix test after defaulting payable
shahwan42 added a commit that referenced this pull request Mar 28, 2025
feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

Addressing PR comments (#5)

* feat: moneyhash provider

feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

* Remove Useless assignment variable

* Add moneyhash_provider tests

* Add MoneyhashCustomer tests

* WIP: CLEANUP FIRST

* Fix: Add moneyhahs payment_type

* Fix: Handle intent.processed webhook type

* Fix auto-payments for new invoices in a subscription

* test HandleIncomingWebhook triggers HandleEventJob

* Test webhook handle_event for processed intent & card_token created

* refactor: split events handling tests

* Test card_token.updated handling

* Test #handle_transaction_event

* Test transaction.purchase.failed

* rename pending > pending_authentication

* fix Rubocop complaint

* Test PaymentProviderCustomers::MoneyhashService#create

* Join address lines when sending to moneyhash

* Fix when moneyhash returns correct class

* Test intent.time_expired event handling

* remove logging

* test pending_authentication event handling

* Remove generate_checkout_url: Not supported by moneyhash

* Add custom_fields during MH customer creation

* Test update_payment_method

- test handle_missing_customer
- test update <- placeholder

* Update custom_fields & minor refactor

* Test MH payment's CreateService

* refactor MH's CreateService

* Revert "Remove generate_checkout_url: Not supported by moneyhash"

This reverts commit ec73267.

* Update checkout_url generation with agreement_id & refactor

* Update agreement_id & Add more custom_fields

* refactor

* Support All invoice types for automatic payments

* Test card_token.deleted event handling & fix probable bug

* Fix successful status

* re-assign invoice if it's not set already

* Mock checkout_url generation

* Fix payment_type for automatic payments

* Test Invoices::PaymentsMoneyhashService

- test update_payment_status
- test generate_payment_url
- remove useless code

* Cleanup

* Lago->MH status mapping

* Refine CreateService & its tests

* Improve payment_status & payable_payment_status handling

* Send more custom_fields with MoneyHash calls

* Refactor moneyhash webhook interface to new architecture

* Fix handle_incoming_webhook_service_spec

* Fix webhook issues due to refactor

* Fix moneyhash webhook controller test

* tokenize card conditionally for invoice payment_url

* Extract all possible billing data from the customer

* refactor custom_fields extraction

* update where to get amount_cents from during payment

* Test payment_requests/moneyhash_service

* Fix tests after refactoring billing_data/custom_fields extraction

* Fix test after defaulting payable

MH Signature verfication (#6)

* Remove useless statement

* Remove useless statement

* validate moneyhash's webhook signature

- save signature_key during moneyhash connection creation
- use saved signature_key to validate incoming signature_key

* Fix MH webhook controller test
shahwan42 added a commit that referenced this pull request Mar 28, 2025
feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

Addressing PR comments (#5)

* feat: moneyhash provider

feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

* Remove Useless assignment variable

* Add moneyhash_provider tests

* Add MoneyhashCustomer tests

* WIP: CLEANUP FIRST

* Fix: Add moneyhahs payment_type

* Fix: Handle intent.processed webhook type

* Fix auto-payments for new invoices in a subscription

* test HandleIncomingWebhook triggers HandleEventJob

* Test webhook handle_event for processed intent & card_token created

* refactor: split events handling tests

* Test card_token.updated handling

* Test #handle_transaction_event

* Test transaction.purchase.failed

* rename pending > pending_authentication

* fix Rubocop complaint

* Test PaymentProviderCustomers::MoneyhashService#create

* Join address lines when sending to moneyhash

* Fix when moneyhash returns correct class

* Test intent.time_expired event handling

* remove logging

* test pending_authentication event handling

* Remove generate_checkout_url: Not supported by moneyhash

* Add custom_fields during MH customer creation

* Test update_payment_method

- test handle_missing_customer
- test update <- placeholder

* Update custom_fields & minor refactor

* Test MH payment's CreateService

* refactor MH's CreateService

* Revert "Remove generate_checkout_url: Not supported by moneyhash"

This reverts commit ec73267.

* Update checkout_url generation with agreement_id & refactor

* Update agreement_id & Add more custom_fields

* refactor

* Support All invoice types for automatic payments

* Test card_token.deleted event handling & fix probable bug

* Fix successful status

* re-assign invoice if it's not set already

* Mock checkout_url generation

* Fix payment_type for automatic payments

* Test Invoices::PaymentsMoneyhashService

- test update_payment_status
- test generate_payment_url
- remove useless code

* Cleanup

* Lago->MH status mapping

* Refine CreateService & its tests

* Improve payment_status & payable_payment_status handling

* Send more custom_fields with MoneyHash calls

* Refactor moneyhash webhook interface to new architecture

* Fix handle_incoming_webhook_service_spec

* Fix webhook issues due to refactor

* Fix moneyhash webhook controller test

* tokenize card conditionally for invoice payment_url

* Extract all possible billing data from the customer

* refactor custom_fields extraction

* update where to get amount_cents from during payment

* Test payment_requests/moneyhash_service

* Fix tests after refactoring billing_data/custom_fields extraction

* Fix test after defaulting payable

MH Signature verfication (#6)

* Remove useless statement

* Remove useless statement

* validate moneyhash's webhook signature

- save signature_key during moneyhash connection creation
- use saved signature_key to validate incoming signature_key

* Fix MH webhook controller test
shahwan42 added a commit that referenced this pull request Mar 28, 2025
feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

Addressing PR comments (#5)

* feat: moneyhash provider

feat(moneyhash): generate graphql schema for moneyhash

fix(moneyhash) customer creation

fix(moneyhash): webhook

feat(moneyhash): update required fields for connection creation/update

feat(moneyhash): build webhook_end_point based on LAGO_API_URL

feat(moneyhash): Use flow_id if exists

fix(moneyhash): correct amount before sending it

feat(moneyhash): remove redirect_url

cleanup: remove commented code

feat(moneyhash): make flow_id required during connection creation

feat(moneyhash): Only use flow_id instead of operation

feat(moneyhash): add more to custom_fields

feat(moneyhash): Implement moneyhash/payments/create_service

fix(moneyhash): get agreement_id from subscription_external_id

fix(payment_providers): possible types

regenerate graphql schema

fix formatting according to rubocop

revert unrelated change

shorten Types::Customers::Object#provider_customer

better refactor Types::Customers::Object#provider_customer

feat(moneyhash): put-back-success-url-field

Expected by code shared between providers

feat(moneyhash): revert a refactor, disable rubocop rule

cleanup: remove unncessary newline

remove potential duplicate email calls

Send email when can't create a payment, too

Fix payment_url for one-off invoices

Remove expire_after_seconds for invoice payments

Revamp PaymentProviders::Moneyhash::Payments::CreateService

* Remove Useless assignment variable

* Add moneyhash_provider tests

* Add MoneyhashCustomer tests

* WIP: CLEANUP FIRST

* Fix: Add moneyhahs payment_type

* Fix: Handle intent.processed webhook type

* Fix auto-payments for new invoices in a subscription

* test HandleIncomingWebhook triggers HandleEventJob

* Test webhook handle_event for processed intent & card_token created

* refactor: split events handling tests

* Test card_token.updated handling

* Test #handle_transaction_event

* Test transaction.purchase.failed

* rename pending > pending_authentication

* fix Rubocop complaint

* Test PaymentProviderCustomers::MoneyhashService#create

* Join address lines when sending to moneyhash

* Fix when moneyhash returns correct class

* Test intent.time_expired event handling

* remove logging

* test pending_authentication event handling

* Remove generate_checkout_url: Not supported by moneyhash

* Add custom_fields during MH customer creation

* Test update_payment_method

- test handle_missing_customer
- test update <- placeholder

* Update custom_fields & minor refactor

* Test MH payment's CreateService

* refactor MH's CreateService

* Revert "Remove generate_checkout_url: Not supported by moneyhash"

This reverts commit ec73267.

* Update checkout_url generation with agreement_id & refactor

* Update agreement_id & Add more custom_fields

* refactor

* Support All invoice types for automatic payments

* Test card_token.deleted event handling & fix probable bug

* Fix successful status

* re-assign invoice if it's not set already

* Mock checkout_url generation

* Fix payment_type for automatic payments

* Test Invoices::PaymentsMoneyhashService

- test update_payment_status
- test generate_payment_url
- remove useless code

* Cleanup

* Lago->MH status mapping

* Refine CreateService & its tests

* Improve payment_status & payable_payment_status handling

* Send more custom_fields with MoneyHash calls

* Refactor moneyhash webhook interface to new architecture

* Fix handle_incoming_webhook_service_spec

* Fix webhook issues due to refactor

* Fix moneyhash webhook controller test

* tokenize card conditionally for invoice payment_url

* Extract all possible billing data from the customer

* refactor custom_fields extraction

* update where to get amount_cents from during payment

* Test payment_requests/moneyhash_service

* Fix tests after refactoring billing_data/custom_fields extraction

* Fix test after defaulting payable

MH Signature verfication (#6)

* Remove useless statement

* Remove useless statement

* validate moneyhash's webhook signature

- save signature_key during moneyhash connection creation
- use saved signature_key to validate incoming signature_key

* Fix MH webhook controller test
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.

1 participant