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

Update the payment due date for banktransfers, when the order is changed #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pc-coholic
Copy link
Member

SEPA-Banktransfers are the only payment method at Mollie, where we actively need to communicate a due date to Mollie after which the incoming bank transfer is refused.

Some of our customers however are facing an issue, that they have to extend the payment deadline on an order to accommodate slower corporate payment processes. Doing so will however not extend the due date on the Mollie-payment - which in turn causes Mollie to return the payment to the sender.

This (untested) PR listens for the order_changed signal and transmits a new due date to Mollie to counter this issue.

@pc-coholic pc-coholic requested a review from raphaelm June 27, 2023 10:04
@@ -101,3 +100,14 @@ def refresh_mollie_tokens(sender, **kwargs):
if rt not in seen:
refresh_mollie_token(es.object, True)
seen.add(rt)


@receiver(order_modified, dispatch_uid='mollie_order_modified')
Copy link
Member

Choose a reason for hiding this comment

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

pretix.base.services.orders.extend_order does not seem to trigger this signal

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, that kinda makes this whole thing obsolete...

I guess we could either introduce a new expiration_changed or emit the order_changed-signal from the service. Any preference?

headers=self.request_headers
)
req.raise_for_status()
payment.info_data = req.json()
Copy link
Member

Choose a reason for hiding this comment

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

Should we create a log entry for this as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, can do.

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.

2 participants