-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dispute webhook information handling (#301)
* Add dispute webhook information handling * Add order admin warning for disputed transactions * Woops * Fix agree to rules checkboxes * Add payment dispute email notification * Add email call * Fix dispute email salutation
- Loading branch information
Showing
15 changed files
with
421 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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
23 changes: 23 additions & 0 deletions
23
registration/templates/registration/emails/chargeback-notice.html
This file contains 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,23 @@ | ||
<p>Hello {{ order.billingName }},</p> | ||
|
||
<p>Our systems have detected a chargeback dispute initated in relation to your registration transaction.</p> | ||
|
||
<p> | ||
Consistent with our refund policy as outlined by the attendee <a href="{{ event.codeOfConduct }}">code of conduct</a>, | ||
your order has been placed on hold, and you will be unable to retrieve your badge or register for {{ event.name }} | ||
again at least until the dispute is settled. | ||
</p> | ||
|
||
<p> | ||
Chargeback disputes (denying a charge) made for the sole purpose of avoiding payment, made without sufficient cause, | ||
or that are made without first attempting to resolve the dispute directly may result in permanent revocation of | ||
membership privileges. | ||
</p> | ||
<p> | ||
Please contact {{ event.registrationEmail }} for any questions or assistance. | ||
</p> | ||
|
||
<p> | ||
--<br> | ||
{{ event.name }} <a href="mailto:{{ event.registrationEmail }}">{{ event.registrationEmail }}</a> | ||
</p> |
17 changes: 17 additions & 0 deletions
17
registration/templates/registration/emails/chargeback-notice.txt
This file contains 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,17 @@ | ||
Hello {{ order.billingName }}, | ||
|
||
Our systems have detected a chargeback dispute initated in relation to your registration transaction. | ||
|
||
Consistent with our refund policy as outlined by the attendee code of conduct, your order has been placed on hold, | ||
and you will be unable to retrieve your badge or register for {{ event.name }} again at least until | ||
the dispute is settled. | ||
|
||
Chargeback disputes (denying a charge) made for the sole purpose of avoiding payment, made without sufficient cause, | ||
or that are made without first attempting to resolve the dispute directly may result in permanent revocation of | ||
membership privileges. | ||
|
||
Please contact {{ event.registrationEmail }} for any questions or assistance. | ||
|
||
-- | ||
{{ event.name }} <{{ event.registrationEmail }}> | ||
{{ event.codeOfConduct }} |
This file contains 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 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 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 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 |
---|---|---|
|
@@ -186,3 +186,17 @@ def test_send_dealer_assistant_registration_invite(self, mock_send_email): | |
self.assertIn(self.assistant.registrationToken, html_text) | ||
self.assistant.refresh_from_db() | ||
self.assertTrue(self.assistant.sent) | ||
|
||
|
||
class TestChargebackEmail(EmailTestCase): | ||
@patch("registration.emails.send_email") | ||
def test_send_chargeback_notice_email(self, mock_send_email): | ||
order = Order( | ||
total="88.04", | ||
status=Order.COMPLETED, | ||
reference="FOOBAR", | ||
billingEmail="[email protected]", | ||
lastFour="1111", | ||
) | ||
emails.send_chargeback_notice_email(order) | ||
mock_send_email.assert_called_once() |
This file contains 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
Oops, something went wrong.